# Variable Structure PID Controller for Satellite Attitude Control Considering Actuator Failure
## 3 Results
### Integral Partition Design
Noting that \(-1\leq q_{0}\leq 1\), we have  
\[1-q_{0}\geq\frac{1}{2}(1+q_{0})(1-q_{0})=\frac{1}{2}\Big{(}1-q_{0}^{2}\Big{)}= \mathbf{q}_{v}^{T}\mathbf{q}_{v} \tag{19}\]  
and  
\[V_{2}\geq\frac{1}{2}\mathbf{\omega}^{T}\mathbf{I}\mathbf{\omega}+l_{1}\mathbf{q}_{v}^{T}\mathbf{I} \mathbf{\omega}+l_{2}\mathbf{q}_{v}^{T}\mathbf{q}_{v}+\frac{1}{2}l_{3}\mathbf{v}^{T}\mathbf{v}+l_ {4}\mathbf{v}^{T}\mathbf{I}\mathbf{\omega}\]  
\[=\left[ \begin{array}{c}\mathbf{\omega}\\ \mathbf{q}_{v}\\ \mathbf{v}\end{array} \right]^{T}\left[ \begin{array}{c}\frac{1}{2}\mathbf{I}\\ \frac{1}{2}l_{1}\mathbf{I}\end{array}\begin{array}{c}\frac{1}{2}l_{1}\mathbf{I}\\ l_{2}\mathbf{I}\end{array}\begin{array}{c}\frac{1}{2}l_{3}\mathbf{0}\\ \frac{1}{2}l_{4}\mathbf{J}\end{array} \right]\left[ \begin{array}{c}\mathbf{\omega}\\ \mathbf{q}_{v}\\ \mathbf{v}\end{array} \right] \tag{20}\]  
If following inequality is satisfied, then the Lyapunov function is a positive definite. \[2l_{2}l_{3}-l_{1}^{2}\mathbf{I}\geq 0 \tag{21}\]  
The derivative of the Lyapunov function in (18) is calculated and the third stage of controller (16) is substituted, so that the following can be obtained:  
\[ \begin{array}{rl}\dot{V}_{2}&=\mathbf{\omega}^{T}\mathbf{I}\dot{\mathbf{\omega}}+l_{1} \mathbf{q}_{v}^{T}\mathbf{I}\dot{\mathbf{\omega}}+l_{1}\mathbf{\omega}^{T}\mathbf{I}\dot{\mathbf{q}}_{ v}-2l_{2}\dot{q}_{0}+l_{3}\mathbf{v}^{T}\dot{\mathbf{v}}+l_{4}\mathbf{v}^{T}\mathbf{I}\dot{\mathbf{ \omega}}+l_{4}\mathbf{\omega}^{T}\mathbf{I}\dot{\mathbf{v}}\\ &=(\mathbf{\omega}+l_{1}\mathbf{q}_{v}+l_{3}\mathbf{v})^{T}(\mathbf{u}+\mathbf{d}-\mathbf{\omega}^{ \times}\mathbf{I}\mathbf{\omega})+l_{1}\mathbf{\omega}^{T}\mathbf{I}\mathbf{\omega}+l_{2}\mathbf{ \omega}^{T}\mathbf{q}_{v}+l_{3}\mathbf{v}^{T}\mathbf{q}_{v}+l_{4}\mathbf{\omega}^{T}\mathbf{q}_{v} \end{array}  \tag{22}\]  
Noting that, during this stage, the system state is near its equilibrium point, the high-order term \(\mathbf{\omega}^{\times}\mathbf{I}\mathbf{\omega}\) is ignored. In order to analyze system stability, disturbance torque \(\mathbf{d}\) is considered in later text, and we have:  
\[ \begin{array}{rl}\dot{V}_{2}&\approx(\mathbf{\omega}+l_{1}\mathbf{q}_{v}+l_{3}\mathbf{ v})^{T}\mathbf{u}+l_{1}\mathbf{\omega}^{T}\mathbf{I}\mathbf{\omega}+l_{2}\mathbf{\omega}^{T}\mathbf{q}_{v}+l_ {3}\mathbf{v}^{T}\mathbf{q}_{v}+l_{4}\mathbf{\omega}^{T}\mathbf{q}_{v}\\ &=-(\mathbf{\omega}+l_{1}\mathbf{q}_{v}+l_{3}\mathbf{v})\big{(}k_{d}\mathbf{\omega}+k_{p}\mathbf{q }_{v}+k_{1}\mathbf{v}\big{)}+l_{1}\mathbf{\omega}^{T}\mathbf{I}\mathbf{\omega}+l_{2}\mathbf{\omega} ^{T}\mathbf{q}_{v}+l_{3}\mathbf{v}^{T}\mathbf{q}_{v}+l_{4}\mathbf{\omega}^{T}\mathbf{q}_{v}\\ &\leq-\left[\begin{array}{c}\mathbf{\omega}\\ \mathbf{q}_{v}\\ \mathbf{v}\end{array}\right]^{T}\left[\begin{array}{c}k_{d}\mathbf{I}_{3}-l_{1}\mathbf{ J}\\ \frac{1}{2}\mathbf{P}\\ l_{1}k_{p}\mathbf{I}_{3}\\ \frac{1}{2}(k_{1}+l_{4}k_{p}-l_{3})\mathbf{I}_{3}\\ \end{array}\right]\left[\begin{array}{c}\mathbf{\omega}\\ \mathbf{q}_{v}\\ \mathbf{v}\end{array}\right]\\ &\text{where }\mathbf{P}=\big{(}l_{1}k_{d}+k_{p}l_{4}-l_{2}\big{)}\mathbf{I}_{3}-l_{4}\mathbf{ J}.\end{array}  \tag{23}\]  
Hence, if following inequality is satisfied, \(\dot{V}_{2}\leq 0\) could be ensured and the system governed by controller (16) is asymptotic stable. \[\left[ \begin{array}{ccc}k_{d}\mathbf{I}_{3}-l_{1}\mathbf{J}&\frac{1}{2}\mathbf{P}&\frac{ 1}{2}(k_{1}+l_{4}k_{d})\mathbf{I}_{3}\\ \frac{1}{2}\mathbf{P}&l_{1}k_{p}\mathbf{I}_{3}&\frac{1}{2}\big{(}l_{1}k_{1}+l_{4}k_{p }-l_{3}\big{)}\mathbf{I}_{3}\\ \frac{1}{2}(k_{1}+l_{4}k_{d})\mathbf{I}_{3}&\frac{1}{2}\big{(}l_{1}k_{1}+l_{4}k_{p }-l_{3}\big{)}\mathbf{I}_{3}&l_{4}k_{1}\mathbf{I}_{3}\end{array} \right]\geq 0 \tag{24}\]  
Noting that this inequality consists of several control parameters and matrices, and none of the elements of the matrix in (24) is zero, it is hard to examine (24) manually. Noting that some of the coupled terms could be simplified, the control parameters are selected as follows:  
\[