1. Introduction
Type-3 fuzzy logic (T3FL) [
1,
2,
3,
4,
5] is a relatively recent research area and has not yet reached the same prominence as Type-1 and Type-2 fuzzy logic (T2FL) in terms of generalized applications, but it is gaining interest in various areas due to its ability to model complex and dynamic systems more accurately. Type-3 fuzzy logic is an extension of standard fuzzy logic that allows for more precise and flexible modeling of uncertainty and imprecision in complex systems [
6,
7,
8,
9,
10]. Unlike Type-1 and T2FL, T3FL is characterized by its ability to handle fuzzy sets with membership functions (MFs) that vary in time and space, making it particularly suitable for modeling dynamic systems, as is the case in this work, where T3FL is utilized to make a parameter of the harmony search (HS) dynamic; the parameters of the HS algorithm are usually static, and we seek to obtain better results, as we have achieved employing Type-1 and T2FL in previous works.
The ability of T3FL to handle fuzzy sets with membership functions that vary in time and space makes it especially suitable for a wide range of applications in engineering [
11,
12,
13,
14,
15], science, and other fields. Some of the current impacts and applications of T3FL include intelligent control systems, data analysis, recommendation systems, and information filtering, to name a few areas. An important area for our work is the utilization of T3FL in the field of control. T3FL is used to design controllers that can adapt to changing environmental conditions, adjusting their parameters based on real-time information. This allows for more robust and flexible control in situations where systems are nonlinear, unpredictable, or subject to abrupt changes [
16,
17,
18,
19,
20]. In fields such as robotics, industrial automation, and traffic control systems, T3FL is being explored to enhance the adaptability and responsiveness of systems to changing and variable conditions.
Spatial and temporal data analysis: In disciplines such as meteorology, climatology, and geography, where data are inherently spatial and temporal, T3FL is being used to model uncertainty and variability in data and make more accurate predictions. Recommendation systems and information filtering: In product, service, or content recommendation applications on online platforms, T3FL can be used to model preferences and tastes that may change over time and location, thus improving the relevance of recommendations.
Although still few, controllers based on Type-3 fuzzy logic have demonstrated their effectiveness in a variety of applications, including industrial process control systems, robotics, autonomous vehicles, and traffic control.
Among the various available metaheuristics, the combination of metaheuristics with fuzzy logic has gained significant attention in recent years. By integrating fuzzy logic with metaheuristics [
21,
22,
23,
24,
25], a wide range of optimization problems and decision-making in complex and dynamic environments can be addressed. These hybrid techniques enable the effective capture and handling of vagueness and ambiguity in data, as well as adaptation to changes in problem conditions and user objectives. Their potential and applications can be highlighted in various fields, from engineering and logistics to economics and medicine. The contribution of this work lies in demonstrating the innovative use of Type-3 fuzzy logic in parameter adaptation for the harmony search (HS) algorithm in designing optimal fuzzy controllers illustrated with the classic ball-and-beam problem in control theory. This problem involves stabilizing a ball on a moving beam using a suitable controller. The application of Type-3 fuzzy logic in parameter adaptation enhances the capability of the HS algorithm to find optimal solutions in a complex and high-dimensional search space. This results in improved efficiency and accuracy in designing fuzzy controllers for nonlinear control problems, like the one considered in this case. The novelty of this work lies in the utilization of the emerging technique of Type-3 fuzzy logic for optimal design of fuzzy controllers. In general, the utilization of metaheuristics is currently being explored to validate their significance in control problems, and this work that is considering a Type-3 fuzzy HS approach is a novel contribution in this research direction.
The following sections are organized in the following order: the theory of operation of the original HS algorithm method is outlined in
Section 2, the construction and theory of the proposed fuzzy HS method are shown in
Section 3, the case study used for experimentation is found in
Section 4, the construction and implementation of the Type-1 fuzzy controller of the ball and beam are illustrated in
Section 5, results and statistical tests are found in
Section 6, and in
Section 7, we draw our conclusions.
3. Fuzzy Harmony Search Algorithm
The HS algorithm using fuzzy logic is an innovative technique. Through fuzzy logic, this algorithm models the uncertainty and inherent imprecision in many real-world problems, allowing for a more flexible and adaptive search for solutions.
Harmony search using fuzzy logic has been successfully applied in a variety of fields, including mathematical function optimization, route planning, resource allocation, and decision-making in uncertain environments. Its intuitive approach and ability to handle uncertainty make it especially suitable for complex problems where exact solutions may be difficult to attain.
Considering the above, it is proposed to utilize a Type-3 fuzzy system to dynamically adapt the HMR parameter of the HS algorithm. The proposed fuzzy system for this work contains one input and one output, and this structure can be observed in
Figure 1. The rules used operate in decrement and are expressed in
Table 1, and the surface of the IT3FHS is depicted in
Figure 2. The combination of T3FL and the HS algorithm will be referred to as IT3FHS in this work.
The Type-3 fuzzy system depicted in
Figure 1 comprises a single input and output. Both the input and output of the fuzzy system are partitioned into three membership functions: low, medium, and high. The utilized membership function is named ScaleTriScaleGaussIT3MF, depicted in
Figure 3, with its mathematical representation presented in Equation (4).
Figure 3 solely illustrates the representation of the membership function employed in the Type-3 fuzzy system.
The Type-3 triangular membership function, denoted as
= ScaleTriScaleGaussIT3MF, is defined by a triangular First-Order Uncertainty
with parameters
for the Upper Membership Function (UMF) and
,
for the Lower Membership Function (LMF) to create the Dual-Order Uncertainty
]. The vertical slices
represent the
which are interval Type-2 fuzzy sets (IT2 FS) with Gaussian interval Type-2 membership function (IT2 MF)),
with parameters
for the UMF and λ,
for the LMF. The interval Type-3 membership function (IT3 MF)
ScaleTriScaleGaussIT3MF(x,{{[
]},
,
} is defined by the following expressions:
The LMF of the DOU,
, is defined by
, where these are a function of the parameters
, of the UMF of the DOU,
, and the elements of the vector
. Namely,
The function
is multiplied by
to form the LMF of the DOU,
, described as
. Then,
and
are the DOU upper and lower limits. The range,
, and radius,
, of the FOU are:
The apex or core,
, of the IT3 MF
is formulated by equations:
where
and
. Then, vertical cuts with IT2 MF
are described by the expressions:
where
and
Assuming
, then
.
5. Ball-and-Beam Type-1 Fuzzy Controller
In constructing the ball-and-beam Type-1 fuzzy controller (BBFLC), we employed the generalized bell-shaped membership function (gbell mf). This function calculates fuzzy membership values using:
This controller has four inputs, denoted as r, d/dt r, alpha, and d/dt alpha, which are combined into two generalized bell-shaped MFs. The outputs are 16 linear functions. The parameters
a,
b, and
c used to configure the membership function for this controller are presented in
Table 3. This controller follows the Takagi–Sugeno type and employs 15 fuzzy rules, detailed below.
1. If (r is Neg) and (d/dt r is Neg) and (Alpha is Neg) and (d/dt Alpha is Neg), then (0ut is outmf1).
2. If (r is Neg) and (d/dt r is Neg) and (Alpha is Neg) and (d/dt Alpha is Pos), then (0ut is outmf2).
3. If (r is Neg) and (d/dt r is Neg) and (Alpha is Pos) and (d/dt Alpha is Neg), then (0ut is outmf3).
4. If (r is Neg) and (d/dt r is Neg) and (Alpha is Pos) and (d/dt Alpha is Pos), then (0ut is outmf4).
5. If (r is Neg) and (d/dt r is Pos) and (Alpha is Neg) and (d/dt Alpha is Neg), then (0ut is outmf5).
6. If (r is Neg) and (d/dt r is Pos) and (Alpha is Neg) and (d/dt Alpha is Pos), then (0ut is outmf6).
7. If (r is Neg) and (d/dt r is Pos) and (Alpha is Pos) and (d/dt Alpha is Neg), then (0ut is outmf7).
8. If (r is Neg) and (d/dt r is Pos) and (Alpha is Pos) and (d/dt Alpha is Pos), then (0ut is outmf8).
9. If (r is Pos) and (d/dt r is Neg) and (Alpha is Neg) and (d/dt Alpha is Neg), then (0ut is outmf9).
10. If (r is Pos) and (d/dt r is Neg) and (Alpha is Neg) and (d/dt Alpha is Pos), then (0ut is outmf10).
11. If (r is Pos) and (d/dt r is Neg) and (Alpha is Pos) and (d/dt Alpha is Neg), then (0ut is outmf11).
12. If (r is Pos) and (d/dt r is Neg) and (Alpha is Pos) and (d/dt Alpha is Pos), then (0ut is outmf12).
13. If (r is Pos) and (d/dt r is Pos) and (Alpha is Neg) and (d/dt Alpha is Neg), then (0ut is outmf13).
14. If (r is Pos) and (d/dt r is Pos) and (Alpha is Neg) and (d/dt Alpha is Pos), then (0ut is outmf14).
15. If (r is Pos) and (d/dt r is Pos) and (Alpha is Pos) and (d/dt Alpha is Neg), then (0ut is outmf15).
Figure 5 shows the structure of the four inputs of the Type-1 ball-and-beam fuzzy logic controller.
The surface of the BBFLC is illustrated in
Figure 6.
6. Simulations Results and Statistical Test
In this section, the results with the IT3FHS method, which optimizes the parameters of the four inputs of the Type-1 ball-and-beam controller, are presented. Two experiments were conducted to validate the method: (1) without noise to the BBFLC and (2) applying Gaussian noise of 0.09 to the BBFLC. Six metrics were used to measure the error index of the BBFLC controller as shown in the following equations. The objective function is given by the root mean square error (RMSE).
In a control problem, RMSE, Integral of Time-weighted Absolute Error (ITAE), Integral of Time-weighted Squared Error (ITSE), Integral of Absolute Error (IAE), and Integral of Squared Error (ISE) represent different metrics used to evaluate the performance of a controller relative to a desired reference.
Thirty simulations were performed for each experiment. The configuration of the fixed parameters utilized in the experimentation are the following: one hundred iterations, PArate at zero point seventy-five, and thirty harmonies. The results obtained from Experiment 1 are presented in
Table 4 and from Experiment 2 in
Table 5.
Table 4 shows the results obtained for Experiment 1, which consists of calculating the different metrics used. The main characteristic of the experimentation is the use of the controller, but without applying noise. We can observe that the RMSE is very good, showing the average difference between the output of the controller and the desired reference over time. The simulation indicates that the result of the experimentation is good.
The graphical representation of the best simulation when using the method without noise is presented in
Figure 7.
In
Figure 7, the blue line shows the desired reference of the BBFLC controller, while the pink dashed line between lines shows the reference obtained from the proposed controller without noise.
For Experiment 2, the following characteristics are observed: the main one is the application of noise in the controller, with an error of 0.09. This error is higher than the error used in the comparisons that will be made later. The results show better stability using RMSE, as seen in
Figure 8, where the average difference between the output of the control system and the desired reference over time is more stable. We emphasize that the level of noise is higher.
The graphical representation of the best simulation when using the method with noise is presented in
Figure 8.
In
Figure 8 the blue line shows the desired reference of the BBFLC controller, while the pink dashed line between lines shows the reference obtained from the proposed controller with noise.
Figure 9 represents the comparison of the best simulation without noise and with noise in the BBFLC controller.
In
Figure 9, the blue line shows the desired reference of the BBFLC controller, while the solid red line between lines shows the reference obtained from the proposed controller without noise, and the green dashed line shows the reference obtained from the proposed controller with noise.
To confirm the substantial evidence in the simulation results, it is suggested to employ a statistical Z-test (refer to Equation (18)). The Z-test parameters include a significance level of 0.05, a 95% confidence level, and values below −1.645. Here,
represents the proposed method, and
represents the method under comparison.
The statistical comparison between the results obtained from Experiments 1 and 2 is shown in
Table 6.
The statistical test conducted compares the use of the proposed algorithm, the HS algorithm using T3FL, to dynamically adjust the HMR parameter. Two scenarios are presented: one without applying noise in the controller and another applying a level of noise in the controller. The mean of RMSE cases as well as the standard deviation are utilized.
The Z statistical test confirms that the utilization of noise applied in the controller improves the results utilizing the IT3FHS approach. This means that there is statistical evidence to affirm that better results are obtained when the level of uncertainty is higher using Type-3 fuzzy logic.
As mentioned earlier, this work is a continuation of previous research, where this Type-1 ball-and-beam controller is used to validate different proposals for dynamically adjusting parameters of the original HS algorithm (HS). The article presents three variants of the FHS algorithm: Type-1 (IT1FHS), interval Type-2 (IT2FHS), and general Type-2 (GT2FHS). This article proposes the use of T3FL (IT3FHS) for parameter adaptation of HS. The following
Table 7 shows a comparison of the results, and
Table 8 presents a statistical comparison between the results obtained from the proposed Experiment 1 and GT2FHS.
To confirm the assertion of the statistical test conducted in
Table 6, a comparison is made between the best result obtained in our proposal and the results obtained in a previous work where all different variants of fuzzy logic are considered. It is worth noting that for this comparison, no noise is applied in the controller. Considering the comparisons, we can observe that the RMSE metric shows better stability using IT3FHS. Regarding the ITAE metric, the IT1FHS and IT2FHS methods are better, indicating a faster system response to reach the desired value. Regarding ITSE, it can be observed that GT2FHS has the best result, indicating a greater emphasis on early errors in the system response. For IAE, the best result is obtained by IT3FHS, which measures the total magnitude of accumulated error over time. Lastly, ISE also has a better result with IT3FHS, which also measures the total magnitude of accumulated error over time but squared.
A statistical test is conducted to validate the proposed methodology IT3FHS, and the method that yielded the best results in the reference used in
Table 7, which was GT2FHS, is selected. Considering the averages and standard deviations, a Z-test is performed.
Table 8 shows the results obtained when applying the statistic.
Table 7 demonstrates from the results obtained in the statistical test that the IT3FHS proposal does not have a lower error than GT2FHS. It should be noted that this statistical test is conducted without applying noise to the controller.
The following
Table 9 contains a comparison with different variants of fuzzy logic applying a noise of 0.05 to the controller, and the last column contains the results of our proposal applying a noise of 0.09 to the controller.
Another comparison conducted is with previous work using noise in the controller. For the comparison in
Table 9, it is important to mention that we previously used a noise of 0.05 in the experimentation, while in this work, a noise of 0.09 is used. The results show that for the RMSE metric, our IT3FHS proposal has the lowest error. The same applies to the ITAE, IAE, and ISE metrics. However, for the ITSE metric, GT2FHS has the lowest error.
Selecting the two methods with the best results, GT2FHS and IT3FHS, from
Table 9, a Z-test was performed to validate the proposal.
Table 10 presents the means and standard deviations of the two mentioned methods.
The result of the Z-value demonstrates that there is significant evidence indicating that IT3FHS has a lower error than GT2FHS. With the result of the statistical test, we confirm that our proposal yields good results.
7. Conclusions
First, we highlight the significant contribution of utilizing Type-3 fuzzy logic to dynamically adjust the HS parameter, referred to as IT3FHS. Currently, there is limited literature utilizing Type-3 fuzzy logic in applications, making the proposed methodology noteworthy, as it is one of the first works on applying a Type-3 fuzzy HS in optimal control design. The proposed approach was applied to a control problem involving the ball and beam, employing a Sugeno-type fuzzy controller.
The experimentation was conducted under two conditions: with and without the application of noise. A noise level of 0.09 was introduced to assess the efficacy of Type-3 fuzzy logic. The experimental setup was complemented by various statistical tests, which indicated that IT3FHS yielded better results under conditions of increased uncertainty. However, when no noise was present in the controller, there was not sufficient statistical evidence to conclude that IT3FHS exhibited lower error. Nevertheless, the results remained competitive. It is noteworthy that this confirms the fact that higher types of fuzzy logic are theoretically expected to manage higher degrees of uncertainty, which in this case corresponds to the noisy situations in the control, which is when the Type-3 approach was able to show significant evidence of being better.
Furthermore, we validated the IT3FHS method through comparison with previous studies utilizing Type-1, interval Type-2, and general Type-2 fuzzy controllers. These comparisons were made under both noise-free and noise-introduced conditions (with a noise level of 0.05). Despite the higher noise level considered in this work, statistical analysis demonstrated that our proposed method outperformed all previous variants.