# An Improved Adaptive Iterative Extended Kalman Filter Based on Variational Bayesian
## 3 Illustrative Example  
### Two-Dimensional Target Tracking  
In order to showcase the effectiveness of the suggested algorithm, we will employ the conventional scenario of two-dimensional target tracking and conduct a comparative analysis with various relevant approaches [38]. The state equation is represented as Equation (44). The observation quantity includes the target's distance and bearing, and the observation equation is given as Equation (45):  
\[x_{t}=\left[ \begin{array}{cc}\text{I}_{2}&\text{TI}_{2}\\ 0_{2}&\text{I}_{2}\end{array} \right]x_{t-1}+w_{t-1} \tag{44}\]  
\[z_{t}=\left[ \begin{array}{c}\sqrt{x_{t}^{2}+y_{t}^{2}}\\ \arctan\frac{y_{t}}{x_{t}}\end{array} \right]x_{t}+v_{t} \tag{45}\]  
where \(x_{t}=[x_{t},y_{t},\hat{x}_{t},\hat{y}_{t}]^{\text{T}}\) is the state of the target at moment \(j,(x_{t},y_{t})\) is the position state, \((\hat{x}_{t},\hat{y}_{t})\) is the velocity state in \(x\) and \(y\) directions. \(T=1\) s is the sampling time. \(w_{t-1}\) is the zero-mean Gaussian process noise with the covariance \(\bar{Q}=\left[ \begin{array}{cc}\frac{T^{3}}{2}\text{I}_{2}&\frac{T^{2}}{2} \text{I}_{2}\\ \frac{T^{2}}{2}\text{I}_{2}&\text{TI}_{2}\end{array} \right]\). The initial position and velocity of the state are as \(x_{0}=\left[100\text{ m},100\text{ m},10\text{ ms}^{-1},\right.\)\(\left.10\text{ ms}^{-1}\right]^{\text{T}}\), with covariance \(P_{0}=\text{diag}(20\text{ m}^{2},20\text{ m}^{2},2\text{ m}^{2}\text{ s}^{-2},2\text{ m}^{2}\text{ s}^{-2})^{\text{T}}\). The typical heavy-tailed noise is selected d as the measurement noise, and the Gaussian mixture distribution is used:  
\[v_{t}\sim 0.8\mathcal{N}(0,\bar{R})+0.2\mathcal{N}(0,100\bar{R}) \tag{46}\]  
where \(\bar{R}=\text{diag}\big{(}(5\text{ m})^{2},(0.05\text{ rad})^{2}\big{)}\) is the measurement noise covariance, and set \(\varepsilon=10^{-6}\). In the simulation experiment, the improved robust GA-VB [32], RKF-ML [33], and the proposed VBAIEKF were used to test the filtering effect. In the proposed VBAIEKF and the improved robust GA-VB and RKF-ML, the individual parameters were set as follows: parameter \(b=5\), parameter \(a=1\), parameter \(u=4\), parameter \(U=\tau\bar{R}\), forgetting factor \(\rho=1-\exp(-4)\), adjustment factor \(\tau=6\), and the number of iterations \(N=1,2,3,5,10\). All algorithms were coded with MATLAB R2020b on a computer. To compare the state estimation accuracy of the aforementioned nonlinear filtering algorithms, the root mean square error (RMSE) [39] and the average root mean square error (ARMSE) of the state vector is chosen to represent the filtering accuracy, and is defined as follows:  
\[RMSE_{\text{pos}} =\sqrt{\frac{1}{N}\sum_{n=1}^{N}\left(\left(m_{t}^{n}-\hat{m}_{t }^{n}\right)^{2}+\left(r_{t}^{n}-\hat{r}_{t}^{n}\right)^{2}\right)} \tag{47}\] \[RMSE_{vel} =\sqrt{\frac{1}{N}\sum_{n=1}^{N}\left(\left(m_{t}^{n}-\hat{m}_{t }^{n}\right)^{2}+\left(r_{t}^{n}-\hat{r}_{t}^{n}\right)^{2}\right)}\] (48) \[ARMSE_{pos} =\sqrt{\frac{1}{NT}\sum_{t=1}^{T}\sum_{n=1}^{N}\left(\left(m_{t }^{n}-\hat{m}_{t}^{n}\right)^{2}+\left(r_{t}^{n}-\hat{r}_{t}^{n}\right)^{2} \right)}\] (49) \[ARMSE_{vel} =\sqrt{\frac{1}{NT}\sum_{t=1}^{T}\sum_{n=1}^{N}\left(\left(\hat{m }_{t}^{n}-\hat{m}_{t}^{n}\right)^{2}+\left(r_{t}^{n}-\hat{r}_{t}^{n}\right)^{2} \right)} \tag{50}\]  
where \(\left(m_{t}^{n},r_{t}^{n}\right)\) is the true position, \(\left(m_{t}^{n},p_{t}^{n}\right)\) is the estimated position, and \(N\) denotes the number of times the algorithm is run. In Figure 1, the impact of iteration numbers on the VBAIEKF algorithm is examined. The iteration count influences the proposed VBAIEKF in a distinct manner, with values set at \(N=1,2,3,5,10\). The observed trend indicates that as the number of iterations increases, the convergence speed gradually decreases, while the computational load correspondingly increases. Analysis of the ARMSE in position and velocity reveals a clear pattern; the ARMSE values demonstrate that accuracy improves with an increase in iterations, ultimately converging.