Abstract
Type-2 fuzzy logic controllers are capable of handling different types of uncertainties that naturally exist in most practical situations. However, the high computation cost of type-2 fuzzy logic controllers is a bottleneck for practically applying them to real-world applications. This paper introduces a novel approach for designing a computationally effective type-2 fuzzy logic controller. For this purpose, on the antecedent side, interval type-2 fuzzy sets are employed to capture the signal readings, which significantly reduce the computation costs while preserving the major advantages of general type-2 fuzzy logic systems. On the consequent side, however, the Takagi-Sugeno-Kang (TSK) technique is integrated with the proposed controller to render the control outputs in a parallel way. To further reduce the computation cost, the theory of uncertainty bounds is employed for the output processing of the proposed controller. To develop this control structure, a decomposition technique is integrated to break down the original type-2 fuzzy processes into type-1 and take advantage of type-1 fuzzy techniques, followed by an aggregation mechanism to calculate the collective output. The approach is applied to the control of an inverted pendulum and cart model. The simulation results of the developed interval type-2 fuzzy logic controller is compared with a type-1 TSK fuzzy logic controller and a classical proportional derivative (PD) controller. From the results, we have found a 16.6% and 23.3% improvement in Root Mean Square (RMS) error compared to type-1 TSK fuzzy logic controller and classical PD controller, respectively.
Keywords
Introduction
When practically implementing a controller, real-world uncertainties challenge the modelling, analysis, and performance of controlled systems. The uncertainties may rise from several sources such as noise, precision of sensors and actuators as well as environmental conditions. Type-2 fuzzy logic systems (FLSs), initially developed by Zadeh [1, 2], are the extended versions of type-1 FLSs and are unique in their ability to model and handle uncertainties [3–5], while being able to deal with complex control structures and linguistic variables.
Nevertheless, despite the capabilities of a type-2 FLSs, efforts to use them for real-time control applications is relatively sparse and just recent [6–15]. The main challenge which hinders the application of type-2 FLSs for control applications is their large computation cost [16–22]. This computational cost can be best explained by the “curse of dimensionality”, the term used for the explosion of combinatorial calculations within the controller [23].
To facilitate the use of type-2 FLSs for control applications and reduce their computation cost, in this paper, we propose an interval type-2 Takagi-Sugeno-Kang (TSK) fuzzy logic controller (FLC) [24] incorporated with an aggregation approach inspired by the uncertainty bounds method. Interval type-2 FLSs [2, 25–28] reduce the computational complexity of the general type-2 FLSs, while preserving the major advantages of general type-2 FLSs, particularly, the ability of handling uncertainty [29–31]. To further reduce the computation cost, the proposed controller is integrated with the TSK technique [32–34]. By expressing fuzzy rule outputs as a function of the inputs, the TSK technique improves the processing time of FLSs and enables the parallel processing of the fuzzy rule outputs [32, 35]. Additional reduction in computation cost will be achieved by proposing an aggregation mechanism, which adopts the uncertainty bounds technique [36, 37]. The proposed algorithm ultimately requires little information (only the upper and lower bounds for the input membership functions and rule output constants) which significantly reduces the computation cost for calculating the output control signal.
Thus, the contributions of this paper are the development of a computationally effective interval type-2 fuzzy logic control structure that is capable of capturing input uncertainties and the development of an algorithm that can be used for the implementation of the proposed control structure. To capture input uncertainties, the proposed control structure utilizes interval type-2 fuzzy sets for describing the input space. Additionally, the control structure integrates interval type-2 antecedents with TSK rule outputs to enable parallel processing of rule outputs. Unlike many other type-2 fuzzy methods [3, 38–41], the proposed technique does not require type reduction of the output fuzzy set since it directly generates a type-1 output fuzzy set. By using only the upper and lower bounds of the firing levels and rule outputs coefficients, the proposed technique is able to calculate the output control signals. Compared to our preliminary results in [28], the proposed algorithm in this paper is more efficient as, instead of searching over all combination of lower and upper membership values to find the bounds of the output interval, we have integrated the proposed method with the uncertainty bounds aggregation method. Furthermore, to evaluate the performance of the proposed controller and its ability to capture input uncertainties, the fuzzy type-2 controller is applied to the position control of an inverted pendulum on a moving cart in a noisy environment. The simulation results of the proposed interval type-2 TSK fuzzy logic controller (IT2 TSK FLC) are then compared with a type-1 TSK FLC and a classical proportional derivative (PD) controller. The rest of this paper is organized as follows. Section 2 briefly discusses preliminaries and notations. Section 3 details the development of the proposed fuzzy type-2 controller and discusses its different parts including the input processing, rule sets, output processing, and uncertainty bounds aggregation. Section 4 demonstrates the simulation of an inverted pendulum on a moving using the proposed IT2 TSK FLC, a type-1 TSK FLC, and a proportional derivative (PD) controller. The paper is concluded in Section 5.
Preliminaries
The contribution of this paper is two fold. One, the paper designs an IT2 TSK FLC that has a satisfactory performance compared to the baseline controllers; and second, the paper presents a new decomposition method to easily incorporate an IT2 TSK FLC into the overall control design methodology. The proposed decomposition method also helps with explaining the operations of a complex fuzzy model. Before, discussing this decomposition technique, we first briefly reviews different types of fuzzy sets (FSs), particularly Interval Type-2 fuzzy sets, which are used throughout this paper.
A type-1 fuzzy set is composed of pairs of (x, μ A (x)), in which for each member of domain, x ∈ X, a membership value μ A (x) ∈ [0, 1] can be defined as follows:
Here, X is the universe of discourse and ∑ is the collection of elements of the set.
Even though type-1 fuzzy sets provide a degree of membership for all their elements, they are not capable of quantifying the level of uncertainty in the degree of membership [23]. The uncertainty in the degree of membership can be quantified using type-2 fuzzy sets [42–47]. Type-2 fuzzy sets can be defined as follows:
A type-2 fuzzy set is composed of triples
In general, using type-2 FLSs is computationally expensive. For reducing this computational burden, it is common to use interval type-2 FLSs. Interval type-2 FLSs significantly reduce the computation costs while maintaining major advantages of type-2 FLSs [29, 31].
An interval type-2 fuzzy set is a type-2 fuzzy set in which the secondary membership values of it’s elements are always unity and is defined as:
IT2 FSs can be further simplified by employing embedded IT2 FSs and embedded type-1 FSs, which next will be defined.
An embedded interval type-2 FS is an interval type-2 FS in which for all x ∈ X, the primary membership is a single value:
The following lemma describes that an IT2 FS can be expressed as the union of EIT2 FSs.
Any IT2 FS can be described by the collection of (infinite) EIT2 FSs as
We can further simplify EIT2 FSs by employing type-1 FSs, which can be defined as follows:
An embedded type-1 FS is an embedded interval type-2 FS in which the secondary membership values are dropped.
Any EIT2 FS can be expressed using its corresponding ET1 FS as
Combining Lemmas 1 and 2, the following theorem describes IT2 FSs based on ET1 FSs:
By using the above theorem, we can decompose an IT2 FS into type-1 FSs.
This section, discusses the internal structure and block diagrams of the proposed controller in detail. Figure 1 shows a typical feedback control loop in which we have used our developed IT2 TSK fuzzy logic controller.

Feedback control using IT2 TSK FLC.
The basic idea for developing the proposed IT2 TSK FLC is to use Theorem 1 to decompose interval type-2 fuzzy sets into type-1 fuzzy sets for which we can employ well-matured control techniques such as TSK FLCs to design the controller.
The block diagram of the proposed type-2 TSK FLC is shown in Fig. 2. For any set of crisp inputs, the Fuzzifier block converts the crisp inputs into fuzzy inputs. The Rule Base block contains a set of rules in the form of fuzzy If-Then statements, relating the inputs and outputs. Once the inputs are fuzzified, the Firing Level block calculates the firing levels based on the predefined input interval type-2 membership functions and the rule base. In parallel, the Rule Output block takes the crisp inputs and calculates rule outputs, based on the output membership functions and the rule base. The Aggregator block combines the firing levels and rule outputs into an aggregated type-1 fuzzy set. Finally, the Defuzzifier block converts the obtained type-1 fuzzy set into a crisp output value. This control process is detailed in the following sections.

The proposed IT2 TSK FLC structure.
Membership decomposition
The proposed IT2 FLC perceives the environment from a fuzzy perspective. The Fuzzifier block converts the control inputs (sensor readings), which are crisp values, to fuzzy values using the predefined fuzzy type-2 memberships. Here, we use IT2 fuzzy sets to describe the input space. Each input channel, X i , can be captured by n i membership functions (MFs) as follows:
where F i represents all interval type-2 membership functions related to input channel X i , including Fi,1, Fi,2,..., Fi,n i . The subscript j in Fi,j is used to indicate the jth individual MF in F i , as shown in Fig. 3.

IT2 MFs for input channel x i .
For simplicity, the secondary membership values are not shown as they are always unity. The distance between the upper and lower MFs represents the measurement uncertainty of the inputs and is referred as Footprint of Uncertainty (FOU).
Using lemma 1, each of the input interval type-2 MFs, Fi,j, can be broken down into a collection of EIT2 membership sets
where

Decomposed IT2 MFs to EIT2 MF.

A set of arbitrary choices of ET1 MFs.
The purpose of the Fuzzifier block is to map the crisp input variables to fuzzy values with memberships ranging from 0 to 1. An illustrative example shown in Fig. 6, which describes how crisp values x1 ∈ X1 and x2 ∈ X2 can be mapped to fuzzy values using the selected ET1 MFs, is discussed in Section 3.2.1. In Fig. 6a, the crisp value x1 belongs to

(a) Fuzzification of x1, (b) Fuzzification of x2.
Fuzzy rule base is a collection of conditional statements defining the outputs which have to be fired based on the fuzzified inputs. The rules may be constructed manually by an expert or by using data-driven machine learning algorithms [49, 50]. When creating the rules, specially using manual techniques, it is essential to have a previous knowledge about the system and its reactions to different sets of inputs. Rules of TSK FLSs have antecedents which are fuzzy sets and consequents which are functions of the inputs [32, 41]. In the proposed control technique, to capture input/output uncertainty, we use a first-order TSK FLS for which we represent antecedents using interval type-2 fuzzy sets and consequents using linear first-order polynomial functions of the inputs. A general multi-input-single-output type-2 TSK FLS rule with M rules, each having p antecedents, can be expressed as:
where Rℓ is the ℓth rule and F
p
ℓ is the activated anticident interval type-2 fuzzy set for input channel x
p
, which could be one of Fp,j, j=1, 2, … n
p
. In order to capture uncertainties in the outputs of of the FLC, the coefficients are interval type-1 fuzzy sets, bounded by

Rule output function constants for the ℓ th rule.
Interpreting these rules over IT2 MFs would not be easy. Therefore, instead of deriving the controller for these interval type-2 TSK fuzzy rules, we decompose the input membership functions into ET1 fuzzy sets and the output coefficients into crisp values, and interpret these rules over all possible choices of input ET1 fuzzy sets and crisp output coefficients, as described in the following sections.
For each rule, we should calculate the firing level. The firing level can be explained as the strength of a fuzzy rule or its influence over all rules based on the given inputs. For each rule, Rℓ, its corresponding firing level is calculated in the Firing Level block. As mentioned, we interpret these rules over decomposed ET1 fuzzy sets. For this purpose, the crisp inputs have to be fuzzified in the form of
For example, consider an FLS whose first rule, R1, is:
Also, consider the MFs of this FLS as Fig. 6. Now, for the selected ET1 MFs shown in Fig. 6a, the firing level of R1 can be calculated as:
Note that the firing levels are calculated using the antecedent part of the conditional statements in each rule. Next, we show how the consequent parts of the rules are used for calculating the rule outputs.
Similar to decomposing input memberships, we decompose type-1 output fuzzy sets into crisp values as shown in Fig. 8. For each coefficient

Decomposing the type-1 FSs of the output coefficients into crisp numbers.
Following this procedure, for an arbitrary selection of crisp coefficients
Performing the above procedure for all rules will result in crisp rule outputs y1′, y2′, ..., yM′ for rules Rℓ = 1, 2, ..., M, for the chosen set of crisp output coefficients.
The OutputProcessing block takes the rule outputs and their respective firing levels and calculates the weighted average output as follows:
where, fi′ is the firing level which was calculated in Section 3.4 and yi′ is the crisp rule output for the chosen crisp coefficients. Using Equation 11, it is possible to obtain a crisp output for a particular set of ET1 MFs and crisp output coefficients values. However, different choices of ET1 MFs and output coefficients results in different crisp outputs. Hence, the aggregated output will be the collection of all weighted outputs for all possible combinations of ET1 MFs and output coefficients. All input fuzzy sets and output coefficients are connected sets. Therefore, the collection of outputs for different choices of ET1 MFs and output coefficients form a connected IT1 fuzzy set, will be a connected set, bounded by y l and y r , as shown in Fig. 9.

The aggregated output for all possible choices of ET1 input MFs and output coefficients.
The lower bound y
l
can be calculated as follows:
where
where
In the above equations,
The question here is, what combination of minimum and maximum values of fi′ should be used to calculate y l and y r . One way to answer this question is to find all possible combinations of minimum and maximum values of fi′ (total of 2 M choices) to calculate y l and y r . This would require too much computation particularly for a large number of rules. Alternatively, we can find approximate values of y l and y r using the method of uncertainty bounds, which will be discussed in the next section.
To approximate the upper and lower bounds of weighted outputs, y
l
and y
r
, we integrate the uncertainty bounds technique introduced in [36]. The proposed control algorithm estimates y
l
and y
r
by calculating and averaging their respective upper and lower bounds values,

Visual overview of uncertainty bounds.
The inner upper and lower bounds (
where,
With the inner bounds calculated, the outer bounds,
The final step of developing the controller is to defuzzifiy the aggregated type-1 fuzzy set, which is shown in Fig. 11. The defuzzified crisp output is easily computed by taking the average of the upper and lower bounds, y
r
and y
l
, which were obtained in Equations 26 and 27, as follows:

Aggregated type-1 output fuzzy set and the defuzzified output, y.
The defuzzified crisp output, y, is then applied to the plant as a control input.
For the given set of control inputs, compute lower and upper bounds for the firing level of each rule (
For the given set of control inputs, compute lower and upper bounds for the rule outputs (
Compute the inner uncertainty bounds (
Compute the outer uncertainty bounds (
Compute the lower and upper bounds for the output signal. (y l and y r ) using (26) and (27).
Compute the output control signal, y, using (28).
Return output control signal, y.
Return uncertainty range, [y l , y r ].
Computing the crisp output for all (infinite) possible combinations of the decomposed ET1 input MFs and output coefficients is computationally expensive. However, as it was presented in Section 3.6 and Section 3.7, only the upper and lower bounds of input membership functions and the coefficients of output rules are required for calculating the crisp control output. This significantly reduces the computation cost and the processing time. Algorithm 1 describes an efficient way for generating the control output using the proposed control structure. To tune and enhance the control performance of the developed controller: The placement and shape of the interval type-2 membership functions, The rule output coefficients, The rule base, connecting the input and output parameters.
Similar to other fuzzy control techniques, tuning the input and output MFs can be performed manually based on the designer insight and experience, or it can be done automatically (e.g., using genetic algorithms, neural networks or other automated optimization techniques). In general, any system which can be controlled by a classical control system such as a PID, it can be controlled by the developed IT2 TSK fuzzy control system, with an improved performance, subjected to proper tuning. The other limitation is the required knowledge about the input and output uncertainty to be used in setting the foot print of uncertainty in input and output membership functions.
Simulations
In this section, we evaluate the performance of the developed IT2 TSK FLC by implementing it for the control of an Inverted Pendulum and a Cart System. The objective of the controller is to balance the inverted pendulum in a noisy uncertain environment by applying a control force to a moving cart that the pendulum is attached to. The inverted pendulum will fall down if the cart does not move appropriately to balance it. The model of the inverted pendulum on a cart is provided in Section 4.1. Section 4.2 details implementation of the developed IT2 TSK FLC to balance the inverted pendulum. To compare the performance of the developed IT2 TSK FLC, Sections 4.3 and 4.4 will employ a type-1 TSK FLC and PD controller to control the inverted pendulum. The simulation results for the developed IT2 FLC as well as those of type-1 TSK and PD controllers are discussed and compared in Section 4.5.
The model of an inverted pendulum carried by a cart system
An inverted pendulum on a cart, shown in Fig. 12, can be modeled as:

An inverted pendulum on a moving cart.
Physical properties of the inverted pendulum and cart
After substituting the physical properties stated in Table 1 in Eq. 29, the eigenvalues of the inverted pendulum and cart system are computed to be:
In order to simulate the real-world uncertainties, we have introduced noise, disturbance and unbalanced initial condition to the system. The noise introduced to the system is a uniform random noise added to the signal readings of φ and the actuator signal, F. The range and maximum amplitude of the noise injected to the system is stated in Table 2. The disturbance is applied to the actuator signal during the simulation time. Furthermore, the initial state of the inverted pendulum is deviated by φ (0) =0.25 rad from its equilibrium position. The applied disturbance is shown in Fig. 13. The initial conditions of the remaining state variables were set at,

Disturbance force applied to the cart.
Uncertainty ranges due to noise
The developed IT2 FLC was applied to the control of the inverted pendulum and cart system described in the previous section. The general control structure is shown in Fig. 14. The controller’s inputs are φ,

Interval type-2 TSK FLC.
In our design, as shown in Figures 15a and 15c, the memberships of φ and

(a) IT2 MFs for φ, (b) IT2 MFs for
The rule outputs are designed as:
where ℓ represents the number of rules, ℓ=1, 2, …, 75, and Q represents the label for output membership functions including VS, S, M, L and VL. Note that each rule output resembles a PD controller with c1 being the the proportional gain and c2 being the derivative gain. The upper and lower bounds for the coefficients of the rule outputs are obtained through optimization using genetic algorithms and are presented in Table 3.
IT2 TSK rule output coefficient bounds
The rule base for controlling the inverted pendulum and cart system using the developed IT2 TSk FLC is presented in Table 4.
Rule base for the inverted pendulum problem
Here, we compare the performance of the developed IT2 TSK FLC structure, with a type-1 TSK FLC. To make the comparison fair, the type-1 membership functions of the type-1 TSK FLC are set at the centers of the footprints of the IT2 MFs of the IT2 TSK FLC described in Section 4.2. These type-1 membership functions are shown in Fig. 16.

(a) Type-1 MF for φ, (b) Type-1 MF for
The rule outputs for the type-1 TSK FLC are expressed in the form:∥
Type-1 rule output coefficient bounds
The rule base which is used for the type-1 TSK FLC is the same rule base used for the IT2 TSK FLC, and is presented in Table 4. For obtaining the final crisp control output, weighted average defuzzification method is used.
The rule outputs of the IT2 TSK FLC are a function of φ and
The responses of the system when using the IT2 TSK FLC, type-1 TSK FLC, and classical PD controller are presented in Figures 17 and 18. From Fig. 17, we can observe that the IT2 TSK FLC handled uncertainties in ϕ as well as F and controlled the inverted pendulum smoother than the other two types of controllers. Even though the initial condition of the inverted pendulum was not at the equilibrium position, the IT2 TSK FLC was capable of stabilizing the system faster than the other controllers while maintaining the smallest overshoot and fastest settling time.

Pendulum angle (ϕ ) vs. Time.

Cart position (x) vs. Time.
When an external disturbance force shown in Fig. 13 was applied to the system, the results presented in Fig. 17 show that the IT2 TSK FLC returned the inverted pendulum back to its equilibrium position smoothly with the smallest overshoot, fastest rise time and fastest settling time than the other two controllers. Here, it can be observed that, in the presence of a disturbance, the type-1 TSK FLC controlled the system smoother than the classical PD controller.
The position of the cart throughout the simulation time is shown in Fig. 18. It is presented in Table 6 that the distance traveled by the cart for stabilizing the inverted pendulum throughout the simulation time is the shortest when the IT2 TSK FLC is used. In all the simulation results, even-though the IT2 TSK FLC performed better than the other two controllers, the type-1 controller performed better than the PD controller.
Distance (x) traveled by the cart
To quantify the performance improvement achieved by using the IT2 TSK FLC, we have calculated the Root Mean Square (RMS) error of the inverted pendulum throughout the simulation time. As presented in Table 7, the proposed IT2 TSK FLC has controlled the system with the least RMS error than type-1 TSK FLC or PD controller. From the simulation results, we have found a 16.6% and 23.3% improvement in RMS error when the proposed control structure is used instead of a type-1 TSK FLC or a PD controller, respectively.
RMS error for φ
In this paper, we developed a novel and computationally effective IT2 TSK FLC structure that is capable of capturing input uncertainties. Additionally, an algorithm that can be used for the implementation of the proposed control structure was presented. The developed control structure and algorithm exploits the ability of IT2 FLSs to measure and quantify uncertainties for generating an improved control output. For capturing uncertainties, the control structure utilizes IT2 fuzzy sets for describing the input space. Additionally, for enabling parallel processing of rule outputs, IT2 antecedents of the rules were integrated with TSK outputs. Furthermore, for making the developed control structure computationally effective, the type reduction process of the FLC was bypassed using the uncertainty bounds output processing technique.
Finally, for evaluating the performance of the developed IT2 TSK FLC, it was applied to the control of an inverted pendulum on a moving cart system in the presence of noise and disturbance. The simulation results were then compared with the results of a type-1 TSK FLC and a classical PD controller. From the simulation results, it was found that the developed IT2 TSK FLC was more stable and robust to external disturbances and noises than a type-1 TSK FLC or a PD controller. Future works include stability analysis of the developed control technique, extending the proposed method to a general type-2 TSK FLC as well as developing software libraries and toolboxes that can ease real-time implementation of the proposed control technique.
