A Novel Approach to Classify Power Quality Signals Using Vision Transformers

Ahmad Mohammad Saber,Alaa Selim,Mohamed M. Hammad,Amr Youssef,Deepa Kundur,Ehab El-Saadany
2024-09-04
Abstract:With the rapid integration of electronically interfaced renewable energy resources and loads into smart grids, there is increasing interest in power quality disturbances (PQD) classification to enhance the security and efficiency of these grids. This paper introduces a new approach to PQD classification based on the Vision Transformer (ViT) model. When a PQD occurs, the proposed approach first converts the power quality signal into an image and then utilizes a pre-trained ViT to accurately determine the class of the PQD. Unlike most previous works, which were limited to a few disturbance classes or small datasets, the proposed method is trained and tested on a large dataset with 17 disturbance classes. Our experimental results show that the proposed ViT-based approach achieves PQD classification precision and recall of 98.28% and 97.98%, respectively, outperforming recently proposed techniques applied to the same dataset.
Signal Processing,Computer Vision and Pattern Recognition,Machine Learning,Image and Video Processing
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the classification of Power Quality Disturbances (PQD). With the rapid integration of renewable energy resources and loads with electronic interfaces in smart grids, the classification of power quality disturbances has become increasingly important for improving the security and efficiency of power grids. ### Problem Background Power Quality Disturbances (PQD) refer to fluctuations in voltage, frequency, and waveform quality in power systems. These fluctuations can affect the stability and efficiency of power systems. Accurate identification and management of these disturbances are crucial for power companies and grid operators. Traditional PQD classification methods usually rely on manually - designed features. This method has limitations when dealing with large - scale data sets and may contain many irrelevant features, resulting in a time - consuming optimization process. ### Main Contributions of the Paper To solve the above problems, this paper proposes a new method based on the Vision Transformer (ViT) model to classify power quality disturbances. Specifically: 1. **Novel Framework**: For the first time, ViT is applied to the classification of power quality signals. Power quality signals are converted into images, and the pre - trained ViT model is used for classification. 2. **Large - scale Data Set Evaluation**: This method has been evaluated on a large - scale data set containing more than 250,000 samples and 17 types of PQD, covering single events and multiple simultaneous events. 3. **Superior Performance**: Experimental results show that the ViT model has reached 98.28% and 97.98% in classification accuracy and recall rate respectively, outperforming other recently proposed techniques. ### Method Overview 1. **Signal - to - Image Conversion**: First, power quality signals are converted into two - dimensional images. 2. **Patch and Position Embedding**: The image is divided into several patches of the same size, and each patch is embedded into a lower - dimensional space through linear projection. At the same time, position embedding is added to retain position information. 3. **Transformer Encoder**: A standard Transformer encoder is used to process the embedded patch sequence to capture long - distance dependencies and interactions in the signal. 4. **Classification**: The final hidden state is classified by a multi - layer perceptron (MLP) to obtain the category probability of the signal. ### Performance Evaluation The model has been trained and tested on a large - scale data set. The results show that it performs well in terms of classification accuracy, recall rate, and F1 - score. Especially when dealing with complex and multiple simultaneous power quality disturbances, the ViT model shows strong classification ability. ### Conclusion This paper proposes a new power quality disturbance classification framework based on ViT, which can effectively deal with the multi - class power quality disturbance classification problem on large - scale data sets, has high accuracy and robustness, and provides strong support for the safe and efficient operation of smart grids.