## 2 New Adaptive Fuzzy PID Controller
### Adaptive Fuzzy PID Control
In these boundaries, \(\varepsilon_{nK\Gamma}\), \(\varepsilon_{nK\Gamma}\) and \(\varepsilon_{nK\Gamma}\) are positive constants. Finally, the control \(u\) of the system is determined as follows. \[u=u_{n1}+u_{n2} \tag{18}\]  
**Remark 1**. : _The modified Riccati-like equation given in Equation (17) is a new format including three parameters of the classical PID control and the fuzzy neural networks model. This format opens a new approach to improve performance of the system through the adaptation laws. The conventional Riccati-like equation is fixed with elements related to the Hamiltonian equation, matrices and vectors of the system. The expansion of the Riccati-like equation proposed in this work can bring a flexibility for calculation and combination with other controllers to enhance control robustness against severe disturbances._  
**Remark 2**. : _To evaluate the stability and robustness of the system, Lyapunov function of the system in Equation (3) is suggested as follows._  
\[V=\frac{1}{2}\mathrm{s}_{\Delta}^{2}+\frac{1}{2}\widetilde{\mathbf{x}}_{ns} \mathbf{P}_{n}\widetilde{\mathbf{x}}_{ns}^{T}+\frac{1}{2\eta_{1}}\widetilde{ \gamma}_{nf}^{2}+\frac{1}{2\eta_{2}}\widetilde{\gamma}_{ng}^{2}+\frac{1}{2 \eta_{3}}\Gamma_{n}^{2}+\frac{1}{2\eta_{4}}K_{P}^{2}+\frac{1}{2\eta_{5}}K_{I} ^{2}+\frac{1}{2\eta_{6}}K_{D}^{2} \tag{19}\]  
Based on the evaluation of the Lyapunov equation, six adaptation laws are found:  
\[\dot{\overline{\gamma}}_{nf}=-\eta_{1}\mathrm{s}_{\Delta}\xi_{nf} \tag{20}\]  
\[\ddot{\overline{\gamma}}_{ng}=-\eta_{2}\mathrm{s}_{\Delta}\xi_{ng}u \tag{21}\]  
\[\dot{\Gamma}_{n}=-\eta_{3}\mathrm{s}_{\Delta}\xi_{fz}\widetilde{\mathbf{x}}_{ ns}\mathbf{P}_{n}\mathbf{S}_{n2}\mathbf{S}_{n2}^{\mathrm{T}}\mathbf{P}_{n} \widetilde{\mathbf{x}}_{ns}^{\mathrm{T}} \tag{22}\]  
\[\dot{K}_{P}=-\eta_{4}\Big{(}\mathrm{s}_{\Delta}\mathbf{S}_{n2}^{\mathrm{T}} \dot{\mathbf{E}}_{n}\mathbf{E}_{n}^{\mathrm{T}}\mathbf{P}_{n}\mathbf{B}_{P}+ \frac{1}{2}\xi_{fz}\widetilde{\mathbf{x}}_{ns}\Big{[}\mathbf{S}_{n2}\mathbf{S}_{ n2}^{\mathrm{T}}\dot{\mathbf{E}}_{n}\mathbf{E}_{n}^{\mathrm{T}}\mathbf{P}_{n} \mathbf{B}_{P}\Big{]}\widetilde{\mathbf{x}}_{ns}^{T}\Big{)} \tag{23}\]  
\[\dot{K}_{D}=-\eta_{6}\Big{(}\mathrm{s}_{\Delta}\mathbf{S}_{n2}^{\mathrm{T}} \dot{\mathbf{E}}_{n}\dot{\mathbf{E}}_{n}^{\mathrm{T}}\mathbf{P}_{n}\mathbf{B}_{P} +\frac{1}{2}\xi_{fz}\widetilde{\mathbf{x}}_{ns}\Big{[}\mathbf{S}_{n2}\mathbf{S}_ {n2}^{\mathrm{T}}\dot{\mathbf{E}}_{n}\dot{\mathbf{E}}_{n}^{\mathrm{T}}\mathbf{P}_{n }\mathbf{B}_{P}\Big{]}\widetilde{\mathbf{x}}_{ns}^{T}\Big{)} \tag{25}\]  
**Theorem 1**. : _The main adaptation laws of the proposed adaptive PID controller given by Equations (20)-(25) are modified to satisfy Lyapunov stability using the projection algorithm as follows._\[\dot{\bar{Y}}_{nf}=\left\{ \begin{array}{cc}-\eta_{1}s_{\Delta}\xi_{nf}&\textbf{ if}\ ||\widetilde{\gamma}_{nf}|<\varepsilon_{nf}\ or\ \left(||\widetilde{\gamma}_{nf}|=\varepsilon_{nf}\ \textbf{and}\ s_{\Delta}\xi_{nf}\widetilde{\gamma}_{nf}\geq 0 \right)\\ -\eta_{1}s_{\Delta}\xi_{nf}+\eta_{1}\frac{(||\widetilde{\gamma}_{nf}||^{2}- \varepsilon_{nf})s_{\Delta}\xi_{nf}\widetilde{\gamma}_{nf}}{\delta_{1}|| \widetilde{\gamma}_{nf}||^{2}}\quad\textbf{if}\ ||\widetilde{\gamma}_{nf}|= \varepsilon_{nf}\ \textbf{and}\ s_{\Delta}\xi_{nf}\widetilde{\gamma}_{nf}<0 \end{array} \right. \tag{26}\]  
\[\dot{\bar{Y}}_{ng}=\left\{ \begin{array}{cc}-\eta_{2}s_{\Delta}\xi_{ng}u& \textbf{if}\ ||\widetilde{\gamma}_{ng}||<\varepsilon_{ng}\ or\ \left(||\widetilde{\gamma}_{g}|= \varepsilon_{ng}\ \textbf{and}\ s_{\Delta}\xi_{ng}u\widetilde{\gamma}_{ng}\geq 0 \right)\\ -\eta_{2}s_{\Delta}\xi_{ng}u+\eta_{2}\frac{(||\widetilde{\gamma}_{ng}||^{2}- \varepsilon_{ng})s_{\Delta}\xi_{ng}u\widetilde{\gamma}_{ng}}{\delta_{2}|| \widetilde{\gamma}_{ng}||^{2}}\quad\textbf{if}\ ||\widetilde{\gamma}_{ng}|= \varepsilon_{ng}\ \textbf{and}\ s_{\Delta}\xi_{ng}u\widetilde{\gamma}_{ng}<0 \end{array} \right. \tag{27}\]  
\[\dot{\Gamma}_{n}=\left\{