High-Speed Interval Type-2 Fuzzy Systems for Dynamic Parameter Adaptation in Harmony Search for Optimal Design of Fuzzy Controllers

: Fuzzy systems have become a good solution to the problem of ﬁxed parameters in metaheuristic algorithms, proving their efﬁciency when performing dynamic parameter adaptations using type-1 and type-2 fuzzy logic. However, the computational cost of type-2 fuzzy systems when using the continuous enhanced Karnik–Mendel (CKM) algorithm for type-reduction, when applied to control and optimization, is too high. Therefore, it is proposed to use an approximation to the CKM algorithm in the type-2 fuzzy system for adjusting the pitch adjustment rate (PArate) parameter in the original harmony search algorithm (HS). The main contribution of this article is to verify that the implementation of the proposed methodology achieves results that are equivalent to the interval type-2 fuzzy system with the CKM algorithm, but in less computing time and also allowing an efﬁcient dynamic parameter adaptation. It is noteworthy that this method is relatively new in the area of metaheuristics algorithms so there is a current interest to work with this methodology. The proposed method was used in optimizing the antecedents and consequents for an interval type-2 fuzzy controller of direct current motor. Experimental results without noise and then with uniform random noise numbers (Gaussian noise) in the controller were obtained to verify that the implementation is efﬁcient when compared to conventional and other existing methods.


Introduction
Currently, in state of the art science, there exists a plethora of algorithms for solving real world problems, and some of them are classified as bio-inspired algorithms, which replicate the way in which nature deals with optimization problems. Examples of these algorithms are shown in [1][2][3][4][5]: metaheuristics that are derived from hybrid algorithms, mechanisms, and statistics, as we find in [6][7][8], applied to neural networks as in [9][10][11]; and type-2/3 fuzzy systems applied in various applications, such as in [12,13] among others. Most of these algorithms use fixed parameters throughout their iterations, which causes them to fall with higher probability into local minima. For this reason, there is current interest in methods for parameter adaptation in metaheuristics, and fuzzy systems have been put forward as a viable alternative for achieving this goal. Therefore, in the following articles, a solution to this problem has been presented using conventional type-1 [14][15][16] and type-2 [17][18][19] fuzzy logic for parameter adaptation, and they have been implemented with relative success in various control problems and benchmark mathematical functions, as shown in [20,21].
Interval type-2 fuzzy logic has the ability to deal with uncertainty; its main advantages are that it achieves the stabilization and improvement of results on complex problems,

Fuzzy Logic
The theoretical constructs of interval type-2 fuzzy logic are described in this section. The objective of this work is to implement an approximation method that was recently published by [26] in parameter adaptation for HS, where it is possible to demonstrate the reduction of the computational cost when carrying out experimentation in various case studies. In this article, this approximate method for type reduction was implemented with the main goal of efficiently finding good results for HS.
The primary domain is represented by X and the secondary domain is denoted by Jx. The IT2 FS is comprised of the upper and lower membership functions and the region contained inside these functions is called footprint of uncertainty (FOU) [34].
Equation (2) illustrates the form of the fuzzy rules of the interval type-2 fuzzy system, and its structure is illustrated in Figure 1.
R l : IF x 1 is F l 1 and . . . and x p is F l p , THEN y is G l , where l = 1, . . . , M A type-reducer and a defuzzifier are included in the output processing block, which produces a type-1 fuzzy set output (from the type-reducer) or a precise value (from the defuzzification block) [35,36].

Numerical Approximation of the New Approximate Continuous Enhanced Karnik-Mendel (NACEKM) Method and Methodology
Liu and Mendel in [37] presented a method called CKM algorithm where they pose type-reduction calculation as root-finding for a function, and the work in this article is based on that idea. The objective is to implement the numerical approximation of the new approximate continuous enhanced Karnik-Mendel (NACEKM) method that was recently published in [26]. In the work presented in [37], the CKM algorithm was explained in detail, from which the CKM type reduction approach was posed as finding the roots of a function. Equations (3) and (4) define the critical points of the upper ( ) and lower ( ) membership functions.
Based on Equations (3) and (4), two functions are proposed, which are represented as Equations (5) and (6), where ( ) represents the type-reduction for the upper membership function and ( ) and ξ ∈ [a, b] represent the type-reduction for the lower membership function.
Since the functions contain only a single root, it is intended to solve this problem by means of the Newton-Raphson method, specifically using the root-finding problem.
Equations (7) and (8) are based on NACEKM [21], where the first iteration of Newton-Raphson is considered to be an efficient approximation of CKM, where and ξ r represent the left and right switch points, respectively. A type-reducer and a defuzzifier are included in the output processing block, which produces a type-1 fuzzy set output (from the type-reducer) or a precise value (from the defuzzification block) [35,36].

Numerical Approximation of the New Approximate Continuous Enhanced Karnik-Mendel (NACEKM) Method and Methodology
Liu and Mendel in [37] presented a method called CKM algorithm where they pose type-reduction calculation as root-finding for a function, and the work in this article is based on that idea. The objective is to implement the numerical approximation of the new approximate continuous enhanced Karnik-Mendel (NACEKM) method that was recently published in [26]. In the work presented in [37], the CKM algorithm was explained in detail, from which the CKM type reduction approach was posed as finding the roots of a function. Equations (3) and (4) define the critical points of the upper (x u ) and lower (x l ) membership functions.
Based on Equations (3) and (4), two functions are proposed, which are represented as Equations (5) and (6), where ϕ(ξ) represents the type-reduction for the upper membership function and ψ(ξ) and ξ ∈ [a, b] represent the type-reduction for the lower membership function.
Since the functions contain only a single root, it is intended to solve this problem by means of the Newton-Raphson method, specifically using the root-finding problem. Equations (7) and (8) are based on NACEKM [21], where the first iteration of Newton-Raphson is considered to be an efficient approximation of CKM, where ξ l and ξ r represent the left and right switch points, respectively.
Equation (9) establishes the enhanced version of the Karnik-Mendel method (EKM) criteria to initialize the Newton-Raphson method.
Equations (5) and (6) are intended to obtain the NACEKM. In this situation, Equations (10) and (11) are put forward as a part of the solution to Equations (5) and (6).
Equation (12) represents the A(ξ) and V(ξ) functions where they represent the upper and lower limits, respectively, that compose Equations (10) and (11).
Based on Equation (12), the ϕ(ξ) and ψ(ξ) functions are defined in Equation (13), where b l represents the upper and b l the lower left points. Similarly, b r and b r represent the upper right and lower right points, respectively.
Based on Equation (13), the algorithm for NACEKM is illustrated in Figure 2.

Harmony Search Algorithm
In 2001, Zong Woo Geem developed an algorithm based on musical improvisation called harmony search (HS), and it specifically referred to Jazz in this case. [38]. This algorithm uses three parameters to mimic the behavior of an orchestra that consists of: pitch adjustment rate (PArate) parameter, harmony memory accepting (HMR), and random selection, and these parameters are outlined by Equations (14)- (16).

Harmony Search Algorithm
In 2001, Zong Woo Geem developed an algorithm based on musical improvisation called harmony search (HS), and it specifically referred to Jazz in this case. [38]. This algorithm uses three parameters to mimic the behavior of an orchestra that consists of: pitch adjustment rate (PArate) parameter, harmony memory accepting (HMR), and random selection, and these parameters are outlined by Equations (14)- (16).
Based on HMR, HS performs memory consideration if 0 ≤ Rand ≤ HMR and random selection if HMR ≤ Rand ≤ 1. With PArate, HS performs pitch adjustment if 0 ≤ Rand ≤ PArate and does nothing if PArate ≤ Rand ≤ 1. Memory consideration means X new comes from HM. Random selection means X new comes from the total value range. Pitch adjustment means X new is further tweaked by adding delta (a tiny positive or negative value; if we want to use b p , we have to define it first) once X new is obtained from memory consideration.

Methodology for Implementing NACEKM in Parameter Adaptation of HS
The NACEKM numerical approximation was implemented for achieving parameter adaptation in a dynamic fashion in the original HS. Previously, the operation and performance of this algorithm was studied in detail, as mentioned in [39][40][41][42][43][44][45], to identify and understand the behavior of each parameter within the algorithm. In the proposed fuzzy system for parameter adaptation, the iterations are taken as input and the pitch adjustment rate (PArate) parameter as the output. Equations (17) and (18) represent the mathematical expressions of these fuzzy variables.
where PArate is the pitch adjusment; r PArate represents the number of rules of the IT2 FS corresponding to PArate; PArate 1i represents the output result for rule i with respect to PArate; µ PArate i is the membership function of rule i corresponding to PArate. The parameters used for the construction of the interval type-2 fuzzy system (IT2FHS) and its triangular interval type-2 (IT-T2) membership function with uncertainty in a are represented in Table 1.
Equation (19) represents the partial knowledge of the construction of each IT-T2 membership function for each input and output, and the linguistic terms of the fuzzy sets are lower, middle and higher, respectively.
The IT2FHS rules are expressed in increasing fashion as the iterations progress, as illustrated in Table 2. The knowledge expressed by the fuzzy rules is that as iterations increase, then HMR is also increasing (nonlinearly) to improve the HS performance. Table 1. Partial knowledge of the interval type-2 fuzzy system (IT2FHS) expressed in the membership functions. Lower

Experiment to Direct Current Motor Speed Controller
In this section, the case of a speed control problem in a direct current motor (DC) was considered. The fuzzy harmony search approach was used for optimal design of the fuzzy controller antecedents and consequents. IT2 FSs was implemented in the controller and the goal was validating the effectiveness of the proposed method. Figure 3 illustrates the graphical view of the DC motor components. The type-2 fuzzy system for controlling the speed of the DC motor is constituted by the following inputs and outputs: input 1 is the error and uses two trapezoidal and one IT-T2 membership functions; input 2 is the error change and voltage is the output, both containing the same type of two trapezoidal and three triangular type-2 membership functions, The type-2 fuzzy system for controlling the speed of the DC motor is constituted by the following inputs and outputs: input 1 is the error and uses two trapezoidal and one IT-T2 membership functions; input 2 is the error change and voltage is the output, both containing the same type of two trapezoidal and three triangular type-2 membership functions, respectively. The parameter values considered for the construction of the IT2 FSs controller for DC motor are represented in Table 3. The IT2 FS is of Mamdani type, and its structure is presented in Figure 4. The IT2 FS contains fifteen fuzzy rules that are represented in Table 4.     The nonlinear surface of the controller is represented in Figure 5. For the optimization of the antecedents and consequents of the IT2 FS controller for the direct current DC motor controller, the HS with parameter adaptation is used. The representation of the IT-T2 membership function with uncertainty is shown in Figure 6 and its mathematical expression in Equation (19). The illustration of the trapezoidal type-2 membership functions (TI-T2) with a particular footprint of uncertainty is shown in Figure 7 and its mathematical expression in Equation (20). For the optimization of the antecedents and consequents of the IT2 FS controller for the direct current DC motor controller, the HS with parameter adaptation is used. The representation of the IT-T2 membership function with uncertainty is shown in Figure 6 and its mathematical expression in Equation (19). The illustration of the trapezoidal type-2 membership functions (TI-T2) with a particular footprint of uncertainty is shown in Figure 7 and its mathematical expression in Equation (20). Mathematics 2021, 9, x FOR PEER REVIEW 9 of 20 For the optimization of the antecedents and consequents of the IT2 FS controller for the direct current DC motor controller, the HS with parameter adaptation is used. The representation of the IT-T2 membership function with uncertainty is shown in Figure 6 and its mathematical expression in Equation (19). The illustration of the trapezoidal type-    For the optimization of the antecedents and consequents of the IT2 FS controller for the direct current DC motor controller, the HS with parameter adaptation is used. The representation of the IT-T2 membership function with uncertainty is shown in Figure 6 and its mathematical expression in Equation (19). The illustration of the trapezoidal type-2 membership functions (TI-T2) with a particular footprint of uncertainty is shown in Fig-ure 7 and its mathematical expression in Equation (20).
A TI-T2 membership function has eight parameters, and an IT-T2 membership function has six parameters. In total there are 90 parameters for the antecedents and consequents of the controller, which can be optimized with the proposed method to improve performance and achieve the objective. Table 5 summarizes the values assigned to each parameter. Experimentation was performed with uniform random number noise at a level of 0.09, which represented 90 percent of noise. Figure 8 shows how the uniform random noise was implemented in the controller. Experimentation was performed with uniform random number noise at a level of 0.09, which represented 90 percent of noise. Figure 8 shows how the uniform random noise was implemented in the controller. The root mean square error (RMSE) is the objective function considered in the optimization process, as is outlined in Equation (21): The performance of the controller is illustrated in Figure 9, where we can appreciate The root mean square error (RMSE) is the objective function considered in the optimization process, as is outlined in Equation (21): The performance of the controller is illustrated in Figure 9, where we can appreciate that the motor must increase the velocity to reach its steady-state speed as soon as it turns on, which in this case, is at a velocity of 40 rad/s. The root mean square error (RMSE) is the objective function considered in the optimization process, as is outlined in Equation (21): The performance of the controller is illustrated in Figure 9, where we can appreciate that the motor must increase the velocity to reach its steady-state speed as soon as it turns on, which in this case, is at a velocity of 40 rad/s.

Results for the Experiment of Direct Current Motor Speed Controller
The results obtained when performing the 30 simulations using the proposed method for the optimal design of the type-2 fuzzy controller for the DC motor are illustrated in Table 6. Experiments were done without considering noise and then also with noise perturbing the controller, in this way verifying that, on average, type-2 performs better when noise exists in the control process.

Results for the Experiment of Direct Current Motor Speed Controller
The results obtained when performing the 30 simulations using the proposed method for the optimal design of the type-2 fuzzy controller for the DC motor are illustrated in Table 6. Experiments were done without considering noise and then also with noise perturbing the controller, in this way verifying that, on average, type-2 performs better when noise exists in the control process. The best simulation results obtained without considering noise and with the presence of noise are graphically represented in Figures 10 and 11  The best simulation results obtained without considering noise and with the presence of noise are graphically represented in Figures 10 and 11, respectively.     Figure 12 illustrates the architecture of the fuzzy controller for the best simulation result obtained without considering noise applied in the control of the plant, and the surface is shown in Figure 13.  Figure 12 illustrates the architecture of the fuzzy controller for the best simulation result obtained without considering noise applied in the control of the plant, and the surface is shown in Figure 13.   Figure 13. Surface of the best fuzzy system without considering noise. Figure 14 illustrates the structure of the best design for the fuzzy system obtained with noise applied in the fuzzy controller of the plan,t and the surface of this fuzzy system is illustrated in Figure 15. Figure 13. Surface of the best fuzzy system without considering noise. Figure 14 illustrates the structure of the best design for the fuzzy system obtained with noise applied in the fuzzy controller of the plant and the surface of this fuzzy system is illustrated in Figure 15.   Figure 15. Surface of the best fuzzy system with noise.

Comparison of the Proposed Method with Other Existing Methods
The following Tables 7 and 8 show the results that were obtained in other articles when optimizing the DC motor controller, the main difference of the proposed method with respect to these articles is that, in the proposal presented in this article, a type-2 fuzzy controller is implemented. Table 7 shows the comparison of the results obtained with the Approximate continues Enhanced Karnik-Mendel method of the Fuzzy Harmony Search algorithm (FHS FIS 3) and the Approximate continues Enhanced Karnik-Mendel method of the Differential Evolution Search algorithm (FDE FIS 3). against the results obtained in the proposed methods without noise and with noise.  Table 8 shows the comparison of the results obtained with the Harmony Search Algorithm without noise (HS without noise), Harmony Search Algorithm with noise (HS with noise), Type-1 Fuzzy Harmony Search Algorithm without noise (FHS without noise) and Type-1 Fuzzy Harmony Search Algorithm with noise (FHS with noise) against the results obtained in the proposed methods without noise and with noise. Figure 15. Surface of the best fuzzy system with noise.

Comparison of the Proposed Method with Other Existing Methods
The following Tables 7 and 8 show the results that were obtained in other articles when optimizing the DC motor controller, the main difference of the proposed method with respect to these articles is that, in the proposal presented in this article, a type-2 fuzzy controller is implemented.   and Type-1 Fuzzy Harmony Search Algorithm with noise (FHS with noise) against the results obtained in the proposed methods without noise and with noise.
The results summarized in Table 7 show the obtained RMSE when applying the CKM approach methodology for the parameter adjustment of the HMR parameter in the HS algorithm and the F parameter in the differential evolution algorithm (FDE); these two methods were used to optimize the type-1 controller of the DC motor. The results with the proposed method are also presented. Table 8 summarizes the results obtained in [46] for the DC Motor type-1 controller optimization, where the dynamic adaptation of the HMR parameter is done with type-1 fuzzy logic. The noise that was applied was with a level of 0.05, which represents 5%. The results with the proposed method are also illustrated.
When comparing the results obtained with other articles, such as in [26], with the proposed method, it can be noted that the obtained error average was lower. By comparison of the results with the work in [46] against the original HS method without noise and with noise and the FHS method without noise, it can be concluded that better results were obtained with the proposed method. The results were better in the FHS Type-1 with noise, because in that article, a Gaussian noise of 0.05 was used, and in the proposed method, a higher level of noise of 0.09 was used. In any case, it was possible to verify that, when using the approximation of CKM method for the PArate parameter adaptation in the original HS algorithm and when it is used in the optimization of the Interval Type-2 controller of the DC Motor, the main goal of this article was achieved, and the efficiency of the proposed method was verified.

Conclusions and Future Work
This article has presented the implementation of the NACEKM method in the parameter adaptation of the original HS algorithm. The NACEKM is a relatively new methodology that offers performance improvements and lower computational cost; therefore, the main contribution of this article was verifying that the implementation of the proposed methodology has equivalent performance to the type-2 fuzzy system and eliminates the problem of fixed parameters in the HS algorithm. In addition, it was also applied to the optimization of a type-2 control problem without and with noise in the controller. Analyzing the results obtained from the proposed numerical approximation of the CKM algorithm, it can be observed that good results are achieved in both cases by applying noise or not in the controller.
The results were also compared with two existing articles where it can be noted that the proposed methodology has excellent performance for this optimization problem.
This methodology can be applied in a wide range of different problems, such as hardware, control, adaptation, etc. Due to the significant advantages it has, its limitation would be that, in the mathematical model and in the adaptation, the methodology must be carried out with each variation of the intended work, but it can be adapted to each specific case.
As future work, the proposed methodology can be implemented in the experimentation of other Type-2 fuzzy controller cases in order to validate that the results are also relevant when the proposed method is applied to other problems. We also still have to elevate the use of fuzzy logic to what is called generalized type-2 fuzzy logic or shadowed type-2 fuzzy logic until reaching type-3 fuzzy logic, and in theory, better results can be expected.

Informed Consent Statement: Not applicable.
Data Availability Statement: The data will be available upon request.