# Deep Learning Algorithm for Automatic Classification of Power Quality Disturbances
###### Abstract  
Power quality disturbances (PQDs) are major obstacles to maintaining the reliability and stability of electrical systems. This study introduces a new multi-scale deep learning method to classify PQDs, aiming to enhance the accuracy and efficiency of power quality (PQ) analysis and monitoring systems. By combining 1-D convolutional neural networks (CNNs) with an attention mechanism, this approach overcomes the limitations of traditional techniques. Moreover, varying-size convolutional layers allow for the direct learning of complex patterns and features from PQ signals. To address the challenge of limited labeled PQ datasets, this research utilizes an open-source dataset generator to create large-scale datasets with annotated PQDs. Through a comparison with existing models in the field, the superiority of the proposed CNN-based approach is evident, achieving an accuracy level of up to 99.49%. The results demonstrate promising classification performance in terms of simplicity and accuracy, highlighting the potential of this approach to improve PQ analysis and disturbance identification.  
p 202515442025154  
and flickers, can adversely affect the performance, safety, and lifespan of electrical equipment, leading to increased energy losses, equipment downtime, and maintenance costs. In extreme cases, these events can even cause power system instability or failure, posing risks to public safety and the economy [5, 6, 7].  
Recent advancements in ML and AI offer promising alternatives to traditional PQ analysis techniques. ML and AI algorithms have demonstrated their potential in various domains, including image recognition, natural language processing, and autonomous systems, owing to their ability to learn complex patterns and adapt to different scenarios [8, 9, 10]. The application of these advanced data-driven techniques to PQ event detection, classification, and localization has the potential to overcome the limitations of traditional methods and enable more accurate, efficient, and reliable PQ monitoring and maintenance.  
The motivation behind this research is to explore and exploit the capabilities of ML and AI algorithms for the automatic detection, classification, and localization of PQ events. By developing and evaluating algorithms that can accurately identify and classify PQ events, this research aims to contribute to the identification and mitigation of PQ issues in modern power systems. This work seeks to enhance the electrical grid's overall reliability, stability, and efficiency, minimizing the negative impacts of PQ events on equipment, businesses, and consumers. Ultimately, this research aims to push the boundaries of PQ analysis and contribute to the development of more intelligent and resilient power systems for the future.  
Hence, this paper introduces a novel deep learning approach for PQDs classification. The main contributions of this study are:  
* This study introduces a novel deep learning approach for classifying PQDs. By integrating CNNs with attention mechanisms, the proposed method aims to improve the accuracy and efficiency of PQ analysis and monitoring systems.
* Introducing a multi-scale convolutional network that employs multiple convolutional layers with varying kernel sizes, allowing it to effectively capture feature patterns across different scales of PQDs.
* When comparing the introduced CNN approach with other state-of-the-art methods, the results demonstrate promising classification performance. The introduced deep learning approach balances simplicity and accuracy, showcasing its potential to enhance PQ analysis.  
The rest of the article is organized as follows: Section 2 briefly reviews some background knowledge. Section 3 illustrates the proposed deep learning CNN architecture. Section 4 discusses the experimental results. Finally, Section 5 presents the conclusions and future work.