Two-stage load prediction method for regional integrated energy system
By adopting a two-stage load prediction method in the power system, the support vector regression model and the long and short-term memory network model are optimized using the Zebra optimization algorithm, and combined with the recent and intraday prediction results, the problems of low load prediction accuracy and inability to adjust in real time in the existing technology are solved, achieving more efficient and accurate load prediction.
Patent Information
- Application Number
- CN202411419408.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-03-04
AI Technical Summary
In the load prediction of power system, the nonlinear fitting ability is poor, the prediction accuracy is not high, and the short-term and ultra-short-term predictions rely on historical data and cannot be adjusted in real time. The data sampling requirements are high and the risks are high.
The two-stage load prediction method of regional integrated energy system is adopted, and the support vector regression model is optimized through the zebra optimization algorithm to make daily predictions, and the long-term memory network model is used to make intraday load predictions, and the results of the two are reconstructed to improve the accuracy of load prediction.
It improves the accuracy and accuracy of load prediction of regional comprehensive energy systems, and can consider the impact of short-term and ultra-short-term timing factors on load power at the same time, reduces data sampling requirements, and enhances the real-time and reliability of predictions.
Smart Images

Figure CN119558674A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of load forecasting of electric power systems, and in particular relates to a two-stage load forecasting method for a regional integrated energy system. Background Art
[0002] As the energy forms of modern power systems continue to become more complex, achieving more efficient energy utilization has become the research focus of domestic and foreign scholars in recent years. Regional integrated energy systems can be applied in scenarios such as hospitals, schools, and industrial and commercial parks, showing good economic efficiency. In regional integrated energy systems, load power generally changes periodically and regularly. Load forecasting can help the system to perform reasonable energy scheduling and operation optimization, so that system planners can better arrange energy production and supply. Traditional load forecasting methods include time series method, regression analysis method, gray theory method, etc. These methods have poor nonlinear fitting ability and low prediction accuracy, and are no longer suitable for the load requirements of the current power system. The prediction method based on machine learning can handle nonlinear problems more effectively and has better prediction accuracy, but most machine learning algorithms rely heavily on internal parameter settings. Therefore, how to optimize their parameters and improve their learning ability is an urgent problem to be solved.
[0003] In addition, from the perspective of time scale, load forecasting includes long-term, short-term and ultra-short-term forecasting, among which short-term and ultra-short-term forecasting can achieve good forecasting results within a smaller time scale and require less data, which is more suitable for regional integrated energy systems. However, a single short-term forecast relies on historical data in units of days or weeks and cannot be adjusted in real time on the same day. A single ultra-short-term forecast has high data sampling requirements and is more risky. Summary of the invention
[0004] The present invention is proposed to overcome the shortcomings of the prior art, and its purpose is to provide a two-stage load forecasting method for a regional integrated energy system.
[0005] The present invention is achieved through the following technical solutions:
[0006] A two-stage load forecasting method for a regional integrated energy system comprises the following steps:
[0007] S1. Obtain the load data of the area from the historical data of the integrated energy system, and divide and process the load data;
[0008] S2. Introduce the zebra optimization algorithm, establish a support vector regression model optimized by the zebra optimization algorithm, and use the zebra optimization algorithm to optimize the support vector regression model to perform day-ahead forecasting of the regional integrated energy system to obtain day-ahead load forecasting results;
[0009] S3, using the long short-term memory network model as the intraday load forecasting model of the regional integrated energy system for training and forecasting, and obtaining the intraday load forecasting results;
[0010] S4. Reconstruct the day-ahead load forecast result obtained in step S2 and the intraday load forecast result obtained in step S3 to obtain final load forecast data.
[0011] In the above technical scheme, the load data is divided into training set data and test set data; the training set data includes day-ahead prediction training set data and intraday prediction training set data; the test set data includes day-ahead prediction test set data and intraday prediction test set data; the day-ahead prediction training set data is the load data of 30 days before the day to be predicted, with a sampling interval of 1 hour; the intraday prediction training set data is the data of two days before the day to be predicted, with a sampling interval of 10 minutes; the day-ahead prediction test set data is the real data of the day to be predicted, with a sampling interval of 1 hour; the intraday prediction test set data is the real data of the day to be predicted, with a sampling interval of 10 minutes.
[0012] In the above technical solution, the load data processing is specifically: all load data are normalized to between 0 and 1 using a normalization formula. The purpose of load data normalization is to reduce the data scale to facilitate model prediction.
[0013] In the above technical solution, the normalization formula is:
[0014]
[0015] Where: x min is the minimum load power, x max is the maximum load power, x i is the load power value before normalization, x ist is the normalized load power value.
[0016] Denormalization is the inverse operation of the normalization formula, and the formula is:
[0017] x i =x ist ·(x max -x min )+x min
[0018] In the above technical solution, the specific steps of step S2 are:
[0019] S21, inputting the day-ahead prediction training set data and the day-ahead prediction test set data into the support vector regression model for subsequent optimization;
[0020] S22, initialize the zebra population, set the maximum number of iterations T and the population size of the zebra optimization algorithm; take the penalty factor C and the kernel function parameter δ of the regression function of the support vector regression model as the parameters to be optimized, and give the optimization range of the two parameters;
[0021] S23, training and predicting the support vector regression model under the initial zebra population, calculating the objective function value of the initial population, and retaining the optimal individual;
[0022] S24, updating the position of the zebra population according to the foraging behavior, calculating the objective function value predicted by the updated support vector regression model, and retaining the zebra population with a better objective function value;
[0023] S25, updating the position of the zebra population according to the defensive behavior, calculating the objective function value predicted by the updated support vector regression model, and retaining the zebra individuals with better objective function values;
[0024] S26, determine whether the current number of iterations t is greater than the maximum number of iterations T, if so, the optimization is completed, and the optimal parameters of the output SVR are saved in the workspace; otherwise, the number of iterations is increased by 1 and returns to S24 to continue iterating;
[0025] S27, substituting the optimal parameters obtained by optimization into the SVR model, and obtaining the optimized SVR model for day-ahead load forecasting;
[0026] S28. Output the prediction results and perform denormalization on the data.
[0027] The objective function of the support vector regression model is the minimum root mean square error between the predicted value and the actual value, and the formula is as follows:
[0028]
[0029] Where: F obj is the objective function value, P pre is the predicted value of the load forecast on the day before, P re is the true value, N is the total number of samples;
[0030] The kernel function of the support vector regression model is the radial basis function, and its formula is:
[0031]
[0032] Where: x i and x j are any two input values of the SVR model, δ is the bandwidth of the radial basis function;
[0033] The regression function of the support vector regression model is:
[0034]
[0035] Where: α i is a constant between [0,C], C is the penalty factor, α i * is the SVR in the solution process i The optimal value of , b is the bias, and n is the number of samples.
[0036] In the above technical solution, the foraging behavior updates the position according to the following formula:
[0037]
[0038] Where: x i,j is a population individual, r is a random number between [0,1], PZ j is the optimal individual position of the current j-th dimension, and I is a random number between [1,2].
[0039] In the above technical solution, the defensive behavior updates the position according to the following formula:
[0040]
[0041]
[0042] Where: M and R are random numbers between [0,1], t is the current iteration number, T is the maximum iteration number, AZ j is the value of the j-th dimension individual.
[0043] In the above technical solution, the specific steps of step S3 are:
[0044] S31. Using the training set data for intraday forecasting, a sliding window method is used to train the intraday load forecasting model of the regional integrated energy system;
[0045] S32. Use the regional integrated energy system intraday load forecasting model trained in step S31 to perform point-by-point real-time forecasting on the day to be predicted, and use the test set data (true value) used for intraday forecasting to update and correct the model state, obtain the intraday load power forecast value, and perform denormalization.
[0046] In the above technical solution, the specific expression of the intraday load forecasting model of the regional integrated energy system is:
[0047] I t =σ(w i x t +v i h t-1 )
[0048] F t =σ(w fx t +v f h t-1 )
[0049] C t =F t *C t-1 +I t *σ(w0x t +v g h t-1 )
[0050] h t =σ(w g x t +v0h t-1 )*tanh(C t )
[0051] Where: I t and F t are the output signals of the input gate and the forget gate respectively; C t-1 and C t are the neuron states at the previous moment and the current moment respectively; h t-1 and h t are the output values of LSTM at the previous moment and the current moment respectively; σ is the sigmoid activation function; x t is the input sequence value; w i and v i 、w f and v f 、w g and v g , w0 and v0 are the weights and biases of the input gate, forget gate, memory unit and output gate respectively.
[0052] In the above technical solution, the specific method of reconstructing step S4 is: the day-ahead prediction model outputs the load data for 24 hours of the day at an interval of 1 hour, and the intraday prediction model performs real-time prediction every 10 minutes. If the two prediction time points are repeated, the average value of the two is taken as the prediction value, otherwise the value output by the intraday prediction model is used as the prediction value, and finally the prediction value of one point every 10 minutes on the test day is obtained.
[0053] The beneficial effects of the present invention are:
[0054] The present invention provides a two-stage load forecasting method for a regional integrated energy system, constructs a two-stage load forecasting model of a regional integrated energy system, the day-ahead forecasting model uses a zebra optimization algorithm to optimize a support vector regression model, the intraday load forecasting model uses an LSTM model, and the day-ahead and intraday forecast values are reconstructed. The present invention combines the advantages of day-ahead and intraday forecasts, can simultaneously consider the impact of short-term and ultra-short-term time series factors on load power, improves the accuracy and precision of load forecasting for a regional integrated energy system, and improves energy utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 is a flow chart of the method of the present invention;
[0056] Figure 2 It is a flow chart of the zebra optimization algorithm for optimizing the support vector regression model in the method of the present invention;
[0057] Figure 3 It is a comparison diagram of prediction curves of the two-stage load prediction method for the regional integrated energy system of the present invention.
[0058] For ordinary technicians in this field, other relevant drawings can be obtained based on the above drawings without any creative work. DETAILED DESCRIPTION
[0059] In order to enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention is further described below with reference to the accompanying drawings and through specific implementation methods.
[0060] A two-stage load forecasting method for regional integrated energy systems, such as Figure 1 As shown, the following steps are included:
[0061] S1. Obtain the load data of the area from the historical data of the integrated energy system, and perform data division and processing.
[0062] The data used for day-ahead forecasting is the data of 30 days before the forecast date, sampled every 1 hour, and the data used for intraday forecasting is the data collected in real time two days before the forecast date and on the test day, sampled every 10 minutes; in order to reduce the data scale and facilitate model prediction, all load data are normalized to between 0 and 1. The data set is divided into a training set and a test set.
[0063] S2. Establish the zebra optimization algorithm (ZOA) to optimize the support vector regression (SVR) model for the day-ahead forecast of the regional integrated energy system. The specific process is as follows: Figure 2 As shown, the following steps are included:
[0064] S21, inputting the day-ahead prediction training set data and the day-ahead prediction test set data into the support vector regression model for subsequent optimization;
[0065] S22, initialize the zebra population, set the maximum number of iterations of the zebra optimization algorithm to 300 and the population size to 30;
[0066] Set the objective function of the support vector regression (SVR) model optimized by the zebra optimization algorithm (ZOA). The objective function is the minimum root mean square error between the predicted value and the actual value. The formula is as follows:
[0067]
[0068] Where: P pre is the predicted value of load forecast on the day before, P re is the true value, N is the total number of samples, and the kernel function of the support vector regression model selects the radial basis function, whose formula is:
[0069]
[0070] The support vector regression function is:
[0071]
[0072] In the formula, α i is a constant between [0,C], C is the penalty factor, α i * is the SVR in the solution process i The optimal value of , b is the bias, and n is the number of samples.
[0073] The penalty factor C and kernel function parameter δ of the support vector regression model are taken as parameters to be optimized, and the optimization range of the two parameters is given.
[0074] S23, training and predicting the support vector regression model under the initial zebra population, calculating the objective function value of the initial population, and retaining the optimal individual;
[0075] S24, updating the position of the zebra population according to the foraging behavior, calculating the objective function value predicted by the updated support vector regression model, and retaining the zebra population with a better objective function value;
[0076] The foraging behavior updates the position according to the following formula:
[0077]
[0078] Where: M and R are random numbers between [0,1], t is the current iteration number, T is the maximum iteration number, AZ j is the value of the j-th dimension individual.
[0079] S25, updating the position of the zebra population according to the defensive behavior, calculating the objective function value predicted by the updated support vector regression model, and retaining the zebra individuals with better objective function values;
[0080] The defensive behavior updates the position according to the following formula:
[0081]
[0082] Where M and R are random numbers between [0,1], t is the current iteration number, T is the maximum iteration number, AZ j is the value of the j-th dimension individual.
[0083] S26, determine whether the current number of iterations t is greater than the maximum number of iterations T, if so, the optimization is completed, and the optimal parameters of the output SVR are saved in the workspace; otherwise, the number of iterations is increased by 1 and returns to S24 to continue iterating;
[0084] S27, substituting the optimal parameters obtained by optimization into the SVR model, and obtaining the optimized SVR model for day-ahead load forecasting;
[0085] S28. Output the prediction results and perform denormalization on the data.
[0086] S3. Using the long short-term memory network model as the intraday load forecasting model of the regional integrated energy system for training and forecasting, specifically including the following steps:
[0087] S31, using the load data of the two days before the forecast date as training data, and using the sliding window method to train the LSTM model. The specific expression of the regional integrated energy system load forecasting model is:
[0088] I t =σ(w i x t +v i h t-1 )
[0089] F t =σ(w f x t +v f h t-1 )
[0090] C t =F t *C t-1 +I t *σ(w0x t +v g h t-1 )
[0091] h t =σ(w g xt +v0h t-1 )*tanh(C t )
[0092] Where: I t and F t are the output signals of the input gate and the forget gate respectively; C t-1 and C t are the neuron states at the previous moment and the current moment respectively; h t-1 and h t are the output values of LSTM at the previous moment and the current moment respectively; σ is the sigmoid activation function; x t is the input sequence value; w i and v i 、w f and v f 、w g and v g , w0 and v0 are the weights and biases of the input gate, forget gate, memory unit and output gate respectively.
[0093] S32. Use the trained LSTM model to perform point-by-point real-time prediction on the day to be predicted, and use the true value to update and correct the model state to obtain the daily load power prediction value.
[0094] S4. Reconstruct the day-ahead load forecast and the intraday load forecast results, and output the final load forecast data.
[0095] The specific reconstruction method is as follows: the day-ahead prediction model outputs the load data for 24 hours of the day, with an interval of 1 hour, and the intraday prediction model performs real-time prediction every 10 minutes. If the two prediction time points are repeated, the average value of the two is taken as the prediction value, otherwise the value output by the intraday prediction model is used as the prediction value. Finally, the prediction value of one point every 10 minutes on the test day is obtained.
[0096] Depend on Figure 3 It can be seen that the predicted value is basically consistent with the true value. The prediction accuracy of the method proposed in this scheme is high, which proves the effectiveness and feasibility of this technical scheme.
[0097] The present invention adopts a combination of short-term and ultra-short-term forecasting to consider the changing trend of the load of the integrated energy system under multi-scale conditions and achieve more accurate load forecasting.
[0098] The applicant declares that the above is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Those skilled in the art should understand that any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention shall fall within the protection scope and disclosure scope of the present invention.
Claims
1. A two-stage load forecasting method for a regional integrated energy system, characterized by: The following steps are involved: S1. Obtain the load data of the area from the historical data of the integrated energy system, and divide and process the load data; S2. Introduce the zebra optimization algorithm, establish a support vector regression model optimized by the zebra optimization algorithm, and use the zebra optimization algorithm to optimize the support vector regression model to perform day-ahead forecasting of the regional integrated energy system to obtain day-ahead load forecasting results; S3, using the long short-term memory network model as the intraday load forecasting model of the regional integrated energy system for training and forecasting, and obtaining the intraday load forecasting results; S4. Reconstruct the day-ahead load forecast result obtained in step S2 and the intraday load forecast result obtained in step S3 to obtain final load forecast data.
2. The two-stage load forecasting method for a regional integrated energy system according to claim 1 is characterized in that: The load data is divided into training set data and test set data; the training set data includes day-ahead prediction training set data and intraday prediction training set data; the test set data includes day-ahead prediction test set data and intraday prediction test set data; the day-ahead prediction training set data is the load data of 30 days before the day to be predicted, with a sampling interval of 1 hour; the intraday prediction training set data is the data of two days before the day to be predicted, with a sampling interval of 10 minutes; the day-ahead prediction test set data is the real data on the day to be predicted, with a sampling interval of 1 hour; the intraday prediction test set data is the real data on the day to be predicted, with a sampling interval of 10 minutes.
3. The two-stage load forecasting method for a regional integrated energy system according to claim 1 is characterized in that: The load data processing specifically includes: normalizing all load data to between 0 and 1 using a normalization formula.
4. The two-stage load forecasting method for a regional integrated energy system according to claim 3 is characterized in that: The normalization formula is: Where: x min is the minimum load power, x max is the maximum load power, x i is the load power value before normalization, x ist is the normalized load power value.
5. The two-stage load forecasting method for a regional integrated energy system according to claim 1 is characterized in that: The specific steps of step S2 are: S21, inputting the day-ahead prediction training set data and the day-ahead prediction test set data into the support vector regression model for subsequent optimization; S22, initialize the zebra population, set the maximum number of iterations T and the population size of the zebra optimization algorithm; take the penalty factor C and the kernel function parameter δ of the regression function of the support vector regression model as the parameters to be optimized, and give the optimization range of the two parameters; S23, training and predicting the support vector regression model under the initial zebra population, calculating the objective function value of the initial population, and retaining the optimal individual; S24, updating the position of the zebra population according to the foraging behavior, calculating the objective function value predicted by the updated support vector regression model, and retaining the zebra population with a better objective function value; S25, updating the position of the zebra population according to the defensive behavior, calculating the objective function value predicted by the updated support vector regression model, and retaining the zebra individuals with better objective function values; S26, determine whether the current number of iterations t is greater than the maximum number of iterations T, if so, the optimization is completed, and the optimal parameters of the output SVR are saved in the workspace; otherwise, the number of iterations is increased by 1 and returns to S24 to continue iterating; S27, substituting the optimal parameters obtained by optimization into the SVR model, and obtaining the optimized SVR model for day-ahead load forecasting; S28. Output the prediction results and perform denormalization on the data.
6. The two-stage load forecasting method for a regional integrated energy system according to claim 5 is characterized in that: The objective function of the support vector regression model is the minimum root mean square error between the predicted value and the actual value, and the formula is as follows: Where: F obj is the objective function value, P pre is the predicted value of load forecast on the day before, P re is the true value, N is the total number of samples; The kernel function of the support vector regression model is the radial basis function, and its formula is: Where: x i and x j are any two input values of the SVR model, δ is the bandwidth of the radial basis function; The regression function of the support vector regression model is: Where: α i is a constant between [0,C], C is the penalty factor, α i * is the SVR in the solution process i The optimal value of , b is the bias, and n is the number of samples.
7. The two-stage load forecasting method for a regional integrated energy system according to claim 5 is characterized in that: The foraging behavior updates the position according to the following formula: Where: x i,j is a population individual, r is a random number between [0,1], PZ j is the optimal individual position of the current j-th dimension, and I is a random number between [1,2]. The defensive behavior updates the position according to the following formula: Where: M and R are random numbers between [0,1], t is the current iteration number, T is the maximum iteration number, AZ j is the value of the j-th dimension individual.
8. The two-stage load forecasting method for a regional integrated energy system according to claim 1 is characterized in that: The specific steps of step S3 are: S31. Using the training set data for intraday forecasting, a sliding window method is used to train the intraday load forecasting model of the regional integrated energy system; S32. Use the regional integrated energy system intraday load forecasting model trained in step S31 to perform point-by-point real-time forecasting on the day to be predicted, and use the test set data for intraday forecasting to update and correct the model state, obtain the intraday load power forecast value, and perform denormalization.
9. The two-stage load forecasting method for a regional integrated energy system according to claim 8, characterized in that: The specific expression of the intraday load forecasting model of the regional integrated energy system is: I t =σ(w i x t +v i h t-1 ) F t =σ(w f x t +v f h t-1 ) C t =F t *C t-1 +I t *σ(w0x t +v g h t-1 ) h t =σ(w g x t +v0h t-1 )*tanh(C t ) Where: I t and F t are the output signals of the input gate and the forget gate respectively; C t-1 and C t are the neuron states at the previous moment and the current moment respectively; h t-1 and h t are the output values of LSTM at the previous moment and the current moment respectively; σ is the sigmoid activation function; x t is the input sequence value; w i and v i 、w f and v f 、w g and v g , w0 and v0 are the weights and biases of the input gate, forget gate, memory unit and output gate respectively.
10. The two-stage load forecasting method for a regional integrated energy system according to claim 1, characterized in that: The specific method of reconstructing step S4 is as follows: the day-ahead prediction model outputs the load data for 24 hours of the day at an interval of 1 hour, and the intraday prediction model performs real-time prediction every 10 minutes. If the two prediction time points are repeated, the average value of the two is taken as the prediction value, otherwise the value output by the intraday prediction model is used as the prediction value, and finally the prediction value of one point every 10 minutes on the test day is obtained.