A multivariate prediction method for photovoltaic power in distribution network based on stacked LSTM
By stacking LSTM networks, multi-dimensional predictions of photovoltaic power generation in the Taiwan area distribution network are solved, which solves the problem of threats to grid stability caused by fluctuations in photovoltaic power generation, and improves the prediction accuracy and the ability to accept new energy.
Patent Information
- Application Number
- CN202210001300.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-04
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-01-04
AI Technical Summary
As a large amount of highly volatile photovoltaic power is injected into the power grid, the stability of the grid operation is threatened. Accurate prediction of photovoltaic power is required to ensure the safe and stable operation of the power system and to accept more new energy.
A multivariate prediction method for photovoltaic power in Taiwan's distribution network based on stacked LSTM is adopted. Through data normalization, defining neural networks, generating training and test sets, training stacked LSTM networks, selecting optimal hyperparameters and performance evaluation, the photovoltaic power generation history is used. Data and related information improve forecast accuracy.
It improves the prediction accuracy of photovoltaic power generation in Taiwan's distribution network, provides reliable data for power grid operation, and enhances the power grid's ability to accept new energy.
Smart Images

Figure CN114297943B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power grid operation and control, and in particular relates to a multivariate prediction method for photovoltaic power in a distribution network based on stacked LSTM. Background Art
[0002] The power industry is crucial to the national economy and people's livelihood. With rapid economic development, power load has continued to grow in recent years. The primary form of power generation is coal-fired power.
[0003] Reducing carbon emissions requires not only controlling total electricity usage but also improving electricity production at its source. In recent years, with continued investment in renewable energy, new energy sources such as wind power and photovoltaics have been vigorously developed. However, power system operation requires maintaining power balance throughout the entire generation, transmission, distribution, and utilization process. The influx of large amounts of highly volatile photovoltaic power into the grid inevitably poses a serious threat to grid stability. To address this issue, the power system operation and dispatching center needs to monitor and accurately predict power fluctuations of the power source (i.e., the load) in real time to formulate appropriate operational control plans. Therefore, accurate tracking and forecasting of photovoltaic power generation are necessary to ensure safe and stable operation of the power system while enabling the grid to integrate a higher proportion of renewable energy. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a multivariate prediction method for photovoltaic power of distribution network in substation area based on stacked LSTM to ensure the safety and stability of power system operation.
[0005] The present invention is achieved in this way:
[0006] A multivariate prediction method for photovoltaic power in a distribution network based on stacked LSTM includes the following steps:
[0007] Step 1: Data normalization: Process the original data with a large numerical distribution range so that its numerical range is distributed within a specific range with a smaller numerical range, which is convenient for the algorithm to learn and use.
[0008] Step 2: Define a neural network. Define a neural network G, where the elements of G are a set of hyperparameters related to the training algorithm.
[0009] Step 3: Generate training set R and test set T. Extract validation set V from training set R to evaluate the performance of the neural network, and the remaining data is used to train the neural network.
[0010] Step 4: Train the stacked LSTM network with the hyperparameters set described in step 2 to obtain the training results. N p .
[0011] Step 5: The training results obtained in step 4 P p Perform performance evaluation. Performance evaluation requires calculating the mean absolute error using the validation set V in step 3. e p , which is used as the performance evaluation basis of the stacked LSTM network.
[0012] Step 6: Select the optimal hyperparameters. Select the evaluation metric from the set of all hyperparameters defined in step 2. e p The parameter with the smallest value is taken as the optimal hyperparameter p O ,Right now p O = arg min p∈G { e p}, which is used as the final training parameter.
[0013] Step 7: Network training: Use the training set R to train the neural network determined by the optimal parameters.
[0014] Step 8: Calculate the mean absolute error of the trained neural network using the test set T e p .
[0015] Furthermore, in step 1, the original data is the time series of photovoltaic power generation in the distribution network of the substation area. S P , ambient temperature time series S T and wind speed time series S W The normalization method adopts linear mapping method, and the specific range is usually [0,1]. S P , ambient temperature time series S T and wind speed time series S W , the corresponding relationship between its actual value upper and lower limits and the interval [0,1] is:
[0016] S P : 0 corresponds to 0kW, 1 corresponds to the rated power of the wind turbine P e ;
[0017] S T : 0 corresponds to the local minimum temperature, 1 corresponds to the local maximum temperature;
[0018] S W : 0 corresponds to 0m / s, 1 corresponds to the local maximum wind speed.
[0019] Furthermore, in step 2, the hyperparameter set includes: training cycle, learning rate, convergence condition and adjustment factor.
[0020] Furthermore, in step 2, the neural network is a stacked LSTM neural network, which consists of three layers: LSTM1 layer, LSTM2 layer and full-link layer. The specific form of the neural network is as follows: Figure 1 shown.
[0021] LSTM1 layer: This layer is the first layer of the stacked LSTM neural network, and the number of hidden neurons is H 1. The input of this layer is n Time series of moments x ( n ).
[0022] LSTM2 layer: This layer is the second layer of the stacked LSTM neural network, and the number of hidden neurons is H 2. The input of this layer is the output of the LSTM1 layer.
[0023] Fully connected layer: This layer is a standard feed-forward layer that combines the H The 2 hidden states are fully connected to the scalar output. The output of this layer is the required n + k Photovoltaic power generation at any moment S ( n + k ).
[0024] Input to a stacked LSTM neural network x ( n ) is composed of several time series. Each time series is in the form of a column vector. Input x ( n ) corresponds to a different time series:
[0025] x ( n )= [ S 1( n ) S 2( n ) … S M ( n )] T (1)
[0026] Where: x ( n )forn The amount of input to the stacked LSTM neural network at any given moment; S 1( n ), S 2( n )and S M ( n ) are the first, second and M scalar time series. The number of scalar time series is related to the input feature quantity. If the input is M A scalar time series indicates that the number of input features is M PV power generation time series is usually used as S 1, then S 2~ S M Other factors related to photovoltaic power generation, such as light intensity, temperature, humidity and wind speed.
[0027] The output of the stacked LSTM neural network is n + k Photovoltaic power generation at any moment S ( n + k ).
[0028] Furthermore, in step 3, the validation set may select the latest data in the training set as the target, and train the deep neural network model using earlier data as input.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] The method of the present invention can make full use of the historical data of photovoltaic power generation in the distribution network of the substation and the relevant information affecting the power generation power, and then extract valuable factors reflecting the photovoltaic power generation power, and ultimately improve the prediction accuracy of the photovoltaic power generation power of the distribution network of the substation, provide reliable prediction data for the operation of the power grid, and enable the distribution network of the substation to accept more new energy through flexible adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0032] Figure 1 This is a structural diagram of a stacked LSTM neural network. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0034] A multivariate prediction method for photovoltaic power in a distribution network based on stacked LSTM includes the following steps:
[0035] Step 1: Data normalization: Process the original data with a large numerical distribution range so that its numerical range is distributed within a specific range with a smaller numerical range, which is convenient for the algorithm to learn and use.
[0036] Step 2: Define a neural network. Define a neural network G, where the elements of G are a set of hyperparameters related to the training algorithm.
[0037] Step 3: Generate training set R and test set T. Extract validation set V from training set R to evaluate the performance of the neural network, and the remaining data is used to train the neural network.
[0038] Step 4: Train the stacked LSTM network with the hyperparameters set described in step 2 to obtain the training results. N p .
[0039] Step 5: The training results obtained in step 4 P p Perform performance evaluation. Performance evaluation requires calculating the mean absolute error using the validation set V in step 3. e p , which is used as the performance evaluation basis of the stacked LSTM network.
[0040] Step 6: Select the optimal hyperparameters. Select the evaluation metric from the set of all hyperparameters defined in step 2. e p The parameter with the smallest value is taken as the optimal hyperparameter p O ,Right now p O = arg min p∈G { e p}, which is used as the final training parameter.
[0041] Step 7: Network training: Use the training set R to train the neural network determined by the optimal parameters.
[0042] Step 8: Calculate the mean absolute error of the trained neural network using the test set T e p .
[0043] In step 1, the original data is the time series of photovoltaic power generation in the distribution network of the substation S P , ambient temperature time series S T and wind speed time series S W The normalization method adopts linear mapping method, and the specific range is usually [0,1]. S P , ambient temperature time series S T and wind speed time series S W , the corresponding relationship between its actual value upper and lower limits and the interval [0,1] is:
[0044] S P : 0 corresponds to 0kW, 1 corresponds to the rated power of the wind turbine P e ;
[0045] S T : 0 corresponds to the local minimum temperature, 1 corresponds to the local maximum temperature;
[0046] S W : 0 corresponds to 0m / s, 1 corresponds to the local maximum wind speed.
[0047] In step 2, the hyperparameter set includes: training cycle, learning rate, convergence condition and adjustment factor.
[0048] In step 2, the neural network is a stacked LSTM neural network, which consists of three layers: LSTM1 layer, LSTM2 layer and full-link layer. The specific form of the neural network is as follows: Figure 1 shown.
[0049] LSTM1 layer: This layer is the first layer of the stacked LSTM neural network, and the number of hidden neurons is H 1. The input of this layer is n Time series of moments x ( n ).
[0050] LSTM2 layer: This layer is the second layer of the stacked LSTM neural network, and the number of hidden neurons is H 2. The input of this layer is the output of the LSTM1 layer.
[0051] Fully connected layer: This layer is a standard feed-forward layer that combines the HThe 2 hidden states are fully connected to the scalar output. The output of this layer is the required n + k Photovoltaic power generation at any moment S ( n + k ).
[0052] Input to a stacked LSTM neural network x ( n ) is composed of several time series. Each time series is in the form of a column vector. Input x ( n ) corresponds to a different time series:
[0053] x ( n )= [ S 1( n ) S 2( n ) … S M ( n )] T (1)
[0054] Where: x ( n )for n The amount of input to the stacked LSTM neural network at any given moment; S 1( n ), S 2( n )and S M ( n ) are the first, second and M scalar time series. The number of scalar time series is related to the input feature quantity. If the input is M A scalar time series indicates that the number of input features is M PV power generation time series is usually used as S 1, then S 2~ S M Other factors related to photovoltaic power generation, such as light intensity, temperature, humidity and wind speed.
[0055] The output of the stacked LSTM neural network is n + k Photovoltaic power generation at any moment S ( n + k ).
[0056] In step 3, the validation set can select the latest data in the training set as the target, and train the deep neural network model using earlier data as input.
[0057] This example uses 2019 full-year data from rooftop photovoltaic systems within a specific distribution network. This data includes two commercial buildings and 20 residential buildings. Ten solar radiation intensity sensors were installed. In addition to photovoltaic power output, ambient temperature and wind speed data were also collected. All data was transmitted to a data center database via a data acquisition system. Data collection was performed every hour.
[0058] The data of 10 months, i.e. 300 consecutive days, is used as the training set; the data of the remaining 2 months, i.e. 60 days, is used as the test set. In order to study the performance of the proposed photovoltaic prediction method for the distribution network of the substation, the following three cases are calculated:
[0059] Case 1: The input data is photovoltaic power generation and light intensity, that is x ( n )= [ S 1( n ) S 2( n )] T ;
[0060] Case 2: The input data is photovoltaic power generation and wind speed, that is x ( n )= [ S 1( n ) S 3( n )] T ;
[0061] Case 3: The input data are photovoltaic power generation, light intensity and wind speed, that is x ( n )= [ S 1( n ) S 2( n ) S 3( n )] T .
[0062] Table 1 shows the PV power generation prediction errors for different months under the three aforementioned scenarios. As can be seen from Table 1, when the training data includes only PV power generation and sunlight intensity, the PV power generation prediction error is the lowest. When the training data also includes PV power generation, sunlight intensity, and wind speed data, the prediction accuracy for March, July, and October falls between scenarios 1 and 2, with December achieving the worst prediction accuracy among the three scenarios. This indicates that the factors influencing PV power generation vary with the season. Regardless of season, sunlight intensity is closely correlated with power generation. Wind speed has a more pronounced impact on PV power generation in winter than in spring, summer, and autumn.
[0063] Table 1 Photovoltaic power generation prediction error
[0064]
[0065] The method of the present invention can make full use of the historical data of photovoltaic power generation in the distribution network of the substation and the relevant information affecting the power generation power, and then extract valuable factors reflecting the photovoltaic power generation power, and ultimately improve the prediction accuracy of the photovoltaic power generation power of the distribution network of the substation, provide reliable prediction data for the operation of the power grid, and enable the distribution network of the substation to accept more new energy through flexible adjustment.
[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 and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A multivariate prediction method for photovoltaic power in distribution network based on stacked LSTM, characterized in that: The following steps are involved: Step 1: Normalize the data so that the original data with a larger value distribution range is distributed within a specific value range; Step 2: Define a neural network, where the elements are a set of hyperparameters related to the training algorithm; Step 3: Generate training set R and test set T, extract validation set V from training set R to evaluate the performance of neural network G, and use the remaining data to train neural network G; Step 4: Train the stacked LSTM network with the hyperparameters set described in step 2 to obtain the training results. N p ; Step 5: The training results obtained in step 4 P p Perform performance evaluation. The performance evaluation calculates the mean absolute error of the validation set V in step 3. e p , which is used as the performance evaluation basis of the stacked LSTM network; Step 6: Select the optimal hyperparameters and select the evaluation metric from the set of all hyperparameters defined in step 2 e p The parameter with the smallest value is taken as the optimal hyperparameter p O ,Right now p O = arg min p∈G { e p }, which is used as the final training parameter; Step 7: Use the training set R to train the neural network determined by the optimal parameters; Step 8: Calculate the mean absolute error of the trained neural network using the test set T e p ; In step 1, the original data is the photovoltaic power generation time series of the distribution network in the substation area. S P , Ambient temperature time series S T and wind speed time series S W , the normalization method uses linear mapping method, and the specific range is [0,1]; for the photovoltaic power generation time series of the distribution network in the substation S P , Ambient temperature time series S T and wind speed time series S W , the corresponding relationship between the upper and lower limits of its actual value and the interval [0,1] is: S P : 0 corresponds to 0kW, 1 corresponds to the rated power of the wind turbine P e ; S T : 0 corresponds to the local minimum temperature, 1 corresponds to the local maximum temperature; S W : 0 corresponds to 0m / s, 1 corresponds to the local maximum wind speed; In step 2, the neural network is a stacked LSTM neural network, which consists of three layers: LSTM1 layer, LSTM2 layer and full connection layer. Composition, of which: LSTM1 layer is the first layer of the stacked LSTM neural network, and its number of hidden neurons is H 1, the input of this layer is n Time series of moments x ( n ); The LSTM2 layer is the second layer of the stacked LSTM neural network, and its number of hidden neurons is H 2. The input of this layer is the output of the LSTM1 layer; The fully connected layer is a standard feed-forward layer that converts the H The two hidden states are fully linked to the scalar output, and the output of this layer is the required n + k Photovoltaic power generation at all times S ( n + k ); Input to stacked LSTM neural network x ( n ) is composed of several time series, each of which is in the form of a column vector. x ( n ) corresponds to a different time series: x ( n )= [ S 1( n ) S 2( n ) … S M ( n )] T (1) Where: x ( n )for n The amount of input to the stacked LSTM neural network at any given moment; S 1( n ), S 2( n )and S M ( n ) are the first, second and M scalar time series, the number of scalar time series is related to the input feature quantity; if the input is M A scalar time series indicates that the number of input features is M , the photovoltaic power generation time series is usually taken as S 1, then S 2 ~ S M Other factors related to photovoltaic power generation; The output of the stacked LSTM neural network is n + k Photovoltaic power generation at all times S ( n + k ).
2. The method according to claim 1, characterized in that In step 2, the hyperparameter set includes: training cycle, learning rate, convergence condition and adjustment factor.
3. The method according to claim 1, characterized in that In step 3, the validation set selects the latest data in the training set as the target, and trains the deep neural network model using earlier data as input.
