# Underwater Acoustic Signal LOFAR Spectrogram Denoising Based on Enhanced Simulation
## 2 Materials and Methods
### Training Data Simulation Method  
The performance of deep neural network model is related to the quantity and quality of training samples. The completeness of the sample space directly affects the model's generalization ability in practical applications, and high-quality simulated data should closely resemble actual measured data. However, due to the inherent complexity of the marine environment and the high costs of data labeling, it is difficult to obtain high signal-to-noise ratio (SNR) and low-noise sample pairs which are treated as model inputs and outputs to train robust deep neural networks for LOFAR spectrogram denoising. Therefore, during the data simulation phase, large-scale labeled training samples are created by combining target-free ocean environment noise with simulated line spectrum to train the denoising model. If the signal is periodic or contains periodic components, it will manifest as a line spectrum in the time-frequency spectrogram. Therefore, a line spectrum can be represented by a single frequency signal \(u(t)\):  
\[u(t)=A\times sin(2\pi ft+\phi) \tag{1}\]  
where \(A\) represents the signal amplitude, \(f\) denotes the signal frequency, \(\phi\) represents the initial phase of the signal, and \(t\in[0,T]\) represents time. In practical scenarios, the target does not always remain stationary. When the target is in relative motion with respect to the sonar, phase and frequency will change due to the difference in propagation distance, which is known as the Doppler frequency shift phenomenon, it can be defined as:  
\[f^{\prime}=\frac{(v\pm v_{0})}{(v\mp v_{s})}f \tag{2}\]  
where \(f^{\prime}\) is the frequency received by the sonar, \(f\) is the frequency of the noise radiated by the target in the water, \(v\) is the speed of sound waves in water; \(v_{0}\) is the speed of the sonar relative to the water, and \(v_{s}\) is the speed of the target relative to the sonar. Based on the Equation (2), \(\Delta f\) can be used to express the changes in frequency, thus Equation (2) can be simplified as:  
Figure 1: Framework of the LOFAR spectrogram denoising method for underwater acoustic signal based on enhanced simulation. \[f^{\prime}=f+\Delta f \tag{3}\]  
The LOFAR spectrogram is a time-frequency plot, while the frequency shift of the target line spectrum exhibits an irregular phenomenon in the time dimension. However, regardless of the trend of frequency shift variations, the frequency of the line spectrum does not undergo significant changes and is severely offset from the center frequency. Therefore, this phenomenon can be described using a random walk, and the frequency drift variable \(\Delta f\) satisfies:  
\[E(\Delta f)=\sum_{t=1}^{T}E(\Delta f_{t})=0 \tag{4}\]  
where \(\Delta f_{t}\) represents the frequency drift of a single spectrogram line at time \(t\) and \(E(\cdot)\) stands for expectation. Similarly, affected by environmental noise and other factors, it is assumed that the amplitude of the single spectrogram line also follows a random walk process, defined as:  
\[E(\Delta A)=\sum_{t=1}^{T}E(\Delta A_{t})=0 \tag{5}\]  
where \(\Delta A_{t}\) represents the amplitude drift of a single spectrogram line at time \(t\). The initial phase \(\phi\) of the signal can be represented by a random number. Therefore, considering the frequency drift, the time-domain acoustic signal simulation algorithm for underwater targets is shown in Algorithm 1. ```
Input: Signal duratio \(T\), Sampling rate \(f_{s}\), Lower frequency limit \(f_{l}\), Upper frequency limit \(f_{h}\), Lower amplitude limit \(A_{l}\), Upper amplitude limit \(A_{h}\), Number of spectrogram lines \(N\), Amplitude of frequency drift \(f_{d}\), Amplitude of amplitude drift \(A_{d}\). Output: Time-Domain underwater acoustic target data:\(S\). Initialize:\(t=\left[0,\frac{1}{f_{s}},\frac{2}{f_{s}},\ldots,T\right]\)//Initialize for a duration of T seconds.