Optimization of Intelligent Controllers Using a Type-1 and Interval Type-2 Fuzzy Harmony Search Algorithm

This article focuses on the dynamic parameter adaptation in the harmony search algorithm using Type-1 and interval Type-2 fuzzy logic. In particular, this work focuses on the adaptation of the parameters of the original harmony search algorithm. At present there are several types of algorithms that can solve complex real-world problems with uncertainty management. In this case the proposed method is in charge of optimizing the membership functions of three benchmark control problems (water tank, shower, and mobile robot). The main goal is to find the best parameters for the membership functions in the controller to follow a desired trajectory. Noise experiments are performed to test the efficacy of the method.


Introduction
At present there are different techniques to solve optimization problems [1][2][3][4].This article focuses on the optimization of parameters to achieve the tracking of a trajectory applied to benchmark control problems.The proposed method is based on the original harmony search algorithm, which mimics the process of music improvisation, which has been widely used to solve different problems, as shown in [5][6][7][8][9].The proposed method is called fuzzy harmony search algorithm (FHS) that performs an adaptation of parameters with Type-1 and interval Type-2 fuzzy logic and it is used to optimize fuzzy tracking controllers so that they follow desired trajectories for benchmark control problems.Other metaheuristics that have been used to solve optimization problems based on fuzzy logic are [10][11][12][13][14][15].In previous works this HS algorithm has been used for different optimization problems, as can be found in [16][17][18][19].
The operation of non-linear plants with traditional logic or Type-1 fuzzy logic can be complex for a person who does not have exact knowledge of each of the characteristics that compose it, and using fuzzy set concepts and the principles of fuzzy logic can model the functioning of a plant in a more natural way with the use of linguistic variables as they could have valves like little, much, etc. so that anyone could understand the operation of such plants.In 1965 Zadeh proposed the concepts of a fuzzy set in [20], fuzzy logic in [21], and the concept of a membership functions in [22].Based on these concepts, complex problems can be solved by using fuzzy rules to represent an expert knowledge of a problem in a more natural way using linguistic variables.
Zadeh also proposed interval Type-2 fuzzy logic in [22], to achieve better management of the uncertainty of a problem, and this type of system is used to solve complex problems where there is uncertainty on the degree of membership of a value in a particular fuzzy set.Applying the concepts of Type-2 fuzzy logic, we can design a better fuzzy system since with the handling of uncertainty we can approximate the exact behavior of the real world; this is done using a footprint of uncertainty in the membership functions, which consider a range of membership degrees and not only one particular membership degree.
The main contribution of this paper is the optimization of the values of the membership function of the fuzzy system of the three benchmark control problems presented and the stability obtained in the trajectory tracking of each case.The proposed method uses the harmony search algorithm with dynamic parameter adaptation with Type-1 and interval Type-2 fuzzy logic.
This article is organized as follows: Section 2 gives a description of the original harmony search algorithm, Section 3 shows the fuzzy harmony search algorithm with dynamic parameter adaptation, Section 4 describes the benchmark control problems, Section 5 describes the simulation results, Section 6 shows the statistical comparison, and Section 7 presents conclusions.

Harmony Search Algorithm
The harmony search algorithm is a recently proposed metaheuristic search technique that mimics the process of music improvisation [23][24][25][26][27].There are different variants of this algorithm that have been created to improve it or solve specific problems [19,[28][29][30].This method is composed of the following steps: • Step 1: Initialize the problem and parameters Minimize f (x)s.t.x(j) ∈ [LB(j), UB(j), j = 1, 2, . . ., n], where f (x) is the objective function, x(j) is the decision variables, n is the number of design variables, and LB(j), UB(j) are the lower and upper of the design variables, respectively.

•
Step 2: Initialize the harmony memory (HM) The harmony memory (HM) is a matrix of harmony solution vectors, where its size depends on the harmony memory size (HMS).The HM is occupied by many randomly generated solution vectors and sorted by the objective function value, where X i = {x i (1), x i (2), . . . ,x i (n)} represents the ith harmony vector, which is randomly generated as follows: x i (j) = LB(j) + (UB(j) − LB(j)) × r for j = 1, 2, . . ., n and i = 1, 2, . . ., HMS, where r is a uniform random number [0, 1]. • Step 3: Improvise a new harmony This step is the most important because it influences the overall performance of the HS algorithm.A new harmony memory vector is improvised using three selected operators, which are the memory considerations (HMR), pitch adjustment (PAR), and randomization.The random numbers, r 1 and r 2 range between 0 and 1.In each improvisation or iteration, if r 1 is less than HMR the solution vector and x new (j) is generated from the memory consideration; otherwise, x new (j) is selected through randomization.Next, if r 2 is less than the PAR, the solution vector x new (j) from the memory consideration is further modified with the bandwidth distance using Equation (3): where r is a uniform random number ranging from 0 and 1.The function of BW is an arbitrary distance bandwidth.The value of BW is determined by the changes in quantity of the new solution vector and its presence is enhanced by the performance of HS.

• Step 4: Update harmony memory
To update the HM with a new solution vector, x new , an objective function will be used to evaluate it.A comparison is made to see if the new vector solution is better than the worst historical vector solution and the worst historical solution is excluded and replaced with a new one.

• Step 5: Check the stopping criteria
The process is repeated until the number of improvisations (NI) is satisfied; otherwise the process repeats steps 3 and 4. The HMR parameter represents the intensification or exploitation; the PAR and randomization parameters represent the diversification or exploration in the algorithm.

Fuzzy Harmony Search Algorithm with Dynamic Parameter Adaptation
The value of the HMR parameter is constant during the process of improvisation of the traditional HS algorithm; based on this it was decided to make it a fuzzy parameter for achieving dynamic parameter adaptation.The proposed method is based on the original harmony search algorithm described in Section 2, and specifically focuses on step 3, which is improvisation and uses fuzzy logic to perform the dynamic adjustment of the HMR parameter as the number of iterations or improvisations advance to achieve an improvement in the convergence of the algorithm and obtain better results.To represent this idea, this parameter is converted into a fuzzy parameter.In this method, this value is considered to be fuzzy as it is updated within the FHS progress, and is determined by Equation ( 4), where HMR has a changing value in the range 0-1: where HMR is the memory considerations; r hmr is the number of rules of the fuzzy system corresponding to hmr; hmr 1i is the output result for rule i corresponding to hmr; and µ hmr i is the membership function of rule i corresponding to hmr.To represent this idea in a concise way, the pseudocode of the proposed method is shown in Figure 1: Algorithms 2017, 10, 82 3 of 17

•
Step 4: Update harmony memory To update the HM with a new solution vector, , an objective function will be used to evaluate it.A comparison is made to see if the new vector solution is better than the worst historical vector solution and the worst historical solution is excluded and replaced with a new one.

•
Step 5: Check the stopping criteria The process is repeated until the number of improvisations (NI) is satisfied; otherwise the process repeats steps 3 and 4. The HMR parameter represents the intensification or exploitation; the PAR and randomization parameters represent the diversification or exploration in the algorithm.

Fuzzy Harmony Search Algorithm with Dynamic Parameter Adaptation
The value of the HMR parameter is constant during the process of improvisation of the traditional HS algorithm; based on this it was decided to make it a fuzzy parameter for achieving dynamic parameter adaptation.The proposed method is based on the original harmony search algorithm described in Section 2, and specifically focuses on step 3, which is improvisation and uses fuzzy logic to perform the dynamic adjustment of the HMR parameter as the number of iterations or improvisations advance to achieve an improvement in the convergence of the algorithm and obtain better results.To represent this idea, this parameter is converted into a fuzzy parameter.In this method, this value is considered to be fuzzy as it is updated within the FHS progress, and is determined by Equation (4), where HMR has a changing value in the range 0-1: where HMR is the memory considerations; is the number of rules of the fuzzy system corresponding to hmr; is the output result for rule i corresponding to hmr; and is the membership function of rule i corresponding to hmr.To represent this idea in a concise way, the pseudocode of the proposed method is shown in Figure 1:  The proposed Type-1 fuzzy system is illustrated in Figures 2 and 3, representing the input and output for this method.The interval Type-2 fuzzy system is illustrated by Figures 4 and 5, which show the input and output for this method.
Algorithms 2017, 10, 82 4 of 17 The proposed Type-1 fuzzy system is illustrated in Figures 2 and 3, representing the input and output for this method.The interval Type-2 fuzzy system is illustrated by Figures 4 and 5, which show the input and output for this method.The Type-1 and Type-2 FHS methods use an output that is HMR parameter and the input is the iterations as presented in Figures 3 and 5, respectively.The proposed Type-1 fuzzy system is illustrated in Figures 2 and 3, representing the input and output for this method.The interval Type-2 fuzzy system is illustrated by Figures 4 and 5, which show the input and output for this method.The Type-1 and Type-2 FHS methods use an output that is HMR parameter and the input is the iterations as presented in Figures 3 and 5, respectively.The proposed Type-1 fuzzy system is illustrated in Figures 2 and 3, representing the input and output for this method.The interval Type-2 fuzzy system is illustrated by Figures 4 and 5, which show the input and output for this method.The Type-1 and Type-2 FHS methods use an output that is HMR parameter and the input is the iterations as presented in Figures 3 and 5, respectively.The representation of the input and the output variables in the fuzzy systems are shown in Figures 3 and 5.The input is known as the "iteration", and is granulated into three triangular membership functions, which are low, medium, and high.The output called "HMR" uses values from 0 to 1, the output is granulated into three triangular membership functions, low, medium, and high, and the fuzzy systems are of Mamdani type and contain three rules.
The rules are designed based on the study of parameters of the algorithm, so that the initial iterations explore and the final iterations exploit the search space.In this case the rules have an increasing trend, as shown in Table 1.These rules are the same in the Type-1 and interval Type-2 fuzzy systems.  1 represents the idea of increasing the rules as iterations are progressing.To represent the linguistic variable of iterations, the following equation is used: This phase considers a percentage of elapsed iterations to find the values of HMR.It initializes with low values of HMR so that the algorithm has diversification and then achieves intensification.

Control Cases
This section gives a description of the three cases of benchmark control considered for achieving the control of the reference and with these three problems the operation of the proposed method is verified using dynamical parameter adaptation with Type-1 and interval Type-2 fuzzy logic.

Water Tank Controller
The main goal of the water tank controller is to maintain the level of water in a tank and the activation of the valve to keep the tank full, preventing the water from draining out of the tank.The diagram of the operation of this problem is shown in Figure 6.The Type-1 and Type-2 FHS methods use an output that is HMR parameter and the input is the iterations as presented in Figures 3 and 5, respectively.
The representation of the input and the output variables in the fuzzy systems are shown in Figures 3 and 5.The input is known as the "iteration", and is granulated into three triangular membership functions, which are low, medium, and high.The output called "HMR" uses values from 0 to 1, the output is granulated into three triangular membership functions, low, medium, and high, and the fuzzy systems are of Mamdani type and contain three rules.
The rules are designed based on the study of parameters of the algorithm, so that the initial iterations explore and the final iterations exploit the search space.In this case the rules have an increasing trend, as shown in Table 1.These rules are the same in the Type-1 and interval Type-2 fuzzy systems.

Low Medium High
Table 1 represents the idea of increasing the rules as iterations are progressing.To represent the linguistic variable of iterations, the following equation is used: This phase considers a percentage of elapsed iterations to find the values of HMR.It initializes with low values of HMR so that the algorithm has diversification and then achieves intensification.

Control Cases
This section gives a description of the three cases of benchmark control considered for achieving the control of the reference and with these three problems the operation of the proposed method is verified using dynamical parameter adaptation with Type-1 and interval Type-2 fuzzy logic.

Water Tank Controller
The main goal of the water tank controller is to maintain the level of water in a tank and the activation of the valve to keep the tank full, preventing the water from draining out of the tank.The diagram of the operation of this problem is shown in Figure 6.Water enters the tank from the top at a rate proportional to the voltage, V, applied to the pump.The water leaves through an opening in the tank base at a rate that is proportional to the square root of the water height, H, in the tank.This controller uses fuzzy logic to control the valve that determines how fast the water can enter the tank to maintain the desired level of water.The presence of the square root in the water flow rate results in a nonlinear plant.The mathematical model of the water tank can be represented as a differential equation and is given by Equation ( 6): Equation ( 6) describes the height of water H as a function of time, due to the difference between flow rates into and out of the tank.
Vol is the volume of water in the tank V is the voltage applied to the pump A is the cross-sectional area of the tank b is a constant related to the flow rate into the tank a is a constant related to the flow rate out of the tank This controller has two inputs and one output; the first input is the level, which has three Gaussian membership functions with linguistic variables called high, okay, and low.The second input is the rate, which has three Gaussian membership functions with linguistic variables of negative, none, and positive.The output is the valve, which has five triangular membership functions with linguistic variables of close fast, close low, no change, open slow, and open fast.This controller is of the Mamdani type and uses five rules, which are presented in detail in Table 2.The rules that are outlined in Table 2 are those that maintain control of the opening of the valve and with this have leveled the water tank.Figure 7 shows the structure of the fuzzy system for this controller.Water enters the tank from the top at a rate proportional to the voltage, V, applied to the pump.The water leaves through an opening in the tank base at a rate that is proportional to the square root of the water height, H, in the tank.This controller uses fuzzy logic to control the valve that determines how fast the water can enter the tank to maintain the desired level of water.The presence of the square root in the water flow rate results in a nonlinear plant.The mathematical model of the water tank can be represented as a differential equation and is given by Equation ( 6): Equation ( 6) describes the height of water H as a function of time, due to the difference between flow rates into and out of the tank.
Vol is the volume of water in the tank V is the voltage applied to the pump A is the cross-sectional area of the tank b is a constant related to the flow rate into the tank a is a constant related to the flow rate out of the tank This controller has two inputs and one output; the first input is the level, which has three Gaussian membership functions with linguistic variables called high, okay, and low.The second input is the rate, which has three Gaussian membership functions with linguistic variables of negative, none, and positive.The output is the valve, which has five triangular membership functions with linguistic variables of close fast, close low, no change, open slow, and open fast.This controller is of the Mamdani type and uses five rules, which are presented in detail in Table 2.The rules that are outlined in Table 2 are those that maintain control of the opening of the valve and with this have leveled the water tank.Figure 7 shows the structure of the fuzzy system for this controller.

Temperature Controller
The main goal of this controller is to regulate the temperature and water flow.This controller is composed of two inputs and two outputs, the first input is the temp, which has two trapezoidal and one triangular membership functions with linguistic variables of Cold, Good, and Hot.The second input is the flow, which has two trapezoidal and one triangular membership functions with linguistic variables of Soft, Good  This controller is of the Mamdani type and uses nine fuzzy rules, which are presented in a detailed fashion in Table 3.

Temperature Controller
The main goal of this controller is to regulate the temperature and water flow.This controller is composed of two inputs and two outputs, the first input is the temp, which has two trapezoidal and one triangular membership functions with linguistic variables of Cold, Good, and Hot

Temperature Controller
The main goal of this controller is to regulate the temperature and water flow.This controller is composed of two inputs and two outputs, the first input is the temp, which has two trapezoidal and one triangular membership functions with linguistic variables of Cold, Good, and Hot.The second input is the flow, which has two trapezoidal and one triangular membership functions with linguistic variables of Soft, Good  This controller is of the Mamdani type and uses nine fuzzy rules, which are presented in a detailed fashion in Table 3.This controller is of the Mamdani type and uses nine fuzzy rules, which are presented in a detailed fashion in Table 3. Table 3 presents in a detailed fashion each of the rules that compose the temperature controller to achieve the control objective of this controller, and Figure 9 shows the structure of the fuzzy system for this controller.Table 3 presents in a detailed fashion each of the rules that compose the temperature controller to achieve the control objective of this controller, and Figure 9 shows the structure of the fuzzy system for this controller.

Mobile Robot Controller
The main goal of this controller is to follow a reference trajectory, based on the model of a unicycle mobile robot [31], which is composed of two drive wheels located on the same axis and a front free wheel that is used only for stability.The graphical representation of this model can be found in Figure 10.The operation of the robot model is determined by Equations ( 7) and ( 8

Mobile Robot Controller
The main goal of this controller is to follow a reference trajectory, based on the model of a unicycle mobile robot [31], which is composed of two drive wheels located on the same axis and a front free wheel that is used only for stability.The graphical representation of this model can be found in Figure 10.Table 3 presents in a detailed fashion each of the rules that compose the temperature controller to achieve the control objective of this controller, and Figure 9 shows the structure of the fuzzy system for this controller.

Mobile Robot Controller
The main goal of this controller is to follow a reference trajectory, based on the model of a unicycle mobile robot [31], which is composed of two drive wheels located on the same axis and a front free wheel that is used only for stability.The graphical representation of this model can be found in Figure 10.The operation of the robot model is determined by Equations ( 7) and ( 8 The operation of the robot model is determined by Equations ( 7) and ( 8): where q = (x, y, θ) T is the vector of the configuration coordinates; v = (v, w) T is the vector of velocities; τ = (τ 1 , τ 2 ) is the vector of torques applied to the wheels of the robot where τ 1 and τ 2 denote the torques of the right and left wheel, respectively; P ∈ R 2 is the uniformly bounded disturbance vector; M(q) ∈ R 2X2 is the positive-definite inertia matrix; C q, .q ϑ is the vector of centripetal and Coriolis forces; D ∈ R 2X2 is a diagonal positive-definite damping matrix.
The kinematic system is determined by Equation ( 8): .
where (x,y) is the position in the X − Y (world) reference frame; θ is the angle between the heading direction and the x-axis; v and w are the linear and angular velocities, respectively Equation ( 9) represents the non-holonomic constraint this system has, which corresponds to a non-slip wheel condition preventing the robot from moving sideways: .y cos θ − .
x sin θ = 0 (9) This controller is composed of two inputs and two outputs; the first input is the ev (error in the linear velocity), which has two trapezoidal and one triangular membership functions with linguistic variables called N, Z, and P. The second input is the ew (error in the angular velocity), which has two trapezoidal and one triangular membership functions with linguistic variables of N, Z, and P. The first output is T1 (torque 1), which has three triangular membership functions with linguistic variables of N, Z, and P. The second output is T2 (torque 2), which has three triangular membership functions with linguistic variables of N, Z, and P.This controller is of the Mamdani type and uses nine fuzzy rules, which are presented in detail in Table 4.  4 presents in detail each of the rules that compose the robot mobile controller to achieve the main objective of this controller.Figure 11 shows the structure of the fuzzy system for this controller.

Simulation Results
This section presents the results obtained by optimizing the membership functions using the dynamic parameter adaptation with Type-1 and interval Type-2 fuzzy logic.This methodology was applied to the three benchmark problems shown in Section 4, where the objective is to follow a desired trajectory, and 30 experiments were carried out with disturbances and without disturbances with the original algorithm of harmony search (HS), Type-1 fuzzy harmony search algorithm (FHS), and interval Type-2 fuzzy harmony search (FHS2).The noise applied to each plant was at a level of 0.5 using the uniform random number generator.The objective function of the methods is the root mean square error (RMSE) of the trajectory, although other control metrics were also used: MSE (Mean Squared Error), ISE (Integral Squared error), IAE (Integral Absolute Error), ITSE (Integral of Time-weighted Squared Error) and ITAE (Integral Time-weighted Absolute Error), and SNR (Signal to noise ratio), respectively, as shown in Equations ( 10)- (16).
= 10 The parameters used to perform the experiments are as follows: 100 iterations, PA rate of 0.75, HMR of 0.95 (Only for the HS), and HM of 30.Experimental results in Tables 5-7 show the best experiment without perturbation in the fuzzy logic controller for each algorithm applied to each case study (water tank controller, temperature controller, and robot mobile controller).Tables 8-10 show the results obtained using the water tank controller, temperature controller, and robot mobile controller with noise.These results correspond to the averages of the 30 experiments for each method.

Simulation Results
This section presents the results obtained by optimizing the membership functions using the dynamic parameter adaptation with Type-1 and interval Type-2 fuzzy logic.This methodology was applied to the three benchmark problems shown in Section 4, where the objective is to follow a desired trajectory, and 30 experiments were carried out with disturbances and without disturbances with the original algorithm of harmony search (HS), Type-1 fuzzy harmony search algorithm (FHS), and interval Type-2 fuzzy harmony search (FHS2).The noise applied to each plant was at a level of 0.5 using the uniform random number generator.The objective function of the methods is the root mean square error (RMSE) of the trajectory, although other control metrics were also used: MSE (Mean Squared Error), ISE (Integral Squared error), IAE (Integral Absolute Error), ITSE (Integral of Time-weighted Squared Error) and ITAE (Integral Time-weighted Absolute Error), and SNR (Signal to noise ratio), respectively, as shown in Equations ( 10)- (16).
The parameters used to perform the experiments are as follows: 100 iterations, PA rate of 0.75, HMR of 0.95 (Only for the HS), and HM of 30.Experimental results in Tables 5-7 show the best experiment without perturbation in the fuzzy logic controller for each algorithm applied to each case study (water tank controller, temperature controller, and robot mobile controller).Tables 8-10 show the results obtained using the water tank controller, temperature controller, and robot mobile controller with noise.These results correspond to the averages of the 30 experiments for each method.The noise used for the two methods was at a level of 0.5 with the uniform random number 10.7128 dB for Type-1 and 12.1449 dB for Type-2 for the water tank problem.The noise used for the two methods was 0.5 with the uniform random number 19.9196 dB for Type-1 and 22.1073 dB for Type-2 for the temperature problem.
The noise used for the two methods was 0.5 with the uniform random number 39.6227 dB for Type-1 and 41.2338 dB for Type-2 for the robot mobile problem.
Analyzing the results obtained in Tables 5-10, we can verify an improvement in the experiments when using the Type-1 and Type-2 methods with noise.Figures 12-14 show the best trajectory found for each method out of 30 experiments using noise: Figure 12 shows the best result for the water tank controller problem, Figure 13 shows the best result for the temperature controller problem, and Figure 14 shows the best result for the robot mobile controller.It is observed that the original method is more unstable in all cases and the Type-1 and Type-2 fuzzy methods achieve better stability and tracking of the desired trajectory.The noise used for the two methods was 0.5 with the uniform random number 39.6227 dB for Type-1 and 41.2338 dB for Type-2 for the robot mobile problem.
Analyzing the results obtained in Tables 5-10, we can verify an improvement in the experiments when using the Type-1 and Type-2 methods with noise.Figures 12-14 show the best trajectory found for each method out of 30 experiments using noise: Figure 12 shows the best result for the water tank controller problem, Figure 13 shows the best result for the temperature controller problem, and Figure 14 shows the best result for the robot mobile controller.It is observed that the original method is more unstable in all cases and the Type-1 and Type-2 fuzzy methods achieve better stability and tracking of the desired trajectory.

Conclusions
In this paper a comparative study of dynamic parameter adaptation using the Type-1 and Type-2 fuzzy harmony search algorithm is presented.The proposed method uses fuzzy logic for dynamic parameter adaptation and was applied to three benchmark problems-the water tank, temperature, and robot mobile controller-for disturbed and undisturbed trajectory tracking.In the analysis of the results we obtain a significant improvement in the three benchmark control problems when using dynamic parameter adaptation with interval Type-2 fuzzy logic.This verifies that for complex problems the handling of uncertainty is important for obtaining better stability and therefore better results with or without noise.
It was verified that the proposed method manages to maintain the control of a reference line in the three cases presented in Section 5, and in the statistical tests it can be validated that when using dynamic parameter adaptation the optimization of the values of the membership functions of these control cases is achieved by reducing the mean quadratic error and following the desired path.
In future work, the proposed method will be tested with different types of problems or controllers to verify the efficiency of the method; we will also try to improve the fuzzy system with which the internal parameters of the algorithm are adapted to achieve improvements when applied to control problems.

Figure 3 .
Figure 3. Input and output of the Type-1 fuzzy system.

Figure 3 .
Figure 3. Input and output of the Type-1 fuzzy system.

Figure 3 .
Figure 3. Input and output of the Type-1 fuzzy system.

Figure 3 .
Figure 3. Input and output of the Type-1 fuzzy system.

Figure 5 .
Figure 5. Input and output of the interval Type-2 fuzzy system.

Figure 6 .
Figure 6.Diagram of the water tank controller.

Figure 6 .
Figure 6.Diagram of the water tank controller.

Figure 7 .
Figure 7. Structure of the water tank fuzzy system for control.
, and Hard.The first output is the cold variable, which has five triangular membership functions with linguistic values of close fast, close low, steady, open slow, and open fast.The second output is the hot variable, which has five triangular membership functions with linguistic values of close fast, close low, steady, open slow, and open fast.The diagram of the operation of this controller is illustrated in Figure 8.

Figure 8 .
Figure 8. Diagram of the temperature controller.

Figure 7 .
Figure 7. Structure of the water tank fuzzy system for control.

17 Figure 7 .
Figure 7. Structure of the water tank fuzzy system for control.
, and Hard.The first output is the cold variable, which has five triangular membership functions with linguistic values of close fast, close low, steady, open slow, and open fast.The second output is the hot variable, which has five triangular membership functions with linguistic values of close fast, close low, steady, open slow, and open fast.The diagram of the operation of this controller is illustrated in Figure 8.

Figure 8 .
Figure 8. Diagram of the temperature controller.

Figure 8 .
Figure 8. Diagram of the temperature controller.

Figure 9 .
Figure 9. Structure of the water tank fuzzy system for control.

Figure 10 .
Figure 10.Diagram of the robot mobile controller.

Figure 9 .
Figure 9. Structure of the water tank fuzzy system for control.

Figure 9 .
Figure 9. Structure of the water tank fuzzy system for control.

Figure 10 .
Figure 10.Diagram of the robot mobile controller.

Figure 10 .
Figure 10.Diagram of the robot mobile controller.

Figure 11 .
Figure 11.Structure of the mobile robot fuzzy system for control.

Figure 12 .
Figure 12.Simulation results of the water tank controller for the three methods.(a) The best result is shown using original harmony search algorithm (HS); (b) the best result is shown using the Type-1 fuzzy harmony search (FHS); (c) the best result is shown using the Type-2 fuzzy harmony search (FHS2).These methods were applied with noise to verify the stability of the methods.The blue line represents the desired trajectory and the pink line the obtained trajectory; the objective is for the obtained line to resemble the desired one.

Figure 12 .
Figure 12.Simulation results of the water tank controller for the three methods.(a) The best result is shown using original harmony search algorithm (HS); (b) the best result is shown using the Type-1 fuzzy harmony search (FHS); (c) the best result is shown using the Type-2 fuzzy harmony search (FHS2).These methods were applied with noise to verify the stability of the methods.The blue line represents the desired trajectory and the pink line the obtained trajectory; the objective is for the obtained line to resemble the desired one.

Figure 13 .Figure 13 .Figure 13 .Figure 14 .
Figure 13.Simulation results of the temperature controller for the three methods.(a) The best result is shown using original harmony search algorithm (HS); (b) the best result is shown using the Type-1 fuzzy harmony search (FHS); (c) the best result is shown using the Type-2 fuzzy harmony search (FHS2).These methods were applied with noise to verify the stability of the methods.The blue line represents the desired trajectory and the pink line the obtained trajectory; the objective is for the obtained line to resemble the desired one.

Table 2 .
Rules for the water tank controller.

Table 2 .
Rules for the water tank controller.

Table 3 .
Fuzzy rules for the temperature controller.

Table 3 .
Fuzzy rules for the temperature controller.

Table 3 .
Fuzzy rules for the temperature controller.

Table 4 .
Fuzzy rules for the robot mobile controller.

Table 5 .
Errors obtained from the water tank controller without noise.

Table 6 .
Errors obtained from the temperature controller without noise.

Table 7 .
Errors obtained from the robot mobile controller without noise.

Table 8 .
Errors obtained from the water tank controller with noise.

Table 9 .
Errors obtained from the temperature controller with noise.

Table 10 .
Errors obtained from the robot mobile controller with noise.

Table 10 .
Errors obtained from the robot mobile controller with noise.

Table 11 .
Parameters for the statistical z-test.

Table 12 .
Results for the statistical test with Type-1 and Type-2 FHS and HS without noise.

Table 13 .
Results for the statistical test with Type-1 and Type-2 FHS and HS without noise.

Table 14 .
Results for the statistical test with Type-1 and Type-2 FHS and HS without noise.

Table 15 .
Results for the statistical test with Type-1 and Type-2 FHS and HS with noise.

Table 16 .
Results for the statistical test with Type-1 and Type-2 FHS and HS with noise.

Table 17 .
Results for the statistical test with Type-1 and Type-2 FHS and HS with noise.