Photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM

By using the ATT-BI-LSTM model in the ultra-short-term power prediction of photovoltaics, combined with Kendall correlation analysis and attention mechanism, the problems of low prediction accuracy, high model complexity and weather sensitivity in the existing technology are solved, and the problem of low prediction accuracy, high model complexity and weather sensitivity is achieved. More efficient ultra-short-term power prediction and better reliability evaluation.

CN119312967APending Publication Date: 2025-01-14STATE POWER INVESTMENT GRP JIANGSU NEW ENERGY CO LTD +1

Patent Information

Application Number
CN202411328385.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing ultra-short-term power prediction methods for photovoltaics have problems such as limited prediction accuracy, high model complexity, strong sensitivity to weather conditions, complex parameter selection and difficulty in reliability assessment.

Method used

Using the ATT-BI-LSTM-based ultra-short-term power prediction method, the photovoltaic site data was collected and preprocessed, and the variables were selected using Kendall correlation analysis, combining convolutional neural networks and bidirectional long short-term memory networks (Bi-LSTM) and attention mechanism, perform feature extraction and prediction, and use Bayesian optimization to tune hyperparameters to improve model performance.

Benefits of technology

It significantly improves the accuracy and reliability of ultra-short-term power prediction of photovoltaics, reduces model complexity and computing resource consumption, and enhances the processing capability of complex input data, especially in weather sudden changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312967A_ABST
    Figure CN119312967A_ABST
Patent Text Reader

Abstract

The invention relates to a photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM. The method comprises the following steps: step S1, collecting photovoltaic field station data; s2, preprocessing the data collected in the step S1; s3, performing variable selection through Kendall correlation analysis; step S4, an ATT-BI-LSTM model is constructed; and step S5, the ATT-BI-LSTM model is adopted to predict the photovoltaic ultra-short-term power. Compared with the prior art, the method has the advantages that the prediction precision is improved, meanwhile, the dimension and complexity of data can be reduced, and the calculation efficiency of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for optimizing and predicting photovoltaic station power data, and in particular to a photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM. Background Art

[0002] Current renewable energy power prediction is a complex and important research field that spans multiple disciplines and technical fields. Traditional machine learning algorithms are economical in terms of computational cost, but they are not capable of processing complex features and nonlinear relationships, and are limited in generalization. Therefore, deep learning methods are more advantageous for processing complex nonlinear relationships or large-scale data sets. Recurrent neural networks were used for sequence data in the early days, but the long-term dependency problem led to insufficient information capture and significant gradient problems. Long short-term memory networks and gated recurrent units solve the long-term dependency problem of RNN, but a single LSTM model is complex and resource-intensive, and GRU is simpler than LSTM, but its expression ability is slightly inferior. Therefore, combining the advantages of each model and combining algorithms can improve the overall prediction performance. The emergence of new prediction models and integrated reinforcement learning has improved the reliability and scalability of the combination method. However, the combination model increases complexity and training costs, and still faces challenges.

[0003] After searching Chinese patent CN202310994245.X, a photovoltaic ultra-short-term power prediction method based on LSTM network was proposed, and patent CN202110812897.8, a photovoltaic ultra-short-term power prediction method based on attention mechanism, was proposed. However, the above existing patents have the following problems:

[0004] 1) Limited prediction accuracy: Although a variety of algorithms have been applied to ultra-short-term PV forecasting, the prediction accuracy has not reached a very high level.

[0005] 2) Model complexity: Some prediction models, such as neural networks, may increase the complexity of the model due to the excessive number of neurons. This may not only lead to a longer prediction process, but also increase the consumption of computing resources.

[0006] 3) Sensitivity to weather conditions: Photovoltaic power generation is very sensitive to weather conditions, and the performance of ultra-short-term prediction algorithms in dealing with sudden weather changes may be challenged. In unstable weather conditions such as cloudy and rainy days, the prediction accuracy may be reduced.

[0007] 4) Complexity of parameter selection: The photovoltaic power prediction methods based on physical models have the disadvantage of complex parameter selection. These methods require detailed requirements for the topographic map coordinates, power curves and conversion parameters of photovoltaic power stations, which increases the difficulty of implementation.

[0008] 5) Difficulty in reliability assessment: Traditional prediction models based on deterministic estimation methods cannot effectively evaluate the reliability of prediction results when predicting future output power. This may bring certain difficulties to power grid dispatching because it cannot provide reliable reference information.

[0009] Therefore, how to optimize variable selection and feature extraction for ultra-short-term photovoltaic prediction at photovoltaic sites and improve photovoltaic prediction accuracy has become a technical problem that needs to be solved. Summary of the invention

[0010] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM.

[0011] The purpose of the present invention can be achieved by the following technical solutions:

[0012] According to one aspect of the present invention, a photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM is provided, and the method comprises the following steps:

[0013] Step S1, collecting photovoltaic station data;

[0014] Step S2, preprocessing the data collected in step S1;

[0015] Step S3, variable selection by Kendall correlation analysis;

[0016] Step S4, constructing an ATT-BI-LSTM model;

[0017] Step S5: Use the ATT-BI-LSTM model to predict the ultra-short-term power of photovoltaics.

[0018] As a preferred technical solution, the photovoltaic station data in step S1 includes various types of irradiance, backplane temperature, ambient temperature and humidity, wind direction and speed, and atmospheric pressure data.

[0019] As a preferred technical solution, the preprocessing in step S2 includes data set division, data cleaning, data conversion and data integration.

[0020] As a preferred technical solution, the data set is divided into data according to whether the data comes from the field or the meteorological station; the data cleaning includes processing missing values, abnormal values, and duplicate values, processing missing values ​​by deletion, using different interpolation methods to fill in the default data, and identifying and processing abnormal values ​​by statistical methods or visualization methods; the data conversion is to digitize, standardize and normalize the data; the data integration is specifically: through a batch data transmission integration method, the data in the source system is regularly exported as files, and the data is transmitted through a secure file transfer method.

[0021] As a preferred technical solution, the Kendall correlation calculation formula in step S3 is:

[0022]

[0023] Where:

[0024] P: number of observation pairs with consistent arrangement;

[0025] Q: number of observation pairs with inconsistent arrangement;

[0026] T: number of consistent pairs;

[0027] U: Number of inconsistent pairs.

[0028] As a preferred technical solution, step S4 specifically includes:

[0029] Step S4.1, feature extraction through the convolutional layer of the convolutional neural network;

[0030] Step S4.2, BI-LSTM encoding;

[0031] Step S4.3, capturing feature correlation;

[0032] Step S4.4, hyperparameter tuning.

[0033] As a preferred technical solution, step S4.2 is specifically as follows:

[0034] Bi-LSTM extends the LSTM model and processes the input sequence separately from the forward and backward directions. The forward LSTM extracts features from the past to the present, and the backward LSTM extracts features from the present to the future. The two LSTMs are combined to obtain the global optimal result.

[0035] As a preferred technical solution, step S4.3 is specifically as follows: a multi-head attention mechanism performs weighted exchange on the hidden layer states of the Bi-LSTM, and obtains normalized weights through automatic learning.

[0036] As a preferred technical solution, step S4.3 is: Bayesian optimization simulates the uncertainty of function values ​​by using a probability model and finds the best parameter combination in the search space, specifically including:

[0037] Step S4.3.1, define the hyperparameter space and objective function;

[0038] Step S4.3.2, initializing the Bayesian optimizer;

[0039] Step S4.3.3, generating initial sample points;

[0040] Step S4.3.4, iterative optimization;

[0041] Step S4.3.5, select the optimal hyperparameter combination.

[0042] As a preferred technical solution, the method also includes evaluating and analyzing the performance of the model constructed in step S4, specifically judging the effectiveness and optimization ability of the model through the mean absolute error MAE and the root mean square error RMSE.

[0043] Compared with the prior art, the present invention has the following advantages:

[0044] 1) This paper proposes a photovoltaic ultra-short-term power prediction method that integrates a bidirectional long short-term memory network (Bi-LSTM) and an attention mechanism (ATT). This fusion method not only allows the model to effectively learn the temporal dependency of the input sequence, but also enhances the recognition ability of key features through the attention mechanism;

[0045] 2) By embedding a specially designed attention layer, the present invention effectively captures the key features and nonlinear dependencies in the sequence data, significantly enhancing the model's ability to process complex inputs. Compared with existing photovoltaic output prediction methods, it can better capture rapid power changes. At the same time, improvements in the attention mechanism and error feedback mechanism will also comprehensively improve the model performance;

[0046] 3) The present invention is aimed at ultra-short-term photovoltaic prediction of photovoltaic stations, focusing on specific predictions in specific scenarios. Compared with the existing photovoltaic output prediction methods, it is more in line with the demand and has better prediction effects;

[0047] 4) The present invention combines the attention mechanism and the bidirectional long short-term memory network (BI-LSTM). This method can more effectively capture the dynamic characteristics and time series correlation of photovoltaic output data; traditional prediction methods often only focus on the historical information of the data, while ignoring the intrinsic connection and mutual influence between the data; the present invention uses the attention mechanism to weight the input data, highlighting important information, and at the same time utilizes the bidirectional characteristics of BI-LSTM to consider both the forward and backward information of the data, thereby improving the prediction accuracy;

[0048] 5) The present invention optimizes variable selection and feature extraction: The present invention selects strongly correlated variables through Kendall correlation analysis, adds convolutional neural network to extract features in the variables, and screens out influencing factors that are strongly correlated with photovoltaic output as input of the model; the present invention can reduce the dimension and complexity of the data, improve the calculation efficiency of the model, while retaining key information and improving prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0051] like Figure 1 As shown, the photovoltaic ultra-short-term power prediction method of the present invention integrates a bidirectional long short-term memory network (Bi-LSTM) and an attention mechanism (ATT), specifically comprising:

[0052] Step 1: Collect PV station data, including: ① Various types of irradiance: the most important data, directly reflecting the intensity of the sun's radiation to the ground, and determining the power generation potential of the PV power station; ② Backplane temperature: an important parameter reflecting the operating status of the solar panel; ③ Ambient temperature and humidity: monitoring temperature can help optimize the power generation efficiency of the PV system; ④ Wind direction and wind speed: for the safe operation and power generation efficiency of the PV power station; ⑤ Atmospheric pressure: as one of the input parameters of the weather forecast model, it helps predict future weather conditions.

[0053] Step 2: Data preprocessing. The preliminary processing of the original data is completed through steps such as data set division, data cleaning, data conversion, and data integration. ① Data set division: divide the data according to whether it comes from the field or the meteorological station to facilitate the fine classification of the data; ② Data cleaning: handle missing values, outliers, and duplicate values. Deal with missing values ​​by deleting them, use different interpolation methods to fill in the default data, and identify and process outliers through statistical methods or visualization methods. The above cleaning steps can remove erroneous data, duplicate data, etc., and improve the accuracy and consistency of the data; ③ Data conversion: digitize, standardize, and normalize the data. Digitization converts non-numeric data into numerical data, and standardization converts data into mean. The data is normalized to a distribution with a value of 0 and a standard deviation of 1. The normalization process maps the data to a specific interval (such as [0,1] or [-1,1]). Through conversion, the data can adapt to the needs of different models and reduce the amount of calculation; ④ Data integration: The on-site photovoltaic forecast is divided into two forecast assessments: 15-minute forecast and 4-hour forecast. Through batch data transmission integration methods, the data in the source system is regularly exported as files, and the data is transmitted through secure file transfer methods. Through integration, the data between different systems can be flowed and shared, eliminating information islands and data islands, and improving data availability and liquidity.

[0054] Step 3: Data correlation analysis: Kendall correlation analysis is used to evaluate the correlation between variables, select model parameters, optimize the prediction model structure, and determine system stability, thereby improving the accuracy and reliability of photovoltaic predictions.

[0055] The Kendall correlation calculation formula is:

[0056]

[0057] Where:

[0058] P: number of observation pairs with consistent arrangement;

[0059] Q: number of observation pairs with inconsistent arrangement;

[0060] T: number of consistent pairs;

[0061] U: Number of inconsistent pairs.

[0062] Step 4: ATT-BI-LSTM model establishment

[0063] 4.1 Local feature extraction: Feature extraction is performed through the convolutional layer of the convolutional neural network.

[0064] Adding a convolutional neural network (CNN) to the prediction model facilitates the extraction of local features from the input data and the capture of contextual information in the BI-LSTM layer. The convolution layer processes the input data through filters, which perform convolution operations on the input image in a sliding window manner. The number, size, padding, and step size of the filters need to be considered: ① The number of inverters: determines how many different features the convolution layer can extract; ② The filter size: determines the size of the input data considered for each convolution operation; ③ Filter padding: used to control the size of the output feature map; ④ The filter step size: used for the size of the receptive field.

[0065] 4.2 BI-LSTM encoding. The Bi-LSTM model extends the LSTM model and processes the input sequence from the forward and backward directions respectively. The forward LSTM extracts features from the past to the present, and the backward LSTM extracts features from the present to the future. Combining the two LSTMs can obtain the global optimal result.

[0066]

[0067] Where:

[0068] x t 、h t ——Input vector and output layer output data at time t;

[0069] ——weight matrix;

[0070] b y ——Bias vector.

[0071] 4.3 Capturing feature correlation. The multi-head attention mechanism performs weighted exchange on the hidden layer states of Bi-LSTM and obtains normalized weights through automatic learning to highlight key features and weaken minor features. This process achieves the regulation of attention to different parts of the sequence, thereby more effectively capturing important information and improving model performance and prediction capabilities.

[0072]

[0073] Where:

[0074] e t ——Updated weights;

[0075] N w ——Historical data window of length w;

[0076] α t ——Normalized weights;

[0077] ——The new hidden layer state.

[0078] 4.4 Hyperparameter tuning. Bayesian optimization simulates the uncertainty of function values ​​by using probability models and finds the best parameter combination in the search space. ① Define the hyperparameter space and objective function: clarify the hyperparameters that need to be tuned, and then define the objective function related to the model performance; ② Initialize the Bayesian optimizer: initialize a Bayesian optimizer and Gaussian process model, and set the search range (boundary) of the hyperparameters; ③ Generate initial sample points: randomly generate several groups of initial sample points in the candidate hyperparameters, evaluate each sample point, and calculate its corresponding objective function value; ④ Iterative optimization: each iteration selects a set of hyperparameters according to the current probability model, calculates the objective function value, and repeats the above steps until the conditions are met; ⑤ Select the optimal hyperparameter combination: generate the most optimal hyperparameter combination after the iteration.

[0079] Step 5: Model evaluation and performance analysis. The effectiveness and optimization ability of the model are judged by the mean absolute error (MAE) and the root mean square error (RMSE). ① MAE calculates the average of the sum of the absolute values ​​of all prediction errors, reflecting the average absolute deviation between the predicted value and the actual value; ② RMSE is the square root of MAE, which measures the degree of difference between the predicted value and the observed value.

[0080]

[0081] Where: y i is the ith actual value, is the corresponding predicted value, and n is the number of samples.

[0082] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM, characterized in that: The method comprises the following steps: Step S1, collecting photovoltaic station data; Step S2, preprocessing the data collected in step S1; Step S3, variable selection through Kendall correlation analysis; Step S4, constructing an ATT-BI-LSTM model; Step S5: Use the ATT-BI-LSTM model to predict the ultra-short-term power of photovoltaics.

2. According to claim 1, a photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM is characterized in that: The photovoltaic station data in step S1 includes various types of irradiance, backplane temperature, ambient temperature and humidity, wind direction and speed, and atmospheric pressure data.

3. According to claim 1, a photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM is characterized in that: The preprocessing in step S2 includes data set division, data cleaning, data conversion and data integration.

4. According to claim 3, a photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM is characterized in that: The data set is divided into data according to whether the data comes from the field or the meteorological station; the data cleaning includes processing missing values, abnormal values, and duplicate values, processing missing values ​​by deletion, using different interpolation methods to fill in the default data, and identifying and processing abnormal values ​​by statistical methods or visualization methods; the data conversion is to digitize, standardize and normalize the data; the data integration is specifically: through a batch data transmission integration method, the data in the source system is regularly exported as files, and the data is transmitted through a secure file transfer method.

5. According to claim 1, a photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM is characterized in that: The Kendall correlation calculation formula in step S3 is: Where: P: number of observation pairs with consistent arrangement; Q: number of observation pairs with inconsistent arrangement; T: number of consistent pairs; U: Number of inconsistent pairs.

6. According to claim 1, a photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM is characterized in that: The step S4 specifically includes: Step S4.1, feature extraction through the convolutional layer of the convolutional neural network; Step S4.2, BI-LSTM encoding; Step S4.3, capturing feature correlation; Step S4.4, hyperparameter tuning.

7. A photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM according to claim 6, characterized in that: The step S4.2 is specifically as follows: Bi-LSTM extends the LSTM model and processes the input sequence separately from the forward and backward directions. The forward LSTM extracts features from the past to the present, and the backward LSTM extracts features from the present to the future. The two LSTMs are combined to obtain the global optimal result.

8. The photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM according to claim 6 is characterized in that: The step S4.3 is specifically as follows: the multi-head attention mechanism performs weighted exchange on the hidden layer states of the Bi-LSTM, and obtains the normalized weights through automatic learning.

9. The photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM according to claim 6 is characterized in that: The step S4.3 is: Bayesian optimization simulates the uncertainty of function values ​​by using a probability model and finds the best parameter combination in the search space, specifically including: Step S4.3.1, define the hyperparameter space and objective function; Step S4.3.2, initializing the Bayesian optimizer; Step S4.3.3, generating initial sample points; Step S4.3.4, iterative optimization; Step S4.3.5, select the optimal hyperparameter combination.

10. The photovoltaic ultra-short-term power prediction method based on ATT-BI-LSTM according to claim 1, characterized in that: The method also includes evaluating and analyzing the performance of the model constructed in step S4, specifically judging the effectiveness and optimization capability of the model through mean absolute error (MAE) and root mean square error (RMSE).

Citation Information

Patent Citations

  • Photovoltaic ultra-short-term power prediction method and system based on attention mechanism

    CN115701865A

  • Photovoltaic ultra-short-term power prediction method and system based on LSTM network

    CN116960982A

Cited By

  • Photovoltaic power generation power prediction method based on mode perception adaptive deep learning

    CN121216441A

  • A Photovoltaic Power Generation Prediction Method Based on Pattern-Aware Adaptive Deep Learning

    CN121216441B