New energy and load forecasting method based on training simple cyclic unit network model
Based on the new energy and load prediction methods based on the training of simple cycle network models, the problem of high computing complexity, large data demand, and poor model interpretability in existing technologies have been solved, and more efficient and accurate prediction results are achieved.
Patent Information
- Application Number
- CN202411052664.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-08-02
AI Technical Summary
The existing new energy and load prediction methods have problems such as high computational complexity, large data demand, and poor model interpretation, which is difficult to effectively solve the problems of high randomness and volatility on both the supply and demand sides of the power system.
A new energy and load forecasting method based on training a simple cyclic unit network model is adopted, including obtaining power generation equipment data, deleting redundant feature data, normalizing processing, building a Pre-SRU neural network prediction model, and evaluating the prediction through the root mean square error Accuracy.
Improved calculation efficiency, reduced data demand, improved the explanation of the model, realized more accurate new energy and load prediction, and was better than traditional circulating neural network models.
Smart Images

Figure CN118569456B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a new energy and load forecasting method, and in particular to a new energy and load forecasting method based on training a simple cyclic unit network model. Background Art
[0002] With the global climate change, the energy structure is being pushed from high-carbon to low-carbon, clean and renewable; this has further increased the power system's demand for renewable energy. Building a new power system with new energy as the main body is an inevitable requirement for the development of the times.
[0003] As a new energy management model, the new power system organically integrates the four links of energy generation, transmission, consumption and storage. On the supply side, it forms a relatively controllable power generation output through an optimized combination of multiple types of power sources including renewable energy generation and peak-shaving power sources. On the other hand, through demand-side management and demand-side response measures, combined with the orderly charging and discharging of energy storage equipment, it guides users' electricity load to actively track the output of the power generation side.
[0004] In the new power system, the management of each unit is mostly adjusted directly through existing data, and the high randomness and volatility of renewable energy generation and load-side electricity consumption make the "double-sided random problem" of power system supply and demand increasingly prominent: on the one hand, renewable energy generation varies significantly with environmental factors, and it is difficult to form a stable power output curve on the supply side, resulting in random and volatile supply problems; on the other hand, although a number of demand-side management and demand-side response pilot projects have been implemented in recent years, they have not fundamentally changed the random characteristics of users' electricity consumption, and the random problem on the demand side still exists. The existence of the "double-sided random problem" will lead to an unclear actual mapping relationship between computing power and electricity, resulting in poor scheduling effects on each unit in the new power system.
[0005] In view of the high randomness and volatility of both the supply and demand sides of the power system, forecasting technology, as an economical and effective method, can accurately predict future energy demand by analyzing historical data and current trends, which helps to reasonably arrange energy production, storage and distribution, ensure supply and demand balance, and improve energy utilization efficiency. At present, forecasting technology is mainly divided into physical technology, statistical technology and artificial intelligence technology. Among them, artificial intelligence technology describes various complex and nonlinear power generation and consumption data information through machine learning and deep learning, such as the Chinese invention patent application with publication number CN117994069A, entitled A Power System Energy Power Prediction Method, Device and Medium. Common artificial intelligence technologies include recurrent neural network (RNN) model, long short-term memory network (LSTM) model, etc. The RNN model mainly relies on the RNN's ability to process sequence data, and can handle time-dependent data well. This method has high flexibility and good prediction performance, but there are problems of gradient vanishing and gradient explosion; the LSTM model can effectively capture the long-term dependency in the input sequence by introducing memory units and gating mechanisms, improve prediction accuracy, and avoid the problems of gradient vanishing and gradient explosion, but this method has high computational complexity, large data requirements, and poor model interpretability.
[0006] Based on this, the existing prediction methods need to be improved. Summary of the invention
[0007] Technical purpose: In order to overcome the deficiencies in the prior art, the present invention provides a new energy and load forecasting method based on training a simple cyclic unit network model.
[0008] Technical solution: To achieve the above purpose, the new energy and load forecasting method based on training a simple cyclic unit network model disclosed in the present invention comprises the following steps:
[0009] (S1) Obtain the data information of the power generation equipment at each time point and record it as ,in, F a Indicates a Data information of power generation equipment, A Indicates the number of power generation equipment, F a Contains data information obtained at various time points during the power generation process, namely , f r Representative r Data information of power generation equipment at each moment, R The total amount of information for power generation equipment;
[0010] (S2) Deleting redundant feature data and establishing the minimum feature data subset required for the regression prediction task;
[0011] (S3) Normalize the data information obtained by each device at each time point, as shown in the following formula: ,
[0012] In the above formula, X for The representative value in is defined as the eigenvalue before normalization. X max is the maximum value of the eigenvalues before normalization, X min is the minimum value of the eigenvalues before normalization; for The representative value in is defined as the normalized eigenvalue;
[0013] (S4) Constructing the Pre-SRU neural network prediction model;
[0014] (S5) The prediction accuracy of power generation equipment is evaluated using the root mean square error, and the calculation formula is as follows: ,
[0015] in, After normalization, r Data information of power generation equipment at each moment, RMSE It is the prediction accuracy value of power generation equipment. The smaller the RMSE value is, the better the prediction effect is.
[0016] Preferably, in step (S4), constructing the Pre-SRU neural network prediction model includes the following steps:
[0017] (A1) Acquisition phase of the pre-training model: After the feature data is normalized, the feature data of the power generation equipment in the previous B days is taken as the historical feature data and recorded as ,in is the data of the power generation equipment in the previous B days. b day’s characteristic data; perform sliding window processing on the historical characteristic data and set a sample point number of L The window is used to intercept data using a sliding window. The input form of the historical data training set after sliding the window is , where , is the number of future sample points to be predicted, L is the number of historical sample points, n is the total number of samples; the historical data of the device after sliding window is used as the data of the pre-training model. X Input to include L In the isomorphic SRU basic structure connected by the previous and next moments, the forward propagation algorithm formula of the SRU model is as follows: ,
[0018] In the above formula, , , is the parameter matrix, , , , is a parameter vector. The above parameters are all parameters that need to be learned through back propagation during training. To calculate the Hadamard product, that is, multiply the elements at corresponding positions of the matrix; c t is the state unit of the SRU at the current moment, h t is the hidden unit of SRU at the current moment, c t-1 is the output of the state unit of SRU at the previous moment;
[0019] After the hidden layer X The output is represented as: ,
[0020] In the above formula, and They are the state and output of the basic structure of SRU respectively; the output of the hidden layer is input to the fully connected output layer and the output result is calculated, and the model parameters are updated by reducing the loss of the predicted value and the theoretical output value; the pre-trained model parameters are obtained and saved, and prepared as the initial parameters of the fine-tuning stage, in preparation for the real-time update of the model parameters;
[0021] (A2) Model implementation fine-tuning stage: Use the data from the B+1 day to simulate the photovoltaic data received by the power generation equipment in real time. First, the real-time data needs to be preprocessed, and then the preprocessed data is also processed by sliding window so that it can be used as the input of the model. i After obtaining the power generation equipment data in real time, i and before Add data to the historical data set and fine-tune the corresponding parameters in the pre-trained model that has been trained;
[0022] (A3) Prediction stage: The fine-tuned model can be used for subsequent predictions. The photovoltaic equipment status at the moment is predicted, that is, the processed Input into the fine-tuned model for prediction, and get value; repeat the fine-tuning and prediction steps to obtain all the photovoltaic equipment data.
[0023] Preferably, in step (A1), the power generation equipment prediction is suitable for updating the model parameters using a root mean square error function as a loss function. Specifically, the root mean square error is calculated as: .
[0024] The present invention has the following technical effects:
[0025] The calculation of each step of the traditional recurrent neural network needs to rely on the output of the previous moment. This serial network has a slow calculation speed and is difficult to accelerate through parallel computing. The calculation of the SRU's gate control unit only depends on the current input cycle, and only the point-to-point matrix operation needs to rely on the output of the previous moment. Therefore, the network can be accelerated in parallel, thereby improving computing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a comparison chart of photovoltaic power generation prediction results;
[0027] Figure 2 This is a comparison chart of photovoltaic prediction errors between the LSTM model and the Pre-SRU model;
[0028] Figure 3 This is a comparison chart of load power consumption prediction results;
[0029] Figure 4 This is a comparison chart of load prediction errors between the LSTM model and the Pre-SRU model. DETAILED DESCRIPTION
[0030] The following is combined with Figure 1 To Attachment Figure 4 The principles and features of the present invention are described, and the examples given are only used to explain the present invention, rather than to limit the scope of the present invention.
[0031] The new energy and load forecasting method based on training a simple cyclic unit network model includes the following steps:
[0032] (S1) Obtain the data information of the power generation equipment at each time point and record it as ,in, F a Indicates a Data information of power generation equipment, A Indicates the number of power generation equipment, F a Contains data information obtained at various time points during the power generation process, namely , f r Representative r Data information of power generation equipment at each moment, R The total amount of information for power generation equipment.
[0033] (S2) Delete redundant feature data and establish the minimum feature data subset required for the regression prediction task.
[0034] Feature selection is a critical data preprocessing step in machine learning. It is used to find features in the data that are not related to the target value and remove them, thereby reducing the dimension of the data and the complexity of modeling. For a neural network data set, the features of the data can be divided into redundant features, relevant features, and irrelevant features relative to the target value to be predicted. For redundant features, the information they contain can be derived from other related features, so in many cases redundant features can be deleted to establish a minimum feature subset required for the current regression prediction task and simplify the model. Improve the model training speed while maintaining or slightly sacrificing the accuracy of the prediction.
[0035] There are two key issues in the feature selection process: one is the way to select feature subsets, and the other is the way to evaluate the selected feature subsets.
[0036] There are three common strategies for searching feature subsets: forward search, reverse search, and bidirectional search. The bidirectional search is used in this embodiment.
[0037] There are many measurement methods for evaluating the selected feature subset, such as chi-square test, Pearson correlation coefficient, mutual information, etc. In this embodiment, the mutual information measurement method is selected, specifically:
[0038] Mutual information is used to illustrate the interdependence between variables. The mutual information of two discrete random variables X and Y can be expressed as: ,
[0039] In the above, is the joint probability distribution function of X and Y, p ( x )and p ( y ) represent the marginal probability distribution functions of X and Y respectively; it can be seen from the calculation method that mutual information is non-negative, and their mutual information is 0 only when the two variables are independent of each other. Unlike the Pearson correlation coefficient method, mutual information not only considers the linear relationship between features, but also the nonlinear relationship between features. However, mutual information does not take into account the redundant features between information. To address the problem that mutual information does not take into account the redundant features between information, the mRMR method can be used, that is, to find a set of features in the initial feature set that have the greatest correlation with the target value, but the smallest correlation between features (minimum redundancy), where the maximum correlation and minimum redundancy can be expressed as:
[0040] ,
[0041] ,
[0042] in, and Respectively i , j Features, c is the target value, S This method is based on the mutual information between features calculated by mutual information, while ensuring the correlation between features and target values, it reduces the redundancy of features between each other, and can screen out feature subsets with better regression effects. This method is based on the mutual information between features calculated by mutual information, while ensuring the correlation between features and target values, it reduces the redundancy of features between each other, and can screen out feature subsets with better regression effects.
[0043] According to different combination methods, feature selection can be divided into filtering, wrapping and embedded. The filtering feature selection method is independent of the subsequent neural network model and does not rely on the model to evaluate the quality of feature selection. Instead, after calculating the correlation between features and the correlation between features and target values, the important coefficients of different features are judged by the correlation coefficient, and then the threshold of the important coefficient is set or the features are selected from high to low by selecting the number of features. After all features are selected, the filtered features are used to train the neural network model. Since this method does not rely on the learning model, it has low computational cost and fast running speed. Therefore, before training the model in this scheme, the filtering feature selection mode will be used to adopt the mRMR method to select features for the model.
[0044] (S3) Normalize the feature data. The purpose of normalization is to remove the impact of large differences in the value ranges of different data due to different measurement units and types. The data needs to be normalized. This solution will use maximum and minimum normalization to process the data as shown in the following formula:
[0045] ,
[0046] In the above formula, X is the eigenvalue that needs to be normalized, X max is the maximum value of a feature, X min is the minimum value of a feature, is the normalized eigenvalue.
[0047] (S4) Constructing a Pre-SRU neural network prediction model, specifically, comprising the following steps:
[0048] (A1) Acquisition phase of the pre-training model: After the feature data is normalized, the feature data of the power generation equipment in the previous B days is taken as the historical feature data and recorded as ,in is the data of the power generation equipment in the previous B days. b day’s characteristic data; perform sliding window processing on the historical characteristic data and set a sample point number of L The window is used to intercept data using a sliding window. The input form of the historical data training set after sliding the window is , where , is the number of future sample points to be predicted, L is the number of historical sample points, n is the total number of samples; the historical data of the device after sliding window is used as the data of the pre-training model. X Input to include L In the isomorphic SRU basic structure connected by the previous and next moments, the forward propagation algorithm formula of the SRU model is as follows:
[0049] ,
[0050] In the above formula, , , is the parameter matrix, , , , is a parameter vector. The above parameters are all parameters that need to be learned through back propagation during training. To calculate the Hadamard product, that is, multiply the elements at corresponding positions of the matrix; c t is the state unit of the SRU at the current moment, h t is the hidden unit of SRU at the current moment, c t-1 It is the output of the state unit of SRU at the previous moment.
[0051] The power generation equipment prediction is suitable for updating the model parameters using the root mean square error function as the loss function. The specific calculation formula of the root mean square error is:
[0052] .
[0053] After the hidden layer X The output is represented as:
[0054] ,
[0055] In the above formula, and They are the state and output of the basic structure of SRU respectively; the output of the hidden layer is input to the fully connected output layer and the output result is calculated, and the model parameters are updated by reducing the loss of the predicted value and the theoretical output value; the pre-trained model parameters are obtained and saved, and prepared as the initial parameters in the fine-tuning stage to prepare for the real-time update of the model parameters.
[0056] The accuracy of SRU neural network prediction is closely related to the set window length and the number of predicted values. For general time series prediction problems, the longer the window length is set, the larger the time range considered during prediction, the higher the prediction accuracy will be, but the longer the training time will be. When predicting multiple predicted values at the same time, the more steps of advance prediction, the lower the corresponding prediction accuracy will be. In order to consider the timeliness of real-time prediction, the window length needs to be considered comprehensively. The initial setting window length is L =3.
[0057] (A2) Model implementation fine-tuning stage: Use the data from the B+1 day to simulate the photovoltaic data received by the power generation equipment in real time. First, the real-time data needs to be preprocessed, and then the preprocessed data is also processed by sliding window so that it can be used as the input of the model. i After obtaining the power generation equipment data in real time, i and before The data are added to the historical data set and the corresponding parameters in the pre-trained model are fine-tuned.
[0058] (A3) Prediction stage: The fine-tuned model can be used for subsequent predictions. The photovoltaic equipment status at the moment is predicted, that is, the processed Input into the fine-tuned model for prediction, and get value; repeat the fine-tuning and prediction steps to obtain all the photovoltaic equipment data.
[0059] (S5) The prediction accuracy of power generation equipment is evaluated using the root mean square error, and the calculation formula is as follows:
[0060] ,
[0061] in, After normalization, r Data information of power generation equipment at each moment, RMSE It is the prediction accuracy value of power generation equipment. The smaller the RMSE value is, the better the prediction effect is.
[0062] Using the above algorithm, the historical data of a company's photovoltaic collection equipment and the historical data of the park's load power consumption are used as experimental data for the Pre-SRU prediction algorithm, and the time period is selected from April 1, 2024 to April 30, 2024. The prediction results and actual results on May 1, 2024 are used as examples for display and analysis. In order to verify the effect of the model on power generation and consumption forecasting, the historical data from April 1, 2024 to April 30, 2024 are used as training sets to train the model, and the data on May 1, 2024 is used as real-time power generation and consumption data to evaluate the prediction effect of the model. The data is substituted into the established Pre-SRU prediction model for testing. The prediction results of the Pre-SRU model given in this article and the prediction results of the LSTM model are shown in the figure. Figure 1 As shown. Figure 1 A comparison chart of photovoltaic power generation prediction results is given. The horizontal axis represents time, the vertical axis represents power generation in Kw, the blue solid line represents the actual photovoltaic curve, the green solid line represents the Pre-SRU predicted photovoltaic curve, and the red solid line represents the LSTM predicted photovoltaic curve. The curve comparison shows that the predicted photovoltaic curve based on the Pre-SRU model is basically consistent with the actual photovoltaic curve, and the predicted result curve is better than the predicted photovoltaic curve based on the LSTM model.
[0063] Calculate the root mean square error between the predicted value and the actual power generation of photovoltaic power generation equipment using the Pre-SRU and LSTM prediction models during the period from May 1, 2024 to May 10, 2024. The error comparison is as follows: Figure 2 shown. Figure 2 A comparison chart of photovoltaic prediction errors between the LSTM model and the Pre-SRU model is given. The horizontal axis represents time, the vertical axis represents the root mean square error, in Kw, the red solid line represents the root mean square error of photovoltaic prediction by LSTM, and the green solid line represents the root mean square error of photovoltaic prediction by Pre-SRU. The curve comparison shows that the root mean square error of photovoltaic prediction by LSTM is stable at around 2.5, while the root mean square error of photovoltaic prediction by Pre-SRU is stable at around 1.5, so the prediction results of the prediction model based on Pre-SRU in terms of power generation are better than those of the LSTM neural network model.
[0064] Figure 3 A comparison chart of load power consumption forecast results is given. The horizontal axis represents time, the vertical axis represents power generation in Kw, the yellow solid line represents the actual load curve, the green solid line represents the Pre-SRU predicted load curve, and the blue solid line represents the LSTM predicted load curve. The curve comparison shows that the predicted load based on the Pre-SRU model is basically consistent with the actual load curve, and the predicted result curve is better than the predicted photovoltaic curve based on the LSTM model.
[0065] The root mean square error between the predicted value of the power load using the Pre-SRU and LSTM prediction models and the actual power load on the load side from May 1, 2024 to May 10, 2024 is calculated respectively. The error comparison is as follows: Figure 4 shown. Figure 4 A comparison chart of the load forecasting errors of the LSTM model and the Pre-SRU model is given. The horizontal axis represents time, the vertical axis represents the root mean square error, in Kw, the red solid line represents the root mean square error of the LSTM predicted load, and the green solid line represents the root mean square error of the Pre-SRU predicted load. The curve comparison shows that the root mean square error of the LSTM predicted load is stable at around 80, while the root mean square error of the Pre-SRU predicted load is stable at around 50, so the prediction results of the Pre-SRU-based prediction model on power consumption are better than those of the LSTM neural network model.
[0066] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A new energy and load forecasting method based on training a simple cyclic unit network model, characterized in that: The following steps are involved: (S1) Obtain the data information of the power generation equipment at each time point and record it as ,in, F a Indicates a Data information of power generation equipment, A Indicates the number of power generation equipment, F a Contains data information obtained at various time points during the power generation process, namely , f r Representative r Data information of power generation equipment at each moment, R The total amount of information for power generation equipment; (S2) Deleting redundant feature data and establishing the minimum feature data subset required for the regression prediction task; (S3) Normalize the data information obtained by each device at each time point, as shown in the following formula: , In the above formula, X for The representative value in is defined as the eigenvalue before normalization. X max is the maximum value of the eigenvalues before normalization, X min is the minimum value of the eigenvalues before normalization; for The representative value in is defined as the normalized eigenvalue; (S4) Constructing the Pre-SRU neural network prediction model; (S5) The prediction accuracy of power generation equipment is evaluated using the root mean square error, and the calculation formula is as follows: , in, After normalization, r Data information of power generation equipment at each moment, RMSE is the prediction accuracy value of power generation equipment. The smaller the RMSE value, the better the prediction effect. In step (S4), constructing the Pre-SRU neural network prediction model includes the following steps: (A1) Acquisition phase of the pre-trained model: After the feature data is normalized, the feature data of the power generation equipment in the previous B days is taken as the historical feature data and recorded as ,in is the data of the power generation equipment in the previous B days. b day’s characteristic data; perform sliding window processing on the historical characteristic data and set a sample point number of L The window is used to intercept data using a sliding window. The input form of the historical data training set after sliding the window is , where , is the number of future sample points to be predicted, L is the number of historical sample points, n is the total number of samples; the historical data of the device after sliding window is used as the data of the pre-training model. X Input to include L In the isomorphic SRU basic structure connected by the previous and next moments, the forward propagation algorithm formula of the SRU model is as follows: , In the above formula, , , is the parameter matrix, , , , is a parameter vector. The above parameters are all parameters that need to be learned through back propagation during training. To calculate the Hadamard product, that is, multiply the elements at corresponding positions of the matrix; c t is the state unit of the SRU at the current moment, h t is the hidden unit of SRU at the current moment, c t-1 is the output of the state unit of SRU at the previous moment; After the hidden layer X The output is represented as: , In the above formula, and They are the state and output of the basic structure of SRU respectively; the output of the hidden layer is input to the fully connected output layer and the output result is calculated, and the model parameters are updated by reducing the loss of the predicted value and the theoretical output value; the pre-trained model parameters are obtained and saved, and prepared as the initial parameters of the fine-tuning stage, in preparation for the real-time update of the model parameters; (A2) Model implementation fine-tuning stage: Use the data from the B+1 day to simulate the photovoltaic data received by the power generation equipment in real time. First, the real-time data needs to be preprocessed, and then the preprocessed data is also processed by sliding window so that it can be used as the input of the model. After obtaining the power generation equipment data in real time, and before Add data to the historical data set and fine-tune the corresponding parameters in the pre-trained model that has been trained; (A3) Prediction stage: The fine-tuned model can be used for subsequent predictions. The photovoltaic equipment status at the moment is predicted, that is, the processed Input into the fine-tuned model for prediction, and get value; repeat the fine-tuning and prediction steps to obtain all the photovoltaic equipment data.
Citation Information
Patent Citations
Method and device for predicting new energy power of power system and medium
CN117994069A
Method and device for predicting short-term load
CN113158572A
Distributed micro-grid voltage multi-layer cooperative control method
CN113346543A