Power grid system emergency resource demand prediction method based on machine learning

Through machine learning-based methods, the key features of the power grid system are extracted and integrated prediction models are constructed, which solves the problem that traditional methods are difficult to adapt to complex emergency environments, and the accurate prediction and real-time allocation of emergency resource requirements of the power grid system are achieved, ensuring the stability of the power grid run.

CN119027275APending Publication Date: 2024-11-26SHANDONG LUNENG SOFTWARE TECH

Patent Information

Application Number
CN202411093515.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The traditional method of emergency resource demand prediction for power grid systems relies on expert experience and simple statistical analysis, and it is difficult to adapt to complex and changeable emergency environments and cannot achieve real-time and accurate resource demand prediction.

Method used

Using a machine learning-based approach, we use a recursive feature elimination algorithm to extract key features by collecting and preprocessing the historical operation data, device status data and environmental data of the power grid system, and use a recursive feature elimination algorithm to build emergency resource demand forecasts in combination with integrated random forest, XGBoost and LightGBM algorithms. The model uses gradient descent method to tune the model parameters to generate a real-time resource allocation plan.

Benefits of technology

It improves the accuracy and robustness of emergency resource demand forecasting, realizes real-time resource allocation, and enhances the stability and safety of power grid operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0004987225870000036
    Figure BDA0004987225870000036
  • Figure BDA0004987225870000061
    Figure BDA0004987225870000061
  • Figure FDA0004987225860000021
    Figure FDA0004987225860000021
Patent Text Reader

Abstract

The invention belongs to the field of power grid system emergency management, and particularly relates to a power grid system emergency resource demand prediction method based on machine learning. According to the method, historical operation data, equipment state data and environment data of a power grid system are collected, firstly, the data are cleaned and normalized, and noise and abnormal values are removed; features related to emergency resource demands are extracted from the preprocessed data, and key features are selected by using a recursive feature elimination algorithm; and then, integrating a random forest, an XGBoost algorithm and a LightGBM algorithm to construct an emergency resource demand prediction model. And the model parameters are subjected to gradient descent optimization, so that the prediction accuracy is further improved. And finally, inputting power grid data collected in real time into the trained model, generating an emergency resource allocation scheme, and assisting a decision maker to perform scientific and reasonable resource allocation. Compared with a traditional method, the method can achieve the real-time prediction of the emergency resource demands, and assists a decision maker to carry out the scientific and reasonable resource allocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of power grid system emergency management, and in particular relates to a method for predicting emergency resource demand of a power grid system based on machine learning. Background Art

[0002] The power grid system is an important national infrastructure, and the stability of the power grid operation is directly related to the national economy and people's livelihood. When emergencies such as natural disasters and equipment failures occur, timely and accurate prediction of emergency resource demand is crucial to ensure the stable operation of the power grid. Traditional prediction methods rely on expert experience and simple statistical analysis, which are difficult to adapt to complex and changeable emergency environments. With the development of machine learning technology, methods based on machine learning have shown good application prospects in the field of prediction. To this end, the present invention proposes a method for predicting emergency resource demand for a power grid system based on machine learning, which aims to achieve real-time prediction of emergency resource demand and assist decision makers in scientific and reasonable resource allocation. Summary of the invention

[0003] In view of the technical problems existing in the above-mentioned traditional prediction methods, the present invention proposes a method for predicting emergency resource demand of power grid system based on machine learning, which comprises the following steps:

[0004] S1. First, collect the historical operation data, equipment status data and environmental data of the power grid system, clean and normalize the data, and remove noise and outliers;

[0005] S2, secondly, extract features related to emergency resource demand from the preprocessed data, and use a recursive feature elimination algorithm to select the key features that best represent the emergency resource demand;

[0006] S3, then select the integrated random forest algorithm, XGBoost algorithm and LightGBM algorithm to build an emergency resource demand prediction model, divide the historical data into training sets and test sets according to a certain ratio, and train and verify the model;

[0007] S4. Then use the gradient descent method to tune the model parameters, use the validation set data to evaluate the prediction performance of the model, and adjust the model according to the evaluation results;

[0008] S5. Finally, the real-time data is input into the trained model to predict the emergency resource demand of the power grid system. Based on the prediction results, an emergency resource allocation plan is generated to assist decision makers in resource allocation.

[0009] Preferably, the steps of using the recursive feature elimination algorithm in step S2 are as follows:

[0010] S21, first initialize the model and select a base model, which will be used to evaluate the importance of each feature;

[0011] S22, then use all the features to train the base model to obtain the weight or importance score of each feature;

[0012] S23, then sort the features according to the model weight or feature importance score, and the features with smaller absolute weight values ​​or lower importance scores are considered to have less impact on the prediction;

[0013] S24, followed by feature elimination, removing the features with the lowest scores, usually one feature at a time;

[0014] S25, then repeat the training, use the remaining features to retrain the model, and re-evaluate the importance of the features;

[0015] S26, then repeat the feature scoring and feature elimination steps until a predetermined number of features is reached;

[0016] S27. Finally, the best feature is selected. After multiple rounds of iterations, the feature finally retained is the most useful feature for prediction selected by the recursive feature elimination algorithm.

[0017] Preferably, step S3 integrates three algorithms: random forest algorithm, XGBoost algorithm and LightGBM algorithm. Constructing an emergency resource demand prediction model is to give full play to the advantages of the three models. The random forest is composed of multiple decision trees, and its prediction result is the average or voting result of all decision tree results. The formula is: in is the prediction result of random forest, N is the number of decision trees, T i (x) is the prediction of the i-th decision tree for the input x; XGBoost reduces the prediction error by gradually adding new trees, and its formula is: in is the prediction result of XGBoost, K is the number of trees, and f k (x) is the prediction of the kth tree for the input x; LightGBM uses a decision tree method based on gradient boosting, which is similar to XGBoost but more efficient. Its formula is: in is the prediction result of LightGBM, M is the number of trees, g m (x) is the prediction of the mth tree for the input x; the input of the meta-model is set as the prediction result of the basic model, and the meta-model predicts the final result based on the combination of inputs: in represents the final prediction result, w 0 is the bias term of the metamodel, w 1 、w 2 、w 3is the weight parameter of the meta-model.

[0018] Preferably, the step S4 uses a gradient descent method to tune the model parameters, and the steps are as follows:

[0019] S41, first the forward propagation calculates the predicted value, in is the basic model prediction value of the i-th sample;

[0020] S42, then calculate the MSE loss: Where N is the number of samples, is the predicted value, y (i) is the true value;

[0021] S43. Next, calculate the gradient of the loss function for each parameter:

[0022] S44, then update the parameters:

[0023] Where α is the learning rate, which controls the step size of each update;

[0024] S45. Secondly, in each iteration, repeat forward propagation, calculate loss, calculate gradient and update parameters until the maximum number of iterations is reached;

[0025] S46. Finally, evaluate the model on the test set and calculate the accuracy index of the final model.

[0026] Compared with the prior art, the advantages and positive effects of the present invention are:

[0027] The recursive feature elimination algorithm is used to extract key features from the preprocessed data, which effectively reduces the data dimension and improves the training efficiency of the model. In addition, by integrating three advanced machine learning algorithms, random forest, XGBoost and LightGBM, to build an emergency resource demand forecasting model, the advantages of each algorithm can be fully utilized to improve the accuracy and robustness of the forecast. In addition, the model parameters are tuned by the gradient descent method to further optimize the model performance. DETAILED DESCRIPTION

[0028] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described below in conjunction with embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0029] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways than those described herein. Therefore, the present invention is not limited to the specific embodiments of the following disclosure.

[0030] Embodiment, the power grid system is an important national infrastructure, and the stability of the power grid operation is directly related to the national economy and people's livelihood. When an emergency occurs, timely and accurate prediction of emergency resource demand is crucial to ensure the stable operation of the power grid. Traditional prediction methods rely on expert experience and simple statistical analysis, which are difficult to adapt to complex and changeable emergency environments. Therefore, the present invention proposes a method for predicting emergency resource demand for a power grid system based on machine learning, which aims to achieve real-time prediction of emergency resource demand and assist decision makers in scientific and reasonable resource allocation.

[0031] First, the historical operation data, equipment status data and environmental data of the power grid system are collected, and machine learning algorithms are used to identify and remove outliers and erroneous records in the data; the normalization processing technology adopts Min-Max normalization to scale the data to the same range in proportion to eliminate dimensional differences; the denoising technology uses the wavelet transform method to remove random noise in the data, thereby improving the quality and reliability of the data and providing a clean and unified data foundation for subsequent feature extraction and model training.

[0032] Secondly, extract features related to emergency resource needs from the preprocessed data, and use the recursive feature elimination algorithm. Compared with traditional methods, the recursive feature elimination algorithm can effectively select important features, consider the relationship between features, reduce the risk of overfitting, and improve the model interpretability and efficiency. The specific steps are to first initialize the model and select a base model, which will be used to evaluate the importance of each feature; then use all features to train the base model to obtain the weight or importance score of each feature; then sort the features according to the model weight or feature importance score, and the features with smaller absolute weight values ​​or lower importance scores are considered to have less impact on the prediction; followed by feature elimination, remove the features with the lowest scores, usually one feature at a time; then repeat the training, use the remaining features to retrain the model, and re-evaluate the importance of the features; then repeat the feature scoring and feature elimination steps until the predetermined number of features is reached; finally, select the best feature. After multiple rounds of iterations, the features finally retained are the most useful features for prediction selected by the recursive feature elimination algorithm.

[0033] Then we choose to integrate the three algorithms of random forest algorithm, XGBoost algorithm and LightGBM algorithm to build an emergency resource demand prediction model. This is to give full play to the stability of random forest, the feature processing ability of XGBoost and the high efficiency of LightGBM. It can combine the advantages of the three to improve the accuracy, stability and efficiency of the prediction model and more accurately predict the demand for emergency resources. The random forest consists of multiple decision trees, and its prediction result is the average or voting result of all decision tree results. Its formula is: in is the prediction result of random forest, N is the number of decision trees, T i (x) is the prediction of the i-th decision tree for the input x; XGBoost reduces the prediction error by gradually adding new trees, and its formula is: in is the prediction result of XGBoost, K is the number of trees, and f k (x ) is the prediction of the kth tree for the input x; LightGBM uses a decision tree method based on gradient boosting, which is similar to XGBoost but more efficient. Its formula is: in is the prediction result of LightGBM, M is the number of trees, g m (x) is the prediction of the mth tree for the input x; the input of the meta-model is set as the prediction result of the basic model, and the meta-model predicts the final result based on the combination of inputs: in represents the final prediction result, w 0 is the bias term of the metamodel, w 1 、w 2 、w 3 is the weight parameter of the meta-model.

[0034] Then, the gradient descent method is used to tune the model parameters. Its advantages are high computational efficiency, easy implementation, and ability to handle large-scale data sets. The gradient descent method updates the parameters iteratively, making the amount of computation at each step relatively small, and is suitable for different types of models. In addition, the gradient descent method has strong versatility and can be combined with different optimization algorithms and regularization techniques to improve the performance and generalization ability of the model. First, the forward propagation calculates the predicted value. in is the base model prediction value of the i-th sample; then calculate the MSE loss: Where N is the number of samples, is the predicted value, y (i) is the true value; next calculate the gradient of the loss function for each parameter:

[0035]

[0036] Then update the parameters: Among them, α is the learning rate, which controls the step size of each update; secondly, in each iteration, repeat the forward propagation, calculate the loss, calculate the gradient and update the parameters until the maximum number of iterations is reached; finally, evaluate the model on the test set and calculate the accuracy index of the final model.

[0037] Finally, the real-time collected power grid system operation data is input into a fully trained and optimized prediction model. The model uses the key features extracted in the early stage and the optimized parameters to accurately predict the emergency resource demand of the power grid system. Based on the prediction results, the system automatically generates a detailed emergency resource allocation plan, which can respond to emergencies in power grid operation in a timely and effective manner and ensure the stability and security of power supply. In this way, the present invention realizes real-time prediction of emergency resource demand and assists decision makers in scientific and reasonable resource allocation.

[0038] The above description is only a preferred embodiment of the present invention and does not limit the present invention in other forms. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A method for predicting emergency resource demand of power grid system based on machine learning, characterized in that: The following steps are involved: S1. First, collect the historical operation data, equipment status data and environmental data of the power grid system, clean and normalize the data, and remove noise and outliers; S2, secondly, extract features related to emergency resource demand from the preprocessed data, and use a recursive feature elimination algorithm to select the key features that best represent the emergency resource demand; S3, then select the integrated random forest algorithm, XGBoost algorithm and LightGBM algorithm to build an emergency resource demand prediction model, divide the historical data into training sets and test sets according to a certain ratio, and train and verify the model; S4. Then use the gradient descent method to tune the model parameters, use the validation set data to evaluate the prediction performance of the model, and adjust the model according to the evaluation results; S5. Finally, the real-time data is input into the trained model to predict the emergency resource demand of the power grid system. Based on the prediction results, an emergency resource allocation plan is generated to assist decision makers in resource allocation.

2. The method for predicting emergency resource demand of a power grid system based on machine learning according to claim 1, characterized in that: The steps of using the recursive feature elimination algorithm in step S2 are as follows: S21, first initialize the model and select a base model, which will be used to evaluate the importance of each feature; S22, then use all the features to train the base model to obtain the weight or importance score of each feature; S23, then sort the features according to the model weight or feature importance score, and the features with smaller absolute weight values ​​or lower importance scores are considered to have less impact on the prediction; S24, followed by feature elimination, removing the features with the lowest scores, usually one feature at a time; S25, then repeat the training, use the remaining features to retrain the model, and re-evaluate the importance of the features; S26, then repeat the feature scoring and feature elimination steps until a predetermined number of features is reached; S27. Finally, the best feature is selected. After multiple rounds of iterations, the feature finally retained is the most useful feature for prediction selected by the recursive feature elimination algorithm.

3. The method for predicting emergency resource demand of a power grid system based on machine learning according to claim 1, characterized in that: The step S3 integrates three algorithms: random forest algorithm, XGBoost algorithm and LightGBM algorithm. The construction of emergency resource demand prediction model is to give full play to the advantages of the three models. The random forest is composed of multiple decision trees, and its prediction result is the average value or voting result of all decision tree results. The formula is: in is the prediction result of random forest, N is the number of decision trees, T i (x) is the prediction of the i-th decision tree for the input x; XGBoost reduces the prediction error by gradually adding new trees, and its formula is: in is the prediction result of XGBoost, K is the number of trees, and f k (x) is the prediction of the kth tree for the input x; LightGBM uses a decision tree method based on gradient boosting, which is similar to XGBoost but more efficient. Its formula is: in is the prediction result of LightGBM, M is the number of trees, g m (x) is the prediction of the mth tree for input x; Set the input of the meta-model to the prediction result of the basic model. The meta-model predicts the final result based on the combination of inputs: in Represents the final prediction result, w0 is the bias term of the meta-model, and w1, w2, and w3 are the weight parameters of the meta-model.

4. The method for predicting emergency resource demand of a power grid system based on machine learning according to claim 1, characterized in that: The step S4 uses the gradient descent method to tune the model parameters, and the steps are as follows: S41, first the forward propagation calculates the predicted value, in is the basic model prediction value of the i-th sample; S42, then calculate the MSE loss: Where N is the number of samples, is the predicted value, y (i) is the true value; S43. Next, calculate the gradient of the loss function for each parameter: S44, then update the parameters: Where α is the learning rate, which controls the step size of each update; S45. Secondly, in each iteration, repeat forward propagation, calculate loss, calculate gradient and update parameters until the maximum number of iterations is reached; S46. Finally, evaluate the model on the test set and calculate the accuracy index of the final model.

Citation Information

Patent Citations

  • Fatigue driving prediction model construction method and device and storage medium

    CN111444657A

  • Product information prediction model construction method and product information prediction method

    CN113971471A

  • Method for predicting ground synthetic electric field based on improved Stacking algorithm

    CN115544879A

  • Vehicle-mounted CAN bus intrusion detection algorithm integrating XGBoost and LightGBM models

    CN116827607A

  • Loaded material demand prediction method, system and equipment in emergency state and medium

    CN117634686A

Cited By

  • Photovoltaic power prediction method and system based on improved optimization particle algorithm

    CN120728598A

  • A photovoltaic power prediction method and system based on an improved optimization particle algorithm

    CN120728598B