# Mdpi
## 3 Proposed IN Mitigation Scheme
### Adaptive DWT  
After pre-IN mitigation, \(\tilde{r}[n]\) is input to the adaptive DWT block. The adaptive DWT block (see Figure 3) comprises an \(M\)-subchannel analysis filter bank, a per-subchannel equalizer (PSE\({}_{k}\)),and a down-sampling operation with a factor \(M\). Note that \(G_{k}(z)\) denotes the Z-transform of the \(k\)-th analysis filter \(g_{k}[n]\), which can be expressed as follows:  
\[g_{k}[n]=\sqrt{\frac{2}{M}}\cdot p[n]\cdot\cos\left[\left(k+\frac{1}{2}\right) \frac{\pi}{M}\left(N-1-n+\frac{M+1}{2}\right)\right]\cdot\cos(\theta_{k}), \tag{10}\]  
where \(k=0,\ldots,M-1\) is the index of the subchannel, \(p[n]\) is the prototype filter, and \(\theta_{k}\) equals 0 or \(\pi\). The \(\text{PSE}_{k}\) is a finite impulse response (FIR) adaptive filter, used to equalize the powerline channel within the \(k\)-th subband. Specifically, \(\text{PSE}_{k}\) equalizes the equivalent channel \(f_{k}[n]\otimes h[n]\otimes g_{k}[n]\). In this paper, we employ the variable step-size normalized least mean square (VSS-NLMS) algorithm [24] to train the equalizer to alleviate the impact of IN samples on the training process. The weight updating recursion for \(\text{PSE}_{k}\) can be expressed as follows:  
\[\mathbf{w}_{k}[n]=\mathbf{w}_{k}[n-1]+\mu_{k}[n]\frac{\mathbf{x}_{k}[n]e_{k}[ n]}{\mathbf{x}_{k}^{T}[n]\mathbf{x}_{k}[n]+\delta_{k}}, \tag{11}\]  
where \(\mathbf{w}_{k}[n]=\left[w_{(k,0)}[n],w_{(k,1)}[n],\ldots,w_{(k,N_{E}-1)}[n] \right]^{T}\) denotes the weight vector with length \(N_{E}\) at time index \(n\); \(\mathbf{x}_{k}[n]=\left[x_{k}[n],x_{k}[n-1],\ldots,x_{k}[n-N_{E}+1]\right]^{T}\) denotes the regressor vector; the superscript \(T\) denotes the transpose operator; and \(e_{k}[n]\) is the error signal associated with the \(k\)-th PSE, which can be expressed as follows:  
\[\begin{array}{rl}e_{k}[n]&=d_{k}[n]-y_{k}[n]\\ &=d_{k}[n]-\mathbf{w}_{k}^{T}[n-1]\mathbf{x}_{k}[n].\end{array} \tag{12}\]  
The desired signal \(d_{k}[n]\) is the input of \(f_{k}[n]\) at the IDWT block; \(\delta_{k}\) is a small positive constant to prevent numerical errors during the weight updating process, and \(\mu_{k}[n]\) is the variable step-size, which can be calculated as follows:  
\[\mu_{k}[n]=\left|1-\frac{\sqrt{\left|\hat{\sigma}_{d,k}^{2}[n]-\hat{\sigma}_{ y,k}^{2}[n]\right|}}{\hat{\sigma}_{e,k}[n]+\bar{\zeta}_{k}}\right|, \tag{13}\]  
where \(\zeta_{k}\) is a small positive number; \(\hat{\sigma}_{d,k}^{2}[n]\) is the estimated variance of the desired signal, which can be calculated using the following recursion:  
\[\hat{\sigma}_{d,k}^{2}[n]=\lambda_{k}\hat{\sigma}_{d,k}^{2}[n-1]+(1-\lambda_{ k})d_{k}^{2}[n], \tag{14}\]  
\(\hat{\sigma}_{y,k}^{2}[n]\) is the estimated variance of the output signal of the \(\text{PSE}_{k}\), which can be calculated as follows:  
\[\hat{\sigma}_{y,k}^{2}[n]=\lambda_{k}\hat{\sigma}_{y,k}^{2}[n-1]+(1-\lambda_{ k})y_{k}^{2}[n], \tag{15}\]  
and \(\hat{\sigma}_{e,k}^{2}[n]\) is the estimated variance of the error signal of the \(\text{PSE}_{k}\), which can be calculated as follows:  
\[\hat{\sigma}_{e,k}^{2}[n]=\lambda_{k}\hat{\sigma}_{e,k}^{2}[n-1]+(1-\lambda_{ k})e_{k}^{2}[n], \tag{16}\]  
where \(\lambda_{k}\in(0,1)\) is the smoothing factor. After down-sampling by a factor of \(M\), we obtain the output of the adaptive IDWT with respect to the \(k\)-th subchannel (\(\hat{S}_{k}[n]\)). This output is then de-mapped to \(\hat{X}_{k}[n]\).