A distributed regional power generation prediction method based on stacked integrated model

By adopting a stacked integrated model method in photovoltaic power prediction, combined with CNN, LSTM and GRU networks, the problem of difficulty in capturing the spatiotemporal characteristics of sub-regions is solved in the existing technology, and a higher accuracy photovoltaic power prediction is achieved, supporting more accurate energy management and grid operations.

CN118863121BActive Publication Date: 2025-04-29QINGXIN COUNTY XINNENG POWER ENG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410828162.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2025-04-29
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

Existing photovoltaic power prediction methods are difficult to accurately capture the spatiotemporal characteristics and synergies between sub-regions, resulting in insufficient prediction accuracy and affecting the safety and energy management of the power grid.

Method used

Using a stacked ensemble model-based method, the large area is divided into multiple sub-regions, and the characteristics of the power generation power of the sub-region are extracted through the CNN and LSTM networks combined with the multi-head attention mechanism, and the GRU network is used as a meta-model for prediction to improve the accuracy of the prediction.

Benefits of technology

By combining the spatiotemporal characteristics and synergistic effects between sub-regions, the accuracy of photovoltaic power generation prediction is significantly improved, helping grid operators and energy managers to make more accurate decisions and optimize power scheduling and market operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118863121B_ABST
    Figure CN118863121B_ABST
Patent Text Reader

Abstract

The present invention discloses a distributed regional power generation prediction method based on a stacked integrated model. The prediction method uses a CNN network and an LSTM network as basic models, and combines a multi-head attention mechanism to perform comprehensive feature weighted fusion, which can not only learn the spatial dependency in the input sequence, capture local structural features, but also capture the short-term dependency in the sequence; at the same time, the meta-model adopts a GRU network to avoid the risk of overfitting, and has efficient computing performance, sensitivity to rapid changes and short-term patterns, the ability to adapt to differences in different regions, and the ability to comprehensively consider sub-regional prediction results. In addition, by selecting representative power stations through the GAT network, the power stations can better learn the spatiotemporal feature information of other power stations in the region and the feature information of the power stations themselves, and can better select power stations that represent the photovoltaic power generation situation of the entire sub-region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of photovoltaic prediction of new energy power generation, and specifically relates to a distributed regional power generation power prediction method based on a stacking integrated model. Background Art

[0002] It is estimated that by 2050, the global population will reach 9.6 billion, which will further increase the global demand for energy and promote a substantial increase in electricity production around the world. According to statistics from the National Energy Administration of China, the total installed capacity of China's grid-connected wind power and solar power generation will exceed 800 million kilowatts, 900 million kilowatts and 1 billion kilowatts from 760 million kilowatts at the end of 2022, reaching 1.05 billion kilowatts at the end of 2023, accounting for 36% of the total installed capacity, an increase of 6.4 percentage points year-on-year. The scale of grid-connected solar power generation will increase from 390 million kilowatts at the end of 2022 to 610 million kilowatts at the end of 2023. Among them, distributed photovoltaic power generation has entered a period of rapid industrial development in recent years. Data show that in 2021, China's new distributed photovoltaic installed capacity exceeded centralized photovoltaic for the first time, with distributed photovoltaic adding 29.28 million kilowatts, accounting for about 55% of all new photovoltaic power generation installed capacity. In 2022, distributed development will become the main mode of wind power and photovoltaic development, with 51.11 million kilowatts of new installed capacity of distributed photovoltaic, accounting for more than 58% of the new installed capacity of photovoltaic that year. By the end of September 2023, the cumulative installed capacity of household distributed photovoltaic in China will exceed 100 million kilowatts and reach 105 million kilowatts. With the continuous increase in the proportion of distributed photovoltaic installed capacity, the random fluctuations and non-stationarity of photovoltaic power generation caused by complex weather and other factors are becoming stronger and stronger, fundamentally threatening the security of the power grid, and seriously hindering the goal of real-time data collection, perception and processing capabilities, achieving the observable, measurable, adjustable and controllable of massive resources, and improving the coordinated interaction capabilities of power supply, energy storage, load and power grid. According to statistics from the National Energy Administration of China (NEA), photovoltaic power generation reached 325.9 billion kWh, a year-on-year increase of 25.1%, and the utilization rate of photovoltaic power generation reached 98.0%, but the amount of solar energy wasted was about 6.52 billion kWh. Therefore, it is urgent to improve the accuracy of regional photovoltaic power generation power forecasting. Accurately predicting the total power of regional photovoltaic power generation can help plan and schedule energy supply, ensure adequate supply and reasonable distribution of energy, and thus improve the reliability and stability of the power grid.

[0003] There are three main methods for regional power generation prediction: accumulation method, extrapolation method and statistical scaling method. The accumulation method predicts the power of all individual photovoltaic power stations in the entire large area, and then directly adds them up to get the regional prediction result. This method is very simple to implement, but the problem is also very obvious. There are many photovoltaic power stations in a large area. If one of the power stations has a large error in the prediction process, the error will gradually increase during the accumulation process. In addition, each power station is distributed in different areas, which also leads to different characteristics. It is necessary to build features for each power station, resulting in a lot of workload. The extrapolation method first divides the distributed photovoltaic power stations in the entire area into several sub-areas. Secondly, select the historical data most similar to the current irradiance as the matching object to predict the output value of each sub-area. Finally, the output value of the entire area is obtained by summing the output values ​​of each sub-area. The statistical scaling rule divides the large area into multiple sub-areas, selects the most representative power station from multiple power stations in the sub-area, and then predicts the power of each representative power station separately. Finally, the regional photovoltaic power generation is obtained according to the proportion of the power generation of the benchmark photovoltaic power station in the photovoltaic power station group in each sub-area.

[0004] Compared with the superposition method and the extrapolation method, the statistical scaling method has higher accuracy, but when selecting representative power stations, it often only considers the correlation between the representative power station and the total regional power, while ignoring the spatial correlation between the representative power station and other power stations in the sub-region, which also leads to the underutilization of data from other power stations and limits the improvement of prediction accuracy. For example, in a sub-region, each power station has different capacity and installed capacity, or the geographical location and environmental conditions of each power station may lead to uneven resource distribution. In the calculation of correlation, power stations with large capacity and power stations occupying resource-rich areas will have obvious advantages, and the representative power station selected by this method cannot represent the entire sub-region well. Because this ignores the spatial correlation between the representative power station and other power stations in the sub-region. Each power station may have different locations and relationships in space, and these relationships have an important impact on the power characteristics of the entire sub-region. The method that only considers the correlation of total regional power may not capture this spatial correlation, resulting in the selected representative power station being unable to fully reflect the characteristics of the entire sub-region.

[0005] Compared with the accumulation method and the extrapolation method, the statistical scaling method is more suitable for regional photovoltaic power generation prediction. However, because different photovoltaic power stations may be affected by different environmental conditions and other factors, the selected benchmark photovoltaic power station may not fully represent the characteristics and changes of all photovoltaic power stations in the entire sub-region; at the same time, the operation and maintenance of photovoltaic power stations may cause changes in the power generation capacity between different power stations, and the power generation ratio of the benchmark photovoltaic power station may change over time, which will affect the estimation of the ratio of the benchmark photovoltaic power station; in addition, extrapolating the photovoltaic power generation of the entire region based on the ratio cannot combine the spatiotemporal characteristics and synergy effects between sub-regions, resulting in inaccurate predictions. Summary of the invention

[0006] The accuracy of large-area photovoltaic power generation prediction is crucial for energy planning and operation management. In order to ensure reliable energy supply and effective operation decisions, a higher-precision model is needed to predict large-area photovoltaic power generation. Based on the statistical scaling method, the large area is divided into multiple sub-areas. In order to better capture the shared characteristics and similarity relationships between sub-areas, the present invention adopts a combined model based on a stacked integrated model to predict large-area photovoltaic power generation.

[0007] In a first aspect, the present invention provides a distributed regional power generation prediction method based on a stacking integrated model, which comprises the following steps:

[0008] Step 1: Divide the measured area into multiple sub-areas. Use the historical data of the power stations in the measured area as the data set, which includes the power generation x of each power station, the total power generation of the sub-areas, the total power generation of the measured area, and multiple influencing features H.

[0009] Step 2: Select one or more key features h from the influencing features H according to the degree of correlation with the power output.

[0010] Step 3: Normalize the power generation x of the power station, the total power generation of the sub-region, the total power generation of the measured area, and the key feature h. Divide the normalized data set into a training set and a test set.

[0011] Step 4: Build a stacked ensemble model

[0012] The stacked integrated model includes a basic model and a meta-model; the basic model takes the key features of a representative power station as input, extracts features through a CNN network and an LSTM network respectively, and uses a multi-head attention mechanism to weight and fuse the output features of the CNN network and the LSTM network; the high-level features extracted by the multi-head attention mechanism are converted into the sub-region predicted total power of the final prediction output through a fully connected layer. The meta-model uses a GRU network; the meta-model takes the predicted total power of each sub-region output by the basic model as a new feature of the input, and the predicted value of the predicted total power of the measured area is the output.

[0013] Step 5: Use the training set to train the basic model, and input the test set into the trained basic model output to obtain the predicted total power generation of the sub-region; combine the predicted total power generation output by the basic model, the training set and the test set to jointly train the meta-model.

[0014] Step 6: Select a representative power station in each sub-region and obtain the corresponding historical power generation and key parameters. Input the historical power generation and key parameters of the representative power station into the basic model to predict the future total power generation of the sub-region. After inputting the predicted future total power generation of all sub-regions into the meta-model, the future total power generation of the measured area is predicted.

[0015] Preferably, in step 6, the method for selecting the representative power station in the sub-region is: constructing a GAT network for each sub-region, predicting the power generation of the power station in the sub-region in the corresponding time period by inputting key parameters, comparing the predicted power generation with the actual power generation, and taking the power station with the smallest error as the representative power station in the sub-region.

[0016] Preferably, in step 1, the influencing feature H includes multiple ones of wind speed, atmospheric temperature, irradiance, wind direction, maximum wind speed, air pressure, probe 1 temperature and probe 2 temperature.

[0017] Preferably, in the step 1, the outliers in the data set are identified and removed by the 3-sigma criterion; after removing the outliers in the data set, the Hermite interpolation method is used to estimate reasonable values ​​at the positions corresponding to the outliers based on normal values ​​and corresponding derivative information.

[0018] Preferably, in step 2, the method for selecting key features is as follows:

[0019] MIC correlation and Pearson correlation coefficient were used for feature selection. The MIC correlation calculation formula is as follows:

[0020]

[0021] Among them, MIC(x,H) is the maximum information coefficient; I(x,H) is the mutual information between power x and influencing feature H; e and f are the rows and columns of the grid respectively; D is a constant, and its value is set to 0.6 of the number of power stations in the dataset.

[0022] The Pearson correlation coefficient calculation formula is as follows:

[0023]

[0024] Among them, ρ x,H is the Pearson correlation coefficient; cov(x,H) is the covariance of power x and influencing feature H; σ x and σ H are the standard deviation of power x and impact feature H respectively.

[0025] According to the calculated Pearson correlation coefficient ρ x,H And the maximum information coefficient MIC(x,H) selects the key feature h.

[0026] As a preferred method, the method for selecting the key feature h is: selecting the Pearson correlation coefficient ρ x,H The influencing features corresponding to the maximum information coefficient MIC(x,H) greater than 0.4 and greater than 0.1 are taken as the key features h.

[0027] Preferably, in step 3, the normalization formula is as follows:

[0028]

[0029] Among them, a' is the normalized data; a is the original data; a max is the maximum value in the original data; a min is the minimum value in the original data.

[0030] Preferably, in step six, the power generation of the measured area in the next 1 hour to 5 hours is predicted.

[0031] Preferably, in the step three, after normalization, the data set is divided into four seasons: spring, summer, autumn and winter, and the corresponding models are obtained through training.

[0032] In a second aspect, the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the memory stores the computer program; and the processor executes the aforementioned regional power generation prediction method.

[0033] In a third aspect, the present invention provides a readable storage medium storing a computer program; when the computer program is executed by a processor, it is used to implement the aforementioned regional power generation prediction method.

[0034] The present invention has the following beneficial effects:

[0035] 1. The present invention adopts a stacked integrated model to predict the distributed regional photovoltaic power generation, predicts the sub-regional power generation through the basic model, and uses the output of the basic model as the input of the meta-model to predict the power generation of the measured area. It better solves the problem that the traditional prediction method cannot combine the spatiotemporal characteristics and synergistic effects between sub-regions, and improves the accuracy of the prediction results.

[0036] 2. The present invention uses CNN network and LSTM network as basic models, and combines multi-head attention mechanism to perform comprehensive feature weighted fusion, which can not only learn the spatial dependency in the input sequence and capture the local structural features, but also capture the short-term dependency in the sequence, making it more accurate in the sub-region photovoltaic power generation prediction; at the same time, the meta-model adopts GRU to avoid the risk of overfitting, and has efficient computing performance, sensitivity to rapid changes and short-term patterns, the ability to adapt to the differences between different regions, and the ability to comprehensively consider the sub-region prediction results.

[0037] 3. The present invention uses the GAT network to select representative power stations, so that the power stations can better learn the spatiotemporal characteristic information of other power stations in the area and the characteristic information of the power stations themselves, and adaptively model the contributions of different neighboring power stations based on the introduced multi-head attention mechanism. This method selects the power station with the highest prediction accuracy, which can better represent the photovoltaic power generation situation of the entire sub-region.

[0038] 4. The present invention provides accurate large-area power forecasts, which helps grid operators, energy managers and investors make accurate decisions, optimize power dispatching and market operations, and achieve reliable power supply and energy planning. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a flow chart of photovoltaic power prediction of the present invention.

[0040] Figure 2 This is a structural model diagram of the CNN unit of the present invention.

[0041] Figure 3 This is a diagram of the LSTM unit structure model of the present invention.

[0042] Figure 4 This is a model diagram of the multi-head attention mechanism of the present invention.

[0043] Figure 5 This is a diagram of the parallel training structure of the present invention.

[0044] Figure 6 This is a comparison chart of the -1h spring forecast results for a large area. DETAILED DESCRIPTION

[0045] The present invention will be further described below in conjunction with the accompanying drawings.

[0046] like Figure 1 As shown, a distributed regional power generation prediction method based on a stacked integrated model includes the following steps;

[0047] Step 1: Obtain and process the dataset

[0048] The large area (predicted area) is divided into multiple sub-areas according to the longitude and latitude and geographical location. The historical data of the power station in the measured area in different time periods are used as the data set. The historical data includes the power generation x of the power station, the total power generation of the sub-area, the total power generation of the large area and the influencing feature H. The influencing feature H includes wind speed, atmospheric temperature, irradiance, wind direction, maximum wind speed, air pressure, probe 1 temperature and probe 2 temperature; probe 1 temperature and probe 2 temperature are used to detect the temperature of the photovoltaic panel. The outliers in the data set are identified and removed by the 3-sigma criterion. After removing the outliers in the data set, the Hermite interpolation method is used to estimate the reasonable value at the position corresponding to the outlier based on the normal value and the corresponding derivative information.

[0049] Step 2: Select key features

[0050] Since there are a large number of potential influencing features, feature selection is needed to screen out features that are strongly correlated with power output and reduce the interference of redundant information and noise. Selecting highly correlated features as input can better capture the influencing factors of power and improve the accuracy and interpretability of the prediction model. MIC (maximum information coefficient) correlation and Pearson correlation coefficient are used for feature selection.

[0051] As a non-parametric correlation measure, MIC correlation can discover any type of variable association, including nonlinear relationships. This makes it possible to discover complex associations hidden in photovoltaic power generation data and help find features that are strongly correlated with power output without being restricted by feature distribution assumptions. The MIC correlation calculation formula is as follows:

[0052]

[0053] Among them, MIC(x,H) is the maximum information coefficient; I(x,H) is the mutual information between power x and influencing feature H; e and f are the rows and columns of the grid respectively; D is a constant, and its value is set to 0.6 of the number of power stations in the dataset.

[0054] The Pearson correlation coefficient is a common linear correlation measure that is suitable for measuring the strength of a linear relationship. By using the Pearson correlation coefficient, features with a high linear correlation with power output can be identified. The Pearson correlation coefficient calculation formula is as follows:

[0055]

[0056] Among them, ρ x,H is the Pearson correlation coefficient; cov(x,H) is the covariance of power x and influencing feature H; σ x and σ H are the standard deviation of power x and impact feature H respectively.

[0057] The influencing features corresponding to the Pearson correlation coefficient greater than 0.4 and the maximum information coefficient greater than 0.1 are selected as the key features h.

[0058] In this embodiment, the data set used is a spring data set.

[0059] Step 3: Normalization

[0060] The power generation x of the power station, the total power generation of the sub-region, the total power generation of the large region and the key feature h are normalized to effectively reduce the scope of the original data, so as to better extract data information and enhance the correlation between features. The normalization formula is as follows:

[0061]

[0062] Among them, a' is the normalized data; a is the original data; a max is the maximum value in the original data; a min is the minimum value in the original data.

[0063] The normalized dataset is divided into training set, test set and validation set in a ratio of 8:1:1.

[0064] Step 4: Build a model to predict the total power generation in a large area

[0065] 4-1. Build a network to obtain representative power stations in sub-regions

[0066] A GAT network (graph attention network) is constructed in each sub-region. By inputting key parameters, the power generation of the power station in the sub-region for the time period is predicted, and the power station with the best prediction result in the sub-region is selected as the representative power station of the sub-region. GAT is a model based on graph neural network. In order to better capture the spatiotemporal information between related power stations in the sub-region and the characteristic information of the power station itself, an attention mechanism is introduced between nodes. Compared with GCN's simple average aggregation of neighboring nodes, GAT calculates the attention weights between each node and its neighboring nodes, learns different attention weights in parallel from different angles, and automatically learns the weight of each power station according to the relationship and characteristics between the nodes, and performs weighted aggregation on the neighboring nodes. This enables GAT to adaptively model the contribution of different nodes to neighboring nodes and capture the local structure in the graph more flexibly.

[0067] The power stations in the sub-region are taken as nodes, and the key features of the nodes are As the input of the GAT network; where F is the dimension of the key feature; i = 1, 2, ..., s; s is the number of nodes. The attention coefficient e between different nodes i and j ij for:

[0068]

[0069] Among them, a is a feedforward neural network; W is the weight matrix; and are the key features of nodes i and j respectively.

[0070] Use the normalized exponential function (softmax) and the LeakyReLU activation function to adjust the attention coefficient e ij Processing, attention coefficient α after processing ij The expression is:

[0071]

[0072] Among them, N i is the number of other nodes in the sub-region corresponding to node i; k = 1, 2..., N i ; exp(·) is the exponential symbol; is the transpose of the weight vector of the feedforward neural network a.

[0073] According to the calculated attention coefficient e ij Get the new feature h' of the node:

[0074]

[0075] Among them, σ is the activation function; K is the number of groups of the attention mechanism; b = 1, 2..., K.

[0076] The newly generated node features The predicted power generation of the power station in the sub-region is obtained by inputting it into the linear layer of the GAT network. The predicted power generation is compared with the actual power generation, and the power station with the smallest error is selected as the representative power station in the sub-region.

[0077] 4-2. Building a stacked ensemble model

[0078] The stacked ensemble model improves the overall prediction performance by combining multiple basic models. The main idea is to use the prediction results of the basic model as input features, and then use another meta-model to make the final prediction. The algorithm can effectively combine the advantages of multiple models. Because it integrates the prediction results of multiple basic models, it can better adapt to new and unseen data. This generalization ability enables the model to show high prediction ability and more reliability when facing different sub-regional photovoltaic power generation scenarios. At the same time, the algorithm can be easily extended to more basic models, and adjusted and improved as needed, making it more scalable and flexible.

[0079] 4-2-1. Construction of a basic model for predicting the total power generation in a sub-region

[0080] like Figure 2 , 3As shown in Figures 4 and 5, the CNN-LSTM-Multi-Head-Attention parallel multi-channel model is used as the basic model, and the historical power generation and key parameters of the representative power station in the sub-region are used as the input of the basic model. The output of the basic model is the total power generation of the future sub-region. CNN can extract spatial features from the data, while LSTM can selectively remember and forget past information by using memory units and gating mechanisms. This enables the model to better capture the long-term patterns and trends in the total power data of the sub-region, and the total power data of the sub-region may have spatial correlation with the representative power station data, that is, the power values ​​of adjacent sub-regions may be similar or related. The LSTM model can process time series and spatial correlation at the same time through its recursive structure, so as to more effectively use the correlation between sub-regions for prediction. The outputs of the CNN and LSTM models are merged through the multi-head attention mechanism. The multi-head attention mechanism can weight and fuse different feature subspaces, so that the model can better focus on important features and spatiotemporal relationships. The output of the multi-head attention mechanism is mapped to the final prediction result through the fully connected layer. The fully connected layer can combine and transform features, converting the high-level features extracted by the multi-head attention mechanism into the final prediction output, that is, the total power predicted by the sub-region. This structure has strong expressive power, can adapt to complex power plant data patterns, and output accurate prediction results. This mechanism enhances the model's perception of key features in power plant data and improves the accuracy and robustness of predictions.

[0081] The feature extraction function of CNN also plays a significant role in time series data. Time series data usually contains complex patterns and structures. Through the stacked convolution operations of CNN, the spatial features between data can be captured more quickly and conveniently. At the same time, a certain moment in the time series data is usually related to its nearby moments. The convolution operation can capture local dependencies when processing time series data. By defining the appropriate convolution kernel size, the local patterns and pattern evolution in the time series data can be effectively captured. By using convolution kernels of different sizes or multi-layer convolution, CNN can achieve multi-scale representation of time series data. Smaller convolution kernels can capture detailed features, while larger convolution kernels can capture more macro trend features. Multi-layer convolution can gradually extract the abstract features of time series data, thereby achieving modeling of time scales at different levels. The CNN convolution operation formula is:

[0082]

[0083] Among them, Y[i] is the output sequence of the convolution operation; k0 is the convolution kernel size; w represents the offset of the pooling window sliding in the input data; X[i] is the input data of the convolution operation; W is the weight of the convolution sum; and n is the sequence index.

[0084] The formula for the pooling operation is:

[0085]

[0086] Among them, Z[n] is the output sequence of the pooling operation; p is the pooling window size; s is the stride of the pooling window.

[0087] LSTM stores and updates information through memory cells. The unit consists of a forget gate, input gate, and output gate, each of which has a learnable weight that determines whether to pass and update information. The forget gate determines whether previously stored memories are forgotten, the input gate determines how new information is integrated into the memory, and the output gate determines how much of the output memory is passed to the next time step. The key to LSTM is its ability to effectively update and retain long-term memories. Through the control of the forget gate and input gate, LSTM can selectively forget or store information, making it more accurate when dealing with long-term dependencies. This enables LSTM to capture important patterns and structures in time series data without being limited by gradient vanishing or exploding. Similar to CNN, LSTM can also gradually extract more abstract features through multi-layer stacking. Each layer of LSTM can capture different levels of time scales, from lower-level detailed features to higher-level abstract features. This multi-layer structure helps LSTM to have a deeper understanding and modeling of time series data. The formula for each state at time t is as follows:

[0088] i t =σ(W i x t +U i h t-1 +b i )

[0089] f t =σ(W f x t +U f h t-1 +b f )

[0090] o t =σ(W o x t +U o h t-1 +b o )

[0091]

[0092] h t =o t ⊙tanh(c t )

[0093] Among them, i t ,f t ,c t ,o t ,h t They are the states of the input gate, forget gate, memory unit, output gate, and hidden layer at time t respectively; is the candidate cell state; W i ,W f ,W O ,W c are the weight matrices of the input gate, forget gate, output gate, and memory unit respectively; U i ,U f ,U O ,U c is the weight matrix of the hidden layer; b i ,b f ,b O is the bias value; ⊙ is the logical operator.

[0094] Memory unit c t Updated through the forget gate and input gate. The forget gate determines how many memory units c of the previous moment are retained t-1 The input gate determines how much new information Added to the memory cell state.

[0095] The outputs of the two networks are weighted and merged through the multi-head attention mechanism to achieve deep fusion of temporal and spatial information. In the multi-head attention mechanism, each attention head has an independent weight allocation mechanism, which determines the degree of attention each head pays to the input. Each attention head generates a weight coefficient vector, which is used to weighted sum the input to obtain the representation result of the head, so that multiple attention heads can learn different attention patterns on different feature subspaces and provide diversified information expression. The calculation formula of the multi-head attention mechanism is as follows:

[0096] MultiHead(Q,K,V)=Concat(head1,head2,...,head h )W O

[0097]

[0098] Where Q, K, V are query vectors, key vectors, and value vectors respectively; h is the number of heads; head i is the output of the i-th head; W o is the output transformation matrix; is the query, key and value matrix of the ith head, d kis the dimension of the key vector; Attention(·) is the attention calculation function; Softmax is the similarity normalization.

[0099] 4-2-2. Construction of a meta-model for predicting total power generation in a large region

[0100] The GRU (Gated Recurrent Unit) network is used as the meta-model, and the prediction results of the basic model are used to input into the meta-model to predict the total power generation of a large area in the future. Compared with LSTM, GRU has fewer gated units and can more effectively capture the rapid changes and short-term patterns in the power data of a large area; at the same time, large areas may have large differences due to factors such as geographical location and weather. The GRU model can better adapt to the differences between different regions and can quickly adapt to changes in different regions. When predicting the power of a large area, it can more accurately capture the characteristics and change patterns of different regions. In addition, GRU can comprehensively consider the prediction results from sub-regions, weigh and adjust according to the prediction results of the sub-regions, and predict the power of the entire large area, thereby improving the accuracy of the entire large area. The calculation formula of the GRU network is as follows:

[0101] z t =σ(W z (h t-1 ,x t )+b z )

[0102] r t =σ(W r (h t ,x t )+b r )

[0103]

[0104] Among them, z t is the update gate; r t To reset the gate; is the candidate hidden state; is the final updated state; σ is the activation function; x t is the input of the current time step; h t is the hidden state of the current time step; b z ,b r ,b g is the bias value at the corresponding moment; W z ,W r ,W h is the weight parameter.

[0105] Step 5: Training the model

[0106] 5-1. Use the training set to train the GAT network.

[0107] 5-2. Use the training set to train the two groups of models of the basic model in parallel, and predict the total power of the sub-region after 1h, 3h and 5h respectively; effectively integrate the feature representations learned by the two by combining the multi-head attention mechanism. The mutual improvement of CNN and LSTM in expression level is achieved: CNN is good at extracting spatial features, and LSTM is good at capturing the laws of time evolution; through parallel training, the two can influence each other's learning optimization direction and give full play to the advantages of their respective network structures in extracting spatiotemporal information. Input the test set into the trained basic model to obtain the predicted total power generation of the sub-region.

[0108] 5-3 The meta-model is trained by combining the predicted total power output by the trained basic model, the training set and the test set.

[0109] Step 6: Use the test set to test the model for predicting the total power generation in a large area

[0110] The validation set is input into the GAT network to predict the power generation of each power station in the sub-region in the corresponding time period. The predicted power generation is compared with the actual power generation, and the power station with the smallest error is selected as the representative power station of the sub-region. The historical power generation and key features of the representative power station in the sub-region are used as the input of the basic model to output the predicted total power generation of the sub-region in the future. The output results of multiple basic models are used as new features of the meta-model input data, and the characteristics and spatiotemporal characteristics of each sub-region are taken into consideration in the meta-model. The outputs of different sub-regions are further integrated and combined to better predict the total power generation of a large region.

[0111] The mean absolute error (MAE) is used as the evaluation index of the prediction results to evaluate the prediction results of the proposed model, CNN-LSTM-multi-head attention and BiLSTM-CNN in different seasons and time scales. The calculation formula of MAE is as follows:

[0112]

[0113] Where m is the number of samples; y i is the true value; is the predicted value.

[0114] from Figure 6It can be seen that both the method proposed in this embodiment and other classic models and traditional methods can capture the trend of photovoltaic power generation. This shows that they can provide a certain degree of prediction accuracy under normal circumstances. In extreme weather conditions, the fluctuation of photovoltaic power generation is abnormally obvious. Compared with other methods, the method proposed in this embodiment can more accurately capture the detailed characteristics of the data and show a better fitting effect at the turning point of the curve. This means that this method can more accurately predict the changes in photovoltaic power generation at different time points and can capture the turning point of the power curve. The data in Table 1 also directly proves the effectiveness and feasibility of the model in this paper. When ensuring that the hyperparameters, number of neural network layers, and number of training times of the model are basically the same, the model in this embodiment is not only better than other models in terms of R2, MAE, and RMSE indicators, but also takes less time than other models. The two models, BiLSTM-CNN (series) and CNN-LSTM-MultiHeadAttention (series), both perform well in the prediction of a single photovoltaic power station, but do not achieve good results when used as metamodels to predict power in a large area. This also reflects from the side that the selection of the basic model and the metamodel cannot be based on past experience to select a combination of classic models, but should consider the adaptability between the basic model and the metamodel. If there is a mismatch or incoordination between the basic model and the metamodel, the prediction accuracy will decrease. In addition, compared with the extrapolation method, the method proposed in this embodiment has a higher accuracy rate.

[0115] Table 1

[0116] Model R2 MAE RMSE Average time This embodiment model 0.9995 3.9095 6.4404 47.45 BiLSTM-CNN(string) 0.9934 12.5223 23.0723 435.65 CNN-LSTM-MultiHeadAttention(string) 0.9916 13.471 26.0175 85.35 Extrapolation 0.9991 5.5047 7.8745 /

[0117] In the basic model selection process, the proposed model is compared with the CNN-GRU-Multi-Head-Attention (parallel) model and the CNN-BiLSTM-Multi-Head-Attention (parallel) model to conduct a comparative experiment on the power generation in area A in spring one hour after prediction. The detailed experimental data are shown in Table 2:

[0118] Table 2

[0119]

[0120] It can be seen from the experimental data in the table that the basic model proposed in this embodiment is significantly better than the other two models in terms of R2, MAE, and RMSE indicators. From the R2 indicator, it can be seen that the fitting degree of the model in this embodiment is better than the other two models. This also indirectly confirms that the MAE and RMSE of the model are smaller than those of the other two models, and the prediction accuracy is higher than that of the other two models.

Claims

1. A distributed regional power generation prediction method based on a stacked integrated model, characterized in that: The following steps are involved: Step 1: Divide the measured area into multiple sub-areas; use the historical data of the power stations in the measured area as the data set, which includes the power generation of each power station. x , total power generation of the sub-region, total power generation of the measured region and multiple influencing characteristics H ; Step 2: According to the degree of correlation with power output, from the influencing characteristics H Select one or more key features h ; Step 3: The power generation capacity of the power station x , total power generation of sub-regions, total power generation of the measured area and key characteristics h Perform normalization processing; divide the normalized data set into a training set and a test set; Step 4: Build a stacked ensemble model The stacked integration model includes a basic model and a meta-model. The basic model takes the key features of a representative power station as input, extracts features through a CNN network and an LSTM network respectively, and uses a multi-head attention mechanism to weight and fuse the output features of the CNN network and the LSTM network. The high-level features extracted by the multi-head attention mechanism are converted into the sub-region predicted total power of the final prediction output through a fully connected layer. The meta-model uses a GRU network. The meta-model takes the predicted total power of each sub-region output by the basic model as input, and the predicted value of the predicted total power of the measured area is output. Step 5: Use the training set to train the basic model, and input the test set into the trained basic model output to obtain the predicted total power generation of the sub-region; combine the predicted total power generation output by the basic model, the training set and the test set to jointly train the meta-model; Step 6: Select a representative power station in each sub-region and obtain the corresponding historical power generation and key parameters; The historical power generation and key parameters of the representative power station are input into the basic model to predict the future total power generation of the sub-region. After the predicted future total power generation of all sub-regions is input into the meta-model, the future total power generation of the measured area is predicted. The method for selecting representative power stations in sub-regions is as follows: construct a GAT network for each sub-region, predict the power generation of the sub-region power station in the corresponding time period by inputting key parameters; compare the predicted power generation with the actual power generation, and select the power station with the smallest error as the representative power station of the sub-region.

2. According to claim 1, a distributed regional power generation prediction method based on a stacked integrated model is characterized by: In step 1, the influencing feature H Including multiple of wind speed, atmospheric temperature, irradiance, wind direction, maximum wind speed, air pressure, probe 1 temperature and probe 2 temperature.

3. The distributed regional power generation prediction method based on the stacked integrated model according to claim 1 is characterized by: In the step 1, the outliers in the data set are identified and removed by the 3-sigma criterion; after removing the outliers in the data set, the Hermite interpolation method is used to estimate reasonable values ​​at the positions corresponding to the outliers based on the normal values ​​and the corresponding derivative information.

4. The distributed regional power generation prediction method based on the stacked integrated model according to claim 1 is characterized by: In the step 2, the method of selecting key features is as follows: MIC correlation and Pearson correlation coefficient were used for feature selection respectively; the MIC correlation calculation formula is as follows: ; in, MIC ( x , H ) is the maximum information coefficient; I ( x,H ) is power x and impact characteristics H The mutual information of e and f are the rows and columns that divide the grid respectively; D is a constant, and its value is set to 0.6 of the number of power stations in the data set; The Pearson correlation coefficient calculation formula is as follows: ; in, ρ x,H is the Pearson correlation coefficient; cov ( x , H ) is power x and impact characteristics H The covariance of σ x and σ H Power x and impact characteristics H The standard deviation of According to the calculated Pearson correlation coefficient ρ x,H and the maximum information coefficient MIC ( x , H )Select key features h .

5. The distributed regional power generation prediction method based on the stacked integrated model according to claim 4 is characterized by: The selected key features h The method is: select the Pearson correlation coefficient ρ x,H Greater than 0.4 and maximum information coefficient MIC ( x , H ) greater than 0.1 is considered as the key feature. h .

6. The distributed regional power generation prediction method based on the stacked integrated model according to claim 1 is characterized by: In the step six, the power generation of the measured area in the next 1 hour to 5 hours is predicted.

7. The distributed regional power generation prediction method based on the stacked integrated model according to claim 1 is characterized by: In the step 3, after normalization, the data set is divided into four seasons: spring, summer, autumn, and winter, and the corresponding models are obtained through training.

8. A computer device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the memory stores the computer program; and the processor executes a distributed regional power generation prediction method based on a stacked integrated model as described in claim 1.

9. A readable storage medium, characterized in that: A computer program is stored; when the computer program is executed by a processor, it is used to implement the distributed regional power generation power prediction method based on a stacked integrated model as described in claim 1.

Citation Information

Patent Citations

  • Ultra-short-term photovoltaic power prediction method based on Informer encoder and LSTM

    CN116341613A

  • Photovoltaic power prediction method based on multi-scale space-time diagram attention convolutional network

    CN117154704A