# Study on Active Tracking of Underwater Acoustic Target Based on Deep Convolution Neural Network
## 2 Kalman Filter Active Tracking Based on Deep Convolutional Neural Network
### Tracking Process  
In this article, we simplify the sonar working environment to two-dimensional plane observation. In the early stage of tracking, we obtain the target's motion state including distance \(r\) and azimuth \(\theta\) through initial measurement, convert the target's information from polar coordinate form \((r,\theta)\) to Cartesian coordinates \((x,y)\), and establish the target state equation and motion equation.  
\[X_{k+1}=FX_{k}+Gw_{k} \tag{10}\]  
\[Z_{k}=HX_{k}+\theta_{k} \tag{11}\]  
In Formula (10), \(X_{k}\) is the target motion state matrix in period \(k\), \(F\) is the state transition matrix, and \(G\) is the noise driving matrix. \(w_{k}\) and \(\theta_{k}\) are uncorrelated white noise with zero mean, and their variance matrices are \(Q\) and \(R\) respectively. \(w_{k}\) is the input noise and \(\theta_{k}\) is the observation noise. \(H\) is the observation matrix, and \(Z_{k}\) is the corresponding observation signal matrix \(\{Z_{1},Z_{2},\cdots,Z_{k}\}\).  
According to the existing data, the velocity components \(v_{x}\) and \(v_{y}\) of the target in the \(x\) and \(y\) directions are calculated. The position and velocity matrix of the target can be expressed as  
\[X=\left[x,v_{x},y,v_{y}\right] \tag{12}\]  
In the follow-up tracking process, the trained model is used to identify the azimuth-weighted time-frequency image of the echo signal. In order to reduce the amount of calculation, Kalman filtering is used to predict the motion state of the target. As shown in Formula (13), the minimum variance estimated value \(\hat{X}_{k}\) obtained from this observation is used to predict the motion state \(X_{pre}\) of the target in the next cycle.  
\[X_{pre}=F\hat{X}_{k} \tag{13}\]  
Formula (14) is the prediction covariance matrix, and \(P_{k}\) is a quantitative description of the pros and cons of the prediction quality.  
\[P_{k}=FP_{k-1}F^{T}+GQG \tag{14}\]Formulas (13) and (14) describe the time update process of Kalman filtering. According to the obtained target motion state prediction information, the arrival time \(t\) of the target echo and the azimuth angle \(\theta\) of the target are calculated. Then we intercept the echo signal matrix near the predicted time \((t\pm 1)\) s, take the predicted azimuth as the center \((\theta\pm 5)^{\lx@overaccentset{{\circ}}{\text{,}}}\) and generate the time-frequency image of the signal related to the azimuth and the time to be detected according to Formulas (1)-(6) in Section 2.1. Part of the time-frequency image of the signal to be identified is shown in Figure 10.  
We use the trained model to recognize the time-frequency image of the signal to be detected, obtain the azimuth and distance \((r_{k},\theta_{k})\) of the target in this tracking period, and convert it to Cartesian coordinates \((x_{k},y_{k})\). The Kalman filter is used to correct the deviation of the initial motion state \(Z_{k+1}\) of the target obtained in this observation. The filter gain is calculated before correction  
\[K_{k+1}=P_{k+1}H^{T}\Big{[}HP_{K+1}H^{T}+R\Big{]}^{-1} \tag{15}\]  
Then calculate the filtered target state  
\[\hat{X}_{k+1}=X_{pre}+K_{k+1}\big{(}Z_{k+1}-HX_{pre}\big{)} \tag{16}\]  
Finally update the covariance matrix for the calculation of the next cycle  
\[P_{k+1}=[I_{n}-K_{k+1}H]P_{k} \tag{17}\]  
According to Formulas (15)-(17), the Kalman filter is used to predict the azimuth and distance of the target during the tracking process, and the deviation is corrected to obtain more accurate target state information. Finally, the target status information is obtained in each cycle is updated in the tracking system to complete the tracking.