# A Novel Identification Method for Generalized T-S Fuzzy Systems

Authors: Ling Huang; Kai Wang; Peng Shi; Hamid Reza Karimi
Journal: Mathematical Problems in Engineering
 (2012)

---

## Abstract

In order to approximate any nonlinear system, not just affine nonlinear systems, generalized T-S fuzzy systems, where the control variables and the state variables, are all premise variables are introduced in the paper. Firstly, fuzzy spaces and rules were determined by using ant colony algorithm. Secondly, the state-space model parameters are identified by using genetic algorithm. The simulation results show the effectiveness of the proposed algorithm.


---

## Body

## 1. Introduction

Since the presentation of Takagi-Sugeno (T-S) fuzzy model by Takagi and Sugeno in 1985, great effort has been devoted to fuzzy modeling, analysis, and design, see for example, [1–10] and the references therein. A multilayer incinerator was modeled by a T-S fuzzy model, and it was shown that the model has better accuracy compared to statistical methods in [11]. A process control rig with three subsystems, a heating element, a heat exchanger, and a compartment tank, was modeled by a T-S fuzzy model in [12], and it was shown that the proposed approach provides better modeling when compared with a linear modeling approach.In identification of fuzzy models, an interdependent procedure for the structure determination and parameter identification is often concerned, that is, determination of the premise and consequence variables and identification of the premise and consequence parameters [13]. Structure identification of the fuzzy model is concerned with the determination of the number of rules and parameter estimation. Clustering algorithms were widely used in the literature. The work in [14] introduced a fuzzy C-means criterion to ant clustering algorithm and analyze the partitions performance obtained from the ant-based algorithm with those from randomly initialized Hard C-means. The work in [15] focused on a global optimization strategy for the optimal clustering in compromise sum-difference linear arrays based on ant algorithm. Gath-Geva clustering algorithm [16] and subtractive clustering algorithm [17] have been applied in structure identification and premise parameter estimation.The T-S fuzzy model is composed of linear models, and each model is according to a group of input-output data, divided by the clustering algorithm. The recursive least squares estimation can be easily used for constructing a linear system as a means for tuning the T-S fuzzy model [18, 19]. Amine et al. [20] also used T-S fuzzy model with fuzzy clustering technique to determine both the antecedent and consequent parameters of the fuzzy T-S rules. Then, recursive weighted least squares algorithm with forgetting factor is used to adapt consequent parameters. They applied the methods to model the air temperature and humidity inside the greenhouse. The other researcher, Chang-Ho et al. [21], proposed T-S fuzzy model to design adaptive fuzzy observer and controller and the proposed method is applied to the stabilization problem of a flexible joint manipulator in order to guarantee its performance.In [22], Petridis et al. introduced a hybrid neural-genetic multimodel parameter estimation algorithm and applied it to structured system identification of nonlinear dynamical systems, and the work in [23] presented Genetic-Algorithm-Based Parameter Estimation Technique for Fragmenting Radar Meteor Head Echoes. The work in [24–27] brought an optimization methodology by using a genetic algorithm to obtain the parameters of a soil that can be represented in a multilayer structure. The method uses a curve of experimental apparent resistivity obtained from measurements made in the soil.It is shown that a general nonlinear system can be approximated by a T-S fuzzy model to any degree of accuracy on any compact set [28]. However, it has been argued in [29] that the commonly used linear or affine T-S fuzzy models, where the control variables are not included in the premise variables, are only able to approximate affine nonlinear systems to any degree of accuracy on any compact. So the paper investigated the approximation of generalized T-S fuzzy systems, where the control variables and the state variables are all premise variables. This paper proposes application of K-Means ant-clustering algorithm to optimize the fuzzy membership function in the antecedent part. Genetic algorithm (GA) is then used in the consequent part to obtain the plant parameters and depends on the values of the membership functions in antecedent part.The rest of this paper is structured as follows. Section2 is devoted to the generalized T-S fuzzy model; the model description and the design principle of the idea are included. In Section 3, the algorithm for the best partition of given data and parameter estimation by using genetic algorithm are presented. Simulation results are provided in Section 4 to demonstrate the effectiveness of the proposed algorithm. Conclusion is given in Section 5.


## 2. Generalized T-S Fuzzy Model

Takagi-Sugeno (T-S) models are based on fuzzy rule base structures of IF…THEN rules for reasoning in which antecedents are fuzzy sets and consequents are linear functions in each rule. In this way a T-S fuzzy model can approximate a complex affine nonlinear system, general nonlinear systems exist widely in practice can be approximated by generalized T-S fuzzy model.


### 2.1. Model Description

The generalized T-S fuzzy model considered in this paper is as follows.Rulei: if z1(t) is Mi1 and …zn(t) is  Min;  u1(t) is Vi1 and …um(t) is Vim, then
(2.1)x˙(t)=Aix(t)+Biu(t),
where i=1,2,…,r is the number of IF-THEN rules, Mi1,Mi2,…,Min, Vi1,Vi2,…,Vim are the fuzzy sets, and Z(t)=[z1(t),…,zn(t)]T is the premise variable; xj(j=1,2,…r) is the system input, and x(t)∈Rn, u(t)∈Rm are the state vector and controlled input vector, respectively; Ai∈Rn×n,Bi∈Rn×m are the system matrix and input matrix of the i system, respectively.Using the parallel distributed compensation strategy, the overall fuzzy system of the model is inferred as(2.2)x˙(t)=∑i=1rhi(z(t))hi(u(t))[Aix(t)+Biu(t)],
where
(2.3)hi(z(t))=wi(z(t))∑i=1rwi(z(t)),hi(z(t))≥0,hi(u(t))=wi(u(t))∑i=1rwi(u(t)),hi(u(t))≥0,
with
(2.4)∑i=1rhi(z(t))=1,wi(z(t))=∏j=1nMij(zj(t)),i=1,2,…,r∑i=1rhi(u(t))=1,wi(u(t))=∏j=1mVij(uj(t)),i=1,2,…,r
and Mij(zj(t)) is the grade of membership of zj(t) in the fuzzy set Mij; Vij(uj(t)) is the grade of membership of uj(t) in the fuzzy set Vij.


### 2.2. Design Principle of Model Identification

The framework of fuzzy system models can be shown in Figure1. During identification, fuzzy functions are fixed. The approach first clusters the given data into several overlapping fuzzy clusters, each of which is used to define a separate decision rule. During structure identification, the original input variables are used to estimate the local relations of the input-output data.Figure 1
The framework of fuzzy system models.Ant-clustering model based on K-Means algorithm is used to search for the best partition of given data; genetic algorithm (GA) is used to estimate state-space model parameters. GA has been proved to be a robust approach on estimating the parameters on the time series and nonlinear functions simultaneously.


## 2.1. Model Description

The generalized T-S fuzzy model considered in this paper is as follows.Rulei: if z1(t) is Mi1 and …zn(t) is  Min;  u1(t) is Vi1 and …um(t) is Vim, then
(2.1)x˙(t)=Aix(t)+Biu(t),
where i=1,2,…,r is the number of IF-THEN rules, Mi1,Mi2,…,Min, Vi1,Vi2,…,Vim are the fuzzy sets, and Z(t)=[z1(t),…,zn(t)]T is the premise variable; xj(j=1,2,…r) is the system input, and x(t)∈Rn, u(t)∈Rm are the state vector and controlled input vector, respectively; Ai∈Rn×n,Bi∈Rn×m are the system matrix and input matrix of the i system, respectively.Using the parallel distributed compensation strategy, the overall fuzzy system of the model is inferred as(2.2)x˙(t)=∑i=1rhi(z(t))hi(u(t))[Aix(t)+Biu(t)],
where
(2.3)hi(z(t))=wi(z(t))∑i=1rwi(z(t)),hi(z(t))≥0,hi(u(t))=wi(u(t))∑i=1rwi(u(t)),hi(u(t))≥0,
with
(2.4)∑i=1rhi(z(t))=1,wi(z(t))=∏j=1nMij(zj(t)),i=1,2,…,r∑i=1rhi(u(t))=1,wi(u(t))=∏j=1mVij(uj(t)),i=1,2,…,r
and Mij(zj(t)) is the grade of membership of zj(t) in the fuzzy set Mij; Vij(uj(t)) is the grade of membership of uj(t) in the fuzzy set Vij.


## 2.2. Design Principle of Model Identification

The framework of fuzzy system models can be shown in Figure1. During identification, fuzzy functions are fixed. The approach first clusters the given data into several overlapping fuzzy clusters, each of which is used to define a separate decision rule. During structure identification, the original input variables are used to estimate the local relations of the input-output data.Figure 1
The framework of fuzzy system models.Ant-clustering model based on K-Means algorithm is used to search for the best partition of given data; genetic algorithm (GA) is used to estimate state-space model parameters. GA has been proved to be a robust approach on estimating the parameters on the time series and nonlinear functions simultaneously.


## 3. Algorithm Implementation

### 3.1. The Algorithm for the Best Partition of Given Data

The single ant’s action is very simple, but the group’s action through the cooperation is very complex; coordinating among a group of ants it is very easy to find the shortest path from the ant nest to food source. The ants between the individual conduct information by pheromone which is a substance left by an ant when it transfers through the way. The ant clustering algorithm exactly utilizes swarm intelligence to solve combinatorial optimization problem, which has smart search, global optimization, robustness, positive feedback, distribute computing, and so forth. The ant clustering algorithm provided the powerful tool for solving complex optimization problem for many fields, which has a good effect on the traveling salesman problem (TSP), the resources, quadratic assignment problem (QAP), and telecom routing controlling such classical optimization. In addition, the classification ant eggs behavior also inspired the corresponding clustering algorithm. The core of ant clustering algorithm is first, selection mechanism: the more pheromone of the path, the greater probability selected; second, pheromones update mechanism: the shorter path, the faster the increase; third, cooperation mechanism: In communication between individual through pheromones.Before introducing the algorithm, some definitions are given. Suppose an ant is put in theith data of the nth state, and the data is assigned to the jth cluster centroid zj,j=1,2,…,k, the pheromone τij is leaved when the ant goes from data i to cluster centroid j, then the ant i chooses the centroid zj in accordance with the probability
(3.1)pij=τij∑j=1nτij.And the pheromone is updated based on the following equation:(3.2)τij(t+1)=ρτij(t)+Qdij,
where dij is the distance from the data i to the centroid zj; ρ is the permanence coefficient of the pheromone, usually taken about 0.5–0.9; Q is a positive constant, which is represented as the amount of pheromone from an ant.The algorithm flow chart is shown in Figure2. Firstly, we sample input data of the original system, confirm the number of clusters k for every state, and then initialize the algorithm parameters Q,ρ iteration counter nc=0, maximum iterations NC_MAX, the pheromone τij,(i,j=1,2…n). We place n ants in n data, each of the ants chooses the next node in accordance with the probability pij, and update the pheromone τij of every path. Then the new k centroids are calculated, the distance from n data to the new centroids dij,i=1,2,…,n,j=1,2,…,k are calculated. Repeat like this until nc is greater than the maximum iterations NC_MAX or all ants choose the same path, the optimal clustering can be given based on the pheromone. Finally, the centers of the Gaussian membership function are determined on the cluster centroid.Figure 2
The K-means ant algorithm flow chart.


### 3.2. Parameter Estimation by Using Genetic Algorithm

Genetic algorithm (GA) is a meta-heuristic method used to find a solution based on biological evolution process. The process includes crossover, natural selection, and mutation to obtain an individual with the best gen combination. GA begins with determination of chromosome set (solution set) in terms of binary (1 and 0). Next, the selection is conducted based on the fitness value. The chromosome with the highest fitness value is retained while the rest are removed. The selected chromosomes, then, experience reproduction process to be parents.As the aim is to minimize the error between the output of fuzzy model and output data, in the paper, the mean of squared error (MSE) is used as a proper evaluation function. MSE is given by(3.3)MSE=1M∑i=1M[Yi-yi]2,
where Yi is output from Fuzzy model, yi is output data, and M is number of data pairs.Since the objective is to minimize MSE value, the fitness function is defined as follows:(3.4)Jk=-MSEk+max(MSE),
where k is the kth chromosome.If the normalized fitness functionfk(i) is used, it can be calculated by using
(3.5)fk(i)=Jk(i)∑i=1nJk(i),
where Jk(i) is the fitness function for chromosome i.The algorithm flow chart of the parameter estimation by using genetic algorithm is shown in Figure3. Firstly, we sample output data of the original system, write the objective function based on equation and then initialize the algorithm parameters number individual NIND, maximum genetic times MAXGEN, number variable NVAR, variable precision PRECI, generation gap GGAP, and genetic counter GEN. Then the initial population A^,B^,i=1,2,…,k with lines NIND, columns NVAR*PRECI is generated randomly. The following step is calculating fitness function value for different data in different state, then select, crossover, mutate, and calculate a new objective function value and track the performance of the solution. Selection process is used to determine two chromosomes to be the parents. Crossover is used to produce two new individuals. Generate initial population: initial solution is a randomly generated digit that has NIND line and NVAR*PRECI row. We calculate fitness function value under different data in different state, then select, crossover, mutate and calculate a new objective function value and track the performance of the solution. Selection process is used to determine two chromosomes to be the parents. Crossover is used to produce two new individuals. Repeat like this until GEN>MAXGEN performance index is satisfied. Finally, the optimal A^,B^,i=1,2,…,k are obtained.Figure 3
The genetic algorithm flow chart.


## 3.1. The Algorithm for the Best Partition of Given Data

The single ant’s action is very simple, but the group’s action through the cooperation is very complex; coordinating among a group of ants it is very easy to find the shortest path from the ant nest to food source. The ants between the individual conduct information by pheromone which is a substance left by an ant when it transfers through the way. The ant clustering algorithm exactly utilizes swarm intelligence to solve combinatorial optimization problem, which has smart search, global optimization, robustness, positive feedback, distribute computing, and so forth. The ant clustering algorithm provided the powerful tool for solving complex optimization problem for many fields, which has a good effect on the traveling salesman problem (TSP), the resources, quadratic assignment problem (QAP), and telecom routing controlling such classical optimization. In addition, the classification ant eggs behavior also inspired the corresponding clustering algorithm. The core of ant clustering algorithm is first, selection mechanism: the more pheromone of the path, the greater probability selected; second, pheromones update mechanism: the shorter path, the faster the increase; third, cooperation mechanism: In communication between individual through pheromones.Before introducing the algorithm, some definitions are given. Suppose an ant is put in theith data of the nth state, and the data is assigned to the jth cluster centroid zj,j=1,2,…,k, the pheromone τij is leaved when the ant goes from data i to cluster centroid j, then the ant i chooses the centroid zj in accordance with the probability
(3.1)pij=τij∑j=1nτij.And the pheromone is updated based on the following equation:(3.2)τij(t+1)=ρτij(t)+Qdij,
where dij is the distance from the data i to the centroid zj; ρ is the permanence coefficient of the pheromone, usually taken about 0.5–0.9; Q is a positive constant, which is represented as the amount of pheromone from an ant.The algorithm flow chart is shown in Figure2. Firstly, we sample input data of the original system, confirm the number of clusters k for every state, and then initialize the algorithm parameters Q,ρ iteration counter nc=0, maximum iterations NC_MAX, the pheromone τij,(i,j=1,2…n). We place n ants in n data, each of the ants chooses the next node in accordance with the probability pij, and update the pheromone τij of every path. Then the new k centroids are calculated, the distance from n data to the new centroids dij,i=1,2,…,n,j=1,2,…,k are calculated. Repeat like this until nc is greater than the maximum iterations NC_MAX or all ants choose the same path, the optimal clustering can be given based on the pheromone. Finally, the centers of the Gaussian membership function are determined on the cluster centroid.Figure 2
The K-means ant algorithm flow chart.


## 3.2. Parameter Estimation by Using Genetic Algorithm

Genetic algorithm (GA) is a meta-heuristic method used to find a solution based on biological evolution process. The process includes crossover, natural selection, and mutation to obtain an individual with the best gen combination. GA begins with determination of chromosome set (solution set) in terms of binary (1 and 0). Next, the selection is conducted based on the fitness value. The chromosome with the highest fitness value is retained while the rest are removed. The selected chromosomes, then, experience reproduction process to be parents.As the aim is to minimize the error between the output of fuzzy model and output data, in the paper, the mean of squared error (MSE) is used as a proper evaluation function. MSE is given by(3.3)MSE=1M∑i=1M[Yi-yi]2,
where Yi is output from Fuzzy model, yi is output data, and M is number of data pairs.Since the objective is to minimize MSE value, the fitness function is defined as follows:(3.4)Jk=-MSEk+max(MSE),
where k is the kth chromosome.If the normalized fitness functionfk(i) is used, it can be calculated by using
(3.5)fk(i)=Jk(i)∑i=1nJk(i),
where Jk(i) is the fitness function for chromosome i.The algorithm flow chart of the parameter estimation by using genetic algorithm is shown in Figure3. Firstly, we sample output data of the original system, write the objective function based on equation and then initialize the algorithm parameters number individual NIND, maximum genetic times MAXGEN, number variable NVAR, variable precision PRECI, generation gap GGAP, and genetic counter GEN. Then the initial population A^,B^,i=1,2,…,k with lines NIND, columns NVAR*PRECI is generated randomly. The following step is calculating fitness function value for different data in different state, then select, crossover, mutate, and calculate a new objective function value and track the performance of the solution. Selection process is used to determine two chromosomes to be the parents. Crossover is used to produce two new individuals. Generate initial population: initial solution is a randomly generated digit that has NIND line and NVAR*PRECI row. We calculate fitness function value under different data in different state, then select, crossover, mutate and calculate a new objective function value and track the performance of the solution. Selection process is used to determine two chromosomes to be the parents. Crossover is used to produce two new individuals. Repeat like this until GEN>MAXGEN performance index is satisfied. Finally, the optimal A^,B^,i=1,2,…,k are obtained.Figure 3
The genetic algorithm flow chart.


## 4. An Illustrative Example

In order to verify the effectiveness of proposed method, an example is given. Consider a system is composed of three springs and masses, see Figure4.Figure 4
Spring mass system.The dynamic characteristic of the model can be simplified as(4.1)m1x¨1+(k1+k2)x1-k2x2=F1sinω1t,m2x¨2-k2x1+(k2+k3)x2-k3x3=F2sinω2t,m3x¨3-k3x2+k3x3=F3sinω3t.
By choosing states Z1=x1,Z2=x˙1,Z3=x2,Z4=x˙2,Z5=x3,Z6=x˙3 and output variables y1=Z1,y2=Z3,y3=Z5, then the state-space model can be obtained:
(4.2)[Z˙1Z˙2Z˙3Z˙4Z˙5Z˙6]=[010000-k1+k2m10k2m1000000100k2m20-k2+k3m20k3m2000000100k3m30-k3m30][Z1Z2Z3Z4Z5Z6]+[0001m10000001m20000001m3][F1sinω1tF2sinω2tF3sinω3t],[y1y2y3]=[100000001000000010][Z1Z2Z3Z4Z5Z6].For the real system,F1=F2=F3=1500N, ω1=ω2=ω3=260rad/s, k1=k2=k3=2000N/M, and m1=m2=m3=0.5kg.Suppose the input function is sine wave, for each state sample 250 points during half a cycle, and then cluster the data by using K-means ant cluster algorithm; the parameters are setting as: the number of cluster centroidsk=3, the number of ants n=300, the number of maximum iterations NC_MAX=500, the permanence coefficient of the pheromone ρ=0.1, the constant Q=0.9, then the centroids can be optimized to
(4.3)[k1k2k3]=[-1.501.5-2.302.3-2.702.7].We sample the output data of the original system and the T-S fuzzy model and calculate T-S fuzzy model consequent parameters using genetic algorithm according to the performance index (3.3). In order to reduce iteration times, the initialization parameters are chosen through the least square method. The consequent parameters are calculated as
(4.4)[a11a12a13a21a22a23a31a32a33]=[0.00010.00010.0001-1.43290.00010.00010.0001-2.42510.00010.00010.0001-2.93700.00030.00030.0003-0.11270.00050.00050.0005-0.15740.00060.00060.0006-0.17030.00050.00050.0005-0.07340.00090.00090.0009-0.14750.00110.00110.0011-0.1965].The parameter optimization process ofa11 by using the genetic algorithm is shown in Figure 5. It can be seen from the figure that the parameters become stable when the Genetic algorithm has had 10 runs. And after a period of input simulation, the states of the original system and the T-S fuzzy model are shown in Figure 6. From the figures, we can see that the responses of the fuzzy model can approximate the original system responses very well. And the model approximation error of different methods are shown in Table 1, we can see from the table that the method proposed in the paper is more appropriate.Table 1
Comparison of different methods.
Methods
No. of centers
No. of parameters
MSE
Subtraction clustering algorithm and least squares algorithm
3
12
0.0202
C-means clustering and least squares algorithm
3
12
0.0133
Ant  colony algorithm and genetic algorithm
3
17
0.0105Figure 5
Optimization process.Response curve.
(a)
output ofy1
(b)
output ofy2
(c)
output ofy3


## 5. Conclusion

This paper considered the identification of T-S fuzzy model in which the control variables and the state variables are all premise variables. Ant K-means algorithm and genetic algorithm were used to determine the number of the rules and the state-space model parameters, respectively. The simulation results illustrated the effectiveness of the proposed algorithm. Future work will investigate determination of the optimal cluster number for a certain amount of data.



---

*Source: 893807-2012-11-21.xml*