# Radar Error Correction Method Based on Improved Sparrow Search Algorithm
## 2 Radar Measurement Error Model
\begin{bmatrix}x_{LRT}(k)\\ y_{LRT}(k)\\ z_{LRT}(k)\end{bmatrix}  \tag{9}\]  
Equations (7) and (9) both represent the real coordinates of the same reference source in the ECEF coordinate system at a certain time, allowing us to calculate the following:  
\[ \begin{bmatrix}x_{EG}(k)\\ y_{EG}(k)\\ y_{EG}(k)\end{bmatrix} +\mathbf{T}\times \begin{bmatrix}v_{x}\Delta t\\ v_{y}\Delta t\\ v_{z}\Delta t\end{bmatrix} = \begin{bmatrix}x_{s}\\ y_{s}\\ z_{s}\end{bmatrix} +\mathbf{T}\times \begin{bmatrix}x_{LRT}(k)\\ y_{LRT}(k)\\ z_{LRT}(k)\end{bmatrix}  \tag{10}\]  
Through substituting Equation (8), we can obtain the following:  
\[ \begin{bmatrix}x_{s}-x_{EG}(k)\\ y_{s}-y_{EG}(k)\\ z_{s}-z_{EG}(k)\end{bmatrix} +\mathbf{T}\times \begin{bmatrix}[r_{m}(k)-\Delta r-n \eta_{m}(k)]\sin[\theta_{m}(k)-\Delta\theta-n\theta_{m}(k)]\cos[\eta_{m}(k)- \Delta\eta-n\eta_{m}(k)]-v_{x}\Delta t\\ [r_{m}(k)-\Delta r-n\eta_{m}(k)]\cos[\theta_{m}(k)-\Delta\theta-n\eta_{m}(k)] \cos[\eta_{m}(k)-\Delta\eta-n\eta_{m}(k)]-v_{y}\Delta t\\ [r_{m}(k)-\Delta r-n\eta_{m}(k)]\sin[\eta_{m}(k)-\Delta\eta-n\eta_{m}(k)]-v_{z} \Delta t\end{bmatrix} =0 \tag{11}\]  
Thus, the integrated error model can be established through combining the communication delay and the radar systematic error. The integrated systematic error vector can be denoted as \(\mathbf{\beta}=[\Delta r,\Delta\theta,\Delta\eta,\Delta t]^{\top}\). The estimated value \(\mathbf{\hat{\beta}}\) can be obtained through solving Equation (11). Obviously, Equation (11) is a nonlinear system of equations. In existing studies, no matter the GLS algorithm [22] or KF algorithm [21], Equation (11) needs to be transformed into a linear equation by using first-order Taylor expansion and ignoring higher-order terms, and then be solved. This approximation process introduces new deviations, making the estimation results inaccurate. The solution of the systematic error is essentially to find a set of estimates that minimize the Euclidean distance between the corrected radar measurement and the GNSS track. Therefore, by constructing an objective function and using the nonlinear optimization algorithm, the systematic error estimation problem can be transformed into a multidimensional, multi-peak optimization problem to avoid the deviation caused by the nonlinear system approximation process. Let \(\mathbf{\psi}(k)=[r_{m}(k)-nr_{m}(k),\theta_{m}(k)-n\theta_{m}(k),\eta_{m}(k)-n\eta_{m} (k)]^{\top}\), then  
\[ \begin{split}& f(\mathbf{\psi}(k),\mathbf{\beta})=\left[\begin{array}{c} \Delta x(k)\\ \Delta y(k)\\ \Delta z(k)\end{array}\right]\\ &=\left[\begin{array}{c}x_{s}-x_{EG}(k)\\ y_{s}-y_{EG}(k)\\ z_{s}-y_{EG}(k)\end{array}\right]+\mathbf{T}\times\left[\begin{array}{c}[r_{m} (k)-\Delta r-nr_{m}(k)]\sin[\theta_{m}(k)-\Delta\theta-n\theta_{m}(k)]\cos[ \eta_{m}(k)-\Delta\eta-n\eta_{m}(k)]-v_{s}\Delta t\\ [r_{m}(k)-\Delta r-nr_{m}(k)]\cos[\theta_{m}(k)-\Delta\theta-n\theta_{m}(k)] \cos[\eta_{m}(k)-\Delta\eta-n\eta_{m}(k)]-v_{y}\Delta t\\ [r_{m}(k)-\Delta r-nr_{m}(k)]\sin[\eta_{m}(k)-\Delta\eta-n\eta_{m}(k)]-v_{z} \Delta t\end{array}\right]\end{split}  \tag{12}\]  
Taking \(N\) measurements of the reference source, the objective function can be constructed as follows:  
\[J=\min\sum_{k=1}^{N}J_{k}=\min_{\mathbf{\beta}\in\mathbf{\Omega}}\sum_{k=1}^{N}\left\| f(\mathbf{\psi}(k),\mathbf{\beta})\right\|_{2} \tag{13}\]  
where \(\mathbf{\Omega}\) is the domain of \(\mathbf{\beta}\). The error vector \(\mathbf{\beta}\) can be estimated through optimizing Equation (13) using the nonlinear optimization algorithm. Swarm optimization algorithms represented by the particle swarm optimization (PSO) algorithm [29], gray wolf optimization (GWO) algorithm [30], and sparrow search algorithm [31] have been widely used in solving optimization problems due to their advantages, such as no derivative mechanism, simple parameter setting, and strong robustness. However, when dealing with complex problems, such algorithms often have poor real-time performance, and easily fall into local optimality.