Very-short-term photovoltaic power forecasting method and system for real-time control

By normalizing and performing feature analysis on photovoltaic power generation data, and combining BP neural networks and LSTM networks, the problems of insufficient precision and low accuracy in photovoltaic power generation prediction time scales are solved, achieving high-precision ultra-short-term photovoltaic power prediction and meeting the real-time control requirements of photovoltaic power plants.

WO2026021136A1PCT designated stage Publication Date: 2026-01-29NANJING GUODIAN NANZI WEIMEIDE AUTOMATION CO LTD

Patent Information

Application Number
PCT/CN2025/104283
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-24
Filing Date
2025-06-27
Publication Date
2026-01-29

AI Technical Summary

Technical Problem

The time scale for predicting photovoltaic power generation output in existing technologies is not precise enough, and the prediction accuracy is not high, making it difficult to meet the real-time control requirements of photovoltaic power plants.

Method used

The radiation, temperature, humidity and photovoltaic power data are normalized using the extreme values ​​of the whole year statistics. A two-layer photovoltaic output prediction framework based on deep learning is constructed. By combining BP neural network and long short-term recurrent neural network (LSTM), feature correlation analysis and data cleaning are performed to improve the resolution of prediction data.

Benefits of technology

It enables accurate prediction of photovoltaic power on an extremely short timescale, and is suitable for real-time control and optimized operation of photovoltaic power plants, improving prediction accuracy and system response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025104283_29012026_PF_FP_ABST
    Figure CN2025104283_29012026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of very-short-term photovoltaic power forecasting, and in particular to a very-short-term photovoltaic power forecasting method and system for real-time control, which intend to improve precision and real-time performance in photovoltaic power forecasting. The method comprises the following steps: performing normalization processing on meteorological data, and performing a feature correlation analysis; using a BP neural network to perform short-term photovoltaic power forecasting, inputting the meteorological data and historical output data, and outputting a short-term forecasting value with a resolution of 15 minutes; and performing spline interpolation and outlier removal on an upper-layer result of the BP neural network, and using same as a long short-term memory recurrent neural network input, so as to improve a temporal resolution of forecast data and obtain very-short-term photovoltaic power forecast data with a resolution of 1 minute. The method comprehensively considers meteorological factors and uses advanced neural network models and data processing techniques to achieve photovoltaic power forecasting on a very short temporal scale while ensuring forecasting precision, making the method suitable for the real-time control and optimized operation of photovoltaic power stations.
Need to check novelty before this filing date? Find Prior Art

Description

A method and system for predicting ultra-short-term photovoltaic power for real-time control Technical Field

[0001] This invention relates to the field of ultra-short-term photovoltaic power prediction technology, and in particular to an ultra-short-term photovoltaic power prediction method and system for real-time control. Background Technology

[0002] Due to the highly random nature of photovoltaic (PV) power output, PV power plants operate under complex and variable conditions, easily leading to safety hazards and economic losses. Therefore, researching PV power output prediction methods is of great significance for performance monitoring, fault detection, and operation control of PV power plants. There are various PV power output prediction methods, which can be mainly divided into point prediction, interval prediction, and probabilistic prediction according to different prediction forms. Point prediction is a deterministic prediction, providing a definite predicted output value at a certain future time; interval prediction provides upper and lower bounds of output at a given confidence level; and probabilistic prediction provides the expected output value and probability distribution information at future times. These are collectively referred to as uncertain predictions. The method proposed in this invention is mainly applied to the real-time control of PV power plants, so this discussion primarily focuses on the point prediction method. Since artificial intelligence methods do not require a specific expression between input and output, but rather obtain a PV power output prediction model through training on historical data, this approach is more effective. These methods require a large amount of historical data, are simple to operate, and easy to implement. Artificial intelligence prediction methods have become one of the most commonly used methods for predicting photovoltaic power generation output. However, current research on traditional artificial intelligence prediction methods focuses on short-term predictions of the next one to ten days and ultra-short-term predictions of the next four hours, with a time resolution of fifteen minutes. They generally suffer from insufficiently fine prediction time scales and low prediction accuracy, making it difficult to meet the flexible control requirements of photovoltaic-hydrogen storage power stations. Summary of the Invention

[0003] In view of the problems existing in the prior art, the present invention is proposed.

[0004] Therefore, this invention provides an ultra-short-term photovoltaic power prediction method for real-time control, which can solve the problems of insufficiently fine prediction scale and low prediction accuracy in traditional methods.

[0005] To address the aforementioned technical problems, this invention provides the following technical solution: a method for real-time control of ultra-short-term photovoltaic power prediction, comprising: normalizing radiation, temperature, humidity, and photovoltaic power data using annual statistical limit values ​​to obtain variable and photovoltaic power time series; performing feature correlation analysis to construct a deep learning-based two-layer photovoltaic output prediction framework; conducting short-term photovoltaic power prediction based on a BP neural network, using meteorological data and historical output data as input, optimizing the loss function by time period to obtain an upper-layer short-term prediction value with a resolution of 15 minutes; performing spline interpolation on the upper-layer results, extracting outliers using box plots and violin plots, and removing outliers using a moving time window filter; improving the resolution of the prediction data based on a long short-term recurrent neural network, and obtaining lower-layer ultra-short-term photovoltaic power prediction data with a resolution of 1 minute while considering both prediction time scale and prediction accuracy.

[0006] As a preferred embodiment of the ultra-short-term photovoltaic power prediction method for real-time control described in this invention, the normalization process is expressed as follows:

[0007] Where, χ n For the nth data to be processed, x max and x min These are the maximum and minimum values ​​of the variable, respectively.

[0008] Correlation analysis was conducted on various meteorological factors and photovoltaic power output. Numerical weather forecasts and historical measured meteorological data from photovoltaic power plants, as well as active power generation data from historical power output data, were used as the input layer sample data for the training process of the BP neural network.

[0009] As a preferred embodiment of the ultra-short-term photovoltaic power prediction method for real-time control described in this invention, the BP neural network includes an input layer, a hidden layer, and an output layer.

[0010] The input layer includes the output power of the photovoltaic power station, which is related to the solar radiation intensity and is also affected by temperature, relative humidity, and cloud cover. By combining the correlation analysis of the relationship between various meteorological factors and photovoltaic power output, the predicted solar radiation intensity in the numerical weather forecast of the photovoltaic power station, the actual solar radiation intensity in historical meteorological data, and the active power generation in historical power output data are determined as the input layer sample data for the training process of the BP neural network.

[0011] The output layer performs short-term power prediction, and the output data of the output layer is the output power sequence of the photovoltaic power station for the next 24 hours, with a time interval of 15 minutes.

[0012] The choice of the number of hidden layer neurons is related to the scale and accuracy of the neural network. According to Kolmogorov's theorem, if the number of input variables is n, then the number of hidden layer neurons is 2n+1. The number of hidden layer neurons is determined by repeated trials.

[0013] The training process of the BP neural network is related to the prediction accuracy of the output power model of the photovoltaic power generation system. By combining the BP learning algorithm with the addition of a motion term and the BP learning algorithm with a variable learning rate, we can improve the convergence speed and reduce the probability of getting stuck in local minima.

[0014] As a preferred embodiment of the ultra-short-term photovoltaic power prediction method for real-time control described in this invention, the method comprises: a BP learning algorithm combining an increased motion term and a BP learning algorithm with a variable learning rate, wherein: P samples are input sequentially, and the output and backpropagation error of each layer are calculated; after all P samples have been calculated, the connection weights of each layer are adjusted according to the weight adjustment formula; according to the new connection weights, the output, backpropagation error, and total network error E(t) of each layer are calculated; if E(t) < ε or t > T, the training process is terminated; if E(t) ≥ ε and t ≤ T, P samples are re-inputted, and the output and backpropagation error of each layer are calculated to perform a new round of training;

[0015] Where P is the number of training samples, T is the maximum number of training iterations, and ε is the system's allowable error.

[0016] As a preferred embodiment of the ultra-short-term photovoltaic power prediction method for real-time control described in this invention, the method of removing outliers by using a moving time window filter includes spline interpolation of the results obtained from the upper-layer BP network, displaying the quartiles and median and the density distribution of the data based on box plots and violin plots, preliminarily judging the concentration and dispersion of the data by observing the shape and peak values ​​of the graphs, identifying outliers by combining statistical methods, and using interquartile range to define outliers.

[0017] We selected a four-hour time window as the moving time window size, calculated the mean and median statistics of the data within the window, used the statistics within the window to replace outliers, and then moved the time window forward by one time unit until all data was processed. After data cleaning, outliers were removed.

[0018] As a preferred embodiment of the ultra-short-term photovoltaic power prediction method for real-time control described in this invention, wherein: the improvement of prediction data resolution based on a long short-term recurrent neural network is represented by memory cell units, which are the core components of the LSTM network, and the model input includes the time-t sequence input x. t The state of the hidden layer cells at time t-1, h t-1 and memory unit c t-1The output includes the memory cell state c. t With hidden layer state h t , where c t with h t Each contains the model's long-term and short-term memory information. The reading and modification of memory cells are achieved by controlling the input gate, forget gate, and output gate, facilitating information flow between networks. `tanh` represents the tanh activation function. The input gate uses the sigmoid activation function to input parameters, controlling the variable between [0,1] to achieve x. t For c t The forgetting gate is the selective forgetting of the neuronal state at the previous moment, specifically manifested by utilizing memory units c. t-1 For c t The control; the output gate is used to output and control parameter variables, that is, using c t For h t The degree of influence is calculated using the following formulas: i t =σ(W ix x t +W ih h t-1 +b i f t =σ(W fx x t +W fh h t-1 +b f o t =σ(W ox x t +W oh h t-1 +b o )

[0019] Among them, i t f t o t These represent the state calculation results of the input gate, forget gate, and output gate, respectively; W ix and W ih W fx and W fh W ox and W oh With b i b f b o These represent the weight matrix and bias term of the corresponding gate, respectively; σ represents the sigmoid activation function.

[0020] In the LSTM model, the output of the memory module at time t is determined by both the output gate and the cell state, as shown in the following formula: h t =o t*tanhc t

[0021] In the formula, The cell state input at time t represents the state input; tanh is the hyperbolic tangent activation function; W c b c These represent the state weight matrix and bias term of the input layer, respectively; * indicates that the elements are multiplied according to their positions.

[0022] Another objective of this invention is to provide an ultra-short-term photovoltaic power prediction system for real-time control. The eigenvalue correlation analysis module enhances the understanding of data interactions through statistical normalization and time-series analysis of environmental and power data, providing a solid data foundation for accurate prediction. The short-term power prediction module utilizes meteorological and historical power output data and a BP neural network to achieve optimized power resource allocation and cost control, significantly improving the efficiency and economy of operational decisions. The ultra-short-term fine prediction module, through high-resolution prediction and advanced data processing technology, enhances the system's response speed to sudden climate changes, improving grid reliability and photovoltaic equipment maintenance efficiency.

[0023] As a preferred embodiment of the ultra-short-term photovoltaic power prediction system for real-time control described in this invention, it includes: a feature analysis module, a short-term power prediction module, and an ultra-short-term fine prediction module.

[0024] The feature analysis module uses the extreme values ​​of the annual statistics to normalize the radiation, temperature, humidity and photovoltaic power data to obtain the variable and photovoltaic power time series, and then performs feature correlation analysis.

[0025] The short-term power prediction module performs short-term photovoltaic power prediction based on a BP neural network. It takes meteorological data and historical power output data as input, optimizes the loss function in different time periods, and obtains upper-level short-term prediction values ​​with a resolution of 15 minutes.

[0026] The ultra-short-term fine prediction module performs spline interpolation on the upper-level results, extracts outliers using box plots and violin plots, and removes outliers using moving time window filtering. Based on a long short-term recurrent neural network, it improves the resolution of the prediction data, and obtains lower-level ultra-short-term photovoltaic power prediction data with a resolution of 1 minute while taking into account both the prediction time scale and prediction accuracy.

[0027] A computer device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of any one of the methods in a real-time control method for ultra-short-term photovoltaic power prediction.

[0028] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods in a method for real-time control of ultra-short-term photovoltaic power prediction.

[0029] The beneficial effects of this invention are as follows: The method of this invention comprehensively considers meteorological factors, adopts advanced neural network models and data processing technology, and can achieve photovoltaic power prediction on a very short time scale while ensuring prediction accuracy. It is suitable for real-time control and optimized operation of photovoltaic power plants. Attached Figure Description

[0030] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 is a schematic diagram of the process of an ultra-short-term photovoltaic power prediction method for real-time control proposed in this invention.

[0032] Figure 2 is a schematic diagram of the BP network structure and learning process of an ultra-short-term photovoltaic power prediction method for real-time control provided by an embodiment of the present invention.

[0033] Figure 3 shows the basic structure of an LSTM network for a real-time control method for predicting ultra-short-term photovoltaic power, according to an embodiment of the present invention.

[0034] Figure 4 shows the trend of the loss function during the training process of an ultra-short-term photovoltaic power prediction method for real-time control provided by an embodiment of the present invention.

[0035] Figure 5 is a schematic diagram comparing the short-term predicted values ​​of the proposed method, the short-term predicted values ​​of existing methods, and the measured values ​​in the training set of an ultra-short-term photovoltaic power prediction method for real-time control provided by an embodiment of the present invention.

[0036] Figure 6 is a schematic diagram comparing the short-term predicted values ​​of the proposed method, the short-term predicted values ​​of existing methods, and the measured values ​​of a test set of an ultra-short-term photovoltaic power prediction method for real-time control provided by an embodiment of the present invention.

[0037] Figure 7 is a schematic diagram of the mean square error curve during the training process of an ultra-short-term photovoltaic power prediction method for real-time control provided in an embodiment of the present invention.

[0038] Figure 8 is a schematic diagram of the loss function curve during the training process of an ultra-short-term photovoltaic power prediction method for real-time control provided by an embodiment of the present invention.

[0039] Figure 9 is a schematic diagram comparing the training set prediction results of an ultra-short-term photovoltaic power prediction method for real-time control provided by an embodiment of the present invention.

[0040] Figure 10 is a schematic diagram comparing the test set prediction results of an ultra-short-term photovoltaic power prediction method for real-time control provided by an embodiment of the present invention. Detailed Implementation

[0041] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0042] Example 1

[0043] Referring to Figures 1-3, the first embodiment of the present invention provides a method for real-time control of ultra-short-term photovoltaic power prediction, including:

[0044] First, based on meteorological data and historical power output data, a two-layer photovoltaic power output prediction framework based on deep learning is constructed as shown in Figure 1. The complex nonlinear mapping approximation capability of the BP neural network and the long short-term recurrent neural network (LSTM) are used to capture and model the long-term dependencies in the power sequence data, so as to obtain photovoltaic power output prediction data that can meet the real-time control requirements of photovoltaic power plants and solve the problems of insufficient prediction scale and low prediction accuracy.

[0045] Secondly, the upper layer uses a BP neural network to perform short-term photovoltaic power prediction, replaces the limit value of the annual statistics with normalization preprocessing and feature correlation analysis, optimizes the loss function in different time periods, and obtains short-term prediction values ​​with a resolution of 15 minutes, thereby improving the prediction accuracy.

[0046] Finally, the lower layer performs spline interpolation fitting on the results of the upper layer, extracts outliers using methods such as box plots and violin plots, and removes outliers using a moving time window filter. Based on a long short-term recurrent neural network (LSTM), while taking into account the prediction time scale and prediction accuracy, it obtains ultra-short-term photovoltaic power prediction data with a resolution of 1 minute, thereby improving the resolution of the prediction data.

[0047] Compared with existing technologies, the prediction method proposed in this invention has good prediction accuracy and high-precision prediction resolution, which can meet the needs of real-time control.

[0048] S1: Normalize the radiation, temperature, humidity and photovoltaic power data using the extreme values ​​of the whole year statistics to obtain the time series of variables and photovoltaic power, and perform characteristic correlation analysis.

[0049] It should be noted that the normalization and feature analysis methods designed for photovoltaic power prediction using multivariate time series data present challenges due to the different dimensions and significant numerical differences among the input variables. Considering the input-output range of the nonlinear activation function in the model, and to avoid neuron saturation while ensuring equal consideration of the impact of each variable on photovoltaic power, normalization of the variables and the photovoltaic power time series is necessary. The prediction model of this invention uses the Sigmoid activation function, with the output limited to between 0 and 1. Inputs such as radiation, temperature, humidity, and photovoltaic power are normalized using the extreme values ​​obtained from annual statistics, reducing their values ​​to the interval [0,1]. The expression is as follows:

[0050] Where, χ n For the nth data to be processed, x max and x min These are the maximum and minimum values ​​of the variable, respectively.

[0051] Correlation analysis was conducted on various meteorological factors and photovoltaic power output. Numerical weather forecasts and historical measured meteorological data from photovoltaic power plants, as well as active power generation data from historical power output data, were used as the input layer sample data for the training process of the BP neural network.

[0052] S2: Short-term photovoltaic power prediction is carried out based on BP neural network. Numerical weather forecast, historical measured meteorological data and active power generation are used as inputs. The loss function is optimized in different time periods to obtain the upper-level short-term prediction value with a resolution of 15 minutes.

[0053] It should be noted that it consists of three parts: an input layer, a hidden layer, and an output layer.

[0054] 1) The output power of the photovoltaic power station is mainly related to the solar radiation intensity, and is also affected by temperature, relative humidity, and cloud cover. Based on the correlation analysis of the relationship between various meteorological factors and photovoltaic power output, the predicted solar radiation intensity in the numerical weather prediction of the photovoltaic power station, the actual solar radiation intensity in historical meteorological data, and the active power generation are determined to be the input layer sample data for the training process of the BP neural network.

[0055] 2) Output layer: Conduct short-term power prediction. The output data of the output layer is the output power sequence of the photovoltaic power station in the next 24 hours, with a time interval of 15 minutes.

[0056] 3) The improvement of the hidden layer and the accuracy of the artificial neural network can be achieved by increasing the number of its neurons in a single hidden layer, which is simpler in terms of structural implementation than increasing the number of hidden layers. Therefore, the output power prediction model of the photovoltaic power generation system adopts a single hidden layer structure. The selection of the number of hidden layer neurons directly affects the scale and accuracy of the neural network. According to the Kolmogorov theorem, if the number of input variables is n, the number of hidden layer neurons can generally be taken as 2n + 1, or the number of hidden layer neurons can also be determined by the trial-and-error method.

[0057] The training process of the BP neural network directly affects the prediction accuracy of the output power model of the photovoltaic power generation system. The traditional BP neural network training uses the error backpropagation learning algorithm, which has problems such as being prone to falling into local minima and having a slow convergence speed. Scholars at home and abroad have improved the traditional BP learning algorithm from different perspectives, which can be generally divided into two categories: (1) Improvements based on the standard gradient descent method, such as the BP learning algorithm with an added momentum term, the BP learning algorithm with a variable learning rate, etc.; (2) Improvements based on numerical optimization algorithms, such as the quasi-Newton method, the Levenberg-Marquardt algorithm, the conjugate gradient method, etc.

[0058] The present invention combines the BP learning algorithm with an added momentum term and the BP learning algorithm with a variable learning rate to improve the traditional BP learning algorithm to increase the convergence speed and reduce the probability of falling into local minima. Suppose there are P training samples, T is the maximum number of training times, w is the connection weight, w(t) is the weight at the t-th iteration, Δw BP (t) is the change in the weight at the t-th iteration according to the traditional BP learning algorithm, E(t) is the total network error at the t-th iteration, ε is the allowable error of the system, and η is the learning rate. The flowchart of the BP learning algorithm is shown in Figure 2, and the algorithm steps are as follows:

[0059] ① Initialize the weight w, and assume the current is the t-th iteration;

[0060] ② Input P samples in sequence. Assume the current input is the p-th sample, and calculate the outputs and backpropagation errors of each layer;

[0061] ③ If p < P, then p = p + 1, go to step ②, otherwise go to step ④;

[0062] ④ Adjust the connection weights of each layer according to the weight adjustment formula;

[0063] ⑤ According to the new connection weights, calculate the outputs, backpropagation errors, and the total network error E(t) of each layer. If E(t) < ε or t > T, then terminate the training process; otherwise, t = t + 1, and go to step ② for a new round of training;

[0064] Among them, the number of training samples is P, and T is the maximum number of training times.

[0065] Since photovoltaic power generation only occurs during the day, the accuracy of daytime forecasts is crucial for flexible control. This study considers forecast accuracy across multiple time periods, including both day and night, integrating the accuracy calculation formula into the loss function. Optimization is then performed on parameters based on substandard data, with an increased penalty coefficient for the model. Limited computational resources are prioritized for models with substandard accuracy, and the results from these substandard models are repeatedly validated.

[0066] S3: Spline interpolation is performed on the upper-level results, and outliers are extracted using box plots and violin plots. Outliers are removed using a moving time window filter. The resolution of the prediction data is improved based on a long short-term recurrent neural network. While taking into account both the prediction time scale and prediction accuracy, the lower-level ultra-short-term photovoltaic power prediction data with a resolution of 1 minute is obtained.

[0067] It should be noted that the structure of the designed LSTM recurrent neural network is shown in Figure 3. Before training the LSTM with data, the data collected from the SCADA system needs to be preprocessed. Spline interpolation is performed on the results obtained from the upper-layer BP network. The quartiles and median, as well as the data density distribution, are displayed based on box plots and violin plots. The centralization and dispersion of the data are initially judged by observing the shape and peaks of the graphs. Outliers are identified by combining statistical methods, and the interquartile range is used to define outliers.

[0068] A four-hour time window is chosen as the moving average window size. Statistics such as the mean and median of the data within the window are calculated. Outliers are replaced using these statistics. The time window is then moved forward by one time unit until all data has been processed. After data cleaning, outliers are removed, making the statistical characteristics of the data more apparent, which is beneficial for training the neural network. The LSTM network structure consists of input gates, output gates, and forget gates. Unlike traditional recurrent neural networks, it has multiple hidden layers, where neurons are replaced with gating memory units. The introduction of gating units in its topology controls the degree to which current information influences previous information, giving the model a longer "memory function," making it suitable for long-term nonlinear sequence problems.

[0069] The memory cell unit is a core component of the LSTM network. The model's input includes the sequential input x at time t. t The state of the hidden layer cells at time t-1, h t-1 and memory unit c t-1 The output includes the memory cell state c. t With hidden layer state h t , where c t with h tEach contains the model's long-term and short-term memory information. The reading and modification of memory cells are achieved by controlling the input gate, forget gate, and output gate, facilitating information flow between networks. `tanh` represents the tanh activation function. The input gate uses the sigmoid activation function to input parameters, controlling the variable between [0,1] to achieve x. t For c t The forgetting gate is the selective forgetting of the neuronal state at the previous moment, specifically manifested by utilizing memory units c. t -1 controls ct; the output gate is used to output and control parameter variables, that is, using ct t For h t The degree of influence is calculated using the following formulas: i t =σ(W ix x t +W ih h t-1 +b i f t =σ(W fx x t +W fh h t-1 +b f o t =σ(W ox x t +W oh h t-1 +b o (2)

[0070] Among them, i t f t o t These represent the state calculation results of the input gate, forget gate, and output gate, respectively; W ix and W ih W fx and W fh W ox and W oh With b i b f b o These represent the weight matrix and bias term of the corresponding gate, respectively; σ represents the sigmoid activation function. In the LSTM model, the output of the memory module at time t is determined by both the output gate and the cell state, as shown in the following formula:

[0071] In the formula, The cell state input at time t represents the state input; tanh is the hyperbolic tangent activation function; W c b c These represent the state weight matrix and bias term of the input layer, respectively; * indicates that the elements are multiplied according to their positions.

[0072] Example 2

[0073] Referring to Figures 4-10, the second embodiment of the present invention provides a method for predicting ultra-short-term photovoltaic power for real-time control. To verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.

[0074] To verify the effectiveness of the method proposed in this invention, a photovoltaic power station located in Delingha City, Haixi Mongolian and Tibetan Autonomous Prefecture, Qinghai Province (97.37°E, 37.37°N), with an installed capacity of 100MW and a grid connection rate of 85%, was selected. Historical output power data and historical meteorological information from April 1, 2023, and May 4, 2023, were used to make predictions using the aforementioned model. Days 1 to 20 were used as the training set, and days 21 to 34 were used as the test set.

[0075] First, the upper-layer backpropagation (BP) neural network was trained and its prediction performance was evaluated. The number of hidden layers was two, both using the sigmoid activation function with a learning rate of 0.1. Stochastic gradient descent (SGD) was used for optimization. The model was trained for 10,000 epochs, and the training loss was recorded every 100 epochs. Since photovoltaic power is only non-zero when there is sunshine, error calculation was performed considering both nighttime and non-nighttime scenarios.

[0076] To accurately evaluate the prediction model, certain evaluation indicators are required. The most commonly used indicator for evaluating predictions is the Mean Absolute Percentage Error (MAPE), as shown in Equation (4):

[0077] In the formula, N is the total number of data points; This is the i-th predicted value; This is the i-th actual value.

[0078] Because photovoltaic power has a zero value. As the model approaches infinity, MAPE becomes meaningless. Therefore, the root mean square error (RMSE) is used to evaluate the prediction results. RMSE reflects the model's performance in controlling the absolute error, and its calculation formula is as follows:

[0079] In the formula, P(i) and , respectively, represent the actual and predicted values ​​of photovoltaic power; n is the number of prediction verification data; i is the prediction point sequence number.

[0080] Figure 4 shows the trend of the loss function during training. It can be seen that the loss function of the neural network in the method proposed in this invention converges after about 1000 training iterations, which takes no more than 1 minute. The training time is short and the convergence is fast, which has high practical value.

[0081] Figure 5 compares the predicted output of the training set with the measured values ​​and existing short-term predicted values. The three curves in the figure represent the measured photovoltaic output, the short-term predicted value of the proposed method, and the short-term predicted value of the existing method, respectively. Figure 6 compares the short-term prediction results with the measured values ​​and existing short-term predicted values.

[0082] To verify the prediction accuracy of the proposed method, the RMSE of the short-term prediction results and the measured results are shown in Table 1, where the prediction accuracy is measured by (1-RMSE). It is worth noting that the following situations were considered when calculating the prediction accuracy: (1) Day and night were considered: because photovoltaics only output power during the day, the prediction accuracy during the daytime period in the prediction results is of great significance for flexible control; (2) Only the prediction error of the test set was considered: the overall set includes training set data, and under normal circumstances, the prediction accuracy of the training set is higher than that of the test set, which may interfere with the judgment. Therefore, the prediction accuracy is based on the test set. (3) After the prediction is completed, spline interpolation is performed on the test set results, and the interpolation error is calculated. The prediction accuracy before and after interpolation is not significantly improved. As can be seen from the table, the proposed short-term photovoltaic power prediction method is more accurate than the existing short-term and ultra-short-term prediction methods, with a prediction accuracy of 85%.

[0083] Table 1 Prediction Accuracy Analysis

[0084] Then, the prediction performance of the lower-layer LSTM network was evaluated, with the prediction results of the upper-layer BP neural network serving as the input to the LSTM network. MATLAB was used as the deep learning training platform, equipped with the Adam optimizer with adaptive learning capabilities, to debug the LSTM model, including modifying the network structure, adjusting the ratio of training, validation, and test sets, increasing or decreasing the amount of data, and adjusting the training stride. The final network parameters and calculation results are shown in Table 2.

[0085] Table 2 LSTM Neural Network Parameters

[0086] The predicted values ​​of meteorological data for future periods, the measured values ​​for historical periods, and the short-term predicted values ​​of photovoltaic power from the upper-layer BP neural network are used as train_inputs, and the measured values ​​of photovoltaic power are used as train_targets for training. 70% of the existing dataset is used as the training set, and the remaining 30% is used as the test set, and interpolation processing is performed.

[0087] During training, the maximum number of training iterations (MaxEpochs) is set to 50, with all training data fed into the model once per epoch. To improve computational efficiency, data is typically grouped into mini-batch sizes (MiniBatchSize) before being fed into the model, with a batch size of 128. The initial learning rate (InitialLearnRate) is set to 0.001, which determines the step size for parameter updates during optimization. The learning rate descent strategy (LearnRateSchedule) uses a piecewise approach, where the learning rate typically decreases as training progresses, allowing for finer adjustments in later stages of training. The learning rate drop factor (LearnRateDropFactor) is set to 0.1, with 40 descent cycles. At the end of each descent cycle, the learning rate is multiplied by the drop factor and updated. Furthermore, the data is shuffled after each epoch. Shuffling the data improves the model's generalization performance.

[0088] The structure of the LSTM neural network is shown in Table 3, where the hidden layer has 20 neurons and the linear layer has one layer. The activation parameters of the Long Short-Term Memory (LSTM) neural network are usually expressed as (C)×(B)×(S), where (C) is the feature dimension or the number of hidden units, (B) is the batch size, i.e., the number of samples processed at one time, and (S) is the time step, i.e., the sequence length.

[0089] Table 3 LSTM Neural Network Structure Parameters

[0090] The mean squared error curve and loss function curve during the training process are shown in Figures 7 and 8, respectively. It can be seen that a good training effect was achieved after about 10 iterations. The iterative training consisted of 50 rounds, with 267 iterations per round and a maximum of 13,350 iterations. The total iterative training time was 2 minutes and 25 seconds.

[0091] The prediction results of the LSTM neural network are shown in Table 4. The determination coefficient R0 is used to... 2 The reliability of the model is evaluated by this value, which represents the correlation between the model's predictions and the actual values. R0 on the training set... 2 The value is 0.9995, which means the model can explain nearly 99.95% of the power variations in the training set, indicating that the model fits the training set very well. On the test set, R... 2A value of 0.99906 indicates that the model also exhibits very strong generalization performance on the test set. Model prediction accuracy is measured by the mean absolute error (MAE), with MAE values ​​of 0.27026 and 0.34514 on the training and test sets, respectively. The relatively low MAE values ​​confirm the model's excellent performance in prediction accuracy. Overall, the LSTM-based model presented in this invention demonstrates satisfactory results in photovoltaic power generation prediction. Although the coefficient of determination and mean absolute error both demonstrate the model's superior performance, future research should further explore other evaluation metrics, such as maximum error and prediction accuracy under different light intensities, to gain a more comprehensive understanding of the model's performance.

[0092] Table 4 LSTM Neural Network Calculation Results

[0093] Figures 9 and 10 show the prediction results for the training and test sets, respectively. The horizontal axis represents the number of predicted samples, and the time interval between adjacent points is 1 minute. This means that the lower-layer neural network achieves high-resolution photovoltaic power prediction. This time resolution is suitable for the real-time control requirements of photovoltaic power plants and has good engineering application value.

[0094] Compared with traditional prediction methods, the photovoltaic power prediction method designed in this invention can obtain ultra-short-term photovoltaic power prediction data with a resolution of 1 minute while taking into account both prediction time scale and prediction accuracy. This can meet the real-time control requirements of photovoltaic power plants and has good engineering application value.

[0095] Example 3

[0096] The third embodiment of the present invention differs from the first two embodiments in that:

[0097] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0098] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0099] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0100] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0101] Example 4

[0102] This is a fourth embodiment of the present invention, which provides an ultra-short-term photovoltaic power prediction system for real-time control, characterized in that it includes a feature analysis module, a short-term power prediction module, and an ultra-short-term fine prediction module.

[0103] The feature analysis module uses the extreme values ​​of the annual statistics to normalize the radiation, temperature, humidity and photovoltaic power data to obtain the variable and photovoltaic power time series, and then performs feature correlation analysis.

[0104] The short-term power prediction module performs short-term photovoltaic power prediction based on a BP neural network. It takes meteorological data and historical power output data as input, optimizes the loss function in different time periods, and obtains upper-level short-term prediction values ​​with a resolution of 15 minutes.

[0105] The ultra-short-term fine prediction module performs spline interpolation on the upper-level results, extracts outliers using box plots and violin plots, and removes outliers using moving time window filtering. Based on a long short-term recurrent neural network, it improves the resolution of the prediction data, and obtains lower-level ultra-short-term photovoltaic power prediction data with a resolution of 1 minute while taking into account both the prediction time scale and prediction accuracy.

[0106] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A very short-term photovoltaic power prediction method for real-time control, characterized in that: The application relates to a photovoltaic power output prediction method based on deep learning. The method comprises the following steps: including, The variable and photovoltaic power time series are obtained by normalizing radiation, temperature, humidity and photovoltaic power data by using annual statistical limit values, characteristic correlation analysis is carried out, and a double-layer photovoltaic output prediction framework based on deep learning is constructed; Short-term photovoltaic power prediction is carried out based on a BP neural network, meteorological data and historical output data are taken as inputs, a loss function is optimized in time periods, and an upper-layer short-term prediction value with a resolution of 15 min is obtained; 2. A very short term photovoltaic power prediction method for real-time control as claimed in claim 1 characterized by: The normalization process is represented as, where χ n is the nth data to be processed, x max and x min are the maximum and minimum values of the variable, respectively; The upper-layer result is subjected to spline interpolation, outliers are extracted in the form of a box plot and a violin plot, the outliers are removed by adopting a moving time window filtering mode, the prediction data resolution is improved based on a long short-term memory recurrent neural network, the prediction time scale and prediction accuracy are considered, and lower-layer extremely short-term photovoltaic power prediction data with a resolution of 1 min are obtained.

3. A very short term photovoltaic power prediction method for real-time control as claimed in claim 2, characterized in that: Correlation analysis is carried out on meteorological factors and photovoltaic output, and numerical weather prediction in meteorological data of a photovoltaic power station and historical measured meteorological data and active power in historical output data are taken as input layer sample data in a BP neural network training process. The BP neural network comprises an input layer, a hidden layer and an output layer. The input layer comprises output power of the photovoltaic power station and solar radiation intensity, and is simultaneously affected by temperature, relative humidity and clouds; correlation analysis is carried out on the relationship between meteorological factors and photovoltaic output, and predicted solar radiation intensity in numerical weather prediction of the photovoltaic power station, actual solar radiation intensity of historical measured meteorological data and active power in historical output data are taken as input layer sample data in the BP neural network training process; The output layer carries out short-term power prediction, and output data of the output layer are future 24h photovoltaic power station output power sequences with a time interval of 15 min; The number of hidden layer neurons is related to the scale and precision of the neural network; according to Kolmogorov theorem, if the number of input variables is n, the number of hidden layer neurons is 2n+1, and the number of hidden layer neurons is determined by repeated trial method; 4. A method for ultra-short term photovoltaic power prediction for real-time control as claimed in claim 3, characterized in that: The BP neural network training process is related to the prediction precision of the photovoltaic power system output power model; the BP learning algorithm with increased motion quantity item and the BP learning algorithm with variable learning rate are combined to improve the convergence speed and reduce the probability of falling into a local minimum point. The BP learning algorithm with increased motion quantity item and the BP learning algorithm with variable learning rate comprise initializing weights w, and setting the current as the tth iteration; P samples are input in sequence, and the output of each layer and the backpropagation error are calculated; after the calculation of the P samples is completed, the connection weights of each layer are adjusted according to the weight adjustment formula; the output of each layer, the backpropagation error and the network total error E(t) are calculated according to the new connection weights, and if E(t) < epsilon or t > T, the training process is terminated; if E(t) >= epsilon and t <= T, the P samples are input again, the output of each layer and the backpropagation error are calculated, and a new round of training is carried out; wherein, the number of training samples is P, T is the maximum number of training times, and epsilon is the system allowed error.

5. A method for ultra-short term photovoltaic power prediction for real-time control as claimed in claim 4, characterized by: The removing outliers by using the moving time window filtering method includes spline interpolation on the results obtained by the upper BP network, displaying quartiles and median according to the box plot and violin plot, and observing the shape and peak value of the graph to preliminarily judge the concentration and dispersion of data, combining with the statistical method to identify outliers, and using the interquartile range to define outliers; Four hours are selected as the size of the moving time window, the mean and median statistics of the data in the window are calculated, the statistics in the window are used to replace the outliers, then the time window is moved forward by one time unit until all the data are processed, and after the data cleaning, the outliers are removed.

6. A method for ultra-short term photovoltaic power prediction for real-time control as claimed in claim 5, characterized by: The memory cell unit based on the long short-term recurrent neural network is the core component of the LSTM network, and the input of the model includes the sequence input x t at time t, the hidden layer cell state h t-1 at time t-1, and the memory cell c t-1 ; the output includes the memory cell state c t and the hidden layer state h t , wherein c t and h t each include long-term and short-term memory information of the model, the reading and modification of the memory cell unit are realized by controlling the input gate, the forgetting gate, and the output gate, the information flow between the networks is realized, tanh represents the activation function of tanh, the input gate uses the sigmoid activation function to input the parameters, controls the variable between [0, 1], realizes the control of x t on c t ; the forgetting gate selectively forgets the neuron state at the last time, which is specifically manifested as the control of c t-1 on c t ; the output gate is used to output and control the parameter variable, that is, the influence degree of c t on h t , and the calculation formulas are as follows: i t = σ(W ix x t +W ih h t-1 +b i ) f t = σ(W fx x t +W fh h t-1 +b f ) o t = σ(W ox x t +W oh h t-1 +b o ) Among them, i t f t o t These represent the state calculation results of the input gate, forget gate, and output gate, respectively; W ix and W ih W fx and W fh W ox and W oh With b i b f b o These represent the weight matrix and bias term of the corresponding gate, respectively; σ represents the sigmoid activation function.

7. A very short term photovoltaic power prediction method for real-time control as claimed in claim 6, characterized by: The method for improving the resolution of predicted data based on the long short-term recurrent neural network further comprises, The output result of the memory module in the LSTM model at time t is determined by the output gate and the cell state, and the formula is as follows: h t = o t *tanhc t In the formulae, unit state input at time t; tanh is the hyperbolic tangent activation function; W c , b c represent the state weight matrix and bias term of the input layer, respectively; * denotes element-wise multiplication.

8. A system for real-time control based on the short-term photovoltaic power prediction method according to any of claims 1 to 7, characterized in that: The method comprises a feature analysis module, a short-term power prediction module, and an ultra-short-term fine prediction module. The feature analysis module performs normalization processing on the radiation, temperature, humidity and photovoltaic power data based on the annual statistical limit values, obtains variable and photovoltaic power time series, and performs feature correlation analysis. The short-term power prediction module performs short-term photovoltaic power prediction based on the BP neural network, takes meteorological data and historical output data as input, optimizes the loss function by time period, and obtains the upper short-term prediction value with a resolution of 15 min. The ultra-short-term fine prediction module performs spline interpolation on the upper layer results, extracts outliers by using the box plot and violin plot method, removes outliers by using the moving time window filtering method, improves the resolution of predicted data based on the long short-term recurrent neural network, and obtains the lower ultra-short-term photovoltaic power prediction data with a resolution of 1 min while taking into account the prediction time scale and prediction accuracy. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-7. The processor executes the computer program to realize the steps of the method in any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Photovoltaic power short-term prediction method based on RBF neural network

    CN110675278A

  • Photovoltaic power ultra-short-term prediction method based on short-wave radiation correction

    CN113537582A

  • Photovoltaic power station power prediction method and system based on recurrent neural network

    CN113919232A

  • Extremely short-term photovoltaic power prediction method and system for real-time control

    CN118554446A

  • Solar radiation amount prediction method, photovoltaic power generation output prediction method and system

    JP2013164286A

Cited By

  • Regional distributed photovoltaic power prediction method and system based on multivariate data cross-modal fusion

    CN121637430A

  • Dual confidence filtering and pseudo label optimization semi-supervised regression photovoltaic power prediction method

    CN121726999A

  • Ultra-short-term photovoltaic output prediction method based on multi-modal data and adaptive weight

    CN121906422A

  • Physical-data dual-driven power generation unit level graph neural network power prediction method

    CN122178301A

  • Port rainwater magnetic flocculation feedforward dosing control method based on flow prediction

    CN122334346A