## 2 Model of Ship-Radiated Noise and Sample Generation
### Design of Samples and Datasets  
#### 2.2.1 Sample Design  
Taking typical sonar as an example, the sampling rate of the ship-radiated noise was set to 44.1 kHz. After band-pass filtering, square law detection, and low-pass filtering, the received signal was down-sampled 50 times, reducing the sampling rate to 882 Hz. The DEMON spectra were obtained by Fourier transform, and the amplitude was normalized between 0 and 1. Finally, samples of 2048 data points were obtained.  
Dataset A was comprised of 21,000 standard targets of 7 types and was used for neural network training. To evaluate the effects of Doppler shifts, SNRs, and interference on network performance, samples with different parameters were designed based on the standard samples.  
1. Generation of the dataset with different Doppler shifts (dataset B)  
When a target is moving, the ship-radiated noise received by sonar has a Doppler shift. Ship-radiated noise with a Doppler shift can be written as  
\[S_{1}(t)=S(\lambda t) \tag{8}\]  
where \(\lambda\) is the scaling factor and \(\lambda=c/(c+v)\), \(c\) is the speed of sound in water, and \(\
u\) is the relative velocity between the sonar and target. The value of \(v/c\) was adjusted between \(-0.02\) and \(0.02\) in 0.001 steps so that 41 types of ship-radiated noise with Doppler shifts were generated. These samples constituted dataset B, where there were 7 types of targets, with 500 samples for each target.  
2. Generation of the dataset with different SNRs (dataset C)  
The SNR of ship-radiated noise signals varies with changes in the target distance and underwater environmental noise. Ship-radiated noise with various SNRs is written as  
\[S_{2}(t)=S(t)+\mu N(t) \tag{9}\]  
where \(N(t)\) is Gaussian white noise. The value of \(\mu\) was adjusted between 1.0 and 4.0 in 0.2 steps, and then 16 types of ship-radiated noise with different SNRs were generated. These samples constituted dataset C, which had 7 types of targets, with 500 samples for each target.
3. Generation of the dataset with different interference (dataset D)  
When there is environmental or human interference, some redundant line spectra may appear, or some primary line spectra may weaken and even disappear. This increases the difficulty of feature extraction. The number of line spectra \(M\) was adjusted between \(M-3\) and \(M+3\) in steps of 1 so that 7 types of ship-radiated noise with different numbers of line spectra were generated. These samples constituted dataset D, and the target category number and sample number were the same as datasets B and C.  
Datasets E, F, and G were generated to test the performance of a neural network in recognizing new samples. The samples for datasets E, F, and G were derived from 10 types of new targets with different Doppler shifts, SNRs, and interference.  
Typical DEMON spectrums of samples with different Doppler shifts, SNRs, and interferences are show in Figure 2. In Figure 2, the vertical axis represents the normalized value, and the horizontal axis represents the frequency bin. The specific role of normalization is to generalize the statistical distributivity of a uniform sample. Because the sampling rate was 882 Hz, and the number of the frequency bin was 2048, each frequency bin was 0.43 Hz.  
Figure 2: The DEMON spectrum of different parameters. (**a**) DEMON spectrums of a reference sample; (**b**) DEMON spectrums of a sample with Doppler shifts; (**c**) DEMON spectrums of a sample with low SNR; (**d**) DEMON spectrums of a sample with interferences.  
Dataset A was used for network training, and datasets B, C, and D were used to evaluate the network performance for Doppler shifts, SNRs, and interference. Datasets E, F, and G with 10 types of new targets were used for network performance testing. The detailed information on datasets is shown in Table 1.