Power grid stability prediction system and method based on machine learning

By adopting machine learning technology in the grid stability prediction system, combined with Attention-LSTM and graph neural network, the existing system's problems in modeling limitations, abnormal identification and risk assessment are solved, and comprehensive modeling and intelligent load regulation of the complex dynamic behavior of the power grid is realized, which significantly improves prediction accuracy and risk management capabilities.

CN120086572APending Publication Date: 2025-06-03HUANENG RENEWABLES CORP LTD LIAONING BRANCH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510166143.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

The existing grid stability prediction system has problems such as the limitations of a single modeling technology, the inability to accurately identify rare anomalies, the lack of multi-level fine-grained risk classification and real-time dynamic regulation capabilities.

Method used

Using a machine learning-based grid stability prediction system, comprehensive modeling of the complex dynamic behavior of the power grid is achieved through data acquisition, cleaning, feature extraction and data augmentation, combined with Attention-LSTM and graph neural network models. At the same time, a generative adversarial network was introduced to solve the problem of scarcity of abnormal samples, optimized load allocation strategies based on reinforcement learning, and provided fine-grained risk assessment through multi-level early warning mechanisms.

Benefits of technology

It has achieved comprehensive modeling of the complex dynamic behavior of the power grid, improved the identification ability and prediction accuracy of abnormal states, provided multi-level fine-grained risk assessment and intelligent load regulation, and significantly improved the innovative and application value of grid stability prediction and risk management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120086572A_ABST
    Figure CN120086572A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power system operation management, and discloses a power grid stability prediction system and method based on machine learning, and the system comprises a data collection module which is used for collecting real-time data of power grid equipment and an external system, the collected real-time data comprises power operation data and environment data; the power operation data comprises voltage V, current I, frequency f, active power P, reactive power Q and load L; the environment data comprises temperature T, humidity H, wind speed W and illumination intensity S; and the data processing module is used for receiving the real-time data provided by the data acquisition module. Through combination of Attention-LSTM and a graph neural network, comprehensive modeling of complex dynamic behaviors of a power grid is realized, the problem that a traditional single modeling method is low in dynamic time sequence or topological structure processing capacity is solved through mutual synergism, a power grid stability prediction model can reflect time dynamic changes, spatial topological characteristics can be considered, and the stability of the power grid is improved. The method has remarkable innovativeness and uniqueness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power system operation management, and in particular to a power grid stability prediction system and method based on machine learning. Background Art

[0002] With the growth of energy demand in modern society and the expansion of the scale of power systems, the complexity of power grids has increased synchronously. The transformation of traditional power systems into smart grids, the access of new energy sources, and the diversity of load fluctuations have made the operating environment of power grids complex and dynamic. Against this background, the stability issue of power grids has become a key research area in the power industry.

[0003] The instability of power grid operation can lead to power supply interruptions, equipment damage, and even social and economic losses within a certain range. Therefore, building an efficient and accurate power grid stability prediction system can early warn of potential risks and provide a scientific basis for load regulation and power dispatching. It is an important technical means to ensure the safe operation of power grids. However, there are many technical bottlenecks in existing power grid stability prediction systems and methods, including:

[0004] Traditional power grid stability prediction methods mostly adopt single modeling techniques, such as models based on time series analysis or methods based on static topology graph models, which show certain limitations in practical applications and cannot comprehensively capture the complex behaviors in power grid operation. When dealing with scenarios with dynamic changes and complex topologies, the prediction performance is significantly limited.

[0005] During the operation of power grids, abnormal states are important factors leading to reduced stability. However, the frequency of abnormal states in actual power grid data is low, resulting in a very small proportion of abnormal samples in the dataset, which directly affects the learning ability of the model and makes traditional machine learning methods unable to accurately identify abnormal states. In addition, the abnormal samples generated by existing data enhancement technologies cannot match real abnormal events, further limiting the recognition accuracy of the model for rare abnormal events.

[0006] Existing power grid warning systems are mostly based on threshold judgment methods or simple classification rules, which can provide rough risk information. They cannot accurately reflect the real-time risk state of power grids in a dynamically changing power grid environment and cannot provide multi-level fine-grained risk classification. In addition, existing warning mechanisms lack the ability to identify potential risk sources, resulting in managers being unable to locate problems in a timely manner and take targeted control measures, reducing the risk response efficiency.

[0007] During the operation of the power grid, the load distribution strategy directly affects the stability of the power grid. Traditional load regulation methods usually rely on fixed rules or linear optimization models and lack the ability of real-time dynamic adjustment. When the power grid encounters emergencies, the response speed is slow, and an optimized regulation strategy cannot be generated in real time, resulting in the spread of instability risks and even triggering a chain reaction, further endangering the safety of the power grid.

[0008] Therefore, those skilled in the art provide a power grid stability prediction system and method based on machine learning to solve the above-mentioned problems. Summary of the Invention

[0009] Aiming at the deficiencies of the prior art, the present invention provides a power grid stability prediction system and method based on machine learning to solve the problems raised in the above background technology.

[0010] To achieve the above objectives, the present invention is realized through the following technical solutions: A power grid stability prediction system based on machine learning, including:

[0011] A data acquisition module for collecting real-time data of power grid equipment and external systems. The collected real-time data includes power operation data and environmental data:

[0012] The power operation data: voltage V, current I, frequency f, active power P, reactive power Q, load L;

[0013] The environmental data: temperature T, humidity H, wind speed W, light intensity S;

[0014] A data processing module that receives the real-time data provided by the data acquisition module and performs cleaning, feature extraction, and data augmentation on the real-time data, where:

[0015] Cleaning process: removing outliers and filling in missing values for the real-time data collected by the data acquisition module;

[0016] Feature extraction: extracting key features from power operation data and environmental data;

[0017] Data augmentation: for the sample data of abnormal operation states of the power grid, using the adversarial network model algorithm to generate synthetic samples;

[0018] A model construction and inference module that receives the feature data provided by the data processing module, constructs a machine learning model to predict the stability of the power grid. The feature data refers to the statistical and time series feature set obtained through the feature extraction stage;

[0019] An anomaly detection and warning module, based on the prediction results of the model construction and inference module, detects abnormal states and generates stability warnings, where:

[0020] Anomaly detection is calculated through the reconstruction error of the AutoEncoder, and its formula is:

[0021]

[0022] In the formula, L reconstruct is a loss function that measures the difference between the original input data x and the reconstructed data generated by the model. x is the input feature vector, and

[0023] Early warning generation: Set multi-level early warnings according to the risk scores of the power grid grids;

[0024] Intelligent regulation module: Based on the results of the anomaly detection and early warning modules, optimize the load distribution strategy of the power grid based on reinforcement learning. Its reinforcement learning reward function is:

[0025] R t = -(∑|ΔV t | + ∑|ΔL t |),

[0026] In the formula, R t is the reward value, ΔV t is the voltage deviation at time t, and ΔL t is the load fluctuation at time t.

[0027] ∑|ΔV t | is the sum of the absolute values of the changes in the relevant variable V in the time step t,

[0028] ∑|ΔL t | is the sum of the absolute values of the changes in the relevant variable L in the time step t;

[0029] Interaction and visualization module: Used to dynamically display the real-time power grid operation status, stability score, and load distribution strategy, specifically including:

[0030] Graphical display of the real-time power grid operation status, based on the real-time changes in voltage, current, power, and environmental data;

[0031] Power grid stability score, showing the stability indicators predicted by the model;

[0032] Dynamic adjustment plan and optimization process of the load distribution strategy.

[0033] Preferably, in the data processing module, feature extraction includes:

[0034] Load volatility:

[0035] In the formula, L t represents the load at time t, Lt-1 The load at time t-1

[0036] Power factor:

[0037] In the formula, P represents active power and Q represents reactive power;

[0038] Temperature-load coupling characteristic: TLoad = T t ·L t ,

[0039] In the formula, T t represents the temperature at time t, and L t represents the load at time t.

[0040] Preferably, the model construction and inference module includes a time series analysis sub-module and a topological feature extraction sub-module:

[0041] The time series analysis sub-module receives the time series feature data provided by the data processing module and extracts the time series dynamic characteristics of the power grid using the Attention-LSTM model. The formula is:

[0042] Hidden state:

[0043] h t = o t ⊙tanh(f t ⊙c t-1 + i t ⊙tanh(W c x t + U c h t-1 + b c ),

[0044] In the formula, h t is the hidden state at time step t, x t is the input feature vector at time t, i t , f t , o t are the activation values of the input gate, forget gate, and output gate in sequence. tanh is the hyperbolic tangent activation function, c t-1 is the memory cell of the previous time step, h t-1 is the hidden state at time step t-1, W c is the weight matrix input to the candidate memory, U c is the weight matrix from the previous hidden state to the candidate memory, and b c is the bias vector of the candidate memory;

[0045] Attention weight:

[0046] where α t is the attention weight at time t, W a is the attention parameter, h t is the hidden state at time step t, h j is the hidden state at time step j, exp is the exponential function, and n represents the total number of time steps.

[0047] Preferably, the topology feature extraction sub-module receives the power grid topology data provided by the data processing module and extracts the topology features of the power grid using a graph neural network model. The formula is:

[0048]

[0049] where represents the feature of node v at the k-th layer, is the set of neighbor nodes of node v, c v,u is the normalization coefficient, σ is the activation function, is the representation of node v at the (k + 1)-th layer, W (k) is the weight matrix at the k-th layer.

[0050] Preferably, in the anomaly detection and warning module, the power grid stability scoring algorithm is based on the output results of the model construction and inference module and the time series analysis sub-module, and calculates the risk score by combining node-level features. The specific algorithm formula is:

[0051]

[0052] where S grid represents the risk score of the grid, N is the total number of all nodes in the power grid, is the stability score of node i;

[0053] If S grid ≥ 0.8, it indicates that the risk of the current grid is low risk,

[0054] If 0.5 ≤ S grid < 0.8, it indicates that the risk of the current grid is medium risk,

[0055] If S grid < 0.5, it indicates that the risk of the current grid is high risk.

[0056] Preferably, in the data processing module, the real-time data collected by the data acquisition module is enhanced through the adversarial network model algorithm. The optimization formulas for its generator G and discriminator D are:

[0057]

[0058] Wherein, G is the generator, D is the discriminator, z is the random noise, and x is the real sample.

[0059] The real data x comes from the real data distribution p data (x), z is the input noise of the generator, logD(x) represents the logarithm of the classification probability of the discriminator D for the real data x, and p z (z) is the noise distribution.

[0060] log(1 - D(G(z))) is the logarithm of the complementary probability of the classification probability of the discriminator D for the generated data G(z). represents optimizing the generator G. represents optimizing the discriminator D.

[0061] Preferably, the intelligent regulation module optimizes the load distribution strategy based on the deep Q - network, and its Q - value update formula is:

[0062]

[0063] Wherein, Q(s t , a t ) is the Q - value of the state s t and the action a t , α is the learning rate, γ is the discount factor, and R t is the immediate reward received at the current time step t. represents the maximum reward when determining the action according to the optimal strategy in the state s t+1 , s t is the state at the current time step t, a t is the state at the current time step t, and s t+1 is the state at the next time step t + 1.

[0064] Preferably, the Attention - LSTM model in the time - series analysis sub - module outputs weighted features based on the attention mechanism:

[0065] h att =∑ t α t *h t ,

[0066] Wherein, h att is the weighted time - series feature, α t is the attention weight, and h t is the hidden state.

[0067] Preferably, the functions of the interaction and visualization module include:

[0068] Real - time status display, dynamically showing the real - time data of grid equipment and external systems.

[0069] Stability score and early warning display, showing the stability score and early warning level of the power grid;

[0070] Topological map dynamic update, highlighting abnormal node and edge information;

[0071] Load distribution suggestions, providing optimized load regulation suggestions.

[0072] A power grid stability prediction method based on machine learning, including:

[0073] Step 1: Collect real-time data from power grid equipment and the external environment, align the data according to the time stamp to form a time series data set, and use the collected real-time data for subsequent processing and analysis to form an input data matrix;

[0074] Step 2: Clean, extract features and perform data augmentation on the time series data generated in the data collection step, and the feature matrix after data processing is passed to Step 3;

[0075] Step 3: Use the feature matrix generated in Step 2 to construct a power grid stability prediction model through time series analysis and topological feature extraction model. After the power grid stability prediction model is fused, the stability scores of each node and the overall grid score are output;

[0076] Step 4: Receive the stability scores generated in Step 3, detect the abnormal state of the power grid and generate stability early warnings, and set multi-level early warning rules based on the overall grid score, and transfer the risk level to Step 5;

[0077] Step 5: Combine the risk level generated in Step 4, use reinforcement learning to optimize the power grid load distribution strategy, learn the optimal load distribution strategy through a deep Q network, dynamically adjust the power generation power and load distribution, and transfer the optimized strategy to Step 6;

[0078] Step 6: Receive the load distribution strategy generated in Step 5 and the results of the abnormal detection and early warning steps.

[0079] The present invention provides a power grid stability prediction system and method based on machine learning. It has the following

[0080] Beneficial effects:

[0081] 1. In the prediction of power grid stability, the present invention realizes the comprehensive modeling of the complex dynamic behavior of the power grid through the combination of Attention-LSTM and graph neural network. Attention-LSTM focuses on extracting the temporal dynamic characteristics of power grid operation, and can focus on the data changes at key time points. The graph neural network captures the global characteristics of the node and connection relationships in the power grid topology, reveals the complex associations between power grid devices, and the synergistic effect between them overcomes the problem of the low processing ability of traditional single modeling methods for dynamic time series or topological structures, enabling the power grid stability prediction model to reflect time dynamic changes and consider spatial topological characteristics, with significant innovation and uniqueness.

[0082] 2. The present invention solves the problem of the scarcity of abnormal category samples in power grid data by introducing a generative adversarial network. The generative adversarial network model can generate synthetic data highly similar to the actual abnormal state, supplement the unbalanced abnormal samples in the training dataset, enhance the generalization ability of the model and the recognition ability of abnormal states, and the generative adversarial network technology can generate a realistic data distribution, showing strong ability in dealing with rare or unseen abnormal events, significantly improving the prediction accuracy and robustness of the model for power grid abnormal states, and enhancing the innovation of the system.

[0083] 3. The present invention provides a clear classification scheme of low risk, medium risk and high risk through a multi-level early warning generation mechanism based on power grid stability scoring, provides fine-grained risk assessment support for power grid management, dynamically calculates the overall operation state of the power grid, combines the stability scores of each node to identify potential risk sources, generates clear early warning levels, helps managers quickly identify problems, provides targeted input data for the subsequent intelligent regulation module, and greatly enhances the innovation and application value of power grid risk management.

[0084] 4. The present invention realizes the intelligent regulation of power grid load distribution through reinforcement learning technology. The reward function is designed with the goal of minimizing voltage deviation and load fluctuation, making the power grid operation always tend to a stable state, and reinforcement learning can continuously optimize the strategy based on real-time data, adaptively adjust the load distribution scheme, dynamically respond to the unstable state of the power grid, and can quickly generate the optimal load allocation scheme when dealing with sudden anomalies, effectively reducing the spread of unstable risks, and significantly enhancing the creativity and intelligent level of the system. Brief Description of the Drawings

[0085] Figure 1 is the system diagram of the present invention;

[0086] Figure 2 is the flow chart of the present invention. Detailed Embodiments

[0087] To enable those skilled in the art to understand the solution of the present invention, the following will clearly and completely describe the technical solution in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, rather than all, of the embodiments of the present invention. Based on the embodiments in the present invention, other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention.

[0088] The following will describe the present invention in detail with reference to the accompanying drawings:

[0089] Embodiment:

[0090] Please refer to the attached Figure 1 and the attached Figure 2 , an embodiment of the present invention provides a power grid stability prediction system based on machine learning, including:

[0091] A data acquisition module for acquiring real-time data of power grid equipment and external systems. The acquired real-time data includes power operation data and environmental data:

[0092] Power operation data: voltage V, current I, frequency f, active power P, reactive power Q, load L;

[0093] Environmental data: temperature T, humidity H, wind speed W, light intensity S;

[0094] A data processing module that receives the real-time data provided by the data acquisition module, and performs cleaning, feature extraction, and data augmentation on the real-time data, where:

[0095] Cleaning process: removing outliers and filling in missing values for the real-time data acquired by the data acquisition module;

[0096] Feature extraction: extracting key features from power operation data and environmental data;

[0097] Data augmentation: for sample data in abnormal power grid operation states, using the adversarial network model algorithm to generate synthetic samples;

[0098] A model construction and inference module that receives the feature data provided by the data processing module, constructs a machine learning model to predict the stability of the power grid, and the feature data refers to the statistical and time series feature set obtained through the feature extraction stage;

[0099] An anomaly detection and warning module, based on the prediction results of the model construction and inference module, detects abnormal states and generates stability warnings, where:

[0100] Anomaly detection: calculating through the reconstruction error of the AutoEncoder, and its formula is:

[0101]

[0102] In the formula, L reconstruct is a loss function that measures the difference between the original input data x and the reconstructed data x^ generated by the model. x is the input feature vector, and x^ is the reconstructed feature vector;

[0103] Early warning generation: Set multiple levels of early warnings according to the risk scores of the power grid grids;

[0104] Intelligent regulation module: According to the results of the anomaly detection and early warning module, optimize the load distribution strategy of the power grid based on reinforcement learning. Its reinforcement learning reward function is:

[0105] R t = -(∑|ΔV t | + ∑|ΔL t |),

[0106] In the formula, R t is the reward value, ΔV t is the voltage deviation at time t, and ΔL t is the load fluctuation at time t,

[0107] ∑|ΔV t | is the sum of the absolute values of the changes in the relevant variable V in the time step t,

[0108] ∑|ΔL t | is the sum of the absolute values of the changes in the relevant variable L in the time step t;

[0109] Interaction and visualization module: Used to dynamically display the real-time power grid operation status, stability score, and load distribution strategy, specifically including:

[0110] Graphical display of the real-time power grid operation status, based on the real-time changes in voltage, current, power, and environmental data;

[0111] Power grid stability score, displaying the stability indicators predicted by the model;

[0112] Dynamic adjustment plan and optimization process of the load distribution strategy.

[0113] The data acquisition module provides a comprehensive view of the power grid operation status by obtaining power operation data and environmental data in real time. The power operation data can reflect the working status and load conditions of power grid equipment, while the environmental data captures the impact of external conditions on the power grid operation. The multi-source data acquisition method ensures the comprehensiveness and diversity of the input data, provides a reliable basis for subsequent data processing and model prediction, and significantly improves the system's perception ability of the complex dynamics of the power grid;

[0114] The data processing module significantly improves the quality of the model input data through cleaning, feature extraction, and data augmentation. Cleaning eliminates outliers and fills in missing data, improving data accuracy and integrity. Feature extraction is used to extract key features from the original data, enabling the model to accurately capture the core dynamics of power grid operation. Data augmentation uses generative adversarial networks to generate synthetic samples of rare categories, solves the problem of insufficient abnormal samples, and enhances the generalization ability of the model and the recognition ability for rare events.

[0115] The model construction and inference module accurately predicts the operating state of the power grid by combining time series analysis and power grid topology characteristics modeling. The combination of spatio-temporal characteristics enables the prediction model to comprehensively reflect the operating characteristics of the power grid, improves the accuracy and applicability of power grid stability prediction, and provides reliable prediction results for subsequent modules.

[0116] The anomaly detection and early warning module accurately detects abnormal states of the power grid through reconstruction error calculation. At the same time, it generates multi-level early warning information based on power grid risk scores. The anomaly detection module uses an AutoEncoder to reconstruct the input data, calculates the differences between data to quantify abnormal states, effectively identifies potential risk sources, helps managers quickly identify problems, provides targeted data input for the subsequent regulation module, and significantly improves the power grid risk response ability and safety management level.

[0117] The intelligent regulation module is based on reinforcement learning technology and uses real-time data to optimize the load distribution strategy of the power grid, dynamically adjusting the operating state of the power grid. It can learn and adapt to the changing characteristics of the power grid in real time, generate the optimal load distribution strategy, especially showing a response ability when dealing with sudden anomalies, effectively reducing the spread of unstable risks, and providing innovative intelligent regulation means for the stable operation of the power grid.

[0118] The interaction and visualization module displays the operating state, stability score, and load distribution strategy of the power grid through a dynamic dashboard, enabling users to intuitively understand the real-time situation and potential risks of the power grid. Through visual design, the interaction module can significantly improve the operability and usability of the system, help users quickly make judgments and adjustments, and provide convenience for the efficient management of the power grid.

[0119] In summary, each module plays an important role in the various links of data collection, processing, modeling, detection, regulation, and display, and works together to form a power grid stability prediction system with perfect functions and excellent performance, which can comprehensively improve the safety, stability, and intelligent level of power grid operation.

[0120] In the data processing module, feature extraction includes:

[0121] Load volatility:

[0122] Wherein, L t represents the load at time t, and L t-1 represents the load at time t - 1;

[0123] Power factor:

[0124] Wherein, P represents the active power and Q represents the reactive power;

[0125] Temperature - load coupling characteristic: TLoad = T t ·L t ,

[0126] Wherein, T t represents the temperature at time t, and L t represents the load at time t.

[0127] By calculating the load volatility, the change amplitude of the grid load between adjacent time points can be quantified, which directly reflects the dynamic fluctuation of the grid operating load, helps to identify abnormal fluctuations or drastic changes in the grid. In addition, the load volatility provides short - term dynamic change information of the grid operation for the model, enabling the model to keenly capture the trend of abnormal load increase or decrease and enhancing the prediction ability for potential unstable states;

[0128] By calculating the power factor, the ratio between the active power and the apparent power in the grid is reflected. Extracting this characteristic can help the system identify inefficient operating states or losses in power transmission, providing an important basis for grid efficiency optimization and abnormal state identification;

[0129] By calculating the temperature - load coupling characteristic, the influence degree of the external environmental temperature on the load can be characterized. Through the temperature - load coupling characteristic, the system can comprehensively consider the role of environmental factors in grid stability, providing more accurate inputs for prediction and regulation.

[0130] The extraction of load volatility, power factor, and temperature - load coupling characteristic enhances the feature expression ability of data from the dimensions of dynamic change, grid efficiency, and environmental impact, then captures the key information of the grid operating state, provides high - quality input data for the model, and further significantly improves the accuracy, robustness, and applicability of grid stability prediction.

[0131] The model construction and inference module includes a time - series analysis sub - module and a topological feature extraction sub - module:

[0132] The time - series analysis sub - module receives the time - series feature data provided by the data processing module and extracts the time - series dynamic characteristics of the grid using the Attention - LSTM model. The formula is:

[0133] Hidden state:

[0134] h t = o t ⊙ tanh(f t ⊙ c t-1 + i t ⊙ tanh(W c x t + U c h t-1 + b c ))

[0135] where h t is the hidden state at time step t, x t is the input feature vector at time t, i t , f t , o t are the activation values of the input gate, forget gate, and output gate in sequence, tanh is the hyperbolic tangent activation function, c t-1 is the memory cell at the previous time step, h t-1 is the hidden state at time step t - 1, W c is the weight matrix input to the candidate memory, U c is the weight matrix from the previous hidden state to the candidate memory, b c is the bias vector of the candidate memory;

[0136] Attention weight:

[0137] where α t is the attention weight at time t, W a is the attention parameter, h t is the hidden state at time step t, h j is the hidden state at time step j, exp is the exponential function, and n is the total number representing the time steps;

[0138] The topological feature extraction sub-module receives the power grid topological data provided by the data processing module and extracts the topological features of the power grid using a graph neural network model. The formula is:

[0139]

[0140] where represents the feature of node v at the k-th layer, is the set of neighbor nodes of node v, c v,u is the normalization coefficient, σ is the activation function, is the representation of node v at the (k + 1)-th layer, and W (k) is the weight matrix at the k-th layer.

[0141] The time series analysis sub-module can effectively capture the temporal dependencies in the power grid operation, enabling the model to have strong modeling capabilities for dynamic behaviors such as load fluctuations and equipment operation trends.

[0142] With the enhancement of the attention mechanism, the model can automatically focus on the time points that are most critical to the current prediction in the time series, further improving the model's sensitivity to important temporal changes, reducing interference from irrelevant information, and thus enhancing the accuracy of power grid state prediction.

[0143] In summary, the time series analysis sub-module can dynamically capture the temporal characteristics in the power grid operation, and through the attention mechanism, it highlights the influence of key time points, providing strong support for the short-term dynamic prediction of the power grid;

[0144] The topological feature extraction sub-module is crucial for complex power grid networks. Especially when analyzing the coordinated operation between devices or the fault propagation path, through iterative updating of the features of each node in the network, the graph neural network can learn the topological structure characteristics of the entire power grid, making up for the deficiency of traditional time series models in depicting node associations, enabling the model to simultaneously focus on the local behaviors and overall operation states of the power grid;

[0145] Normalized weights enhance stability. Through the normalization coefficient, the model avoids the problem of feature imbalance caused by differences in the number of neighbor nodes during the feature aggregation process, thereby improving the robustness of modeling the complexity of the power grid structure.

[0146] In summary, the topological feature extraction sub-module can efficiently model the global characteristics of the power grid topology, especially excelling in capturing the associations, operation coordination, and fault propagation paths between devices, providing important support for the overall stability prediction of the power grid.

[0147] In the anomaly detection and early warning module, the power grid stability scoring algorithm formula is:

[0148]

[0149] In the formula, S grid represents the risk score of the grid, N is the total number of all nodes in the power grid, is the stability score of node i;

[0150] If S grid ≥0.8, it indicates that the risk of the current grid is low risk,

[0151] If 0.5 ≤ S grid <0.8, it indicates that the risk of the current grid is medium risk,

[0152] If S grid <0.5, it indicates that the risk of the current grid is high risk.

[0153] The scoring mechanism classifies the power grid into low-risk, medium-risk, and high-risk levels according to risk thresholds, enabling managers to quickly judge the current power grid status and grade the risk level. It provides fine-grained decision support for emergency response and optimized control, enhancing the flexibility of power grid operation management;

[0154] While calculating the global stability score, the algorithm retains the stability scores of each node. Then, by analyzing the distribution of single-node scores, it quickly locates potential high-risk nodes and regions, enabling the early warning mechanism to focus on the global score and penetrate to the node level, supporting accurate anomaly location and fault troubleshooting, and providing support for the refined management of power grid operation;

[0155] The power grid stability scoring mechanism provides clear and easy-to-understand quantitative indicators, presenting the complex power grid operation status through specific risk levels, helping managers intuitively understand the current risk status of the power grid. At the same time, it is displayed and analyzed in the visualization platform, providing a convenient tool for power grid monitoring and decision-making.

[0156] In the data processing module, the real-time data collected by the data acquisition module is enhanced through the adversarial network model algorithm. The optimization formulas for its generator G and discriminator D are as follows:

[0157]

[0158] In the formula, G is the generator, D is the discriminator, z is the random noise, x is the real sample,

[0159] The real data x comes from the real data distribution p data (x), z is the input noise of the generator, logD(x) represents the logarithm of the classification probability of the discriminator D giving the real data x, and p z (z) is the noise distribution,

[0160] log(1 - D(G(z))) is the logarithm of the complementary probability of the classification probability of the discriminator D giving the generated data G(z), Indicates optimizing the generator G, Indicates optimizing the discriminator D.

[0161] Through the generator G of the generative adversarial network, the system can learn based on the noise z and generate samples similar to the real data distribution. In the formula, the optimization objective of the generator indicates that the generator attempts to deceive the discriminator D and generate synthetic data of high quality and close to the real distribution, greatly enriching the diversity of the training data set. Especially in the case of scarce abnormal sample data, it can effectively solve the problem of unbalanced data distribution;

[0162] The generator G learns the real data distribution to generate realistic abnormal samples, supplementing the abnormal category samples that cannot be generated by traditional data augmentation methods. In combination with the optimization objective of the discriminator D, the system can ensure the authenticity and diversity of the generated samples, significantly improving the recognition ability of the subsequent model for rare abnormal states and enhancing the robustness and generalization ability of the system.

[0163] The adversarial training mechanism of the generative adversarial network enables the generator G and the discriminator D to dynamically adapt to changes in the data distribution. The generator continuously optimizes the quality of the generated samples, while the discriminator, by distinguishing real data from generated data, continuously improves its understanding of the data distribution, making the generative adversarial network perform excellently in dealing with complex distributions in power grid data and effectively avoiding the dependence on data distribution assumptions of traditional methods.

[0164] In summary, data augmentation through the generative adversarial network solves the problems of scarce abnormal samples and unbalanced data distribution, significantly improving the authenticity, diversity, and coverage rate of the generated samples. At the same time, the dynamic adaptive characteristics and flexibility of the generative adversarial network ensure that the data augmentation process can meet the requirements of different power grid scenarios, providing high-quality input data for model construction and inference. Ultimately, the overall performance and robustness of the power grid stability prediction system are improved.

[0165] The intelligent regulation module optimizes the load distribution strategy based on the deep Q-network, and its Q-value update formula is:

[0166]

[0167] where Q(s t ,a t ) is the Q-value of state s t and action a t , α is the learning rate, γ is the discount factor, R t is the immediate reward received at the current time step t, represents the maximum reward when determining the action according to the optimal strategy in state s t+1 , s t is the state at the current time step t, a t is the state at the current time step t, s t+1 is the state at the next time step t + 1.

[0168] It demonstrates strong dynamic regulation ability, weighing the current gain and future potential gain through the immediate reward and the discount factor, enabling the model to focus on the current state in load distribution and optimize the power grid operation stability. At the same time, through the determination of the optimal Q-values of states and actions, it can adaptively learn the dynamic characteristics of the power grid and adjust the load distribution in real time to minimize voltage deviation and load fluctuation.

[0169] Overall, this method endows power grid regulation with powerful intelligent and adaptive capabilities. Especially when dealing with sudden anomalies, it can quickly generate an optimal load distribution plan, significantly reduce the instability risk, and ensure the safe and efficient operation of the power grid.

[0170] The Attention-LSTM model in the time series analysis sub-module outputs weighted features based on the attention mechanism:

[0171] h att =∑ t α t *h t ,

[0172] In the formula, h att is the weighted time series feature, α t is the attention weight, and h t is the hidden state.

[0173] Generate the weighted time series feature z, where α is the attention weight and h t is the hidden state, which can dynamically focus on the time step features most important for the current task. The attention mechanism assigns weights according to the importance of each time step, enabling the model to avoid information dilution or forgetting when processing long time series data, significantly improving the ability to capture key time series dynamics, enhancing the model's understanding of complex power grid operating states, especially highlighting the impact of key time points during power grid load fluctuations or abnormal changes, and providing accurate and hierarchical input features for stability prediction.

[0174] The functions of the interaction and visualization module include:

[0175] Real-time status display, dynamically showing the real-time data of power grid equipment and external systems;

[0176] Stability score and early warning display, showing the stability score and early warning level of the power grid;

[0177] Dynamic update of the topology map, highlighting abnormal node and edge information;

[0178] Load distribution suggestions, providing optimized load regulation suggestions.

[0179] Through functions such as real-time status display, stability score and early warning display, dynamic update of the topology map, and load distribution suggestions, the interaction and visualization module provides users with an intuitive and comprehensive power grid operation monitoring and decision support platform. The real-time status display can dynamically present the operation data of power grid equipment and the external environment, enabling managers to quickly grasp the overall operation status of the power grid;

[0180] The display of the stability score and early warning level presents the complex risk information of the power grid in a simple and easy-to-understand form, helping managers quickly identify problems;

[0181] The topological graph is dynamically updated to highlight abnormal node and edge information, accurately locate potential risk areas or devices;

[0182] The load distribution suggestion is based on an optimized regulation strategy, providing users with specific and executable load adjustment plans.

[0183] Overall, this module greatly improves the visualization of power grid monitoring and regulation, provides an efficient and intuitive operation tool for power grid management, and improves the decision-making efficiency and response ability of users.

[0184] A power grid stability prediction method based on machine learning, including:

[0185] Step 1: Collect real-time data from power grid devices and the external environment, align the data according to timestamps to form a time series data set, and use the collected real-time data for subsequent processing and analysis to form an input data matrix;

[0186] Step 2: Clean, extract features and perform data augmentation on the time series data generated in the data collection step. The feature matrix after data processing is passed to Step 3;

[0187] Step 3: Use the feature matrix generated in Step 2 to construct a power grid stability prediction model through time series analysis and topological feature extraction. After the power grid stability prediction models are fused, the stability scores of each node and the overall grid score are output;

[0188] Step 4: Receive the stability scores generated in Step 3, detect the abnormal states of the power grid and generate stability warnings, and set multi-level warning rules based on the overall grid score, and transfer the risk level to Step 5;

[0189] Step 5: Combine the risk level generated in Step 4, use reinforcement learning to optimize the power grid load distribution strategy, learn the optimal load distribution strategy through a deep Q-network, dynamically adjust the power generation power and load distribution, and transfer the optimized strategy to Step 6;

[0190] Step 6: Receive the load distribution strategy generated in Step 5 and the results of the abnormal detection and warning step.

[0191] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A power grid stability prediction system based on machine learning, characterized in that: include: The data acquisition module is used to collect real-time data from power grid equipment and external systems. The collected real-time data includes power operation data and environmental data: The power operation data: voltage V, current I, frequency f, active power P, reactive power Q, load L; The environmental data: temperature T, humidity H, wind speed W, light intensity S; The data processing module receives the real-time data provided by the data acquisition module, and performs cleaning, feature extraction and data enhancement on the real-time data, including: Cleaning processing, removing abnormal values ​​and filling missing values ​​from the real-time data collected by the data collection module; Feature extraction, extracting key features from power operation data and environmental data; Data enhancement: for sample data of abnormal power grid operation status, an adversarial network model algorithm is used to generate synthetic samples; The model building and reasoning module receives the feature data provided by the data processing module and builds a machine learning model to predict the stability of the power grid. The feature data refers to the statistical and time series feature set obtained through the feature extraction stage. The anomaly detection and warning module detects abnormal conditions and generates stability warnings based on the prediction results of the model building and reasoning modules, including: Anomaly detection is calculated through the reconstruction error of AutoEncoder, and its formula is: Where, L reconstruct is a measure of the original input data x and the reconstructed data generated by the model The loss function of the difference between , x is the input feature vector, To reconstruct the feature vector; Warning generation, setting multi-level warnings based on the risk scores of power grids; The intelligent control module optimizes the load distribution strategy of the power grid based on reinforcement learning according to the results of the anomaly detection and early warning module. Its reinforcement learning reward function is: R t =-(∑|ΔV t |+∑|ΔL t |), In the formula, R t is the reward value, ΔV t is the voltage deviation at time t, ΔL t is the load fluctuation at time t, ∑|ΔV t | is the sum of the absolute values ​​of the changes in the relevant variables V in time step t, ∑|ΔL t | is the sum of the absolute values ​​of the changes in the relevant variables L in time step t; The interactive and visualization module is used to dynamically display the real-time grid operation status, stability score and load distribution strategy, including: Graphical display of real-time grid operation status, based on real-time changes in voltage, current, power and environmental data; Grid stability score, showing the stability indicators predicted by the model; Dynamic adjustment scheme and optimization process of load distribution strategy.

2. The power grid stability prediction system based on machine learning according to claim 1, characterized in that: In the data processing module, feature extraction includes: Load fluctuation rate: Where, L t represents the load at time t, L t-1 represents the load at time t-1; Power Factor: In the formula, P represents active power and Q represents reactive power; Temperature-load coupling characteristics: TLoad = T t ·L t , Where, T t represents the temperature at time t, L t Represents the load at time t.

3. The power grid stability prediction system based on machine learning according to claim 1, characterized in that: The model building and reasoning module includes a time series analysis submodule and a topological feature extraction submodule: The time series analysis submodule receives the time series feature data provided by the data processing module and uses the Attention-LSTM model to extract the time series dynamic characteristics of the power grid. The formula is: Hidden state: h t =o t ⊙tanh(f t ⊙c t-1 +i t ⊙tanh(W c x t +U c h t-1 +b c )), In the formula, h t is the hidden state at time step t, x t is the input feature vector at time t, i t 、f t , o t are the activation values ​​of the input gate, forget gate, and output gate, respectively. Tanh is the hyperbolic tangent activation function. c t-1 is the memory unit of the previous time step, h t-1 is the hidden state at time step t-1, W c is the weight matrix input to the candidate memory, U c is the weight matrix from the previous hidden state to the candidate memory, b c is the bias vector of the candidate memory; Attention weights: In the formula, α t is the attention weight at time t, W a is the attention parameter, h t is the hidden state at time step t, h j is the hidden state of time step j, exp is the exponential function, and n is the total number of time steps.

4. The power grid stability prediction system based on machine learning according to claim 3, characterized in that: The topology characteristic extraction submodule receives the power grid topology data provided by the data processing module and uses the graph neural network model to extract the topology characteristics of the power grid. The formula is: In the formula, represents the feature of node v at the kth layer, is the set of neighbor nodes of node v, c v,u is the normalization coefficient, σ is the activation function, is the representation of node v at the k+1th layer, W (k) is the weight matrix of the kth layer.

5. The power grid stability prediction system based on machine learning according to claim 1, characterized in that: In the anomaly detection and early warning module, the grid stability scoring algorithm is based on the output results of the model building and reasoning module and the time series analysis submodule, combined with the node level characteristics to calculate the risk score. The specific algorithm formula is: In the formula, S grid represents the risk score of the grid, N is the total number of nodes in the grid, Score the stability of node i; If S grid When ≥0.8, it means the risk of the current grid is low. If 0.5≤S grid When <0.8, it means the risk of the current grid is medium risk. If S grid When <0.5, it means that the risk of the current grid is high.

6. The power grid stability prediction system based on machine learning according to claim 1, characterized in that: In the data processing module, the real-time data collected by the data collection module is enhanced by the adversarial network model algorithm, and the optimization formulas of the generator G and the discriminator D are: In the formula, G is the generator, D is the discriminator, z is random noise, and x is the real sample. E x~pdata(x) The real data x comes from the real data distribution p data (x), z is the input noise of the generator, logD(x) represents the logarithm of the classification probability of the real data x given by the discriminator D, and p z (z) is the noise distribution, log(1-D(G(z))) is the logarithm of the complementary probability of the classification probability of the generated data G(z) given by the discriminator D. represents the optimization generator G, Denotes the optimized discriminator D.

7. The power grid stability prediction system based on machine learning according to claim 1, characterized in that: The intelligent control module optimizes the load distribution strategy based on the deep Q network, and its Q value update formula is: In the formula, Q(s t ,a t ) is state s t and action a t Q value, α is the learning rate, γ is the discount factor, R t is the immediate reward received at the current time step t, Indicates that in state s t+1 Determine the maximum reward when taking an action according to the optimal strategy, s t is the state of the current time step t, a t is the state of the current time step t, s t+1 is the state at the next time step t+1.

8. The power grid stability prediction system based on machine learning according to claim 3, characterized in that: The Attention-LSTM model in the time series analysis submodule outputs weighted features based on the attention mechanism: h att =∑ t a t *h t , In the formula, h att is the weighted time series feature, α t is the attention weight, h t In hidden state.

9. The power grid stability prediction system based on machine learning according to claim 1, characterized in that: The functions of the interaction and visualization module include: Real-time status display, dynamically displaying real-time data of power grid equipment and external systems; Stability score and early warning display, showing the stability score and early warning level of the power grid; The topology map is dynamically updated to highlight abnormal nodes and edge information; Load distribution suggestions, providing optimized load control suggestions.

10. A method for predicting power grid stability based on machine learning, according to a system for predicting power grid stability based on machine learning according to any one of claims 1 to 9, characterized in that: include: Step 1: Collect real-time data from power grid equipment and external environment, align the data according to timestamps to form a time series data set, and use the collected real-time data for subsequent processing and analysis to form an input data matrix; Step 2: Clean, extract features and perform data enhancement on the time series data generated in the data collection step. The feature matrix after data processing is passed to step 3. Step 3: Using the feature matrix generated in step 2, a power grid stability prediction model is constructed through time series analysis and topological characteristic extraction model. After the power grid stability prediction model is integrated, the stability score of each node and the overall grid score are output; Step 4: Receive the stability score generated in step 3, detect the abnormal state of the power grid and generate a stability warning, set a multi-level warning rule based on the overall grid score, and pass the risk level to step 5; Step 5: Combined with the risk level generated in step 4, use reinforcement learning to optimize the grid load distribution strategy, learn the optimal load distribution strategy through the deep Q network, dynamically adjust the power generation and load distribution, and pass the optimized strategy to step 6; Step 6: Receive the load distribution strategy generated in step 5 and the results of the anomaly detection and early warning step.

Citation Information

Cited By

  • Simulation method and device for newly added grid connection of photovoltaic energy storage system and medium

    CN120280996A