Short-term photovoltaic power prediction method, device, equipment, medium and program product
By combining variational mode decomposition and environmental variable data of historical photovoltaic power data, inputting it into a pre-trained short-term photovoltaic power prediction model, the problem of low short-term photovoltaic power prediction accuracy in the prior art is solved, and higher prediction accuracy and response capabilities are achieved.
Patent Information
- Application Number
- CN202510275801.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-27
AI Technical Summary
The prior art has low accuracy in short-term photovoltaic power prediction, and it is difficult to fully capture the relevant features in multi-dimensional timing input data.
By extracting the photovoltaic power sequence data corresponding to the predicted time from the historical photovoltaic power data and performing variational modal decomposition, the inherent modal function components of different frequency components are separated. Combining the target inherent modal function components with environmental variable data, input into a pre-trained short-term photovoltaic power prediction model for prediction.
The accuracy of short-term photovoltaic power prediction is significantly improved, and noise is separated from useful signals through a fine decomposition process, ensuring that the model uses only the most relevant features to the prediction, and fully integrates historical data and information from environmental conditions.
Smart Images

Figure CN120222332A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of photovoltaic power prediction, and particularly to a short-term photovoltaic power prediction method, device, equipment, medium and program product. Background Technique
[0002] Short-term photovoltaic power prediction refers to the prediction of photovoltaic power generation within the next 15 minutes to 4 hours. This prediction can provide important reference for power grid dispatching, power generation manufacturers, power markets, etc., and ensure the stable operation and optimized management of the power system.
[0003] The photovoltaic short-term prediction technology based on the Long Short-Term Memory (LSTM) network is a method that uses deep learning technology to predict the power generation within the next 15 minutes to 4 hours of a photovoltaic power station. By training the LSTM model, the time-dependent relationship in historical data can be captured to achieve effective prediction of photovoltaic power output.
[0004] Although the LSTM model has demonstrated its advantages in capturing the time-dependent relationship in time series data, with the continuous improvement of the requirements for prediction accuracy, more advanced short-term photovoltaic power prediction models need to be developed. Summary of the Invention
[0005] Embodiments of the present application provide a short-term photovoltaic power prediction method, device, equipment, medium and program product to achieve the effect of improving the prediction accuracy of short-term photovoltaic power.
[0006] In a first aspect, an embodiment of the present application provides a short-term photovoltaic power prediction method, including:
[0007] Extract photovoltaic power sequence data corresponding to the prediction moment from historical photovoltaic power data, where the historical photovoltaic power data records the photovoltaic power generation at different time points;
[0008] Perform variational mode decomposition on the photovoltaic power sequence data to obtain a number of intrinsic mode function components;
[0009] Analyze the number of intrinsic mode function components and select a target intrinsic mode function component from the number of intrinsic mode function components;
[0010] Input the target intrinsic mode function component and its corresponding environmental variable data into a pre-trained short-term photovoltaic power prediction model for photovoltaic power generation prediction to obtain a short-term photovoltaic power prediction result, where the short-term photovoltaic power prediction result includes the predicted value of the photovoltaic power generation corresponding to the prediction moment, and the environmental variable data includes at least one of time point, total irradiance, diffuse irradiance, direct irradiance, and environmental temperature.
[0011] In a possible implementation manner, inputting the target intrinsic mode function component and its corresponding environmental variable data into a pre-trained short-term photovoltaic power prediction model for photovoltaic power generation prediction to obtain a short-term photovoltaic power prediction result includes:
[0012] Inputting the feature vector composed of the target intrinsic mode function component and its corresponding environmental variable data into a pre-trained short-term photovoltaic power prediction model;
[0013] In the convolutional layer of the short-term photovoltaic power prediction model, performing a convolution operation on the feature vector to generate a feature map;
[0014] Inputting the feature map into the pooling layer of the short-term photovoltaic power prediction model, performing a pooling operation on multiple channels included in the feature map to generate channel descriptors corresponding to the multiple channels respectively;
[0015] Inputting the channel descriptors corresponding to the multiple channels respectively into the fully connected layer of the short-term photovoltaic power prediction model, determining the correlation between the multiple channels through an activation function, and determining the attention weights corresponding to the multiple channels respectively;
[0016] Using the generated attention weights to weight each channel of the input feature map to obtain a weighted feature map;
[0017] Inputting the weighted feature map into the long short-term memory network layer of the short-term photovoltaic power prediction model to generate the short-term photovoltaic power prediction result.
[0018] In a possible implementation manner, inputting the weighted feature map into the long short-term memory network layer of the short-term photovoltaic power prediction model to generate the short-term photovoltaic power prediction result includes:
[0019] Inputting the weighted feature map into the long short-term memory network layer of the short-term photovoltaic power prediction model;
[0020] In the long short-term memory network layer, converting the weighted feature map into a sequence composed of multiple time steps;
[0021] Determining the hidden state output at each time step, and calculating the attention weight corresponding to the hidden state at each time step based on the attention mechanism;
[0022] Using the calculated attention weights to perform a weighted sum on the hidden states at each time step to generate the short-term photovoltaic power prediction result.
[0023] In a possible implementation, the pooling operation on the multiple channels included in the feature map to generate the channel descriptors corresponding to the multiple channels respectively includes:
[0024] Performing an average pooling operation on the multiple channels included in the feature map to generate the channel descriptors corresponding to the multiple channels respectively.
[0025] In a possible implementation, before the variational mode decomposition of the photovoltaic power sequence data to obtain a plurality of intrinsic mode function components, the method further includes:
[0026] For the photovoltaic power sequence individuals in the photovoltaic power sequence population, decoding their binary sequences to obtain the mode number and penalty parameter corresponding to the photovoltaic power sequence individuals;
[0027] Decomposing the photovoltaic power sequence individuals by using the mode number and the penalty parameter, calculating the fitness based on a preset fitness function, and obtaining the fitness value corresponding to the photovoltaic power sequence individuals;
[0028] Comparing the fitness values corresponding to different photovoltaic power sequence individuals, selecting the photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions for reproduction, and obtaining the target photovoltaic power sequence individuals;
[0029] Decoding the binary sequence of the target photovoltaic power sequence individuals to obtain the target mode number and target penalty parameter for variational mode decomposition.
[0030] In a possible implementation, the selecting the photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions for reproduction to obtain the target photovoltaic power sequence individuals includes:
[0031] Selecting the photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions;
[0032] Pairing the photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions;
[0033] Performing a crossover operation on the successfully paired photovoltaic power sequence individuals to obtain the photovoltaic power sequence individuals generated based on the crossover operation;
[0034] Performing a mutation operation on the photovoltaic power sequence individuals generated based on the crossover operation to obtain the photovoltaic power sequence individuals generated based on the mutation operation;
[0035] Judging whether the photovoltaic power sequence individuals generated based on the mutation operation meet the preset termination conditions;
[0036] If the preset termination condition is not satisfied, add the individual of the photovoltaic power sequence generated based on the mutation operation to the population of the photovoltaic power sequence, and perform the step of decoding the binary sequence of the individual of the photovoltaic power sequence in the population of the photovoltaic power sequence to obtain the mode number and penalty parameter corresponding to the individual of the photovoltaic power sequence;
[0037] If the preset termination condition is satisfied, determine the individual of the photovoltaic power sequence generated based on the mutation operation as the output target individual of the photovoltaic power sequence.
[0038] In a second aspect, an embodiment of the present application provides a short-term photovoltaic power prediction device, including:
[0039] An extraction module, configured to extract photovoltaic power sequence data corresponding to a prediction moment from historical photovoltaic power data, where the historical photovoltaic power data records the photovoltaic power generation at different time points;
[0040] A decomposition module, configured to perform variational mode decomposition on the photovoltaic power sequence data to obtain a plurality of intrinsic mode function components;
[0041] A selection module, configured to analyze the plurality of intrinsic mode function components and select a target intrinsic mode function component from the plurality of intrinsic mode function components;
[0042] A prediction module, configured to input the target intrinsic mode function component and its corresponding environmental variable data into a pre-trained short-term photovoltaic power prediction model to perform photovoltaic power generation prediction, and obtain a short-term photovoltaic power prediction result, where the short-term photovoltaic power prediction result includes a photovoltaic power generation prediction value corresponding to the prediction moment, and the environmental variable data includes at least one of a time point, total irradiance, diffuse irradiance, direct irradiance, and environmental temperature.
[0043] In a possible implementation manner, the prediction module is specifically configured to:
[0044] Input a feature vector composed of the target intrinsic mode function component and its corresponding environmental variable data into a pre-trained short-term photovoltaic power prediction model;
[0045] In a convolutional layer of the short-term photovoltaic power prediction model, perform a convolution operation on the feature vector to generate a feature map;
[0046] Input the feature map into a pooling layer of the short-term photovoltaic power prediction model, perform a pooling operation on multiple channels included in the feature map, and generate channel descriptors corresponding to the multiple channels respectively;
[0047] Input the channel descriptors corresponding to the multiple channels into the fully connected layer of the short-term photovoltaic power prediction model, determine the correlation between the multiple channels through an activation function, and determine the attention weights corresponding to the multiple channels;
[0048] Weight each channel of the input feature map using the generated attention weights to obtain a weighted feature map;
[0049] Input the weighted feature map into the long short-term memory network layer of the short-term photovoltaic power prediction model to generate the short-term photovoltaic power prediction result.
[0050] In a possible implementation manner, the prediction module is specifically configured to:
[0051] Input the weighted feature map into the long short-term memory network layer of the short-term photovoltaic power prediction model;
[0052] In the long short-term memory network layer, convert the weighted feature map into a sequence composed of multiple time steps;
[0053] Determine the hidden state output at each time step, and calculate the attention weight corresponding to the hidden state at each time step based on the attention mechanism;
[0054] Use the calculated attention weights to perform weighted summation on the hidden states at each time step to generate the short-term photovoltaic power prediction result.
[0055] In a possible implementation manner, the prediction module is specifically configured to:
[0056] Perform average pooling operations on the multiple channels included in the feature map to generate the channel descriptors corresponding to the multiple channels.
[0057] In a possible implementation manner, the short-term photovoltaic power prediction device is further specifically configured to:
[0058] For a photovoltaic power sequence individual in the photovoltaic power sequence population, decode its binary sequence to obtain the pattern number and penalty parameter corresponding to the photovoltaic power sequence individual;
[0059] Decompose the photovoltaic power sequence individual using the pattern number and the penalty parameter, calculate the fitness based on a preset fitness function, and obtain the fitness value corresponding to the photovoltaic power sequence individual;
[0060] Compare the fitness values corresponding to different photovoltaic power sequence individuals, select the photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions for reproduction to obtain target photovoltaic power sequence individuals;
[0061] Decode the binary sequence of the target photovoltaic power sequence individual to obtain the target number of modes and the target penalty parameter for variational mode decomposition.
[0062] In a possible implementation manner, the short-term photovoltaic power prediction device is further specifically configured to:
[0063] Select photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions;
[0064] Pair the photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions;
[0065] Perform a crossover operation on the successfully paired photovoltaic power sequence individuals to obtain photovoltaic power sequence individuals generated based on the crossover operation;
[0066] Perform a mutation operation on the photovoltaic power sequence individuals generated based on the crossover operation to obtain photovoltaic power sequence individuals generated based on the mutation operation;
[0067] Determine whether the photovoltaic power sequence individuals generated based on the mutation operation meet the preset termination conditions;
[0068] If the preset termination conditions are not met, add the photovoltaic power sequence individuals generated based on the mutation operation to the photovoltaic power sequence population, and execute the step of decoding the binary sequence of the photovoltaic power sequence individuals in the photovoltaic power sequence population to obtain the corresponding number of modes and penalty parameters of the photovoltaic power sequence individuals;
[0069] If the preset termination conditions are met, determine the photovoltaic power sequence individuals generated based on the mutation operation as the output target photovoltaic power sequence individuals.
[0070] In a third aspect, an embodiment of the present application provides a short-term photovoltaic power prediction device, including: a memory, a processor;
[0071] The memory stores computer execution instructions;
[0072] The processor executes the computer execution instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementation manners of the first aspect.
[0073] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored, and when the computer execution instructions are executed by a processor, they are used to implement the above first aspect and / or various possible implementation manners of the first aspect.
[0074] Fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which when executed by a processor implements the first aspect and / or various possible implementation manners of the first aspect as described above.
[0075] The short-term photovoltaic power prediction method, device, equipment, medium and program product provided by the embodiments of the present application can effectively separate the intrinsic mode function components of different frequency components by extracting the photovoltaic power sequence data corresponding to the prediction moment from the historical photovoltaic power data and performing variational mode decomposition on it. This decomposition method not only helps to identify and extract the characteristic patterns in the original data, but also can effectively separate the noise from the useful signals through a fine decomposition process, thus significantly improving the accuracy of the prediction results. By analyzing these intrinsic mode function components, the target intrinsic mode function components most useful for photovoltaic power prediction can be selected. This step ensures that the model only uses the features with the highest correlation with the prediction, thereby improving the accuracy of the prediction. Inputting the target intrinsic mode function components together with the corresponding environmental variable data (such as time point, total irradiance, diffuse irradiance, direct irradiance, environmental temperature, etc.) into the pre-trained short-term photovoltaic power prediction model can fully integrate the information of historical data and environmental conditions. This combination method enables the model to more comprehensively understand and analyze various factors affecting the change of photovoltaic power. This combination can improve the response ability and prediction accuracy of the model to short-term photovoltaic power changes. Generally speaking, this method extracts characteristic patterns through variational mode decomposition and combines environmental variables for prediction, achieving the effect of improving the accuracy of short-term photovoltaic power prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] The drawings here are incorporated into the specification and form a part of this specification, showing the embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0077] Figure 1 It is a schematic diagram of the scenario of the short-term photovoltaic power prediction method provided by the present application;
[0078] Figure 2 It is a schematic flow chart of the short-term photovoltaic power prediction method provided by the present application Figure 1 ;
[0079] Figure 3 It is a schematic flow chart of the short-term photovoltaic power prediction method provided by the present application Figure 2 ;
[0080] Figure 4 It is a schematic diagram of the process of data noise reduction and decomposition based on GA-VMD provided by the present application;
[0081] Figure 5 It is a schematic diagram of the LSTM network structure provided by the present application;
[0082] Figure 6 Schematic diagram of the network structure of the short-term photovoltaic power prediction model provided by this application;
[0083] Figure 7 Schematic diagram of the change of historical power generation data of a photovoltaic power station provided by this application;
[0084] Figure 8 Schematic diagram of the GA iteration process provided by this application;
[0085] Figure 9 Schematic diagram of decomposing the power generation power sequence data of a photovoltaic power station into 9 independent IMF components provided by this application;
[0086] Figure 10 Schematic diagram of the prediction result obtained by using the prediction samples in the training set for prediction provided by this application;
[0087] Figure 11 Schematic diagram of the prediction result obtained by using the prediction samples in the test set for prediction provided by this application;
[0088] Figure 12 Schematic diagram of the matching relationship between the prediction result of the power generation power of a photovoltaic power station and the actual observed value provided by this application;
[0089] Figure 13 Schematic diagram of the structure of the short-term photovoltaic power prediction device provided by this application;
[0090] Figure 14 Schematic diagram of the structure of the short-term photovoltaic power prediction equipment provided by this application.
[0091] Through the above-mentioned drawings, specific embodiments of this application have been shown, and there will be more detailed descriptions hereinafter. These drawings and written descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. Detailed Description of the Invention
[0092] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. On the contrary, they are merely examples of devices and methods consistent with some aspects of this application as detailed in the appended claims.
[0093] Photovoltaic short-term prediction technology based on long short-term memory network can effectively process and predict long-term dependencies in time series data through its unique gating mechanism, which is particularly crucial for photovoltaic power prediction. In photovoltaic power prediction, the LSTM model usually takes a series of historical meteorological data (such as solar radiation, temperature, wind speed, etc.) and photovoltaic power generation data as inputs.
[0094] These data are organized in the form of time series, and each time step corresponds to a set of observed values. The LSTM network stores and updates this time series information through its memory cells. The gating structure of LSTM includes a forget gate, an input gate, and an output gate, which work together to control the flow of information. The forget gate determines which information should be discarded, the input gate determines which new information should be stored, and the output gate determines the information that the next hidden state should contain. This structure enables LSTM to remember the key information in the long-term sequence while ignoring unimportant details.
[0095] Currently, the photovoltaic short-term prediction based on long short-term memory network basically directly uses the original power generation data of photovoltaic power plants. However, there may be data noise in the original data, which may have an adverse impact on the accuracy of the prediction results. In addition, when the current photovoltaic short-term prediction based on long short-term memory network processes multi-dimensional time series input data, there may be limitations in being unable to fully capture the relevant features between different dimensions. Although the LSTM network is good at processing time series data and can effectively capture the time dependencies in the data, when faced with multi-dimensional inputs, it may not be able to comprehensively consider the interactions and correlations between each dimension. This limitation may lead to the sub-optimal performance of the model in comprehensively analyzing various influencing factors. Especially in photovoltaic power generation prediction, the complex relationships between environmental variables and historical power data may not be fully explored and utilized.
[0096] The short-term photovoltaic power prediction method provided by this application extracts photovoltaic power sequence data corresponding to the prediction moment from historical photovoltaic power data and performs variational mode decomposition on it, which can effectively separate the intrinsic mode function components of different frequency components. This decomposition method not only helps to identify and extract the characteristic patterns in the original data, but also can effectively separate the noise from the useful signals through a fine decomposition process, thus significantly improving the accuracy of the prediction results. By analyzing these intrinsic mode function components, the target intrinsic mode function components that are most useful for photovoltaic power generation prediction can be selected. This step ensures that the model only uses the features with the highest correlation with the prediction, thereby improving the accuracy of the prediction. Inputting the target intrinsic mode function components together with the corresponding environmental variable data (such as time points, total irradiance, diffuse irradiance, direct irradiance, environmental temperature, etc.) into a pre-trained short-term photovoltaic power prediction model can fully integrate the information of historical data and environmental conditions. This combination method enables the model to more comprehensively understand and analyze various factors affecting the change of photovoltaic power. This combination can improve the response ability and prediction accuracy of the model to short-term photovoltaic power changes, and solve the technical problem of the low accuracy of current short-term photovoltaic power prediction.
[0097] Figure 1 As shown in the scenario schematic diagram of the short-term photovoltaic power prediction method provided by this application, Figure 1 it can be seen that a trained short-term photovoltaic power prediction model can be deployed in the terminal device 101, extract photovoltaic power sequence data corresponding to the prediction moment from historical photovoltaic power data, where the historical photovoltaic power data records the photovoltaic power generation at different time points, perform variational mode decomposition on the photovoltaic power sequence data to obtain several intrinsic mode function components, analyze the several intrinsic mode function components, select the target intrinsic mode function components from the several intrinsic mode function components, and input the target intrinsic mode function components and their corresponding environmental variable data into the deployed short-term photovoltaic power prediction model to perform photovoltaic power generation prediction and obtain short-term photovoltaic power prediction results. Among them, the terminal device 101 can be various forms of computing devices, including desktop computers, laptop computers, and tablet computers, etc.
[0098] The following uses specific embodiments to elaborate in detail on the technical solution of this application and how the technical solution of this application solves the above technical problems. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The following will describe the embodiments of this application with reference to the accompanying drawings.
[0099] Figure 2 As shown in the flowchart of the short-term photovoltaic power prediction method provided by this application, Figure 1 as Figure 2 shown, the method includes:
[0100] S201. Extract the photovoltaic power sequence data corresponding to the prediction moment from the historical photovoltaic power data, where the historical photovoltaic power data records the photovoltaic power generation at different time points.
[0101] In the embodiments of the present application, the specific moment to be predicted can be determined, and according to the prediction moment, the photovoltaic power generation data within the corresponding historical time period corresponding to the prediction moment is extracted from the historical photovoltaic power data, and these data constitute the photovoltaic power sequence data.
[0102] S202. Perform variational mode decomposition on the photovoltaic power sequence data to obtain several intrinsic mode function components.
[0103] Variational Mode Decomposition (VMD) is a signal processing technology used to decompose complex time series data into several intrinsic mode function (IMF) components. Among them, each IMF is a time series, and each IMF can represent different frequency components.
[0104] S203. Analyze several intrinsic mode function components and select the target intrinsic mode function component from the several intrinsic mode function components.
[0105] Analyze each IMF obtained by VMD to identify the component that is most valuable for photovoltaic power prediction. The purpose of selecting the target IMF is to extract the signal features with the highest correlation with the prediction, remove noise and irrelevant information, thereby improving the performance of the model.
[0106] S204. Input the target intrinsic mode function component and its corresponding environmental variable data into a pre-trained short-term photovoltaic power prediction model for photovoltaic power generation prediction to obtain a short-term photovoltaic power prediction result. The short-term photovoltaic power prediction result includes the predicted value of the photovoltaic power generation corresponding to the prediction moment, and the environmental variable data includes at least one of the time point, total irradiance, diffuse irradiance, direct irradiance, and environmental temperature.
[0107] Among them, the time point refers to the specific timestamp when the photovoltaic power generation is recorded.
[0108] The total irradiance is the sum of the direct irradiance and the diffuse irradiance, which is a key factor affecting the photovoltaic power generation.
[0109] The diffuse irradiance refers to the radiation amount reaching the earth's surface after atmospheric scattering. The diffuse irradiance can have a significant impact on photovoltaic power generation on cloudy or overcast days because even without direct sunlight, the scattered light can still provide energy for the photovoltaic panels.
[0110] Direct irradiance refers to the amount of radiation that reaches the Earth's surface directly from the sun without being scattered by the atmosphere. Direct irradiance typically reaches its maximum on sunny days and has a direct impact on the efficiency of photovoltaic power generation.
[0111] Ambient temperature refers to the air temperature at the location of the photovoltaic system. Ambient temperature affects the efficiency of photovoltaic cells because high temperatures usually reduce the output efficiency of photovoltaic cells.
[0112] These environmental variables act together to affect the power generation performance of the photovoltaic system.
[0113] In this step, the selected target IMF and related environmental variables (such as time points, global irradiance, diffuse irradiance, direct irradiance, ambient temperature, etc.) are input into a pre-trained prediction model. This model may be based on machine learning or deep learning algorithms and is specifically designed for short-term photovoltaic power prediction. By combining the IMF and environmental variables, the model can more accurately predict the photovoltaic power generation at future moments and provide reliable prediction results.
[0114] The short-term photovoltaic power prediction method provided by the embodiments of this application extracts the photovoltaic power sequence data corresponding to the prediction moment from historical photovoltaic power data and performs variational mode decomposition on it, which can effectively separate the intrinsic mode function components of different frequency components. This decomposition method not only helps to identify and extract the characteristic patterns in the original data but also can effectively separate the noise from the useful signals through a fine decomposition process, thus significantly improving the accuracy of the prediction results. By analyzing these intrinsic mode function components, the target intrinsic mode function components that are most useful for photovoltaic power generation prediction can be selected. This step ensures that the model only uses the features with the highest correlation with the prediction, thereby improving the accuracy of the prediction. Inputting the target intrinsic mode function components together with the corresponding environmental variable data (such as time points, global irradiance, diffuse irradiance, direct irradiance, ambient temperature, etc.) into the pre-trained short-term photovoltaic power prediction model can fully integrate the information of historical data and environmental conditions. This combination method enables the model to more comprehensively understand and analyze the various factors affecting the change of photovoltaic power. This combination can improve the response ability and prediction accuracy of the model to short-term photovoltaic power changes. Generally speaking, this method extracts characteristic patterns through variational mode decomposition and combines environmental variables for prediction, achieving the effect of improving the accuracy of short-term photovoltaic power prediction.
[0115] Figure 3 Schematic flow of the short-term photovoltaic power prediction method provided for this application Figure 2 as Figure 3 shown, based on the Figure 2 embodiment, the short-term photovoltaic power prediction method is described in detail. This method includes:
[0116] S301. Extract the photovoltaic power sequence data corresponding to the prediction moment from the historical photovoltaic power data, where the historical photovoltaic power data records the photovoltaic power generation at different time points.
[0117] S302. Perform variational mode decomposition on the photovoltaic power sequence data to obtain several intrinsic mode function components.
[0118] Variational mode decomposition integrates the essence of Wiener filtering and Hilbert transform, providing a powerful tool for complex signal analysis. Its core technology lies in non-recursively decomposing the input original signal into a series of unique discrete intrinsic mode function components with sparse characteristics. These components not only retain the important features of the original signal but also make signal analysis more accurate and efficient through sparsity. In practical applications, the original data often contains various noise interferences, which can potentially have a negative impact on the accuracy of the prediction results. The VMD technology is designed specifically for this problem. It can effectively process the noise in the original data, separate the noise from the useful signal through a fine decomposition process, and thus significantly improve the accuracy of the prediction results.
[0119] In a possible implementation, before performing variational mode decomposition on the photovoltaic power sequence data to obtain several intrinsic mode function components, the short-term photovoltaic power prediction method of the embodiments of the present application may specifically further include:
[0120] For the photovoltaic power sequence individuals in the photovoltaic power sequence population, decode their binary sequences to obtain the mode number and penalty parameter corresponding to the photovoltaic power sequence individuals;
[0121] Decompose the photovoltaic power sequence individuals using the mode number and penalty parameter, calculate the fitness based on a preset fitness function, and obtain the fitness value corresponding to the photovoltaic power sequence individuals;
[0122] Compare the fitness values corresponding to different photovoltaic power sequence individuals, select the photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions for reproduction, and obtain the target photovoltaic power sequence individuals;
[0123] Decode the binary sequence of the target photovoltaic power sequence individuals to obtain the target mode number and target penalty parameter for performing variational mode decomposition.
[0124] Before implementing variational mode decomposition, two key parameters need to be set: the mode number (i.e., the number of IMF components) and the penalty parameter (used to control the sensitivity to noise and details during the decomposition process). The selection of these two parameters has a crucial impact on the decomposition effect and efficiency of the VMD technology. If the parameters are set improperly, it may lead to inaccurate decomposition results and even fail to effectively separate the useful information and noise in the original signal.
[0125] This embodiment introduces the Genetic Algorithm (GA). GA is an optimization algorithm that simulates natural selection and genetic principles and has powerful global search capabilities. It uses the minimization of local envelope entropy as the benchmark for the fitness function and can efficiently find the optimal solutions for two key parameters of VMD through continuous iterative optimization. This method combining GA and VMD not only improves the parameter selection efficiency of VMD technology but also further enhances the accuracy and stability of signal decomposition.
[0126] Another major highlight of GA lies in its powerful data processing ability. During the operation of a photovoltaic power station, the daily photovoltaic power data is huge and complex. GA can skillfully transform this data into binary sequences and continuously optimize the population through selection, replication, crossover, and mutation operations on the population until the optimal solutions for VMD parameters are obtained. This processing method not only improves the data processing efficiency but also provides more accurate and reliable data support for the prediction of photovoltaic power stations.
[0127] Under the framework of GA, the parameters to be optimized are encoded as unique "individuals", and these individuals are quantitatively evaluated through the fitness function. Subsequently, the algorithm generates a new generation of individual populations through genetic operations such as selection, replication, crossover, and mutation based on the fitness values of the individuals. In the iterative process of GA, the fitness function plays a crucial role. It measures the quality of individuals in the problem space and determines which individuals are more likely to be selected and inherited to the next generation. Specifically, the higher the fitness value of an individual, the greater the probability of it being inherited to the next generation, thus ensuring that the algorithm can gradually evolve towards the optimal solution.
[0128] When applying GA to the parameter optimization of VMD, the goal is to find a set of optimal parameters that can maximize the performance of VMD. Through the iterative optimization of GA, it is possible to effectively search for individuals with the highest fitness in the parameter space, and the parameters corresponding to these individuals are the optimal parameter configurations of VMD, improving the accuracy and stability of VMD decomposition.
[0129] In this embodiment, each individual of the photovoltaic power sequence exists in the form of a binary sequence in the population. First, these binary sequences need to be decoded to extract the number of modes and penalty parameters associated with each individual. Using the decoded number of modes and penalty parameters, variational mode decomposition is performed on each individual of the photovoltaic power sequence. The result of the decomposition is to decompose the original sequence into several intrinsic mode function components. Based on a preset fitness function, the fitness value of each individual is calculated. The fitness function is usually used to measure the quality of the decomposition result. Compare the fitness values of all individuals of the photovoltaic power sequence, and select those individuals whose fitness values meet the preset conditions. The higher the fitness value, the better the parameter setting of the individual. The selected excellent individuals are reproduced to determine the target individual of the photovoltaic power sequence. Decode the binary sequence of the target individual of the photovoltaic power sequence to obtain the final target number of modes and target penalty parameters for VMD.
[0130] In a possible implementation manner, selecting individuals of the photovoltaic power sequence whose fitness values meet the preset fitness conditions for reproduction to obtain the target individual of the photovoltaic power sequence may specifically include:
[0131] Select individuals of the photovoltaic power sequence whose fitness values meet the preset fitness conditions;
[0132] Pair the individuals of the photovoltaic power sequence whose fitness values meet the preset fitness conditions;
[0133] Perform a crossover operation on the successfully paired individuals of the photovoltaic power sequence to obtain individuals of the photovoltaic power sequence generated based on the crossover operation;
[0134] Perform a mutation operation on the individuals of the photovoltaic power sequence generated based on the crossover operation to obtain individuals of the photovoltaic power sequence generated based on the mutation operation;
[0135] Determine whether the individuals of the photovoltaic power sequence generated based on the mutation operation meet the preset termination conditions;
[0136] If the preset termination conditions are not met, add the individuals of the photovoltaic power sequence generated based on the mutation operation to the population of the photovoltaic power sequence, and execute the step of decoding the binary sequence of the individuals of the photovoltaic power sequence in the population of the photovoltaic power sequence to obtain the number of modes and penalty parameters corresponding to the individuals of the photovoltaic power sequence;
[0137] If the preset termination conditions are met, determine the individuals of the photovoltaic power sequence generated based on the mutation operation as the output target individuals of the photovoltaic power sequence.
[0138] In this embodiment, photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions are selected from the population. The selected excellent individuals are paired. Pairing is to prepare for subsequent crossover operations, usually randomly selected or paired based on a certain strategy. The crossover operation simulates gene recombination in biological inheritance, and new individuals are generated by exchanging part of the binary sequences of the paired individuals. This process helps to explore new parameter combinations and may produce better parameter settings. The mutation operation makes random minor changes to the individuals generated by crossover to increase the diversity of the population and prevent falling into local optima. Mutation usually involves randomly flipping certain bits in the binary sequence. Check whether the mutated individuals meet specific termination conditions. The termination conditions may be reaching a certain fitness threshold, reaching the maximum number of iterations, or other preset criteria. If the mutated individuals do not meet the termination conditions, they are added back to the population and continue to participate in the subsequent iteration process. This cyclic process continues to optimize the overall fitness of the population. If the mutated individuals meet the termination conditions, they are determined as the final target photovoltaic power sequence individuals. This means that the parameter settings of this individual have been considered optimal or good enough for use in the actual VMD process.
[0139] Refer to Figure 4 As shown, it is a schematic diagram of the process of data denoising and decomposition based on GA-VMD provided by this application. Gradually optimizing the parameter settings of the photovoltaic power sequence based on the genetic algorithm improves the effect of variational mode decomposition, thereby enhancing the accuracy of photovoltaic power prediction.
[0140] The process of data decomposition based on VMD is as follows:
[0141] In the first step, in order to obtain the single-sided spectrum of each mode u k (t), first perform the operation of Hilbert transform on the analytic signal. This step is the basis of VMD decomposition. Through the Hilbert transform, the instantaneous frequency and phase information of the signal can be captured, and thus the single-sided spectrum of each mode u k (t) can be obtained, as shown in Equation (1):
[0142]
[0143] In the formula, u k (t) represents the k-th mode in the original input signal; δ(t) represents the Dirac function; * represents the convolution operator; j represents the imaginary unit.
[0144] In the second step, in order to adjust the single-sided spectrum to the corresponding baseband position, a strategy is adopted, that is, multiplying the analytic signal by its estimated center frequency, as shown in Equation (2). This operation ensures that the spectrum of each mode is correctly placed within its baseband, facilitating subsequent analysis.
[0145]
[0146] where w k represents the center frequency of the k-th mode.
[0147] In the third step, the Gaussian smoothing method is used to estimate the bandwidth of each mode. Subsequently, a constrained variational problem is constructed as shown in Equation (3), where the Dirac function δ(t) and the convolution operator * are used to represent the time-domain and frequency-domain characteristics of the signal:
[0148]
[0149] where f(t) is the original input signal, K represents the total number of decomposed modes, represents the Dirac distribution.
[0150] In the fourth step, to transform the above constrained variational problem into an unconstrained programming problem that is easy to solve, the Lagrange multiplier λ(t) and the quadratic penalty factor α are introduced. This transformation not only simplifies the mathematical structure of the problem but also improves the efficiency and stability of the solution. After such a transformation, an extended Lagrangian function is obtained, as shown in Equation (4):
[0151]
[0152] In the fifth step, the alternating direction method of multipliers is used to solve the unconstrained programming problem min L({u k},{w k},λ). By alternately updating the values of {u k} and {w k}, the saddle point of the function is gradually approximated, and finally the optimal solutions of {u k} and {w k} are obtained. The update equations for the n-th iteration are shown in Equations (5)-(7). The update equations detail the parameter update strategy in each iteration, ensuring the accuracy and reliability of the entire solution process.
[0153]
[0154] where respectively represent the Fourier transforms of f(t), u i (t), and λ(t). The iteration continues until the convergence termination condition is satisfied, i.e., ε is the given convergence accuracy. τ represents the iteration step size. Finally, K IMF components u1(t), u2(t),..., u k (t),..., u K (t) can be obtained as the output result of VMD.
[0155] The process of optimizing VMD by GA to find the optimal solutions for the number of modes and penalty parameter is as follows:
[0156] (1) In the initialization stage, the initial parameters of GA and VMD need to be set. In particular, the number of modes K and the penalty parameter α for VMD decomposition are two key parameters, which will be optimized by GA.
[0157] (2) Under the framework of GA, these two parameters are regarded as the "individuals" of the genetic algorithm, and they are combined into an ordered sequence by real number coding. Within the preset parameter value range, M such individuals are randomly generated to form the initial population of GA.
[0158] (3) Construct a fitness function to evaluate the quality of individuals. Considering that the information entropy of each component after VMD decomposition reflects the sparsity of the signal, the average envelope entropy of these components is used as the definition of the fitness function. The smaller the average envelope entropy, the higher the sparsity of the signal, and thus the higher the fitness of the individual:
[0159]
[0160] where h k (j) is the envelope signal after Hilbert transform demodulation of the j-th zero-mean signal of the k-th IMF component, p j is the normalized expression of h k (j), E k is the envelope entropy of the k-th IMF component, E avg is the average envelope entropy of K IMF components, and N is the number of sampling points.
[0161] (4) In the iterative process of GA, each individual χ i has a corresponding fitness value f(χ i ). According to this fitness value, the probability of each individual being selected can be calculated. The higher the fitness, the greater the probability of the individual being selected. The probability of selecting an individual P(χ i ) is:
[0162]
[0163] (5) In the genetic operation of GA, crossover is an important step. The average crossover operator is used to achieve this, which can retain the excellent genes of the parent individuals to a certain extent while introducing new gene combinations, as follows:
[0164]
[0165] where μ is a random number between [0,1]. represents the j-th gene of the i-th individual.
[0166] (6) Another important genetic operation is mutation. During the iteration process of the GA, a certain gene position of a certain individual is randomly selected and modified using the mutation operator. The mutation operation can increase the diversity of the population and help the algorithm jump out of the local optimal solution. Here, the j-th gene of the i-th individual is selected and mutated using the mutation operator:
[0167]
[0168] f(g) = r(1 - g / G max ) 2 (14)
[0169] where m max and m min are the upper and lower limits of the gene respectively; and r are both random numbers in the interval [0, 1]; g and G max represent the current iteration number and the maximum iteration number respectively.
[0170] S303. Analyze several intrinsic mode function components and select the target intrinsic mode function component from the several intrinsic mode function components.
[0171] S304. Input the feature vector composed of the target intrinsic mode function component and its corresponding environmental variable data into the pre-trained short-term photovoltaic power prediction model.
[0172] In the embodiment of the present application, the target IMF component is combined with the corresponding environmental variable data to construct a feature vector. The construction of the feature vector can be a simple splicing or can be processed through specific feature engineering methods to improve the prediction ability of the model.
[0173] S305. In the convolutional layer of the short-term photovoltaic power prediction model, perform a convolution operation on the feature vector to generate a feature map.
[0174] In the convolutional layer, use a convolutional kernel to perform a convolution operation on the input feature vector. The convolution operation slides the convolutional kernel on the feature vector and calculates the dot product of the convolutional kernel and the feature vector to generate a feature map. This process can be regarded as detecting local patterns in the input data, and the convolutional kernel can capture local features in the data through learning. The output of the convolution operation usually undergoes processing by a non-linear activation function.
[0175] S306. Input the feature map into the pooling layer of the short-term photovoltaic power prediction model, perform a pooling operation on the multiple channels included in the feature map, and generate channel descriptors corresponding to the multiple channels respectively.
[0176] The feature maps output by the convolutional layer usually contain multiple channels. Pooling operations are performed on the feature maps of each channel. Pooling is a downsampling technique, and common pooling methods include max pooling and average pooling. The result of the pooling operation is to generate multiple channel descriptors, and each channel descriptor corresponds to the downsampling result of a feature map channel.
[0177] In a possible implementation, pooling operations are performed on the multiple channels included in the feature map to generate channel descriptors corresponding to the multiple channels respectively, which may specifically include:
[0178] Perform average pooling operations on the multiple channels included in the feature map to generate channel descriptors corresponding to the multiple channels respectively.
[0179] S307. Input the channel descriptors corresponding to the multiple channels into the fully connected layer of the short-term photovoltaic power prediction model, determine the correlation between the multiple channels through the activation function, and determine the attention weights corresponding to the multiple channels.
[0180] The channel descriptors obtained after being processed by the pooling layer can be input into the fully connected layer to further extract features and make predictions. In this process, by introducing the attention mechanism, the correlation between the multiple channels can be determined, and attention weights can be assigned to each channel.
[0181] S308. Weight each channel of the input feature map with the generated attention weights to obtain a weighted feature map.
[0182] For each channel in the feature map, perform weighted processing using the corresponding attention weight.
[0183] In the embodiments of the present application, a pooling layer and a channel attention mechanism are introduced after the convolutional layer. By learning the importance of each channel, the feature responses of the channels are adaptively recalibrated, enhancing the sensitivity of the model to important features and the attention to key features, improving the representation ability of the model, which enables the model to pay more attention to the features that are most important for the prediction target. The specific data processing process can be as follows:
[0184] First, compress the G×H-dimensional input feature map through the pooling layer, and compress the global spatial information into channel descriptors:
[0185]
[0186] In the formula, u c represents the c-th input feature map, and Z c represents the generated c-th channel descriptor.
[0187] Then, the correlation between channels can be captured through the activation function:
[0188] {Sc} = σ(y1ρ(y2{Z c})) (16)
[0189] Where y1 and y2 are the parameters of the dimensionality reduction layer and the increasing layer respectively, ρ represents the ReLU activation function, and S c is the attention weight of the c-th channel.
[0190] Multiplying the attention weight by the feature map of the corresponding channel, the weighted feature map can be obtained:
[0191] u′ c = S c × u c (17)
[0192] Where u′ c represents the weighted c-th feature map.
[0193] S309. Input the weighted feature map into the long short-term memory network layer of the short-term photovoltaic power prediction model to generate the short-term photovoltaic power prediction result. The short-term photovoltaic power prediction result includes the predicted value of the photovoltaic power generation corresponding to the prediction moment. The environmental variable data includes at least one of the time point, total irradiance, diffuse irradiance, direct irradiance, and environmental temperature.
[0194] Input the feature map weighted by the attention mechanism into the LSTM layer. The weighted feature map has extracted important spatial features through convolution and the attention mechanism. The LSTM layer processes the input sequence through its memory unit and gating mechanism to generate the short-term photovoltaic power prediction result.
[0195] In a possible implementation, inputting the weighted feature map into the long short-term memory network layer of the short-term photovoltaic power prediction model to generate the short-term photovoltaic power prediction result may specifically include:
[0196] Input the weighted feature map into the long short-term memory network layer of the short-term photovoltaic power prediction model;
[0197] In the long short-term memory network layer, convert the weighted feature map into a sequence composed of multiple time steps;
[0198] Determine the hidden state output at each time step, and calculate the attention weight corresponding to the hidden state at each time step based on the attention mechanism;
[0199] Use the calculated attention weight to perform weighted summation on the hidden state at each time step to generate the short-term photovoltaic power prediction result.
[0200] The LSTM network structure is as Figure 5 shown, where ht-1 and h t are the hidden states at time t-1 and time t, C t-1 and C t are the cell states at time t-1 and time t. The core components of the LSTM network include the cell state, input gate, forget gate, and output gate, each playing a different role. The forget gate is responsible for screening and retaining valuable information from the past, the input gate is responsible for integrating new information into the cell state, and the output gate controls the output of information. This gating mechanism ensures that the LSTM network can accurately remember and transmit key information in long time series data.
[0201] In the LSTM network, the gating mechanism utilizes non-linear activation functions such as sigmoid and tanh, making it more advantageous in dealing with non-linear problems and better able to adapt to complex and changing data patterns. Through the gating mechanism, the LSTM network can selectively retain and transmit information, achieving efficient utilization of useful information in sequence data.
[0202] The data processing process of the LSTM network can be shown as follows:
[0203] First, evaluate the value of the forget gate f t , which determines which information should be removed from the cell state based on the importance of specific information, as shown in Equation (18):
[0204] f t = σ(ω f · [h t-1 , x t + b f ) (19)
[0205] In the formula, ω f and b f are the weight and bias of the forget gate input respectively; σ(·) represents the activation function (such as the sigmoid function). [h t-1 , x t represents the concatenation of the vectors h t-1 and x t . x t is the input at time t. f t , i t , O t are the values of the forget gate, input gate, and output gate at time t respectively.
[0206] Then, the input gate determines how much new information is received into the current storage unit C t ; is used to determine whether information should be stored in the current memory. The corresponding expressions are as (19)-(20):
[0207]
[0208] i t = σ(ω i · [h t-1 , x t + b i )(21)
[0209] Where ω c and ω i are the weight parameters of and the input i t respectively; b c and b i are the bias parameters of and the input gate respectively; tanh(·) is the activation function.
[0210] Next, update the value of the cell state C t at the current time. This step combines the results of the forget gate and the input gate to achieve the update of the cell state, as shown in Equation (21):
[0211]
[0212] Finally, determine the output of the current state. In this step, the output gate O t controls the output of the storage cell state value. Then, scale C t obtained in the previous step (changed by the tanh activation function), and obtain h t from the output gate O t .
[0213] O t = σ(w o · [h t-1 , x t + b o )(23)
[0214] h t = O t · tanh(C t )(24)
[0215] Where w o and b o are the weight and bias parameters of the output gate respectively.
[0216] In summary, the short-term photovoltaic power prediction method provided by the embodiments of this application processes input data through a convolutional layer, has the ability to extract local features, and is applicable to scenarios with multiple input variables such as photovoltaic prediction; LSTM has the ability to capture long-term dependence relationships and is applicable to time-series photovoltaic output prediction; the attention mechanism can enhance the model's ability to capture key information and improve the model's representation ability. The network structure of the short-term photovoltaic power prediction model provided by this application can be as Figure 6 shown. Optionally, the input feature step size set for the short-term photovoltaic power prediction model in this application is 34, that is, the feature vector corresponding to the prediction moment and the feature vectors of the 34 moments before the prediction moment need to be used as inputs, and the regression output is the predicted value of the photovoltaic power generation corresponding to the prediction moment.
[0217] To verify the effectiveness of the GA-VMD-CNN-LSTM-Attention model proposed in this application, the first 80% of the 3026 sets of historical photovoltaic power generation data of the photovoltaic power station are used as the training data set for training, and the last 20% of the historical photovoltaic power generation data of the photovoltaic power station is used as the test set to verify the accuracy of the prediction results. The change situation of the historical photovoltaic power generation data of the photovoltaic power station is as Figure 7 shown.
[0218] To optimize the prediction performance, the GA-VMD algorithm is used to decompose and denoise the signal with noise. First, the minimum value of the envelope entropy is selected as the evaluation criterion to seek the best combination of the decomposition mode number K and the penalty parameter α in the VMD algorithm. During this process, the population size in the GA algorithm is set to 10, and the maximum number of iterations is limited to 10 rounds. The search range of the decomposition mode number K is set between [2, 10], while the search range of the penalty parameter α is set to [100, 5000]. As a quantization index, the envelope entropy can effectively reflect the sparsity characteristics of the original signal. When there are more noise components and less feature information in the signal, the envelope entropy value is relatively high; conversely, when the noise components decrease and the feature information is rich, the envelope entropy value decreases accordingly; therefore, the envelope entropy can be used as the fitness function. Figure 8 shows the evolutionary process of the GA, that is, the curve of the fitness function changing with the number of iterations. It can be seen that as the number of iterations increases, the fitness of the algorithm gradually decreases, indicating that the algorithm has found a more suitable parameter combination during the gradual optimization. At the 11th iteration, when there are fewer noise components and rich feature information in the signal, the envelope entropy reaches a local minimum value of 0.0357. At this time, it is determined that the decomposition mode number K and the penalty parameter α have obtained the optimal solution, that is, the mode number K = 9 and the penalty parameter α = 4792. Through the optimization of the VMD parameters by the GA algorithm, the power generation sequence data of the photovoltaic power station can be decomposed into 9 independent IMF components, as Figure 9As shown. This decomposition process not only effectively reduces noise interference but also retains the key feature information in the data, laying a solid foundation for subsequent analysis and prediction work.
[0219] Figure 10 and Figure 11 respectively show the prediction results of the model in the training set and the test set. The performance of the model in the test set is particularly prominent. In the training set, the predicted results of the model are almost exactly the same as the true values, showing that the training results have a very high degree of fitting. In the test set, although there is a small deviation between the predicted results and the true values due to the uncertainty of the data and the limitation of the model generalization ability, overall, the predicted results are still very close to the true values, reflecting the good robustness and prediction ability of the model. In Figure 12 it shows the matching degree between the predicted results of the photovoltaic power station's power generation and the actual observed values. It can be clearly seen that there is a high degree of correlation and consistency between the two.
[0220] The short-term photovoltaic power prediction method provided by the embodiments of the present application extracts the photovoltaic power sequence data corresponding to the prediction moment from the historical photovoltaic power data and performs variational mode decomposition on it, which can effectively separate the intrinsic mode function components of different frequency components. This decomposition method not only helps to identify and extract the feature patterns in the original data but also can effectively separate noise from useful signals through a fine decomposition process, thus significantly improving the accuracy of the prediction results. By analyzing these intrinsic mode function components, the target intrinsic mode function components that are most useful for photovoltaic power generation prediction can be selected. This step ensures that the model only uses the features with the highest correlation with the prediction, thereby improving the accuracy of the prediction. Inputting the target intrinsic mode function components together with the corresponding environmental variable data (such as time points, total irradiance, diffuse irradiance, direct irradiance, environmental temperature, etc.) into the pre-trained short-term photovoltaic power prediction model can fully integrate the information of historical data and environmental conditions. This combination method enables the model to more comprehensively understand and analyze various factors affecting photovoltaic power changes. This combination can improve the model's response ability and prediction accuracy to short-term photovoltaic power changes. Overall, this method extracts feature patterns through variational mode decomposition and combines environmental variables for prediction, achieving the effect of improving the accuracy of short-term photovoltaic power prediction.
[0221] The short-term photovoltaic power prediction method provided by the embodiments of the present application denoises the historical data of the power generation power of the photovoltaic power station. Compared with not undergoing VMD processing, this method can effectively reduce the adverse impact of data noise on the prediction accuracy of the power generation power of the photovoltaic power station, thereby improving the prediction accuracy. Compared with the traditional VMD technology, the GA algorithm can adaptively find the optimal number of decomposition modes and penalty parameters, avoiding artificially given parameters. By introducing the CNN method in the LSTM method to capture the spatial feature information of the input data of the photovoltaic power station to combine the CNN feature extraction ability with the LSTM time series information extraction ability, and introducing an attention mechanism to adaptively adjust the hidden state weights of the LSTM time steps, the impact of the input data on the power generation power of the photovoltaic power station can be considered to the greatest extent, and the prediction accuracy of the power generation power of the photovoltaic power station can be improved as much as possible.
[0222] Figure 13 It is a schematic structural diagram of the short-term photovoltaic power prediction device provided by the present application, as Figure 13 shown. The short-term photovoltaic power prediction device 130 provided in this embodiment includes:
[0223] An extraction module 1301, configured to extract photovoltaic power sequence data corresponding to the prediction moment from the historical photovoltaic power data, and the historical photovoltaic power data records the photovoltaic power generation at different time points;
[0224] A decomposition module 1302, configured to perform variational mode decomposition on the photovoltaic power sequence data to obtain a plurality of intrinsic mode function components;
[0225] A selection module 1303, configured to analyze a plurality of intrinsic mode function components and select a target intrinsic mode function component from the plurality of intrinsic mode function components;
[0226] A prediction module 1304, configured to input the target intrinsic mode function component and its corresponding environmental variable data into a pre-trained short-term photovoltaic power prediction model for photovoltaic power generation prediction to obtain a short-term photovoltaic power prediction result, where the short-term photovoltaic power prediction result includes the photovoltaic power generation prediction value corresponding to the prediction moment, and the environmental variable data includes at least one of time point, total irradiance, diffuse irradiance, direct irradiance, and environmental temperature.
[0227] In a possible implementation manner, the prediction module is specifically configured to:
[0228] Input the feature vector composed of the target intrinsic mode function component and its corresponding environmental variable data into a pre-trained short-term photovoltaic power prediction model;
[0229] Perform a convolution operation on the feature vector in the convolutional layer of the short-term photovoltaic power prediction model to generate a feature map;
[0230] Input the feature map into the pooling layer of the short-term photovoltaic power prediction model, perform pooling operations on multiple channels included in the feature map, and generate channel descriptors corresponding to the multiple channels respectively;
[0231] Input the channel descriptors corresponding to the multiple channels respectively into the fully connected layer of the short-term photovoltaic power prediction model, determine the correlation between the multiple channels through an activation function, and determine the attention weights corresponding to the multiple channels respectively;
[0232] Weight each channel of the input feature map using the generated attention weights to obtain a weighted feature map;
[0233] Input the weighted feature map into the long short-term memory network layer of the short-term photovoltaic power prediction model to generate a short-term photovoltaic power prediction result.
[0234] In a possible implementation manner, the prediction module is specifically configured to:
[0235] Input the weighted feature map into the long short-term memory network layer of the short-term photovoltaic power prediction model;
[0236] In the long short-term memory network layer, convert the weighted feature map into a sequence composed of multiple time steps;
[0237] Determine the hidden state output at each time step, and calculate the attention weight corresponding to the hidden state at each time step based on the attention mechanism;
[0238] Use the calculated attention weights to perform weighted summation on the hidden states at each time step to generate a short-term photovoltaic power prediction result.
[0239] In a possible implementation manner, the prediction module is specifically configured to:
[0240] Perform average pooling operations on multiple channels included in the feature map to generate channel descriptors corresponding to the multiple channels respectively.
[0241] In a possible implementation manner, the short-term photovoltaic power prediction device is specifically further configured to:
[0242] For a photovoltaic power sequence individual in the photovoltaic power sequence population, decode its binary sequence to obtain the pattern number and penalty parameter corresponding to the photovoltaic power sequence individual;
[0243] Decompose the photovoltaic power sequence individual using the pattern number and penalty parameter, calculate the fitness based on a preset fitness function, and obtain the fitness value corresponding to the photovoltaic power sequence individual;
[0244] Compare the fitness values corresponding to different photovoltaic power sequence individuals, and select the photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions for reproduction to obtain the target photovoltaic power sequence individuals;
[0245] Decode the binary sequence of the target photovoltaic power sequence individual to obtain the target number of modes and the target penalty parameter for variational mode decomposition.
[0246] In a possible implementation manner, the short-term photovoltaic power prediction device is further specifically configured to:
[0247] Select the photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions;
[0248] Pair the photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions;
[0249] Perform a crossover operation on the successfully paired photovoltaic power sequence individuals to obtain the photovoltaic power sequence individuals generated based on the crossover operation;
[0250] Perform a mutation operation on the photovoltaic power sequence individuals generated based on the crossover operation to obtain the photovoltaic power sequence individuals generated based on the mutation operation;
[0251] Determine whether the photovoltaic power sequence individuals generated based on the mutation operation meet the preset termination conditions;
[0252] If the preset termination conditions are not met, add the photovoltaic power sequence individuals generated based on the mutation operation to the photovoltaic power sequence population, and execute the step of decoding the binary sequence of the photovoltaic power sequence individuals in the photovoltaic power sequence population to obtain the number of modes and the penalty parameter corresponding to the photovoltaic power sequence individuals;
[0253] If the preset termination conditions are met, determine the photovoltaic power sequence individuals generated based on the mutation operation as the output target photovoltaic power sequence individuals.
[0254] The short-term photovoltaic power prediction device provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.
[0255] Figure 14 This is a schematic structural diagram of the short-term photovoltaic power prediction device provided in this application. As Figure 14 shown, the short-term photovoltaic power prediction device 140 provided in this embodiment includes: at least one processor 1401 and a memory 1402. Optionally, the device 140 further includes a communication component 1403. Among them, the processor 1401, the memory 1402, and the communication component 1403 are connected through a bus.
[0256] In a specific implementation process, at least one processor 1401 executes computer-executable instructions stored in a memory 1402, so that at least one processor 1401 executes the above-mentioned method.
[0257] For the specific implementation process of the processor 1401, reference may be made to the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.
[0258] In the above embodiment, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, abbreviated as: CPU), or may also be other general-purpose processors, digital signal processors (English: Digital Signal Processor, abbreviated as: DSP), application specific integrated circuits (English: Application Specific Integrated Circuit, abbreviated as: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
[0259] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0260] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0261] This application also provides a computer program product, including a computer program, which implements the above-mentioned method when executed by a processor.
[0262] This application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the above-mentioned method is implemented.
[0263] The above-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk. The readable storage medium can be any available medium accessible by a general-purpose or special-purpose computer.
[0264] An exemplary readable storage medium is coupled to the processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in a device.
[0265] The division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be indirect couplings or communication connections through some interfaces, devices, or units, and can be in electrical, mechanical, or other forms.
[0266] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0267] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0268] If a function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this 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 for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., which are various media that can store program codes.
[0269] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When this program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: ROMs, RAMs, magnetic disks, or optical discs, etc., which are various media that can store program codes.
[0270] Finally, it should be noted that: after considering the specification and practicing the invention disclosed herein, those skilled in the art will readily think of other implementation manners of the present invention. The present invention is intended to cover any variations, uses, or adaptations of the present invention, which follow the general principles of the present invention and include common general knowledge or conventional technical means in the technical field not disclosed in the present invention. It is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. A short-term photovoltaic power prediction method, characterized in that: include: Extracting photovoltaic power sequence data corresponding to the prediction time from historical photovoltaic power data, wherein the historical photovoltaic power data records photovoltaic power generation at different time points; Performing variational mode decomposition on the photovoltaic power sequence data to obtain a number of intrinsic mode function components; Analyzing the plurality of intrinsic modal function components, and selecting a target intrinsic modal function component from the plurality of intrinsic modal function components; The target intrinsic mode function component and its corresponding environmental variable data are input into a pre-trained short-term photovoltaic power prediction model to perform photovoltaic power generation prediction to obtain a short-term photovoltaic power prediction result, wherein the short-term photovoltaic power prediction result includes the photovoltaic power generation prediction value corresponding to the prediction moment, and the environmental variable data includes at least one of the time point, total irradiance, scattered irradiance, direct irradiance, and ambient temperature.
2. The method according to claim 1, characterized in that The target intrinsic mode function component and the corresponding environmental variable data are input into a pre-trained short-term photovoltaic power prediction model to perform photovoltaic power generation power prediction, and obtain a short-term photovoltaic power prediction result, including: Inputting a feature vector composed of the target intrinsic mode function component and its corresponding environmental variable data into a pre-trained short-term photovoltaic power prediction model; In the convolution layer of the short-term photovoltaic power prediction model, a convolution operation is performed on the feature vector to generate a feature map; Inputting the feature map into the pooling layer of the short-term photovoltaic power prediction model, performing a pooling operation on multiple channels included in the feature map, and generating channel descriptors corresponding to the multiple channels respectively; Inputting the channel descriptors corresponding to the multiple channels into the fully connected layer of the short-term photovoltaic power prediction model, determining the correlation between the multiple channels through an activation function, and determining the attention weights corresponding to the multiple channels; Using the generated attention weights to weight each channel of the input feature map to obtain a weighted feature map; The weighted feature map is input into the long short-term memory network layer of the short-term photovoltaic power prediction model to generate the short-term photovoltaic power prediction result.
3. The method according to claim 2, characterized in that The step of inputting the weighted feature map into the long short-term memory network layer of the short-term photovoltaic power prediction model to generate the short-term photovoltaic power prediction result includes: Inputting the weighted feature map into the long short-term memory network layer of the short-term photovoltaic power prediction model; In the long short-term memory network layer, converting the weighted feature map into a sequence consisting of multiple time steps; Determine the implicit state of the output at each time step, and calculate the attention weight corresponding to the implicit state of each time step based on the attention mechanism; The calculated attention weights are used to perform weighted summation on the implicit states of each time step to generate the short-term photovoltaic power prediction result.
4. The method according to claim 2, characterized in that: The performing a pooling operation on the multiple channels included in the feature map to generate channel descriptors corresponding to the multiple channels respectively includes: An average pooling operation is performed on multiple channels included in the feature map to generate channel descriptors corresponding to the multiple channels respectively.
5. The method according to any one of claims 1 to 4, characterized in that: Before performing variational modal decomposition on the photovoltaic power sequence data to obtain a number of intrinsic modal function components, the method further includes: For a photovoltaic power sequence individual in the photovoltaic power sequence population, decoding its binary sequence obtains the mode number and penalty parameter corresponding to the photovoltaic power sequence individual; Decomposing the photovoltaic power sequence individuals by using the mode number and the penalty parameter, calculating the fitness based on a preset fitness function, and obtaining the fitness value corresponding to the photovoltaic power sequence individuals; Compare the fitness values corresponding to different photovoltaic power sequence individuals, select the photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions for reproduction, and obtain the target photovoltaic power sequence individuals; The binary sequence of the target photovoltaic power sequence individuals is decoded to obtain the target mode number and target penalty parameter for performing variational mode decomposition.
6. The method according to claim 5, characterized in that The step of selecting photovoltaic power sequence individuals whose fitness values meet preset fitness conditions for reproduction to obtain target photovoltaic power sequence individuals includes: Selecting photovoltaic power sequence individuals whose fitness values meet preset fitness conditions; Pairing the photovoltaic power sequence individuals whose fitness values meet the preset fitness conditions; Perform a crossover operation on the successfully paired photovoltaic power sequence individuals to obtain photovoltaic power sequence individuals generated based on the crossover operation; Performing mutation operation on the photovoltaic power sequence individuals generated based on the crossover operation to obtain photovoltaic power sequence individuals generated based on the mutation operation; Determine whether the photovoltaic power sequence individuals generated based on the mutation operation meet the preset termination conditions; If the preset termination condition is not met, the photovoltaic power sequence individual generated based on the mutation operation is added to the photovoltaic power sequence population, and the steps of decoding the binary sequence of the photovoltaic power sequence individual in the photovoltaic power sequence population to obtain the mode number and penalty parameter corresponding to the photovoltaic power sequence individual are performed; If the preset termination condition is met, the photovoltaic power sequence individual generated based on the mutation operation is determined as the output target photovoltaic power sequence individual.
7. A short-term photovoltaic power prediction device, characterized in that: include: An extraction module is used to extract photovoltaic power sequence data corresponding to the prediction time from historical photovoltaic power data, wherein the historical photovoltaic power data records photovoltaic power generation at different time points; A decomposition module, used for performing variational mode decomposition on the photovoltaic power sequence data to obtain a number of intrinsic mode function components; A selection module, configured to analyze the plurality of intrinsic modal function components and select a target intrinsic modal function component from the plurality of intrinsic modal function components; A prediction module is used to input the target intrinsic mode function component and its corresponding environmental variable data into a pre-trained short-term photovoltaic power prediction model to predict photovoltaic power generation, and obtain a short-term photovoltaic power prediction result, wherein the short-term photovoltaic power prediction result includes the photovoltaic power generation prediction value corresponding to the prediction moment, and the environmental variable data includes at least one of the time point, total irradiance, scattered irradiance, direct irradiance, and ambient temperature.
8. A short-term photovoltaic power prediction device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
10. A computer program product, characterized in that The computer program product comprises a computer program, which implements the method according to any one of claims 1 to 7 when executed by a processor.
Citation Information
Cited By
CNN-LSTM-based photovoltaic power prediction method and related equipment
CN121480788A