# Failure Identification Method and LMI-Based Control System for Small Spacecraft
## 3 Attitude Controller  
In this section, the design process of the H\({}_{\infty}\) control algorithm is described. First, the bounded real lemma is introduced and described. Then, the state-feedback controller for a small spacecraft equipped with reaction wheels is designed, where the controller gain is evaluated by solving an LMI problem. Finally, failures are introduced in the design process, helping to achieve a fault-tolerant control design. Consider the continuous linear time-invariant (LTI) dynamical system, given as  
\[ \begin{cases}\dot{x}=Ax+B_{u}u+B_{w}w\\ z=C_{z}x+D_{u}u+D_{w}w\end{cases}  \tag{3}\]  
where \(x=\{q_{v},\omega\}^{T}\in\mathbb{R}^{6}\) is the vector state, \(u\in\mathbb{R}^{3}\) is the control input, \(w\in\mathbb{R}^{3}\) is the disturbances vector, and \(z\in\mathbb{R}^{6}\) is the system output. Using the state-feedback control policy, it leads to the closed-loop system  
\[ \begin{cases}\dot{x}=(A-B_{u}K)x+B_{w}w\\ z=(C_{z}-D_{u}K)x+D_{w}w\end{cases} \]  
of which the corresponding transfer function is  
\[\frac{Z(s)}{W(s)}=G(s)=(C_{z}-D_{u}K)(sI-A+B_{u}K)^{-1}+D_{w}\]  
The H\({}_{\infty}\) norm of the LTI system is the induced energy-to-energy gain, defined as  
\[\|G(s)\|_{\infty}=\sup_{\omega\in\mathbb{R}}\hat{\sigma}(G(j\omega))\]  
which is physically interpreted as the maximal gain of the frequency response of the system. However, the H\({}_{\infty}\) norm cannot be analytically computed, and it has to be solved using numerical methods. In particular, a classification of numerical methods that are used to solve the problem can be found in [13]. According to the bounded real lemma, the closed-loop system is internally stable with  
\[\|G(s)\|_{\infty}<\gamma\]  
if there is a positive definite symmetric matrix \(P\)[14] such that  
\[ \begin{bmatrix}A^{T}P+PA&PB&C^{T}\\ B^{T}P&-\gamma I&D^{T}\\ C&D&-\gamma I\end{bmatrix} <0,\qquad P>0\]where \(\gamma>0\) is the H\({}_{\infty}\) performance specification. The control problem is defined through the H\({}_{\infty}\) sub-optimal control problem. The controller is designed to ensure  
\[\|G(s)\|_{\infty}<\gamma\]  
where \(\gamma\) is pre-specified. However, the equation ruling the attitude dynamics of the spacecraft is not linear; thus, it is necessary to adapt the real system to a simplified mathematical model that is defined through the linearization of the equation in the neighborhood of the equilibrium condition, expressed by  
\[x_{0}=\left\{ \begin{aligned} q_{v}\\ \omega\end{aligned} \right\}_{0}=\left\{\begin{aligned} 0,0,0,0,0,0 \right\}^{T}\]  
The matrices \(A\), \(B_{u}\), and \(B_{w}\) have been computed through the linearization of the system dynamics  
\[\dot{x}=x_{0}+\left(\frac{\partial\dot{x}}{\partial x}\right)_{x=x_{0}}x+ \left(\frac{\partial\dot{x}}{\partial u}\right)_{u=0}u+\left(\frac{\partial \dot{x}}{\partial w}\right)_{w=0}w\]  
where \(A\in\mathbb{R}^{6,6}\), \(B_{u}\in\mathbb{R}^{3,6}\), and \(B_{w}\in\mathbb{R}^{3,6}\) are the Jacobian matrices of \(\dot{x}\) computed with respect to \(x\), \(u\), and \(w\), respectively. \[A=\left[ \begin{matrix}0&0&0&\frac{1}{2}&0&0\\ 0&0&0&0&\frac{1}{2}&0\\ 0&0&0&0&0&\frac{1}{2}\\ 0&0&0&0&\frac{h_{w2}}{1_{x}}&\frac{h_{w2}}{1_{x}}\\ 0&0&0&\frac{h_{w2}}{1_{y}}&0&-\frac{h_{w1}}{1_{y}}\\ 0&0&0&-\frac{h_{w2}}{1_{x}}&\frac{h_{w1}}{1_{x}}&0\end{matrix} \right] B_{u}=B_{w}=\left[ \begin{matrix}0&0&0\\ 0&0&0\\ 0&0&0\\ \frac{1}{1_{x}}&0&0\\ 0&0&\frac{1}{1_{y}}&0\\ 0&0&\frac{1}{1_{z}}\end{matrix} \right]\]  
For what concerns \(C_{z}\), \(D_{u}\), and \(D_{w}\), it is possible to follow the same approach of the equation that is used to describe the measurements, but for the purposes of this study, we chose to assume \(C_{z}\in\mathbb{R}^{6,6}\) as the identity matrix \(I_{6}\) and \(D_{u}\), \(D_{w}\in\mathbb{R}^{3,6}\) as the null matrices. Linear controllers also require the system to be controllable and observable. The controllability is expressed by the matrix \(\mathcal{C}\), which is defined as  
\[\mathcal{C}= \begin{bmatrix}B&AB&A^{2}B&\ldots&A^{n-1}B\end{bmatrix}