## 3 Robust Square-Root Continuous-Discrete Cubature Kalman Filter Algorithms  
### Robust SRCD-CKF with Huber's Method  
The robust SRCD-CKF algorithms are used to correct the abnormal measurements. [PERSON]'s method uses the robust cost function to reduce the weight of abnormal data. Among them, the most common weight reduction functions are the two-stage weight function based on Huber and the three-stage weight function based on \(p\)-Huber. The Huber weight function usually includes two parts. This means that the measurement data are divided into normal data and abnormal data. When the absolute value of the standardized residual exceeds the critical value, the data are considered abnormal and the weight is reduced.  
\[\overline{\mu}_{k}=\left\{\begin{array}{l}1,\left|\widetilde{ \lambda}_{\text{b}}\right|<\text{c}\\ \text{c}/\left|\widetilde{\lambda}_{\text{b}}\right|,\left|\widetilde{\lambda} _{\text{b}}\right|\geq\text{c}\end{array}\right., \tag{14}\]  
where \(\left|\widetilde{\lambda}_{\text{b}}\right|\) is the absolute value of the standardized residuals, and c is the critical value of abnormal error discrimination. The Huber robust square-root continuous-discrete cubature Kalman filter (HRSRCD-CKF) Algorithm 2 is as follows:  
```
Step 1 Repeat Step 1 of the SRCD-CKF algorithm. Steps 2.1-3.7 are equivalent to Steps 2.1-3.7 of the SRCD-CKF algorithm. Step 3.8 The innovation covariance matrix is redefined: \(\overline{P}_{zz,k|k-1}=\mathbf{Z}_{k|k-1}\mathbf{Z}_{k|k-1}^{\text{T}}+\overline{ \mu}_{k}^{-1}\mathbf{R}_{k}\). Step 3.9-3.17 are equivalent to Steps 3.8-3.10 of the SRCD-CKF algorithm.
```  
**Algorithm 2**HRSRCD-CKF.  
The weight function based on the Mahalanobis distance is also called the \(p\)-Huber three-stage weight function. Compared with the Huber function, the \(p\)-Huber function uses the \(\alpha\) quantile of the chi-square distribution to adjust the critical value of abnormal error discrimination, which is more reasonable than the empirical value. The discriminant value is defined as follows:  
\[d_{k}=\text{M}_{k}^{2}=(z_{k}-\hat{\mathbf{z}}_{k|k-1})^{\text{T}}\Big{(}\mathbf{P}_{ zz,k|k-1}\Big{)}^{-1}(z_{k}-\hat{\mathbf{z}}_{k|k-1}). \tag{15}\]  
In Equation (15), \(\text{M}_{k}=\sqrt{(z_{k}-\hat{\mathbf{z}}_{k|k-1})^{\text{T}}\Big{(}\mathbf{P}_{zz,k|k -1}\Big{)}^{-1}(z_{k}-\hat{\mathbf{z}}_{k|k-1})}\) is the Mahalanobis distance. The new three-stage weight function is  
\[\overline{\mu}_{k}=\left\{\begin{array}{l}1,d_{k}<\chi_{\alpha 1}\\ \sqrt{\chi_{\alpha 1}/d_{k}},\chi_{\alpha 1}\leq d_{k}<\ \chi_{\alpha 2},\\ 0,d_{k}\geq\chi_{\alpha 2}\end{array}\right. \tag{16}\]where \(\chi_{\alpha}\) is the quantile of the chi-square distribution. When \(d_{k}\) exceeds \(\chi_{\alpha 1}\), it is considered that there is an outlier in the measurement, and its weight needs to be reduced. At the same time, in order to further eliminate the influence of large outliers, when \(d_{k}\geq\chi_{\alpha 2}\), they will be eliminated. The \(M\)-estimation-based robust square-root continuous-discrete cubature Kalman filter (MRSRCD-CKF) Algorithm 3 is as follows:  
```
Step 1 Repeat Step 1 of the SRCD-CKF algorithm. Steps 2.1-3.7 are equivalent to Steps 2.1-3.7 of the SRCD-CKF algorithm. Steps 3.8-3.11 are equivalent to Steps 3.8-3.11 of the HRSRCD-CKF algorithm, and \(\overline{\mu}_{k}\) is calculated by Equation (16).
```  
**Algorithm 3**MRSRCD-CKF.