## 5 Experiments
### Controllers Optimization
#### 5.2.1 Fuzzy controller  
The motor position is regulated with a Type-1 (T1) fuzzy controller, which is composed of two inputs and one output, granulated into trapezoidal and triangular membership functions. The mathematical expression of the trapezoidal membership function is described in Equation (27), and the triangular membership function is described in Equation (28), and the membership functions parameters are presented in Table 22, and the fuzzy system contains 15 fuzzy rules, which are shown in Figure 6.  
\[trapmf(x,a,b,c,d)=\left\{ \begin{array}{rl}0,&x\leq a\\ \frac{x-a}{b-a},&a\leq x\leq b\\ 1,&b\leq x\leq c\\ \frac{d-x}{d-c},&c\leq x\leq d\\ 0,&x\geq d\end{array} \right. \tag{27}\]  
\[trimf(x,a,b,c)=\left\{ \begin{array}{rl}0,&x\leq a\\ \frac{x-a}{b-a},&a\leq x\leq b\\ \frac{c-x}{c-b},&b\leq x\leq c\\ 0,&c\geq x\end{array} \right. \tag{28}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{2}{c}{} & \multicolumn{2}{c}{Input _Error_} & \\ MF & A & b & c & d \\ NegV & \(-1\) & \(-1\) & \(-0.5\) & 0 \\ CeroV & \(-0.5\) & 0 & 0.5 & - \\ PosV & 0 & 0.5 & 1 & 1 \\ \hline \multicolumn{4}{c}{Input _Error Change_} \\ ErrNeg & \(-1\) & \(-1\) & \(-0.4\) & \(-0.1\) \\ ErrNegM & \(-0.4\) & \(-0.2\) & 0 & - \\ SinErr & \(-0.09\) & 0 & 0.10 & - \\ ErrMaxM & 0 & 0.2 & 0.4 & - \\ ErrMax & 0.1 & 0.4 & 1 & - \\ \hline \hline \end{tabular}
\end{table} 
Table 22: Type-1 membership functions. Figure 5: Motor position plant. \begin{table}
\begin{tabular}{c c c} \hline \hline \multicolumn{2}{c}{} & \multicolumn{2}{c}{Input _Error_} \\ MF & A & b & c & d \\ NegV & \(-1\) & \(-1\) & \(-0.5\) & 0 \\ CeroV & \(-0.5\) & 0 & 0.5 & - \\ PosV & 0 & 0.5 & 1 & 1 \\ \hline \multicolumn{4}{c}{Input _Error Change_} \\ ErrNeg & \(-1\) & \(-1\) & \(-0.4\) & \(-0.1\) \\ ErrNegM & \(-0.4\) & \(-0.2\) & 0 & - \\ SinErr & \(-0.09\) & 0 & 0.10 & - \\ ErrMaxM & 0 & 0.2 & 0.4 & - \\ ErrMax & 0.1 & 0.4 & 1 & - \\ \hline \hline \end{tabular}
\end{table} 
Table 21: Parameters of the motor position. A graphic representation of Table 22 is illustrated in Figure 6. The contents of the fuzzy system are two inputs and one output. The first input, called _Error_, is composed of three membership functions, both of the edges are of the trapezoidal type, and the central is triangular. The second input, called _Error Change_, contains five functions of membership, two of the edges are the trapezoidal type, and the three central ones are the triangular type. Finally, the output, called _Voltage_, contains five functions of membership, two of the edges are the trapezoidal type, and the three central ones are the triangular type. Figure 7 represents the surface of the fuzzy system for the motor position and Table 23 summarize the rules of the controller. The proposed ST2 FHS and ST2 FDE methods are used to optimize the values of the membership functions of the motor position controller in order to minimize the RMSE error described in Equation (29). Figure 8 shows the vector that represents the information of the individuals. \[RMSE=\sqrt{\frac{1}{N}\sum_{t=1}^{N}(x_{t}-\hat{x}_{t})^{2}} \tag{29}\]  
The vector contains the information of each individual; the latter represents each position of the triangular or trapezoidal membership function. In total, there are 44 positions of which 25 are fixed and 20 are optimized. The limits of the positions that are optimized are shown in Table 24.  
Tables 25 and 26 show the results obtained by optimizing the parameters of the DC Motor controller, with the ST2 FHS and ST2 FDE methods, respectively. The noise applied to this controller is 0.5 (Gaussian random number). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Voltage** & & & **Error Change** \\ \hline \multirow{4}{*}{**Error**} & ErrNeg & ErrNeg\_M & SinErr & ErrMax\_M & ErrMax \\  & NegV & Dis & Dis & Dis & Dis\_m \\  & CeroV & Aum\_m & Aum\_m & Man & Dis\_m \\  & PosV & Aum\_m & Aum & Aum & Aum \\ \hline \hline \end{tabular}
\end{table} 
Table 23: Fuzzy rules for the controller.