# A Shallow Seafloor Reverberation Simulation Method Based on Generative Adversarial Networks
## 3 Simulation
### The Simulation Based the GAN  
In this section, the GAN is used for the reverberation simulation, and the actual reverberation data from the sea trials in shallow water in China are used as the actual reference reverberation signals for training. The emission signals of the sea trial reverberation data are CW signals with a center frequency of 35 kHz, a sampling frequency of 500 kHz and a pulse width of 2 ms. Its time domain waveform is shown in Figure 10.  
The generator uses a seven-layer neural network, including an input layer, five hidden layers and an output layer. The input of the whole generative network is a random vector with a length of 100, and the output is the reverberation data with a length of 7536 after the processing of the five-layer network. The number of nodes in the first hidden layer is 256, and the activation function is the Leaky ReLU function. The input layer is fully connected to the first hidden layer. The number of nodes in the remaining hidden layers are 512, 1024, 2048 and 4096, and the activation functions are all Leaky ReLU functions. All connections between hidden layers are fully connected. The number of nodes in the output layer network is 7536, and the activation function is the sigmoid function. The connection between the last hidden layer and the output layer is fully connected. The detailed structure is shown in Figure 11.  
Figure 11: Generator network framework. Figure 10: Actual sea trial reverberation data. The input of the discriminator network is the reverberation data generated by the generator network with a length of 7536, and the output is 1 or 0 after processing in the hidden layers. An output of 1 means that the discriminator network judges the data to be true, and 0 means that the discriminator network judges the data to be false. The discriminator uses an eleven-layer neural network, including an input layer, nine hidden layers and an output layer. The number of nodes in the input layer is 7536, and the number of nodes in the first hidden layer is 4096. The activation function is the Leaky ReLU function, and the input layer is fully connected to the hidden first layer. The number of nodes in the remaining hidden layers are 2048, 1024, 512, 256, 128, 64, 32 and 16 nodes, and the functions are all Leaky ReLU functions. All connections between hidden layers are fully connected. The output length of the output layer is 1, and the activation function is the sigmoid function. The connection between the hidden last layer and the output layer is fully connected. The detailed structure is shown in Figure 12.  
More than 1800 sets of actual sea trial data were used for this training. An Adam optimizer was used for optimization. The learning rate was \(2\times 10^{-4}\). The training loss values are shown in Figure 13.  
Figure 12: Discriminator network framework. Figure 13: Training loss values of the GAN. It can be seen from Figure 13 that the loss values of both networks converge, which means better training. The output reverberation signal using the trained GAN network is shown in Figure 14.  
Next, the GAN-generated reverberation was analyzed for the reverberation characteristics to determine if it satisfies the reverberation characteristics. From Figure 14, it can be seen that the reverberation data are in the interval after 2 ms, and in the time domain, the envelope of the reverberation signal decays with time according to a certain law, which is a nonstationary random process that shows the nature of reverberation. Fourier transform was performed on the GAN-generated reverberation signal. The frequency spectrum of the GAN-generated reverberation signal was compared with that of the actual sea trial data. The comparison results are shown in Figure 15. Figure 15 shows the frequency spectrum of the actual reverberation signal, and Figure 15b shows the frequency spectrum of the GAN-generated reverberation signal.