## 3 IVE-KF Algorithm
### Initial Value Estimation  
In the data collection process, the detector is evenly distributed on the detection plane. The detector position is denoted by \(\mathbf{r}_{d}\), and the area of the detection plane is \(\left(2N+1\right)p_{s}\times\left(2M+1\right)l_{s}\). After all data are collected on the detection plane, the secondary field strength at each \(\mathbf{r}_{d}\left(k\right)\)\(\left(k=1\cdots w\right)\) is calculated. The secondary field strength map is composed of these data. According to the secondary field strength map, a relatively accurate estimation of the metal target's parameters is obtained. The horizontal position estimation is [29]:  
\[\left[\hat{X}_{0},\hat{Y}_{0}\right]^{T}=\text{Hor}\left(\mathbf{r}\left(argmax \left(\left|\mathbf{C}\left(k\right)\right|\right)\right)\right), \tag{16}\]  
where \(\left(\hat{X}_{0},\hat{Y}_{0}\right)\) is the estimation of the target's \(x\)-coordinate and \(y\)-coordinate, \(argmax\left(\cdot\right)\) is used to obtain the variable value when the function reaches its maximum value, \(\mathbf{C}\left(k\right)\) is the collected data, and \(\text{Hor}\left(\mathbf{r}\right)\) represents the horizontal component of the position vector \(\mathbf{r}\). The secondary field strength maps of the sphere and the cylinder objects are shown in Figure 4.  
When the detected target is a sphere of uniform material, a circular bullseye shape occurs in the secondary field strength map, and the position of maximum strength is exactly the horizontal position of the spherical target, as shown on the left side of Figure 4. However, for cylindrical targets in different postures, the secondary field strength map is asymmetrical and may have multiple local maxima, as shown on the right side of Figure 4. In such a case, an inaccurate estimation of the target's horizontal position is obtained according to Formula (16). To make the algorithm more universal, the first-order central moment of the secondary field strength map is used to estimate the initial state of the target's horizontal position in this paper [30]:  
\[\hat{X}_{0}=\frac{\sum\limits_{i=1}^{w}\left|\mathbf{C}\left(k\right)\right|X \left(k\right)\right.}{\sum\limits_{i=1}^{w}\left|\mathbf{C}\left(k\right)\right|} \quad,\quad\hat{Y}_{0}=\frac{\sum\limits_{i=1}^{w}\left|\mathbf{C}\left(k\right) \right|Y\left(k\right)}{\sum\limits_{i=1}^{w}\left|\mathbf{C}\left(k\right)\right|}, \tag{17}\]  
where \(X\left(k\right)\) and \(Y\left(k\right)\) are the \(x\)-axis component and the \(y\)-axis component of the detector position \(\mathbf{r}_{d}\left(k\right)\), respectively. The FWHM method is used to estimate the depth of the target [31]:  
\[\hat{Z}_{0}=2\sqrt{\frac{S}{\pi}}, \tag{18}\]  
where \(S\) is the area in which the value is greater than half of the maximum value on the secondary field strength map. After depth estimation, the target's initial position vector \(\hat{\mathbf{r}}_{0}=\left[\hat{X}_{0}\ \hat{Y}_{0}\ \hat{Z}_{0}\right]^{T}\) is obtained. According to Formula (14), the secondary field strength \(B_{s}\), Green function \(G\), magnetic polarizability tensor \(M\) and primary field strength \(B_{P}\) are all linearly related. \(G\) can be calculated according to the detector's and target's positions, and \(B_{P}\) can be calculated according to Formulas (1)-(3); thus, \(M\) can be directly calculated by the linear equation:  
\[\mathbf{MB}_{P}=\mathbf{G}^{-1}\mathbf{B}_{s}. \tag{19}\]  
The magnetic polarizability tensor \(M\) is a symmetric matrix with six different parameters. In practice, only three sets of equations can be obtained from a set of collected data, so at least two sets of collected data are needed to calculate the six parameters \(M_{11},M_{22},M_{33},M_{12},M_{13},M_{23}\) and the sets of data we collected are much more than two sets. Therefore, as long as the position estimation of the detected target is obtained, the other six parameters can be obtained.