# Fault Estimation for Semi-Markov Jump Neural Networks Based on the Extended State Method
## 4 Simulation Example  
This section conducts a MATLAB (R2022b)/Simulink-based simulation to verify the efficiency and accuracy of the proposed state estimation algorithm for discrete-time s-MJNNS, The simulation specifically investigates how the proposed method estimates actuator and sensor faults under different system modes, demonstrating its adaptability and robustness in handling mode-dependent fault dynamics. The system under consideration operates in two distinct modes. These modes, governed by a semi-Markov process, represent different state configurations of the s-MJNNS and influence the dynamic behavior of the s-MJNNS, with the corresponding parameters specified as follows:  
**Mode 1:**  
\[A_{1}= \left[ \begin{array}{cc}0.05&0\\ -0.1&0.2\end{array} \right],\,B_{1}= \left[ \begin{array}{cc}0.1&0.2\\ 0.1&0.3\end{array} \right],\,C_{1}= \left[ \begin{array}{cc}0.3&0.1\\ 0.2&0.3\end{array} \right],\,D_{1}= \left[ \begin{array}{cc}-0.2\\ -0.1\end{array} \right],\,H_{1}= \left[ \begin{array}{cc}0.04&0\\ -0.02&0.02\end{array} \right],\] \[E_{1}= \left[ \begin{array}{cc}-0.015&0.02\\ 0.015&0.02\end{array} \right],\,G_{1}= 1.3,\,F_{1}= \left[ \begin{array}{cc}0.1&-0.2\end{array} \right]\]  
**Mode 2:**  
\[A_{2}= \left[ \begin{array}{cc}0.10&-0.05\\ 0&0.05\end{array} \right],\,B_{2}= \left[ \begin{array}{cc}0.2&0.4\\ 0.2&0.1\end{array} \right],\,C_{2}= \left[ \begin{array}{cc}0.2&0.1\\ 0.3&0.2\end{array} \right],\,H_{2}= \left[ \begin{array}{cc}0.6&0.4\\ 0.2&0.8\end{array} \right],\,G_{2}= 1.3\]  
The transition probability matrix is considered as \(\pi_{12}(\zeta)\in\left[ \begin{array}{cc}0.6&0.8\end{array} \right]\) and \(\pi_{21}(\zeta)\in\left[ \begin{array}{cc}0.1&0.3\end{array} \right]\) From (23) and (24), the transition probability matrices for the s-MJNNS under different parameter sets are derived as follows:  
\[\pi_{1}=\left[ \begin{array}{cc}0.4&0.6\\ 0.1&0.9\end{array} \right],\pi_{2}=\left[ \begin{array}{cc}0.2&0.8\\ 0.3&0.7\end{array} \right]\]  
Then, actuator failure \(fa(g)\) and sensor failure \(fs(g)\) are obtained as follows:  
\[fa(g)=\left\{ \begin{array}{cc}0,&0<g\leq 50,\\ 0.5,0<g\leq 100,\\ 0,&g>100,\end{array} \right.\]  
\[fs(g)=\left\{ \begin{array}{cc}0,&0<g\leq 50,\\ 0.7,0<g\leq 100,\\ 0,&g>100,\end{array} \right.\]  
Moreover, \(\omega(g)=0.1\sin(\pi g)\) and \(f(x(g))=\left[0.5\sin(x_{1}(g))\quad 0.5\sin(x_{2}(g))\right]^{T}\). The other parameters are chosen as \({a_{1}}^{-}={a_{2}}^{-}=0,{a_{1}}^{+}={a_{2}}^{+}=0.5\), \(d_{2}=1\), \(d_{1}=2\), and \(M_{0}=1.5\), and the observer gain matrices are written as follows: \begin{table}
\begin{tabular}{c c c} \hline
**References** & **Systems** & **Method** \\ \hline
[25] & Continuous time stochastic systems & Descriptor system method \\
[26,27] & Discrete-time systems & Descriptor system method \\
[28] & Discrete-time Markov jump systems & Extended state method \\
[29,30] & Switched fuzzy stochastic systems & Extended state method \\ This paper & Discrete-time semi-Markov jump systems & Extended state method \\ \hline \end{tabular}
\end{table} 
Table 1: Comparisons of the existing reference. \[\vec{\mathcal{K}}_{11,1}= \begin{bmatrix}-0.345&0.012\\ -0.567&0.001\end{bmatrix} ,\vec{\mathcal{K}}_{21,1}= \begin{bmatrix}-0.124&0.048\\ -0.365&0.014\end{bmatrix} \]  
\[\vec{\mathcal{K}}_{12,1}= \begin{bmatrix}-0.478&-0.001\\ -0.154&0.000\end{bmatrix} ,\vec{\mathcal{K}}_{22,1}= \begin{bmatrix}-0.369&0.001 \\ -0.179&0.000\end{bmatrix} .\]  
\[\vec{\mathcal{K}}_{11,2}= \begin{bmatrix}0.002&0.143\\ 0.000&0.053\end{bmatrix} ,\vec{\mathcal{K}}_{21,2}= \begin{bmatrix}-0.001&1.782 \\ -0.000&0.543\end{bmatrix} .\]  
\[\vec{\mathcal{K}}_{12,2}= \begin{bmatrix}0.001&-0.415\\ 0.000&-1.122\end{bmatrix} ,\vec{\mathcal{K}}_{21,2}= \begin{bmatrix}-0.001&0.115 \\ -0.000&0.218\end{bmatrix} .\]  
Figure 1 illustrates the discrete mode switching process of the semi-Markov jump system over time. The y-axis represents the system mode index, where '1.0' corresponds to Mode 1 and '2.0' corresponds to Mode 2.