## 5 Adaptive Fuzzy Neural Network Terminal Sliding Mode Control
### Fuzzy Neural Network Global Fast Terminal Sliding Mode Control  
The block diagram of the proposed FNNGFTSMC structure is described in Figure 7. The output of FNN \(\hat{g}\) is designed to approximate the system uncertainties \(g\) as:  
\[\hat{g}=w^{T}\xi(x) \tag{31}\]  
where \(w\) gives the connection weights of FNN, and \(x=[u_{ac}\ u_{acr}]\) is the input vector.  
The global fast terminal sliding controller with FNN to estimate the system uncertainties \(g\) is proposed as in Equation (32):  
\[D=0.5[1+\frac{L_{ac}C_{ac}}{u_{dc}}(\frac{1}{R_{L}C_{ac}}\dot{u}_{ac}+\frac{1} {L_{ac}C_{ac}}u_{ac}+\ddot{u}_{acr}-(\alpha+\beta\frac{q}{p}e^{\frac{q}{p}-1}) \dot{e}-\hat{g}-k\cdot s-\varepsilon_{m}\text{sgn}(s))] \tag{32}\]  
where \(\hat{g}\) is the estimation value of \(g\), \(k\) is a positive constant, and \(\varepsilon_{m}>\left|\epsilon\right|_{\text{max}}\), where \(\left|\epsilon\right|_{\text{max}}\) is a positive constant  
The derivative of the sliding function, Equation (24), is:  
\[\begin{array}{ll}\dot{s}&=\ddot{e}+\alpha\dot{e}+\beta\frac{q}{p}e^{\frac{q} {p}-1}\dot{e}\\ &=\ddot{e}+(\alpha+\beta\frac{q}{p}e^{\frac{q}{p}-1})\dot{e}\\ &=\ddot{u}_{ac}-\ddot{u}_{acr}+(\alpha+\beta\frac{q}{p}e^{\frac{q}{p}-1})\dot {e}\\ &=-\frac{1}{R_{L}C_{ac}}\dot{u}_{ac}-\frac{1}{L_{ac}C_{ac}}u_{ac}+\frac{2D-1}{ L_{ac}C_{ac}}u_{dc}\\ &+g-\ddot{u}_{acr}+(\alpha+\beta\frac{q}{p}e^{\frac{q}{p}-1})\dot{e}\\ \end{array} \tag{33}\]  
Applying Equation (32) to Equation (33) yields:  
\[\dot{s}=g-\hat{g}-k\cdot s-\varepsilon_{m}\text{sgn}(s) \tag{34}\]  
Selecting a Lyapunov function candidate as:  
\[V=\frac{1}{2}s^{2}+\frac{1}{2r}\widetilde{w}^{T}\widetilde{w} \tag{35}\]  
where \(\widetilde{w}=\widehat{w}-w^{*}\) is the estimation error, and \(r\) is a positive constant.  
The derivative of Equation (35) becomes:  
Figure 7: Block diagram of an FNNGFTSMC.  
\[\begin{array}{l}\dot{V}=s\dot{s}+\frac{1}{r}\widetilde{w}^{T}\dot{\widetilde{w}}\\ =s(g-\dot{g}-k\cdot s-\varepsilon_{m}\text{sgn}(s))+\frac{1}{r}\widetilde{w}^{T} \dot{\widetilde{w}}\\ =s(g^{*}+\varepsilon-\dot{g}-k\cdot s)-\varepsilon_{m}|s|+\frac{1}{r} \widetilde{w}^{T}\dot{\widetilde{w}}\\ =s(g^{*}-\dot{g})+s\varepsilon-ks^{2}-\varepsilon_{m}|s|+\frac{1}{r} \widetilde{w}^{T}\dot{\widetilde{w}}\\ =-s\widetilde{w}^{T}\xi+s\varepsilon-ks^{2}-\varepsilon_{m}|s|+\frac{1}{r} \widetilde{w}^{T}\dot{\widetilde{w}}\\ \end{array} \tag{36}\]  
An adaptive law is designed as:  
\[\dot{\widetilde{w}}=\dot{\widetilde{w}}=rs\xi \tag{37}\]  
Substituting Equation (37) into Equation (36) results in:  
\[\begin{array}{l}\dot{V}=s\varepsilon-\varepsilon_{m}|s|-ks^{2}\\ \leq\lvert s\rvert\varepsilon-\varepsilon_{m}\lvert s\rvert-ks^{2}\\ =-(\varepsilon_{m}-\varepsilon)\lvert s\rvert-ks^{2}\leq 0\end{array} \tag{38}\]  
\(\dot{V}\) is negative semi-definite, which ensures that \(V,s,\dot{s}\) are all bounded, and \(V(t)<V(0)<\infty\). Furthermore, \(\dot{V}\leq-ks^{2}\) implies that s is square-integrable as \(\int_{0}^{t}s^{2}dt\leq\frac{1}{k}(V(0)-V(t))\). Since \(\dot{s}\) is bounded, according to the Barbalat lemma, \(s\to 0\) as \(t\rightarrow\infty\).