# Optimized-Based Fault-Tolerant Control of an Electro-Hydraulic System with Disturbance Rejection
## 3 Proposed Control Scheme
### Disturbance Observer-Based NTSMC Design
The final control law of the optimal force controller can be constructed as follows:  
\[\hat{u}^{*}=g_{3}\bigg{(}-k_{3}e_{3}-f_{3}-\hat{\sigma}_{2}-\frac{1}{2}\hat{ \phi}_{a}^{T}h\bigg{)} \tag{33}\]  
where \(\hat{\phi}_{a}\) is the estimation of actor NN optimal weight \(\phi^{*}\), and the adaptive law of the actor NN weight is determined as Ref. [34]:  
\[\dot{\hat{\phi}}_{a}=-hh^{T}\big{(}\beta_{a}\big{(}\hat{\phi}_{a}-\hat{\phi}_ {c}\big{)}+\beta_{c}\hat{\phi}_{c}\big{)} \tag{34}\]where \(\beta_{a}\) is a positive constant. Applying \(\hat{u}^{*}\) and \(\hat{f}_{e_{3}}^{*}\) to (25), the approximation of the HJB equation yields  
\[ \begin{array}{l}H\big{(}e_{3},\hat{u}^{*},\hat{f}_{e_{3}}^{*}\big{)}=e_{3}^{2}+ s_{3}^{2}\Big{(}k_{3}e_{3}+f_{3}+\hat{\omega}_{2}+\frac{1}{2}\hat{\phi}_{a}^{T}h \Big{)}^{2}\\ +\big{(}2k_{3}e_{3}+2f_{3}+2\hat{\omega}_{2}+\hat{\phi}_{c}^{T}h\big{)}\\ \times\Big{(}f_{3}-g_{3}^{2}\Big{(}k_{3}e_{3}+f_{3}+\hat{\omega}_{2}+\frac{1}{ 2}\hat{\phi}_{a}^{T}h\Big{)}+\sigma_{2}-\dot{\alpha}_{2}\Big{)}\end{array}  \tag{35}\]  
Defining the residual error between the HJB and its approximation, we have  
\[\varepsilon=H\big{(}e_{3},\hat{u}^{*},\hat{f}_{e_{3}}^{*}\big{)}-H\big{(}e_{3 },u^{*},\hat{f}_{e_{3}}^{*}\big{)}=H\big{(}e_{3},\hat{u}^{*},\hat{f}_{e_{3}}^{ *}\big{)} \tag{36}\]  
and considering the optimized solution \(\hat{u}^{*}\) is expected to satisfy, the following equality is derived:  
\[\frac{\partial H}{\partial\hat{\phi}_{a}}=g_{3}^{2}hh^{T}\big{(}\hat{\phi}_{a }-\hat{\phi}_{c}\big{)}=0 \tag{37}\]  
Under the premise that (37) is warranted, the RL updating laws are given by the establishment of a non-negative function, as follows:  
\[Q=\big{(}\hat{\phi}_{a}-\hat{\phi}_{c}\big{)}^{T}\big{(}\hat{\phi}_{a}-\hat{ \phi}_{c}\big{)} \tag{38}\]  
With the differentiation of (38) with respect to time, one obtains  
\[ \begin{array}{l}\frac{dQ}{dt}=\frac{\partial Q}{\partial\hat{\phi}_{c}}\hat {\phi}_{c}+\frac{\partial Q}{\partial\hat{\phi}_{a}}\hat{\phi}_{a}=-2\big{(} \hat{\phi}_{a}-\hat{\phi}_{c}\big{)}\big{(}-\beta_{c}hh^{T}\hat{\phi}_{c}\big{)} \\ +2\big{(}\hat{\phi}_{a}-\hat{\phi}_{c}\big{)}\big{(}-hh^{T}\big{(}\beta_{a} \big{(}\hat{\phi}_{a}-\hat{\phi}_{c}\big{)}+\beta_{c}\hat{\phi}_{c}\big{)} \big{)}\\ =-2\beta_{a}\big{(}\hat{\phi}_{a}-\hat{\phi}_{c}\big{)}hh^{T}\big{(}\hat{\phi} _{a}-\hat{\phi}_{c}\big{)}\leq 0\end{array}  \tag{39}\]  
From (38), (39), it is concluded that \(Q=0\) can be obtained by using the updating laws (32) and (34), and then (37) can be satisfied as well. Choose the overall Lyapunov function candidate for the system as  
\[V=V_{1}+\frac{1}{2}e_{3}^{2}+\frac{1}{2}\tilde{\phi}_{a}^{T}\tilde{\phi}_{a}+ \frac{1}{2}\tilde{\phi}_{c}^{T}\tilde{\phi}_{c}+\frac{1}{2}\tilde{\sigma}_{2 }^{2} \tag{40}\]  
where \(\tilde{\phi}_{a}=\hat{\phi}_{a}-\phi^{*},\tilde{\phi}_{c}=\hat{\phi}_{c}-\phi^ {*}\) are the NN weight errors. The time derivative of \(V\) is derived by  
\[ \begin{array}{l}\dot{V}=\dot{V}_{1}+e_{3}\dot{e}_{3}+\tilde{\phi}_{a}^{T} \dot{\tilde{\phi}}_{a}+\tilde{\phi}_{c}^{T}\dot{\tilde{\phi}}_{c}+\tilde{ \sigma}_{2}\dot{\tilde{\sigma}}_{2}\\ =-k_{1}|s|-\gamma_{1}s^{2}-\gamma_{2}s^{\theta+1}+se_{3}-L_{1}\tilde{\sigma}_ {1}^{2}+\bar{\sigma}_{1}\dot{\sigma}_{1}\\ +e_{3}\Big{(}\varphi_{3}+g_{3}^{2}\Big{(}-k_{3}e_{3}-f_{3}-\bar{\sigma}_{2}- \frac{1}{2}\hat{\phi}_{a}^{T}h\Big{)}+\sigma_{2}-\dot{\alpha}_{2}\Big{)}\\ -\tilde{\phi}_{a}^{T}hh^{T}\big{(}\beta_{a}\big{(}\hat{\phi}_{a}-\hat{\phi}_{c} \big{)}+\beta_{c}\hat{\phi}_{c}\big{)}-\beta_{c}\tilde{\phi}_{c}^{T}hh^{T} \hat{\phi}_{c}+\widetilde{\sigma}_{2}\big{(}\sigma_{2}-L_{2}\widetilde{\sigma }_{2}\big{)}\end{array}  \tag{41}\]  
Using Young's inequality, one obtains  
\[\begin{array}{l}se_{3}\leq\frac{1}{2}s^{2}+\frac{1}{2}e_{3}^{2}\\ \widetilde{\sigma}_{1}\dot{\sigma}_{1}\leq\frac{1}{2}\tilde{\sigma}_{1}^{2}+ \frac{1}{2}\tilde{\sigma}_{1}^{2}\\ e_{3}f_{3}\leq\frac{1}{2}e_{3}^{2}+\frac{1}{2}f_{3}^{2}\\ e_{3}\sigma_{2}\leq\frac{1}{2}e_{3}^{2}+\frac{1}{2}\Substituting (42) to (41) yields  
\[