### Adaptive filter based on the VCE method

The adaptive filter based on the VCE method can estimate the variance components of the process noise and the measurement noise vectors in real time using the residual vectors to decompose the system innovation vector (Wang et al. 2010; Wang 2009; Moghtased-Azar et al. 2014). On the basis of the estimated variance components, the weighting matrices of the process noise and the measurement noise vectors can be adjusted and then their effects on the state vector can be adjusted accordingly.

Now under the consideration of the standard system model, the state and measurement equations are:

$$ \left\{\begin{array}{l}\mathbf{x}(k)=\boldsymbol{\Phi} \left( k, k-1\right)\mathbf{x}\left( k-1\right)+\boldsymbol{\Gamma} (k)\mathbf{w}(k)\\ {}\mathbf{z}(k)=\mathbf{H}(k)\mathbf{x}(k)+\boldsymbol{\Delta} (k)\end{array}\right. $$

(1)

where **x**(*k*) and **z**(*k*) are the state vector and the measurement vector, respectively; **Φ**(*k*, *k* − 1), **Γ**(*k*) and **H**(*k*) are the state-transition matrix, the coefficient matrix of the process noise vector and the design matrix, respectively; **w**(*k*) and **Δ**(*k*) denote the process noise vector and the measurement noise vector, respectively. Further, **w**(*k*) and **Δ**(*k*) are the zero mean Gaussian noises:

$$ \left\{\begin{array}{c}\hfill \mathbf{w}(k)\sim N\left(\mathbf{0},\ \mathbf{Q}(k)\right)\hfill \\ {}\hfill \boldsymbol{\Delta} (k)\sim N\left(\mathbf{0},\ \mathbf{R}(k)\right)\ \hfill \end{array}\right. $$

(2)

where **Q**(*k*) and **R**(*k*) are positive definite matrices.

Thus, the two-step update process of the Kalman filter is as follows:

The time update:

$$ \begin{array}{l}\widehat{\mathbf{x}}\left( k/ k-1\right)=\boldsymbol{\Phi} \left( k, k-1\right)\widehat{\mathbf{x}}\left( k-1\right)\ \\ {}{\mathbf{P}}_{XX}\left( k/ k-1\right)=\boldsymbol{\Gamma} (k)\mathbf{Q}(k){\boldsymbol{\Gamma}}^T(k)\\ {}\kern3.25em +\boldsymbol{\Phi} \left( k, k-1\right){\mathbf{P}}_{XX}\left( k-1\right){\boldsymbol{\Phi}}^T\left( k, k-1\right)\end{array} $$

(3)

The measurement update:

$$ \begin{array}{l}\widehat{\mathbf{x}}(k) = \widehat{\mathbf{x}}\left( k/ k-1\right)+\mathbf{G}(k)\mathbf{d}(k)\ \\ {}{\mathbf{P}}_{XX}(k)=\left[\mathbf{E}-\mathbf{G}(k)\mathbf{H}(k)\right]{\mathbf{P}}_{XX}\left( k/ k-1\right)\end{array} $$

(4)

where **G**(*k*) is the gain matrix and **d**(*k*) is the system innovation vector:

$$ \begin{array}{l}\operatorname{G}(k)={\operatorname{P}}_{XX}\left( k\left| k-1\right.\right){\operatorname{H}}^T(k){\operatorname{P}}_{dd}(k)\\ {}\operatorname{d}(k)=\operatorname{z}(k)-\operatorname{H}(k)\widehat{x}\left( k\left| k-1\right.\right)\\ {}{\operatorname{P}}_{dd}(k)=\operatorname{H}(k){\operatorname{P}}_{XX}\left( k\left| k-1\right.\right){\operatorname{H}}^T(k)+\operatorname{R}(k)\end{array} $$

(5)

When **Q**(*k*) and **R**(*k*) are already known, the estimated state vector is optimal. However, in practice they cannot easily be obtained. So it would be great if they could be estimated in real time in the adaptive filter based on the VCE method.

There exist three groups of stochastic information that is associated with the estimation of the state vector: the observation noise vector **Δ**(*k*), the system process noise **w**(*k*) and the noise on the predicted state vector \( \widehat{\mathbf{x}}\left( k/ k-1\right) \) brought by \( \widehat{\mathbf{x}}\left( k\hbox{-} 1\right) \) though the propagation of {**Δ**(1), ⋯, **Δ**(*k* − 1)} and {**w**(1), ⋯, **w**(*k* ‐ 1)}. Thus, according to noise sources, we can define three independent (pseudo-)observation groups as follows (Wang 2009):

$$ \begin{array}{l}{\mathbf{l}}_x(k)=\boldsymbol{\Phi} \left( k, k-1\right)\widehat{\mathbf{x}}\left( k-1\right)\ \\ {}{\mathbf{l}}_w(k)={\mathbf{w}}_0(k)\\ {}{\mathbf{l}}_z(k)=\mathbf{z}(k)\end{array} $$

(6)

where l_{
x
}(*k*) is the pseudo-observation related to the predicted state vector, l_{
w
}(*k*) is the pseudo-observation related to the system process noise, and l_{z}(*k*) is the pseudo-observation related to the observation noise.

Using their residual equations, the system in Eq. (1) can be rewritten:

$$ \begin{array}{l}{\operatorname{v}}_{l_x}(k)=\widehat{x}(k)+\varGamma (k)\widehat{w}\left( k\hbox{-} 1\right)-{\operatorname{l}}_x(k)\\ {}{\operatorname{v}}_{l_w}(k)=\widehat{w}\left( k\hbox{-} 1\right)-{\operatorname{l}}_w(k)\\ {}{\operatorname{v}}_{l_z}(k)= H(k)\widehat{x}(k)-{\operatorname{l}}_z(k)\end{array} $$

(7)

with their measurement variance matrices as follows:

$$ \begin{array}{l}{\mathbf{P}}_{l_x{l}_x}(k)=\boldsymbol{\Phi} \left( k, k-1\right){\mathbf{P}}_{x x}\left( k-1\right){\boldsymbol{\Phi}}^T\left( k, k-1\right)\\ {}{\mathbf{P}}_{l_w{l}_w}(k)=\mathbf{Q}(k)\\ {}{\mathbf{P}}_{l_z{l}_z}(k)=\mathbf{R}(k)\end{array} $$

(8)

So we can estimate the covariance matrix of the system as long as we calculate the covariance matrix of the residual vectors.

According to the steps of the Kalman filter, the estimations of the residual vectors can be calculated by the equation (9):

$$ \left\{\begin{array}{l}{\operatorname{v}}_{l_x{l}_x}(k)={\operatorname{P}}_{l_x{l}_x}(k){\operatorname{P}}_{XX}^{-1}\left( k\left| k-1\right.\right)\operatorname{G}(k)\operatorname{d}(k)\\ {}{\operatorname{v}}_{l_w{l}_w}(k)=\operatorname{Q}\left( k-1\right){\varGamma}^T\left( k-1\right){\operatorname{P}}_{XX}^{-1}\left( k\left| k-1\right.\right)\cdot \\ {}\kern4.25em \operatorname{G}(k)\operatorname{d}(k)\\ {}{\operatorname{v}}_{l_z{l}_z}(k)=\left\{\operatorname{H}(k)\operatorname{G}(k)-\operatorname{E}\right\}\operatorname{d}(k)\end{array}\right. $$

(9)

And then the corresponding variance matrices are as below:

$$ \left\{\begin{array}{l}{\operatorname{P}}_{v_{l_x{l}_x}}(k)=\varPhi \left( k-1\right){\operatorname{P}}_{XX}\left( k-1\right){\varPhi}^T\left( k-1\right){\operatorname{H}}^T(k)\cdot \\ {}\kern2em {\operatorname{P}}_{dd}^{-1}(k)\operatorname{H}(k)\varPhi \left( k-1\right){\operatorname{P}}_{XX}\left( k-1\right){\varPhi}^T\left( k-1\right)\\ {}{\operatorname{P}}_{v_{l_w{l}_w}}(k)=\operatorname{Q}\left( k-1\right){\varGamma}^T\left( k-1\right){\operatorname{H}}^T(k){\operatorname{P}}_{dd}^{-1}(k)\cdot \\ {}\kern4em \operatorname{H}(k)\varGamma \left( k-1\right)\operatorname{Q}\left( k-1\right)\\ {}{\operatorname{P}}_{v_{l_z{l}_z}}(k)=\left\{\operatorname{E}-\operatorname{H}(k)\operatorname{G}(k)\right\}\operatorname{R}(k)\end{array}\right. $$

(10)

Here the innovation vector is epochwise projected into three residual vectors associated with the three groups of the measurements. Hence, we can estimate the variance factors.

Assume that all components in **l**
_{
z
}(*k*) and **l**
_{
w
}(*k*) are uncorrelated, so both of the **R**(*k*) and **Q**(*k*) become diagonal. In this case, the redundancy index of each measurement noise factor is given by (Wang 2009)

$$ {r}_{{\operatorname{z}}_i}(k)=1-{\left\{\operatorname{H}(k)\operatorname{G}(k)\right\}}_{i i} $$

(11)

Similarly, the redundancy index of each process noise factor is equal to

$$ \begin{array}{l}{r}_{{\operatorname{w}}_i}(k)=\left[\operatorname{Q}(k){\varGamma}^T(k){\operatorname{H}}^T(k){\operatorname{P}}_{dd}^{-1}(k)\cdot \right.\\ {}\kern3.75em {\left.\operatorname{H}(k)\varGamma \left( k-1\right)\right]}_{i i}\end{array} $$

(12)

Furthermore, the individual group redundancy contributions, or the total group redundant indexes, are equal to (Wang et al. 2010; Wang 2009; Wang et al. 2009):

$$ \left\{\begin{array}{l}{r}_{\mathrm{x}}(k)= trace\left[\varPhi \left( k-1\right){\operatorname{P}}_{XX}(k){\varPhi}^T\left( k-1\right)\cdot \right.\\ {}\kern5.75em \left.{\operatorname{H}}^T(k){\operatorname{P}}_{dd}^{-1}(k)\operatorname{H}(k)\right]\\ {}{r}_{\mathrm{w}}(k)= trace\left[\operatorname{Q}(k){\varGamma}^T(k){\operatorname{H}}^T(k){\operatorname{P}}_{dd}^{-1}(k)\cdot \right.\\ {}\kern5.75em \left.\operatorname{H}(k)\varGamma \left( k-1\right)\right]\\ {}{r}_{\mathrm{z}}(k)= trace\left[\operatorname{E}-\operatorname{H}(k)\operatorname{G}(k)\right]\end{array}\right. $$

(13)

On the basis of the Herlmet VCE method, the individual group variance factors of unit weight are estimated by the residual vector and the corresponding redundant index as follows:

$$ {\widehat{\sigma}}_{0\operatorname{g}}^2(k)=\frac{{\operatorname{v}}_{\mathrm{g}}^T{\operatorname{P}}_{l_{\mathrm{g}}{l}_{\mathrm{g}}}(k){\operatorname{v}}_{\mathrm{g}}(k)}{r_{\mathrm{g}}(k)}\left(\operatorname{g}= x, w, z\right) $$

(14)

Thus, at time *k*, the individual variance factors of l_{
z
}(*k*) can be calculated by:

$$ {\widehat{\sigma}}_{{\operatorname{z}}_i}^2(k)=\frac{{\operatorname{v}}_{{\operatorname{z}}_i}^2(k)}{r_{{\operatorname{z}}_i}(k)} $$

(15)

And the covariance matrix of the measurement noise is as follows:

$$ \operatorname{R}(k)=\left[\begin{array}{ccc}\hfill {\widehat{\sigma}}_{{\operatorname{z}}_1}^2(k)\hfill & \hfill \hfill & \hfill \hfill \\ {}\hfill \hfill & \hfill \ddots \hfill & \hfill \hfill \\ {}\hfill \hfill & \hfill \hfill & \hfill {\widehat{\sigma}}_{{\operatorname{z}}_p}^2(k)\hfill \end{array}\right] $$

(16)

Similarly, the variance factors of **l**
_{
w
}(*k*) and the variance matrix **Q**(*k*) can be calculated by the equations (17) and (18):

$$ {\widehat{\sigma}}_{{\operatorname{w}}_j}^2(k)=\frac{{\operatorname{v}}_{{\operatorname{w}}_j}^2(k)}{r_{{\operatorname{w}}_j}(k)} $$

(17)

$$ \operatorname{Q}(k)=\left[\begin{array}{ccc}\hfill {\widehat{\sigma}}_{{\operatorname{w}}_1}^2(k)\hfill & \hfill \hfill & \hfill \hfill \\ {}\hfill \hfill & \hfill \ddots \hfill & \hfill \hfill \\ {}\hfill \hfill & \hfill \hfill & \hfill {\widehat{\sigma}}_{{\operatorname{w}}_m}^2(k)\hfill \end{array}\right] $$

(18)

### CKF algorithm

Since the CKF is not only simple and easy to be implemented, but also high precise and convergent well, it is widely used in nonlinear estimations.

Let us consider a nonlinear state-space model:

$$ \left\{\begin{array}{l}{\operatorname{x}}_k=\operatorname{f}\left({\operatorname{x}}_{k-1}\right)+{\mathbf{w}}_{k-1}\\ {}{\operatorname{z}}_k=\operatorname{h}\left({\operatorname{x}}_k\right)+{\boldsymbol{\Delta}}_k\end{array}\right. $$

(19)

where x_{
k
} and z_{
k
} are the state vector and the measurement vector, respectively, f(⋅) and h(⋅) are the nonlinear state and measurement vector functions; **w** ∼ N(0, Q) and **Δ** ∼ N(0, R) represent the process noise and the measurement noise vectors, respectively.

For this nonlinear system, 2*n* Cubature points which are equal of weight were selected to calculate the Gaussian distribution, and then the CKF can be implemented through the time and measurement updates. And the cubature points are set as:

$$ \left\{\begin{array}{l}{\xi}_i=\sqrt{\frac{2 n}{2}}{\left[1\right]}_i\\ {}{\omega}_i=\frac{1}{2 n}\end{array}\right.,\kern1.25em i=1,2,\cdots, 2 n $$

(20)

where *n* is the dimension of the state vector.

And the estimation process is as below (Arasaratnam & Haykin 2009; Arasaratnam & Haykin 2010):

The time update:

$$ {\operatorname{P}}_{k-1\left| k-1\right.}={\operatorname{S}}_{k-1\left| k-1\right.}{\operatorname{S}}_{k-1\left| k-1\right.}^T $$

(21)

$$ {\operatorname{X}}_{i, k-1\left| k-1\right.}={\operatorname{S}}_{k-1\left| k-1\right.}{\xi}_i+{\widehat{x}}_{k-1\left| k-1\right.} $$

(22)

$$ {\operatorname{X}}_{i, k\left| k-1\right.}^{\ast }=\operatorname{f}\left({\operatorname{X}}_{i, k-1\left| k-1\right.}\right) $$

(23)

$$ {\widehat{x}}_{k\left| k-1\right.}=\frac{1}{2 N}{\displaystyle \sum_{i=1}^{2 N}{\operatorname{X}}_{i, k\left| k-1\right.}^{\ast }} $$

(24)

$$ {\operatorname{P}}_{k\left| k-1\right.}=\frac{1}{2 N}{\displaystyle \sum_{i=1}^{2 N}{\operatorname{X}}_{i, k\left| k-1\right.}^{\ast }{\operatorname{X}}_{i, k\left| k-1\right.}^{\ast T}}-{\widehat{x}}_{k\left| k-1\right.}{\widehat{x}}_{k\left| k-1\right.}^T+{\operatorname{Q}}_{k-1} $$

(25)

The measurement update:

$$ {\operatorname{P}}_{k\left| k-1\right.}={\operatorname{S}}_{k\left| k-1\right.}{\operatorname{S}}_{k\left| k-1\right.}^T $$

(26)

$$ {\operatorname{X}}_{i, k\left| k-1\right.}={\operatorname{S}}_{k\left| k-1\right.}{\xi}_i+{\widehat{x}}_{k\left| k-1\right.} $$

(27)

$$ {\operatorname{Y}}_{i, k\left| k-1\right.}=\operatorname{h}\left({\operatorname{X}}_{i, k\left| k-1\right.}\right) $$

(28)

$$ {\widehat{z}}_{k\left| k-1\right.}=\frac{1}{2 N}{\displaystyle \sum_{i=1}^{2 N}{\operatorname{Y}}_{i, k\left| k-1\right.}} $$

(29)

$$ {\operatorname{P}}_{k\left| k-1\right.}^{z z}=\frac{1}{2 N}{\displaystyle \sum_{i=1}^{2 N}{\operatorname{Y}}_{i, k\left| k-1\right.}{\operatorname{Y}}_{i, k\left| k-1\right.}^T}-{\widehat{z}}_{k\left| k-1\right.}{\widehat{z}}_{k\left| k-1\right.}^T+{\operatorname{R}}_k $$

(30)

$$ {\operatorname{P}}_{k\left| k-1\right.}^{x z}=\frac{1}{2 N}{\displaystyle \sum_{i=1}^{2 N}{\operatorname{X}}_{i, k\left| k-1\right.}{\operatorname{Y}}_{i, k\left| k-1\right.}^T}-{\widehat{x}}_{k\left| k-1\right.}{\widehat{z}}_{k\left| k-1\right.}^T $$

(31)

And the gain matrix is:

$$ {\operatorname{K}}_k={\operatorname{P}}_{k\left| k-1\right.}^{xz}{\left({\operatorname{P}}_{k\left| k-1\right.}^{zz}\right)}^{-1} $$

(32)

The estimation of the state vector can be obtained:

$$ {\widehat{x}}_{k\left| k\right.}={\widehat{x}}_{k\left| k-1\right.}+{\operatorname{K}}_k\left({\operatorname{z}}_k-{\widehat{z}}_{k\left| k-1\right.}\right) $$

(33)

where d_{
k
} = z_{
k
} − ẑ_{
k|k − 1} is the system innovation vector of the nonlinear system.

The variance matrix of the estimated state vector is:

$$ {\operatorname{P}}_{k\left| k\right.}={\operatorname{P}}_{k\left| k-1\right.}-{\operatorname{K}}_k{\operatorname{P}}_{k\left| k-1\right.}^{zz}{\operatorname{K}}_k^T $$

(34)