# Ultrasonic Through-Metal Communication Based on Deep-Learning-Assisted Echo Cancellation
## 3 Results
### Image Transmission  
Based on the aforementioned adaptive filter and trained DPRNN model, we conducted the image transmission through a 50 mm thick aluminum metal plate. On the transmitting side, the FPGA chip acquires the data of an image with 100 x 100 pixels with one of its I/O interfaces and saves them in its ROM. This image has the RGB565 color format in which each pixel uses 16 bits for color value. As shown in Figure 13, each pixel cell is composed of start, sync, data, parity, end and guard interval bits, entirely occupying 32 bits. The following steps of signal transmission were the same as those of the aforementioned data transmission. The image recovery was also implemented with Matlab, being involved multiple steps: signal reading, AC-DC conversion, envelope extraction, sampling and decision-making. Finally, the recovered images were displayed on the PC screen. Figure 14 displays images recovered from signals treated with different approaches of echo cancellation. Figure 14b is the recovered image without any echo cancellation, in which severely distorted lines and colors imply the existence of strong intersymbol interference. Figure 14c is the image recovered after received signals undergo LMS adaptive filtering. The distortion degrees of patterns and colors in Figure 14c have been obviously mitigated in comparison with Figure 14b, revealing that LMS adaptive filtering can serve echo cancelation and weaken intersymbol interference to some extent. Figure 14d represents the image recovered after received signals were processed with DPRNN echo cancellation. In this case, no discernible distortion can be found, meaning that both intersymbol interference and noise have been almost eliminated, and DPRNN is significantly effective for echo cancellation. Figure 12: Effect of initial received signals’ SNR on SNR of signals treated with LMS, RLS, PNLMS and DPRNN, respectively. Figure 13: Data structure of Pixel cell. To quantitatively evaluate the image recovery, two metrics are adopted: peak signal-to-noise ratio (PSNR), structural similarity index measure (SSIM) and color difference value (\(\Delta E\)). PSNR denotes the ratio of the maximum possible power of a signal to the power of the noise that affects its representation accuracy, formulated as below:  
\[PSNR=10\lg\left(\frac{MAX_{I}^{2}}{MSE}\right) \tag{20}\]  
\[MSE=\frac{1}{mn}\sum_{j=0}^{n-1}\left[I(i,j)-K[i,j]\right]^{2} \tag{21}\]  
where \(MAX_{I}\) is the possible maximum pixel value in the image. If the pixels are represented by N-bit binary, \(MAX_{I}=2^{N}-1\). MSE denotes the mean square error, with \(I\) representing the clean image and \(K\) representing the noisy image. SSIM is a reliable scale for measuring the similarity between two images of x and y and contains three major features: luminance, contrast, and structure. A higher SSIM value indicates better image restoration quality in this study. SSIM is calculated as follows:  
\[SSIM(x,y)=l(x,y)^{\alpha}\cdot c(x,y)^{\beta}\cdot s(x,y)^{\gamma} \tag{22}\]  
\[l(x,y)=\frac{2\mu_{x}\mu_{y}+c_{1}}{\mu_{x}^{2}+\mu_{y}^{2}+c_{1}} \tag{23}\]  
Figure 14: Images recovered from signals treated with different approaches of echo cancellation. (**a**) image collected by FPGA chip in the transmitting side. (**b**) image recovered from signals without any echo cancellation. (**c**) image recovered from signals with LMS adaptive filtering. (**d**) image recovered from signals with DPRNNN-based echo cancellation. \[c(x,y)=\frac{2\sigma_{x}\sigma_{y}+c_{2}}{\sigma_{x}^{2}+\sigma_{y}^{2}+c_{2}} \tag{24}\]  
\[s(x,y)=\frac{\sigma_{xy}+c_{3}}{\sigma_{x}\sigma_{y}+c_{3}} \tag{25}\]  
In the SSIM formula, \(l(x,y)\), \(c(x,y)\), and \(s(x,y)\) denote the similarity of luminance, contrast, and structure between \(x\) and \(y\), respectively. \(\mu_{x}\) and \(\mu_{y}\) are, respectively, the mathematical means of \(x\) and \(y\); \(\sigma_{x}^{2}\) and \(\sigma_{y}^{2}\) are, respectively, the variances of \(x\) and \(y\), and \(\sigma_{xy}\) is the covariance between \(x\) and \(y\).