Extremely-short-term photovoltaic power generation prediction method, system, equipment and medium
By acquiring photovoltaic power generation data for frequency feature extraction and state matrix update, and combining it with meteorological data to optimize the model, the problem of prediction accuracy under complex meteorological conditions in traditional methods has been solved, achieving high-precision ultra-short-term photovoltaic power generation prediction and ensuring the stable operation of the industrial park microgrid.
Patent Information
- Application Number
- CN202511240088.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2026-01-27
AI Technical Summary
Traditional photovoltaic power generation forecasting methods struggle to handle complex weather conditions, nonlinear relationships, and multi-factor coupled systems, resulting in short-term photovoltaic power generation forecasting accuracy failing to meet the safe and economical operation requirements of industrial park microgrids.
By acquiring photovoltaic power generation data, extracting frequency features, constructing and updating the photovoltaic power generation state matrix in real time by combining meteorological data, obtaining high-precision prediction results using the state frequency memory algorithm, and evaluating and optimizing the model through indicators such as root mean square error.
It improves the accuracy and real-time performance of very short-term photovoltaic power generation forecasts, meets the stable operation requirements of industrial park microgrids, reduces energy costs, and reduces carbon emissions.
Smart Images

Figure CN121417138A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic power generation technology, and in particular to a method, system, equipment and medium for predicting ultra-short-term photovoltaic power generation. Background Technology
[0002] Against the backdrop of a global push for clean energy transition, industrial parks, as crucial drivers of economic development, are vigorously promoting the large-scale deployment of distributed photovoltaic (PV) systems. Rooftop PV and carport PV projects are widely implemented within these parks, not only responding to the call for sustainable development but also bringing numerous economic and environmental benefits. On the one hand, distributed PV power generation effectively reduces the park's reliance on traditional energy sources, lowering energy costs; on the other hand, it helps reduce carbon emissions and enhances the park's green image. With the continuous increase in PV installed capacity, ensuring the stability and reliability of power supply has become critical. Very short-term PV forecasting, i.e., power generation forecasting within one hour, is essential for the safe and economical operation of the park's microgrid.
[0003] Traditional forecasting methods, such as those based on time series analysis or physical models, have significant limitations when dealing with complex and ever-changing realities. Time series analysis relies primarily on historical data trends and patterns, making it difficult to accurately reflect the impact of sudden weather changes on photovoltaic (PV) power generation. While physical models consider the physical characteristics of PV cells and environmental factors, they often struggle to accurately model complex weather conditions and nonlinear relationships. In cloudy weather, the rapid movement and changes in cloud cover lead to frequent fluctuations in solar irradiance, which traditional methods find difficult to capture in a timely and accurate manner. Furthermore, PV power generation is influenced by a combination of factors, including solar irradiance, temperature, humidity, and wind speed. These factors interact in complex ways, and traditional methods struggle to effectively handle such complex systems with multiple coupled factors, resulting in forecast accuracy that fails to meet practical needs and cannot provide strong support for the stable operation of the industrial park's microgrid. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides an ultra-short-term photovoltaic power generation forecasting method to solve the problem that traditional methods are unable to handle complex meteorological conditions, nonlinear relationships, and multi-factor coupled systems, resulting in forecast accuracy that cannot meet the requirements for safe and economical operation of industrial park microgrids.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a method for predicting very short-term photovoltaic power generation, comprising:
[0008] Obtain relevant data on photovoltaic power generation;
[0009] Frequency features are extracted from the photovoltaic power generation data to obtain the time-domain and frequency-domain features of photovoltaic power generation.
[0010] The time-domain and frequency-domain features are input into the photovoltaic power generation prediction model to obtain the photovoltaic power generation state matrix, and the photovoltaic power generation state matrix is updated in real time using the photovoltaic power generation related data.
[0011] Based on the updated photovoltaic power generation state matrix, obtain photovoltaic power generation prediction results;
[0012] Based on the photovoltaic power generation prediction results, the photovoltaic power generation prediction model is evaluated and optimized.
[0013] As a preferred embodiment of the ultra-short-term photovoltaic power generation prediction method of the present invention, the method includes: extracting frequency features from the photovoltaic power generation related data to obtain the time-domain and frequency-domain features of photovoltaic power generation, including:
[0014] The photovoltaic power generation related data is preprocessed;
[0015] The preprocessed photovoltaic power generation data is combined into sampling data at different time points. The frequency component values corresponding to the sampling data at different time points are calculated to obtain the time domain characteristics and frequency domain characteristics of photovoltaic power generation.
[0016] As a preferred embodiment of the ultra-short-term photovoltaic power generation prediction method of the present invention, the method involves inputting the time-domain features and frequency-domain features into a photovoltaic power generation prediction model to obtain a photovoltaic power generation state matrix, including:
[0017] Obtain meteorological data;
[0018] By combining the time-domain and frequency-domain characteristics of photovoltaic power generation with meteorological data, multi-source data can be obtained.
[0019] The photovoltaic power generation state matrix is obtained by weighting and combining multi-source data and determining the dependencies between data based on time series characteristics.
[0020] The beneficial effects of this preferred technical solution are as follows: by combining meteorological data with the time and frequency domain characteristics of photovoltaic power generation to obtain multi-source data, and performing weighted combination and determining data dependencies, the information of various factors affecting photovoltaic power generation is fully integrated, so that the obtained photovoltaic power generation state matrix can more accurately reflect the actual power generation state.
[0021] As a preferred embodiment of the ultra-short-term photovoltaic power generation prediction method of the present invention, the method includes: updating the photovoltaic power generation state matrix in real time using the photovoltaic power generation related data, including:
[0022] Acquire real-time photovoltaic power generation data and real-time meteorological data, assess their relevance to the current photovoltaic power generation status, and filter the real-time photovoltaic power generation data and real-time meteorological data;
[0023] The filtered real-time photovoltaic power generation data, real-time meteorological data, and historical photovoltaic power generation data are weighted and processed.
[0024] The weighted data is integrated, and the photovoltaic power generation state matrix is calculated and updated.
[0025] The beneficial effects of this preferred technical solution are as follows: by screening and weighting real-time photovoltaic power generation related data and meteorological data, and then integrating and updating the state matrix with historical data, it is ensured that the photovoltaic power generation state matrix can adapt to the dynamic changes in the power generation environment in a timely manner, and the response capability and prediction accuracy of the photovoltaic power generation prediction model to real-time conditions can be improved.
[0026] As a preferred embodiment of the ultra-short-term photovoltaic power generation prediction method described in this invention, it further includes:
[0027] The updated photovoltaic power generation state matrix is subjected to linear transformation and activation processing.
[0028] As a preferred embodiment of the ultra-short-term photovoltaic power generation prediction method described in this invention, the photovoltaic power generation prediction result is obtained based on the updated photovoltaic power generation state matrix, including:
[0029] The photovoltaic power generation prediction result is obtained by weighting all frequency component values and expressing it using the following formula:
[0030]
[0031] Among them, P t O is the predicted value of photovoltaic power generation at time t. t,n It is related to time n th The output gate corresponding to the frequency, f o It is the output activation function. It is the weight vector, S t,n The photovoltaic power generation state matrix n th The amplitude of the column, It is time t and n th Frequency deviation vector.
[0032] As a preferred embodiment of the ultra-short-term photovoltaic power generation prediction method of the present invention, the photovoltaic power generation prediction model is evaluated and optimized based on the photovoltaic power generation prediction results, including:
[0033] Based on the photovoltaic power generation prediction results, the photovoltaic power generation prediction model is evaluated using the root mean square error, mean absolute error, and mean square error indices to obtain the evaluation results;
[0034] Based on the evaluation results, the photovoltaic power generation prediction model is optimized.
[0035] Secondly, the present invention provides an ultra-short-term photovoltaic power generation prediction system, comprising: a data acquisition module for acquiring photovoltaic power generation related data;
[0036] The feature extraction module is used to extract frequency features from the photovoltaic power generation related data to obtain the time-domain and frequency-domain features of photovoltaic power generation.
[0037] The photovoltaic prediction module is used to input the time-domain features and frequency-domain features into the photovoltaic power generation prediction model, obtain the photovoltaic power generation state matrix, update the photovoltaic power generation state matrix in real time using the photovoltaic power generation related data, and obtain the photovoltaic power generation prediction result based on the updated photovoltaic power generation state matrix.
[0038] The evaluation and optimization module is used to evaluate and optimize the photovoltaic power generation prediction model based on the photovoltaic power generation prediction results.
[0039] Thirdly, the present invention provides an electronic device, comprising:
[0040] Memory and processor;
[0041] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the very short-term photovoltaic power generation prediction method.
[0042] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the very short-term photovoltaic power generation prediction method.
[0043] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention obtains photovoltaic power generation related data and extracts frequency features, combines meteorological data to construct and update the photovoltaic power generation state matrix in real time, thereby obtaining high-precision photovoltaic power generation prediction results. Based on the prediction results, the model is evaluated and optimized using indicators such as root mean square error. This can improve the accuracy of very short-term photovoltaic power generation prediction, better cope with complex meteorological conditions and multi-factor coupled systems, meet the demand for high-precision very short-term photovoltaic prediction for the safe and economical operation of industrial park microgrids, ensure the stable operation of the power system, reduce energy costs and carbon emissions, and help the clean energy transition. Attached Figure Description
[0044] 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.
[0045] Figure 1 This is a schematic diagram of the overall process of the ultra-short-term photovoltaic power generation prediction method according to an embodiment of the present invention. Detailed Implementation
[0046] 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.
[0047] Example 1, referring to Figure 1 As an embodiment of the present invention, an ultra-short-term photovoltaic power generation prediction method is provided, comprising:
[0048] S100: Obtain data related to photovoltaic power generation;
[0049] S102: Extract frequency features from photovoltaic power generation data to obtain the time-domain and frequency-domain features of photovoltaic power generation;
[0050] S104: Input the time-domain and frequency-domain features into the photovoltaic power generation prediction model to obtain the photovoltaic power generation state matrix, and update the photovoltaic power generation state matrix in real time using photovoltaic power generation related data; based on the updated photovoltaic power generation state matrix, obtain the photovoltaic power generation prediction results;
[0051] S106: Based on the photovoltaic power generation prediction results, evaluate and optimize the photovoltaic power generation prediction model.
[0052] It should be noted that with the widespread application of distributed photovoltaic power generation in industrial parks, the photovoltaic power generation within one hour fluctuates dramatically due to various factors such as weather, making it difficult to accurately predict using traditional methods. Steps S100-S106 of this invention, through data acquisition, feature extraction, and the construction and updating of the state matrix, can improve the prediction accuracy of photovoltaic power generation within one hour. This invention acquires relevant data and extracts frequency features to deeply explore data patterns; constructs and updates the state matrix to reflect system dynamics in conjunction with real-time information; and evaluates and optimizes the model based on the prediction results, adapting to the constantly changing power generation environment. Based on the prediction results, power dispatching departments can make advance load adjustments, reducing grid fluctuations caused by prediction errors.
[0053] Example 2, refer to Figure 1 As an embodiment of the present invention, based on the above embodiment, a method for predicting very short-term photovoltaic power generation is provided.
[0054] In this embodiment of the invention, step S100 involves acquiring photovoltaic power generation related data, which includes historical photovoltaic power generation data and real-time photovoltaic power generation data.
[0055] In one optional implementation, the photovoltaic power generation related data can be solar radiation intensity data, photovoltaic equipment operating status data, and geographical location data. The photovoltaic equipment operating status data includes panel temperature, inverter efficiency, etc.
[0056] In this embodiment of the invention, step S200 involves extracting frequency features from photovoltaic power generation-related data to obtain the time-domain and frequency-domain features of photovoltaic power generation, including the following steps A1-A2:
[0057] A1: Preprocess the data related to photovoltaic power generation.
[0058] A2: The preprocessed photovoltaic power generation data is combined into sampling data at different time points. The frequency component values corresponding to the sampling data at different time points are calculated to obtain the time domain characteristics and frequency domain characteristics of photovoltaic power generation.
[0059] In one alternative embodiment, preprocessing can include outlier detection and removal, data smoothing, and standardization. For example, outliers that significantly deviate from the normal range can be identified and removed using the 3σ principle to avoid interfering with subsequent analysis; high-frequency noise in the data can be eliminated using methods such as moving averages and median filtering to make data changes smoother; and the Z-score standardization formula can be used to adjust the distribution of the data.
[0060] In this embodiment of the invention, preprocessing includes data cleaning, noise reduction, and normalization.
[0061] For example, the photovoltaic power generation data is normalized so that it falls within the range of [0,1] or [-1,1], which can be expressed by the formula:
[0062]
[0063] Among them, X ′ X represents the normalized photovoltaic power generation data, while X represents the unprocessed photovoltaic power generation data. min X represents the minimum value of photovoltaic power generation related data. max This indicates the maximum value of data related to photovoltaic power generation.
[0064] In this embodiment of the invention, the discrete Fourier transform is used to extract features from the preprocessed data in order to capture the periodic and random fluctuations of photovoltaic power generation and obtain the time-domain and frequency-domain features of photovoltaic power generation.
[0065] For example, based on Euler's formula, the Discrete Fourier Transform can be expressed as:
[0066]
[0067] Where k corresponds to the kth frequency component and the nth time sampling point, j represents the imaginary part identifier in complex number operations, and N represents a vector composed of multiple photovoltaic power generation data.
[0068] In this embodiment of the invention, the frequency resolution Δf = sampling rate / N; the time interval Δt = 1 / sampling rate.
[0069] In one optional implementation, the time-domain and frequency-domain features of photovoltaic (PV) power generation can be obtained using wavelet transform. Specifically, the preprocessed PV power generation data is convolved with a set of wavelet functions with different frequency and temporal positioning characteristics. Appropriate wavelet basis functions are selected to decompose the data at different scales. At different scales, the wavelet coefficients reflect the characteristics of the data within the corresponding frequency range and time position. Wavelet coefficients at large scales correspond to low-frequency components, reflecting the overall trend and periodicity of the data, and can be used as part of the time-domain features; wavelet coefficients at small scales correspond to high-frequency components, capturing the details and random fluctuations of the data, constituting the frequency-domain features. By analyzing the wavelet coefficients, the time-domain and frequency-domain features of PV power generation are obtained.
[0070] In another alternative implementation, the time-domain and frequency-domain characteristics of photovoltaic power generation can also be obtained using the empirical mode decomposition method. Specifically, the preprocessed photovoltaic power generation data is adaptively decomposed into a set of intrinsic mode functions (IMFs). IMFs are components with different frequency characteristics, and each IMF represents fluctuation information at different scales in the original data. The decomposition process extracts components from high frequency to low frequency sequentially from the original data. A Hilbert transform is performed on each IMF to obtain its instantaneous frequency and amplitude information, thus yielding the time-domain and frequency-domain characteristics of photovoltaic power generation.
[0071] It should be noted that this invention effectively improves data quality by preprocessing photovoltaic power generation data, such as outlier detection and removal, data smoothing, and standardization, laying a solid foundation for subsequent analysis. The discrete Fourier transform is used to extract frequency features, capturing the periodic and random fluctuations in photovoltaic power generation. The obtained time-domain and frequency-domain features can comprehensively characterize the dynamic characteristics of photovoltaic power generation.
[0072] In this embodiment of the invention, step S104 involves inputting time-domain and frequency-domain features into the photovoltaic power generation prediction model to obtain the photovoltaic power generation state matrix, and updating the photovoltaic power generation state matrix in real time using relevant photovoltaic power generation data; based on the updated photovoltaic power generation state matrix, obtaining the photovoltaic power generation prediction result; including the following steps B1-B5:
[0073] B1: Acquire meteorological data; combine the time-domain and frequency-domain characteristics of photovoltaic power generation with meteorological data to obtain multi-source data;
[0074] B2: Weight the multi-source data and determine the dependencies between the data based on the time series characteristics to obtain the photovoltaic power generation state matrix.
[0075] B3: Obtain real-time photovoltaic power generation data and real-time meteorological data, assess their relevance to the current photovoltaic power generation status, and filter the real-time photovoltaic power generation data and real-time meteorological data;
[0076] B4: Weight the filtered real-time photovoltaic power generation data, real-time meteorological data, and historical photovoltaic power generation data; integrate the weighted data and calculate and update the photovoltaic power generation state matrix.
[0077] B5: The updated photovoltaic power generation state matrix is processed through linear transformation and activation.
[0078] In this embodiment of the invention, a state frequency memory algorithm is used as a photovoltaic power generation prediction model. The state frequency memory algorithm targets the time domain and frequency domain characteristics of photovoltaic power generation data, and combines historical photovoltaic power generation data, irradiance, temperature and other influencing factors. It extracts frequency information by performing Fourier transform on the input data, and constructs a photovoltaic power generation state matrix by combining the time domain information. Each column of the photovoltaic power generation state matrix corresponds to a different frequency component of the photovoltaic power generation data.
[0079] The state-frequency memory algorithm uses a D×N photovoltaic (PV) power generation state matrix corresponding to each feature and frequency. This PV power generation state matrix represents the state of the neural network at time t. The PV power generation state matrix is updated each time using the previous state and the input matrix. The PV power generation state matrix is represented as:
[0080]
[0081] Among them, S t This represents the photovoltaic power generation state matrix of the photovoltaic power generation prediction model at time t, where each element corresponds to a memory state at a certain frequency, F. t The forgetting gate matrix at time t determines the degree of influence of historical power generation status on current predictions; I t,1 I t,2 , ..., I t,DThese are the parameters corresponding to the input gates for each dimension, controlling the contribution of current environmental variables (such as temperature and irradiance) to the prediction; i t,1 i t,2 , ..., i t,D It is input modulation, which is formed by the meteorological data at the current moment and the photovoltaic power generation forecast value at the previous moment; It is the component that has been Fourier transformed to the N frequency, used to extract the time-frequency characteristics of photovoltaic power generation data; This indicates element-wise multiplication.
[0082] In this embodiment of the invention, the forget gate of the state frequency memory algorithm is a D-by-N matrix, responsible for determining how much photovoltaic data from past states is used to form the current state. The forget gate F... t Defined as the outer product of two forget gate vectors, it is expressed as:
[0083]
[0084] in, It is the state forgetting gate vector, which represents the degree of forgetting of photovoltaic power generation data in the time dimension; It is the frequency forgetting gate vector, indicating that the model can selectively memorize different frequency components to adapt to the periodic fluctuations of photovoltaic power generation.
[0085] State forgetting gate How much information from each dimension of the past state is used to shape the current state. Defined as an element-wise sigmoid function, applied to a linear combination of the current input and past outputs, it is expressed as:
[0086]
[0087] Where σ is an element-based sigmoid function, and W Sx and W Sh X is the input and output weight vector. t P is the D-dimensional photovoltaic power generation data input vector at time t. t-1 B is the photovoltaic power output vector at time t-1. s It is a vector of deviation parameters.
[0088] The frequency forget gate determines how much information from each frequency of the past state is used to shape the current state. The frequency forget gate is similarly defined as follows:
[0089]
[0090] Among them, W Fx and W Fh B is the input and output weight vector.F It is a vector of deviation parameters.
[0091] In this embodiment of the invention, the input gate of the state frequency memory algorithm is used to determine how much input data at the current time is used to shape the current state in the state frequency memory algorithm, and to determine the role of the current meteorological data and historical photovoltaic power generation data in the prediction. The input gate is expressed as:
[0092]
[0093] Among them, X t It is the input data vector of photovoltaic power generation influencing factors at the current moment, including irradiance, ambient temperature, historical power, etc.; W Ix and W Ih B is the input and output weight vector. I It is the deviation parameter vector, p t-1 This is the photovoltaic power generation forecast value at the previous moment.
[0094] In this embodiment of the invention, the tanh activation function is used for transformation, making the input data more adaptable to complex photovoltaic power generation modes after nonlinear transformation, as expressed as:
[0095]
[0096] Among them, i t It is the input vector, W ix and W ih B is the input and output weight vector. i It is the bias parameter vector.
[0097] In this embodiment of the invention, the output gate of the state frequency memory algorithm is responsible for controlling which part of the photovoltaic power generation state matrix is used for the final photovoltaic power generation prediction. The output gate is a linear combination of the current state, the previous output, and the current input vector. Similar to the input gate, the output gate is defined as follows:
[0098]
[0099] Among them, O t It's an output gate. and It is a set of weights. It is the bias vector. |S t,n | is n in the state matrix th The amplitude of the frequency component.
[0100] In this embodiment of the invention, all frequency component values are weighted and calculated to obtain the photovoltaic power generation prediction result, which is expressed by the following formula:
[0101]
[0102] Among them, P t O is the predicted value of photovoltaic power generation at time t. t,n It is related to time n th The output gate corresponding to the frequency, f o It is the output activation function. It is the weight vector, S t,n The photovoltaic power generation state matrix n th The amplitude of the column, It is time t and n th Frequency deviation vector.
[0103] In one optional implementation, step S104 involves constructing a photovoltaic power generation prediction model. Obtaining the photovoltaic power generation prediction results can be achieved using a Long Short-Term Memory (LSTM) network algorithm. Specifically, preprocessed and feature-extracted photovoltaic power generation time-domain features, frequency-domain features, and meteorological data, among other multi-source data, are sequentially input into the input layer of the LTM algorithm network in a time sequence. The memory units in the LTM algorithm network control the inflow, retention, and outflow of information through input gates, forget gates, and output gates. The input gate determines which information from the current input data will be stored in the memory unit; the forget gate determines which historical information in the memory unit will be retained or forgotten; and the output gate determines which information from the memory unit will be output for prediction. By continuously adjusting the weight parameters in the network and training it using the backpropagation algorithm, the network learns the complex mapping relationship between photovoltaic power generation and various influencing factors. Finally, the photovoltaic power generation prediction result is calculated based on the information output by the memory units.
[0104] In another optional implementation, step S104, which constructs a photovoltaic power generation prediction model and obtains the photovoltaic power generation prediction results, can also employ a method combining convolutional neural networks (CNNs) and recurrent neural networks (RNNs). Specifically, firstly, CNNs are used to extract features from multi-source data related to photovoltaic power generation, such as image-processed meteorological data and time-domain and frequency-domain feature data after feature extraction. The convolutional layers of the CNN perform convolution operations by sliding convolution kernels across the data to extract local features. Pooling layers then perform dimensionality reduction on the features, reducing computational load while retaining key features. The features extracted by the CNN are then input into the RNN. The RNN uses update and reset gates to control the flow and retention of information, enabling it to better handle long-term dependencies in time-series data. The RNN performs calculations based on the input feature information and the chronological order of the time series, ultimately outputting the photovoltaic power generation prediction results.
[0105] It should be noted that Long Short-Term Memory (LSTM) network algorithms have certain limitations when dealing with problems such as photovoltaic (PV) power generation prediction. On one hand, when processing the frequency characteristics of data, the internal structure of LTM networks has relatively limited ability to extract and utilize frequency information, making it difficult to fully exploit the rich frequency characteristics within PV power generation data. On the other hand, LTM networks are not flexible enough in handling complex dependencies between multi-source data, and may fail to accurately capture the dynamic relationships between factors when PV power generation is influenced by multiple factors. Furthermore, the training process of LTM networks may face problems such as high computational cost and long training time, especially when the data volume is large and the feature dimensionality is high, which can affect the model's real-time performance and efficiency.
[0106] Therefore, this invention employs the state-frequency memory algorithm. Compared to long short-term memory networks, the state-frequency memory algorithm, targeting the time and frequency domain characteristics of photovoltaic power generation data, can more directly and effectively extract frequency information through operations such as Fourier transform. Furthermore, it can combine time-domain information to construct a photovoltaic power generation state matrix, more comprehensively characterizing the dynamic characteristics of photovoltaic power generation. In processing multi-source data, the state-frequency memory algorithm can more flexibly determine the dependencies between data points. Through structures such as forget gates and input gates, it selectively memorizes and processes data from different sources, better adapting to the complex situation where photovoltaic power generation is influenced by multiple factors. In addition, the state-frequency memory algorithm optimizes the computation process to a certain extent, enabling more efficient data processing, improving the model's real-time performance and efficiency, and better meeting the accuracy and timeliness requirements of very short-term photovoltaic power generation prediction.
[0107] In this embodiment of the invention, step S106 involves evaluating and optimizing the photovoltaic power generation prediction model based on the photovoltaic power generation prediction results, including the following steps C1-C2:
[0108] C1: Based on the photovoltaic power generation prediction results, the root mean square error, mean absolute error, and mean square error indices are used to evaluate the photovoltaic power generation prediction model and obtain the evaluation results;
[0109] C2: Based on the evaluation results, optimize the photovoltaic power generation prediction model.
[0110] In an optional embodiment, indicators such as mean absolute percentage error (MASE), symmetric MASSE, coefficient of determination (COD), and logarithmic mean square error (RMSE) can also be used to evaluate and optimize the photovoltaic power generation prediction model. MASE measures the relative error between the predicted and actual values, presented as a percentage, intuitively reflecting the relative accuracy of the prediction. Symmetric MASSE is an improvement on MASE, addressing the potential anomalies in MASE calculation when the actual value is zero or close to zero. The COD is used to evaluate the model's fit to the data; the closer the COD is to 1, the stronger the model's interpretability of the data. RMSE is the squared average of the logarithmic difference between the predicted and actual values, suitable for handling data with exponential growth or large fluctuations, and can more accurately reflect the model's predictive performance on data of different magnitudes.
[0111] In another optional embodiment, different indices can be selected to optimize the photovoltaic power generation prediction model based on different algorithms. For example, if the Long Short-Term Memory (LSTM) network algorithm is selected as the photovoltaic power generation prediction model in step S104, indices such as mean absolute percentage error (MAS), root mean square error (RMSE), training time, and model convergence speed can be used for evaluation and optimization. Since the LSS network algorithm has a long training time when processing large-scale data, the model convergence speed can be used as an indicator to measure its training efficiency; while MAS and RMSE can evaluate the accuracy of its prediction from the perspectives of relative and absolute errors, respectively. If the convolutional neural network combined with a recurrent neural network method is selected as the photovoltaic power generation prediction model in step S104, indices such as the coefficient of determination, logarithmic mean square error (RMSE), feature extraction accuracy, and time series dependency capture ability can be used for evaluation and optimization. Because the combination of convolutional neural networks and recurrent neural networks focuses on feature extraction and time series processing, the feature extraction accuracy can measure the effect of the convolutional neural network part on feature extraction from multi-source data, while the time series dependency capture ability index is used to evaluate the ability of the recurrent neural network part to handle long-term time series dependencies, and the coefficient of determination and mean square logarithmic error can evaluate the overall model's fit and error in predicting photovoltaic power generation.
[0112] In this embodiment of the invention, after obtaining the photovoltaic power generation prediction results, the results are output to the power dispatch center for load adjustment and optimization of the power system. Simultaneously, the photovoltaic power generation prediction results are stored in a database for subsequent analysis and further optimization of the photovoltaic power generation model.
[0113] It should be noted that the method of this invention preprocesses photovoltaic power generation data, from multi-source data acquisition and frequency feature extraction to constructing and updating the photovoltaic power generation state matrix in real time using a state frequency memory algorithm, ultimately yielding high-precision photovoltaic power generation prediction results. Compared with traditional methods and other optional algorithms, this invention can more deeply mine the time and frequency domain characteristics of photovoltaic power generation data, accurately capture the complex relationships under the coupling of multiple factors, and improve the accuracy, real-time performance, and reliability of photovoltaic power generation prediction within a very short period of one hour. The model is evaluated and optimized based on multiple indicators such as root mean square error and mean absolute error, enabling the model to continuously adapt to the changing power generation environment, which helps to optimize power dispatch, reduce energy costs, and reduce carbon emissions.
[0114] Example 3, referring to Tables 1-2, is an embodiment of the present invention. Based on the above embodiments, an ultra-short-term photovoltaic power generation prediction method is provided. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.
[0115] A comparative experiment was designed to predict photovoltaic power generation using different algorithmic photovoltaic power generation prediction models, and the performance was evaluated using root mean square error, mean absolute error, and mean square error indices.
[0116] The experimental data comes from measured data of a photovoltaic power station in an industrial park, including influencing factors such as photovoltaic power, irradiance, temperature, and wind speed.
[0117] Root mean square error (RMSE) measures the deviation between the predicted and actual values, expressed in kW. The calculation formula is as follows:
[0118]
[0119] in, Let i be the actual photovoltaic output value of the i-th sample. Let N be the predicted value of the i-th sample, and N be the number of samples.
[0120] Mean Absolute Error (MAE) measures the average absolute error between the predicted and actual values, expressed in kW. The calculation formula is as follows:
[0121]
[0122] in, Let i be the actual photovoltaic output value of the i-th sample. Let N be the predicted value of the i-th sample, and N be the number of samples.
[0123] Mean square error, in kW, is calculated using the following formula:
[0124]
[0125] in, Let i be the actual photovoltaic output value of the i-th sample. Let N be the predicted value of the i-th sample, and N be the number of samples.
[0126] Table 1 Comparison of Prediction Errors
[0127]
[0128] As shown in Table 1, the root mean square error (RMSE) of the method of this invention is 33.8% lower than that of Long Short-Term Memory (LSTM) networks and 50.1% lower than that of Support Vector Regression (SVR), thus improving prediction accuracy. The mean absolute error (MAE) also shows that the method of this invention has the lowest error and can effectively reduce the prediction bias of very short-term photovoltaic (PV) power generation.
[0129] The present invention also designed comparative experiments under different weather conditions. Considering that photovoltaic power generation is greatly affected by weather, the prediction error comparison under three typical weather conditions of sunny, cloudy and overcast days was further analyzed. The results are shown in Table 2.
[0130] Table 2 Results of different weather forecasts
[0131]
[0132] As shown in Table 2, on sunny days, photovoltaic power output is relatively stable, and the errors of each method are relatively low. However, the root mean square error (RMSE) of the method proposed in this invention is 28.4% lower than that of the Long Short-Term Memory (LSTM) network. On cloudy days, irradiance fluctuates drastically, increasing the difficulty of prediction. The RMSE of the method proposed in this invention is still 23.1% lower than that of the LSTM network. On overcast days, photovoltaic power fluctuates significantly, and the errors of all algorithms used in photovoltaic power prediction models increase. However, the method proposed in this invention still performs best, with an error 44.9% lower than that of Support Vector Regression.
[0133] Example 4 illustrates a schematic scheme for an ultra-short-term photovoltaic power generation prediction method. It should be noted that the technical solution of this ultra-short-term photovoltaic power generation prediction system belongs to the same concept as the technical solution of the ultra-short-term photovoltaic power generation prediction method described above. Details not described in detail in this embodiment can be found in the description of the technical solution of the ultra-short-term photovoltaic power generation prediction method described above.
[0134] This embodiment also provides an ultra-short-term photovoltaic power generation prediction system, including:
[0135] The data acquisition module is used to acquire data related to photovoltaic power generation.
[0136] The feature extraction module is used to extract frequency features from photovoltaic power generation-related data to obtain the time-domain and frequency-domain features of photovoltaic power generation.
[0137] The photovoltaic prediction module is used to input time-domain and frequency-domain features into the photovoltaic power generation prediction model, obtain the photovoltaic power generation state matrix, update the photovoltaic power generation state matrix in real time using photovoltaic power generation related data, and obtain the photovoltaic power generation prediction results based on the updated photovoltaic power generation state matrix.
[0138] The evaluation and optimization module is used to evaluate and optimize the photovoltaic power generation prediction model based on the photovoltaic power generation prediction results.
[0139] This embodiment also provides an electronic device suitable for very short-term photovoltaic power generation forecasting, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the very short-term photovoltaic power generation forecasting method proposed in the above embodiment.
[0140] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the method for predicting ultra-short-term photovoltaic power generation as proposed in the above embodiments.
[0141] The storage medium proposed in this embodiment belongs to the same inventive concept as the method for predicting ultra-short-term photovoltaic power generation proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0142] Based on the above description of the implementation methods, those skilled in the art will clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0143] 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 method for predicting ultra-short-term photovoltaic power generation, characterized in that, include: Obtain relevant data on photovoltaic power generation; Frequency features are extracted from the photovoltaic power generation data to obtain the time-domain and frequency-domain features of photovoltaic power generation. The time-domain and frequency-domain features are input into the photovoltaic power generation prediction model to obtain the photovoltaic power generation state matrix, and the photovoltaic power generation state matrix is updated in real time using the photovoltaic power generation related data. Based on the updated photovoltaic power generation state matrix, obtain photovoltaic power generation prediction results; Based on the photovoltaic power generation prediction results, the photovoltaic power generation prediction model is evaluated and optimized.
2. The ultra-short-term photovoltaic power generation prediction method as described in claim 1, characterized in that, Frequency features are extracted from the photovoltaic power generation data to obtain the time-domain and frequency-domain features of photovoltaic power generation, including: The photovoltaic power generation related data is preprocessed; The preprocessed photovoltaic power generation data is combined into sampling data at different time points. The frequency component values corresponding to the sampling data at different time points are calculated to obtain the time domain characteristics and frequency domain characteristics of photovoltaic power generation.
3. The ultra-short-term photovoltaic power generation prediction method as described in claim 2, characterized in that, The time-domain and frequency-domain features are input into the photovoltaic power generation prediction model to obtain the photovoltaic power generation state matrix, including: Obtain meteorological data; By combining the time-domain and frequency-domain characteristics of photovoltaic power generation with meteorological data, multi-source data can be obtained. The photovoltaic power generation state matrix is obtained by weighting and combining multi-source data and determining the dependencies between data based on time series characteristics.
4. The ultra-short-term photovoltaic power generation prediction method as described in claim 3, characterized in that, The photovoltaic power generation status matrix is updated in real time using the photovoltaic power generation related data, including: Acquire real-time photovoltaic power generation data and real-time meteorological data, assess their relevance to the current photovoltaic power generation status, and filter the real-time photovoltaic power generation data and real-time meteorological data; The filtered real-time photovoltaic power generation data, real-time meteorological data, and historical photovoltaic power generation data are weighted and processed. The weighted data is integrated, and the photovoltaic power generation state matrix is calculated and updated.
5. The ultra-short-term photovoltaic power generation prediction method as described in claim 4, characterized in that, Also includes: The updated photovoltaic power generation state matrix is subjected to linear transformation and activation processing.
6. The ultra-short-term photovoltaic power generation prediction method as described in claim 5, characterized in that, Based on the updated photovoltaic power generation state matrix, photovoltaic power generation prediction results are obtained, including: The photovoltaic power generation prediction result is obtained by weighting all frequency component values and expressing it using the following formula: Among them, P t O is the predicted value of photovoltaic power generation at time t. t,n It is related to time n th The output gate corresponding to the frequency, f o It is the output activation function. It is the weight vector, S t,n The photovoltaic power generation state matrix n th The amplitude of the column, It is time t and n th Frequency deviation vector.
7. The ultra-short-term photovoltaic power generation prediction method as described in claim 6, characterized in that, Based on the photovoltaic power generation prediction results, the photovoltaic power generation prediction model is evaluated and optimized, including: Based on the photovoltaic power generation prediction results, the photovoltaic power generation prediction model is evaluated using the root mean square error, mean absolute error, and mean square error indices to obtain the evaluation results; Based on the evaluation results, the photovoltaic power generation prediction model is optimized.
8. An ultra-short-term photovoltaic power generation prediction system, using the method described in any one of claims 1-7, characterized in that, include: The data acquisition module is used to acquire data related to photovoltaic power generation. The feature extraction module is used to extract frequency features from the photovoltaic power generation related data to obtain the time-domain and frequency-domain features of photovoltaic power generation. The photovoltaic prediction module is used to input the time-domain features and frequency-domain features into the photovoltaic power generation prediction model, obtain the photovoltaic power generation state matrix, update the photovoltaic power generation state matrix in real time using the photovoltaic power generation related data, and obtain the photovoltaic power generation prediction result based on the updated photovoltaic power generation state matrix. The evaluation and optimization module is used to evaluate and optimize the photovoltaic power generation prediction model based on the photovoltaic power generation prediction results.
9. An electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the ultra-short-term photovoltaic power generation prediction method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the ultra-short-term photovoltaic power generation prediction method according to any one of claims 1 to 7.