## 2 PQD Feature Detection System Model Using WPTM-Based Metrics
### PQD Feature Detection Using WPTM-Based Metrics  
#### 2.3.1 WPT  
WPT generates WPCs through WPD, whereas WT generates WCs through WD. Throughout the paper, a dyadic WD or WPD is assumed to be used (Figure 3), where the input signal vector, denoted as \(\mathbf{W}_{0}^{0}=\mathbf{V}_{0}=\{x[i]|i=0,1,\ldots,l-1\}\), is the root node of the binary tree at the level index \(l=0\). Using a level-\(l\) (\(\geq\)1) WD, the approximation vector \(\mathbf{W}_{l-1}^{0}\) at the previous level (i.e., level \(l-1\)) is recursively projected into two level-\(l\) orthonormal wavelet basis functions, that is, a scale function \(\phi_{l}^{0}\) (\(=\)\(\psi_{l}^{0}\)) and a wavelet function \(\psi_{l}^{1}\), which generate the correspondingly decomposed two wavelet vectors (also termed as WCs): approximation (low frequency) \(\mathbf{W}_{l}^{0}\) and detail (high frequency) \(\mathbf{W}_{l}^{1}\). In contrast, using the level-\(l\) WPD, both approximation (low frequency) \(\mathbf{W}_{l-1}^{0}\) and details (high frequency) \(\mathbf{W}_{l-1}^{p}\) (where \(p=1,\ldots,2^{l-1}-1\)) at the previous level (i.e., level \(l-1\)) are recursively projected into the level-\(l\) orthonormal WP basis functions \(\psi_{l}^{p}\) (where \(p=0,1,\ldots,2^{l}-1\)) [23], thus producing the correspondingly decomposed \(2^{l}\) wavelet packet vectors \(\mathbf{W}_{l}^{p}\) (which are also called WPCs). Hence, as observed in the binary tree of Figure 3, while WD decomposes the original input signal vector \(\mathbf{W}_{0}^{0}\) into \(l+1\) WCs (e.g., for \(l=3\), \(\mathbf{W}_{0}^{0}=[\mathbf{W}_{3}^{0}]\mathbf{W}_{3}^{1}\big{|}\mathbf{W}_{2}^{1}\big{|}\mathbf{ W}_{1}^{1}\big{|}\)), WPD decomposes \(\mathbf{W}_{0}^{0}\) into \(2^{l}\) WPCs (e.g., for \(l=3\), \(\mathbf{W}_{0}^{0}=[\mathbf{W}_{3}^{0}]\big{|}\mathbf{W}_{3}^{1}\big{|}\cdots\big{|}\mathbf{ W}_{3}^{0}\big{|}\)).  
In WPT, we select the \"cost function\" in each WP sub-band as an optimal representation basis of the input signal. The cost function can determine the cost value of each node and its children nodes in the obtained full binary tree (Figure 3). There are several possible choices for the cost function, such as 1-norm, Shannon entropy (\(SE\)), and log energy. Of these, we choose the Shannon entropy of the coefficients of sub-band \(S\), which is calculated as follows [2]:  
\[SE(S)=-\sum_{i}S_{i}^{2}\log\Big{(}S_{i}^{2}\Big{)}.\]  
[PERSON] et al. showed that the spatial correlation between WCs can emphasize the starting and ending points of PQDs and suggested a wavelet-correlation-based detection method that improves the PQD detection performance over that of generic wavelet-based denoising methods [1]. However, this scheme has limited degrees of freedom (\(DoF\) = 2 or 3) and covers a limited frequency range as \(l\) increases, as WD decomposes only the approximation (low frequency) vector \(\mathbf{W}_{l}^{0}\).  
Figure 2: (**a**) Pure sag signal with 80% \(pu\), (**b**) sag signal with 80% \(pu\) over the Gaussian plus impulsive noise channel (where \(\mu=400\), \(\psi=0.02\%\), and SNR = 35 dB), (**c**) extracted noise plus distortion component signal \(y[i]\), (**d**) wavelet-based Gaussian-denoised distortion component signal \(\hat{y}[i]\), and (**e**) SM-filter-based impulsive-denoised distortion component signal \(\hat{y}[i]\).  
In contrast, this paper defines WPTM using WPCs, introduces the WPTM-based metrics that exhibit large degrees of freedom (\(DoF=2^{l}-1\)), and present a PQD feature detection system that uses these WPTM-based metrics.