## 2 PQD Feature Detection System Model Using WPTM-Based Metrics
### PQD Feature Detection Using WPTM-Based Metrics
#### 2.3.3. PQD Feature Detection Using MV Metric  
We define an MV-based WPTM metric \(\mathbf{M}=\mathbf{M}_{mv}\) and use it for PQD feature detection. This metric is based on MV-based indirect correlation rather than direct correlation in existing schemes [1]. While the existing metric using wavelet correlation exhibits a limited degrees of freedom (DoF = 2 or 3), the proposed MV metric using indirect WP correlation exhibits an exponentially increased degrees of freedom (i.e., \(DoF=P=2^{l}-1\)). Hence, the MV metric is relatively simple yet robust to severe random PQD characteristics, including phase offset and impulsive noise.  
For reliable PQD localization, we choose double-edge-based detection instead of the conventional single-edge-based detection [1; 25], where we use two (front and back) edge checkers, denoted as \(C_{fdet}\) and \(C_{blet}\), such that a PQD event will be detected only if both edge checkers are enabled.  
In the detection procedure presented in Figure 1, Step 5 can call the WPTM-based PQD detection function using the MV metric (Algorithm 1). In Algorithm 1, the refined (denoised) wavelet packets \(W^{p}\) (where \(p=1,\ldots,P\)) that undergo the impulsive denoising process and wavelet-based Gaussian denoising process (see Steps 2 to 4 in Figure 1) are input. We assume that DB3 is used for WPD. In the MV-based detection procedure presented in Algorithm 1, we first enable (\"1\") or disable (\"0\") the checking flag \(F\), whether the sample value of each packet within all observation windows \(T_{AP_{Q}}\) is larger than a modified threshold \(TH_{M}\). Then, in the MV-based detection step, the PQD edge detection checkers \(C_{fdet}\) and \(C_{blet}\) are enabled if the accumulated (summed) flag value \"\(accF\)\" within their corresponding windows \(T_{fp_{Q}}\) (or \(T_{fp_{Q}}\)) is greater than or equal to \(\lceil P/2\rceil\). That is, in the presented double-edge-based detection procedure, the detection checker \(C_{det}\) becomes \"TRUE\" only if both \(C_{fdet}\) and \(C_{blet}\) are enabled. For instance, when assuming \(l=3\), if the values of \(accF\) at the two edge points are greater than or equal to 4 (=\(\lceil P/2\rceil\)), the PQD event checker is enabled (i.e., \(C_{det}\) = \"TRUE\"). In addition, if \(accF\) is greater than or equal to \(\lceil P/2\rceil\) at the outside (or remaining) window \(T_{o_{PQ}}\), the false edge detection checker \(C_{false}\) is enabled (i.e., \(C_{false}\) = \"TRUE\").  
Below, a list of notations used in this paper and a pseudocode representation of the proposed MV-based detection function (Algorithm 1) are presented, where the modified threshold \(TH_{M}\) is used to detect both edges; \(l=3\) (or \(P=7\)) is assumed in this algorithm.  
As an example, in Figure 5, the proposed MV-based detection algorithm is applied to detect a voltage swell signal with \(110\%\)\(pu\) at SNR = 35 dB. Assuming \(l=3\), Figure 5a shows the denoised PQD signal input and Figure 5b-h, respectively, shows each of the seven WPCs of that input signal. In this MV-based WPTM metric, the sample values of all WPCs are compared with a threshold value \(th=TH_{M}\) to update the accumulator \(accF\) (add one or not (hold)). After accumulating the \(2^{l}-1\) WPCs, the PQD event is detected if \(accF\) is greater than or equal to \(\lceil P/2\rceil\).