# 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
### Active Sonar Echo Signal Preprocessing to Generate Data Set  
In active tracking, the first step is to determine the moving target to be tracked and generate a target data set. The specific process is shown in Figure 2. Firstly, we generate a weighting matrix containing the target orientation information based on the target detected from the original array signal, and multiply it with the array signal matrix to obtain the frequency domain data of the target echo signal; then convert the frequency domain data to time domain data and do the short-time Fourier transform to generate the time-frequency images of the target echo signal; finally, the time-frequency images of different targets are labeled and stored in the data set. Figure 1: DCNN-KFAT flow chart. The preprocessing step detects the target and generates the target data set, and trains to obtain the model; in the follow-up tracking process, the generated signal time spectrogram with different azimuth weights is recognized by the trained model; finally the target azimuth and distance are obtained. Figure 2: Data set generation process. Generate a weighting matrix according to the target azimuth and multiply it with the array signal to obtain the frequency domain matrix of the target echo signal, then convert it into a time domain matrix, generate a time-frequency image by short-time Fourier transform, and finally label the tag and store it in the data set. After the active sonar transmits the signal, the array continues to receive the echo signal within a period, accumulate 1 s echo signal \(Y(t)\) through Fourier transform to generate a matrix in frequency domain,  
\[F(\omega)=\mathcal{F}[Y(t)]=\int_{-\infty}^{\infty}Y(t)\mathrm{e}^{-\mathrm{j} \omega t}dt \tag{1}\]  
We obtain the spatial energy spectrum through matched filtering and beamforming. The spatial energy spectrum accumulation in the period is shown in Figure 2(a). Suspected targets are filtered out through threshold detection, and the approximate position (distance \(r\), azimuth \(\theta\)) of the target is calculated according to the speed of sound \(c\) and echo arrival time \(t\), providing prior information for confirming the target, and determining the tracking target through data association. After the target is determined, a weighting matrix \(W\) is generated according to the detected target azimuth \(\theta\), as shown in Figure 2(b). \[W=\mathrm{e}^{-\mathrm{j}2\pi\omega(m-1)d\sin\theta/c}m=1,2,\ldots,M \tag{2}\]  
Figure 3: Time-frequency images related to the target’s azimuth. We multiply the weighting matrix with the echo signal matrix \(F(w)\) to obtain the weighted target frequency domain data \(F^{\prime}(w)\),  
\[F^{\prime}(w)=F(w).*W \tag{3}\]  
After the transformation, the signal is concentrated on the azimuth of the target, which minimizes interference from other directions. We convert the weighted target frequency domain data \(F^{\prime}(w)\) into time domain data \(f(t)\) through the inverse Fourier transform, as shown in Figure 3c. \[f(t)=\mathcal{F}^{-1}\big{[}F^{\prime}(\omega)\big{]}=\frac{1}{2\pi}\int_{- \infty}^{\infty}F^{\prime}(\omega)\text{e}^{\text{i}\omega t}dw \tag{4}\]  
Since the signal duration of each beamforming is 1 s, in order to fully include the target echo signal, the integration duration is set to 3 s.  
\[F(t)=\sum f(t) \tag{5}\]  
Finally, we use short time Fourier transform (\(STFT\)) on the integrated target time domain data to generate the target time-frequency image. \[STFT_{F}(t,w)=\int_{-\infty}^{\infty}[F(t)g^{*}(t-u)]\text{e}^{- \text{i}\omega t}dt \tag{6}\]  
In Formula (6), \(g^{*}(t-u)\) is the window function. The time-frequency image of the target echo signal is shown in Figure 3d. In the time-frequency image, the horizontal axis is time and the vertical axis is frequency.