# Fuzzy Dynamic Parameter Adaptation in the Harmony Search Algorithm for the Optimization of the Ball and Beam Controller

Authors: Cinthia Peraza; Fevrier Valdez; Juan R. Castro; Oscar Castillo
Journal: Advances in Operations Research
 (2018)

---

## Abstract

This paper presents a method for dynamic parameter adaptation in the harmony search algorithm (HS) based on fuzzy logic. The adaptation is performed using Type 1 (FHS), interval Type 2 (IT2FHS), and generalized Type 2 (GT2FHS) fuzzy systems as the number of improvisations or iterations advances, achieving a better intensification and diversification. The main contribution of this work is the dynamic parameter adaptation using different types of fuzzy systems in the harmony search algorithm applied to optimization of the membership functions for a benchmark control problem; in this case it is focused on the ball and beam controller. Experiments are presented with the HS, FHS, IT2FHS, and GT2FHS with noise (uniform random number) and without noise for the controller, and the following error metrics are obtained: ITAE, ITSE, IAE, ISE, and RMSE, to validate the efficacy of the proposed methods.


---

## Body

## 1. Introduction

This paper presents a method based on different types of fuzzy systems, whose main goal is the dynamic parameter adaptation in metaheuristic algorithms [1, 2]. These algorithms are now increasingly being used to solve different problems like optimization of functions, controllers [3, 4], neural networks [5], and engineering [6, 7], among others. This work is based on the original harmony search algorithm which tries to mimic the improvisation process of musicians in finding a pleasing harmony and has been widely used to solve complex problems [8, 9]. There are different variants for the parameter adaptation of HS such as Adaptive Harmony Search Method for Structural Optimization [10], Parameter-Setting-Free Harmony Search Algorithm [11], and Self-Adaptive Global Best Harmony Search algorithm [12]. The main disadvantage of this algorithm is the use of fixed parameters throughout the iterations and premature convergence. The main goal of this work is to use the concepts of fuzzy sets to design a fuzzy system that adjusts dynamically harmony memory accepting (HMR) parameters and with its fuzzy rules controls the exploitation of the harmony search algorithm. The granular term is used herein to indicate the number of membership functions to be used in the fuzzy system. The proposed method called fuzzy harmony search algorithm (FHS) uses Type 1, interval Type 2, and generalized Type 2 fuzzy systems for dynamic parameter adaptation while other works have made different methods based on this algorithm such as [10–23]. The main contribution of this work is to perform dynamic parameter adaptation using Type 1, interval Type 2, and generalized Type 2 fuzzy system in the harmony search algorithm applied to optimization of the membership functions of a fuzzy controller for a benchmark problem. In this case it is focused on the ball and beam controller, which has the goal to maintain the balance of the ball in the beam. This problem was considered with the original and the proposed methods, with noise and without noise for the controller. This is in order to validate the effectiveness of the proposed method.This paper is organized as follows: Section2 describes concepts of fuzzy logic systems, Section 3 describes the concepts of fuzzy logic controllers, Section 4 describes the original harmony search method, Section 5 describes the proposed method, Section 6 shows the description of the ball and beam controller, Section 7 presents experiments and results, Section 8 presents a statistical comparison, and finally Section 9 offers the conclusions.


## 2. Fuzzy Logic Systems

Fuzzy logic was conceived by Lotfi. A. Zadeh in 1965, on the basis of a theory of fuzzy sets, which differs from the traditional crisp sets, because the degree of belonging is considered. At present, the use of logic systems (FLS) has increased, as can be observed in [24–30]. The Interval Type 2 fuzzy set has a fuzzy membership function, the membership grade for each element of this set is a fuzzy set in [0,1], as can be observed in [31–35]. In generalized Type 2 fuzzy sets the uncertainty is represented in volume and is able to handle greater uncertainty in the system. Some generalized Type 2 advances in the literature are presented in [36–40].


## 3. Fuzzy Controllers

A fuzzy logic controller (FLC) is widely used today to control any plant; the main advantage of using it is that it does not require knowledge of the mathematical model, and in the following papers type 1 fuzzy controllers have been successfully used [41, 42]. In Figure 1 the generic representation of the FLC is illustrated.Figure 1
General representation of a FLC.


## 4. Original Harmony Search Algorithm

The Harmony search (HS) algorithm has been recently developed as an analogy with the music improvisation process where music players improvise the pitch of their instruments to obtain better harmony [9, 43]. This algorithm has 5 steps that are the following.Step 1.
Initialize the problem and algorithm parameters as follows:(1)MinimizeFsubject  toxi∈Xi,i=1,…,NStep 2.
Initialize the harmony memory (HM),HM matrix is filled with as many randomly generated solution vectors as theHMS, as follows: (2)HM=x11x21…xN-11xN1x12x22…xN-12xN2⋮⋮⋮⋮⋮x1HMS-1x2HMS-1…xN-1HMS-1xNHMS-1x1HMSx2HMS…xN-1HMSxNHMSStep 3.
Improvise a new harmony from the HM. Equation (3) represents the HMR, (4) represents the pitch adjustment, and (5) represents the random selection operators:(3)x1′⟵x1′∈x1′,x2′,…,xi′HMSwithprobabilityHMR,x1′∈Xiwithprobability1-HMR(4)Pitch  adjusting  decision  forx1′⟵YesprobabilityPArateNowithprobability1-PArate(5)xi′⟵xi′±r·bwStep 4.
Update the harmony memory vector,x′=(x1′,x2′,…,xN′).Step 5.
Validate the stopping criterion. The maximum number of iterations is satisfied; computation is terminated. Otherwise, Steps3 and 4 are repeated.


## 5. Fuzzy Harmony Search Algorithm

The proposed method is based on the HS algorithm; in previous works the behavior of the original harmony search algorithm was studied; tests were performed with the“PArate” and HMR parameters and making adjustments to the HMR parameter achieves better results. The value of the HMR parameter is fixed during the process of improvisation of the algorithm; based on this it is decided to adjust this parameter with fuzzy system. The main contribution is to dynamically change the HMR parameter using type 1 (FHS), interval type 2 (IT2FHS), and generalized type 2 (GT2FHS) fuzzy systems as the number of iterations advances and with this to achieve more diversity of solutions. The diagram of the proposed method is illustrated in Figure 2.Figure 2
Flow diagram of the proposed method.


### 5.1. Performance Representation of the Type 1 Fuzzy System

The proposed type 1 fuzzy system (FHS) is composed using terms of type 1 fuzzy sets, granulated into the three triangular membership functions in the input and the output, and these triangular membership functions are represented by(6)fx;h,i,j=0,x≤hx-hi-h,h≤x≤ij-xj-i,i≤x≤j0,j≤xwhere h and j parameters locate the “Corner” of the triangle and the parameter i locates the center. The following equations represent the knowledge of the input and output of the fuzzy system.


#### 5.1.1. Input and Output Variables

To build a type 1 fuzzy system, the input and output linguistic variables are determined; in this case, there is one input and one output. The input variable is theIteration; this variable has the following membership functions (MFS): Low, Medium, and High. The fuzzy system has a single output called HMR, which refers to the harmony memory accepting parameter, and this variable has the following MFS: Low, Medium, and High. These MFS are listed in Table 1.Table 1
Type-1 membership functions for the input and output variables.
L o w μ L o w x = 0 , x ≤ - 0.5 x + 0.5 0 + 0.5 , - 0.5 ≤ x ≤ 0 0.5 - x 0.5 - 0 , 0 ≤ x ≤ 0.5 0 , 0.5 ≤ x  M e d i u m μ M e d i u m x = 0 , x ≤ 0 x - 0 0.5 - 0 , 0 ≤ x ≤ 0.5 1 - x 1 - 0.5 , 0.5 ≤ x ≤ 1 0 , 1 ≤ x  H i g h μ H i g h x = 0 , x ≤ 0.5 x - 0.5 1 - 0.5 , 0.5 ≤ x ≤ 1 1.5 - x 1.5 - 1 , 1 ≤ x ≤ 1.5 0 , 1.5 ≤ xTable1 shows the equations for constructing the MFS of the input and output variables of the type 1 fuzzy system.


### 5.2. Knowledge Representation of the Interval Type 2 Fuzzy System

The proposed interval type 2 fuzzy system (IT2FHS) is composed using terms of interval type 2 fuzzy sets, granulated into the three triangular MFS with uncertaina in the input and the output, and these triangular MFS are represented by (7)μ~x=μ_x,μ¯x=itritype2x,a1,b1,c1,a2,b2,c2wherea1<a2,b1<b2,c1<c2μ1x=max⁡min⁡x-a1b1-a1,c1-xc1-b1,0μ2x=max⁡min⁡x-a2b2-a2,c2-xc2-b2,0μ¯x=max⁡μ1x,μ2x∀x∉b1,b2μ¯x=1∀x∈b1,b2μ_x=min⁡μ1x,μ2xwhere a1, b1,andc2 parameters are for the upper MFS and a2, b2,andc1 are for the lower MFS. The following equations represent the knowledge of the input and output variables of the interval type 2 fuzzy system.


#### 5.2.1. Input and Output Variables

To build an interval type 2 fuzzy system, we used the same general structure of the type 1 fuzzy system and the same linguistic variables mentioned above; in this case, we have one input and one output. These MFS are listed in Table2.Table 2
Interval type-2 membership functions for the input and output variables.
L o w μ 1 x = m a x min ⁡ x - 0.58 - 0.08 - 0.58 , 0.41 - x 0.41 + 0.08 , 0 μ 2 x = m a x min ⁡ x + 0.41 0.08 + 0.41 , 0.58 - x 0.58 - 0.08 , 0 μ ¯ x = max ⁡ μ 1 x , μ 2 x   ∀ x ∉ ( - 0.08,0.08 ) μ ¯ x = 1   ∀  x ∈ ( - 0.08,0.08 ) μ _ x = min ⁡ μ 1 x , μ 2 x  M e d i u m μ 1 x = max ⁡ min ⁡ x + 0.83 0.41 + 0.83 , 0.91 - x 0.91 - 0.41 , 0 μ 2 x = max ⁡ min ⁡ x - 0.08 0.58 - 0.08 , 1.08 - x 1.08 - 0.58 , 0 μ ¯ x = max ⁡ μ 1 x , μ 2 x   ∀ x ∉ ( 0.41,0.58 ) μ ¯ x = 1   ∀ x ∈ ( 0.41,0.58 ) μ _ x = min ⁡ μ 1 x , μ 2 x  H i g h μ 1 x = max ⁡ min ⁡ x - 0.41 0.91 - 0.41 , 1.41 - x 1.41 - 0.91 , 0 μ 2 x = max ⁡ min ⁡ x - 0.58 1.08 - 0.58 , 1.58 - x 1.58 - 1.08 , 0 μ ¯ x = max ⁡ μ 1 x , μ 2 x   ∀ x ∉ ( 0.91,1.08 ) μ ¯ x = 1   ∀ x ∈ ( 0.91,1.08 ) μ _ x = min ⁡ μ 1 x , μ 2 xTable2 shows the equations for constructing the MFS of the input and output variables of the interval type 2 fuzzy system.


### 5.3. Knowledge Representation of the Generalized Type 2 Fuzzy System

The proposed generalized type 2 fuzzy system (GT2FHS) is composed using terms of generalized type 2 fuzzy sets, granulated into the three triangular MFS with Gaussian in the secondary membership in the input and the output, and these triangular MFS are represented by(8)μx,u=trigausstype2x,u,a1,b1,c1,a2,b2,c2,ρμx,u=exp⁡-12u-pxσu2whereμ1x=max⁡min⁡x-a1b1-a1,c1-xc1-b1,0andμ2x=max⁡min⁡x-a2b2-a2,c2-xc2-b2,0μ¯x=max⁡μ1x,μ2x∀x∉b1,b21∀x∈b1,b2μ_x=min⁡μ1x,μ2xpx=max⁡min⁡x-axbx-ax,cx-xcx-bx,0,whereax=a1+a22,bx=b1+b22,cx=c1+c22δ=μ¯x-μ_xσu=1+ρ23δ+εwhere a1, b1,andc1 parameters are for the upper MFS and a2, b2,andc2 are for the lower MFS, respectively, where ρ is fraction of uncertainty of the support for the secondary membership function. The following equations represent the knowledge of the input and output of the generalized type 2 fuzzy system.


#### 5.3.1. Input and Output Variables

To build a generalized type 2 fuzzy system, we used the same general structure of the type 1 fuzzy system and the same linguistic variables mentioned above; in this case, we have one input and one output. These MFS are listed in Table3.Table 3
Generalized type-2 membership functions for the input and output variables.
L o w μ 1 x = max ⁡ min ⁡ x + 0.5807 - 0.0806 + 0.5807 , 0.4193 - x 0.4193 + 0.0806 , 0 and μ2x=max⁡min⁡x+0.41410.0859+0.4141,0.5859-x0.5859-0.0859,0  μ¯x=max⁡μ1x,μ2x∀x∉(-0.0868,0.0859)1∀x∈(-0.0868,0.0859)  μ_x=min⁡μ1x,μ2x  px=max⁡min⁡x-axbx-ax,cx-xcx-bx,0, Where  ax=-0.5807-0.41412,bx=-0.0806-0.08592,cx=0.4193+0.58592  δ=μ¯x-μ_x  σu=1+ρ23δ+ε  Where ρ=0.5  M e d i u m μ 1 x = max ⁡ min ⁡ x + 0.0833 0.4167 + 0.0833 , 0.9167 - x 0.9167 - 0.4167 , 0 and μ2x=max⁡min⁡x-0.08330.5833-0.0833,1.083-x1.083-0.5833,0  μ¯x=max⁡μ1x,μ2x∀x∉(0.4167,0.5833)1∀x∈(0.4167,0.5833)  μ_x=min⁡μ1x,μ2x    px=max⁡min⁡x-axbx-ax,cx-xcx-bx,0, where  ax=-0.0833+0.083322,bx=0.4167+0.58332,cx=0.9167+1.0832  δ=μ¯x-μ_x  σu=1+ρ23δ+ε  Where ρ=0.5  H i g h μ 1 x = max ⁡ min ⁡ x - 0.422 0.922 - 0.422 , 1.422 - x 1.422 - 0.922 , 0 and μ2x=max⁡min⁡x-0.58861.088-0.5886,1.588-x1.588-1.088,0  μ¯x=max⁡μ1x,μ2x∀x∉(0.922,1.088)1∀x∈(0.922,1.088)  μ_x=min⁡μ1x,μ2x  px=max⁡min⁡x-axbx-ax,cx-xcx-bx,0, where  ax=0.422+0.58862,bx=0.922+1.0882,cx=1.422+1.5882  δ=μ¯x-μ_x  σu=1+ρ23δ+ε  Where ρ=0.5Table3 shows the equations for constructing the MFS of the input and output of the generalized type 2 fuzzy system.


### 5.4. Design of the Fuzzy Harmony Search Systems (FHS, IT2FHS, and GT2FHS)

In Sections5.1, 5.2, and 5.3 the knowledge of the membership functions to be used in the FHS, IT2FHS, and GT2FHS fuzzy systems were presented. In this section the graphical representation of the fuzzy systems is determined by Figures 3, 4, and 5, respectively, where we used one input, which is the iteration, and one output, which is theHMRparameter and is of Mamdani type.Figure 3
Plot of the type 1 proposed method (FHS).Figure 4
Plot of the interval type 2 proposed method (IT2FHS).Figure 5
Plot of the generalized type 2 proposed method (GT2FHS).It is decided to make the HMR dynamic parameter using (9), as the iterations progress:(9)HMR=∑i=1rhmrμihmrhmr1i∑i=1rhmrμihmrwhere the memory accepting rate is HMR; the number of rules of the fuzzy system is rhmr, corresponding tohmr; hmr1i is the output result for rulei corresponding tohmr; μihmr is the membership function of rulei corresponding tohmr.The fuzzy system is of Mamdani type and contains three fuzzy rules. The rules are summarized in Table4.Table 4
Rules for the fuzzy systems (FHS, IT2FHS, and GT2FHS).
Iteration HMR Low Medium High Low Low - - Medium - Medium - High - - HighTable4 represents the idea of increasing the output of the rules as iterations are progressing. To represent this idea the following equation was used:(10)Iteration=CurrentIterationMaximunofiterationswhere the current iteration is divided by the maximum of iterations, obtaining a percentage as the number of iterations progress.


## 5.1. Performance Representation of the Type 1 Fuzzy System

The proposed type 1 fuzzy system (FHS) is composed using terms of type 1 fuzzy sets, granulated into the three triangular membership functions in the input and the output, and these triangular membership functions are represented by(6)fx;h,i,j=0,x≤hx-hi-h,h≤x≤ij-xj-i,i≤x≤j0,j≤xwhere h and j parameters locate the “Corner” of the triangle and the parameter i locates the center. The following equations represent the knowledge of the input and output of the fuzzy system.


### 5.1.1. Input and Output Variables

To build a type 1 fuzzy system, the input and output linguistic variables are determined; in this case, there is one input and one output. The input variable is theIteration; this variable has the following membership functions (MFS): Low, Medium, and High. The fuzzy system has a single output called HMR, which refers to the harmony memory accepting parameter, and this variable has the following MFS: Low, Medium, and High. These MFS are listed in Table 1.Table 1
Type-1 membership functions for the input and output variables.
L o w μ L o w x = 0 , x ≤ - 0.5 x + 0.5 0 + 0.5 , - 0.5 ≤ x ≤ 0 0.5 - x 0.5 - 0 , 0 ≤ x ≤ 0.5 0 , 0.5 ≤ x  M e d i u m μ M e d i u m x = 0 , x ≤ 0 x - 0 0.5 - 0 , 0 ≤ x ≤ 0.5 1 - x 1 - 0.5 , 0.5 ≤ x ≤ 1 0 , 1 ≤ x  H i g h μ H i g h x = 0 , x ≤ 0.5 x - 0.5 1 - 0.5 , 0.5 ≤ x ≤ 1 1.5 - x 1.5 - 1 , 1 ≤ x ≤ 1.5 0 , 1.5 ≤ xTable1 shows the equations for constructing the MFS of the input and output variables of the type 1 fuzzy system.


## 5.1.1. Input and Output Variables

To build a type 1 fuzzy system, the input and output linguistic variables are determined; in this case, there is one input and one output. The input variable is theIteration; this variable has the following membership functions (MFS): Low, Medium, and High. The fuzzy system has a single output called HMR, which refers to the harmony memory accepting parameter, and this variable has the following MFS: Low, Medium, and High. These MFS are listed in Table 1.Table 1
Type-1 membership functions for the input and output variables.
L o w μ L o w x = 0 , x ≤ - 0.5 x + 0.5 0 + 0.5 , - 0.5 ≤ x ≤ 0 0.5 - x 0.5 - 0 , 0 ≤ x ≤ 0.5 0 , 0.5 ≤ x  M e d i u m μ M e d i u m x = 0 , x ≤ 0 x - 0 0.5 - 0 , 0 ≤ x ≤ 0.5 1 - x 1 - 0.5 , 0.5 ≤ x ≤ 1 0 , 1 ≤ x  H i g h μ H i g h x = 0 , x ≤ 0.5 x - 0.5 1 - 0.5 , 0.5 ≤ x ≤ 1 1.5 - x 1.5 - 1 , 1 ≤ x ≤ 1.5 0 , 1.5 ≤ xTable1 shows the equations for constructing the MFS of the input and output variables of the type 1 fuzzy system.


## 5.2. Knowledge Representation of the Interval Type 2 Fuzzy System

The proposed interval type 2 fuzzy system (IT2FHS) is composed using terms of interval type 2 fuzzy sets, granulated into the three triangular MFS with uncertaina in the input and the output, and these triangular MFS are represented by (7)μ~x=μ_x,μ¯x=itritype2x,a1,b1,c1,a2,b2,c2wherea1<a2,b1<b2,c1<c2μ1x=max⁡min⁡x-a1b1-a1,c1-xc1-b1,0μ2x=max⁡min⁡x-a2b2-a2,c2-xc2-b2,0μ¯x=max⁡μ1x,μ2x∀x∉b1,b2μ¯x=1∀x∈b1,b2μ_x=min⁡μ1x,μ2xwhere a1, b1,andc2 parameters are for the upper MFS and a2, b2,andc1 are for the lower MFS. The following equations represent the knowledge of the input and output variables of the interval type 2 fuzzy system.


### 5.2.1. Input and Output Variables

To build an interval type 2 fuzzy system, we used the same general structure of the type 1 fuzzy system and the same linguistic variables mentioned above; in this case, we have one input and one output. These MFS are listed in Table2.Table 2
Interval type-2 membership functions for the input and output variables.
L o w μ 1 x = m a x min ⁡ x - 0.58 - 0.08 - 0.58 , 0.41 - x 0.41 + 0.08 , 0 μ 2 x = m a x min ⁡ x + 0.41 0.08 + 0.41 , 0.58 - x 0.58 - 0.08 , 0 μ ¯ x = max ⁡ μ 1 x , μ 2 x   ∀ x ∉ ( - 0.08,0.08 ) μ ¯ x = 1   ∀  x ∈ ( - 0.08,0.08 ) μ _ x = min ⁡ μ 1 x , μ 2 x  M e d i u m μ 1 x = max ⁡ min ⁡ x + 0.83 0.41 + 0.83 , 0.91 - x 0.91 - 0.41 , 0 μ 2 x = max ⁡ min ⁡ x - 0.08 0.58 - 0.08 , 1.08 - x 1.08 - 0.58 , 0 μ ¯ x = max ⁡ μ 1 x , μ 2 x   ∀ x ∉ ( 0.41,0.58 ) μ ¯ x = 1   ∀ x ∈ ( 0.41,0.58 ) μ _ x = min ⁡ μ 1 x , μ 2 x  H i g h μ 1 x = max ⁡ min ⁡ x - 0.41 0.91 - 0.41 , 1.41 - x 1.41 - 0.91 , 0 μ 2 x = max ⁡ min ⁡ x - 0.58 1.08 - 0.58 , 1.58 - x 1.58 - 1.08 , 0 μ ¯ x = max ⁡ μ 1 x , μ 2 x   ∀ x ∉ ( 0.91,1.08 ) μ ¯ x = 1   ∀ x ∈ ( 0.91,1.08 ) μ _ x = min ⁡ μ 1 x , μ 2 xTable2 shows the equations for constructing the MFS of the input and output variables of the interval type 2 fuzzy system.


## 5.2.1. Input and Output Variables

To build an interval type 2 fuzzy system, we used the same general structure of the type 1 fuzzy system and the same linguistic variables mentioned above; in this case, we have one input and one output. These MFS are listed in Table2.Table 2
Interval type-2 membership functions for the input and output variables.
L o w μ 1 x = m a x min ⁡ x - 0.58 - 0.08 - 0.58 , 0.41 - x 0.41 + 0.08 , 0 μ 2 x = m a x min ⁡ x + 0.41 0.08 + 0.41 , 0.58 - x 0.58 - 0.08 , 0 μ ¯ x = max ⁡ μ 1 x , μ 2 x   ∀ x ∉ ( - 0.08,0.08 ) μ ¯ x = 1   ∀  x ∈ ( - 0.08,0.08 ) μ _ x = min ⁡ μ 1 x , μ 2 x  M e d i u m μ 1 x = max ⁡ min ⁡ x + 0.83 0.41 + 0.83 , 0.91 - x 0.91 - 0.41 , 0 μ 2 x = max ⁡ min ⁡ x - 0.08 0.58 - 0.08 , 1.08 - x 1.08 - 0.58 , 0 μ ¯ x = max ⁡ μ 1 x , μ 2 x   ∀ x ∉ ( 0.41,0.58 ) μ ¯ x = 1   ∀ x ∈ ( 0.41,0.58 ) μ _ x = min ⁡ μ 1 x , μ 2 x  H i g h μ 1 x = max ⁡ min ⁡ x - 0.41 0.91 - 0.41 , 1.41 - x 1.41 - 0.91 , 0 μ 2 x = max ⁡ min ⁡ x - 0.58 1.08 - 0.58 , 1.58 - x 1.58 - 1.08 , 0 μ ¯ x = max ⁡ μ 1 x , μ 2 x   ∀ x ∉ ( 0.91,1.08 ) μ ¯ x = 1   ∀ x ∈ ( 0.91,1.08 ) μ _ x = min ⁡ μ 1 x , μ 2 xTable2 shows the equations for constructing the MFS of the input and output variables of the interval type 2 fuzzy system.


## 5.3. Knowledge Representation of the Generalized Type 2 Fuzzy System

The proposed generalized type 2 fuzzy system (GT2FHS) is composed using terms of generalized type 2 fuzzy sets, granulated into the three triangular MFS with Gaussian in the secondary membership in the input and the output, and these triangular MFS are represented by(8)μx,u=trigausstype2x,u,a1,b1,c1,a2,b2,c2,ρμx,u=exp⁡-12u-pxσu2whereμ1x=max⁡min⁡x-a1b1-a1,c1-xc1-b1,0andμ2x=max⁡min⁡x-a2b2-a2,c2-xc2-b2,0μ¯x=max⁡μ1x,μ2x∀x∉b1,b21∀x∈b1,b2μ_x=min⁡μ1x,μ2xpx=max⁡min⁡x-axbx-ax,cx-xcx-bx,0,whereax=a1+a22,bx=b1+b22,cx=c1+c22δ=μ¯x-μ_xσu=1+ρ23δ+εwhere a1, b1,andc1 parameters are for the upper MFS and a2, b2,andc2 are for the lower MFS, respectively, where ρ is fraction of uncertainty of the support for the secondary membership function. The following equations represent the knowledge of the input and output of the generalized type 2 fuzzy system.


### 5.3.1. Input and Output Variables

To build a generalized type 2 fuzzy system, we used the same general structure of the type 1 fuzzy system and the same linguistic variables mentioned above; in this case, we have one input and one output. These MFS are listed in Table3.Table 3
Generalized type-2 membership functions for the input and output variables.
L o w μ 1 x = max ⁡ min ⁡ x + 0.5807 - 0.0806 + 0.5807 , 0.4193 - x 0.4193 + 0.0806 , 0 and μ2x=max⁡min⁡x+0.41410.0859+0.4141,0.5859-x0.5859-0.0859,0  μ¯x=max⁡μ1x,μ2x∀x∉(-0.0868,0.0859)1∀x∈(-0.0868,0.0859)  μ_x=min⁡μ1x,μ2x  px=max⁡min⁡x-axbx-ax,cx-xcx-bx,0, Where  ax=-0.5807-0.41412,bx=-0.0806-0.08592,cx=0.4193+0.58592  δ=μ¯x-μ_x  σu=1+ρ23δ+ε  Where ρ=0.5  M e d i u m μ 1 x = max ⁡ min ⁡ x + 0.0833 0.4167 + 0.0833 , 0.9167 - x 0.9167 - 0.4167 , 0 and μ2x=max⁡min⁡x-0.08330.5833-0.0833,1.083-x1.083-0.5833,0  μ¯x=max⁡μ1x,μ2x∀x∉(0.4167,0.5833)1∀x∈(0.4167,0.5833)  μ_x=min⁡μ1x,μ2x    px=max⁡min⁡x-axbx-ax,cx-xcx-bx,0, where  ax=-0.0833+0.083322,bx=0.4167+0.58332,cx=0.9167+1.0832  δ=μ¯x-μ_x  σu=1+ρ23δ+ε  Where ρ=0.5  H i g h μ 1 x = max ⁡ min ⁡ x - 0.422 0.922 - 0.422 , 1.422 - x 1.422 - 0.922 , 0 and μ2x=max⁡min⁡x-0.58861.088-0.5886,1.588-x1.588-1.088,0  μ¯x=max⁡μ1x,μ2x∀x∉(0.922,1.088)1∀x∈(0.922,1.088)  μ_x=min⁡μ1x,μ2x  px=max⁡min⁡x-axbx-ax,cx-xcx-bx,0, where  ax=0.422+0.58862,bx=0.922+1.0882,cx=1.422+1.5882  δ=μ¯x-μ_x  σu=1+ρ23δ+ε  Where ρ=0.5Table3 shows the equations for constructing the MFS of the input and output of the generalized type 2 fuzzy system.


## 5.3.1. Input and Output Variables

To build a generalized type 2 fuzzy system, we used the same general structure of the type 1 fuzzy system and the same linguistic variables mentioned above; in this case, we have one input and one output. These MFS are listed in Table3.Table 3
Generalized type-2 membership functions for the input and output variables.
L o w μ 1 x = max ⁡ min ⁡ x + 0.5807 - 0.0806 + 0.5807 , 0.4193 - x 0.4193 + 0.0806 , 0 and μ2x=max⁡min⁡x+0.41410.0859+0.4141,0.5859-x0.5859-0.0859,0  μ¯x=max⁡μ1x,μ2x∀x∉(-0.0868,0.0859)1∀x∈(-0.0868,0.0859)  μ_x=min⁡μ1x,μ2x  px=max⁡min⁡x-axbx-ax,cx-xcx-bx,0, Where  ax=-0.5807-0.41412,bx=-0.0806-0.08592,cx=0.4193+0.58592  δ=μ¯x-μ_x  σu=1+ρ23δ+ε  Where ρ=0.5  M e d i u m μ 1 x = max ⁡ min ⁡ x + 0.0833 0.4167 + 0.0833 , 0.9167 - x 0.9167 - 0.4167 , 0 and μ2x=max⁡min⁡x-0.08330.5833-0.0833,1.083-x1.083-0.5833,0  μ¯x=max⁡μ1x,μ2x∀x∉(0.4167,0.5833)1∀x∈(0.4167,0.5833)  μ_x=min⁡μ1x,μ2x    px=max⁡min⁡x-axbx-ax,cx-xcx-bx,0, where  ax=-0.0833+0.083322,bx=0.4167+0.58332,cx=0.9167+1.0832  δ=μ¯x-μ_x  σu=1+ρ23δ+ε  Where ρ=0.5  H i g h μ 1 x = max ⁡ min ⁡ x - 0.422 0.922 - 0.422 , 1.422 - x 1.422 - 0.922 , 0 and μ2x=max⁡min⁡x-0.58861.088-0.5886,1.588-x1.588-1.088,0  μ¯x=max⁡μ1x,μ2x∀x∉(0.922,1.088)1∀x∈(0.922,1.088)  μ_x=min⁡μ1x,μ2x  px=max⁡min⁡x-axbx-ax,cx-xcx-bx,0, where  ax=0.422+0.58862,bx=0.922+1.0882,cx=1.422+1.5882  δ=μ¯x-μ_x  σu=1+ρ23δ+ε  Where ρ=0.5Table3 shows the equations for constructing the MFS of the input and output of the generalized type 2 fuzzy system.


## 5.4. Design of the Fuzzy Harmony Search Systems (FHS, IT2FHS, and GT2FHS)

In Sections5.1, 5.2, and 5.3 the knowledge of the membership functions to be used in the FHS, IT2FHS, and GT2FHS fuzzy systems were presented. In this section the graphical representation of the fuzzy systems is determined by Figures 3, 4, and 5, respectively, where we used one input, which is the iteration, and one output, which is theHMRparameter and is of Mamdani type.Figure 3
Plot of the type 1 proposed method (FHS).Figure 4
Plot of the interval type 2 proposed method (IT2FHS).Figure 5
Plot of the generalized type 2 proposed method (GT2FHS).It is decided to make the HMR dynamic parameter using (9), as the iterations progress:(9)HMR=∑i=1rhmrμihmrhmr1i∑i=1rhmrμihmrwhere the memory accepting rate is HMR; the number of rules of the fuzzy system is rhmr, corresponding tohmr; hmr1i is the output result for rulei corresponding tohmr; μihmr is the membership function of rulei corresponding tohmr.The fuzzy system is of Mamdani type and contains three fuzzy rules. The rules are summarized in Table4.Table 4
Rules for the fuzzy systems (FHS, IT2FHS, and GT2FHS).
Iteration HMR Low Medium High Low Low - - Medium - Medium - High - - HighTable4 represents the idea of increasing the output of the rules as iterations are progressing. To represent this idea the following equation was used:(10)Iteration=CurrentIterationMaximunofiterationswhere the current iteration is divided by the maximum of iterations, obtaining a percentage as the number of iterations progress.


## 6. Case of Study

This section explains in detail the operation of the ball and beam controller which has been used to test the effectiveness of the proposed method.


### 6.1. Ball and Beam Controller

The objective of this control model is to achieve the balance of the ball in the beam, where it is allowed to roll with one degree of freedom along the length of the beam. A lever arm is attached to the beam at one end and a servo gear at the other. As the servo gear turns by an angleθ, the lever changes the angle of the beam by α. When the angle is changed from the horizontal position, gravity causes the ball to roll along the beam. According to the Euler-Lagrange method, the mathematical model of motion for the ball and beam system is presented in (11) and the beam angle (α) can be expressed in terms of the angle of the gear (θ), presented in (12).(11)0=JR2+mr¨+mgsin⁡α-mr∝˙2(12)∝=dLθA controller is designed for this system so that the ball’s position can be manipulated. The representation of this is illustrated in Figure 6.Figure 6
Process of the ball and beam (BB) system.The variables and constants in this case are defined in Table5.Table 5
Variables of ball and beam system.
Symbol Definition Value m Mass of the ball 0.11 kg R Radius of the ball 0.015 m d Lever arm offset 0.03 m g Gravitational acceleration 9.8 m/s∧2 L Length of the beam 1.0 m J Ball’s moment of inertia 9.99 e-6 kg.m∧2 r Ball position coordinate Alpha Beam angle coordinate Theta Servo gear angleThis controller contain four inputs which arein1, in2, in3, and in4, respectively, and are granulated into two generalized bell membership functions. The outputs are linear functions composed of 16 linear equations. Figure 7 shows the structure of the fuzzy system for this controller and Figure 8 shows the plant of the ball and beam system. This controller is of Takagi Sugeno type and uses 16 fuzzy rules, which are presented with more detail in Box 1.Box 1:Fuzzy rules for the ball and beam controller.
1. If (in1 is in1mf1) and (in2 is in2mf1) and (in3 is in3mf1) and (in4 is in4mf1) then (out is outmf1) (1) 2. If (in1 is in1mf1) and (in2 is in2mf1) and (in3 is in3mf1) and (in4 is in4mf2) then (out is outmf2) (1) 3. If (in1 is in1mf1) and (in2 is in2mf1) and (in3 is in3mf2) and (in4 is in4mf1) then (out is outmf3) (1) 4. If (in1 is in1mf1) and (in2 is in2mf1) and (in3 is in3mf2) and (in4 is in4mf2) then (out is outmf4) (1) 5. If (in1 is in1mf1) and (in2 is in2mf2) and (in3 is in3mf1) and (in4 is in4mf1) then (out is outmf5) (1) 6. If (in1 is in1mf1) and (in2 is in2mf2) and (in3 is in3mf1) and (in4 is in4mf2) then (out is outmf6) (1) 7. If (in1 is in1mf1) and (in2 is in2mf2) and (in3 is in3mf2) and (in4 is in4mf1) then (out is outmf7) (1) 8. If (in1 is in1mf1) and (in2 is in2mf2) and (in3 is in3mf2) and (in4 is in4mf2) then (out is outmf8) (1) 9. If (in1 is in1mf2) and (in2 is in2mf1) and (in3 is in3mf1) and (in4 is in4mf1) then (out is outmf9) (1) 10. If (in1 is in1mf2) and (in2 is in2mf1) and (in3 is in3mf1) and (in4 is in4mf2) then (out is outmf10) (1) 11. If (in1 is in1mf2) and (in2 is in2mf1) and (in3 is in3mf2) and (in4 is in4mf1) then (out is outmf11) (1) 12. If (in1 is in1mf2) and (in2 is in2mf1) and (in3 is in3mf2) and (in4 is in4mf2) then (out is outmf12) (1) 13. If (in1 is in1mf2) and (in2 is in2mf2) and (in3 is in3mf1) and (in4 is in4mf1) then (out is outmf13) (1) 14. If (in1 is in1mf2) and (in2 is in2mf2) and (in3 is in3mf1) and (in4 is in4mf2) then (out is outmf14) (1) 15. If (in1 is in1mf2) and (in2 is in2mf2) and (in3 is in3mf2) and (in4 is in4mf1) then (out is outmf15) (1) 16. If (in1 is in1mf2) and (in2 is in2mf2) and (in3 is in3mf2) and (in4 is in4mf2) then (out is outmf16) (1)Figure 7
Plot of the ball and beam fuzzy system controller.Figure 8
Plant of the ball and beam system.


## 6.1. Ball and Beam Controller

The objective of this control model is to achieve the balance of the ball in the beam, where it is allowed to roll with one degree of freedom along the length of the beam. A lever arm is attached to the beam at one end and a servo gear at the other. As the servo gear turns by an angleθ, the lever changes the angle of the beam by α. When the angle is changed from the horizontal position, gravity causes the ball to roll along the beam. According to the Euler-Lagrange method, the mathematical model of motion for the ball and beam system is presented in (11) and the beam angle (α) can be expressed in terms of the angle of the gear (θ), presented in (12).(11)0=JR2+mr¨+mgsin⁡α-mr∝˙2(12)∝=dLθA controller is designed for this system so that the ball’s position can be manipulated. The representation of this is illustrated in Figure 6.Figure 6
Process of the ball and beam (BB) system.The variables and constants in this case are defined in Table5.Table 5
Variables of ball and beam system.
Symbol Definition Value m Mass of the ball 0.11 kg R Radius of the ball 0.015 m d Lever arm offset 0.03 m g Gravitational acceleration 9.8 m/s∧2 L Length of the beam 1.0 m J Ball’s moment of inertia 9.99 e-6 kg.m∧2 r Ball position coordinate Alpha Beam angle coordinate Theta Servo gear angleThis controller contain four inputs which arein1, in2, in3, and in4, respectively, and are granulated into two generalized bell membership functions. The outputs are linear functions composed of 16 linear equations. Figure 7 shows the structure of the fuzzy system for this controller and Figure 8 shows the plant of the ball and beam system. This controller is of Takagi Sugeno type and uses 16 fuzzy rules, which are presented with more detail in Box 1.Box 1:Fuzzy rules for the ball and beam controller.
1. If (in1 is in1mf1) and (in2 is in2mf1) and (in3 is in3mf1) and (in4 is in4mf1) then (out is outmf1) (1) 2. If (in1 is in1mf1) and (in2 is in2mf1) and (in3 is in3mf1) and (in4 is in4mf2) then (out is outmf2) (1) 3. If (in1 is in1mf1) and (in2 is in2mf1) and (in3 is in3mf2) and (in4 is in4mf1) then (out is outmf3) (1) 4. If (in1 is in1mf1) and (in2 is in2mf1) and (in3 is in3mf2) and (in4 is in4mf2) then (out is outmf4) (1) 5. If (in1 is in1mf1) and (in2 is in2mf2) and (in3 is in3mf1) and (in4 is in4mf1) then (out is outmf5) (1) 6. If (in1 is in1mf1) and (in2 is in2mf2) and (in3 is in3mf1) and (in4 is in4mf2) then (out is outmf6) (1) 7. If (in1 is in1mf1) and (in2 is in2mf2) and (in3 is in3mf2) and (in4 is in4mf1) then (out is outmf7) (1) 8. If (in1 is in1mf1) and (in2 is in2mf2) and (in3 is in3mf2) and (in4 is in4mf2) then (out is outmf8) (1) 9. If (in1 is in1mf2) and (in2 is in2mf1) and (in3 is in3mf1) and (in4 is in4mf1) then (out is outmf9) (1) 10. If (in1 is in1mf2) and (in2 is in2mf1) and (in3 is in3mf1) and (in4 is in4mf2) then (out is outmf10) (1) 11. If (in1 is in1mf2) and (in2 is in2mf1) and (in3 is in3mf2) and (in4 is in4mf1) then (out is outmf11) (1) 12. If (in1 is in1mf2) and (in2 is in2mf1) and (in3 is in3mf2) and (in4 is in4mf2) then (out is outmf12) (1) 13. If (in1 is in1mf2) and (in2 is in2mf2) and (in3 is in3mf1) and (in4 is in4mf1) then (out is outmf13) (1) 14. If (in1 is in1mf2) and (in2 is in2mf2) and (in3 is in3mf1) and (in4 is in4mf2) then (out is outmf14) (1) 15. If (in1 is in1mf2) and (in2 is in2mf2) and (in3 is in3mf2) and (in4 is in4mf1) then (out is outmf15) (1) 16. If (in1 is in1mf2) and (in2 is in2mf2) and (in3 is in3mf2) and (in4 is in4mf2) then (out is outmf16) (1)Figure 7
Plot of the ball and beam fuzzy system controller.Figure 8
Plant of the ball and beam system.


## 7. Experiments and Results

The results obtained by optimizing the input membership functions using the proposed method with FHS, IT2FHS, and GT2FHS fuzzy systems are presented. This methodology was applied to the ball and beam controller, where the goal is to maintain the balance of the ball in the beam. 30 experiments with the HS method have been performed and also experiments with perturbation and without perturbation in the controller were carried out with the FHS, IT2FHS, and GT2FHS fuzzy harmony search algorithms. The noise applied for this controller is with a Gaussian distribution with a level of 0.05. The perturbation was obtained with (13). In this case it is decided to use this type of noise since in the previous work [13] we obtained favorable results by applying this same level of perturbation to the water tank, temperature, and the mobile robot controller.(13)yi=yi+0.05∗randnTable 6 summarizes the values obtained for each criterion considering 1000 units of time. For calculating ITAE a sampling time of Ts = 0.1 s was considered. Figure 9 illustrates the perturbation applied to the controller. The root mean square error (RMSE) is the objective function of the controller, although there are other control metrics that were also used which are the following: ISE (Integral of Squared error), IAE (Integral of the Absolute value of the Error), ITSE (Integral of Time-weighted Squared Error), ITAE (Integral of the Time multiplied by the Absolute value of the Error), and SNR (Signal to noise ratio), respectively, presented in(14)RMSE=1N∑t=1Nxt-x^t2(15)ISE=∑t=1Nxt-x^t2(16)IAE=∑t=1Nxt-x^t(17)ITSE=∑t=1Ntxt-x^t2(18)ITAE=∑t=1Ntxt-x^t(19)SNRdB=10log10⁡PsignalPnoiseTo optimize the input membership functions, (20) was used where the b parameter is usually positive, the a parameter is the width of the function, and the c parameter locates the center of the curve.(20)fx;a,b,c=11+x-c/a2bThe harmony representation that was generated to carry out the optimization of the input membership functions of the ball controller is illustrated by Figure 10.Table 6
Simulation results without perturbation in the controller.
Performance Index Methods HS original FHS IT2FHS GT2FHS RMSE 1.53E+00 1.57E+00 1.56E+00 1.52E+00 ITAE 8.87E+05 1.01E+06 1.01E+06 8.39E+05 ITSE 2.02E+06 2.62E+06 2.62E+06 1.67E+06 IAE 1.78E+03 2.02E+03 2.02E+03 1.68E+03 ISE 4.06E+03 5.25E+03 5.25E+03 3.34E+03Figure 9
Noise applied to the controller.Figure 10
Harmony for the optimization of the MFS.Figure10 indicates the structure of the harmony with which the points of the membership functions are optimized for each input; in this case there are four inputs with twogbellmembership functions. The output of the ball and beam controller contains 16 linear functions that are described in Box 2, and these outputs are not optimized.Box 2:Sugeno coefficients in the outputs.
o u t m f 1 : 0.6116 in1mf1+1.474in2mf1-9.67in3mf1-4.046in4mf1+0.0262 o u t m f 2 : 0.851 in1mf1+1.969in2mf1-7.396in3mf1-6.165in4mf2+0.474 o u t m f 3 : 0.8899 in1mf1+2.234in2mf1-9.99in3mf2-1.865in4mf1+1.426 o u t m f 4 : 0.7339 in1mf1+1.969in2mf1-7.381in3mf2-4.688in4mf2-0.8804 o u t m f 5 : 0.7343 in1mf1+2.234in2mf2-12.85in3mf1-6.11in4mf1-1.034 o u t m f 6 : 1.413 in1mf1+1.969in2mf2-9.485in3mf1-6.592in4mf2+1.159 o u t m f 7 : 1.225 in1mf1+2.234in2mf2-12.8in3mf2-3.929in4mf1+0.3662 o u t m f 8 : 0.9853 in1mf1+1.969in2mf2-9.291in3mf2-5.115in4mf2-0.195 o u t m f 9 : 0.9853 in1mf2+1.969in2mf1-9.292in3mf1-5.115in4mf1+0.195 o u t m f 10 : 1.225 in1mf2+2.234in2mf1-12.8in3mf1-3.929in4mf2-0.3662 o u t m f 11 : 1.413 in1mf2+1.969in2mf1-9.485in3mf2-6.592in4mf1-1.159 o u t m f 12 : 0.7343 in1mf2+2.234in2mf1-12.85in3mf2-6.11in4mf2+1.034 o u t m f 13 : 0.7343 in1mf2+1.969in2mf2-9.381in3mf1-4.688in4mf1+0.8804 o u t m f 14 : 1.506 in1mf2+2.234in2mf2-12.99in3mf1-1.865in4mf2-1.426 o u t m f 15 : 1.161 in1mf2+1.969in2mf2-9.396in3mf2-6.165in4mf1-0.474 o u t m f 16 : 1.015 in1mf2+2.234in2mf2-12.67in3mf2-4.046in4mf2-0.0262The parameters used are as follows: 100 iterations,PArate 0.75,HMR 0.95 (only for the HS, in the FHS, IT2FHS, and GT2FHS methods, this parameter changes dynamically with fuzzy system), and HM 30. Table 6 shows the simulation results obtained using the ball and beam controller without perturbation in the controller and Table 7 shows the simulation results obtained using the ball and beam controller under perturbations. Tables 6 and 7 show an average of 30 experiments for each method.Table 7
Results with perturbation in the controller.
Performance Index Methods FHS IT2FHS GT2FHS RMSE 1.55E+00 1.52E+00 1.49E+00 ITAE 1.00E+06 1.01E+06 8.09E+05 ITSE 2.59E+06 2.63E+06 1.50E+06 IAE 2.01E+03 2.03E+03 1.62E+03 ISE 5.18E+03 5.26E+03 3.01E+03Table6 summarizes the results obtained for each method without perturbation: Fuzzy HS with Type 1 (FHS), Fuzzy HS with interval type 2 (IT2FHS), and Fuzzy HS with generalized type 2 (GT2FHS). The averages of the results obtained with each of the methods are illustrated in Figure 11.Figure 11
Representation of results for each method without perturbations.Table7 shows the results obtained with 30 carried experiments for each method with perturbation: Fuzzy HS with Type 1 (FHS), Fuzzy HS with interval type 2 (IT2FHS), and Fuzzy HS with generalized type 2 (GT2FHS). The results of each error in each method are an average of the 30 experiments carried out. The SNR used for the three methods are 7.3531 dB for Type 1, 8.1232 dB for Interval Type 2, and 8.1232 dB for Generalized Type 2 for the ball and beam controller.The averages of the results obtained with each of the methods are illustrated in Figure12.Figure 12
Representation of results for each method with perturbations.Figure13 illustrates the behavior of equilibrium for each method without noise in the controller and Figure 14 the behavior of equilibrium for each method with noise in the controller, (a) FHS, (b) IT2FHS, and (c) GT2FHS. The blue line represents the set point and the pink line represent the ball position.Figure 13
Behavior of equilibrium for each method without perturbation.
(a) (b) (c)Figure 14
Behavior of equilibrium for each method with perturbation.
(a) (b) (c)It can be observed that when applying noise to the controller the generalized type 2 FHS method was achieved to obtain a better balance.The best result is achieved by applying perturbation to the ball and beam controller using the generalized type 2 FHS. In this experiment, the best RMSE of 1.5827 is obtained; the distribution of membership functions is shown in Figure15.Figure 15
Best Distribution membership function found by GT2FHS.


## 8. Statistical Comparison

To validate the effectiveness of the proposed method, a statistical test was applied; in this case the Z-test was used. The claim, parameters, and data for the hypothesis testing are as follows:(21)μ1=Proposedmethodwithperturbationμ2=OthermethodwithoutperturbationSample 1(μ1) would be the GT2FHS, IT2FHS, and FHS methods with perturbation and sample 2 (μ2) would be the GT2FHS, IT2FHS, and FHS methods without perturbation. The mean of the proposed method with perturbation is less than the mean of the other method without perturbation (Claim). The hypotheses would be as follows:(22)Ho:μ1≥μ2Ha:μ1<μ2ClaimAlphaα=0.05Level  of  confidence=95%Sample  Sizen=30CriticalValueZo=-1.645The Z-value is obtained by the following equation(23)Z=X-1-X-2-μ1-μ2σ1-σ2Once the Z-value and P value have been calculated, we can say that there is enough evidence for all values below the critical value Z or -1.645; we can reject the null hypothesis and we can state that the mean of the proposed method with perturbation is lower than the mean of the other method without perturbation with a 95% of confidence and this Z-value is shown in Table8.Table 8
Results for the statistical test.
FHS with perturbation FHS without perturbation Z-Value P Value Mean STD Mean STD 1.55E+00 1.31E-02 1.57E+00 1.33E-02 -22.09 0  IT2FHS with perturbation IT2FHS without perturbation Z-Value P Value Mean STD Mean STD  1.52E+00 3.21E-02 1.56E+00 1.46E-02 -4.9 5e-07  GT2FHS with perturbation GT2FHS without perturbation Z-Value P Value Mean STD Mean STD  1.49E+00 8.22E-03 1.53E+00 1.99E-02 -10.12 0Table8 shows the results of the mean, standard deviation, and the Z-value and P value obtained; in the 3 cases significant evidence is obtained when comparing the proposed method with perturbation against the method without perturbation. With this we can verify that when using uncertainty, a better stability is achieved in the ball and beam controller.


## 9. Conclusions

In this work the dynamic parameter adaptation with type 1, interval type 2, and generalized type 2 fuzzy system for the harmony search algorithm is presented. Parameter adaptation is responsible for optimizing the values of input membership functions of the ball and beam controller, where the objective is to maintain the balance of the ball in the beam. This methodology was applied with the original HS algorithm and with the proposed FHS algorithm with noise and without noise for the controller. A perturbation of 0.05 was used to check the stability of the method, since theoretically if more uncertainty is handled in a problem it must have more stability. The results obtained from the 30 experiments for each method show that when perturbation is applied stability is achieved; we can observe that using generalized type 2 fuzzy system with perturbation or without perturbation for the controller. The optimization of this problem is able to obtain better results than with the other methods presented in this paper. It can be verified that when using perturbation for the controller results are improved.



---

*Source: 3092872-2018-08-14.xml*