Research article

Detection and classification of power quality disturbances: Vision transformers vs. CNN

  • Published: 11 September 2025
  • The increasing integration of renewable energy sources and widespread use of nonlinear power-electronic devices have amplified the occurrence of power quality disturbances (PQDs), which can disrupt sensitive equipment and jeopardize the safe and efficient operation of smart grids. Existing approaches for PQD classification, including traditional signal processing methods and deep learning models, often face limitations in accurately handling the nonlinear and non-stationary nature of PQDs. This study proposes a novel two-step approach that combines the smoothed pseudo Wigner-Ville distribution (SPWVD) with a vision transformer (ViT) model for effective PQD detection and classification. In the proposed method, synthetic PQD signals were generated using MATLAB in accordance with IEEE 1159 standards, and 1-D signals were transformed into 2-D time-frequency images using SPWVD to enhance feature representation. These images were then classified using a ViT model, leveraging the self-attention mechanism to capture global relationships in the data. Experimental results demonstrated that the proposed ViT-SPWVD approach achieved a high classification accuracy of 98.94%, indicating its capability and promise for accurate PQD detection. This work represents the first application of a vision transformer for PQD analysis, offering a new direction for transformer-based models in power system monitoring.

    Citation: Muhammad Hassan Anwar, Mirza Muhammad Ali Baig, Abdurrahman Javid Shaikh, Abdul Ghani Abro. Detection and classification of power quality disturbances: Vision transformers vs. CNN[J]. AIMS Energy, 2025, 13(5): 1052-1075. doi: 10.3934/energy.2025039

    Related Papers:

  • The increasing integration of renewable energy sources and widespread use of nonlinear power-electronic devices have amplified the occurrence of power quality disturbances (PQDs), which can disrupt sensitive equipment and jeopardize the safe and efficient operation of smart grids. Existing approaches for PQD classification, including traditional signal processing methods and deep learning models, often face limitations in accurately handling the nonlinear and non-stationary nature of PQDs. This study proposes a novel two-step approach that combines the smoothed pseudo Wigner-Ville distribution (SPWVD) with a vision transformer (ViT) model for effective PQD detection and classification. In the proposed method, synthetic PQD signals were generated using MATLAB in accordance with IEEE 1159 standards, and 1-D signals were transformed into 2-D time-frequency images using SPWVD to enhance feature representation. These images were then classified using a ViT model, leveraging the self-attention mechanism to capture global relationships in the data. Experimental results demonstrated that the proposed ViT-SPWVD approach achieved a high classification accuracy of 98.94%, indicating its capability and promise for accurate PQD detection. This work represents the first application of a vision transformer for PQD analysis, offering a new direction for transformer-based models in power system monitoring.



    加载中


    [1] Khalid MR, Alam MS, Sarwar A, et al. (2019) A comprehensive review on electric vehicles charging infrastructures and their impacts on power-quality of the utility grid. eTransp 1: 100006. https://doi.org/10.1016/j.etran.2019.100006 doi: 10.1016/j.etran.2019.100006
    [2] IEEE (2019) IEEE recommended practice for monitoring electric power quality. IEEE Std 1159-2019 (Revision of IEEE Std 1159-2009), 1–98. https://doi.org/10.1109/IEEESTD.2019.8796486
    [3] IEC (2015) Electromagnetic compatibility (EMC)-Part 4-30: Testing and measurement techniques-power quality measurement methods. IEC 61000-4-30: 2003. Available from: https://webstore.iec.ch/en/publication/21844.
    [4] CENELEC (2022) Voltage characteristics of electricity supplied by public electricity networks. EN 50160: 2022. Available from: https://standards.cencenelec.eu/dyn/www/f?p = CENELEC: 110: : : : : FSP_PROJECT, FSP_ORG_ID: 71003, 1258595 & cs = 177F89A233554A3CA651BC5AAA21C3EB3.
    [5] Zhang Y, Zhang L, Liu B, et al. (2024) Voltage sag sensitive load type identification based on power quality monitoring data. Int J Electr Power Energy Syst 158: 109936. https://doi.org/10.1016/j.ijepes.2024.109936 doi: 10.1016/j.ijepes.2024.109936
    [6] Liao J, Liu Y, Guo C, et al. (2024) Power quality of DC microgrid: Index classification, definition, correlation analysis and cases study. Int J Electr Power Energy Syst 156: 109782. https://doi.org/10.1016/j.ijepes.2024.109782 doi: 10.1016/j.ijepes.2024.109782
    [7] Rezapour H, Fathnia F, Fiuzy M, et al. (2024) Enhancing power quality and loss optimization in distorted distribution networks utilizing capacitors and active power filters: A simultaneous approach. Int J Electr Power Energy Syst 155: 109590. https://doi.org/10.1016/j.ijepes.2023.109590 doi: 10.1016/j.ijepes.2023.109590
    [8] Mishra M (2019) Power quality disturbance detection and classification using signal processing and soft computing techniques: A comprehensive review. Int Trans Electr Energy Syst 29: e12008. https://doi.org/10.1002/2050-7038.12008 doi: 10.1002/2050-7038.12008
    [9] Zhong T, Zhang S, Cai G, et al. (2019) Power quality disturbance recognition based on multiresolution S-transform and decision tree. IEEE Access 7: 88380–88392. https://doi.org/10.1109/ACCESS.2019.2924918 doi: 10.1109/ACCESS.2019.2924918
    [10] Heydt GT, Fjeld PS, Liu CC, et al. (1999) Applications of the windowed FFT to electric power quality assessment. IEEE Trans Power Delivery 14: 1411–1416. https://doi.org/10.1109/61.796235 doi: 10.1109/61.796235
    [11] Gu YH, Bollen MHJ (2000) Time-frequency and time-scale domain analysis of voltage disturbances. IEEE Trans Power Delivery 15: 1279–1284. https://doi.org/10.1109/61.891515 doi: 10.1109/61.891515
    [12] Gaouda AM, Salama MMA, Sultan MR, et al. (1999) Power quality detection and classification using wavelet-multiresolution signal decomposition. IEEE Trans Power Delivery 14: 1469–1476. https://doi.org/10.1109/61.796242 doi: 10.1109/61.796242
    [13] Gao W, Ning J (2011) Wavelet-based disturbance analysis for power system wide-area monitoring. IEEE Trans Smart Grid 2: 121–130. https://doi.org/10.1109/TSG.2011.2106521 doi: 10.1109/TSG.2011.2106521
    [14] Ray PK, Kishor N, Mohanty, SR (2012) Islanding and power quality disturbance detection in grid-connected hybrid power system using wavelet and S-transform. IEEE Trans Smart Grid 3: 1082–1094. https://doi.org/10.1109/TSG.2012.2197642 doi: 10.1109/TSG.2012.2197642
    [15] Wang H, Wang P, Liu T (2017) Power quality disturbance classification using the S-transform and probabilistic neural network. Energies 10: 107. https://doi.org/10.3390/en10010107 doi: 10.3390/en10010107
    [16] Climente-Alarcon V, Antonino-Daviu JA, Haavisto A, et al. (2015) Diagnosis of induction motors under varying speed operation by principal slot harmonic tracking. IEEE Trans Ind Appl 51: 3591–3599. https://doi.org/10.1109/TIA.2015.2413963 doi: 10.1109/TIA.2015.2413963
    [17] Huang NE, Shen Z, Long SR, et al. (1998) The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis. Proc: Math Phys Eng Sci 454: 903–995. Available from: http://www.jstor.org/stable/53161.
    [18] Cai K, Cao W, Aarniovuori L, et al. (2019) Classification of power quality disturbances using Wigner-Ville distribution and deep convolutional neural networks. IEEE Access 7: 119099–119109. https://doi.org/10.1109/ACCESS.2019.2937193 doi: 10.1109/ACCESS.2019.2937193
    [19] Wu X, Liu T (2019) Spectral decomposition of seismic data with reassigned smoothed pseudo Wigner-Ville distribution. J Appl Geophys 68: 386–393. https://doi.org/10.1016/j.jappgeo.2009.03.004 doi: 10.1016/j.jappgeo.2009.03.004
    [20] Cohen L (1995) Time-frequency analysis, Prentice Hall signal processing series, Englewood Cliffs, New Jersey: Prentice Hall.
    [21] Mallat S (1999) A wavelet tour of signal processing, 2nd Eds., San Diego, CA: Academic Press. https://doi.org/10.1016/B978-0-12-466606-1.X5000-4
    [22] Uyar M, Yildirim S, Gencoglu MT (2008) An effective wavelet-based feature extraction method for classification of power quality disturbance signals. Electr Power Syst Res 78: 1747–1755. https://doi.org/10.1016/j.epsr.2008.03.002 doi: 10.1016/j.epsr.2008.03.002
    [23] Stockwell RG, Mansinha L, PLowe R (2002) Localization of the complex spectrum: The S transform. IEEE Trans Signal Process 44: 998–1001. https://doi.org/10.1109/78.492555 doi: 10.1109/78.492555
    [24] Szmajda M, Górecki K, Mroczka J (2010) Gabor transform, SPWVD, Gabor-Wigner transform and Wavelet transform—Tools for power quality monitoring. Metrol Meas Syst XVⅡ: 383–396. Available from: http://www.metrology.pg.gda.pl/full/2010/M & MS_2010_383.pdf.
    [25] Moravej Z, Abdoos AA, Pazoki M (2009) Detection and classification of power quality disturbances using wavelet transform and support vector machines. Electr Power Compon Syst 38: 182–196. https://doi.org/10.1080/15325000903273387 doi: 10.1080/15325000903273387
    [26] Biswal M, Dash PK (2013) Detection and characterization of multiple power quality disturbances with a fast S-transform and decision tree based classifier. Digital Signal Process 23: 1071–1083. https://doi.org/10.1016/j.dsp.2013.02.012 doi: 10.1016/j.dsp.2013.02.012
    [27] Kumar R, Singh B, Shahani DT, et al. (2015) Recognition of power-quality disturbances using S-transform-based ANN classifier and rule-based decision tree. IEEE Trans Ind Appl 51: 1249–1258. https://doi.org/10.1109/TIA.2014.2356639 doi: 10.1109/TIA.2014.2356639
    [28] Khokhar S, Zin AAM, Memon AP, et al. (2017) A new optimal feature selection algorithm for classification of power quality disturbances using discrete wavelet transform and probabilistic neural network. Measurement 95: 246–259. https://doi.org/10.1016/j.measurement.2016.10.013 doi: 10.1016/j.measurement.2016.10.013
    [29] Cervantes J, Lamont FG, López-Chau A, et al. (2015) Data selection based on decision tree for SVM classification on large data sets. Appl Soft Comput 37: 787–798. https://doi.org/10.1016/j.asoc.2015.08.048 doi: 10.1016/j.asoc.2015.08.048
    [30] Ackerman A, Sen PK, Oertli C (2013) Designing safe and reliable grounding in AC substations with poor soil resistivity: An interpretation of IEEE Std. 80. IEEE Trans Ind Appl 49: 1883–1889. https://doi.org/10.1109/TIA.2013.2256092 doi: 10.1109/TIA.2013.2256092
    [31] Krizhevsky A, Sutskever I, Hinton GE (2017) ImageNet classification with deep convolutional neural networks. Commun ACM 60: 84–90. https://doi.org/10.1145/3065386 doi: 10.1145/3065386
    [32] Wang S, Chen H (2019) A novel deep learning method for the classification of power quality disturbances using deep convolutional neural network. Appl Energy 235: 1126–1140. https://doi.org/10.1016/j.apenergy.2018.09.160 doi: 10.1016/j.apenergy.2018.09.160
    [33] Sindi H, Nour M, Rawa M, et al. (2021) A novel hybrid deep learning approach including combination of 1D power signals and 2D signal images for power quality disturbance classification. Expert Syst Appl 174: 114785. https://doi.org/10.1016/j.eswa.2021.114785 doi: 10.1016/j.eswa.2021.114785
    [34] Garcia CI, Grasso F, Luchetta A, et al. (2020) A comparison of power quality disturbance detection and classification methods using CNN, LSTM and CNN-LSTM. Appl Sci 10: 6755. https://doi.org/10.3390/app10196755 doi: 10.3390/app10196755
    [35] Li C, Huang X, Song R, et al. (2022) EEG-based seizure prediction via transformer guided CNN. Measurement 203: 111948. https://doi.org/10.1016/j.measurement.2022.111948 doi: 10.1016/j.measurement.2022.111948
    [36] Han Z, Liu H, Liu Z, et al. (2019) 3D2SeqViews: Aggregating sequential views for 3D global feature learning by CNN with hierarchical attention aggregation. IEEE Trans Image Process 28: 3986–3999. https://doi.org/10.1109/TIP.2019.2904460 doi: 10.1109/TIP.2019.2904460
    [37] Vaswani A, Shazeer N, Parmar N, et al. (2017) Attention is all you need. NIPS'17: Proceedings of the 31st International Conference on Neural Information Processing Systems, 6000–6010. Available from: https://dl.acm.org/doi/10.5555/3295222.3295349#core-history.
    [38] Dosovitskiy A, Beyer L, Kolesnikov A, et al. (2021) An image is worth 16x16 words: Transformers for image recognition at scale. International Conference on Learning Representations. Available from: https://openreview.net/forum?id = YicbFdNTTy.
    [39] Feldman M (2001) Hilbert transforms, In: S. Braun (Ed.) Encyclopedia of Vibration, Oxford: Elsevier, 642–648. https://doi.org/10.1006/rwvb.2001.0057
    [40] Lin YP, Vaidyanathan PP (1998) A Kaiser window approach for the design of prototype filters of cosine modulated filterbanks. IEEE Signal Process Letters 5: 132–134. https://doi.org/10.1109/97.681427 doi: 10.1109/97.681427
    [41] Wang Q, Li B, Xiao T, et al. (2019) Learning deep transformer models for machine translation. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, 1810–1822. Available from: https://aclanthology.org/P19-1176/.
    [42] Cai K, Hu T, Cao W, et al. (2019) Classifying power quality disturbances based on phase space reconstruction and a convolutional neural network. Appl Sci 9: 3681. https://doi.org/10.3390/app9183681 doi: 10.3390/app9183681
    [43] Wang J, Zhang D, Zhou Y (2022) Ensemble deep learning for automated classification of power quality disturbances signals. Electr Power Syst Res 213: 108695. https://doi.org/10.1016/j.epsr.2022.108695 doi: 10.1016/j.epsr.2022.108695
    [44] Liu Y, Jin T, Mohamed MA, et al. (2021) A novel three-step classification approach based on time-dependent spectral features for complex power quality disturbances. IEEE Trans Instrum Meas 70: 1–14. https://doi.org/10.1109/TIM.2021.3050187 doi: 10.1109/TIM.2021.3050187
    [45] Igual R, Medrano C, Arcega FJ, et al. (2018) Integral mathematical model of power quality disturbances. 2018 18th International Conference on Harmonics and Quality of Power (ICHQP), 1–6. https://doi.org/10.1109/ICHQP.2018.8378902
    [46] Hooshmand R, Enshaee A (2010) Detection and classification of single and combined power quality disturbances using fuzzy systems oriented by particle swarm optimization algorithm. Electr Power Syst Res 80: 1552–1561. https://doi.org/10.1016/j.epsr.2010.07.001 doi: 10.1016/j.epsr.2010.07.001
    [47] Wang J, Xu Z, Che Y (2019) Power quality disturbance classification based on compressed sensing and deep convolution neural networks. IEEE Access 7: 78336–78346. https://doi.org/10.1109/ACCESS.2019.2922367 doi: 10.1109/ACCESS.2019.2922367
    [48] Srivastava N, Hinton G, Krizhevsky A, et al. (2014) Dropout: a simple way to prevent neural networks from overfitting. J Mach Learn Res 15: 1929–1958. Available from: https://jmlr.org/papers/volume15/srivastava14a/srivastava14a.pdf.
    [49] Biswal B, Biswal M, Mishra S, et al. (2013) Automatic classification of power quality events using balanced neural tree. IEEE Trans Ind Electron 61: 521–530. https://doi.org/10.1109/TIE.2013.2248335 doi: 10.1109/TIE.2013.2248335
    [50] Valtierra-Rodriguez M, Romero-Troncoso RJ, Osornio-Rios RA, et al. (2014) Detection and classification of single and combined power quality disturbances using neural networks. IEEE Trans Ind Electron 5: 2473–2482. https://doi.org/10.1109/TIE.2013.2272276 doi: 10.1109/TIE.2013.2272276
    [51] Shen Y, Abubakar M, Liu H, et al. (2019) Power quality disturbance monitoring and classification based on improved PCA and convolution neural network for wind-grid distribution systems. Energies 12: 1280. https://doi.org/10.3390/en12071280 doi: 10.3390/en12071280
    [52] Eristi B, Eristi H (2022) A new deep learning method for the classification of power quality disturbances in hybrid power system. Electr Eng 104: 3753–3768. https://doi.org/10.1007/s00202-022-01581-w doi: 10.1007/s00202-022-01581-w
    [53] Chen CI, Berutu SS, Chen YC, et al. (2022) Regulated two-dimensional deep convolutional neural network-based power quality classifier for microgrid. Energies 15: 2532. https://doi.org/10.3390/en15072532 doi: 10.3390/en15072532
    [54] Cai J, Zhang K, Jiang H (2023) Power quality disturbance classification based on parallel fusion of CNN and GRU. Energies 16: 4029. https://doi.org/10.3390/en16104029 doi: 10.3390/en16104029
    [55] Sun C, Shrivastava A, Singh S, et al. (2017) Revisiting unreasonable effectiveness of data in deep learning era. 2017 IEEE International Conference on Computer Vision (ICCV), 843–852. https://doi.org/10.1109/ICCV.2017.97
    [56] Utgoff PE (1986) Machine learning of inductive bias, New York: Springer. https://doi.org/10.1007/978-1-4613-2283-2
  • Reader Comments
  • © 2025 the Author(s), licensee AIMS Press. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0)
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Metrics

Article views(1237) PDF downloads(137) Cited by(1)

Article outline

Figures and Tables

Figures(8)  /  Tables(10)

/

DownLoad:  Full-Size Img  PowerPoint
Return
Return

Catalog