# Ultrasonic Through-Metal Communication Based on Deep-Learning-Assisted Echo Cancellation
## 3 Results
### Data Transmission
#### 3.1.3 Comparison of Echo Cancellation Performance  
During the training of the DPRNN model, the dataset of 20,000 pairs of data was divided into a training set, validation set, and test sets with a ratio of 6:2:2, ensuring sizable validation and test sets for evaluating the model performance. Considering the computational efficiency and memory capacity limitation, the block size K for segmentation was set as 250. Within each block, a bidirectional long-short-term memory (LSTM) layer [35] was employed with 128 hidden units in each direction to effectively capture complex temporal dependencies in both directions. The configuration of the inter-block RNN was the same as the intra-block RNN. The DPRNN model consisted of two interleaved intra-block RNNs and two inter-block RNNs. The Adam optimizer [36] was adopted with an initial learning rate of 0.001, a learning rate decay of 0.95 for every two epochs, and an initial training of 50 epochs for all training sets. The decay of the learning rate is used as a rule for fine-tuning the model over the entire duration. This prevents it from getting stuck in suboptimal solutions. To maximize the SISNR value during the training, SISNR was used as the loss function in the DPRNN model. Figure 10 plots the training loss and valid loss of the trained network with different epochs. It can be observed that the validation set's loss function began to stabilize around the 40 th epoch. To prevent overfitting, the model trained with 40 epochs was selected for echo cancellation in the ultrasonic through-metal communication. Table 2 lists the signal quality of DPRNN-based echo cancellation, and compares it with the LMS, PNLMS and RLS algorithms. All four evaluation indexes of the signals treated with the DPRNN algorithm are very impressive. In practice, NCC of 0.9829, BER of \(3.502\times 10^{-4}\) and ERLE of 32.53 should sufficiently meet most application requirements. Compared with the adaptive algorithms listed, the DPRNN algorithm displayed a more distinct improvement in efficiency, and its BER was two orders of magnitude higher than that of LMS. Figure 11 presents the partial waveforms of signals before and after LMS, RLS, PNLMS and DPRNN echo cancellation, i.e., six series of signals: \(S_{T}(t)\) and \(S_{R}(t)\) are, respectively, collected on the transmitting and receiving transducer; \(S_{LMS}(t)\), \(S_{RLS}(t)\) and \(S_{PNLMS}(t)\) are independently collected after LMS, RLS and PNLMS adaptive filtering; and \(S_{DPRNN}(t)\) collected after DPRNN treatment. A 50 mm thick aluminum plate and an 18 mm offset distance of axial alignment are chosen as the channel conditions. It can be found that after being processed with the DPRNN model, echoes as well as other noises have been fairly eliminated from the source signals, firmly proving the effectiveness of the DPRNN-based approach. Moreover, the distortion level of signals dealt with the DPRNN approach is far lower than that of signals treated with adaptive filtering. Figure 10: Loss function curves of DPRNN for echo cancellation. As shown in Figure 12, SNR of initial received signal apparently affects echo cancellation of LMS, RLS, PNLMS and DPRNN. Low SNR of initial received signal suppresses the efficiency of the adaptive filter and DPRNN model, but compared with adaptive algorithms listed, DPRNN exhibits higher bearing capability against this impact in a fashion of relatively slow declining rate. After these signals with different initial SNRs were conducted with DPRNN echo cancellation, their SNR improvements were still higher than 20 dB, implying that they were greatly applicable.