Photovoltaic station power prediction method based on bidirectional LSTM

Through the photovoltaic site power prediction method based on bidirectional LSTM, the problems of missing data, uncertainty and overfitting in the prior art are solved, and higher prediction accuracy and stability are achieved, and assessment costs are reduced.

CN119885808APending Publication Date: 2025-04-25SHANGHAI MINGHUA ELECTRIC POWER TECH & ENG

Patent Information

Application Number
CN202311395170.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing photovoltaic site power prediction methods are difficult to effectively deal with missing data and outliers on the spot, and cannot accurately model the various uncertainties affecting photovoltaic power generation. The model overfits the training data, resulting in poor performance on the new data.

Method used

The photovoltaic site power prediction method based on bidirectional LSTM is adopted to build a bidirectional LSTM model through data collection, preprocessing, feature construction and correlation analysis, and the prediction accuracy is improved through model training and tuning.

Benefits of technology

It improves the accuracy and stability of photovoltaic site power prediction, can more effectively capture complex patterns in time series data, reduces assessment costs, and improves the credibility of predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119885808A_ABST
    Figure CN119885808A_ABST
Patent Text Reader

Abstract

The invention relates to a photovoltaic station power prediction method based on bidirectional LSTM. The method comprises the following steps: step S1, data collection; step S2, data preprocessing; s3, feature construction and correlation analysis are carried out; step S4, constructing a bidirectional LSTM (Long Short Term Memory) model; s5, performing model training and optimization; and S6, performing model evaluation and performance analysis. Compared with the prior art, the method has the advantages of high prediction precision and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a photovoltaic station power prediction method, and in particular to a photovoltaic station power prediction method based on a bidirectional LSTM. Background Art

[0002] Clean energy, mainly distributed photovoltaics, plays a vital role in the cleanliness, safety and stability of the power system. In response to policies, photovoltaic sites have developed rapidly. However, due to the uncontrollable problems of randomness and volatility of distributed photovoltaics, which will affect the assessment of photovoltaic sites, it is necessary to establish accurate photovoltaic power prediction to reduce the abandonment rate and assessment.

[0003] The poor accuracy of photovoltaic power prediction has led to huge assessments. How to improve prediction accuracy and reduce the assessment of two detailed auxiliary services of the power grid has always been the focus of photovoltaic stations to reduce costs and increase efficiency. Due to the defects in field data management, changeable climate conditions, the inability of station models to adapt to changes in station technology, and the improper settings of parameters such as station model learning rate and optimizer selection over the years, the power prediction performance of prediction manufacturers has declined over the years, and the assessment costs have increased year by year.

[0004] After searching, Chinese patent publication number CN116644970A discloses a photovoltaic power prediction method, which is based on VMD decomposition and stacked deep learning technology, integrating data decomposition with deep learning network CNN and LSTM models. By making full use of the ability of LSTM model to retain historical information and the skill of CNN model to extract meteorological features from meteorological data, this method provides an integrated modeling method to bring together the prediction results of each model. The advantage of this method is that it uses ELM as a meta-learner to reduce the error of a single model and the uncertainty of data noise from a quantitative perspective. This innovation helps to overcome some limitations of traditional gradient-based neural networks, including slow speed and the need for a large number of input parameters. In addition, the strategy of using a multi-branch prediction network helps to mitigate the impact of noise and meteorological changes, so that the prediction results under different environmental conditions have higher consistency and stability, thereby improving the accuracy of the prediction.

[0005] At the same time, Chinese patent publication number CN114282646A discloses an optical power prediction method and system based on two-stage feature extraction and improved BiLSTM. Through the two-stage feature extraction of shallow feature extraction and deep feature extraction, the correlation between features can be further explored and the noise and unstable components of the optical power data can be filtered out. The processed data is sent to the improved BiLSTM model for optical power prediction, which can effectively improve the prediction accuracy.

[0006] However, the above existing patented technologies have the following problems:

[0007] 1) The above model cannot effectively handle the problem of missing data and outliers at the photovoltaic station site;

[0008] 2) For the various factors that affect photovoltaic power generation, it is impossible to accurately model these uncertainties, resulting in a decrease in the credibility of the prediction results;

[0009] 3) The algorithm cannot balance the imbalance of historical photovoltaic data;

[0010] 4) The model overfits the training data, resulting in poor performance on new data;

[0011] 5) The use of complex prediction models requires a large amount of training data and computing resources, which is suitable for some photovoltaic sites;

[0012] 6) The complex nonlinear relationship between photovoltaic power generation output and multiple variables is over-simplified and cannot capture the real situation.

[0013] Therefore, how to further improve the accuracy of photovoltaic prediction has become a technical problem that needs to be solved. Summary of the invention

[0014] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a photovoltaic station power prediction method based on bidirectional LSTM with high prediction accuracy.

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

[0016] According to one aspect of the present invention, a photovoltaic power station power prediction method based on bidirectional LSTM is provided, and the method comprises the following steps:

[0017] Step S1, data collection;

[0018] Step S2, data preprocessing;

[0019] Step S3, feature construction and correlation analysis;

[0020] Step S4, construction of a bidirectional LSTM model;

[0021] Step S5, model training and tuning;

[0022] Step S6: model evaluation and performance analysis.

[0023] As a preferred technical solution, the data collected in step S1 includes a first data set and a second data set, wherein the first data set is data obtained through a photovoltaic power generation monitoring system and a forecasting manufacturer's on-site server, and the second data set is data obtained through an on-site weather station.

[0024] As a preferred technical solution, the first data set includes the total grid-connected power, predicted irradiance and power prediction value, and the second data set includes the inclination irradiation intensity, ambient temperature, backplane temperature, ambient humidity, wind direction, wind speed and atmospheric pressure.

[0025] As a preferred technical solution, the data preprocessing in step S2 is to clean and screen the data, remove outliers and missing values ​​in the data, and standardize the data; specifically includes the following steps:

[0026] Step S201, downsampling, deleting samples from the original data;

[0027] Step S202, time alignment, converting data collected at different time intervals into the same time interval;

[0028] Step S203, missing value processing, including filling and deleting missing values;

[0029] Step S204: aligning attributes, converting attributes with different names in different data sources into the same name.

[0030] As a preferred technical solution, the step S3, feature construction and correlation analysis is to construct features based on Kendall and Spearman correlation analysis, and the specific process is as follows:

[0031] Clean and screen the data, and select air pressure, station temperature, humidity, wind direction, wind speed, horizontal irradiance, normal irradiance, diffuse irradiance, station irradiance, and station power, a total of 10 measurement points for correlation analysis of power generation;

[0032] The Kendall correlation calculation formula is:

[0033] Where P is the number of observation pairs with consistent arrangement; Q is the number of observation pairs with inconsistent arrangement; T is the number of consistent pairs; U is the number of inconsistent pairs;

[0034] The Spearman correlation calculation formula is:

[0035] Among them, d i is the rank difference of each pair of data; n is the number of data points.

[0036] As a preferred technical solution, the construction of the bidirectional LSTM model includes the design of the input layer, hidden layer and output layer, the selection of the activation function, the selection of the loss function and the optimization algorithm.

[0037] As a preferred technical solution, the activation function is selected as follows:

[0038] Bidirectional LSTM uses Sigmoid and Tanh as activation functions;

[0039] The Sigmoid function formula is:

[0040] Where x represents the input value; σ(x) represents the output value, and its value range is [0,1];

[0041] The Tanh function formula is:

[0042] Among them, x is the input value, tanh(x) is the output value of the tanh function, and in the tanh function, x represents the input value.

[0043] As a preferred technical solution, the loss function is specifically selected by using mean absolute error MAE and root mean square error RMSE as the loss function, and the optimization algorithm adopts Adam optimization algorithm.

[0044] As a preferred technical solution, the step S5, model training and tuning is specifically as follows:

[0045] Step S501, using a time series segmentation combined with a K-fold cross validation method to divide the data set;

[0046] Step S502, select multiple model architectures for cross-experimentation, and optimize hyperparameters through network search, random search, and Bayesian optimization.

[0047] As a preferred technical solution, the step S6, model evaluation and performance analysis is specifically as follows:

[0048] Step S601, model evaluation: including analyzing performance indicators, error analysis, generating visualization curves and other key elements, using mean absolute error and root mean square error for comprehensive performance evaluation;

[0049] Step S602, performance analysis: after model training and hyperparameter tuning, the mean absolute error and root mean square error scores between the models are obtained, and the prediction ability of each model is obtained through analysis;

[0050] Step S603, visual analysis: Use box plots and violin plots to perform data visual analysis, including the center position, dispersion, and outliers of the data.

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

[0052] 1) The present invention performs photovoltaic data division, photovoltaic characteristic analysis, photovoltaic site prediction and prediction model optimization, and is suitable for optimizing the prediction of photovoltaic site power data to perform more accurate photovoltaic site power prediction.

[0053] 2) The bidirectional LSTM used in the present invention performs well in both MAE and RMSE indicators, outperforming other models and can more effectively capture complex patterns in time series data. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0055] 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.

[0056] Due to the uncontrollable problems of randomness and volatility of distributed photovoltaic power, the prediction results will be inaccurate, which will affect the assessment of photovoltaic stations. Therefore, in order to solve the problem of poor photovoltaic power prediction accuracy and huge assessment, overcome the defects of existing technologies, and then propose a photovoltaic station power prediction method based on bidirectional LSTM.

[0057] like Figure 1 As shown, the present invention provides a photovoltaic station power prediction method based on bidirectional LSTM, which specifically includes the following steps:

[0058] Step 1: Data Collection

[0059] The data is divided into the first data set and the second data set. The first data set is the data obtained through the photovoltaic power generation monitoring system and the prediction manufacturer's on-site server, mainly including the total grid-connected power, predicted irradiance and power prediction value. These data reflect and predict the power generation of the solar power station. Analyzing their relationship can evaluate the accuracy of the power generation prediction; the second data set is the data obtained through the on-site meteorological station, mainly including the inclination irradiation intensity, ambient temperature, backplane temperature, ambient humidity, wind direction, wind speed and atmospheric pressure. These data are used as real-time data to evaluate the optimization model.

[0060] Step 2: Data Preprocessing

[0061] Through data preprocessing, the data is cleaned and filtered, outliers and missing values ​​are removed, and the data is standardized to improve the accuracy of the model. This method will take the following four steps for data preprocessing and feature engineering:

[0062] 2.1 Downsampling: The imbalanced number of samples of different categories in the data set will cause the machine learning model to be biased towards the majority category. Therefore, it is necessary to downsample and delete samples from the original data to reduce the size of the data set, balance the number of samples of different categories in the data set, and improve the performance of the machine learning model.

[0063] 2.2 Time alignment: Data from different data sources may be collected at different time intervals, which will affect the performance of the machine learning model. Therefore, time alignment is needed to convert data collected at different time intervals into the same time interval.

[0064] 2.3 Missing value processing: Due to data collection errors, data transmission errors, etc., there may be missing values ​​in the data, which in turn affects the accuracy and performance of the machine learning model. Missing value processing is performed by filling and deleting missing values.

[0065] 2.4 Attribute alignment: The same attributes may exist in different data sources, but the names of the attributes may be different, which affects the robustness and interpretability of the machine learning model. Therefore, it is necessary to convert the attributes with different names in different data sources to the same name.

[0066] Step 3: Feature construction and correlation analysis

[0067] Feature construction extracts, transforms, and selects features from raw data so that machine learning algorithms can better understand the data and make accurate predictions. Correlation helps identify the most important features and reduce redundant information. This method is based on the feature construction engineering of Kendall and Spearman correlation analysis. Kendall correlation is a nonparametric method for measuring the ordinal consistency of two variables; Spearman correlation is similar to Kendall correlation, but it calculates the ranking of variables instead of specific values.

[0068] After cleaning and screening the data, 10 measuring points were selected, including air pressure, station temperature, humidity, wind direction, wind speed, horizontal irradiance, normal irradiance, scattered irradiance, station irradiance, and station power, for correlation analysis of power generation.

[0069] The Kendall correlation calculation formula is:

[0070] Where P is the number of observations with consistent permutations; Q is the number of observations with inconsistent permutations; T is the number of consistent pairs; and U is the number of inconsistent pairs.

[0071] The Spearman correlation calculation formula is:

[0072] Among them, d i is the rank difference of each pair of data; n is the number of data points.

[0073] Comparing the two heat maps of correlation analysis, the color of the heat map indicates the size of the correlation coefficient, which is used to understand the relationship between each measuring point and the station power.

[0074] Step 4: Construction of bidirectional LSTM model

[0075] The construction of a deep learning model includes four important steps: the design of the input layer, hidden layer and output layer, the selection of the activation function, the selection of the loss function and the optimization algorithm.

[0076] 4.1 Bidirectional LSTM

[0077] Bidirectional LSTM (BI-LSTM) consists of two sub-networks, the forward LSTM and the backward LSTM. The combination of the forward and backward sub-networks can obtain the global optimal result. It can simultaneously consider the historical and future information of the time series and capture richer and more complex temporal dependencies.

[0078] 4.2 Input layer, hidden layer and output layer design

[0079] First, in the input layer, the original data (such as time, temperature, light intensity, etc.) is converted into a format that the neural network can understand through word embedding or one-dimensional convolution, and the features used for prediction are selected autonomously, and the data is normalized or standardized. Then, in the hidden layer, the directionality of the bidirectional LSTM is utilized through forward and backward LSTM, while considering past and future information to capture data patterns more comprehensively. Finally, the output layer is designed through full connection.

[0080] 4.3 Activation Function Selection

[0081] Bidirectional LSTM uses Sigmoid and Tanh as activation functions, especially when dealing with gate control and cell state updates.

[0082] The Sigmoid function formula is:

[0083] Here, x represents the input value, which can be any real number; σ(x) represents the output value, which is also a real number and its value range is [0,1].

[0084] The Tanh function formula is:

[0085] Where: x is the input value, tanh(x) is the output value of the tanh function. In the tanh function, x represents the input value and can be any real number.

[0086] 4.4 Loss Function Selection

[0087] Since the prediction accuracy directly affects the operation and management of the power system, it is necessary to select a suitable loss function. This method uses mean absolute error (MAE) and root mean square error (RMSE) as loss functions.

[0088] MAE intuitively quantifies the average error between the predicted value and the true value, and will not be overly affected by extreme values. Its formula is:

[0089] Among them, y i is the ith observation, is the corresponding model prediction value, and N is the number of samples.

[0090] RMSE focuses more on larger errors and its formula is:

[0091] y i is the ith observation, is the corresponding model prediction value, and N is the number of samples.

[0092] 4.5 Adam Optimization Algorithm

[0093] Adam (Adaptive Moment Estimation) combines the advantages of Momentum (momentum method) and RMSprop (Root Mean Square Propagation) algorithms, and has the characteristics of high efficiency, adaptability and robustness. It solves the problem of complex time dependence and nonlinear patterns of data in photovoltaic power prediction.

[0094] The core idea of ​​the Adam optimization algorithm is to dynamically adjust the learning rate of each parameter by calculating the first-order moment estimate (i.e., mean) and second-order moment estimate (i.e., uncentered variance) of the gradient. The update rules of the algorithm are as follows:

[0095] m t =β1m t-1 +(1-β1)g t

[0096]

[0097]

[0098]

[0099]

[0100] Among them, m t and v t are estimates of the first and second order moments of the gradient, respectively; g tis the gradient at time t; β1 and β2 are the exponential decay rates of the estimates of the first and second order moments; and are the first and second order moments after bias correction; η is the learning rate; ∈ is a very small number to prevent division by zero; θ t is the parameter at time t.

[0101] Step 5: Model training and tuning

[0102] This step affects the accuracy and reliability of the prediction model. Training builds a model based on historical data. By learning from historical data, we learn the factors and rules that affect photovoltaic power, and thus predict future photovoltaic power. Verification evaluates the prediction performance of the model. By predicting the verification data, we evaluate the accuracy and reliability of the model and improve the model.

[0103] 5.1 Dataset Division

[0104] The cleaned field data are divided into data sets using time series segmentation combined with K-fold cross validation method.

[0105] K-fold cross validation is used to estimate the performance of machine learning models on unknown data. It provides a more comprehensive and reliable way to evaluate model performance. Each data point appears exactly once as part of the validation set, which can more comprehensively and accurately evaluate the performance of the model, which is superior to a single training / testing data split. The evaluation formula is as follows:

[0106]

[0107] in It is the average evaluation index of K-fold cross validation. This index gives the average performance of the model on K different validation folds. K is the number of folds, that is, the number of subsets into which the original data set is divided for cross validation. ∑E k :This is the summation symbol, which is used to calculate the evaluation index E of K different validation folds k The sum of .

[0108] 5.2 Training Process and Hyperparameter Adjustment

[0109] This step is an iterative and multi-stage process. Multiple model architectures are selected for cross-experiments and hyperparameter optimization is performed through network search, random search, and Bayesian optimization.

[0110] Step 6: Model Evaluation and Performance Analysis

[0111] This step is the final stage to determine the effectiveness, reliability and generalization ability of the model.

[0112] 6.1 Model evaluation: including analyzing performance indicators, error analysis, and generating visualization curves. This method uses mean absolute error (MAE) and root mean square error (RMSE) for comprehensive performance evaluation. The combination of the two can provide a comprehensive view of how the model handles different types of data.

[0113] 6.2 Performance Analysis

[0114] After model training and hyperparameter tuning, the mean absolute error (MAE) and root mean square error (RMSE) scores between the models are obtained. Through analysis, the prediction ability of each model can be obtained, and then the superiority of the two-layer LSTM can be determined.

[0115] 6.3 Visualization Analysis

[0116] Using box plots and violin plots for data visualization analysis can effectively display the distribution of data, including the center position, dispersion, and outliers of the data. Finally, the optical power prediction results are output. Specific embodiments

[0118] The optimization model obtained after training with data from May to July at a new energy photovoltaic station in Jiangsu was verified by using data from August 1 to September 8. Among the total 3,545 valid data, the manufacturer's assessment points for 15-minute ultra-short-term prediction were 816, and the assessment points after optimization were 317, with a performance improvement of 14.1%. This can effectively reduce the average monthly assessment fee by 29,940 yuan, greatly improve the accuracy of station prediction, reduce the cost of station prediction assessment, and lay a good foundation for the future market application of station power prediction.

[0119] This method uses bidirectional LSTM. To demonstrate the superiority of this algorithm, it is compared with several models including Long Short-Term Memory (LSTM), LSTM-attention (LSTM-ATT), Gate Recurrent Unit (GRU), and ensemble learning. By comparing the MAE and RMSE results of several algorithms, it is found that the bidirectional LSTM model performs well in both MAE and RMSE indicators, and is superior to other models because it can more effectively capture complex patterns in time series data.

[0120] 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 power station prediction method based on bidirectional LSTM, characterized in that: The method comprises the following steps: Step S1, data collection; Step S2, data preprocessing; Step S3, feature construction and correlation analysis; Step S4, construction of a bidirectional LSTM model; Step S5, model training and tuning; Step S6: model evaluation and performance analysis.

2. According to a photovoltaic power station power prediction method based on bidirectional LSTM according to claim 1, it is characterized in that: The data collected in step S1 includes a first data set and a second data set, wherein the first data set is data obtained through a photovoltaic power generation monitoring system and a forecasting manufacturer's on-site server, and the second data set is data obtained through an on-site weather station.

3. According to claim 2, a photovoltaic station power prediction method based on bidirectional LSTM is characterized in that: The first data set includes the total grid-connected power, predicted irradiance and power prediction value, and the second data set includes the inclination irradiance intensity, ambient temperature, backplane temperature, ambient humidity, wind direction, wind speed and atmospheric pressure.

4. According to claim 1, a photovoltaic station power prediction method based on bidirectional LSTM is characterized in that: The data preprocessing in step S2 is to clean and screen the data, remove outliers and missing values ​​in the data, and standardize the data; specifically, it includes the following steps: Step S201, downsampling, deleting samples from the original data; Step S202, time alignment, converting data collected at different time intervals into the same time interval; Step S203, missing value processing, including filling and deleting missing values; Step S204: aligning attributes, converting attributes with different names in different data sources into the same name.

5. According to a photovoltaic power station power prediction method based on bidirectional LSTM according to claim 1, it is characterized in that: The step S3, feature construction and correlation analysis is to construct features based on Kendall and Spearman correlation analysis, and the specific process is as follows: Clean and screen the data, and select air pressure, station temperature, humidity, wind direction, wind speed, horizontal irradiance, normal irradiance, diffuse irradiance, station irradiance, and station power, a total of 10 measurement points for correlation analysis of power generation; The Kendall correlation calculation formula is: Where P is the number of observation pairs with consistent arrangement; Q is the number of observation pairs with inconsistent arrangement; T is the number of consistent pairs; U is the number of inconsistent pairs; The Spearman correlation calculation formula is: Among them, d i is the rank difference of each pair of data; n is the number of data points.

6. According to a photovoltaic power station power prediction method based on bidirectional LSTM according to claim 1, it is characterized in that: The construction of the bidirectional LSTM model includes the design of the input layer, hidden layer and output layer, the selection of activation function, the selection of loss function and the optimization algorithm.

7. A photovoltaic power station power prediction method based on bidirectional LSTM according to claim 6, characterized in that: The activation function is selected as follows: Bidirectional LSTM uses Sigmoid and Tanh as activation functions; The Sigmoid function formula is: Where x represents the input value; σ(x) represents the output value, and its value range is [0,1]; The Tanh function formula is: Among them, x is the input value, tanh(x) is the output value of the tanh function, and in the tanh function, x represents the input value.

8. The photovoltaic power prediction method based on bidirectional LSTM according to claim 6 is characterized in that: The loss function is selected by specifically using mean absolute error MAE and root mean square error RMSE as the loss function, and the optimization algorithm adopts Adam optimization algorithm.

9. The photovoltaic power prediction method based on bidirectional LSTM according to claim 1 is characterized in that: The step S5, model training and tuning is specifically as follows: Step S501, using a time series segmentation combined with a K-fold cross validation method to divide the data set; Step S502, select multiple model architectures for cross-experimentation, and optimize hyperparameters through network search, random search, and Bayesian optimization.

10. A photovoltaic power station power prediction method based on bidirectional LSTM according to claim 1, characterized in that: The step S6, model evaluation and performance analysis is specifically as follows: Step S601, model evaluation: including analyzing performance indicators, error analysis, generating visualization curves and other key elements, using mean absolute error and root mean square error for comprehensive performance evaluation; Step S602, performance analysis: after model training and hyperparameter tuning, the mean absolute error and root mean square error scores between the models are obtained, and the prediction ability of each model is obtained through analysis; Step S603, visual analysis: Use box plots and violin plots to perform data visual analysis, including the center position, dispersion, and outliers of the data.

Citation Information

Patent Citations

  • Optical power prediction method and system based on two-stage feature extraction and BiLSTM improvement

    CN114282646A

  • Photovoltaic power prediction method based on VMD decomposition and lamination deep learning

    CN116644970A

Cited By

  • Day-ahead photovoltaic prediction method and device based on weather sensitivity time-phased clustering

    CN121529549A

  • A Day-ahead Photovoltaic Forecasting Method and Device Based on Time-Period Clustering of Meteorological Sensitivity

    CN121529549B