# WhistleGAN for Biomimetic Underwater Acoustic Covert Communication
## 2 Proposed Method
### Mel Filter Bank  
This section describes using the Mel filter bank to obtain log scale frequency data from WhistleGAN. Assume that the short-time Fourier transform (STFT) of a whistle signal \(x\) is \(\mathbf{X}_{s}\). The \(\mathbf{X}_{s}\) of the whistle are transformed using a Mel filter bank by reducing the number of frequency bins while preserving the whistle characteristics for human hearing. The Mel filter bank is defined according to the center frequency and consists of overlapping triangular filters. The number of frequency bins in \(\mathbf{X}_{s}\) is determined by the Mel filter bank. As the Mel filter bank number increases, the number of frequency bins in the Mel filter bank increases, resulting in an increase in the frequency domain resolution. To design the Mel filter bank, let the linear frequency and Mel frequency be \(l_{f}\) and \(\phi_{f}\), respectively. \(\phi_{f}\) and \(l_{f}\) have the relationship of \(\phi_{f}=2595\times\log_{10}\left(1+\frac{l_{f}}{700}\right)\). The whistle spectrogram is divided into several bands by the Mel filter bank, which consists of a series of overlapping triangular filters defined by the center frequency \(l_{f_{c}}(m)\) where \(m=1,2,\cdots N_{Mel}\). To obtain the center frequency (Hz) of such a Mel filter bank, the inverse relationship between \(l_{f}\) and \(\phi_{f}\) given by \(l_{f_{c}}(m)=700\left(10^{\phi_{f_{c}}(m)/2595}-1\right)\) is used and the Mel filter bank \(H(m,k)\) where \(k=0,1,\cdots N_{DFT}-1\) is obtained as,  
\[H(m,k)=\left\{ \begin{array}{cl}0,&\text{for }l_{f}(k)<l_{f_{c}}(m-1)\\ \frac{l_{f_{c}}(k)-l_{f_{c}}(m-1)}{l_{f_{c}}(m)-l_{f_{c}}(m-1)},&\text{for }l_{f_{c}}(m-1) \leq l_{f}(k)\leq l_{f_{c}}(m)\\ \frac{l_{f_{c}}(k)-l_{f_{c}}(m+1)}{l_{f_{c}}(m)-l_{f_{c}}(m+1)},&\text{for }l_{f_{c}}(m)<l_{f}(k)\leq l_{f_{c}}(m+1)\\ 0,&\text{for }l_{f}(k)\geq l_{f_{c}}(m+1).\end{array} \right. \tag{1}\]  
The Mel filter bank matrix \(\mathbf{H}\) consists of rows of the number of Mel filter banks and columns of the size of DFT. To obtain Mel whistles (\(\mathbf{X}_{mel}\)), \(\mathbf{X}_{s}\) is multiplied by the \(\mathbf{H}\) and taken logarithmically. \[\mathbf{X}_{mel}=\log\left\{\mathbf{H}\cdot|\mathbf{X}_{s}|\right\}, \tag{2}\]  
where \(\cdot\) denotes inner product. The whistles used for the input of the WhistleGAN are located in a specific time-frequency region. The proposed WhistleGAN trains using a bilateral filter that considers the distance between the target pixels of the whistle image and the surrounding pixels, as well as the difference in pixel values. This allows WhistleGAN to preserve the whistle's shape while removing noise. The whistle image with the bilateral filter (\(\mathbf{X}_{bi}\)) applied to \(\mathbf{X}_{mel}\) is calculated through adaptive convolutions of the pixel values' similarity denoted as \(f_{r}(\cdot)\) and the proximity of pixel positions represented by \(g_{s}(\cdot)\). Let \(W_{p}\) be the normalized term, \(\mu\) be the position of the current pixel, and \(\Omega\) be the window centered in \(\mu\). Then, \(\mu_{\
u}\in\Omega\) denotes the position of the neighboring pixel. When \(\mathbf{X}_{mel}(\mu_{\
u})\) and \(\mathbf{X}_{mel}(\mu)\) are assumed as the pixel's value at the corresponding position in the Mel whistle, (\(\mathbf{X}_{bi}\)) is attained by,  
\[f_{r}(\mu_{\
u},\mu)=exp\left(\frac{-\|\mu_{\
u}-\mu\|^{2}}{2\sigma_{d}^{2}} \right), \tag{3}\]  
Figure 2: The block diagram of the proposed WhistleGAN. \[g_{s}(\mu_{\
u},\mu)=exp\left(\frac{-\|\mu_{\
u}-\mu\|^{2}}{2\sigma_{r}^{2}}\right), \tag{4}\]  
\[W_{p}=\sum_{\mu_{\
u}\in\Omega}f_{r}(\|\mathbf{X}_{mel}(\mu_{\
u})-\mathbf{X}_{mel }(\mu)\|)g_{s}(\|\mu_{\
u}-\mu\|), \tag{5}\]  
\[\mathbf{X}_{bi}(\mu)=\frac{1}{W_{p}}\mathbf{\sum}_{\mu_{\
u}\in\Omega}\mathbf{ X}_{mel}(\mu_{\
u})f_{r}(\|\mathbf{X}_{mel}(\mu_{\
u})-\mathbf{X}_{mel}(\mu)\|)g_{s}( \|\mu_{\
u}-\mu\|), \tag{6}\]  
where \(\sigma_{d}\) and \(\sigma_{r}\) denote the smoothing parameters.