Research on Power Grid Stability Analysis Method Based on CNN

Research Article
Open access

Research on Power Grid Stability Analysis Method Based on CNN

Zhilin Yi 1*
  • 1 College of Electrical Engineering and Automation, Shandong University of Science and Technology, Tsingtao, China    
  • *corresponding author 202311100927@sdust.edu.cn
ACE Vol.147
ISSN (Print): 2755-273X
ISSN (Online): 2755-2721
ISBN (Print): 978-1-80590-055-9
ISBN (Online): 978-1-80590-056-6

Abstract

In the modern society with a high dependence on power systems, the stable operation of the power grid is of utmost significance. Traditional approaches for analyzing power grid stability suffer from several limitations, including high computational complexity, notable sensitivity to data quality, and inadequate representation of dynamic characteristics. To address these issues, this paper proposes a power grid stability analysis method predicated on the Convolutional Neural Network (CNN). In this method, the discrimination of power grid stability is modeled as a binary classification problem. By performing preprocessing operations on the input data, such as outlier cleansing based on the 3σ criterion and min-max normalization, the CNN's convolutional layers, pooling layers, and fully connected layers are utilized to extract features and classify the states. The case study is founded on the actual monitoring data of a regional power grid. The results demonstrate that the accuracy of the proposed method on both the training set and the test set is remarkably superior to that of the Fully Connected Neural Network (FNN). This method can offer effective technical support for the safe operation of the power grid.

Keywords:

Power grid stability, CNN, Feature extraction, Binary classification, Data preprocessing, Accuracy

Yi,Z. (2025). Research on Power Grid Stability Analysis Method Based on CNN. Applied and Computational Engineering,147,160-165.
Export citation

1. Introduction

In the contemporary era where electricity is highly indispensable, the stable functioning of the power grid is of critical importance. As indicated in reference [1], power grid stability is directly correlated with the reliable power supply of the power system. In the event that the power grid stability analysis method proves to be ineffective, it may give rise to severe consequences like voltage collapse and frequency anomalies in the power system, thereby exerting an impact on various sectors such as industrial production and residential life. Precise power grid stability analysis can effectively anticipate potential risks, rationally arrange power dispatching, ensure the real-time equilibrium of power supply and demand, and safeguard the safe and stable operation of the power grid.

At present, there exists a plethora of power grid stability analysis methods. Reference [2] adopts a mathematical analysis method based on power flow calculation. By meticulously computing the power distribution and voltage variations within the power grid, the stability of the power grid is appraised. Reference [3] employs a data-driven machine learning algorithm. Utilizing historical data to construct a model, it undertakes predictive analysis of the power grid state. Reference [4] resorts to the complex network theory. From the perspective of the power grid topology, it examines the stability of the power grid under different working conditions. Reference [5] utilizes a probability statistics-based method. Considering the various uncertain factors in the power system, it conducts a probabilistic assessment of power grid stability.

Nevertheless, the above-mentioned traditional methods have certain drawbacks. According to reference [6], the mathematical analysis method is computationally intricate and struggles to promptly respond to the real-time alterations of the power grid state. The data-driven method is susceptible to the influences of data quality and model generalization ability. The complex network theory fails to comprehensively depict the dynamic characteristics of the actual power grid. The probability statistics method relies on copious amounts of historical data and an accurate probability model. In contrast, artificial intelligence technology, with its nonlinear modeling ability and adaptive learning characteristics, can efficiently process high-dimensional dynamic data and provides a new paradigm for power grid stability analysis. Recent studies have further demonstrated the potential of CNN in handling complex power system data, as highlighted in [7].

This paper puts forward a power grid stability analysis method based on CNN in light of the limitations of traditional methods. Firstly, data cleansing and normalization processing are carried out on power grid operation parameters (such as response time τ, rated power p, price elasticity coefficient g). Secondly, a CNN network architecture is constructed. The convolutional kernels are employed to extract local features, and in combination with the pooling layer for dimension reduction, the robustness of the model is enhanced. Finally, the binary classification of stable/unstable states is accomplished through the fully connected layer. By capitalizing on the potent feature extraction capability of CNN, an accurate determination of the stable and unstable states of the power grid is achieved. The case analysis reveals that the accuracy of this method on the training set and test set attains 92% and 90% respectively, which is conspicuously better than that of the fully connected neural network, furnishing robust technical support for the safe and stable operation of the power grid.

2. Power grid stability analysis method based on CNN

2.1. Problem description and data preprocessing

In the domain of power grid stability analysis, the utilization of AI technology to resolve related problems has emerged as the central focus of current research. Notably, by applying machine learning and deep learning technologies, the stability judgment is ingeniously formulated as a binary classification problem, thereby opening up a novel avenue for power grid state assessment.

The input data encompasses several crucial elements. tau represents the reaction time of the participants, with a value range spanning from 0.5 to 10 seconds. This data can mirror the response speed of the relevant entities within the power grid when confronted with diverse disturbances and holds great significance for evaluating power grid stability. p denotes the rated power that is either consumed (negative) or generated (positive), which directly exhibits the power supply and demand status within the power grid and constitutes a key indicator for analyzing the power grid operation state. g is a coefficient proportional to the price elasticity (gamma), with a value range of [0.05, 1] s^(-1), where g1 specifically pertains to the coefficient value for power producers. This parameter reflects the potential influence of power market price factors on power grid operation.

Through an in-depth analysis of these input data, the state of the power grid is distinctly categorized into two output classes: stable and unstable, thus consummating the binary classification modeling of stability judgment. In this process, data preprocessing is an essential step. Taking the cleansing of raw data as an example, an outlier detection algorithm based on statistical methods, such as the 3σ criterion, can be adopted. Data points whose deviation from the mean exceeds 3 times the standard deviation are regarded as outliers and are thus eliminated. The normalization process can utilize the min-max normalization method to map the data onto the [0, 1] interval, ensuring that data with different dimensions can be analyzed on the same scale, thereby enhancing the accuracy and stability of the model.

2.2. CNN network architecture and feature extraction

In the research on power grid stability analysis predicated on artificial intelligence, we adopt the Convolutional Neural Network (CNN) method. Firstly, a brief introduction to the Fully Connected Neural Network (FNN) is provided. FNN is a fundamental neural network structure in which neurons are connected to all neurons in the preceding and subsequent layers. In this network, each neuron in the input layer is linked to the neurons in the hidden layer and output layer through weights, and the signal propagates in the sequence from the input layer through the hidden layer and ultimately reaches the output layer. In simple image recognition tasks such as distinguishing numbers from 0 to 9, FNN can achieve a relatively high recognition accuracy by learning a substantial amount of sample data. However, when dealing with complex data like those with spatial structure, since each neuron is connected to other neurons, the number of parameters will increase exponentially, resulting in issues such as excessive computational load, prolonged training time, and a propensity for overfitting. In contrast, CNN effectively overcomes these problems [8]. CNN primarily consists of convolutional layers, pooling layers, and fully connected layers. The convolutional layer is the core component of CNN. The convolutional kernels glide over the data and extract local features of the data through convolution operations.

The mathematical expression of the convolution calculation formula of CNN is as follows:

\( O(i,j)=(\sum _{c=1}^{Cin}\sum _{m=0}^{K-1}\sum _{n=0}^{K-1}Ic(i∙s+m-p,j∙s+n-p)∙Kc(m,n))+b \) (1)

In the formula, the input Ic represents the c-th channel of the input data (the number of channels is Cin), with a size of Hin×Win; the convolutional kernel Kc is the weight of the convolutional kernel corresponding to the c-th input channel, with a size of K×K; the output O(i,j) is the value of the output feature map at the positionc(i,j), and its size is determined by the stride (s) and padding (p); the hyperparameters include s(stride: the sliding interval of the convolutional kernel), p(padding: the number of layers of zero padding at the input edge, used to control the output size), and b(bias term: a scalar, enhancing the nonlinearity of the model).

The weight parameters in the convolutional kernel are shared, which substantially reduces the number of parameters of the model. While diminishing the computational volume, it effectively averts the overfitting phenomenon. For instance, when a 3×3 convolutional kernel slides over a 10×10 image, a traditional fully connected neural network would need to establish connections between each pixel and all other pixels, resulting in an enormous number of parameters. In contrast, CNN only needs to calculate the parameters within the convolutional kernel through the shared weights of the convolutional kernel, and the number of parameters is significantly reduced. The pooling layer downsamples the feature map output by the convolutional layer. Common pooling methods encompass max pooling and average pooling. Max pooling selects the maximum value within the pooling window as the output, while average pooling calculates the average value within the pooling window as the output. Through the pooling operation, the data volume is further reduced while the principal features are retained, remarkably enhancing the computational efficiency. This hierarchical feature extraction mechanism aligns with the findings in [9], which emphasizes the adaptability of CNN in smart grid applications.

In power grid stability analysis, the preprocessed input data is transformed into a format suitable for CNN processing. For example, data such as tau, p, and g are arranged into a multi-dimensional array as input according to specific rules. Recent advancements in power system technology, as discussed in [10], validate the effectiveness of such data organization strategies in improving model robustness. Firstly, in accordance with the physical meaning and mutual relationship of the data, tau, p, and g are organized as different dimensions to form a three-dimensional array. Subsequently, through the successive operations of CNN, the convolutional layer continuously extracts the local features in the data, and the pooling layer downsamples the feature map, gradually compressing the data volume and highlighting the key features [11]. Finally, the classification judgment is made through the fully connected layer, and the result of the power grid being in a stable or unstable state is output. This method takes full advantage of the powerful feature extraction ability of CNN and can effectively tackle the intricate problems in power grid stability analysis, providing reliable technical support for the safe and stable operation of the power grid.

3. Case analysis

3.1. Dataset introduction

The dataset employed in this study is sourced from the actual operation monitoring data of a regional power grid over numerous years, encompassing power grid operation information across different seasons, diverse time periods, and various power consumption scenarios. The dataset is relatively extensive, containing 50,000 data records, and each record incorporates key data features such as tau, p, and g utilized for power grid stability analysis. The data preprocessing methodology aligns with best practices in energy engineering studies [12], ensuring high reliability and scalability of the model.

During the data preprocessing stage, initially, the 3σ criterion is utilized to cleanse the original data, and approximately 2% of the abnormal data points are expunged to guarantee the reliability of the data. Subsequently, the min-max normalization method is applied to map the data onto the [0, 1] interval, enabling data with different dimensions to be analyzed on a unified scale. Eventually, the dataset is partitioned into a training set and a test set according to the ratio of 70% for the training set and 30% for the test set, yielding 35,000 training set data and 15,000 test set data.

3.2. Network parameter settings

The CNN adopted in this paper comprises 3 convolutional layers, 2 pooling layers, and 2 fully connected layers. In the convolutional layers, the sizes of the convolutional kernels are 3×3, 5×5, and 3×3 respectively, and the number of output channels following each convolutional layer is 32, 64, and 128 in succession. The pooling layers all adopt a 2×2 max pooling window. The number of neurons in the fully connected layers is 128 and 2 respectively, and the last layer outputs 2 nodes corresponding to the two states of stable and unstable. The learning rate is set to 0.001, and the Adam optimizer is employed for parameter update to accelerate the convergence speed of the model. Similar parameter configurations have been successfully applied in CNN-based fault diagnosis models, as evidenced by [13].

3.3. Case index and comparative analysis

In the stability analysis, the accuracy rate is selected as the principal evaluation index to measure the correctness of the model's judgment regarding the power grid stability state. To validate the superiority of the CNN method adopted, it is contrasted with the Fully Connected Neural Network (FNN). As shown in Table 1 below, it presents a comparison of the accuracy rates between the FNN and CNN methods on both the training set and the test set.

Table 1: Comparison of the accuracy rates between CNN and FNN

Method

Training Set Accuracy

Test Set Accuracy

FNN

85%

82%

CNN

92%

90%

From Table 1, it is evident that through the comparison of the two methods, the accuracy rates of CNN on the training set and test set (92%, 90%) are significantly higher than those of FNN (85%, 82%). Collating the data yields a more intuitive histogram, as shown in Figure 1, where the comparison of two different color methods with indicators makes it is clear that the CNN method is far more reliable and accurate than the FNN. CNN can extract data features more effectively and exhibits stronger modeling capabilities for complex power grid stability problems. Therefore, in practical applications, it can more precisely determine the stable state of the power grid and offer more reliable assurance for the safe and stable operation of the power grid.

Figure 1: CNN and FNN comparison histograms

4. Conclusions

This paper successfully devises a power grid stability analysis method based on CNN. Through the rational processing and feature engineering optimization of key data such as tau, p, and g, and by leveraging the hierarchical feature extraction capacity of CNN's unique network structure, the complex features in the data are effectively extracted, and an accurate assessment of power grid stability is achieved. In the case analysis, the proposed method demonstrates an accuracy rate far exceeding that of the fully connected neural network on both the training set and test set, thoroughly validating its superiority and effectiveness in handling power grid stability analysis problems. This method is anticipated to be widely utilized in actual power grid operation, providing a solid technical foundation for ensuring the safe and stable operation of the power grid, rationally arranging power dispatching, and realizing the real-time balance of power supply and demand. Future research can further explore the adaptability of CNN in heterogeneous power grids and attempt to integrate it with models such as Graph Neural Network (GNN) to enhance the analysis efficiency in complex scenarios. For instance, the integration of CNN with transient stability evaluation frameworks, as proposed in [14] and [15], could offer novel insights into multi-scale power grid dynamics.


References

[1]. Zhao Yuhan, Zhang Xianglong, & Lan Ying. (2023). Evaluation of Power Grid Stability and Reliability Levels. Electrical Technology and Economy, 09, 336-338+342.

[2]. C. Cheng, H. Gao, Y. An, X. Cheng, and J. Yang, “Calculation method and analysis of power flow for distribution network with distributed generation,” in 2015 5th International Conference on Electric Utility Deregulation and Restructuring and Power Technologies (DRPT), Nov. 2015, pp. 2020–2024. doi: 10.1109/DRPT.2015.7432571.

[3]. F. Thams, A. Venzke, R. Eriksson, and S. Chatzivasileiadis, “Efficient Database Generation for Data-Driven Security Assessment of Power Systems,” IEEE Transactions on Power Systems, vol. 35, no. 1, pp. 30–41, Jan. 2020, doi: 10.1109/TPWRS.2018.2890769.

[4]. F. Scarselli, M. Gori, A. C. Tsoi, M. Hagenbuchner, and G. Monfardini, “The Graph Neural Network Model,” IEEE Transactions on Neural Networks, vol. 20, no. 1, pp. 61–80, Jan. 2009, doi: 10.1109/TNN.2008.2005605.

[5]. S. Liemann et al., “Probabilistic Stability Assessment for Active Distribution Grids,” in 2021 IEEE Madrid PowerTech, Jun. 2021, pp. 1–6. doi: 10.1109/PowerTech46648.2021.9494855.

[6]. H. Wang and Z. Li, “A Review of Power System Transient Stability Analysis and Assessment,” in 2019 Prognostics and System Health Management Conference (PHM-Qingdao), Oct. 2019, pp. 1–6. doi: 10.1109/PHM-Qingdao46334.2019.8942834.

[7]. Z. Li, F. Liu, W. Yang, S. Peng and J. Zhou, "A Survey of Convolutional Neural Networks: Analysis, Applications, and Prospects," in IEEE Transactions on Neural Networks and Learning Systems, vol. 33, no. 12, pp. 6999-7019, Dec. 2022, doi: 10.1109/TNNLS.2021.3084827.

[8]. Y. Kim, "Convolutional neural networks for sentence classification", International Conference on Empirical Methods in Natural Language Processing, pp. 1746-1751, 2014.

[9]. J. Tian, B. Wang, J. Li and Z. Wang, "Adversarial Attacks and Defense for CNN Based Power Quality Recognition in Smart Grid," in IEEE Transactions on Network Science and Engineering, vol. 9, no. 2, pp. 807-819, 1 March-April 2022, doi: 10.1109/TNSE.2021.3135565.

[10]. Shi Chun, Liu Jun, Liang Zhuohang, et al. Power System Technology,2022,46(08):3191-3202.DOI:10.13335/j.1000-3673.pst.2022.0010.

[11]. S. Kiranyaz, O. Avci, O. Abdeljaber et al., "1D Convolutional Neural Networks and Applications: A Survey," Mechanical Systems and Signal Processing, vol. 151, 107398, 2021, doi: 10.1016/j.ymssp.2020.107398.

[12]. Li Delu, Zhao Jinmai, Li Dahua, et al. Energy Engineering,2022,42(06):75-79.DOI:10.16189/j.cnki.nygc.2022.06.006.

[13]. Ding Jinjin, Shao Qingqing, Qi Zhenxing, et al. Convolutional neural network power grid fault diagnosis based on transfer learning[J].Science Technology and Engineering,2022,22(14):5653-5658.)

[14]. Gao Kunlun, Yang Shuai, Liu Siyan, et al. Transient stability evaluation of power system based on one-dimensional convolutional neural network[J].Automation of Electric Power Systems,2019,43(12):18-26.)

[15]. Tian Fang, Zhou Xiaoxin, Shi Dongyu, et al. Transient stability evaluation of power system based on convolutional neural network comprehensive model and steady-state eigenquantity[J].Proceedings of the CSEE,2019,39(14):4025-4032.DOI:10.13334/j.0258-8013.pcsee.182132.


Cite this article

Yi,Z. (2025). Research on Power Grid Stability Analysis Method Based on CNN. Applied and Computational Engineering,147,160-165.

Data availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

Disclaimer/Publisher's Note

The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

About volume

Volume title: Proceedings of the 3rd International Conference on Mechatronics and Smart Systems

ISBN:978-1-80590-055-9(Print) / 978-1-80590-056-6(Online)
Editor:Mian Umer Shafiq
Conference website: https://2025.confmss.org/
Conference date: 16 June 2025
Series: Applied and Computational Engineering
Volume number: Vol.147
ISSN:2755-2721(Print) / 2755-273X(Online)

© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license. Authors who publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open access policy for details).

References

[1]. Zhao Yuhan, Zhang Xianglong, & Lan Ying. (2023). Evaluation of Power Grid Stability and Reliability Levels. Electrical Technology and Economy, 09, 336-338+342.

[2]. C. Cheng, H. Gao, Y. An, X. Cheng, and J. Yang, “Calculation method and analysis of power flow for distribution network with distributed generation,” in 2015 5th International Conference on Electric Utility Deregulation and Restructuring and Power Technologies (DRPT), Nov. 2015, pp. 2020–2024. doi: 10.1109/DRPT.2015.7432571.

[3]. F. Thams, A. Venzke, R. Eriksson, and S. Chatzivasileiadis, “Efficient Database Generation for Data-Driven Security Assessment of Power Systems,” IEEE Transactions on Power Systems, vol. 35, no. 1, pp. 30–41, Jan. 2020, doi: 10.1109/TPWRS.2018.2890769.

[4]. F. Scarselli, M. Gori, A. C. Tsoi, M. Hagenbuchner, and G. Monfardini, “The Graph Neural Network Model,” IEEE Transactions on Neural Networks, vol. 20, no. 1, pp. 61–80, Jan. 2009, doi: 10.1109/TNN.2008.2005605.

[5]. S. Liemann et al., “Probabilistic Stability Assessment for Active Distribution Grids,” in 2021 IEEE Madrid PowerTech, Jun. 2021, pp. 1–6. doi: 10.1109/PowerTech46648.2021.9494855.

[6]. H. Wang and Z. Li, “A Review of Power System Transient Stability Analysis and Assessment,” in 2019 Prognostics and System Health Management Conference (PHM-Qingdao), Oct. 2019, pp. 1–6. doi: 10.1109/PHM-Qingdao46334.2019.8942834.

[7]. Z. Li, F. Liu, W. Yang, S. Peng and J. Zhou, "A Survey of Convolutional Neural Networks: Analysis, Applications, and Prospects," in IEEE Transactions on Neural Networks and Learning Systems, vol. 33, no. 12, pp. 6999-7019, Dec. 2022, doi: 10.1109/TNNLS.2021.3084827.

[8]. Y. Kim, "Convolutional neural networks for sentence classification", International Conference on Empirical Methods in Natural Language Processing, pp. 1746-1751, 2014.

[9]. J. Tian, B. Wang, J. Li and Z. Wang, "Adversarial Attacks and Defense for CNN Based Power Quality Recognition in Smart Grid," in IEEE Transactions on Network Science and Engineering, vol. 9, no. 2, pp. 807-819, 1 March-April 2022, doi: 10.1109/TNSE.2021.3135565.

[10]. Shi Chun, Liu Jun, Liang Zhuohang, et al. Power System Technology,2022,46(08):3191-3202.DOI:10.13335/j.1000-3673.pst.2022.0010.

[11]. S. Kiranyaz, O. Avci, O. Abdeljaber et al., "1D Convolutional Neural Networks and Applications: A Survey," Mechanical Systems and Signal Processing, vol. 151, 107398, 2021, doi: 10.1016/j.ymssp.2020.107398.

[12]. Li Delu, Zhao Jinmai, Li Dahua, et al. Energy Engineering,2022,42(06):75-79.DOI:10.16189/j.cnki.nygc.2022.06.006.

[13]. Ding Jinjin, Shao Qingqing, Qi Zhenxing, et al. Convolutional neural network power grid fault diagnosis based on transfer learning[J].Science Technology and Engineering,2022,22(14):5653-5658.)

[14]. Gao Kunlun, Yang Shuai, Liu Siyan, et al. Transient stability evaluation of power system based on one-dimensional convolutional neural network[J].Automation of Electric Power Systems,2019,43(12):18-26.)

[15]. Tian Fang, Zhou Xiaoxin, Shi Dongyu, et al. Transient stability evaluation of power system based on convolutional neural network comprehensive model and steady-state eigenquantity[J].Proceedings of the CSEE,2019,39(14):4025-4032.DOI:10.13334/j.0258-8013.pcsee.182132.