## 2 T-S Identification Method
### Fuzzy Clustering
#### 3.1.2 Fuzzy GK Clustering Algorithm  
The standard FCM algorithm was extended by [PERSON] (GK) [17] by employing an adaptive norm distance, with the aim of detecting clusters of different geometric shapes within a dataset. In this way, each cluster has its own norm-inducing matrix A\({}_{i}\) that produces its own inner product norm, as shown in (42):  
\[D_{ikA}^{2}=(x_{k}-v_{i})^{T}A_{i}(x_{k}-v_{i}),\ \ \ 1\leq i\leq c,\ 1\leq k\leq N. \tag{42}\]  
The matrices A\({}_{i}\) are used as optimization variables, and allow each cluster to adapt the distance to the topological structure of the data. The objective function of the GK algorithm is defined by (43):  
\[J(X,U,V,A)=\sum_{i=1}^{c}\sum_{k=1}^{N}u_{ik}^{m}D_{ikA_{i}}^{2}. \tag{43}\]  
However, this equation cannot be minimized directly with respect to A\({}_{i}\), as it is linear in A\({}_{i}\). This means that J can be made as small as desired simply by making A\({}_{i}\) less positive definite. To obtain a feasible solution, A\({}_{i}\) must be somehow bounded. To optimize the shape of the cluster while keeping its volume constant, we can vary the determinant of the matrix A\({}_{i}\) such that  
\[\|\text{A}_{i}\|=\rho_{i},\ \rho>0, \tag{44}\]  
where \(\rho_{i}\) is adjusted for each cluster. Using the Lagrange multiplier method, we obtain  
\[\text{A}_{i}=[\rho_{i}\text{det}(F_{i})]^{\frac{1}{2}}F_{i}^{-1}, \tag{45}\]where F\({}_{i}\) is the fuzzy covariance matrix in cluster i, defined in (46)  
\[F_{i}=\frac{\sum_{k=1}^{N}u_{ik}^{m}(x_{k}-v_{i})(x_{k}-v_{i})^{T}}{\sum_{k=1}^{N }u_{ik}^{m}}. \tag{46}\]  
Note that substituting (45) and (46) into (42) provides a distance determined by the quadratic norm between x\({}_{k}\) and the cluster center v\({}_{i}\), where the covariance is determined by the degrees of membership in U. The fuzzy GK clustering algorithm is outlined in Figure 3, which provides a structured flowchart of its main stages. The individual steps are as follows. * Step 1: Given a dataset X, choose the number of \(1<c<N\) clusters, the weight exponent m \(>1\), the termination tolerance \(\varepsilon>0\), and the norm inducing matrix A. Initialize the partition matrix randomly such that U\({}^{(0)}\) has arbitrary values. * Step 2: Calculate the cluster centers as specified below, where l is the number of the current iteration of the algorithm. \[v_{i}^{(l)}=\frac{\sum_{k=1}^{N}\left(u_{ik}^{(l-1)}\right)^{m}x_{k}}{\sum_{ k=1}^{N}\left(u_{ik}^{(l-1)}\right)^{m}}\quad 1\leq i\leq c.\] (47)
* Step 3: Determine one of the obtained centers as the chosen center. This center will be the same in all iterations. * Step 4: Calculate the covariance matrix of the clusters such that \[F_{i}^{(l)}=\frac{\sum_{k=1}^{N}\left(u_{ik}^{(l-1)}\right)^{m}\left(x_{k}-v_ {i}^{l}\right)\left(x_{k}-v_{i}^{l}\right)^{T}}{\sum_{k=1}^{N}\left(u_{ik}^{( l-1)}\right)^{m}}\,1\leq i\leq c.\] (48)
* Step 5: Add a scaled identity matrix \[F_{i}=(1-\gamma)F_{i}+\gamma(F_{0})^{\frac{1}{2}}I.\] (49)
* Step 6: Extract the eigenvalues \(\lambda_{ij}\) and eigenvectors \(\phi_{ij}\), find \(\lambda_{i,max}=max_{j}\lambda_{ij}\), and set \[\lambda_{i,max}=\frac{\lambda_{ij}}{\beta},\ \forall j\ for\ which\ \lambda_{i,max}/\lambda_{ij}\geq\beta.\] (50)
* Step 7: Reconstruct \(F_{i}\) with the following form: \[F_{i}=\ \Big{[}\ \phi_{l1}\ \ \ \cdots\ \ \phi_{in}\ \Big{]}diag(\lambda_{l1},\ldots,\lambda_{in})\Big{[}\ \phi_{l1}\ \ \cdots\ \ \phi_{in}\ \Big{]}^{-1}.\] (51)
* Step 8: Calculate the distances \[J(X,U,V,A)=\sum_{i=1}^{c}\sum_{k=1}^{N}u_{ik}^{m}D_{ikA_{i}}^{2}. \tag{43}\]0 (52)
* Step 9: Update the partition matrix U as follows: \[J(X,U,V,A)=\sum_{i=1}^{c}\sum_{k=1}^{N}u_{ik}^{m}D_{ikA_{i}}^{2}. \tag{43}\]1 (53)
* Step 10: Repeat the above steps until fulfilling\[J(X,U,V,A)=\sum_{i=1}^{c}\sum_{k=1}^{N}u_{ik}^{m}D_{ikA_{i}}^{2}. \tag{43}\]2  
After the centers and the covariance matrix F have been obtained by the algorithm, it is necessary to include a fuzzification based on the GK formulas for the T-S identification and fuzzy controller stages.