## 3 Principle of the Watermarking Algorithm in Transform Domain
### Impact of the Embedding Depth on Algorithm Performance  
The principle of watermark embedding in Section 3.1 shows that a watermark is embedded by modifying the amplitudes of \(C_{1}(r,j)\) and \(C_{2}(r,j)\); the larger the variation of the amplitude is, the worse the quality of the carrier audio is. Otherwise, the watermark cannot be accurately extracted if the variation is too small. Therefore, the variation of the amplitude should be maintained within a certain range, which not only guarantees the imperceptibility of the algorithm, but also maintains good robustness. It can be seen from Formulas (8)-(11) that the modified \(C^{\prime}_{1}(r,j)\) and \(C^{\prime}_{2}(r,j)\) are related to the embedding depth, so the following experiment tests the impact of embedding depth on the performance of the algorithm. The tested carrier audio signal is a song downloaded from the Internet, lasting for 60 s approximately, sampled at 44,100 Hz and 16-bit quantization. The watermark bits were a series of random binary string, only including 1 and 0, and long enough to cover the entire carrier signal. In order to objectively evaluate the performance of this watermarking algorithm, the quality of the watermarked audio can be determined using signal-to-noise ratio (SNR) as the performance index formulated as  
\[\text{SNR}(A,A^{\prime})\ =\ 10\text{lg}\left\{\frac{\sum\limits_{k\ =\ 1}^{K}A^{2}}{\sum\limits_{k\ =\ 1}^{K}\left(A^{\prime}-A\right)^{2}}\right\}, \tag{17}\]  
where \(A\) and \(A^{\prime}\) denote the carrier audio signal and the watermarked audio signal respectively. The larger the SNR is, the smaller the decrease of the audio quality will be, and the better the imperceptibility of algorithm will be. Usually, when SNR is over 20 dB, the audio quality is good.  
The robustness of the proposed algorithm to resist various attacks is evaluated using the bit error rate (BER), which is defined as  
\[\text{BER}(w,w^{\prime})\ =\ \frac{\sum\limits_{q\ =\ 1}^{L}w(q)\oplus w(q)^{ \prime}}{L}\times 100\%, \tag{18}\]  
where \(w(q)\) and \(w(q)^{\prime}\) denote the original watermark and the extracted watermark respectively, \(\oplus\) stands for the exclusive-OR operator, and \(L\) is the length of the watermark. Generally, the smaller value of BER implies that the algorithm has good robustness against attacks.  
Normalized correlation (NC) coefficient can be used to compare the similarity between the original watermark and the extracted watermark represented as Formula (19). If NC is close to 1, \(w(q)\) is very similar to \(w(q)^{\prime}\). On the other hand, \(w(q)\) and \(w(q)^{\prime}\) will be very different when NC is close to zero:  
\[NC(w,w) = \frac{\sum\limits_{q\ =\ 1}^{L}w(q)\times w(q)}{\sqrt{\sum\limits_{q \ =\ 1}^{L}w(q)^{2}\sum\limits_{q\ =\ 1}^{L}w(q)^{2}}}. \tag{19}\]  
When \(\lambda\) changes from 0 to 1, the experimental results of SNR and BER are shown in Figure 1. Figure 1a shows that the larger the \(\lambda\) is, the smaller the SNR of the watermarked audio signal is, and the worse the imperceptibility of the algorithm is. Figure 1b shows that the larger the \(\lambda\) is, the smaller the BER of the extracted watermark is, and the better the robustness of the algorithm is. Thus, imperceptibility and robustness are contradictory, a larger \(\lambda\) can be selected to improve the robustness of the algorithm under the premise of ensuring that the SNR is greater than 20 dB.