# Blended Filter-Based Detection for Thruster Valve Failure and Control Recovery Evaluation for RLV
## 2 Blending Filter-Based Thruster Fault Detection
### Blending the Physical Filter and Kalman Filter for Fault Detection  
The Kalman filter conducts timely calculations, has a small cache space, and estimates based on sensor feedback data. In this study, we used the aforementioned filter to estimate the attitude angular rate of the RLV. The state variables \(\mathbf{x}\in\mathbb{R}^{n}\) of the discrete time process can be estimated by the Kalman filter and can be described by the following discrete random difference equations:  
Figure 1: Structural diagram of the thruster. \[ \begin{split}\mathbf{x}_{k}&=\mathbf{A}\mathbf{x}_{k-1}+ \mathbf{B}\mathbf{u}_{k-1}+\mathbf{w}_{k-1}\\ \mathbf{z}_{k}&=\mathbf{H}\mathbf{x}_{k}+\mathbf{v}_ {k}\end{split} \, \tag{6}\]  
where the random signals \(\mathbf{w}_{k-1}\) and \(\mathbf{v}_{k}\) represent the process noise and observation noise, respectively. They can be assumed to be white noises and are independent of each other. Their probability density obeys the normal distribution of expectation 0, variance \(Q\) and expectation 0, variance \(R\), respectively. The Kalman filter comprises the prediction part based on the time series, and the correction and updating part based on the measurement feedback, wherein the prediction part is given by the following formulae:  
\[ \begin{split}\mathbf{\hat{x}}_{k}^{-}&=\mathbf{A} \mathbf{\hat{x}}_{k-1}+\mathbf{B}\mathbf{u}_{k-1}\\ \mathbf{P}_{k}^{-}&=\mathbf{A}\mathbf{P}_{k-1} \mathbf{A}^{T}+\mathbf{Q}\end{split} \, \tag{7}\]  
where \(\mathbf{\hat{x}}_{k}^{-}\) represents the forward-calculation state variables, \(\mathbf{P}_{k}^{-}\) is the forward-calculation error covariance, and \(\mathbf{\hat{x}}_{k-1}\) and \(\mathbf{P}_{k-1}\) are the initial estimations. The measurement feedback correction formulae are:  
\[ \begin{split}\mathbf{K}_{k}&=\mathbf{P}_{k}^{-} \mathbf{H}^{T}(\mathbf{H}\mathbf{P}_{k}^{-}\mathbf{H}^{T}+\mathbf{R})^{-1}\\ \mathbf{\hat{x}}_{k}&=\mathbf{\hat{x}}_{k}^{-}+ \mathbf{K}_{k}(\mathbf{z}_{k}-\mathbf{H}\mathbf{\hat{x}}_{k}^{-})\\ \mathbf{P}_{k}&=(1-\mathbf{K}_{k}\mathbf{H})\mathbf{ P}_{k}^{-}\end{split}  \tag{8}\]  
where \(\mathbf{K}_{k}\) is the Kalman filter's gain, \(\mathbf{z}_{k}\) represents the observation variables, \(\mathbf{\hat{x}}_{k}\) is the updated estimate, and \(\mathbf{P}_{k}\) is the updated error covariance. In the longitudinal attitude control of a thruster, the short-cycle mode manipulation moment has a greater influence on the pitch rate. In this study, the pitch rate was used as a variable state of the fault detection and the Kalman filter was designed for the state of estimation, and combined with Equation (1). The equation of the state of the thruster longitudinal attitude fault detection can be expressed as follows:  
\[q_{t}=q_{t-1}+\frac{M\Delta t}{I_{y}}, \tag{9}\]  
where \(q_{t}\) is the pitch rate at the next moment, \(q_{t-1}\) is the pitch rate at the current time. The approximate interval time of the thruster control command is \(\Delta t\). Equation (9) is obtained using the forward Euler method. The filter can be used for the estimation of one dimensional or multidimensional random process. In Equation (6) the pitch rate is the state variables, \(\mathbf{A}=1\), \(\mathbf{B}=1/I_{y}\), \(\mathbf{H}\) is considered an ideal sensor gain of 1, and \(\mathbf{u}_{k-1}\) refers to the pitch moment generated during the interval time of thruster control command. In the system design, the related allowable deviation range is given for the state variable and the observation owing to the uncertainty caused by noise. Therefore, the white noise variances \(\mathbf{Q}\) and \(\mathbf{R}\) can be set according to the deviation range of the state variable and the observation variable. In this study, the state estimation of the Kalman filter is combined with the physical feedback and the prediction calculation. It is used as a software algorithm that predicts a follow-up state based on the model of a current state, and it is necessary to consider the consistency between the model input and the input of the physical system.