Electrical load prediction method based on multivariate meteorological characteristic indexes and combinatorial optimization model
By adopting the Shap feature selection method and the Bayes optimization algorithm optimization of the BP neural network and the CNN-GRU model, the existing models have been used to optimize the problem of overfitting and parameter optimization difficulties in the load prediction. High predictive accuracy and robustness.
Patent Information
- Application Number
- CN202411338464.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-28
AI Technical Summary
The existing neural network models have problems such as overfitting, difficulty in parameter optimization, high demand for large data volumes and computing resources in the prediction of electricity loads, and limited effects when dealing with extreme nonlinear problems.
Adopt the electricity load prediction method based on a diversified meteorological feature index and a combination of model optimization models, select the Meteorological features through the Shap feature selection method, build the BP neural network regression model and the CNN-GRU network sequential model, and use the Bayes optimization algorithm against the model The parameters are optimized, and the results of the final power load prediction will be finally obtained by weighing demand and obtaining the final power load.
It improves the accuracy of electricity load prediction, reduces the uncertainty brought by a single model, enhances the robustness, and reduces overfitting risks to meet the needs of load prediction in modern power systems.
Smart Images

Figure CN119377878A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the electric power field, relates to power system power load forecasting, and specifically relates to a power load forecasting method based on multivariate meteorological characteristic indexes and a combined optimization model. Background Art
[0002] In recent years, with the proposal of the "dual carbon" goal, intelligence, high penetration of new energy, decentralization of power systems and demand response management technologies have gradually played an important role in modern new power systems. Among them, demand response management plays an important role in accurately predicting power load, thereby achieving peak load shaving and valley filling in the power grid, guiding and optimizing the optimal allocation of energy. Short-term load forecasting refers to the forecast of power load from one day to a week. Compared with ultra-short-term load forecasting, accurate short-term load forecasting can help power system operators better respond to load changes caused by emergencies and ensure the continuity and security of power supply, especially for climate-sensitive new power systems.
[0003] Early load forecasting methods were mainly based on statistical models, such as ARMA, ARIMA, and HAR models. Although the forecasting methods based on statistical models have fewer parameters, their computational efficiency is relatively high. However, statistical methods are difficult to process nonlinear characteristic data. It is difficult to meet the current requirements for variable power load forecasting. With the development of artificial intelligence and the improvement of the computing power of modern computers, load forecasting methods based on artificial neural networks have gradually been widely used. Among them, the mainstream artificial neural networks used for power system power load forecasting include SVR, GRU, LSTM, BP and other neural network models. Compared with the forecasting model based on statistical methods, the forecasting model based on artificial neural networks can effectively capture the time characteristics in nonlinear data and achieve good forecasting results.
[0004] However, existing neural network models are sensitive to overfitting, difficult to optimize model parameters, have high requirements for large amounts of data and computing resources, and have limited effectiveness in dealing with extreme nonlinear problems.
[0005] Therefore, a new technical solution is needed to solve these problems. Summary of the invention
[0006] Purpose of the invention: In order to overcome the deficiencies in the prior art, a method for predicting power load based on multivariate meteorological characteristic index and combined optimization model is provided to improve the accuracy of power load prediction.
[0007] Technical solution: To achieve the above object, the present invention provides a method for predicting power load based on multivariate meteorological characteristic index and combined optimization model, comprising the following steps:
[0008] S1: Obtain the load data and meteorological data of the target area, and use the SHAP feature selection method to dynamically select meteorological features;
[0009] S2: Calculate the meteorological characteristic index according to the meteorological characteristic data selected in step S1, and divide it into a training set and a test set;
[0010] S3: Construct BP neural network regression model and CNN-GRU network timing model;
[0011] S4: The Bayesian optimization algorithm is used to optimize the parameters of the BP neural network regression model and the CNN-GRU network timing model, and the optimal parameter combinations of the BP neural network regression model and the CNN-GRU network timing model are obtained respectively;
[0012] S5: Train and predict the BP neural network regression model through the training set and the test set respectively to obtain the prediction results;
[0013] The CNN-GRU network time series model is trained and predicted through the training set and test set respectively to obtain the prediction results;
[0014] S6: The prediction results of the BP neural network regression model and the CNN-GRU network timing model are weighted and summed to obtain the final power load prediction result.
[0015] Furthermore, the step S1 is specifically as follows:
[0016] A1: The meteorological features with strong correlation with the load data of all periods are selected through the SHAP correlation algorithm;
[0017] A2: Dynamically calculate the load-weather correlation and select the meteorological features with the strongest correlation to form a set of load-related meteorological features.
[0018] Furthermore, the meteorological characteristic indicators in step S2 include heat index, humidity index, wind chill index and temperature accumulation, and the calculation formulas are as follows:
[0019] The heat index calculation formula is:
[0020]
[0021] In the formula, c1 = -42.379; c2 = 2.04901523; c3 = 10.14333127; c4 = -0.22475541; c5 = -0.00683783; c6 = -0.05481717; c7 = 0.00122874; c8 = 0.00085282; c9 = -0.00000199; t2 is temperature; rh2 is humidity;
[0022] The formula for calculating the humidity index is:
[0023] Humidex=-2.7+1.04·t2+2.0·rh2-0.65·t2·rh2
[0024] The wind chill index calculation formula is:
[0025]
[0026] Where wspd 70 The wind speed is 70 meters.
[0027] The temperature accumulation calculation formula is:
[0028]
[0029] Where, T i represents the daily average temperature of the i-th day; T base represents the base temperature; n is the total number of days in the time period.
[0030] Furthermore, the BP neural network regression model in step S3 is composed of five fully connected layers, each layer is implemented by a Dense function, and LeakyReLU is used as an activation function to improve the model's ability to fit nonlinear problems; the Dense function is used to perform a linear transformation on the input, and nonlinear features are introduced through the activation function, so that the model can extract complex features layer by layer, and its expression is:
[0031] y=σ(W·x+b)
[0032] Where W is the weight matrix, b is the bias term, σ is the activation function, x is the input, and y is the output;
[0033] To prevent overfitting, an L2 regularization term is added to the last layer to avoid overfitting; the BP neural network regression model is compiled using the Huber loss function and the Adam optimizer, a combination that helps to increase the convergence speed while maintaining stability; an early stopping strategy is used, that is, if the validation set loss no longer decreases within a certain number of iterations, training is stopped in advance to avoid overfitting and optimize training efficiency.
[0034] Furthermore, the CNN-GRU network timing model in step S3 includes a CNN part and a GRU part, specifically:
[0035] The CNN part includes convolution layer, activation function, and pooling layer, which are as follows:
[0036] Convolution layer: performs convolution operations to extract local features
[0037]
[0038] Among them, X is the input, W is the convolution kernel, b is the bias term, and y is the output feature map;
[0039] Activation function: ReLU, applying nonlinear mapping:
[0040] y=max(0,x)
[0041] Pooling layer: Reduces the dimension of the feature map, usually using maximum pooling:
[0042] y=max(X i:i+f,j:j+f )
[0043] The GRU part includes the update gate z t , reset gate t , candidate hidden states Final hidden state They are as follows:
[0044] Update gate z t : Decide how much past information to keep:
[0045] z t =σ(W z ·[h t-1 ,x t ])
[0046] Reset Gate t : Decide how much previous information to discard:
[0047] r t =σ(W r ·[h t-1 ,x t ])
[0048] Candidate hidden states Compute candidate hidden states based on the current input and the reset gate:
[0049]
[0050] Final hidden state The new hidden state is calculated by updating the weighted mixture of gates:
[0051]
[0052] The CNN-GRU model combines CNN's ability to extract local features and GRU's ability to capture time series information. CNN is responsible for extracting local patterns in time series data, while GRU further processes the long-term dependencies of time series.
[0053] Furthermore, the parameter optimization method of step S4 is:
[0054] In BP neural network, Bayesian optimization is used to adjust the number of neurons in each hidden layer, units, by defining an objective function bp_optimization, which receives hyperparameters as input and returns the maximum negative loss on the validation set. The Bayesian optimizer uses this objective function to find the optimal hyperparameter combination in BP neural network.
[0055] In the CNN-GRU model, Bayesian optimization is used to adjust the hyperparameters of the number of filters conv_filters of the convolution layer, the size of the convolution kernel kernel_size, the strides of the convolution layer, the number of units gru_units of the GRU layer, and the learning rate learning_rate. These hyperparameters are received through the objective function cnn_gru_attention_optimization, which returns the negative loss on the validation set. The Bayesian optimizer uses this objective function to find the optimal hyperparameter combination in the CNN-GRU model.
[0056] Furthermore, the Bayesian optimization algorithm in step S4 is an optimization algorithm based on probability distribution, and the two core processes are a priori function and an acquisition function, and the priori function adopts Gaussian process regression;
[0057] When used for prediction, the Gaussian process takes into account y N and N+1 The relationship between them is:
[0058] P(y N+1 ∣X N+1 y N )
[0059] The Gaussian process considers y N ,y N+1 When the relationship between , assuming that Y obeys the joint normal distribution, the parameters need to be given, that is, the mean vector and the covariance matrix, which are expressed as:
[0060]
[0061] Where: The covariance matrix is also called the kernel matrix, denoted by K, which is only related to feature x and has nothing to do with y; the idea of the Gaussian process is: assuming that Y obeys a high-dimensional normal distribution, the optimal covariance matrix can be obtained based on the training set, thereby obtaining the posterior formula to estimate the test set y * , the posterior formula is:
[0062]
[0063] In the formula, K * is the kernel vector of the training set, K ** is the kernel vector of the newly added sample.
[0064] Furthermore, the acquisition function adopts improved probability, and the formula is as follows:
[0065]
[0066] Where: Φ is the cumulative distribution function of the standard normal distribution; μ(x) is the mean predicted by the model; σ(x) is the standard deviation predicted by the model; f(x + ) is the currently known maximum value of the objective function; ξ is a hyperparameter used to adjust the balance between exploration and exploitation.
[0067] Furthermore, the prediction results of the BP neural network regression model and the CNN-GRU network timing model in step S6 are respectively and The prediction results after fusion It is expressed as:
[0068]
[0069] Where w1 and w2 are weight coefficients, satisfying w1+w2=1;
[0070] The weights are calculated as follows:
[0071]
[0072] In this way, models with better performance are given higher weights, thus improving the accuracy of the fusion results.
[0073] Beneficial effects: Compared with the prior art, the present invention dynamically selects meteorological features through SHAP to ensure that the model can select the most influential features according to real-time meteorological changes. By combining meteorological data to calculate indicators such as heat index, humidity index, wind chill index and temperature accumulation, the model can better capture different meteorological conditions, especially the changes in perceived temperature reflected by these indicators. The Bayesian optimized BP neural network and the CNN-GRU time series model are combined, and the parameter tuning of Bayesian optimization is used to ensure that each model can operate in its optimal state. Finally, the prediction results of the two models are fused by weighted summation, making the overall prediction results smoother, reducing the uncertainty brought by a single model, and improving robustness. Bayesian optimization also reduces the risk of overfitting by introducing early stopping strategies and regularization, making the model more efficient when processing nonlinear and complex load data, thereby adapting to the needs of load forecasting in modern power systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 is a flow chart of the method of the present invention;
[0075] Figure 2It is the structural diagram of the BP neural network model;
[0076] Figure 3 It is the GRU unit diagram;
[0077] Figure 4 It is the Bayesian algorithm flow chart;
[0078] Figure 5 It is a comparison chart of load forecast value and actual value. DETAILED DESCRIPTION
[0079] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.
[0080] like Figure 1 As shown, the present invention provides a method for predicting power load based on multivariate meteorological characteristic index and combined optimization model, comprising the following steps:
[0081] S1: Obtain the load data and meteorological data of the target area, and use the SHAP feature selection method to dynamically select meteorological features, specifically:
[0082] A1: Three meteorological characteristics with strong correlation with the load data during the whole period are selected through the SHAP correlation algorithm;
[0083] The SHAP algorithm is used to calculate the impact of each meteorological feature on the load data over the entire period. In this way, the three meteorological features that are most relevant to load changes are identified. The SHAP value is calculated based on the following formula to quantify the importance of the feature. The SHAP value calculation formula is:
[0084]
[0085] In the formula, represents the feature subset S that does not contain the i-th feature, N is the total set of features, including all features, |S| represents the size of the feature subset S, f(S∪{i}) represents the model prediction value when feature i is included, f(S) represents the model prediction value when feature i is not included, |N|! is the factorial of the number of features N, representing the number of all possible feature combinations.
[0086] After obtaining the SHAP values of different weather characteristics, the three meteorological characteristics with the highest values are selected.
[0087] A2: Dynamically calculate the load-weather correlation and select the three most strongly correlated meteorological features to form a load-related meteorological feature set.
[0088] Dynamically select the meteorological characteristics of the last 15 days of the predicted day to continue calculating its SHAP value, and select the three most strongly correlated meteorological characteristics other than those selected in A1 to construct the experimental meteorological characteristic data set.
[0089] S2: Calculate the meteorological characteristic index according to the meteorological characteristic data selected in step S1, and divide it into a training set and a test set;
[0090] Meteorological characteristic indicators include heat index, humidity index, wind chill index and temperature accumulation, and the calculation formulas are as follows:
[0091] The heat index calculation formula is:
[0092]
[0093] In the formula, c1 = -42.379; c2 = 2.04901523; c3 = 10.14333127; c4 = -0.22475541; c5 = -0.00683783; c6 = -0.05481717; c7 = 0.00122874; c8 = 0.00085282; c9 = -0.00000199; t2 is temperature; rh2 is humidity;
[0094] The formula for calculating the humidity index is:
[0095] Humidex=-2.7+1.04·t2+2.0·rh2-0.65·t2·rh2
[0096] The wind chill index calculation formula is:
[0097]
[0098] Where wspd 70 The wind speed is 70 meters.
[0099] The temperature accumulation calculation formula is:
[0100]
[0101] Where, T i represents the daily average temperature of the i-th day; T base represents the base temperature; n is the total number of days in the time period.
[0102] S3: Construct BP neural network regression model and CNN-GRU network timing model;
[0103] BP neural network can effectively capture the nonlinear relationship between meteorological characteristics (such as temperature, humidity, wind speed) and power load, and is suitable for complex regression problems. CNN combined with GRU can process time series data. GRU captures time dependency, and CNN extracts local features, which is suitable for analyzing the cumulative impact of weather on load. The meteorological characteristics selected by SHAP are closely related to the load. The combination of BP and CNN-GRU models can accurately model from both nonlinear and time series perspectives, thereby improving the accuracy of load forecasting.
[0104] Reference Figure 2 , the BP neural network regression model consists of five fully connected layers, each layer is implemented by the Dense function, and LeakyReLU is used as the activation function to improve the model's ability to fit nonlinear problems. The main function of the Dense function is to perform a linear transformation on the input and introduce nonlinear features through the activation function, so that the model can extract complex features layer by layer. Its expression is:
[0105] y=σ(W·x+b)
[0106] Among them, W is the weight matrix, b is the bias term, σ is the activation function, x is the input, and y is the output. Such a hierarchical design can gradually extract and transform the features in the input data, and is suitable for processing complex function mapping relationships. In order to prevent overfitting, the last layer adds an L2 regularization term to avoid overfitting. This hierarchical design can gradually extract and transform the features of the input data, and is suitable for complex function mapping relationships. The BP neural network regression model is compiled using the Huber loss function and the Adam optimizer. This combination helps to increase the convergence speed while maintaining stability. An early stopping strategy is used, that is, if the validation set loss no longer decreases in a certain number of iterations, the training is stopped in advance to avoid overfitting and optimize training efficiency.
[0107] Reference Figure 3 , build a CNN-GRU network timing model.
[0108] Convolutional Neural Network (CNN) part:
[0109] Main structure:
[0110] Convolution layer: performs convolution operations to extract local features
[0111]
[0112] Among them, X is the input, W is the convolution kernel, b is the bias term, and y is the output feature map.
[0113] Activation function: ReLU, applying nonlinear mapping:
[0114] y=max(0,x)
[0115] Pooling layer: Reduces the dimension of the feature map, usually using maximum pooling:
[0116] y=max(X i:i+f,j:j+f )
[0117] Gated Recurrent Unit (GRU) part:
[0118] Main structure:
[0119] Update gate z t : Decide how much past information to keep:
[0120] z t =σ(W z ·[h t-1 ,x t ])
[0121] Reset Gate t : Decide how much previous information to discard:
[0122] r t =σ(W r ·[h t-1 ,x t ])
[0123] Candidate hidden states Compute candidate hidden states based on the current input and the reset gate:
[0124]
[0125] Final hidden state The new hidden state is calculated by updating the weighted mixture of gates:
[0126]
[0127] The CNN-GRU model combines CNN's ability to extract local features with GRU's ability to capture temporal information. CNN is responsible for extracting local patterns in time series data, while GRU further processes the long-term dependencies of time series.
[0128] S4: The Bayesian optimization algorithm is used to optimize the parameters of the BP neural network regression model and the CNN-GRU network timing model, and the optimal parameter combinations of the BP neural network regression model and the CNN-GRU network timing model are obtained respectively.
[0129] The present invention uses Bayesian optimization to adjust the hyperparameters of two different types of neural network models.
[0130] In the BP neural network, Bayesian optimization is used to adjust the number of neurons in each hidden layer by defining an objective function bp_optimization, which receives the above hyperparameters as input and returns the maximum negative loss on the validation set (that is, we hope to maximize the loss on the validation set). The Bayesian optimizer uses this objective function to find the optimal hyperparameter combination in the BP neural network.
[0131] In the CNN-GRU model, Bayesian optimization is used to adjust the number of filters in the convolution layer conv_filters, the size of the convolution kernel kernel_size, the strides of the convolution layer, the number of units in the GRU layer gru_units, and the learning rate learning_rate. These hyperparameters are received through the objective function cnn_gru_attention_optimization, which returns the negative loss on the validation set. The Bayesian optimizer uses this objective function to find the optimal hyperparameter combination in the CNN-GRU model.
[0132] The basic principle of Bayesian optimization in the two models is the same, both of which approximate the objective function by building a proxy model and use the acquisition function to guide the search for hyperparameters. However, the optimized parameters and objective functions are different, resulting in different specific optimization processes. The BP neural network optimizes the width of the network layer (the number of neurons), with the goal of improving the network's fitting ability while avoiding overfitting. In addition to optimizing the width of the network layer, the CNN-GRU model also optimizes the configuration of the convolutional layer (the number of filters, kernel size, step size) and the learning rate, with the goal of extracting spatiotemporal features and performing effective sequence prediction. In actual operation, the number of iterations of Bayesian optimization, the choice of acquisition function, and the search range of hyperparameters may all be adjusted according to specific problems.
[0133] Reference Figure 4 ,The Bayesian optimization algorithm is an optimization algorithm based on probability distribution. The two core processes are the prior function and the acquisition function. The prior function uses Gaussian process regression, and the acquisition function (PI) uses improved probability. The formula is as follows:
[0134]
[0135] Where: Φ is the cumulative distribution function of the standard normal distribution. μ(x) is the mean predicted by the model. σ(x) is the standard deviation predicted by the model. f(x + ) is the maximum value of the objective function currently known. ξ is a hyperparameter used to adjust the balance between exploration and exploitation.
[0136] Gaussian processes can be used for nonlinear classification, parameter optimization, nonlinear regression, etc. When used for prediction, Gaussian processes take into account y N andN+1 The relationship between them is:
[0137] P(y N+1 ∣X N+1 y N )
[0138] The Gaussian process considers y N ,y N+1 When the relationship between , assuming that Y obeys the joint normal distribution, the parameters need to be given, that is, the mean vector and the covariance matrix, which are expressed as:
[0139]
[0140] Where: The covariance matrix is also called the kernel matrix, denoted by K, which is only related to feature x and has nothing to do with y; the idea of the Gaussian process is: assuming that Y obeys a high-dimensional normal distribution, the optimal covariance matrix can be obtained based on the training set, thereby obtaining the posterior formula to estimate the test set y * , the posterior formula is:
[0141]
[0142] In the formula, K * is the kernel vector of the training set, K ** is the kernel vector of the newly added sample.
[0143] S5: Train and predict the BP neural network regression model through the training set and the test set respectively to obtain the prediction results;
[0144] The CNN-GRU network time series model is trained and predicted through the training set and test set respectively to obtain the prediction results;
[0145] S6: Perform weighted summation on the prediction results of the BP neural network regression model and the CNN-GRU network timing model to obtain the final power load prediction result;
[0146] The prediction results of the BP neural network regression model and the CNN-GRU network time series model are and The prediction results after fusion It is expressed as:
[0147]
[0148] Where w1 and w2 are weight coefficients, satisfying w1+w2=1;
[0149] The weights are calculated as follows:
[0150]
[0151] In this way, models with better performance are given higher weights, thus improving the accuracy of the fusion results.
[0152] In order to verify the effectiveness and effect of the method of the present invention, the above scheme is applied as an example in this embodiment, specifically:
[0153] This example selects load and weather data from a certain area in Zhejiang, China. In this case, the forecast time is manually set, taking the forecast on November 11, 2023 as an example. The number of training data days is set to 545 days for load forecasting.
[0154] First, obtain the target area data and divide the data set. For the daily load forecast, the data set is processed by the SHAP algorithm to include date feature columns, fixed meteorological feature columns, and automatically selected meteorological feature columns. The selected date feature columns are: Gregorian month, Gregorian day, hour, minute, lunar year, lunar month, and lunar day; fixed meteorological feature columns are: temperature, humidity, and surface temperature; and automatically selected meteorological feature columns are: dew point temperature, temperature accumulation, and humidity index. Some of the training set data are shown in Table 1:
[0155] Table 1 Part of the training set data table
[0156]
[0157] A prediction model is established for the above training set. The network parameters in the BP regression model and the GRU time series model are optimized by the Bayesian optimization strategy as shown in the following table:
[0158] Table 2 Bayesian optimization combination of BP regression model parameters
[0159]
[0160]
[0161] Table 3 Bayesian optimization combination of GRU timing model parameters
[0162]
[0163] The above optimal combination parameters are used to build a model for training and prediction. After obtaining the respective prediction results, a weighted average based on MSE is performed, and the load of Shengzhou City on November 11, 2023 is predicted. The comparison curve of the predicted value and the actual value of active power on that day can be obtained as shown in the figure below: Figure 5 shown.
[0164] The forecast results were evaluated according to the calculation method of the indicators required by the State Grid, and the forecast evaluation indicators for that day were obtained as shown in Table 4:
[0165] Table 4 Evaluation of prediction results indicators
[0166]
[0167] In summary, the load forecasting method based on multivariate meteorological characteristic index and combined optimization model proposed in the present invention can improve the overall accuracy of load forecasting, has high robustness, and can provide data support for accurate planning and scheduling of power grids.
Claims
1. A method for predicting power load based on multivariate meteorological characteristic index and combined optimization model, characterized in that: The steps include: S1: Dynamically select meteorological features using the SHAP feature selection method; S2: Calculate the meteorological characteristic index according to the meteorological characteristic data selected in step S1, and divide it into a training set and a test set; S3: Construct BP neural network regression model and CNN-GRU network timing model; S4: The Bayesian optimization algorithm is used to optimize the parameters of the BP neural network regression model and the CNN-GRU network timing model, and the optimal parameter combinations of the BP neural network regression model and the CNN-GRU network timing model are obtained respectively; S5: Train and predict the BP neural network regression model through the training set and the test set respectively to obtain the prediction results; The CNN-GRU network time series model is trained and predicted through the training set and test set respectively to obtain the prediction results; S6: The prediction results of the BP neural network regression model and the CNN-GRU network timing model are weighted and summed to obtain the final power load prediction result.
2. The method for predicting power load based on multivariate meteorological characteristic index and combined optimization model according to claim 1, characterized in that: The step S1 is specifically as follows: A1: The meteorological features with strong correlation with the load data of all periods are selected through the SHAP correlation algorithm; A2: Dynamically calculate the load-weather correlation and select the meteorological features with the strongest correlation to form a set of load-related meteorological features.
3. The method for predicting power load based on multivariate meteorological characteristic index and combined optimization model according to claim 1, characterized in that: In step A1, the SHAP algorithm is used to calculate the impact of each meteorological feature on the load data during the entire period; the SHAP value is calculated based on the following formula to quantify the importance of the feature. The SHAP value calculation formula is: In the formula, represents the feature subset S that does not include the i-th feature, N is the total set of features, including all features, |S| represents the size of the feature subset S, f(S∪{i}) represents the model prediction value when feature i is included, f(S) represents the model prediction value when feature i is not included, |N|! is the factorial of the number of features N, representing the number of all possible feature combinations; After obtaining the SHAP values of different weather characteristics, the three meteorological characteristics with the highest values are selected.
4. The method for predicting power load based on multivariate meteorological characteristic index and combined optimization model according to claim 1, characterized in that: The meteorological characteristic indicators in step S2 include heat index, humidity index, wind chill index and temperature accumulation, and the calculation formulas are as follows: The heat index calculation formula is: In the formula, c1 = -42.379; c2 = 2.04901523; c3 = 10.14333127; c4 = -0.22475541; c5 = -0.00683783; c6 = -0.05481717; c7 = 0.00122874; c8 = 0.00085282; c9 = -0.00000199; t2 is temperature; rh2 is humidity; The formula for calculating the humidity index is: Humidex=-2.7+1.04·t2+2.0·rh2-0.65·t2·rh2 The wind chill index calculation formula is: Where wspd 70 The wind speed is 70 meters. The temperature accumulation calculation formula is: Where, T i represents the daily average temperature of the i-th day; T base represents the base temperature; n is the total number of days in the time period.
5. The method for predicting power load based on multivariate meteorological characteristic index and combined optimization model according to claim 1, characterized in that: The BP neural network regression model in step S3 is composed of five fully connected layers, each layer is implemented by a Dense function, and LeakyReLU is used as an activation function to improve the model's ability to fit nonlinear problems; the Dense function is used to perform a linear transformation on the input, and nonlinear features are introduced through the activation function, so that the model can extract complex features layer by layer, and its expression is: y=σ(W·x+b) Where W is the weight matrix, b is the bias term, σ is the activation function, x is the input, and y is the output; To prevent overfitting, an L2 regularization term is added to the last layer to avoid overfitting; the BP neural network regression model is compiled using the Huber loss function and the Adam optimizer, a combination that helps to increase the convergence speed while maintaining stability; an early stopping strategy is used, that is, if the validation set loss no longer decreases within a certain number of iterations, training is stopped in advance to avoid overfitting and optimize training efficiency.
6. The method for predicting power load based on multivariate meteorological characteristic index and combined optimization model according to claim 1, characterized in that: The CNN-GRU network timing model in step S3 includes a CNN part and a GRU part, specifically: The CNN part includes convolution layer, activation function, and pooling layer, which are as follows: Convolution layer: performs convolution operations to extract local features Among them, X is the input, W is the convolution kernel, b is the bias term, and y is the output feature map; Activation function: ReLU, applying nonlinear mapping: y=max(0,x) Pooling layer: Reduces the dimension of the feature map, usually using maximum pooling: y=max(X i:i+f,j:j+f ) The GRU part includes the update gate z t , reset gate t , candidate hidden states Final hidden state They are as follows: Update gate z t : Decide how much past information to keep: z t =σ(W z ·[h t-1 ,x t ]) Reset Gate t : Decide how much previous information to discard: r t =σ(W r ·[h t-1 ,x t ]) Candidate hidden states Compute candidate hidden states based on the current input and the reset gate: Final hidden state The new hidden state is calculated by updating the weighted mixture of gates: The CNN-GRU model combines CNN's ability to extract local features and GRU's ability to capture time series information. CNN is responsible for extracting local patterns in time series data, while GRU further processes the long-term dependencies of time series.
7. The method for predicting power load based on multivariate meteorological characteristic index and combined optimization model according to claim 1, characterized in that: The parameter optimization method of step S4 is: In BP neural network, Bayesian optimization is used to adjust the number of neurons in each hidden layer, units, by defining an objective function bp_optimization, which receives hyperparameters as input and returns the maximum negative loss on the validation set. The Bayesian optimizer uses this objective function to find the optimal hyperparameter combination in BP neural network. In the CNN-GRU model, Bayesian optimization is used to adjust the hyperparameters of the number of filters conv_filters of the convolution layer, the size of the convolution kernel kernel_size, the strides of the convolution layer, the number of units gru_units of the GRU layer, and the learning rate learning_rate. These hyperparameters are received through the objective function cnn_gru_attention_optimization, which returns the negative loss on the validation set. The Bayesian optimizer uses this objective function to find the optimal hyperparameter combination in the CNN-GRU model.
8. The method for predicting power load based on multivariate meteorological characteristic index and combined optimization model according to claim 7, characterized in that: The Bayesian optimization algorithm in step S4 is an optimization algorithm based on probability distribution, and the two core processes are a priori function and an acquisition function, and the priori function adopts Gaussian process regression; When used for prediction, the Gaussian process takes into account y N and N+1 The relationship between them is: P(and N+1 ∣X N+1 and N ) The Gaussian process considers y N ,y N+1 When the relationship between , assuming that Y obeys the joint normal distribution, the parameters need to be given, that is, the mean vector and the covariance matrix, which are expressed as: Where: The covariance matrix is also called the kernel matrix, denoted by K, which is only related to feature x and has nothing to do with y; the idea of the Gaussian process is: assuming that Y obeys a high-dimensional normal distribution, the optimal covariance matrix can be obtained based on the training set, thereby obtaining the posterior formula to estimate the test set y * , the posterior formula is: In the formula, K * is the kernel vector of the training set, K ** is the kernel vector of the newly added sample.
9. The method for predicting power load based on multivariate meteorological characteristic index and combined optimization model according to claim 8, characterized in that: The acquisition function adopts improved probability, and the formula is as follows: Where: Φ is the cumulative distribution function of the standard normal distribution; μ(x) is the mean predicted by the model; σ(x) is the standard deviation predicted by the model; f(x + ) is the currently known maximum value of the objective function; ξ is a hyperparameter used to adjust the balance between exploration and exploitation.
10. The method for predicting power load based on multivariate meteorological characteristic index and combined optimization model according to claim 1, characterized in that: The prediction results of the BP neural network regression model and the CNN-GRU network timing model in step S6 are respectively and The prediction results after fusion It is expressed as: Where w1 and w2 are weight coefficients, satisfying w1+w2=1; The weights are calculated as follows:
Citation Information
Patent Citations
Bus load short-term prediction method based on feature selection and combined prediction model
CN116365512A
Sequence-to-sequence power load prediction method based on multi-dimensional gating circulation unit
CN116384572A
Cited By
Electric power system power flow prediction method based on multi-level model fusion
CN120582076A
Sample detection parameter design method based on composite prediction algorithm
CN120780986A
Training method of power load prediction model, high-temperature weather power load prediction method and related products
CN120995003A
Water quality inversion method based on deep learning, medium, equipment and product
CN121144759A