# A Data-Driven Approach of Takagi-Sugeno Fuzzy Control of Unknown Nonlinear Systems
## 3 Identification of Takagi-Sugeno Fuzzy Model
\right]_{ \textbf{x}=\textbf{x}_{k},\textbf{u}=\textbf{u}_{k}}, \tag{4}\]  
By taking the partial derivative of Equation (2) with respect to \(x_{q}\), one can get  
\[\frac{\partial f_{p}(\textbf{x},\textbf{u})}{\partial x_{q}}=\frac{\sum\limits _{l=1}^{M_{p}}w_{p}l^{l}a_{p}^{l}\sum\limits_{l=1}^{M_{q}}a_{p}^{l}q_{p}^{l}- \sum\limits_{l=1}^{M_{p}}a_{p}^{l}\sum\limits_{l=1}^{M_{p}}w_{p}^{l}a_{p}^{l}q _{p}^{l}}{\left(\sum\limits_{l=1}^{M_{p}}a_{p}^{l}\right)^{2}}, \tag{5}\]  
where  
\[ \begin{array}{c}a_{p}^{l}=\prod\limits_{i=1}^{n}e^{-\frac{1}{2}(\frac{x_{i} (k)-x_{ip}^{l}}{\sigma_{ip}^{l}})}\prod\limits_{j=1}^{2}e^{-\frac{1}{2}(\frac{x_ {i}(k)-x_{ip}^{l}}{\sigma_{ip}^{l}})^{2}}\\ q_{p}^{l}=\frac{x_{q}(k)-x_{qp}^{l}}{\left(\sigma_{ip}^{l}\right)^{2}}\end{array}  \tag{6}\]  
Figure 1: Structure of the FBFN. Similarly,  
\[\textbf{B}_{k}=\left[ \begin{array}{ccc}\frac{\partial f_{1}(\textbf{x},\textbf{u} )}{\partial u_{1}}&\cdots&\frac{\partial f_{1}(\textbf{x},\textbf{u})}{\partial u _{m}}\\ \vdots&\ddots&\vdots\\ \frac{\partial f_{n}(\textbf{x},\textbf{u})}{\partial u_{1}}&\cdots&\frac{ \partial f_{n}(\textbf{x},\textbf{u})}{\partial u_{m}}\end{array} \right]_{ \textbf{x}=\textbf{x}_{\textbf{u}},\textbf{u}=\textbf{u}_{k}}, \tag{7}\]  
where \(\partial f_{p}(\textbf{x},\textbf{u})/\partial u_{q}\) has the same expression as Equation (5) except that:  
\[q_{p}^{l}=\frac{u_{q}(k)-u_{qp}^{l}}{\left(\sigma_{uqp}^{l}\right)^{2}} \tag{8}\]  
For simplicity, and also by neglecting the higher-order terms, Equation (3) can be rewritten as  
\[\dot{\textbf{x}}=\textbf{A}_{k}\textbf{x}+\textbf{B}_{k}\textbf{u}+\textbf{d} _{k}, \tag{9}\]  
where  
\[\textbf{d}_{k}=\textbf{f}(\textbf{x}_{k},\textbf{u}_{k})-\textbf{A}_{k} \textbf{x}_{k}-\textbf{B}_{k}\textbf{u}_{k}. \tag{10}\]  
The affine term \(\textbf{d}_{k}\) is non-null, i.e., \(\textbf{d}_{k}\
eq\textbf{0}\) in general even if the operating point is an equilibrium point other than the origin [23]. Including the affine terms will offer a more accurate local approximation of the system's dynamics around the operating points. Then, the operating points used for linearization need to be chosen carefully to achieve a good global approximation of the original system. Meanwhile, it is desirable to minimize the number of linearization so that the number of fuzzy rules in the T-S fuzzy model can be reduced and the fuzzy controller synthesized in the following section will be more computationally efficient. To reduce the number of linearization points, it is necessary to know which variables among \(\textbf{z}=[z_{l},z_{2},\ \cdots,z_{p}]\) in fuzzy inference are the major sources of nonlinearity. These variables should be assigned more positions while the variables that are minor sources can be assigned fewer positions. A measure to roughly recognize the source of nonlinearity by inspecting the variation of linearized **A**-matrix is presented in Section 5. If the \(i\)-th variable \(z_{i}\) is to be assigned \(p_{i}\) positions \(\{z_{i,1},\ \ldots,\ z_{i,pi}\}\), then by combination of the \(\sum_{i=1}^{p}p_{i}\) positions, there will be \(p=\prod_{i=1}^{p}p_{i}\) operating points in total, i.e., \((\textbf{x}_{k},\textbf{u}_{k})\) (\(k=1,\ 2,\cdots,p\)).