## 3 IVE-KF Algorithm
### Initial Value Estimation
Assuming that the \(k\)th set of data \(\mathbf{C}\left(k\right)\) is collected, let \(\mathbf{T}\left(k\right)=\mathbf{G}^{-1}\mathbf{C}\left(k\right)=\left[T_{x}\left(k\right),T_{y}\left(k\right),T_{z}\left(k\right)\right]^{T}\), with primary field strength \(\mathbf{B}_{\mathbf{p}}\left(k\right)=\left[B_{x}\left(k\right),B_{y}\left(k\right), B_{z}\left(k\right)\right]^{T}\), and then combine the Formulas (9) and (19):  
\[\left\{ \begin{array}{l}M_{11}B_{x}\left(k\right)+M_{12}B_{y}\left(k\right)+ M_{13}B_{z}\left(k\right)=T_{x}\left(k\right),\\ M_{12}B_{x}\left(k\right)+M_{22}B_{y}\left(k\right)+M_{23}B_{z}\left(k\right)=T _{y}\left(k\right),\\ M_{13}B_{x}\left(k\right)+M_{23}B_{y}\left(k\right)+M_{33}B_{z}\left(k\right)=T _{z}\left(k\right).\end{array} \right. \tag{20}\]  
Formula (20) can be written in matrix form [9]:  
\[\left[ \begin{array}{cccccc}B_{x}\left(k\right)&0&0&B_{y}\left(k\right)&B_{z }\left(k\right)&0\\ 0&B_{y}\left(k\right)&0&B_{x}\left(k\right)&0&B_{z}\left(k\right)\\ 0&0&B_{z}\left(k\right)&0&B_{x}\left(k\right)&B_{y}\left(k\right)\\ \end{array} \right]\left[ \begin{array}{c}M_{11}\\ M_{22}\\ M_{33}\\ M_{12}\\ M_{13}\\ M_{23}\end{array} \right]=\left[ \begin{array}{c}T_{x}\left(k\right)\\ T_{y}\left(k\right)\\ T_{z}\left(k\right)\\ \end{array} \right]. \tag{21}\]  
For simplicity, Formula (21) is written as:  
\[\mathbf{W}\left(k\right)\mathbf{M}_{0}=\mathbf{T}\left(k\right), \tag{22}\]  
where \(M_{0}=\left[M_{11},M_{22},M_{33},M_{12},M_{13},M_{23}\right]^{T}\). When there are multiple sets of collected data \(\mathbf{C}\left(k_{1}\right),\mathbf{C}\left(k_{2}\right),...,\mathbf{C}\left(k_{L}\right)\), let \(\mathbf{W}=\left[ \begin{smallmatrix}\mathbf{W}\left(k_{1}\right)^{T}\mathbf{W}\left(k_{2} \right)^{T}...\mathbf{W}\left(k_{L}\right)^{T}\end{smallmatrix} \right]^{T}\), \(\mathbf{T}=\left[ \begin{smallmatrix}\mathbf{T}\left(k_{1}\right)^{T}\mathbf{T}\left(k_{2} \right)^{T}-\mathbf{T}\left(k_{L}\right)^{T}\end{smallmatrix} \right]^{T}\). Formula (22) can be written as:  
\[\mathbf{W}\mathbf{M}_{0}=\mathbf{T}. \tag{23}\]  
When \(L=2\), \(\mathbf{W}\) is a square matrix and reversible, Formula (23) has a unique solution:  
\[\mathbf{\hat{M}}_{0}=\mathbf{W}^{-1}\mathbf{T}. \tag{24}\]  
When \(L>2\), Formula (23) becomes an overdetermined system. Due to the noise in the collected data, it is usually impossible to find a set of solutions \(\mathbf{\hat{M}}_{0}\) that strictly satisfy all the equations in Formula (23), that is, the equations have no solution. However, we can find a set of solutions \(\mathbf{\hat{M}}_{0}\) that satisfy all the equations in Formula (23) as much as possible:  
\[\mathbf{\hat{M}}_{0}=\operatorname*{arg\,min}_{M_{0}}\left\{\left\|\mathbf{T}-\mathbf{W}M _{0}\right\|_{2}\right\}, \tag{25}\]  
where \(\left\|\bullet\right\|_{2}\) is the Euclidean norm. Solving the above Formula, we can obtain:  
\[\mathbf{\hat{M}}_{0}=\left(\mathbf{W}^{T}\mathbf{W}\right)^{-1}\mathbf{W}^{T}\mathbf{T}. \tag{26}\]In the process of solving Formula (26), an ill-posed problem may occur, which leads to an obtained solution that has no practical significance. The reason for this problem is that \(\mathbf{W}^{T}\mathbf{W}\) may be an ill-conditioned matrix [32]. A small error in the measured value is amplified by the ill-conditioned system, causing the solution to change drastically. Specifically, a small error in \(\mathbf{T}\) causes the result \(\mathbf{\hat{M}}_{0}\) to be abnormal and to lose its practical significance. In this paper, the Tikhonov regularization method [33] is used to solve the ill-posed problem.