# A Multiple-Step, Randomly Delayed, Robust Cubature Kalman Filter for Spacecraft-Relative Navigation
## Appendix A
### Appendix a.3  
The combination of CKF and the M-estimator results in a robust CKF, which adopts different robust kernel functions to suppress outliers [30; 43]. The state updates of robust CKF are the same as CKF, and its measurement updates through constructing a linear regression model with the prior estimation of the filter and the measurement model. Finally, it completes the robust update process by iteration. This section briefly reviews the measurement updates of the linear regression robust CKF.  
The measurement equation is approximated as follows:  
\[\boldsymbol{y}_{k}\approx h\left(\hat{\boldsymbol{x}}_{k|k-1}\right)+ \boldsymbol{H}_{k}\left(\boldsymbol{x}_{k}-\boldsymbol{\hat{x}}_{k|k-1} \right)+\boldsymbol{w}_{k} \tag{14}\]  
The state prediction error \(\delta_{k}\) is denoted as following:  
\[\delta_{k}=\boldsymbol{x}_{k}-\hat{\boldsymbol{x}}_{k|k-1} \tag{15}\]  
Then, the regression problem takes the form  
\[\left[\begin{array}{c}\boldsymbol{y}_{k}-h\left(\hat{\boldsymbol{x}}_{k|k- 1}\right)+\boldsymbol{H}_{k}\hat{\boldsymbol{x}}_{k|k-1}\\ \hat{\boldsymbol{x}}_{k|k-1}\end{array}\right]=\left[\begin{array}{c} \boldsymbol{H}_{k}\\ \boldsymbol{I}\end{array}\right]\boldsymbol{x}_{k}+\left[\begin{array}{c} \boldsymbol{w}_{k}\\ -\delta_{k}\end{array}\right] \tag{16}\]  
where \(\boldsymbol{H}_{k}=\left[\left(\boldsymbol{P}_{k|k-1}\right)^{-1}\left( \boldsymbol{P}^{xy}\right)\right]^{T}\) is the measurement matrix.  
Some quantities are given as  
\[\mathbf{S}_{k}=\left[\begin{array}{cc}\boldsymbol{R}_{k}&0\\ 0&\boldsymbol{P}_{k|k-1}\end{array}\right] \tag{17}\]  
\[\widetilde{\boldsymbol{z}}_{k}=\mathbf{S}_{k}^{-1/2}\left[\begin{array}{c} \boldsymbol{y}_{k}-h\left(\hat{\boldsymbol{x}}_{k|k-1}\right)+\boldsymbol{H}_ {k}\hat{\boldsymbol{x}}_{k|k-1}\\ \hat{\boldsymbol{x}}_{k|k-1}\end{array}\right] \tag{18}\]  
\[M_{k}=\mathbf{S}_{k}^{-1/2}\left[\begin{array}{c}\boldsymbol{H}_{k}\\ \boldsymbol{I}\end{array}\right] \tag{19}\]\[\mathbf{\zeta}_{k}=S_{k}^{-1/2}\left[\begin{array}{c}\mathbf{w}_{k}\\ -\delta_{k}\end{array}\right] \tag{12}\]  
Then Equation (10) is transformed to  
\[\widetilde{z}_{k}=M_{k}x_{k}+\mathbf{\zeta}_{k} \tag{13}\]  
where \(\mathbf{\zeta}_{k}\) is residual error with \(\mathbf{\zeta}_{k}=M_{k}x_{k}-\widetilde{z}_{k}\).  
Minimize the following cost function to solve above-mentioned regression problem:  
\[J(\mathbf{x}_{k})=\sum_{i=1}^{m+n}\rho(\mathbf{\zeta}_{k}) \tag{14}\]  
where \(\rho(\cdot)\) is the cost function. \(m\) denotes the dimension of measurement \(\mathbf{y}_{k}\).  
The solution of Equation (14) satisfies  
\[\sum_{k=1}^{m+n}\varphi(\mathbf{\zeta}_{k})\frac{\partial\mathbf{\zeta}_{k}}{\partial \mathbf{x}_{k}}=0 \tag{15}\]  
where \(\varphi(\mathbf{\zeta}_{k})=\rho^{\prime}(\mathbf{\zeta}_{k})\). \(\psi(\cdot)\) is the weight function defined as \(\psi(\mathbf{\zeta}_{k})=\frac{\varphi(\mathbf{\zeta}_{k})}{\mathbf{\zeta}_{k}}\), and the corresponding weight matrix is \(\mathbf{\Psi}=diag[\psi(\mathbf{\zeta}_{i})]\). \(\mathbf{\zeta}_{i,k}\) is the \(i\)-th component of \(\mathbf{\zeta}_{k}\). Equation (15) could be written in matrix form, as follows:  
\[M_{k}^{T}\mathbf{\Psi}(M_{k}x_{k}-\widetilde{z}_{k})=0 \tag{16}\]  
The solution of Equation (16) can be obtained after \(j\) times iteration, as follows:  
\[\mathbf{x}_{k}^{(j+1)}=\left(M_{k}^{T}\mathbf{\Psi}^{(j)}M_{k}\right)^{-1}M_{k}^{T} \mathbf{\Psi}^{(j)}\widetilde{z}_{k} \tag{17}\]  
The state estimation covariance could be computed by the following:  
\[\mathbf{P}_{k|k}=\left(M_{k}^{T}\mathbf{\Psi}^{(j)}M_{k}\right)^{-1} \tag{18}\]  
In this paper, the calculation process of Equation (10)-Equation (16) is summarized as follows:  
\[\left[\mathbf{M},\widetilde{\mathbf{z}}\right]=\text{Robust\_update}\left[\mathbf{y}_{k}, h(\cdot),\mathbf{P}_{k/k-1},\mathbf{P}^{xy},\hat{\mathbf{x}}_{k|k-1},\mathbf{R}\right] \tag{19}\]