Shadowed Type-2 Fuzzy Systems for Dynamic Parameter Adaptation in Harmony Search and Differential Evolution for Optimal Design of Fuzzy Controllers

: This article mainly focuses on the utilization of shadowed type-2 fuzzy systems used to achieve the goal of dynamically adapting the parameters of two already known algorithms in the literature: the harmony search and the differential evolution algorithms. It has already been established that type-2 fuzzy logic enhances the performance of metaheuristics by enabling parameter adaptation; however, the utilization of fuzzy logic results in an increased execution time. For this reason, in this article, the shadowed type-2 fuzzy approach is put forward as a way of reducing execution time, while maintaining the good results that the complete type-2 fuzzy model produces. The harmony search and differential evolution algorithms with shadowed type-2 parameter adaptations were applied to the problem of optimally designing fuzzy controllers. The simulations were performed with the controllers working in an ideal situation, and then with a real situation under different noise levels in order to reach a conclusion regarding the performance of each of the algorithms that were applied.


Introduction
Nowadays, is becoming more common to find new algorithms that are developed based on the behavior of nature, which can offer computational solutions to complex optimization problems. In this work, two algorithms based on two different approaches are considered: the harmony search (HS) and the differential evolution (DE) algorithms, which have already been compared in previous studies using different types of fuzzy systems and for different problems, both for control and mathematical functions. Some of the studies that have considered these two algorithms together are the following: the first discussed the optimal design of fuzzy systems using differential evolution and harmony search algorithms with dynamic parameter adaptations [1]. The next study considered shadowed type-2 fuzzy systems for dynamic parameter adaptation in the harmony search and differential evolution algorithms [2]. Additionally, a comparative study demonstrating fuzzy controller optimization using the bee colony, differential evolution, and harmony search algorithms was presented in [3], and a high-speed interval type-2 fuzzy system approach for dynamic parameter adaptation in metaheuristics was outlined in [4].
The above-mentioned works all use fuzzy logic, which was first proposed in 1965 by Lotfi Zadeh and was immediately shown to be an important tool for the control of industrial systems and processes. In addition to the previously mentioned studies, fuzzy logic can also be applied in other areas to obtain better results, such as in industry, medicine, and system control, just to mention a few. These are some of the works in which the use of fuzzy logic can be appreciated, but the evolution of fuzzy logic is very broad, and today, there is recent research in which dynamic fractional-order models are obtained based on an extension of general type-2 fuzzy systems, which are called interval type-3 fuzzy logic systems (IT3FLSs) [5]. These are also some of the most recent works in the literature in which the use of fuzzy logic has been put forward as an option for optimizing traditional problems, for example: an efficient type-2 fuzzy method for parameter adaptation in HS for optimally designing fuzzy controllers is presented in [6], an optimization of type-2 fuzzy controllers utilizing the galactic swarm and firefly algorithms is described in [7], the optimal parameter estimation of a silicon solar cell using fuzzy systems is described in [8], the application of soft computing to calculate medicine dose during patient treatment is shown in [9], a mathematical approach to identify coronavirus disease (COVID-19) using a fuzzy logic inference system is shown in [10], a fuzzy approach for preanesthetic operation risk evaluation in laparoscopic cholecystectomy is demonstrated in [11], fuzzy logic for estimating medicine imports can be seen in [12], the optimization of storage costs in maintenance for industry is presented in [13], an approach for job scheduling with a multi-criteria-based method is described in [14], an approach for supply chain management utilizing a fuzzy rule-based maturity model is shown in [15], the determination of the difficulty level for a garment model with a fuzzy logic method is presented in [16], and simulated annealing to locate electric charging situations with the implementation of interval type-2 fuzzy sets is presented in [17].
However, each of the metaheuristic algorithms that are used in this work have also had a great impact and have evolved separately in different areas of opportunity. First, we mention some recent research studies where the harmony search algorithm has been used: a differential HS algorithm for multi-objective optimal power flow is presented in [18], multilevel thresholding for image segmentation using the HS algorithm is described in [19], a hybrid HS algorithm for social network contact for COVID-19 tracing is shown in [20], a review of the HS algorithm in clustering problems is shown in [21], a hybrid of the HS algorithm and evolutionary approach for the process of feature selection is presented in [22], a neural-network-adaptive dynamical HS algorithm to approximate the flying rocks resulting from blasting is shown in [23], a selective harmonic elimination in output voltage levels in modular converters using a differential HS algorithm is shown in [24], a quasi-oppositional HS algorithm for ad hoc and sensor networks is presented in [25], a self-adaptive global-best HS algorithm-based airflow control is described in [26], a multipopulation HS approach for the detection of high-order interactions is described in [27], the selection of features for the detection of colon cancer using clustering and a modification of the HS algorithm is shown in [28], feature selection with improved HS binary for data classification is described in [29], a multi-objective HS algorithm for the optimal expansion and planning of distribution systems is presented in [30], a hybrid HS algorithm for achieving an efficient healthcare framework for kidney disease is described in [31], an optimal steel frame design using an HS algorithm is described in [32], a discrete HS algorithm for a flexible job shop scheduling problem with multiple objectives is presented in [33], and a similarity hybrid harmony search algorithm for the Team Orienteering problem is presented in [34].
Below, we mention some works in which the DE algorithm has been used: a DE algorithm with wavelet functions and a novel mutation approach for optimization is presented in [35], an enhanced DE algorithm and its application in an optimization problem is shown in [36], the prediction of the velocity of a nanofluid convective flow by the DE algorithm in conjunction with a fuzzy system is presented in [37], a hybrid slime mold algorithm with a DE algorithm for optimization is described in [38], the optimization of operating rules in multi-reservoir hydropower generation with an adaptive DE algorithm is described in [39], the optimization of quantum cloning circuit parameters with an adaptive DE algorithm is shown in [40], an enhanced quantum-inspired DE algorithm for deep belief networks is described in [41], an enhanced multi-operator DE algorithm for solving unconstrained problems is shown in [42], the optimal design of fuzzy controllers based on a DE algorithm with parameter adaptation utilizing fuzzy systems (of the type-2 and type-1 form) is presented in [43], and the accelerated DE algorithm with novel proposed operators for multi-damage detection in plate structures is described in [44].
It has already been established in previous works that type-2 fuzzy enhancements can help augment performance in metaheuristics by enabling dynamic parameter adaptation during execution. However, the utilization of fuzzy logic in parameter adaptation results in an increased execution time for the metaheuristic. For this reason, in this article, the shadowed type-2 fuzzy approach is proposed as a way of reducing execution time, while maintaining the good results of the complete type-2 fuzzy model in parameter adaptation. In summary, the most important contribution of this paper is the shadowed fuzzy approach proposed as a way to efficiently achieve parameter adaptation in HS and DE, and also the comparison of their performance in optimizing fuzzy controllers. Thus, in this paper, the objective of the work is the application of shadowed type-2 fuzzy systems as an approximation method of the type-2 general fuzzy systems modeled with the representation of α planes applied to the adjustment of parameters of the HS and DE algorithm. The main difference with respect to existing works is that the shadowed type-2 fuzzy inference system approach only requires two α-planes to model the general type-2 fuzzy inference systems, and another important contribution of the use of shadowed type-2 fuzzy systems is that the computational cost is much lower, and therefore, it is very feasible that they can be applied in real-life problems.
The rest of the article is organized as follows. Section 2 outlines the basic constructs of type-2 shadowed sets theory, Section 3 briefly describes the main concepts of metaheuristics, Section 4 outlines the proposed shadowed parameter adaptation approach, Section 5 summarizes the optimized controller and the achieved results, and Section 6 puts forward the conclusions and possible lines of future research.

Type-2 Fuzzy Systems and Shadowed Sets
Fuzzy logic has evolved over the years; it started with what is known as type-1 fuzzy logic in 1965 [45], and its main objective was to model the vagueness of the real world, as well as to use mathematical models to represent human knowledge. Subsequently, it was followed by what is now called type-2 fuzzy logic, which allows the handling of uncertainty, and to model a type-2 fuzzy set, Equation (1) is used: In the literature, there are some alternative ways to model type-2 fuzzy logic, such as geometric approximation [46] and representations using vertical slices [47] and horizontal slices [48]. In this work, the main idea is focused on the use of generalized type-2 fuzzy modeling through the representation of α planes. Equation (2) represents the process by which the secondary axis of a generalized type-2 fuzzy system is discretized in several α planes. Each α plane can be calculated as an interval type-2 fuzzy system [49] and thus with the union of each plane α, the modeling of a generalized type-2 fuzzy system is obtained, expressed in Equation (3).
The shadowed type-2 fuzzy inference system [50] arises in order to reduce the computational cost generated by the use of α-planes. This work focuses on the use of shadowed type-2 fuzzy inference systems with only two optimal α-planes. To define the precision of the use of the optimal α-planes, the theory proposed by Pedrycz is used [51]. Equation (4) describes the intervals used to understand the definition of the shadowed sets, which consist of performing two α-cuts on a type-1 fuzzy set; the values are defined in the variables α and β, as shown below: Equation (5) An image depiction of Equation (5) is illustrated in Figure 1. Based on Equation (6), the optimal values of α and β are obtained, and this requires an optimization process to be able to determine these values.
This proposed shadowed type-2 FIS methodology is used for the dynamic adaptation of parameters of the metaheuristic algorithms in order to optimize the results obtained in the problem to be used. A modification to the shadowed type-2 fuzzy inference system (FIS) was made by Linda and Manic [52], who indicated that the secondary axis of the generalized type-2 fuzzy system uses the shadowed sets to find the optimal α and β values, and thus use those values to find the α planes.

Trapezoidal ST2 MF
There are different types of membership functions that can be utilized in fuzzy systems. In this work, a decision was made, based on simplicity, to use the Trapezoidal (TrapG) membership function, in which the main characteristic is that it resembles the trapezoidal GT2 membership function, which is composed of a Gaussian-type function as a secondary membership function. Equation (7) contains the parameter values that were used for the membership function, and Figure 2 illustrates the graphical representation of the membership function.
With the goal of analyzing the importance of implementing a shadowed fuzzy logic system to solve real problems, the following Table 1 highlights some interesting works that use some implementation or variants of type-2 fuzzy logic systems. Applied to a real-world public transport problem Not Applied Ochoa, P. et al. [43] Interval Type-2 Fuzzy Logic System Find an optimal parameters of the algorithms studied. Fuzzy controllers Differential Evolution Algorithm

Metaheuristic Algorithms
At the present time, the use of metaheuristic algorithms for solving problems in different areas is very common, these algorithms are used is in order to optimize the results of the problems in which they are used. For this work, two algorithms are presented as well as their main operating characteristics and the equations involved in each of the algorithms for its implementation. The algorithms are: harmony search [53] and differential evolution [54]. Figure 3 illustrates the implementation in the control problem with the proposed use of shadowed type-2 fuzzy logic systems.

Harmony Search Algorithm
In the recent state of the art, there is a large number of metaheuristics, but this research focuses on the study of an algorithm that was created by Zong Woo Geem in 2001 [55]. In particular, this algorithm was inspired by musical composition imitating the behavior of an orchestra, and it has been implemented in its mathematical form using Equations (8)- (10) for the resolution of different problems in the real world.
X new = X old + bp (2 rand − 1) PArate = P Lower limit + P Range * rand Where P Range = P U pper Limit − P Lower Limit Using the HMR parameter, the HS algorithm performs memory consideration if 0 ≤ rand ≤ HMR and random selection if HMR ≤ rand ≤ 1. Based on the PArate parameter, HS performs pitch adjustment if 0 ≤ rand ≤ PArate and no change is made if PArate ≤ rand ≤ 1. The memory consideration has the following meaning: X new comes from HM. The random selection has the following meaning: X new comes from the total value range. The pitch adjustment has the following meaning: X new is further tweaked by adding delta (a small positive or negative value; if we want to use bp, we have to establish it first) once X new is obtained from the memory consideration.

Differential Evolution Algorithm
Differential evolution [56] has been utilized in different optimization areas, and this work is no exception; the algorithm is relatively simple and only consists of four stages in its development.
Population initialization is the first step to start the DE algorithm, which is composed of N-dimensional vectors and is defined by Equations (11)-(16): x i,g = x j,i,g , j = 0, 1, . . . , D − 1 (12) After creating the vectors with which the algorithm starts to work, we have to define the search space in which these vectors have an upper limit and a lower limit; this will depend on the problem to be used. This process is called initialization, and this is defined by Equation (17): More specifically, the differential mutation adds a random component to DE and the following equation illustrates how to mix three different vectors chosen randomly to create a mutant vector; this is shown in Equation (18): To complement the effect of the differential mutation search strategy, DE also uses uniform crossover. More specifically, DE crosses each vector with a mutant vector defined by Equation (19): The next step in the algorithm is to make the selection; in this process, a comparison is made between the mutated vector and the objective function. Equation (20) shows the selection process: The stopping criterion for the algorithm can occur when an optimal solution is found or when the termination criteria specified at the beginning of the algorithm are satisfied.

Dynamic Parameter Adaptation
For the present work, the two abovementioned algorithms (HS and DE) were considered for the dynamic parameter adaptation. A fuzzy system was designed and imple-mented for each of the algorithms, since each algorithm has a specific parameter to be dynamically moved.
The structure of the fuzzy systems was formed by one input and one output, and the specifications for each of the algorithms are separately shown below.
For the use of the HS algorithm, the iterations represent the input to the fuzzy system and the output is PArate, while for the DE algorithm, the generations represent the input, while Cr (crossover) represents the output.
The input of each of the fuzzy systems is calculated using Equation (21), where Current Test represents the current iteration or generation in the algorithm, which is divided by the maximum number of iterations or generations, which is called Maximum number of tests.
Equations (22) and (23) express the outputs of each of the HS and DE algorithms, respectively.
PArate symbolizes the pitch adjustment; r PArate symbolizes the number of rules of the shadowed type-2 system that correspond to PArate; PArate 1i symbolizes the output result for rule i with respect to PArate; µ PArate i is the membership function of rule i that corresponds to PArate.
where Cr is the crossover; r Cr is the number of rules of the shadowed type-2 system that correspond to Cr; Cr 1i is the output result for rule i that corresponds to Cr; µ Cr i is the membership function of rule i that corresponds to Cr.
The combination of the shadowed type-2 system with the HS algorithm is called ST2FHS2 in the simulations carried out in this work, and the combination of the shadowed type-2 system with the DE algorithm is called ST2FDE2.
Each fuzzy system has a structure of one input and one output. In this case, the input was composed of three membership functions as well as the output. The graphical representation of the input and output can be seen in Figures 4 and 5, respectively. The names of each of the membership functions are: Basic, Intermediate and Advanced, and are represented in Figure 6.

Controllers Optimization
Feedback control problems are very popular for testing the performance of an algorithm; therefore, this article uses a control case that is widely used in proportional integral (PI) and proportional integral derivative (PID) controllers, and the implementation in this work was carried out in a type-1 fuzzy controller, with the goal of validating the performance of the two proposed methods.

Methodology for Controller Optimization
This section explains in detail the implementation of a type-1 fuzzy controller to the cruise control system model. The cruise control controller is made up of trapezoidal and triangular membership functions, both at its two inputs and at its output. Equations (24) and (25) show the mathematical basis for the construction of each of these membership functions. In Table 2, the parameter values assigned to each linguistic variable inputs and the output are presented.
The structure of the type-1 fuzzy system for the controller is presented in Figure 7, the rules are presented in Table 3, and the control surface can be seen in Figure 8.
The two methods proposed in this article were implemented to carry out the optimization of the values of the membership functions of the type-1 fuzzy system implemented in the cruise control controller. In order to calculate the RMSE error of control, Equation (26) is used.  The type-1 system implemented for this controller contains a total of 45 points, where 25 points are fixed and 20 are optimized with each proposed method. The limits of the values for each linguistic variable for each input and output are illustrated in Table 4.

Cruise Control
Many modern vehicles have a feedback control system, the automatic cruise control system, which is a relatively simple device. The aim of the cruise control system to maintain a constant speed of the vehicle without being affected by external perturbations, such as the slope of the road or changes in the wind. To fulfill the main objective of the controller, the vehicle speed must be measured, comparing it with the reference speed and then adjusting the throttle based on a control strategy. Figure 10 represents the model of the vehicle dynamics, where the vehicle mass is actuated by a control force. For this controller, the parameters of the system are represented in Table 5.

Experiments
To check the performance of the proposed methods, a type-1 fuzzy system was implemented to a feedback control problem. In this case, the control problem is called cruise control. The main goal of this controller is to maintain a constant speed of 10 m/s in the vehicle regardless of the disturbances that may arise. All the experimentation in this work was developed in MATLAB [57].
Experiments were carried out without applying noise to the controller and applying a Gaussian noise of 0.5 percent, which represents 50 percent of the noise in the controller.
The results obtained for the ST2FHS2 and ST2FDE2 methods are shown in Tables 6 and 7, respectively. In these tables, the values that are analyzed (the minimum, maximum, average and standard deviation obtained from each method in 30 experiments) are presented. Just as the Z-value shown in Equation (27), which was obtained by performing the test statistic Z-test, the values of the parameters used in this test were as follows: level of significance 0.05, for all Z-values lower than −1.645.  Figure 11 shows the best simulation obtained with the HS and ST2FHS2 methods without noise in the controller and Figure 12 presents the best surface obtained from each of the aforementioned methods.   Figure 13 shows the best simulation obtained with the HS and ST2FHS2 methods with noise in the controller and Figure 14 presents the best surface obtained from each of the aforementioned methods.  The yellow lines in Figures 11 and 13 indicate the controller reference and the pink line indicates the value obtained from the best simulation found with each method. Figure 15 shows the best simulation obtained with the DE and ST2FDE2 methods without noise in the controller and Figure 16 presents the best surface obtained from each of the aforementioned methods.   Figure 17 shows the best simulation obtained with the DE and ST2FDE2 methods with noise in the controller and Figure 18 presents the best surface obtained from each of the aforementioned methods.  Figure 17 shows the best simulation obtained with the DE and ST2FDE2 methods with noise in the controller and Figure 18 presents the best surface obtained from each of the aforementioned methods.

Conclusions
The most important contribution of this article is the implementation of shadowed type-2 fuzzy logic in the HS and DE algorithms for dynamically moving the parameters The yellow line in Figures 15 and 17 indicates the controller reference and the pink line indicates the value obtained from the best simulation found with each method.

Conclusions
The most important contribution of this article is the implementation of shadowed type-2 fuzzy logic in the HS and DE algorithms for dynamically moving the parameters of PArate and Cr, respectively, as these parameters had not been previously dynamically moved for the solution of the above control problem. For this work, the control problem in which the testing was performed was also solved separately by each algorithm used.
For the HS algorithm, the analysis of the results shows that when comparing HS-FLC and ST2FHS2-FLC both without noise, the best results are 5.98 × 10 −1 and 6.60 × 10 −2 , respectively. It is clearly observed that there is a difference, and the statistical test shows that ST2FHS2-FLC without noise is lower on average than HS-FLC.
In the comparison of HS-FLC and ST2FHS2-FLC FLC with noise, the best results obtained are 3.58 × 10 −1 and 4.43 × 10 −2 , respectively, and in this paper, it is validated that the best result is ST2FHS2-FLC with noise. This comparison was verified statistically, proving that ST2FHS2-FLC with noise is better than HS-FLC.
Comparing DE-FLC and ST2FDE2-FLC without noise, the best results were 9.28 × 10 −1 and 7.59 × 10 −2 , respectively, and we can note that there is a difference between both results. The statistical test shows that ST2FDE2-FLC is better on average than DE-FLC without noise. The comparison of the algorithm using a noise level in the controller shows that the best results obtained for DE -FLC with noise is 3.00 × 10 −1 and for ST2FDE2 -FLC with noise is 7.05 × 10 −2 ; so, it is statistically possible to confirm that ST2FDE2 -FLC with noise it is better on average compared to DE -FLC with noise.
In general, the finding presented in this paper is that the proposal to adapt the PArate and Cr parameters for HS and DE algorithms combined with shadowed type-2 fuzzy logic produces a significant improvement over the original algorithms and demonstrates that the use of the proposed approach shows good results even when adding different noise levels to the controller. As future work, we envision the application of the proposed approach for the optimal design of fuzzy controllers for more complex problems, and also for different areas of application, such as image processing, control to the path of robots in simulations, or medical diagnosis.
Regarding the study of the shadowed type-2 fuzzy logic systems, one relevant conclusion is that the main limitation is the computer performance of the metaheuristic, because it is very important for the improvement of the efficiency of this method in its application. The main contribution in this work was that it put forward a way of reducing execution time, with the main goal to obtain good results. In this case, a control problem based on precision is implemented, which is the cruise control problem. This case study requires good stabilization to achieve the control goal in this problem.
In regard to future works, it would be interesting to observe and analyze the execution time and performance of the shadowed type-2 fuzzy logic systems when higher noise levels are considered in the control process.