# Adaptive Fuzzy-Based Fault-Tolerant Control of a Continuum Robotic System for Maximly Sinus Surgery
## 3 Proposed Method for Fault Estimation, Detection, Identification and Tolerant Control
### Takagi-Sugeno (T-S) Fuzzy Advanced Observer
\begin{array}{l}\hat{X}_{q,F,\tau(\text{(}RFLO)}(k+1)=[\alpha_{X} \hat{X}_{q,F,\tau(\text{(}RFLO)}+\alpha_{U}U_{F,\tau}(k)+\alpha_{Y}\hat{Y}_{q( \text{(}RFLO)}(k)+\alpha_{F}f_{fuzzy(\text{(}RFLO)})]\\ +\hat{\delta}_{\text{(}RFLO)}(k)+\alpha_{P}(Y_{q}(k)-\hat{Y}_{q(\text{(}RFLO)} (k))+f(\hat{X}_{q,F,\tau(\text{(}RFLO)},U)+I^{-1}(\alpha_{P}(Y_{q}(k)-\hat{Y} _{q(\text{(}RFLO)}(k)))\\ \hat{Y}_{q(\text{(}RFLO)}(k+1)=(\kappa)^{T}\hat{X}_{q,F,\tau(\text{(}RFLO)}(k) \\ \end{array} \right. \tag{21}\]  
\[ \begin{array}{l}\delta_{\text{(}RFLO)}(k+1)=I^{-1}(\delta_{\text{(}FLO)}(k)+\alpha_{P}(Y_{q}(k)-\hat{Y}_{q(\text{(}RFLO)}(k)))+(\kappa_{VSO}) \|(Y_{q}(k)-\hat{Y}_{q(\text{(}RFLO)}(k))\|^{0.5}\times\\ \text{sgn}(Y_{q}(k)-\hat{Y}_{q(\text{(}RFLO)}(k))-\hat{\delta}_{\text{(}RFLO )}(k)\\ \end{array}  \tag{22}\]  
The state and fault estimation errors in the fuzzy ARX-Laguerre robust feedback linearization observer based on the variable structure algorithm are represented by Equation (23). \[\left\{ \begin{array}{l}\widetilde{X}_{q,F,\tau(\text{(}RFLO)}(k)=X_{q,F, \tau}(k)-\hat{X}_{q,F,\tau}(\text{(}RFLO)}(k)\\ \widetilde{\delta}_{\text{(}RFLO)}(k)=\delta(k)-\hat{\delta}_{\text{(}RFLO )}(k)\\ \end{array} \right., \tag{23}\]  
where \(\hat{X}_{q,F,\tau}(\text{(}RFLO)}(k),\hat{Y}_{q(\text{(}RFLO)}(k),\hat{\delta }_{\text{(}RFLO)}(k),\kappa_{VSO},\widetilde{X}_{q,F,\tau(\text{(}RFLO)}(k),\) and \(\widetilde{\delta}_{\text{(}RFLO)}(k)\) are state estimation, the fuzzy ARX-Laguerre robust feedback linearization output estimation, fault estimation, the observer coefficient, state estimation error, and fault estimation error, respectively, all based on fuzzy ARX-Laguerre robust feedback linearization. The fuzzy ARX-Laguerre robust feedback linearization observer based on the variable structure technique amended the robustness of the fuzzy ARX-Laguerre feedback linearization observer; however, to improve fault estimation accuracy, the fuzzy ARX-Laguerre T-S fuzzy robust feedback linearization technique is recommended. The T-S fuzzy observer is represented by the following function [28]. \[\text{IF }r_{a}(k)\text{ is }TH_{a}\text{ and }r_{s}(k)\text{ is }TH_{s}\text{THEN}\delta_{fuzzy}(k+1)=\delta_{fuzzy}(k)+\alpha_{fuzzy}(Y_{q}(k)- \hat{Y}_{q}(k)), \tag{24}\]  
Here, \(r_{a}(k),r_{s}(k),(TH_{a},TH_{s}),\delta_{fuzzy}(k),\) and \(\alpha_{fuzzy}\) are the residual signal for the actuator fault, residual signal for the sensor fault, threshold values for the actuator and sensor faults, faulty signal estimator based on the T-S fuzzy algorithm, and the fuzzy coefficient, respectively. Based on Equation (24), the rule base for the T-S fuzzy technique to estimate the fault is represented by the following Equation. \[\delta_{fuzzy}:\left\{ \begin{array}{l}\text{IF }r_{a}(k)\text{ is }TH_{a}\text{ and }r_{s}(k)\cong 0\text{ THEN }\hat{\delta}_{fuzzy}(k+1)=\delta_{fuzzy}(k)+\alpha_{fuzzy}(Y_{q}(k)-\hat{Y}_{q}(k) )\\ \text{IF }r_{a}(k)\cong 0\text{ and }r_{s}(k)\text{ is }TH_{s}\text{ THEN }\hat{\delta}_{fuzzy}(k+1)=\delta_{fuzzy}(k)+\alpha_{fuzzy}(Y_{q}(k)-\hat{Y}_{q}(k) )\\ \text{IF }r_{a}(k)\text{is }TH_{a}\text{ and }r_{s}(k)\text{ is }TH_{s}\text{ THEN }\hat{\delta}_{fuzzy}(k+1)=\delta_{fuzzy}(k)+\alpha_{fuzzy}(Y_{q}(k)-\hat{Y}_{q}(k) )\\ \end{array} \right. \tag{25}\]  
Here, \((\alpha_{1 fuzzy},\alpha_{2 fuzzy},\alpha_{3 fuzzy},),TH_{a}\) and \(TH_{s}\) are fuzzy estimator coefficients for actuator fault, sensor fault, and actuator-sensor fault and actuator and sensor thresholds, respectively. ConcerningEquations (21), (22), and (25), the fuzzy ARX-Laguerre T-S fuzzy robust feedback linearization observer is represented by Equations (26) and (27). \[\left\{ \begin{array}{l}\hat{X}_{q,F_{c}\tau(p)}(k+1)=[\alpha_{X}\hat{X}_{q,F_{c} \tau(p)}+\alpha_{U}U_{F_{c}\tau}(k)+\alpha_{Y}\hat{Y}_{q(p)}(k)+\alpha_{F}f_{fuzzy (p)}]\\ +\delta_{(p)}(k)+\alpha_{P}(Y_{q}(k)-\hat{Y}_{q(p)}(k))+f(\hat{X}_{q,F_{c}\tau (p)},U)+I^{-1}(\alpha_{P}(Y_{q}(k)-\hat{Y}_{q(p)}(k)))\\ \hat{Y}_{q(p)}(k+1)=(\kappa)^{T}\hat{X}_{q,F_{c}\tau(p)}(k)\end{array} \right.