# An Easily Understandable Grey Wolf Optimizer and Its Application to Fuzzy Controller Tuning
## 2 Problem Setting  
The control system structure is presented in Figure 1, where: P--the process, which belongs to a family of nonlinear servo systems, FC--the fuzzy controller, F--the reference input filter, \(r\)--the reference input, \(r_{1}\)--the reference input filtered through F, \(y\)--the controlled output, \(u\)--the control signal, and \(e\)--the control error. The load-type disturbance inputs are not applied in Figure 1 as the integral component of the controller copes with them. The family of servo systems is characterized by the state-space model  
Figure 1: Structure of the fuzzy control system, \(e=r_{1}-y\). \[m(t)= \begin{cases}\begin{array}{cc}-1,&\text{if }u(t)\leq-u_{b},\\ \left[u(t)+u_{c}\right]/(u_{b}-u_{c}),&\text{if }-u_{b}<u(t)<-u_{c},\\ 0,&\text{if }-u_{c}\leq\left|u(t)\right|\leq u_{a},\\ \left[u(t)-u_{a}\right]/(u_{b}-u_{a}),&\text{if }u_{a}<u(t)<u_{b},\\ 1,&\text{if }u(t)\geq u_{b},\\ \end{array}\\ \left[\begin{array}{c}\dot{x}_{1}(t)\\ \dot{x}_{2}(t)\end{array}\right]=\left[\begin{array}{cc}0&1\\ 0&-1/T_{\Sigma}\end{array}\right]\left[\begin{array}{cc}x_{1}(t)\\ x_{2}(t)\end{array}\right]+\left[\begin{array}{cc}0\\ k_{P}/T_{\Sigma}\end{array}\right]m(t),\end{cases}  \tag{1}\]  
where: \(t\geq 0\)--the continuous time, \(k_{P}>0\)--the servo system gain, \(T_{\Sigma}>0\)--the small time constant, \(u(t)\)--a pulse width modulated signal, \(x_{1}(t)=\alpha(t)\)--the angular position, \(x_{2}(t)=\omega(t)\)--the angular speed, \(m(t)\)--the output of the saturation and dead zone static nonlinearity with the parameters that fulfill \(0<u_{a}<u_{b}\), \(0<u_{c}<u_{b}\), and \(T\)--matrix transposition. The nonlinearity in Equation (1) is neglected in the transfer function of the simplified model of the process  
\[P(s)=k_{EP}/[s(1+T_{\Sigma}s)], \tag{2}\]  
where \(k_{EP}\) is the equivalent process gain, with the expression  
\[k_{EP}= \begin{cases}k_{P}/(u_{b}-u_{c}),&\text{if }-u_{b}<u(t)<-u_{c},\\ k_{P}/(u_{b}-u_{a}),&\text{if }u_{a}<u(t)<u_{b}.\end{cases}  \tag{3}\]  
The transfer function \(P(s)\) is used in linear and fuzzy controller design, and PI controllers are recommended in [25; 26]. The PI controllers are used in the block FC in Figure 1 and their transfer function is  
\[C(s)=k_{c}(1+sT_{i})/s=k_{C}[1+1/(sT_{i})],\;k_{C}=k_{c}T_{i}, \tag{4}\]  
where \(k_{C}>0\) (or \(k_{c}>0\)) is the controller gain and \(T_{i}>0\) is the integral time constant. Since the simplified model \(P(s)\) is used in the controller design, and it is characterized by only two parameters, it is justified to consider that the process parameters \(k_{P}\) and \(T_{\Sigma}\) are variable and the other ones are constant. The process parameter vector is  
\[\boldsymbol{\alpha}=\left[ \begin{array}{cc}\alpha_{1}&\alpha_{2}\end{array}  \right]^{T}=\left[ \begin{array}{cc}k_{P}&T_{\Sigma}\end{array} \right]^{T}, \tag{5}\]  
which leads to the definition of the state sensitivity functions \(\lambda_{\upsilon}^{\alpha_{j}}\), \(\upsilon=1...n\), and the output sensitivity function \(\sigma\):  
\[\lambda_{\upsilon}^{\alpha_{j}}=\left[\frac{\partial x_{\upsilon}}{\partial x _{j}}\right]_{0},\sigma^{\alpha_{j}}=\left[\frac{\partial y}{\partial\alpha_{ j}}\right]_{0},\upsilon=1...n,\;j\in\{1,2\}, \tag{6}\]  
where the subscript \(0\) is inserted to outline the nominal value of the process parameter \(\alpha_{j},j\in\{1,2\}\), and \(n\) is the number of state variables of the fuzzy control system. The Extended Symmetrical Optimum (ESO) method [25; 26] is recommended to tune the two PI controller parameters because it ensures a compromise to the control system performance indices (percent overshoot, settling time, rise time, phase margin, etc.) of the linear control system by means of a single design parameter \(\beta\) within the recommended domain \(1<\beta\leq 20\).