# Deep Learning Algorithm for Automatic Classification of Power Quality Disturbances
## 4 Results and Discussion
### Quantitative Evaluation
\begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline
**True values** & Flicker & 1710 & 0 & 2 & 0 & 0 & 2 & 0 & 0 & 5 & 0 \\  & Harmonics & 0 & 1745 & 0 & 11 & 2 & 15 & 0 & 5 & 0 & 2 \\  & Impulsive transient & 0 & 0 & 1675 & 2 & 0 & 2 & 0 & 0 & 15 & 0 \\  & Interruption & 3 & 0 & 0 & 1674 & 3 & 6 & 2 & 3 & 0 & 10 \\  & Normal & 0 & 1 & 5 & 0 & 1678 & 0 & 0 & 12 & 0 & 0 \\  & Notch & 14 & 0 & 4 & 2 & 0 & 1417 & 5 & 0 & 4 & 5 \\  & Oscillatory transient & 7 & 2 & 3 & 0 & 4 & 12 & 1654 & 0 & 2 & 0 \\  & Sag & 0 & 0 & 1 & 1 & 3 & 0 & 0 & 1456 & 0 & 1 \\  & Spike & 6 & 2 & 0 & 0 & 0 & 3 & 16 & 0 & 1670 & 0 \\  & Swell & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 1731 \\  & & & & & & & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Confusion matrix of the training data using BiLSTM architecture, with noise. \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline
**True values** & Flicker & 1715 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 3 & 0 \\  & Harmonics & 0 & 1748 & 0 & 8 & 1 & 10 & 0 & 3 & 0 & 1 \\  & Impulsive transient & 0 & 0 & 1685 & 1 & 0 & 1 & 0 & 0 & 10 & 0 \\  & Interruption & 2 & 0 & 0 & 1680 & 2 & 4 & 1 & 2 & 0 & 7 \\  & Normal & 0 & 0 & 3 & 0 & 1685 & 0 & 0 & 8 & 0 & 0 \\  & Notch & 10 & 0 & 2 & 1 & 0 & 1430 & 3 & 0 & 2 & 3 \\  & Oscillatory transient & 5 & 1 & 2 & 0 & 2 & 8 & 1665 & 0 & 1 & 0 \\  & Sag & 0 & 0 & 0 & 0 & 2 & 0 & 0 & 1462 & 0 & 0 \\  & Spike & 4 & 1 & 0 & 0 & 0 & 2 & 12 & 0 & 1678 & 0 \\  & Swell & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1733 \\  & & & & & & & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Confusion matrix of the training data using GRU architecture, with noise. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**True values** & Flicker & 1722 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\  & Harmonics & 0 & 1748 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\  & Impulsive transient & 0 & 0 & 1738 & 0 & 0 & 0 & 12 & 0 & 0 & 0 \\  & Interruption & 0 & 0 & 0 & 1749 & 0 & 0 & 0 & 1 & 0 & 0 \\  & Normal & 0 & 0 & 0 & 0 & 1750 & 0 & 0 & 0 & 0 & 0 \\  & Notch & 0 & 0 & 0 & 1 & 0 & 1730 & 0 & 19 & 0 & 0 \\  & Oscillatory transient & 0 & 0 & 30 & 0 & 0 & 0 & 1720 & 0 & 0 & 0 \\  & Sag & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1750 & 0 & 0 \\  & Spike & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1750 & 0 \\  & Swell & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1750 \\  & & & & & & & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Confusion matrix of the training data using the ResNet50 architecture, with noise. \begin{table}
\begin{tabular}{l c c c c c} \hline  & **No Noise** & **20 dB** & **30 dB** & **40 dB** & **50 dB** \\ \hline Flicker & 83.801 & 97.514 & 98.245 & 95.594 & 99.191 \\ Harmonics & 86.419 & 98.982 & 97.242 & 99.301 & 98.604 \\ Impulsive transient & 87.922 & 99.851 & 93.547 & 96.357 & 97.447 \\ Interruption & 85.724 & 98.170 & 95.718 & 92.124 & 94.458 \\ Normal & 85.515 & 97.723 & 99.656 & 97.841 & 95.974 \\ Notch & 83.894 & 98.181 & 96.479 & 98.978 & 99.712 \\ Oscillatory transient & 84.911 & 98.149 & 91.247 & 90.374 & 96.514 \\ Sag & 86.256 & 96.375 & 97.392 & 95.981 & 97.325 \\ Spike & 88.742 & 97.244 & 98.283 & 99.27 & 97.647 \\ Swell & 85.901 & 97.470 & 98.541 & 96.781 & 98.362 \\ \hline \end{tabular}
\end{table} 
Table 13: Detailed accuracy of the ResNet50 method. \begin{table}
\begin{tabular}{l c c c c} \hline  & **No Noise** & **20 dB** & **30 dB** & **40 dB** & **50 dB** \\ \hline Flicker & 81.425 & 84.123 & 84.89 & 87.890 & 86.345 \\ Harmonics & 83.124 & 86.456 & 86.001 & 85.678 & 83.890 \\ Impulsive transient & 80.750 & 85.678 & 83.789 & 84.234 & 87.456 \\ Interruption & 84.250 & 83.901 & 87.654 & 86.012 & 85.234 \\ Normal & 81.741 & 87.234 & 85.012 & 82.345 & 84.89 \\ Notch & 82.499 & 84.567 & 84.321 & 88.789 & 86.789 \\ Oscillatory transient & 79.374 & 86.789 & 86.543 & 83.456 & 82.567 \\ Sag & 84.578 & 85.345 & 82.789 & 87.123 & 88.012 \\ Spike & 80.759 & 82.456 & 88.456 & 85.89 & 83.678 \\ Swell & 81.574 & 88.123 & 83.210 & 84.678 & 87.210 \\ \hline \end{tabular}
\end{table} 
Table 15: Detailed accuracy of the BiLSTM method.