Initial Tracking Parameter Estimation of Magnetic Ship Based on PSO

We consider the problem of tracking a surface magnetic ship as it travels in a straight line path with the exertion of a magnetometer located at the seabed. Note that the initial ﬁlter parameters are prior information and the tracking performance depends on the initial ﬁlter parameters, and traditional estimation of initial ﬁlter parameters is to apply the ﬁlter bank algorithm, but there are several obvious defects in this method. In this paper, a novel algorithm based on the particle swarm optimization (PSO) algorithm is proposed to estimate initial parameters of the ﬁlter, and the model of uniformly magnetized ellipsoid is adopted to ﬁt the magnetic ﬁeld of the ship. The simulation results show that, under the condition of no prior information, the estimated ship parameters based on the observation of the single-observer are invalid, whereas the estimated ship parameters based on the observation of the double-observer are valid. Further, the estimated results of real-world recorded magnetic signals show that the ship parameters estimated by PSO based on the double-observer are also valid, as the estimated parameters are used as the initial parameters of the unscented Kalman ﬁlter (UKF), and a ship can be tracked eﬀectively by the UKF ﬁlter. Moreover, the estimated half focal length can be used as a feature to distinguish noise environment, ships with diﬀerent sizes, and mine sweepers.


Introduction
e main body of modern warship is composed of ferromagnetic materials. As warship is magnetized in the geomagnetic field, a warship magnetic field is formed, which is an ideal signal source for carrying out underwater magnetic detection and tracking [1,2]. e difficulty of underwater magnetic tracking lies in the estimation of the initial parameters of the filter. In the whole process of ship magnetic field tracking, the prior information of the filter tracking algorithm is missing, since the information of magnetic moment, orientation, and distance is hidden in the observation signal [3]. At present, the research on tracking the moving ship based on the ship magnetic field has been very extensive, and its estimation filtering algorithm is mainly divided into the particle filter framework [4,5] and the Kalman filter framework [6,7]. However, in the application of magnetic ship tracking, the observation information is only the moving ship's magnetic field. As for sequential filter tracking methods, the tracking performance is closely related to the set of initial parameters. Comparing with the particle filter, the unscented Kalman filter (UKF) confirms the superiority of computational cost because the particle filter needs a large number of particles to fit the posterior probability distribution of estimated parameters.
As for the shadowing filter [8,9], the optimization is based on a series of observed data by the Lagrange multiplier method or the gradient descent method. In the application of magnetic ship tracking, we should utilize the ship's magnetic field to estimate ship's magnetic moment, position, and velocity. It is an 8-dimensional problem, and it is difficult to compute the Jacobian matrix of the uniformly magnetized ellipsoid model; moreover, the 6-dimensional observed magnetic field mismatches with the 8-dimensional estimated parameter.
A method for estimating the initial parameters of filter banks based on maximum likelihood selection is proposed by Hanlon and Maybeck [7], and there are three obvious defects in this method. One is that the initial parameters of each filter still needs to be set based on the experience, and the number of filters is limited; the second is that only the ship is close to the CPA point (closest proximity approach), and the selected filter can be determined, but the real-time tracking distance of the magnetic target is sacrificed; third, even when the filter is selected, there is a nonnegligible deviation between the initial parameters and the true parameters, which results in poor performance of the subsequent tracking. e ship parameters are estimated based on the ship's whole passing characteristics collected by a single three-axis magnetometer in [10]. However, only part of the data can be obtained at a distance. In this situation, the observation information based on the single-observer is insufficient, which leads to multiple extreme points in the estimation equation. erefore, the method in [8] cannot estimate the initial motion parameters and magnetic moment at a distance in real time.
A multiobserver modeling algorithm for magnetic ship parameter estimation is proposed in [9], and its main idea lies in two aspects. One is that the natural magnetic noises cannot be fitted with the uniformly magnetized ellipsoid like the moving magnetic target ship; the other is assuming that the ship moves in a straight line at a constant speed and makes full use of this information in solving the target equation. In [11], the 0.618 one-dimensional optimization algorithm, Powell two-dimensional search algorithm, and stepwise regression algorithm are combined to solve the objective equations. However, the combined algorithm needs more manual operation to set the range of initial solution based on experience. In fact, the objective equations can be solved by the heuristic optimization algorithm to estimate the initial motion parameters and magnetic moment of the ship.
In this paper, based on the sufficient observation information obtained by a double vector magnetometer, the PSO algorithm is employed to estimate the motion parameters and magnetic moment of the ship at a distance [12].

Moving Ship's Magnetic Model
e ship's magnetic field can be fitted by a uniformly magnetized ellipsoid model [11]. Ellipsoid's long axis equals to the length of the ship L, ellipsoid's short axis equals to the width of the ship W, and K denotes the half focal length of the ellipsoid. Figure 1 shows the three-axis projection model of the moving ship's magnetic field. e carrier coordinate system oxyz is established with the ship center o as the origin. e x-axis is consistent with the navigation direction of the ship, the y-axis is perpendicular to the ship's heading and points to the starboard direction, and the z-axis is vertical downward. Several vector magnetometers are arranged on the seafloor to form a linear array, where the coordinate system O i XYZ is the measurement coordinate system established with the three-axis magnetometer O i as the origin. e directions of the X-axis, Y-axis, and Z-axis are consistent with those of the corresponding axis of the three-axis magnetometer. e navigation angle α 0 is the angle between the x-axis and the X-axis, the CPA point is the vertical point of the O 1 point on the x-axis, the projection distance of the CPA point on the horizontal plane is denoted by R, and the placement depth of the magnetometer is denoted by D. e magnetic field produced by the uniformly magnetized ellipsoid at the measuring point (x j , y j , z j ) is where i denotes the different magnetometers; j denotes the different measuring points; M x , M y , and M z are the magnetic moment in the x, y, and z directions of the uniformly magnetized ellipsoid; (a xij , a yij , a zij , b xij , b yij , b zij , c xij , c yij , c zij ) are the corresponding magnetic field calculation coefficients of the uniformly magnetized ellipsoid, where Considering the motion property of the ship in a short period, it is assumed that the ship moves uniformly and in a straight line in the coordinate system O 1 XYZ, where V X and V Y are the navigation speed in the X-direction and the Ydirection, respectively and T s is the sample period of the magnetometer; then, the motion equation of the ship center point o relative to the coordinate system O 1 XYZ can be expressed: Moreover, the coordinates of the magnetometer O i relative to the ship coordinate system oxyz can be expressed: where [X Oi , Y Oi ] is the coordinate of the magnetometer O i relative to the coordinate system O 1 XYZ. Substituting (4) into (1), by using the plane coordinate conversion formula, the measurements of the three-component magnetometer can be obtained: where H Xij , H Yij , and H Zij are the magnetic field intensities measured by the three-axis magnetometer. From (1) and (5), it can be known that the following observation meets: where Assuming that the number of magnetometers placed on the seafloor is denoted by m and the number of points measured by each magnetometer for estimation is denoted by N, the magnetic measurement model can be expressed as the following pseudolinear equation: where G � TF 11 ; TF 12 ; · · · ; TF iN ; TF 21 ; TF 22 ; · · · ; TF 2N ; TF m1 ; TF m2 ; · · · ; TF mN , e number of equations in (6) is 3 mN, and the number of columns is 3. As the result of the MMSE method, the problem of parameter estimation of the magnetic target in (6) can be transformed into arg min Obviously, the measurement model is easy to be overdetermined equations; so (8) can be solved with the MMSE method: where G + is the M-P generalized inverse matrix of G. For G being a column full-rank matrix, G + exists and is unique, namely, Substituting (12) into equation (10), the problem of parameter estimation of the magnetic target can be transformed into arg min where I is the unit matrix and S � [X sc , Y sc , V X , V Y , K] is the improved estimated vector, and the dimension of the estimated vector is improved from 8 to 5. Equation (13) is a typical multivariable optimization problem, which can be solved by the particle swarm optimization algorithm. In particular, here, one ellipsoid model is employed to fit the magnetic field of a ship; if a mixed model of multiple dipoles and ellipsoid is employed, G may be pathological. An improved stepwise regression method is proposed to calculate G + in [13], which can eliminate the redundant column vectors of G, in order to lower the condition number and improve the estimation accuracy.

Experiment and Result Analysis
Particle swarm optimization algorithm [12] (PSO) is a kind of the swarm intelligence optimization algorithm. Each particle in the algorithm denotes a potential solution of a problem. e speed of the particle determines the direction and distance of particle movement. e speed is dynamically adjusted with the movement experience of itself and other particles to realize the dynamic optimization of individual solvable space. In view of the huge cost of the PSO algorithm, its estimation is only used as initial parameters of the tracking filter estimation algorithm, and the real-time tracking adopts the double-observer UKF magnetic tracking algorithm. e combination of the two algorithms can realize the accurate tracking of the ship based on the underwater magnetic measurement.

Simulation Experiment and Result Analysis.
As mentioned in the previous chapter, in the application scenario of ship initial parameter estimation, it mainly focuses on the optimization of estimated vector S. Considering the magnetic detection distance, velocity, length, and width of the actual ship, the optimization space of the particle swarm optimization algorithm is set as Simulation experiments are mainly divided into the following two aspects: (1) comparing the performance between the single-observer and the double-observer; (2) testing the performance of the UKF magnetic tracking algorithm under different initial parameter conditions. Simulation experiments aim to verify the accuracy of estimated parameters, and also to verify the effectiveness, while the estimated parameters are used as the initial parameters of the tracking filter. e simulation condition is shown as follows: the ship is on the water surface, and its half focal length K � 50 m; magnetic moment M x � 3 · 10 5 A · m 2 , M y � 2 · 10 5 A · m 2 , and M z � 1 · 10 5 A · m 2 ; starting point of the ship X sc � −100 m, Y sc � −80 m; moving speed V X � V Y � 3.54 m/s; sampling period T s � 0.05; the number of magnetometers m � 2; the number of points measured by each magnetometer for estimation N � 40; moving period T � 75 s; magnetometers are arranged on the sea floor; water depth D � 30 m; noise follows Gaussian distribution N(0, 0.5 2 ); magnetometer 1's coordinate is (0, 0, 0) m, magnetometer 2's coordinate is (10, 0, 0) m; PSO population iteration times maxgen � 300; population scale sizepop � 100.

Performance Comparison between Single-Observer and
Double-Observer. Based on the PSO algorithm, 100 times Monte Carlo simulations are conducted; as shown in Figure 2, " * " denotes the estimated results of the singleobserver, "+" denotes the estimated results of the doubleobserver, and "O" denotes the true parameters. It can be seen that the estimated parameters of the single-observer are invalid, whereas the estimated parameters of the double-observer are relatively close to the real parameters. In the single-observer situation, the estimated vector is 8 dimensional, but the observation information is only a 3-dimensional system; although a series of points are used to solve equation (13), it still leads to multiple extreme points in the estimation equation. In the double-observer situation, the performance is far better because the observation information is a 6-dimensional system. e relative errors of the double-observer estimation are shown in Table 1. It can be seen that the relative errors of the motion parameters are less than 10%, and the relative errors of the magnetic moment estimation are less than 15%, which meets the initial parameter requirements for ship tracking at a distance. In addition, the relative errors in Table 1 are the estimated result under the condition of low signal-to-noise ratio, for the ship is at a distance. As the ship appraoches, the relative errors of parameter estimation will be greatly reduced. In particular, the estimated half focal length is not ideal owing to the shape of the ellipsoid model which has less influence on the far-field magnetic field and greater influence on the near-field magnetic field. If the distance from the object is large in comparison with ship's length, the induced magnetic field can be described as a dipole field [6]. In addition, the mean estimated value of half focus length in noise environment is 3.31, whereas the mean estimated value of half focus length of the ship is 36.89. Although the estimated accuracy of half focus length in the far field is not high, the difference of estimated half focus length between the ship and noise environment is still obvious.

Performance of UKF Magnetic Tracking Algorithm under Different Initial Parameter Condition.
Under different initial distance errors, 100 times Monte Carlo tracking simulations are conducted. As shown in Figure 3, the dotted line denotes the tracking RMSE under the initial distance error of 100 m, the dash-dotted line denotes the tracking RMSE under the initial distance error of 50 m, and the solid line denotes the tracking RMSE such that initial parameters are double-observer estimated results of PSO. Obviously, the tracking performance will be seriously deteriorated while the initial distance error is too large. It can be seen that, as the double-observer estimated results are used as the tracking initial parameters, with the approach of the ship, the tracking error will rapidly reduce, and the tracking error is no more than 1 m at close distance. Figure 4 shows the tracking RMSE of half focal length using the UKF magnetic tracking algorithm, where the initial parameters of the filter are double-observer estimated results of PSO. It can be seen that although the initial error of the half focal length is large in the far-field situation, with the approach of the ship, the estimated half focal length error is no more than 1 m.

Ship Test and Conclusion Analysis.
In order to further test the performance of the estimation algorithm and tracking algorithms, a cooperative target test was carried out in the South China Sea. e test target is a small fishing boat with a length of about 80 m and a width of about 8 m, the depth of the sea area is about 30 m, the distance between the two magnetometers is about 12 m, and the sampling rate is 2 Hz. e fishing boat's heading of voyage 1 and voyage 3 is due east, and the heading of voyage 2 and voyage 4 is due west, passing by the magnetometers. Based on the measurement of double magnetometers, the PSO algorithm is employed to estimate the initial parameters of target parameters. e optimization space, population iteration times, and population size parameters are consistent with Section 3.1. e estimated results are shown in Table 2, where the motion reference parameters are GPS positioning results.
It can be seen from Table 2 that the position estimation errors of the PSO algorithm are less than 15m, the estimation errors of velocity in the X-direction and the Y-direction are less than 0.3 m/s, and the estimation errors of half focus length are less than 12 m. e main sources of estimation errors are as follows: (1) the ship's shape is irregular, and the local magnetic field is produced by the ship's electrical system, so there will be model errors while employing the uniformly magnetized ellipsoid model to fit the ship's magnetic field; (2) the ship's motion process is not a strictly uniform linear motion due to the influence of waves and surges; (3) GPS positioning error; (4) the distance error between two magnetometers.
Taking the estimated parameters of the PSO algorithm as the initial parameters of the UKF tracking filter, the tracking errors are shown in Figure 5, where the solid line denotes the tracking errors of voyage 1, the dashed line denotes the tracking errors of voyage 2, the dash-dotted line denotes the tracking errors of voyage 3, and the dotted line denotes the tracking errors of voyage 4. e tracking errors of the whole process is less than 20 m, and the position estimated results of four voyages are less than 10 m at the CPA point (T � 40 s), obviously it meets the accuracy requirement of the underwater preset weapon. In addition, the estimation errors of half focal length are less than 8 m at the CPA point, and it means that the feature can be applied to distinguish noise environment, different size ships, and mine sweepers. It should be noted that the parameter estimation here is the calculated result without any prior information, which shows some practical significance.

Conclusion
Considering that the tracking performance of the magnetic target is sensitive to the initial filter parameters, an algorithm is proposed to estimate the initial parameters of the filter with the application of the particle swarm optimization (PSO) algorithm. It is presumed that the ship tracks along a straight line at a constant speed. Based on the observation information of the double magnetometers, a uniformly magnetized ellipsoid model simulating ship's magnetic field is established. en, the PSO algorithm is employed to obtain ship parameters at a distance. e estimated results show that the observation of the single-observer fails to estimate the ship parameters without prior information, whereas the ship parameters estimated by the double-observer are authentic. e estimated results of real-world recorded magnetic signals show that the parameters estimated by the PSO algorithm based on the double-observer are also authentic. Furthermore, the estimated ship parameters are used as the initial parameters of the UKF filter, on the basis of which a ship can be tracked effectively by using the UKF filter. Moreover, the estimated half focal length can be used as a feature to distinguish noise environment, ships with different sizes, and mine sweepers.

Data Availability
A cooperative target test was carried out in the South China Sea, the test target is a small fishing boat with a length of about 80 m and a width of about 8 m, the depth of the sea area is about 30 m, and the distance between the two magnetometers is about 12 m. e experimental data are not disclosed.

Conflicts of Interest
e authors declare no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.