Next Article in Journal
Differentiating the State Evaluation Map from Matrices to Functions on Projective Space
Previous Article in Journal
Multiverse as an Ensemble of Stable and Unstable Universes
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Applied Type-3 Fuzzy Logic System: Practical Matlab Simulink and M-Files for Robotic, Control, and Modeling Applications

1
School of Intelligent Manufacturing, Zhejiang Guangsha Vocational and Technical University of Construction, Dongyang 322100, China
2
Jiangsu Huibo Robot Technology Co., Ltd., Suzhou 215000, China
3
Multidisciplinary Center for Infrastructure Engineering, Shenyang University of Technology, Shenyang 110870, China
*
Authors to whom correspondence should be addressed.
Symmetry 2023, 15(2), 475; https://doi.org/10.3390/sym15020475
Submission received: 20 December 2022 / Revised: 2 February 2023 / Accepted: 8 February 2023 / Published: 10 February 2023
(This article belongs to the Section Engineering and Materials)

Abstract

:
In this paper, the main concepts of interval type-2 (IT2), generalized type-2 (GT2), and interval type-3 (IT3) fuzzy logic systems (FLSs) are mathematically and graphically studied. In representation approaches of fuzzy sets (FSs), the main differences between IT2, GT2, and IT3 fuzzy sets were investigated. For the first time, the simple Matlab Simulink and M-files by illustrative examples and symmetrical FSs are presented for the practical use of IT3-FLSs. The computations were simplified for the practical use of IT3-FLSs. By the use of various examples, such as online identification, offline time series modeling, and a robotic control system, the design of IT3-FLSs is elaborated. The required derivative equations are also presented to design the adaptation laws for the rule parameters easily in other learning schemes. Some simulation examples show that the designed M-files and Simulink work well and result in a good performance.

1. Introduction

Today, various usages of type-1, type-2, and type-3 FLSs are reported in the literature (shorturl.at/asMPS; click here to get access to Matlab codes), such as: clustering [1], control problems [2,3], identification and modeling problems [4], forecasting applications [5], performance evaluation systems [6], image processing [7], among many others.
To promote the efficiency of conventional FLSs, the IT2 and GT2 FLSs have been presented. Up to now, many learning algorithms and optimization techniques have been suggested to make FLSs more applicable. For example, in [8,9], the galactic swarm optimization approach was developed to adjust the rules of IT2-FLSs, and in a noisy robotic application, its efficiency was evaluated. In [10], by using T1 and IT2 fuzzy systems, a classifier was designed for the pulse level, practically implemented, and the better performance of IT2-FLSs in a practical environment was shown. In [11], the slime mold method was used for destining a T2-FLS-based controller, and some comparisons were provided to show the effectiveness of T2-FLSs. A decision-making system was designed in [12] using T2-FLSs, and it was shown that the T2-FLSs led to a good result in terms of sensitivity, flexibility, and stability. In [13], an application of T2-FLSs was investigated in the Internet of Things, and it was verified that T2-FLSs increase the packet transmission ratio and lifetime. In [14], a risk assessment approach was developed to evaluate the renewable energy sources, and the capability of T2-FLSs in large-scale problems was examined.
More recently, type-3 FLSs have been introduced to enhance the uncertainty modeling competency of T2-FLSs. In various applications, the efficiency of T3-FLSs has been examined. The concept of T3-FLSs for the first time was introduced by Ardashir M. Zadeh et al. in [15]. In this paper, it was shown that IT3-FLSs perform better in noisy real-world situations. In [16,17], a control application of T3-FLSs was presented, and the good accuracy of T3-FLSs was shown in a microgrid control problem. Under challenging circumstances such as time-variant and unknowable dynamics, the performance of the T3-FLS-based approach was tested. When compared to traditional management techniques, the recommended methodology performed better in terms of regulation since, unlike the approaches in question, all mathematical dynamics were taken to be unknown. In [2], some concepts of IT3-FLSs were summarized, and the main developments were reviewed. In [18], an IT3-FLS based controller was used to stabilize a 5G telecom, and by experimentally evaluating the superiority of IT3-FLSs in a noisy environment, its performance was confirmed. The suggested T3-FLS-based system is used in 5G base transceiver stations to effectively stabilize full-bridge converters and provide uninterrupted power to associated loads. In [19], another practical application of IT3-FLS was investigated. By an experimental scheme, the accuracy of an IT3-FLS-based controller was studied by applying it to DC converts. Due to their negative impedance requirements, power electronic devices are susceptible to instability while delivering steady power loads. The T3-FLSs are employed to ensure the stability of these devices. The instability problem was resolved by the T3-FLS-based controller, which also controls the output voltage’s reaction.
In [20], a clustering algorithm was designed based on IT3-FLSs, and the better efficiency of the IT3-FLS was proven by various benchmark data. This article presented a design process for Mamdani IT3-FLSs. The deep learning of T3-FLSs was studied in [21]. In this paper, a method for estimating CO2 solubility was introduced. This method was based on a novel deep learning T3-FLS. It was advised that the provided model be optimized using a hybrid learning approach. The purpose of the adaption laws is to fine-tune the rule parameters and membership function centers (MFs). A Kalman filter learns the level of the horizontal slices. The paper in [22] described a method for parameterizing T3-MFs that applies vertical cuts to the differential evolution algorithm’s dynamic parameter adaption and implemented in a T3 Sugeno controller. To enhance the performance of this technology as the generations pass, it was used for dynamic adaption. The best design for a T3-FLS-based controller was taken into consideration in order to evaluate the differential evolution algorithm. The parameterization of the controller’s T3-MFs was performed in this instance. To validate the effectiveness and conduct a comparison research with other papers in the literature, the experimentation was on the basis of distinct noise levels. The prediction ability of T3-FLSs was examined in [5]. This study made a COVID-19 forecast using a mix of a T3-FLS and fractal theory. In this instance, the COVID-19 issue was used to evaluate the time series geometrical complexity level using the fractal dimension. Utilizing the T3-FLS was primarily intended to handle uncertainty in predicting decision-making. A T3-FLS model with fuzzy if–then rules that uses the linear/non-linear dimension values as inputs and produces COVID-19 case predictions makes up the hybrid technique.
The contributions of this paper are as follows:
  • A type-3 FLS with simplified computations is presented.
  • The fundamental differences between various FLSs were analyzed in both theoretical and numerical approaches.
  • A simple Matlab implementation scheme is presented for practical applications.
  • A straightforward scheme is presented for designing the T3-FLSs.
  • Application of the T3-FLSs in online applications was simplified.
In the remainder of this paper, a general review is given in Section 2. The structure of T3-FLSs and the learning scheme are explained in Section 3 and Section 4. The Simulink and M-file implementations are given in Section 5 and Section 6. Finally, the simulations and conclusions are presented in Section 7 and Section 8.

2. General View

To have a general view of the difference between IT2, GT2, and IT3 fuzzy sets, an example is given in Figure 1. The secondary membership for a IT2-FS is a crisp value; GT2-FS is a type-1 FS, and IT3-FS is a type-2 FS. Then, the IT3-FSs can model a higher level of fuzziness and uncertainties than the IT2-FS and GT2-FSs. Furthermore, in the comparison of GT2-FSs and IT2-FSs, we see that the secondary membership in the GT2-FSs is a fuzzy number; however, in the IT2-FSs, it is a fixed number. Then, GT2-FSs have a better uncertainty modeling capability than IT2-FSs.
The other main difference is that the UB and LB of the footprint-of-uncertainty (FOU) in IT3-FSs are fuzzy numbers, but in IT2-FSs and GT2-FSs, they are crisp values. The FOU for three types of FS is depicted in Figure 2. Determining the upper/lower bounds of uncertainties is challenging in many problems. Then, the IT3-FSs can help us in situations where specifying the uncertainty range is a critical problem.
Consider the membership function (MF) M ˜ ; the various types of M ˜ in the sense of IT2, GT2, and IT3 are written as given in Table 1.
In Table 1, denotes the union on χ and p. As is seen from Table 1, the difference between the IT2-FS and GT2-FS is that the secondary MF is constant The difference between the interval and general type-2 MFs is the constancy of the secondary membership in the interval counterpart. In other words, in the IT2-FS, we have s M ˜ χ , p = 1 . In comparison with the type-3 FS, the secondary membership s M ˜ χ , p is a interval type-2 FS, and it is written as 1 / s M ˜ χ , p .

3. Proposed Type-3 FLS

The general scheme is given in Figure 3. The UB and LB for the FOU in the type-3 membership functions (MFs) are not specific values, but they are interval fuzzy sets. Furthermore, the SM is a type-2 MF. The computation is summarized below:
(1) In the first step, obtain the inputs. The inputs are denoted by χ i , i = 1 , . . . , n .
(2) As shown in Figure 3, each input χ i has Q i MFs. The j-th MF input χ i is denoted by M ˜ i j . Following this, the memberships (firing degrees) are computed for M ˜ i j . We have four primary memberships at each horizontal slice α k (secondary membership). Two values p ¯ r α i k and p ̲ r α i k denote the upper/lower bounds of the right side, and the two others p ¯ l α i k and p ̲ l α i k represent the upper/lower bounds of the left side. Following this, the memberships are computed for the suggested MF. The memberships for the MF, which are depicted in Figure 4, are computed as:
p ¯ i , r , α k = 1 χ i c M ˜ i j ϑ ̲ M ˜ i j Δ r ( 1 α k ) + 1 , i f c M ˜ i j ϑ ̲ M ˜ i j < χ i c M ˜ i j 1 χ i c M ˜ i j ϑ ¯ M ˜ i j Δ r ( 1 α k ) + 1 , i f M ˜ i j < χ i c M ˜ i j + ϑ ¯ M ˜ i j 0 i f χ i > c M ˜ i j + ϑ ¯ M ˜ i j o r χ i c M ˜ i j ϑ ̲ M ˜ i j
p ̲ i , r , α k = 1 χ i c M ˜ i j ϑ ̲ M ˜ i j 1 / ( Δ r ( 1 α k ) + 1 ) i f c M ˜ i j ϑ ̲ M ˜ i j < χ i c M ˜ i j 1 χ i c M ˜ i j ϑ ¯ M ˜ i j 1 / ( Δ r ( 1 α k ) + 1 ) i f M ˜ i j < χ i c M ˜ i j + ϑ ¯ M ˜ i j 0 i f χ i > c M ˜ i j + ϑ ¯ M ˜ i j o r χ i c M ˜ i j ϑ ̲ M ˜ i j
p ¯ i , l , α k = 1 χ i c M ˜ i j ϑ ̲ M ˜ i j Δ l ( 1 α k ) + 1 i f c M ˜ i j ϑ ̲ M ˜ i j < χ i c M ˜ i j 1 χ i c M ˜ i j ϑ ¯ M ˜ i j Δ l ( 1 α k ) + 1 i f M ˜ i j < χ i c M ˜ i j + ϑ ¯ M ˜ i j 0 i f χ i > c M ˜ i j + ϑ ¯ M ˜ i j o r χ i c M ˜ i j ϑ ̲ M ˜ i j
p ̲ i , l , α k = 1 χ i c M ˜ i j ϑ ̲ M ˜ i j 1 / ( Δ l ( 1 α k ) + 1 ) i f c M ˜ i j ϑ ̲ M ˜ i j < χ i c M ˜ i j 1 χ i c M ˜ i j ϑ ¯ M ˜ i j 1 / ( Δ l ( 1 α k ) + 1 ) i f M ˜ i j < χ i c M ˜ i j + ϑ ¯ M ˜ i j 0 i f χ i > c M ˜ i j + ϑ ¯ M ˜ i j o r χ i c M ˜ i j ϑ ̲ M ˜ i j
where c M ˜ i j is the center of M ˜ i j and ϑ ̲ M ˜ i j and ϑ ¯ M ˜ i j are the widths of the left and right side of M ˜ i j (see Figure 4). α k k = 1 , . . . , K represent the value of the horizontal slice. Δ r and Δ l represent the width of the MFs. Small values of Δ r and Δ l result in narrow shapes of the MFs.
(3) Considering the memberships of the UB and LB of MFs M ˜ i j , the rule firings are obtained as:
z ¯ r , α k h = s ¯ M ˜ 1 h 1 | r , α k χ 1 s ¯ M ˜ 2 h 2 | r , α k χ 2 . . . . s ¯ M ˜ n h n | r , α k χ n
z ̲ r , α k h = s ̲ M ˜ 1 h 1 | r , α k χ 1 s ̲ M ˜ 2 h 2 | r , α k χ 2 . . . . s ̲ M ˜ n h n | r , α k χ n
z ¯ l , α k h = s ¯ M ˜ 1 h 1 | l , α k χ 1 s ¯ M ˜ 2 h 2 | l , α k χ 2 . . . . s ¯ M ˜ n h n | l , α k χ n
z ̲ l , α k h = s ̲ M ˜ 1 h 1 | l , α k χ 1 s ̲ M ˜ 2 h 2 | l , α k χ 2 . . . . s ̲ M ˜ n h n | l , α k χ n
where k = 1 , . . . , K , M ˜ i h i denote the h i -th MF for input χ i . The h-th rule is given as:
I f x 1 i s M ˜ 1 h 1 , . . . , a n d . . . x n i s M ˜ n h n , t h e n y h Ψ ̲ l , h , Ψ ̲ r , h Ψ ¯ l , h , Ψ ¯ r , h
where Ψ ̲ l , h , Ψ ̲ r , h , Ψ ¯ l , h , and Ψ ¯ r , h are the rule parameters. At each rule, the output is an interval type-3 fuzzy number, in which, its LB and UB are also fuzzy numbers. In other words, the LB belongs to Ψ ̲ l , h , Ψ ̲ r , h , and the UB belongs to Ψ ¯ l , h , Ψ ¯ r , h .
(4) The simplest estimation of the output is suggested as:
y = k = 1 K ϕ ¯ k + ϕ ̲ k α k k = 1 K α k
where
ϕ ¯ k = h = 1 N z ¯ r , α k h Ψ ¯ r , k h + z ̲ l , α k h Ψ ̲ l , k h h = 1 N z ¯ r , α k h + z ̲ l , α k h
ϕ ̲ k = h = 1 N z ̲ r , α k h Ψ ̲ r , k h + z ¯ l , α k h Ψ ¯ l , k h h = 1 N z ̲ r , α k h + z ¯ l , α k h

4. Learning Approach

In many problems, the rule parameters can be tuned by using derivative-based optimization methods. In these effective algorithms, the derivative of the output of the FLS needs to be calculated with respect to the rule variables. In this section, these computations are presented. The derivatives are obtained as:
y Ψ ¯ r , k h = α k k = 1 K α k z ¯ r , α k h h = 1 N z ¯ r , α k h + z ̲ l , α k h
y Ψ ̲ l , k h = α k k = 1 K α k z ̲ l , α k h h = 1 N z ¯ r , α k h + z ̲ l , α k h
y Ψ ̲ r , k h = α k k = 1 K α k z ̲ r , α k h h = 1 N z ̲ r , α k h + z ¯ l , α k h
y Ψ ¯ l , k h = α k k = 1 K α k z ¯ l , α k h h = 1 N z ̲ r , α k h + z ¯ l , α k h

5. How to Use T3-FLSs in Matlab Simulink

A practical Matlab implementation scheme is suggested in this section. The suggested toolbox can be easily used for various applications. The suggested scheme is shown in Figure 5. The output signals include the output of the T3-FLS and the derivatives of the output of the T3-FLS with respect to the rule variables, which can be used in the tuning laws.
To illustrate how to use the designed toolbox easily, a simple example is presented as follows. Imagine a system with two inputs χ 1 and χ 2 . For input χ 1 , two MFs are considered as M ˜ 1 1 and M ˜ 1 2 . For input χ 2 , three MFs are considered as M ˜ 2 1 , M ˜ 2 2 , and M ˜ 2 3 . The horizontal slices are considered as α 1 = 0 , α 2 = 0.5 , and α 3 = 1 . For all MFs, the widths Δ r and Δ l are considered to be Δ r = 3 and Δ l = 2 , respectively (see (1)–(4)).
Now, assume the rules as follows:
  • If χ 1 is M ˜ 1 1 and χ 2 is M ˜ 2 1 , then y is y 1 Ψ ̲ l , 1 , Ψ ̲ r , 1 Ψ ¯ l , 1 , Ψ ¯ r , 1
  • If χ 1 is M ˜ 1 1 and χ 2 is M ˜ 2 2 , then y is y 2 Ψ ̲ l , 2 , Ψ ̲ r , 2 Ψ ¯ l , 2 , Ψ ¯ r , 2
  • If χ 1 is M ˜ 1 2 and χ 2 is M ˜ 2 2 , then y is y 3 Ψ ̲ l , 3 , Ψ ̲ r , 3 Ψ ¯ l , 3 , Ψ ¯ r , 3
  • If χ 1 is M ˜ 1 2 and χ 2 is M ˜ 2 3 , then y is y 4 Ψ ̲ l , 4 , Ψ ̲ r , 4 Ψ ¯ l , 4 , Ψ ¯ r , 4
where M ˜ i j is the j-th MF for i-th input. Therefore, in the designed toolbox, the information should be filled as follows (see Figure 6 and Figure 7):
  • Number of inputs: 2.
  • Centers for MFs: {{−1 1},{−1 0 1}}, which means c M ˜ 1 1 = 1 , c M ˜ 1 2 = 1 , c M ˜ 2 1 = 1 , c M ˜ 2 2 = 0 , and c M ˜ 2 3 = 1 .
  • Width of upper MFs: {{3 3},{3 3 3}}, which means Δ r = 3 , (see (1), and (2)).
  • Width of lower MFs: {{2 2},{2 2 2}}, which means Δ l = 3 , (see (3), and (4)).
  • Right distance: {{2 2},{1 1 1}}, which means ϑ ¯ M ˜ 1 j = 2 , j = 1 , 2 , and ϑ ¯ M ˜ 2 j = 1 , j = 1 , 2 , 3 (see (1)–(4)).
  • Left distance: {{2 2},{1 1 1}}, which means ϑ ̲ M ˜ 1 j = 2 , j = 1 , 2 , and ϑ ̲ M ˜ 2 j = 1 , j = 1 , 2 , 3 (see (1)–(4)).
  • Rules: [1 1;1 2;2 2;2 3], which means, in the first rule, M ˜ 1 1 and M ˜ 2 1 are fired, in the second rule, M ˜ 1 1 and M ˜ 2 2 are fired, in the third rule, M ˜ 1 2 and M ˜ 2 2 are fired, and finally, in the last rule, M ˜ 1 2 and M ˜ 2 3 are fired.
  • Alpha-cuts: [0 0.5 1], which means we have three horizontal slices and α 1 = 0 , α 1 = 0.5 , and α 1 = 1 .

6. How to Use T3-FLSs in Matlab M-File

To practically use the T3-FLSs in various problems, a simple M-file code is presented. A modeling example is presented to illustrate better how to use the designed code. The problem is considered as the modeling of y ( t ) in (17). The input variables were considered as y ( t 1 ) , y ( t 2 ) , and u ( t 1 ) . The signal u ( t ) is defined as sin 2 π n / 25 . The training/testing datasets are produced by t 0 , 4999 and t 5000 , 5299 , respectively.
y ( t ) = y ( t 1 ) y ( t 1 ) 0.5 y ( t 2 ) / 1 + y 2 ( t 1 ) + y 2 ( t 2 ) + u ( t 1 )
A Matlab function is presented as “out=Type3_FLS(u)”. For input “u”, the following information should be provided:
  • u.x denotes the vector of inputs. In this problem, the number of inputs is three, then at each epoch, u.x is a vector with three elements.
  • u.c represents the vector of centers of MFs; see (1)–(4). The centers are entered as illustrated in the previous section. In this problem, we have three inputs, and for each input, three MFs are considered. Then, u.c is defined as u.c={{−1 0 1},{−1 0 1},{−1 0 1}}.
  • u.au and u.al represent Δ r and Δ l ; see (1)–(4).
  • u.dr and u.dl represent the right and left distance of the center of MFs from the right and left points (see ϑ ¯ and ϑ ̲ in (1)–(4)).
  • u.rules represent the rules, which are defined similarly to the previous section. For this problem, three rules are defined. The i-th rule is defined as:
    If y ( t 1 ) is M ˜ 1 i , y ( t 2 ) is M ˜ 2 i , and u ( t 1 ) is M ˜ 3 i , then y ^ is y ^ i Ψ ̲ l , i , Ψ ̲ r , i Ψ ¯ l , i , Ψ ¯ r , i ; i = 1 , 2 , 3
Then, u.rules is defined as u.rules=[1 1 1;2 2 2; 3 3 3]:
  • u.alpha represents the value of the horizontal slice (see α in (1)–(4)). For this problem, just one slice is considered.
  • u.wuu, u.wll, u.wlu, and u.wul represent the vector of consequent parameters. u.wuu includes Ψ ¯ r , i , i = 1 , 2 , 3 ; u.wll includes Ψ ̲ l , i , i = 1 , 2 , 3 ; u.wul includes Ψ ¯ l , i , i = 1 , 2 , 3 ; u.wlu includes Ψ ̲ r , i , i = 1 , 2 , 3 .
In function “out=Type3_FLS(u)”, the signal “out” includes the estimated signal and the derivative of the output ( y ^ ) with respect to the parameters of the rules (u.wuu, u.wll, u.wlu, and u.wul).
By executing the main program, the rule parameters are optimized, and the estimated and real signals are given as Figure 8.

7. Simulation

In this section, two examples are provided, to better show the effectiveness of the designed scheme for type-3 FLSs.
Example 1. 
A simple simulation example is presented to show how to use the designed type-3 FLS. The suggested IT3-FLS is used to identify a chaotic system. The dynamics of the case study chaotic system is written as:
χ ˙ 1 = 10 χ 1 + 10 χ 2 χ ˙ 2 = χ 2 ( 28 χ 3 ) χ 1 χ ˙ 3 = 8 χ 3 / 3 + χ 2 χ 1
The inputs of the FLS were considered as χ 1 / 20 , χ 2 / 20 , and χ 3 / 40 . For each input, three MFs are considered. The centers of the MFs for the first and second inputs are in −1, 0, and 1 and for the third input are in 0, 0.5, and 1. The left and right width of the MFs’ first and second inputs are 2 and for the third MF is 0.5. The number of alpha-cuts is three, and the values of alpha-cuts are considered as 0, 0.5, and 1. The number of rules is three, then we have 12 consequent parameters.
The simulation diagram is depicted in Figure 9. The signals χ i , i = 1 , 2 , 3 are approximated by the IT3-FLS. The estimated trajectory χ ^ 1 and real signal χ 1 are shown in Figure 10. The estimated trajectory χ ^ 2 and real signal χ 2 are shown in Figure 11. The estimated trajectory χ ^ 3 and real signal χ 3 are shown in Figure 12. It is seen that the suggested Simulink block works well in online applications.
Example 2. 
In this example, the suggested T3-FLS is used in a control application [23]. The suggested T3-FLS is used for the online control of a robotic manipulator [24]. The dynamics are written as (see Figure 13):
H 11 H 12 H 21 H 22 q ¨ 1 q ¨ 2 + h q ˙ 2 h q ˙ 2 + q ˙ 2 h q ˙ 1 0 q ˙ 1 q ˙ 2 = τ 1 τ 2
H 11 = α 1 + 2 α 3 cos q 2 + 2 α 4 sin q 2 a H 12 = H 21 = α 2 + α 3 cos q 2 + α 4 sin q 2 H 22 = α 2 h = α 3 sin q 2 α 4 cos q 2 α 1 = I 1 + m 1 l c 1 2 + I e + m e l c e 2 + m e l 1 2 α 2 = I e + m e l c e 2 α 3 = m e l 1 l c e cos δ e α 4 = m e l 1 l c e sin δ e
The dynamics are rewritten as:
x ˙ 11 = x 12 x ˙ 12 = f 1 ( x 11 , x 12 , x 21 , x 22 , u 2 ) + g 1 ( x 11 , x 12 , x 21 , x 22 ) u 1 x ˙ 21 = x 22 x ˙ 22 = f 2 ( x 11 , x 12 , x 21 , x 22 , u 1 ) + g 2 ( x 11 , x 12 , x 21 , x 22 ) u 2 y 1 = x 12 , y 2 = x 22
where
x 11 = q 1 , x 12 = q ˙ 1 , x 21 = q 2 , x 22 = q ˙ 2 , u 1 = τ 1 , u 2 = τ 2
f 1 f 2 = H 11 H 12 H 21 H 22 1 h x 22 h x 22 + x 12 h x 12 0 x 12 x 22
g 1 = H 22 H 22 H 11 H 12 H 21 , g 2 = H 11 H 22 H 11 H 12 H 21
In this example, we want to show the applicability of T3-FLSs in an online control system. The suggested controller is given as:
u = g ^ 1 ( χ 2 ) f ^ ( χ 1 ) + y r ( n ) K T e
where f ^ ( χ 1 ) and g ^ ( χ 2 ) are T3-FLS, K is a positive vector, and e denotes the tracking error. T3-FLSs are used to estimate uncertainties. The parameters of T3-FLSs are tuned based on the following laws:
Ψ ¯ r , k h t + 1 = Ψ ¯ r , k h t + γ α k k = 1 K α k z ¯ r , α k h h = 1 N z ¯ r , α k h + z ̲ l , α k h e t
Ψ ̲ l , k h t + 1 = Ψ ̲ l , k h t + γ α k k = 1 K α k z ̲ l , α k h h = 1 N z ¯ r , α k h + z ̲ l , α k h e t
Ψ ̲ r , k h t + 1 = Ψ ̲ r , k h + γ α k k = 1 K α k z ̲ r , α k h h = 1 N z ̲ r , α k h + z ¯ l , α k h e t
Ψ ¯ l , k h t + 1 = Ψ ¯ l , k h + γ α k k = 1 K α k z ¯ l , α k h h = 1 N z ̲ r , α k h + z ¯ l , α k h e t
The simulation scheme is the same as Example 1. The trajectories of the outputs y 1 and y 2 are given in Figure 14. The output signals reach the reference signal r well in a short time. The signals y 1 and y 2 are reach r in less than 4 s. The control signals and errors are shown in Figure 15, Figure 16, Figure 17 and Figure 18. The signals u 1 and u 2 have good implementable shapes. There is no high-frequency fluctuation in signals u 1 and u 2 , as shown in Figure 15 and Figure 16. The fast reaching of the tracking errors e 1 and e 2 as shown in Figure 17 and Figure 18 to the zero level demonstrates the efficiency of the suggested T3-FLSs.
For future studies, the designed toolbox can be evaluated in machine learning applications [25], vibration control systems [26], optimization problems [26,27], mobile robots [28], and other engineering problems.

8. Conclusions

T3-FLSs have a significant potential for use in various uncertain modeling applications. However, there is no systematic approach to the design and use of T3-FLSs in practical applications. Therefore, in this paper, the simple and effective Matlab Simulink and M-files, by the illustrative and detailed examples, were given to implement the T3-FLSs. Furthermore, a comprehensive comparison was presented for various types of FLSs. Several graphical and mathematical examples were given to clarify the main differences. The computations of the memberships were simplified, and the derivative computations were presented to simplify the design of the adaptation laws. Two simulations demonstrated the usefulness of the T3-FLSs. In the first example, the suggested T3-FLSs were used for the identification of a chaotic system. The dynamics of the chaotic systems were considered fully uncertain like a black-box system. In the second example, the T3-FLS was used to design a simple controller. By the use of type-3 MFs, the linguistic variables were well converted to the mathematical equations, and by just two fuzzy rules, an effective fuzzy controller was designed. The simulation results demonstrated the effectiveness of T3-FLSs. It was shown that the T3-FLSs are a better choice in highly uncertain problems. Furthermore, the efficacy of the designed T3-FLSs in a control application was examined, and the good accuracy of the T3-FLSs was shown.

Author Contributions

Conceptualization, H.H., H.X., F.C., C.Z. and A.M.; methodology, H.H., H.X., F.C., C.Z. and A.M.; formal analysis, H.H., H.X., F.C., C.Z. and A.M.; writing—original draft preparation, H.H., H.X., F.C., C.Z. and A.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research is financially supported by the Ministry of Science and Technology of China (Grant No. 2019YFE0112400), the Department of Science and Technology of Shandong Province (Grant No. 2021CXGC011204).

Data Availability Statement

Not applicable. No new data were created or analyzed in this study.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Amador-Angulo, L.; Castillo, O.; Melin, P.; Castro, J.R. Interval Type-3 Fuzzy Adaptation of the Bee Colony Optimization Algorithm for Optimal Fuzzy Control of an Autonomous Mobile Robot. Micromachines 2022, 13, 1490. [Google Scholar] [CrossRef]
  2. Castillo, O.; Castro, J.R.; Melin, P. Interval Type-3 Fuzzy Systems: Theory and Design; Springer: Cham, Switzerland, 2022. [Google Scholar]
  3. Li, D.; Yu, H.; Tee, K.P.; Wu, Y.; Ge, S.S.; Lee, T.H. On time-synchronized stability and control. IEEE Trans. Syst. Man Cybern. Syst. 2021, 52, 2450–2463. [Google Scholar] [CrossRef]
  4. Zagui, N.L.S.; Krindges, A.; Lotufo, A.D.P.; Minussi, C.R. Spatio-Temporal Modeling and Simulation of Asian Soybean Rust Based on Fuzzy System. Sensors 2022, 22, 668. [Google Scholar] [CrossRef]
  5. Castillo, O.; Castro, J.R.; Melin, P. Forecasting the COVID-19 with Interval Type-3 Fuzzy Logic and the Fractal Dimension. Int. J. Fuzzy Syst. 2022, 25, 182–197. [Google Scholar] [CrossRef]
  6. Wu, Q.; Liu, X.; Qin, J.; Zhou, L. Multi-criteria group decision-making for portfolio allocation with consensus reaching process under interval type-2 fuzzy environment. Inf. Sci. 2021, 570, 668–688. [Google Scholar] [CrossRef]
  7. Leon-Garza, H.; Hagras, H.; Peña-Rios, A.; Conway, A.; Owusu, G. A type-2 fuzzy system-based approach for image data fusion to create building information models. Inf. Fusion 2022, 88, 115–125. [Google Scholar] [CrossRef]
  8. Bernal, E.; Lagunes, M.L.; Castillo, O.; Soria, J.; Valdez, F. Optimization of type-2 fuzzy logic controller design using the GSO and FA algorithms. Int. J. Fuzzy Syst. 2021, 23, 42–57. [Google Scholar] [CrossRef]
  9. Zhao, R.; Dai, H.; Yao, H. Liquid-metal magnetic soft robot with reprogrammable magnetization and stiffness. IEEE Robot. Autom. Lett. 2022, 7, 4535–4541. [Google Scholar] [CrossRef]
  10. Carvajal, O.; Melin, P.; Miramontes, I.; Prado-Arechiga, G. Optimal design of a general type-2 fuzzy classifier for the pulse level and its hardware implementation. Eng. Appl. Artif. Intell. 2021, 97, 104069. [Google Scholar] [CrossRef]
  11. Precup, R.E.; David, R.C.; Roman, R.C.; Szedlak-Stinean, A.I.; Petriu, E.M. Optimal tuning of interval type-2 fuzzy controllers for nonlinear servo systems using Slime Mould Algorithm. Int. J. Syst. Sci. 2021, 1–16. [Google Scholar] [CrossRef]
  12. Wan, S.P.; Chen, Z.H.; Dong, J.Y. An integrated interval type-2 fuzzy technique for democratic-autocrati multi-criteria decision making. Knowl.-Based Syst. 2021, 214, 106735. [Google Scholar] [CrossRef]
  13. Sennan, S.; Ramasubbareddy, S.; Balasubramaniyam, S.; Nayyar, A.; Abouhawwash, M.; Hikal, N.A. T2FL-PSO: Type-2 fuzzy logic-based particle swarm optimization algorithm used to maximize the lifetime of Internet of Things. IEEE Access 2021, 9, 63966–63979. [Google Scholar] [CrossRef]
  14. Pan, X.; Wang, Y. Evaluation of renewable energy sources in China using an interval type-2 fuzzy large-scale group risk evaluation method. Appl. Soft Comput. 2021, 108, 107458. [Google Scholar] [CrossRef]
  15. Mohammadzadeh, A.; Sabzalian, M.H.; Zhang, W. An interval type-3 fuzzy system and a new online fractional-order learning algorithm: Theory and practice. IEEE Trans. Fuzzy Syst. 2019, 28, 1940–1950. [Google Scholar] [CrossRef]
  16. Nabipour, N.; Qasem, S.N.; Jermsittiparsert, K. Type-3 fuzzy voltage management in PV/hydrogen fuel cell/battery hybrid systems. Int. J. Hydrogen Energy 2020, 45, 32478–32492. [Google Scholar] [CrossRef]
  17. Xu, W.; Qu, S.; Zhang, C. Fast terminal sliding mode current control with adaptive extended state disturbance observer for PMSM system. IEEE J. Emerg. Sel. Top. Power Electron. 2022, 11, 418–431. [Google Scholar] [CrossRef]
  18. Gheisarnejad, M.; Mohammadzadeh, A.; Farsizadeh, H.; Khooban, M.H. Stabilization of 5G telecom converter-based deep type-3 fuzzy machine learning control for telecom applications. IEEE Trans. Circuits Syst. II Express Briefs 2021, 69, 544–548. [Google Scholar] [CrossRef]
  19. Gheisarnejad, M.; Mohammadzadeh, A.; Khooban, M. Model Predictive Control-Based Type-3 Fuzzy Estimator for Voltage Stabilization of DC Power Converters. IEEE Trans. Ind. Electron. 2021, 69, 13849–13858. [Google Scholar] [CrossRef]
  20. Castillo, O.; Castro, J.R.; Melin, P. A methodology for building interval type-3 fuzzy systems based on the principle of justifiable granularity. Int. J. Intell. Syst. 2022, 37, 7909–7943. [Google Scholar] [CrossRef]
  21. Tian, M.W.; Mohammadzadeh, A.; Tavoosi, J.; Mobayen, S.; Asad, J.H.; Castillo, O.; Várkonyi-Kóczy, A.R. A deep-learned type-3 fuzzy system and its application in modeling problems. Acta Polytech. Hung. 2022, 19, 151–172. [Google Scholar] [CrossRef]
  22. Peraza, C.; Ochoa, P.; Castillo, O.; Geem, Z.W. Interval-Type 3 Fuzzy Differential Evolution for Designing an Interval-Type 3 Fuzzy Controller of a Unicycle Mobile Robot. Mathematics 2022, 10, 3533. [Google Scholar] [CrossRef]
  23. Duan, J.; Duan, G.; Cheng, S.; Cao, S.; Wang, G. Fixed-time time-varying output formation-containment control of heterogeneous general multi-agent systems. ISA Trans. 2023, in press.
  24. Wang, J.; Yang, M.; Liang, F.; Feng, K.; Zhang, K.; Wang, Q. An algorithm for painting large objects based on a nine-axis UR5 robotic manipulator. Appl. Sci. 2022, 12, 7219. [Google Scholar] [CrossRef]
  25. Dang, W.; Guo, J.; Liu, M.; Liu, S.; Yang, B.; Yin, L.; Zheng, W. A semi-supervised extreme learning machine algorithm based on the new weighted kernel for machine smell. Appl. Sci. 2022, 12, 9213. [Google Scholar] [CrossRef]
  26. Meng, Q.; Lai, X.; Yan, Z.; Su, C.Y.; Wu, M. Motion planning and adaptive neural tracking control of an uncertain two-link rigid–flexible manipulator with vibration amplitude constraint. IEEE Trans. Neural Netw. Learn. Syst. 2021, 33, 3814–3828. [Google Scholar] [CrossRef] [PubMed]
  27. Lu, S.; Guo, J.; Liu, S.; Yang, B.; Liu, M.; Yin, L.; Zheng, W. An improved algorithm of drift compensation for olfactory sensors. Appl. Sci. 2022, 12, 9529. [Google Scholar] [CrossRef]
  28. Wang, J.; Liang, F.; Zhou, H.; Yang, M.; Wang, Q. Analysis of Position, pose and force decoupling characteristics of a 4-UPS/1-RPS parallel grinding robot. Symmetry 2022, 14, 825. [Google Scholar] [CrossRef]
Figure 1. A general view on IT2, GT2, and IT3 fuzzy sets (some horizontal and vertical slices).
Figure 1. A general view on IT2, GT2, and IT3 fuzzy sets (some horizontal and vertical slices).
Symmetry 15 00475 g001
Figure 2. FOU for IT2, GT2, and IT3 fuzzy sets.
Figure 2. FOU for IT2, GT2, and IT3 fuzzy sets.
Symmetry 15 00475 g002
Figure 3. Suggested T3-FLS.
Figure 3. Suggested T3-FLS.
Symmetry 15 00475 g003
Figure 4. Type-3 MF.
Figure 4. Type-3 MF.
Symmetry 15 00475 g004
Figure 5. Simulink block.
Figure 5. Simulink block.
Symmetry 15 00475 g005
Figure 6. An example for designing MFs.
Figure 6. An example for designing MFs.
Symmetry 15 00475 g006
Figure 7. Information of the IT3-FLS.
Figure 7. Information of the IT3-FLS.
Symmetry 15 00475 g007
Figure 8. The estimated and real signals.
Figure 8. The estimated and real signals.
Symmetry 15 00475 g008
Figure 9. Example 1: simulation diagram.
Figure 9. Example 1: simulation diagram.
Symmetry 15 00475 g009
Figure 10. Example 1: the estimation performance of χ 1 .
Figure 10. Example 1: the estimation performance of χ 1 .
Symmetry 15 00475 g010
Figure 11. Example 1: the estimation performance of χ 2 .
Figure 11. Example 1: the estimation performance of χ 2 .
Symmetry 15 00475 g011
Figure 12. Example 1: the estimation performance of χ 3 .
Figure 12. Example 1: the estimation performance of χ 3 .
Symmetry 15 00475 g012
Figure 13. Example 2: the case study robotic arm.
Figure 13. Example 2: the case study robotic arm.
Symmetry 15 00475 g013
Figure 14. Example 2: tracking performance.
Figure 14. Example 2: tracking performance.
Symmetry 15 00475 g014
Figure 15. Example 2: control signal u 1 .
Figure 15. Example 2: control signal u 1 .
Symmetry 15 00475 g015
Figure 16. Example 2: control signal u 2 .
Figure 16. Example 2: control signal u 2 .
Symmetry 15 00475 g016
Figure 17. Example 2: tracking error e 1 .
Figure 17. Example 2: tracking error e 1 .
Symmetry 15 00475 g017
Figure 18. Example 2: tracking error e 2 .
Figure 18. Example 2: tracking error e 2 .
Symmetry 15 00475 g018
Table 1. Mathematical comparison of various type of MFs.
Table 1. Mathematical comparison of various type of MFs.
M ˜
GT2 χ X p J χ s M ˜ χ , p χ , p , J χ 0 , 1
IT2 χ X p J χ 1 χ , p , J χ 0 , 1
IT3 χ X p J χ 1 s M ˜ χ , p χ , p , J χ 0 , 1
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Huang, H.; Xu, H.; Chen, F.; Zhang, C.; Mohammadzadeh, A. An Applied Type-3 Fuzzy Logic System: Practical Matlab Simulink and M-Files for Robotic, Control, and Modeling Applications. Symmetry 2023, 15, 475. https://doi.org/10.3390/sym15020475

AMA Style

Huang H, Xu H, Chen F, Zhang C, Mohammadzadeh A. An Applied Type-3 Fuzzy Logic System: Practical Matlab Simulink and M-Files for Robotic, Control, and Modeling Applications. Symmetry. 2023; 15(2):475. https://doi.org/10.3390/sym15020475

Chicago/Turabian Style

Huang, Haiyan, Hui Xu, Fenghua Chen, Chunwei Zhang, and Ardashir Mohammadzadeh. 2023. "An Applied Type-3 Fuzzy Logic System: Practical Matlab Simulink and M-Files for Robotic, Control, and Modeling Applications" Symmetry 15, no. 2: 475. https://doi.org/10.3390/sym15020475

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop