Data-Driven Interval Type-2 Fuzzy Inference System Based on the Interval Type-2 Distending Function

Fuzzy type-2 modeling techniques are increasingly being used to model uncertain dynamical systems. However, some challenges arise when applying the existing techniques. These are the following: 1) a large number of rules are required to complete cover the whole input space; 2) a large number of parameters associated with type-2 membership functions have to be determined; 3) the identified fuzzy model is usually difficult to interpret due to the large number of rules; and 4) designing a fuzzy type-2 controller using these models is a computationally expensive task. To overcome these limitations, a procedure is proposed here to identify the fuzzy type-2 model directly from the data. This model is called the distending-function-based fuzzy inference system (DFIS). This model consists of rules and interval type-2 distending functions. First, a few key rules are identified from the data, and later, more rules are added until the error is less than the threshold. The proposed procedure is used to model the altitude controller of a quadcopter. The performance of the DFIS model is compared with that of various fuzzy models. Furthermore, a simplified procedure based on the rules is presented to design a computationally low-cost type-2 controller. The effectiveness of the controller is shown by regulating the height of a quadcopter in the presence of noisy sensory data. The performance of this controller is compared with that of various other controllers. Finally, the proposed type-2 controller was implemented on a Parrot Mambo quadcopter to demonstrate its real-time performance.


I. INTRODUCTION
F UZZY theory has found numerous practical applications in the fields of engineering, operational research, and statistics [1], [2], [3]. The fuzzy inference engine consists of a fuzzifier, a rule base system, fuzzy operators, and defuzzification. These rules describe the dependencies between the input and output variables in the form of IF-THEN statements. In this article, we considered a special case where the expert knowledge in the form of linguistic rules is not available or it is poorly described. For example: 1) if the system under consideration is so complex that it cannot be described using linguistic fuzzy rules; 2) experts who can describe the system using the linguistic fuzzy rules are not available. In this case, data-driven fuzzy modeling and control is the only feasible option [4], [5], [6]. There are two main types of fuzzy inference systems: Mamdani systems [7] and Sugeno systems [8]. Fuzzy modeling involves the identification of fuzzy rules and parameter values from the data for either of these two types of inference systems. The data-driven identification of a fuzzy model can be divided into two parts, namely, qualitative and quantitative identification. Qualitative identification focuses on the number and description of fuzzy rules, while quantitative identification is concerned with the identification of parameter values. These parameters belong to membership functions and fuzzy operators. In one of the latest papers, Duţu et al. [9] investigated the qualitative identification in detail for Mamdani-like fuzzy systems. A parameterized rule learning technique called selection reduction was introduced. The number of rules was optimized by dropping some rules based on the rule redundancy index. This technique is called precise and fast fuzzy modeling approach. Ying and Lin [10] presented the first ever self-learning fuzzy model for discrete event systems. Stochastic gradient descent optimization was used to learn the event transition matrix and the parameters of multidimensional Gaussian fuzzy sets. The theoretical developments were supported by MATLAB simulations for learning the automaton's parameter values. Quite recently, Mendel et al. [11] determined the relationship between explainable artificial intelligence (AI) and fuzzy rule-based systems. It was established that the shape of antecedent membership function, linguistic approximations, and similarity are essential for the explainable AI.
In Sugeno-type systems, soft computing methodologies like evolutionary algorithms, genetic algorithms (GAs), and particle swarm optimization are used for qualitative identification [12], [13], [14], [15]. Neural networks are mostly used in quantitative identification. These lead to the development of adaptive neurofuzzy inference systems (ANFISs) [16]. ANFIS is the most popular and widely used technique for fuzzy modeling. Different variants of the ANFIS model have been developed using various types of optimization techniques [17], [18], [19]. Harifi et al. [20] proposed a new type of ANFIS model by using a novel emperor penguin colony (EPC) optimization method. EPC is a recently introduced, nature-inspired, and population-based metaheuristic This  algorithm. It was shown that the ANFIS model based on EPC can solve various prediction and classification problems with high accuracy compared with the existing ANFIS-type models. However, all these abovementioned methods have some limitations related to the qualitative identification, quantitative identification, and rule interpretability.
Type-2 fuzzy systems (T2FSs) were developed to handle the uncertainty in type-1 fuzzy sets [21], [22]. There are always uncertainties associated with the real-world physical systems. The source of these uncertainties can be the variations in the parameters with time or external noise/disturbances acting on the system. As the membership value of the type-1 system is crisp, these uncertainties cannot be modeled by the type-1 fuzzy models. Therefore, the T2FSs are employed in practice to accurately model uncertainties. However, the computational complexity associated with the quantitative and qualitative identification steps of the data-driven type-2 fuzzy modeling techniques is very high. T2FSs are based on type-2 membership functions (T2MF). The T2MF contains the footprint of uncertainty (FOU) between the upper membership function (UMF) and the lower membership function (LMF). Interval type-2 fuzzy systems (IT2FSs) have been developed to reduce the computational complexity [23]. The T2FS has superior properties such as: 1) better handling of uncertainties [24]; 2) smooth controller response [25]; 3) adaptivity [25]; and 4) reduction in the number of fuzzy rules [26]. Abiyev and Kaynak [27] proposed a novel type-2 Takagi-Sugeno-Kang fuzzy neural system to control the time-varying processes. The parameters of the rules were updated using the fuzzy clustering and gradientbased algorithm. T2FSs have been successfully used in various control system applications [28], [29], data mining [30], and time-series predictions [31]. Naderipour et al. [32] used the T2FS for community detection in large social networks. The methodology was based on possibilistic c-means clustering with two-layer graphs. Cuevas et al. [33] developed a type-2 control system for controlling an omnidirectional autonomous robot in unstructured environment with unknown obstacles. The recent trends in theoretical and practical implementation of T2FS are summarized in [34]. The design of the IT2FS consists of the following: 1) fuzzification of the inputs using the T2MF; 2) calculation of the rule firing strengths; 3) implication and aggregation to produce rule outputs. These operations produce a type-2 fuzzy set; 4) type reduction to convert type-2 fuzzy sets into type-1 fuzzy sets; 5) defuzzification to get a final crisp output value. The type-reduction step is performed using the so-called Karnik-Mendel (KM) iterative algorithm [35]. This algorithm defines two switching points for the lower and upper firing strengths. Using these points, the algorithm generates two type-1 fuzzy sets. These sets are then defuzzified to get a crisp output. This approach has some drawbacks, such as: 1) the choice of T2MFs; 2) the computational complexity of the type-reduction step; 3) difficulties in the optimization process; and 4) controller design complexity. Quite recently, several techniques have been proposed to tackle these problem [36], [37], [38]. Mendel and Bonissone [11] proposed an efficient methodology for optimal type reduction under stability considerations for fuzzy-modelbased control techniques. The methodology was membership function dependent and was based on deep reinforcement learning. Le [39] presented a self-evolving functional-link type-2 fuzzy neural network (SEFIT2FNN). It uses the particle swarm optimization method to adjust the learning rate of the adaptive law. The adaptive law tunes the parameters of the type-2 fuzzy neural network. The SEFIT2FNN has been shown to successfully control the antilock braking system under various road conditions. Mohammadzadeh et al. [40] moved a step further by proposing an interval type-3 fuzzy system (IT3FS). The membership values in the IT3FS are not crisp values, but those in IT2FS are crisp. An online fractional-order learning system has been presented to tune the consequent parameters. It was shown using the simulation studies that the accuracy of the proposed IT3FS is much higher than the IT2FS and the type-1 systems. The results were compared with those of other recently published techniques, including SEFIT2FNN. However, the computational complexity of this technique is high, and the antecedent parameters are not tunable. In another recent paper, Wei et al. [41] developed a self-organizing interval type-2 fuzzy controller to regulate the bispectral index during general anesthesia. The input-output data scaling factor and the FOU were optimized using a joint surrogate model and genetic programming. The performance of the model is generally better than that of the GA-based type-1 and type-2 fuzzy models. The model also perfectly handled noise and interpatient variability. Pratama et al. [42] proposed an evolving type-2 classifier, where fuzzy rules can be pruned, merged, and grow automatically. The antecedent part comprised of a Gaussian function and the consequent part consisted of a Chebyshev polynomial. Quite recently, Le et al. [43] have developed a multilayer interval type-2 fuzzy controller (MIT2FC), where the network parameters are learnt using gradient techniques. The learning rates are optimized using the Jaya algorithm. The proposed methodology was shown to greatly reduce the number of rules. Numerical experiments were conducted to control the trajectory of a quadcopter in the presence of external white noise. However, these existing approaches have some limitations. These limitations are briefly described as follows.

A. Limitations in the Existing Fuzzy Type-2 Modeling Techniques
1) Qualitative identification: Qualitative identification suffers from the so-called flat structure (curse of dimensionality) problem of the rule base [30], i.e., if the number of input variables increases, then an exponentially large number of rules are required to accurately model the system. This is due to the fact that the support area of the most frequently used membership function (triangular, trapezoidal) covers a limited area of the input space. To cover the input space completely, a huge number of rules are required. If we have two input variables, each with six categories, then the number of rules required to cover the whole input space will be 36. Each rule is applicable only within a specific area, and its strength is zero outside. If the training data of the system do not fully span the input and output spaces, then this will cause serious problems when modeling the system. If the input falls in these uncovered areas, then the identified rule base does not generate any action. Even if some sort of interpolation technique is applied, the computational complexity will increase [44]. Therefore, a global fuzzy model requires a large number of rules and the number of rules depends exponentially on the number of input variables, and this will lead to a huge complexity in data-driven fuzzy models. 2) Quantitative identification: The computational complexity of the quantitative part of the identified fuzzy model also increases with the number of rules. As the number of rules increases, the number of parameters of the T2MF and operators also grows exponentially. Computing these parameters will then increase the computational cost of the quantitative model. 3) Choice of the T2MF: The choice of the T2MF and its systematic connection with the type of uncertainty are not clear. Different type-1 membership functions can be combined to generate T2MFs. However, it is not clear which type of membership functions should be used for a particular type of uncertainty. 4) Interpretability: In most cases, the interpretability of the identified fuzzy rule base is not clear. It is easier to interpret a few rules and get an insight into the working model. However, if the number of rules grows exponentially, then for a given set of input values, it is not possible to predict the response of the model and analyze its performance. The model tends to behave more like a black box in these situations. 5) Optimization process: Although type-2 fuzzy logic systems require fewer rules compared with type-1 fuzzy systems, the number of parameters is comparatively large. Therefore, optimizing a large number of parameter values is not an easy task.

B. Limitations in the Existing Fuzzy Type-2 Control Techniques
These limitations are related to the computational complexity of the fuzzy type-2 controllers. Using the rule base, an interval type-2 fuzzy controller can be designed using well-established techniques [45]. Most of these techniques use the type-reduction step. The type-reduction step is based on the KM algorithm, which is computationally expensive. Owing to its iterative nature, it is ill-suited for online applications. There are some alternative solutions that reduce the computational burden, but these are approximations [46]. These techniques also include the implication and aggregation steps. These steps further add to the computational complexity of the type-2 fuzzy controller.

C. Unique Features of the Proposed Approach
Here, we propose solutions to remove some of these limitations. We present a novel technique for fuzzy type-2 modeling and control. The proposed fuzzy model (distending-functionbased fuzzy inference system-DFIS) consists of rules and T2MFs. The rules are based on the Dombi conjunctive operator. A procedure for designing a fuzzy type-2 controller using the rules is also presented. The controller can handle various types of uncertainties (e.g., sensor noise). The proposed methodology has the following unique contributions.
1) The complexity associated with the qualitative identification of the data-driven techniques is reduced. This is achieved by using a unique interval T2MF called the interval type-2 distending function (T2DF) [47]. It has symmetric and asymmetric forms. It can completely cover the whole input space with a few rules, and this helps overcome the flat structure issue. 2) The computational burden of the quantitative identification is greatly reduced. The interval T2DF has only a few parameters. Most of these parameters are kept fixed and a few are varied during the training process.
3) The proposed methodology could be used to model the real-world physical systems. Different types of uncertainties can be modeled using the parameters of the interval T2DF. Therefore, most forms of the uncertainties in fuzzy systems can be represented using the interval T2DF. 4) The methodology identifies a model with high interpretability. Our approach identifies a few important fuzzy rules. We have also developed a rule reduction algorithm, which can further reduce the number of rules, and it results in an interpretable model. 5) Because only a few parameters are varied during the design process, the optimization is simple and fast. 6) We presented an arithmetic-based interval type-2 fuzzy controller. The type-reduction, implication, and aggregation steps are not involved in the design procedure. Therefore, the controller is computationally efficient. The rest of this article is organized as follows. In Section II, we briefly introduce the interval T2DF and its properties. In Section III, we explain the proposed controller design approach and rule reduction algorithm. In Section IV, we describe the benchmark system, simulation results, and hardware implementation and discuss the results. Finally, Section V concludes this article.

II. INTERVAL T2DF
Zadeh [48] proposed various membership functions, and one of them has the following form: Based on μ(x), we defined a more general parametric function, which models a soft equality, and it is called the distending function (DF). This type of membership function is closely related to the operator systems, and in our case (i.e., the DF), it is associated with the Dombi operators. The DF can be derived from the Kappa function of the Dombi operator [49]. The DF has four parameters, namely, ν, ε, λ, and c.
It has two forms: 1) symmetric and 2) asymmetric. The symmetric DF (shown in Fig. 1) is symmetric around x − c, and it is defined as [50] The asymmetric type of the DF (shown in Fig. 2) is given by

A. Construction of the Interval T2DF
The values of the DF parameters (ν, ε, λ, and c) may be uncertain. As a result, these parameters can take various values around their nominal values, within the uncertainty bound (Δ). By varying the parameter values within Δ, various DFs are obtained. The DF with the highest grade values is called the UMF and that with the lowest values is called the LMF. The  UMF, LMF, and various DFs in between can be combined to form an interval T2DF [47]. If the peak value of the DF becomes uncertain, then it can be represented using the interval T2DF with an uncertain "c" value, as shown in Fig. 3. Various interval T2DFs belonging to the same fuzzy variable can be combined to form a single interval T2DF. The support of the resultant interval T2DF will be approximately the same as the combined support of the individual interval T2DFs. The UMF of the interval T2DF consists of the left-hand side (LHS) and right-hand side (RHS) (the same is true for the LMF). The LHS and RHS are given by Dombi and Hussain [47]: The LHS and RHS of the UMF and LMF can be combined using the Dombi conjunctive operator to get a single interval T2DF. Consider two interval T2DFs δ 2 1 and δ 2 2 . The LHS of δ 2 1 and RHS of δ 2 2 can be combined using the Dombi conjunctive operator [51]. This produces a resultant interval T2DF δ 2 result , as shown in Fig. 4. Combining various interval T2DFs helps to reduce the number of fuzzy rules. This leads to a decrease in the computational complexity of the identified fuzzy model.

B. Interval T2DF in a Higher Dimension
Consider n different interval T2DFs in n different dimensions given by δ If we apply the Dombi conjunctive operator on these n interval T2DFs, then the result will also be an interval T2DF δ 2 (x 1 , x 2 , . . . , x n ) in n dimensions (shown in Fig. 5). And Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. where and Here, Δ is the upper bound on the uncertainty in the c value, (See the supplemental material for the proof.) The proposed design approach is explained in the next section.

III. DATA-DRIVEN FUZZY MODELING
Here, we assume that expert knowledge in the form of linguistic rules is not available. However, the batch offline (input and output) data of a healthy process are available. Using these data, we will drive a DFIS model composed of rules and interval T2DFs. A rule base for a multi-input multi-output (MIMO) system can be written as where s = 1, . . ., m are the m outputs. For simplicity, we will consider the case where s = 1, and we propose a methodology for generating a crisp control signal using the input and output training data. The methodology can be generalized to m independent outputs.
Let us now assume that the input and output databases have the following form: where U and V contains the l data points of each input and output variable. Here, a 1 , a 2 , . . . , a n are the data points belonging to the input fuzzy subsets U 1 , U 2 , . . . , U n , respectively, and b 1 is included in the output fuzzy subset V . Each column of the U matrix corresponds to a unique feature (input variables) of the process. Therefore, the U matrix forms an n-dimensional input feature space. Each column of the training matrix U is normalized by transforming it to the [0, 1] interval. As a result, the feature values are comparable on the same scale. The fuzzy rule consists of an antecedent and a consequent part. Here, the antecedent part contains a row of U , and the consequent part is an element of V . The antecedent part of the ith fuzzy rule is given by the following relation: where L is the fuzzy logical expression, and it is evaluated using a very general class of the fuzzy operators [51] D γ (x) = 1 The consequent part of the ith rule (i.e., y is V i ) depends on the value in the ith row of V . As the ith row of V has a single value (i.e., b i ), b i is directly taken as the consequent value of the ith rule. The b i value is not optimized during the training procedure. This is only picked from the V matrix. It is worth mentioning that the row indices of U and V are same for the ith rule. In our approach, the fuzzy rules will be based on sample values in the U and V matrices. Therefore, a few rows from the database matrix U are selected. These can be selected randomly, but from a practical point of view, it is beneficial to choose those rows that contain the extremum (around 0 and 1) and average (around 0.5) values of the input variables. These rows and the corresponding elements in the V matrix are used to construct the rule base. It is called the boundary value rule base (R b ) because it mostly contains those values of the inputs that lie on the boundary of the input space. Each variable in our approach is normalized in [0, 1] interval. To cover the boundary and middle values for each variable, there should be rules covering 0, 0.5, and 1 values. Hence, for a single variable, the maximum initial number of rules in R b is 3. In the same way, in the case of two variables, nine rules are required to cover the boundary and middle values of the surface (formed with two input variables). Therefore, in a general case, if there are n input variables, then the maximum initial number of rule in R b is 3 n . Usually, in the real-world databases, rows with boundary and middle values of all the variables are not available. Therefore, the initial number of rules in R b is usually less than 3 n . In our procedure, two different surfaces are constructed. These are called the estimated and the fuzzy surfaces. The estimated surface is constructed directly from the database [see (12)]. For missing data values, linear interpolation is used. The estimated surface is denoted by G. The fuzzy surface is generated from R b , and it is denoted by G * . These two surfaces are then used to create a third surface called the error surface E. Next, we will describe the procedure used to construct the surfaces G * and E using R b .
A. Construction of Fuzzy Surface G * and Error Surface E Each selected row from the database matrix U corresponds to a single rule. It is a row vector, and it consists of unique values of all the input variables (features). A unique interval T2DF is constructed for each input variable in the row. The interval T2DF has four parameters (ν, ε, λ, and c). Apart from these four parameters, an additional parameter Δ is required for the construction of interval T2DF [see (7)]. Δ is the upper bound on the uncertainty in the peak value coordinate c of the interval T2DF. The optimum value of each of these parameters can be determined.
The parameter c (peak value coordinate) of the interval T2DF is given, and it is equal to the value of the corresponding input variable. The value of λ can be chosen between 1 and ∞. Based on the experimental observations, the value of λ = 2 is good for most of the practical applications. The value of ε depends upon the number of rules in This ensures that the whole input space is covered. The input variables are usually measured using the feedback sensors. The Δ value of each sensor depends on the tolerance intervals of the corresponding sensor. All the Δ values are transformed into the [0, 1] interval to make these compatible with the values of the input variables. Interval T2DFs have a long tail. Consequently, each interval T2DF influences the other existing interval T2DFs. The ν value of each interval T2DFs will be calculated based on the principle of minimum influence on all the other interval T2DFs. This influence can never be zero, but it can be decreased by a factor k. For less influence, a large value of k should be chosen. However, from a practical point of view, a value of 10 is sufficient. It means that the influence will decrease tenfold. The influence of the ith interval T2DF at the peak value of the jth interval T2DF is given by where x i1 , . . . , x in are the n coordinates of the peak value of the ith interval T2DF and x j1 , . . . , x jn are the coordinates of the peak value of the jth interval T2DF. This formula can be used for one-dimensional interval T2DFs as well as n-dimensional interval T2DFs. Then, the required value of ν can be calculated If ε = 1 and λ = 2, then d is a distance measure In the antecedent part of the ith rule, there are n interval T2DFs corresponding to n input variables. Each rule is evaluated using the Dombi conjunctive/disjunctive operator. By applying the Dombi conjunctive/disjunctive operator over the n input interval T2DFs, we get a single interval T2DF. This is called the output interval T2DF. The UMF and LMF of this output interval T2DF are given by (6) and (7), respectively. Here, l output interval T2DFs will be generated from the l rules. All these output interval T2DFs are superimposed in the input space to generate a fuzzy surface G * .
An error surface E is defined as the difference between the estimated surface G and the fuzzy surface G * . That is

B. Extending the Rule Base
We shall decrease the magnitude of E, and this is achieved by an iterative procedure of adding new rules to R b . To add a new fuzzy rule, the coordinates of the maximum value on E are located. The corresponding row in the database containing these coordinates is selected. This row is then added to R b as a new rule. This rule is evaluated to generate an output interval T2DF. The ν value of this output interval T2DF is then calculated using (17). This interval T2DF is superimposed in G * . This will modify the surface G * in such a way that the magnitude of the maximum error on the surface E at these coordinates will decrease. This process is repeated in an iterative manner until the error surface E is within an error threshold τ E . It is the upper bound on the error surface E. For a very small value of τ E , a large number of rules have to be extracted from the training data and vice versa. Therefore, a compromise has to be made between the value of the error threshold τ E and the number of rules in R b . The optimum value of the error threshold is called τ E op , and it is application dependent. Based on our experimental observations, the τ E op value can be calculated using the heuristic It should be added that extracting the type-2 fuzzy model from the data is based on the DF. Therefore, we call this type-2 model the DFIS. The whole procedure for extracting the DFIS from the data is summarized in Algorithm 1.
If the number of rules in R b is large, then some of the rules can be merged to reduce the computational complexity. This is achieved using a reduction procedure.

C. Reducing the Rule Base
Here, we describe a heuristic approach used to decrease the number of rules in R b . Rule reduction will lead to a lower Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.
computational cost and better interpretability. Various output interval T2DFs that are close to each other in the input space can be combined to get a single interval T2DF (as shown in Fig. 4). The procedure is explained as follows: One of the input variables is selected and we call it a principal feature. In a control system, the error measure of the control variable is usually chosen as the principle feature. To ensure that the rule reduction procedure does not change the fuzzy surface significantly, the input space is divided into two half-spaces. The space where the principle feature value is less than 0.5 lies in the first half, and the rest of the space lies in the second half. Within each half, the output interval T2DFs are segregated into different groups. If the Euclidean distance between the peak value coordinates of various output interval T2DFs is less than a predefined distance D, then these interval T2DFs are placed in the same group, where for each half D = Sum of Euclidean distances b/w peak value T2DFs Total number of T2DFs in the same half .
(21) Each output interval T2DF is obtained by applying a unique rule in R b . The output interval T2DFs in the same group are combined together to produce a single interval T2DF. Consequently, the rules associated with all these output interval T2DFs are eliminated and replaced by a single new rule. Therefore, the number of rules in R b decreases. Now, it is called a reduced rule base R r . Using R r , a new fuzzy surface is constructed, and it is denoted by G * r . Then, a reduced error surface (E r ) is obtained using . . . , x n ). (22) This procedure is performed in an iterative way as long as E r (x 1 , . . . , x n ) is within a reduction threshold τ R . It is the upper bound on the reduced error surface E r . Its value is also application dependent. If the reduction threshold value τ R is high, then a large number of rules can be eliminated to get a much simpler and interpretable model. However, the accuracy of such an identified fuzzy model decreases. Therefore, the τ R value should be chosen based on a compromise between model accuracy and interpretability. A high τ R value leads to better interpretability but less accuracy and vice versa.
For an accurate DFIS model, the magnitude of the error surface should be minimum. However, an error surface with magnitude very close to zero is not desirable as this will lead to poor generalization (overfitting) of the DFIS model. The value of the reduction threshold τ R is application dependent, and its optimum value may be different for different applications. However, based on our experimental observations, the optimum value of the threshold (τ R op ) can be determined using the heuristic High value of τ R results in less number of rules, more interpretable, but least accurate DFIS model. Low value of τ R produces a large number of rules, and the resulting DFIS model is less interpretable and also has worst generalization capability. The whole procedure for reducing the number of rules in the DFIS model is summarized in Algorithm 2.

D. Arithmetic-Based Fuzzy Type-2 Controller Design Using the DFIS Model
The extracted DFIS model (R r plus interval T2DFs) can be used to design an arithmetic-based interval type-2 fuzzy controller. We briefly present the procedure here [50].
Each rule in R r has two parts called the antecedent and the consequent. We evaluate these two parts separately to generate a crisp control signal. For a specific values of input variables, the antecedent part is evaluated [see (13)], and it results in an Here,v i (x * ) is the lower strength andv i is the upper strength of the ith rule. δ 2 n (x n ) i is the LMF and δ 2 n (x n ) i is the UMF of the nth interval T2DF. The rule strengths are normalized to get the lower and upper firing strengths and k is the total number of rules in R r . The consequent part of each rule in R r is a single numeric value in the data matrix V . Let b 1 , . . . , b k be the consequent values, v * 1 , . . . , v * k be the upper firing strengths, and v * 1 , . . . , v * k be the lower firing strengths of the k fuzzy rules in R r . And b 1 , . . . , b k values are picked from the V matrix [see (12)]. Then, the crisp output control U crisp is generated by where The whole procedure is summarized in Algorithm 3.

IV. BENCHMARK SYSTEM, SIMULATIONS RESULTS, HARDWARE IMPLEMENTATION, AND DISCUSSION
The effectiveness of the proposed technique is demonstrated by modeling the altitude control system of a quadcopter (Parrot mini-drone). In our simulations, the batch offline data are first generated by regulating the altitude of the quadcopter using a proportional-derivative (PD) controller. Using these training data, the proposed DFIS model is identified. This model consists of fuzzy rules and interval T2DFs. In addition, various other fuzzy (type-1 and type-2) models are also identified from the same data. The performance of the DFIS model is compared with other fuzzy models. Afterward, three fuzzy controllers are designed using these three fuzzy models. The performance of these controllers is compared in a situation where the altitude of the quadcopter is regulated in the presence of noisy sensor measurements. Later on, the designed type-2 controller is also Algorithm 1: Algorithm for Extracting Type-2 Fuzzy Model (DFIS) From the Data. 1: Step 1: Obtain the input and output databases of the process [see (12)]. 2: Step 2: Transform each column of U into the [0, 1] interval. 3: Step 3: Construct the estimated surface G. 4: Step 4: Generate a boundary value rule base R b from the input and output databases. 5: Step 5: Assign an interval T2DF to each input point in the antecedent part of the rule base R b . Choose k = 10 and calculate ν using (16) and (17). 6: Step 6: Calculate the output interval T2DF for each rule using (6) and (7). 7: Step 7: Generate fuzzy surfaces G * from all the output interval T2DFs. 8: Step 8: Construct the error surface E using (19). If E is within the error threshold τ E , then stop. 9: Step 9: Find the maximum value coordinates on E. Add a new rule in R b corresponding to these coordinates in the databases. 10: Step 9: If the total number of rules in R b are less than 7 n , then go to Step 6; else stop. deployed on the mini-drone hardware to check the real-time performance.

A. Quadcopter Model
A Parrot mini-drone Mambo was used in this study (shown in Fig. 6). The MATLAB Simulink Aerospace block set provides the simulation model of this quadcopter [52]. The simulation  consists of the airframe model, sensor model, environment model, and flight controller. The airframe model is schematically shown in Fig. 7. It consists of axis parameters (rotational (φ, θ, ψ) and translational (x, y, z)), mass, torques, and rotors. The environment model describes the effects of external factors on the quadcopter. It consists of atmosphere and gravity models. The sensor model includes three sensors: 1) sonar for altitude measurement; 2) a camera for optical flow estimation; and 3) inertial measurement units to measure the linear and rotational motions. The flight control system (FCS) contains the roll φ, pitch θ, yaw ψ, and altitude z controllers. The mathematical model of the system is given bẏ Here, X is the state vector consisting of translational and rotational components, N contains the external disturbances affecting the system states, and u represents the model inputs.
Let Ω 1 , Ω 2 , Ω 3 , and Ω 4 be the angular speeds of the four rotors of the quadcopter. Then ⎡ Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. Here, u 2 , u 3 , and u 4 control the roll, pitch, and yaw angles. u 1 is the total thrust input, and it controls the altitude z of the quadcopter. b is the thrust coefficient, d is the drag coefficient, and Ω r is the residual angular speed.
The state equations of the system arė where I xx , I yy , and I zz are the moments of inertia along the three axes. Various parameters of the quadcopter model are given in Table I. It should be noted that this quadcopter model is used only to generate the data. These data are then used to extract the DFIS model, as explained in the next section.

B. Extracting the Data-Driven Type-2 Fuzzy Model
Here, in these simulations, we seek to model the altitude controller of the quadcopter. A training dataset that contains the samples of input and output of the altitude controller is a requirement for Algorithm 1. The requirement was satisfied by controlling the altitude of quadcopter using the PD controller in MATLAB. The dataset containing the inputs and output of the PD controller was created. Later, Algorithm 1 was used to generate the DFIS model of the altitude controller using this input and output dataset. The optimum error threshold τ E op was calculated to be 0.1. Algorithm 1 extracted 26 rules from dataset, and these formed the rule base R b .
The number of rules in R b was reduced using Algorithm 2. The optimum reduction threshold τ R op was calculated to be 0.15. Algorithm 2 reduced the number of rules to 17 by merging a few rules. This is called the reduced rule base R r . A few interval   Fig. 8. R r and all the interval T2DFs in it collectively form a reduced (simplified) DFIS model. The reduced error surface plot for the DFIS model is shown in Fig. 9. It can be seen that the reduced error surface (E r ) is less than τ R op (i.e., 0.15). The surface of the DFIS model is shown in Fig. 10.
For comparison purpose, various fuzzy models were tested. The ANFIS type-1 model was extracted from the same input and output dataset using the MATLAB fuzzy logic toolbox. The dataset was divided into train and test sets (2:1). The model was trained for 100 epochs and 36 rules were generated. It is a Sugeno-based fuzzy model. Fig. 11 shows the surface plot of the ANFIS type-1 Sugeno model. The fuzzy logic toolbox can be used to convert the type-1 fuzzy model to a type-2 fuzzy model. Therefore, an ANFIS type-2 model was also generated. This  type-2 model uses the type-2 bell-shaped membership functions (see Fig. 12). Table II summarizes the key differences among the DFIS and various other fuzzy models.

C. Designing the Arithmetic-Based Type-2 Altitude Controller
The objective is to control the altitude z by generating an appropriate total thrust u 1 . The thrust u 1 depends on the height (sonar) measurements and the rate of change of the height of the quadcopter. Using Algorithm 3, an arithmetic-based controller was designed using R r . The structure of the designed closed-loop control system is presented as a block diagram in Fig. 13. Fig. 14 shows the surface plot of the arithmetic-based controller. The ANFIS fuzzy models (type-1 and type-2) were converted to a fuzzy controller using the Simulink fuzzy logic toolbox. These controllers were based on Sugeno inference logic. Then, four controllers (arithmetic-based, ANFIS type-1,  ANFIS type-2, and PD controllers) were used to regulate the altitude of the quadcopter in MATLAB Simulink. Average white Gaussian noise (AWGN) with a signal-to-noise ratio (SNR) of 10 dB was added to the sensor measurements. Altitude response was simulated with noisy feedback signals. The quadcopter was programmed to take off and reach an altitude of 0.7 m, then rise to an altitude of 1 m, and finally descend to 0.7 m. Fig. 15 shows the altitude response of the controlled quadcopter during this simulation study. It is evident from Fig. 15 that the proposed controller produced oscillations with less amplitude compared with other three controllers. It should be noted that oscillations are magnified for the purpose of comparison in Fig. 15. To supplement the comparison results with quantitative analysis, three separate variation measuring metrics [variance, range, and root-mean-square error (RMSE)] were computed from the responses of all the four controllers. These metrics  were computed in the time interval (14 ≤ simulation time ≤ 25 in Fig. 15). The results obtained are shown in Table III. These results clearly indicate that the performance of the proposed type-2 controller was least affected by the noise in the feedback altitude signal compared with other controllers. To further investigate the robustness property of the proposed controller, several simulations were performed to regulate the altitude of the quadcopter with various noise levels. AWGN was added to the data of the altitude sensor. This noisy altitude signal is the feedback signal and is the input to the proposed controller. Fig. 16 shows the altitude response of the quadcopter receiving noisy altitude sensor data with various SNRs. A higher value of SNR indicates that the signal quality is better and vice versa.
It is evident from Fig. 16 that when the noise level was negligible (SNR 100 dB), the proposed controller regulated the altitude without any oscillations (magenta line) and perfectly followed the reference signal (black line). However, when the SNR was increased, the oscillations became more visible in the response. For an SNR of 5 dB, the controller was still able to regulate the altitude but with high oscillations. The borderline case was reached when the signal and noise had equal power (SNR 0 dB). In this case, the proposed controller could not differentiate between the signal and noise. In this case, it was not able to regulate the altitude (cyan line) and the quadcopter crashed.

D. Hardware Implementation
MATLAB provides a support package for parrot quadcopter drones (Mambo FPV and Bebop2). It connects with the quadcopter hardware via Bluetooth/Wi-Fi, and it can send control commands. MATLAB Simulink includes the simulation model of the quadcopter. The model contains the algorithm for the FCS. This algorithm implements roll, pitch, yaw, and altitude controllers. The support package generates the C code of the FCS and deploys it in the quadcopter. This algorithm can access the onboard sensors such as the accelerometer, gyroscopes, camera, and sonar. The flight data values (altitude, images, etc.) are saved in onboard storage, and they can be retrieved from the quadcopter at the end of the flight. The altitude controller in the FCS was replaced with the proposed arithmetic-based type-2 controller. The C code of the FCS was generated and deployed in the quadcopter via Bluetooth. A fixed flight trajectory corresponding to the simulation scenario was also hard coded. The uncertainty in the controller input (altitude) data was created by adding white noise to the sonar measurements. The noisy data were the input to the controller in the FCS. The drone flight was tested in a protected (indoor) environment. The data recorded during the flight were retrieved at the end. Fig. 17 shows the altitude measurements recorded during this test flight. This tells us that the proposed controller successfully followed the desired trajectory, even in the presence of noisy sensor data.

E. Results and Discussion
From the results obtained, it is evident that the DFIS model can be extracted directly from the process data. The DFIS model is composed of interval T2DFs and rules based on the Dombi operator. As shown in Fig. 10, the proposed model has a smooth surface, and it covers the whole input space. In these simulations, the λ and parameters were kept fixed, the c parameter was determined directly from the data, and ν was calculated using (17). This reduces the number of parameter calculations per interval T2DF. In Fig. 11, it can be seen that the ANFIS type-1 model also has a smooth surface except for the boundary areas. On the boundaries, there are a few bumps. The ANFIS type-2 model (see Fig. 12) has a less smooth surface compared to those for the DFIS and ANFIS type-1 models. Boundary bumps in ANFIS models are due to the fact that only a few data points are available to accurately model these areas. However, these bumps are nonexistent in the DFIS model because of the long tails of interval T2DFs. These tails tend to approximate a smooth transition in the areas where there are only a few data points or even no data points.
The performance of the DFIS model is evaluated by comparing it with the output of the ANFIS type-1 and ANFIS type-2 fuzzy models. These are two well-established and widely accepted fuzzy modeling approaches. As shown in Table II, the DFIS model used a smaller number of rules and tunable parameters than the ANFIS type-1 and ANFIS type-2 models did. Figs. 10, 11, and 12 show the surface generated by these three models. It is evident that the DFIS model has much smoother surface transitions. Furthermore, the qualitative aspects of these three models are compared by designing the fuzzy controller. The controllers are based on the rules and membership functions in these models. These controllers are then used to control the altitude of the quadcopter in the presence of noisy sensor data. The altitude control responses of these three controllers are shown in Fig. 15 for comparison purposes. The performance of the ANFIS type-2 controller is worse than the ANFIS type-1 and proposed arithmetic-based controllers. The proposed controller is better than the ANFIS type-1 controller as it is more robust to the variations in the noisy sensor measurements. In addition to the simulations, the hardware implementations of the proposed controller showed very promising results for the real-time control applications. The controller performed the altitude control function in the presence of uncertain (noisy) measurement data (see Fig. 17). This demonstrates the effectiveness of the proposed arithmetic-based type-2 controller.
In ANFIS type-1 and type-2 controllers, the choice of membership functions and number of rules is hyperparameters. One has to decide in advance on the type of membership functions (triangular, Gaussian, trapezoidal, etc.) and the number of categories and rules. This hyperparameter selection is usually based on experience or data insights. However, in our proposed DFIS model, the number of rules and interval T2DF are determined automatically by the algorithm based on the reduction threshold τ R .
The reduction threshold τ R plays a key role in determining the generalization performance of the proposed methodology. A value of reduction threshold τ R less than τ R op [see (23)] will lead to a large number of rules. This is similar to overfitting in the learning paradigms. The DFIS model will accurately fit the training data, but it will have poor generalization. This type of DFIS model will be less interpretable, and it performs badly on unseen data. A value of τ R greater than τ R op will produce a DFIS model with a smaller number of rules. This type of DFIS model will have a good generalization capability and will be more interpretable with low computational complexity. However, in this case, the accuracy of the DFIS model will be poor. Thus, an optimum value of the threshold τ R op will lead to an optimum number of rules, and it will produce a DFIS model with higher accuracy, better interpretability, and a good generalization capability. The proposed DFIS methodology is data driven. It means that the technique can be applied in cases where the expert knowledge is not available, but the data of the system is available. The methodology presented in this article is very general, and the only assumption is the availability of the data. We want to emphasize that the proposed methodology is very general and can be used to model and control any real-world physical system. The altitude control of quadcopter is studied here only to validate the proposed methodology and to compare it with various other fuzzy modeling and control techniques.
As mentioned in the introduction section, most of the developed methods extract the fuzzy rule and tune the parameters using the metaheuristics. However, these algorithms can get stuck in a local optimum, and there is no guarantee that these will find the global optimum solution. In addition, the local optimum solution provided by these algorithms depends on the initial values of the tunable parameter. These tunable parameters are usually randomly initialized, and then, a heuristic is applied to get the optimum value. The process is repeated with several random initial values, and the best values are chosen at the end via a comparison of the results achieved with each random initialization. The algorithm proposed in this article uses a different approach to tune the parameters of the DFIS model. Values of a few parameters are fixed, and they are never changed during the training phase. For the remaining tunable parameters, there are closed-form expressions [see (16) and (17)], which can precisely determine the values of these parameters. Rules are added iteratively, and the parameters in these rules are determined using the expressions. The rule addition process continues until the error is within the bounds of reduction threshold τ R . As no heuristic is employed here, the values determined for the tunable parameters are near optimum.

F. Interpretability of the DFIS Model and Results
The proposed DFIS model is based on rules that have the following form: if x 1 is around c 1 and . . .. . . and x n is around c n then y is v 1 (33) where x 1 , . . . , x n are the input variables and c 1 , . . . , c n are the peak coordinates of the corresponding interval T2DFs. y is the output variable and v 1 is the value of the output. The rule is self-explanatory, and it is very easy to interpret a single rule. The identified DFIS model consists of a number of these types of rules. Therefore, the interpretability of the whole DFIS model depends on the number of these rules. The small number of rules leads to a more interpretable DFIS model and vice versa. As shown in Table II, the proposed DFIS model has the least number of rules compared with various other models. Therefore, the DFIS model is comparatively more interpretable.
In the simulations, 17 rules were identified by the proposed approach. Three of these rules are as follows.
1) If the normalized altitude error is around 0 and the normalized altitude rate is around 0, then the total thrust is −0.469. 2) If the normalized altitude error is around 1 and the normalized altitude rate is around 1, then the total thrust is 0.417. 3) If the normalized altitude error is around 0 and the normalized altitude rate is around 1, then the total thrust is −1.036. For a given set of values of the input variables x 1 and x 2 , then the upper and lower firing strengths (v i (x * ) andv i (x * ) of each rule are calculated using (26). These firing strengths are then multiplied with the corresponding thrust values (in matrix V ) to get the final crisp output value using (28). In this systematic way, the DFIS model can easily be interpreted.

G. Comparison With Closely Related Work
Le et al. [43] designed an interval type-2 fuzzy controller (MIT2FC) by proposing a multilayer structure. The network parameters were tuned using gradient-based methods. The performance of the proposed model was demonstrated using the trajectory control of a quadcopter UAV. There are some key differences between MIT2FC and our proposed methodology.
1) The MIT2FC model employed type-2 Gaussian membership functions (T2GMFs). A separate T2GMF is required to cover a specific region in the input space. Therefore, to cover the whole input space completely, a large number of rules are required. However, in the proposed design, interval T2DFs are used. The interval T2DF has a long tail, and the whole input space can be covered by identifying a few important rules. This is evident from the results in Table II. Therefore, our proposed strategy can reduce the complexity of the fuzzy model. 2) A fixed number of rules are defined in the MIT2FC. The parameters of these T2GMFs are learnt using the gradientbased optimization method. The layer structure is fixed and so is the number of rules. This results in a less flexible model. However, in the DFIS design, the number of rules is variable, and rules are learnt dynamically depending on the error thresholds. Furthermore, the number of rules is further decreased by combining the interval T2DFs, which are acting in the close proximity.
3) The parameters of T2GMFs are learnt using the gradientbased method in the MIT2FC. If the surface has sharp boundaries (discontinuities), then it is difficult to optimize the parameters using this method. However, in the DFIS model, the parameters of the interval T2DF are calculated using a closed-form equation [see (17)], and it is guaranteed to work well even in the presence of discontinuities.
4) The efficiency of the MIT2FC model was demonstrated using numerical examples (simulation studies) only. However, the performance of the proposed DFIS model is checked by real-time implementation on the quadcopter hardware (Parrot mini-drone Mambo FPV). The flight data are available. 2 Owing to the reduced number of rules and arithmetic-based inference, the DFIS-based controller was able to produce the desired flight trajectory (see Fig. 17).

V. CONCLUSION
In this article, we presented the solutions to some of the limitations associated with the existing fuzzy type-2 modeling and control techniques. A procedure was proposed to identify the type-2 model directly from the data, which we called the DFIS model. This model consists of rules and interval T2DFs. The whole input space is covered using a few rules. Interval T2DFs can model various types of uncertainties using their parameters. A rule reduction procedure is also proposed. It combines the interval T2DFs in the close vicinity, and it significantly reduces the number of rules. The DFIS model was compared with various type-1 and type-2 fuzzy models. The DFIS model produced a smooth surface with a comparatively small number of rules and tunable parameters. Furthermore, a procedure is proposed to design an arithmetic-based interval type-2 fuzzy controller using the rules. As controller design does not include the implication and type-reduction steps, this greatly reduces the computational complexity and paves the way for the real-time implementation of the proposed design. The effectiveness of the whole procedure was demonstrated by designing an altitude controller for the Parrot Mambo quadcopter. Simulations were carried out in MAT-LAB Simulink to compare the proposed controller with various fuzzy controllers. The proposed controller performed better and regulated the altitude of the quadcopter even in the presence of noisy (uncertain) sensor measurements. This robustness to noisy data is due to the use of interval T2DFs. The designed controller was then deployed and tested in the FCS on the quadcopter hardware. Real-time hardware implementations produced the same results as those obtained in the simulations. Because of its low computational complexity and design simplicity, the controller is suitable for real-time control applications. The proposed DFIS model has a few limitations. It can produce an interpretable and computationally less expensive model only if the number of features (inputs) is small. For a large number of features, a fuzzy surface has to be constructed in higher dimension, and also, a large number of complex rules are required to correctly capture the interfeature correlations. In this case, the DFIS model will still be accurate, but it will be less interpretable. Therefore, the proposed methodology is only applicable to application domains where the number of features is small, such as control system design and financial modeling. For other domains, where the number of features is large (computer vision and natural language processing), the DFIS will produce a very complex model with low interpretability. Future work includes the designing of an ensemble of the DFIS models to scale the proposed methodology for a complex system with a large feature set. Another possible future direction is to extend the proposed DFIS model to include the general T2MFs. An arithmetic-based control design procedure could also be extended to design the general type-2 controllers with reduced computational complexity. This would help to model the uncertainties associated with the real-world physical systems with more accuracy and less complexity.