## 3 Feature Extraction  
The overall process of PQD classification is shown in Figure 1. After the PQD signals generation, the signals were separated into training and testing data and passed through the feature extraction which is the process of creating the features of PQD signals. In this work, the signal's characteristics were firstly extracted from the raw dataset of PQDs using the WT, as explained in Section 3.1. Then, the wavelet coefficients were obtained through the multi-resolution analysis (MRA), as detailed in Section 3.2. The procedure to create the feature vectors based on the their existing wavelet coefficients and statistical parameters is described in Section 3.3.  
\begin{table}
\begin{tabular}{c l l} \hline \hline
**Label** & **Disturbance Classes** & **Mathematic Equations** & **Constraints** \\ \hline C1 & Pure sine & \(y(t)=A\sin(\omega t)\) & \(A=1\) \\ C2 & Sag & \(y(t)=A[1-\alpha(u(t-t_{1})-u(t-t_{1}))]\sin(\omega t)\) & \(0.1\leq a\leq 0.9\); \(T\leq t_{2}-t_{1}\leq 9T\) \\ C3 & Swell & \(y(t)=A[1+\alpha(u(t-t_{1})-u(t-t_{1}))]\sin(\omega t)\) & \(0.1\leq a\leq 0.8\); \(T\leq t_{2}-t_{1}\leq 9T\) \\ C4 & Interruption & \(y(t)=A[1-\alpha(u(t-t_{1})-u(t-t_{1}))]\sin(\omega t)\) & \(0.9\leq a\leq 1\); \(T\leq t_{2}-t_{1}\leq 9T\) \\ C5 & Harmonic & \(y(t)=A[\alpha_{1}\sin(\omega t)+a_{3}\sin(\omega t)+a_{5}\sin(\omega t)+a_{7} \sin(\omega t)]\) & \(0.05\leq a_{3}\), \(a_{5}\), \(\pi\leq 0.15\); \(\sum_{i}^{2}=1\) \\ C6 & Impulsive transient & \(y(t)=A[1-\alpha\left\{u(t-t_{1})-u(t-t_{1})\right\}]\sin(\omega t)\) & \(T/20\leq t_{2}-t_{1}\leq T/10\) \\ C7 & Oscillatory transient & \(y(t)=A[\sin(\omega t)+\alpha^{-c(t-t_{1})+\tau}\sin\left(\omega t\right)_{n}(t-t _{1})(u(t_{2})-u(t_{1}))]\) & \(0.1\leq a\leq 0.8\); \(0.57\leq t_{2}-t_{1}\leq 3T\); \\ C8 & Flicker & \(y(t)=A[1+\sigma_{\pi}\sin(\beta\omega t)]\sin(\omega t)\) & \(0.1\leq a\leq 0.5\leq\delta\leq 200 Hz\) \\ C9 & Notch & \(y(t)=\sin(\omega t)-sign(\sin(\omega t))\) & \(0.1\leq t_{2}\leq 0.5T\); \\  & & \(\times\left\{\sum_{n=0}^{\delta}K\times[u(t-t_{1}-0.02n))-u(t-(t_{2}-0.02n))] \right\}\) & \(0.01T\leq t_{2}-t_{1}\leq 0.005T\); \\ C10 & Spikes & \(y(t)=\sin(\omega t)-sign(\sin(\omega t))\) & \(0\leq t_{1},t_{2}\leq 0.5T\); \\  & & \(\times\left\{\sum_{n=0}^{\vartheta}K\times[u(t-t_{1}-0.02n))-u(t-(t_{2}-0.02n))] \right\}\) & \(0.01T\leq t_{2}-t_{1}\leq 0.005T\); \\ C11 & Sag with harmonic & \(y(t)=A[1-\alpha(u(t-t_{1})-u(t-t_{1}))]\) & \(0.1\leq a\leq 0.9\); \(T\leq t_{2}-t_{1}\leq 9T\); \\  & & \([\alpha_{1}\sin(\omega t)+a_{3}\sin(3\omega t)+a_{5}\sin(5\omega t)+a_{7}\sin( 7\omega t)]\) & \(0.05\leq a_{3},a_{5},\pi\leq 0.15\); \(\sum_{i}^{2}=1\) \\ C12 & Swell with harmonic & \(y(t)=A[1+a(u(t-t_{1})-u(t-t_{1}))]\) & \(0.1\leq a\leq 0.8\); \(T\leq t_{2}-t_{1}\leq 9T\); \\  & & \([\alpha_{1}\sin(\omega t)+a_{3}\sin(3\omega t)+a_{5}\sin(5\omega t)+a_{7}\sin( 7\omega t)]\) & \(0.05\leq a_{3},a_{5},\pi\leq 0.15\); \(\sum_{i}^{2}=1\) \\ C13 & Interruption with harmonic & \(y(t)=A[1-\alpha(u(t-t_{1})-u(t-t_{1}))]\) & \(0.9\leq a\leq 1\); \(T\leq t_{2}-t_{1}\leq 9T\); \\  & & \([\alpha_{1}\sin(\omega t)+a_{3}\sin(3\omega t)+a_{5}\sin(5\omega t)+a_{7}\sin( 7\omega t)]\) & \(0.05\leq a_{3},a_{5},\pi\leq 0.15\); \(\sum_{i}^{2}=1\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Power quality disturbance’s mathematical equations, adapted from: [9].