Photovoltaic power generation capability prediction model training method and related device

CN122073376APending Publication Date: 2026-05-22XIAN THERMAL POWER RES INST CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAN THERMAL POWER RES INST CO LTD
Filing Date
2026-02-06
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

In existing photovoltaic power generation capacity prediction technologies, the decomposition parameters rely on human experience, have poor adaptability, and the decomposition process is disconnected from the prediction process, lacking synergistic optimization, which affects the prediction accuracy.

Method used

An improved gray wolf optimization algorithm (IGWO) is used to optimize the variational mode decomposition (VMD) parameters, and the PatchTST model is combined to predict photovoltaic power generation capacity. Through adaptive optimization and multi-channel fusion, an integrated optimization-decomposition-prediction framework is constructed.

Benefits of technology

It significantly improves the accuracy and robustness of photovoltaic power generation capacity prediction, realizes the automation and generalization capabilities of the model, and improves the accuracy of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122073376A_ABST
    Figure CN122073376A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of photovoltaic power generation prediction, and discloses a photovoltaic power generation capability prediction model training method and a related device. The photovoltaic power generation capability prediction model training method comprises the following steps: acquiring a historical photovoltaic power sequence and meteorological feature sequences; using the optimal parameter combination found by the improved grey wolf optimization algorithm, and using the variational mode decomposition model to decompose the historical photovoltaic power sequence to obtain a plurality of subsequences; and aligning and splicing the obtained subsequences and the external meteorological features in each meteorological feature sequence in the time dimension, and performing model training by taking the obtained multi-channel input tensor as a sample. According to the technical scheme, the technical problems that decomposition parameters in an existing scheme depend on artificial experience, the adaptive capacity is poor, the decomposition process and the prediction process are separated from each other, and a collaborative optimization mechanism is lacked are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of photovoltaic power generation prediction technology, and specifically relates to a method and related apparatus for training a photovoltaic power generation capacity prediction model. Background Technology

[0002] Photovoltaic power generation capacity prediction technology is one of the key technologies in the fields of energy management and grid operation. Explain, due to the intermittent, fluctuating and random characteristics of solar energy, the power output of photovoltaic power plants will fluctuate drastically with changes in weather conditions (such as light intensity, cloud cover, temperature, etc.). Therefore, accurate prediction of photovoltaic power generation capacity in the future is of great significance for ensuring the safe and stable operation of the power grid, optimizing power dispatch, formulating reasonable energy storage strategies, and participating in electricity market transactions.

[0003] Currently, photovoltaic power generation prediction methods can be mainly divided into physical methods, traditional statistical methods, and artificial intelligence methods. Among them, physical methods rely on complex meteorological models and the physical parameters of photovoltaic modules, and the model construction is complex and costly. Although traditional statistical methods (such as autoregressive moving average models) are simple, they are difficult to capture the strong nonlinear and nonstationary features in photovoltaic power sequences. Artificial intelligence methods, represented by deep learning, such as long short-term memory networks and gated recurrent units, have been widely used in the field of photovoltaic prediction due to their powerful nonlinear feature learning capabilities.

[0004] In existing artificial intelligence methods, a "decomposition-integration" strategy is often adopted to further improve prediction accuracy. This involves first using signal decomposition techniques to break down the complex original power sequence into multiple relatively stable subsequences, then predicting each subsequence, and finally integrating the results. This "decomposition first, prediction second, integration third" strategy improves the accuracy of the prediction model to some extent by reducing the complexity of the original sequence. Although the above strategy has achieved some success in photovoltaic power generation prediction, it still has several core shortcomings that urgently need to be addressed, mainly including: the parameter selection during the decomposition process is somewhat arbitrary and subjective, resulting in poor adaptability; the decomposition and prediction processes are disconnected, lacking synergistic optimization; these shortcomings affect the final prediction accuracy to some extent. Summary of the Invention

[0005] The purpose of this invention is to provide a method and related apparatus for training a photovoltaic power generation capacity prediction model, in order to solve the technical problems still existing in photovoltaic power generation capacity prediction technologies, such as the reliance on human experience for decomposition parameters, poor adaptability, and the disconnect between the decomposition process and the prediction process, lacking a collaborative optimization mechanism. Specifically, the technical solution disclosed in this invention is a short-term photovoltaic power generation capacity prediction scheme that deeply integrates the Improved Grey Wolf Optimizer (IGWO) algorithm, Variational Mode Decomposition (VMD), and a Patch-based Time Series Transformer (PatchTST) model. This scheme can significantly improve the accuracy, robustness, and automation level of photovoltaic power generation capacity prediction model training.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for training a photovoltaic power generation capacity prediction model, comprising the following steps: Based on the historical power output data of the target photovoltaic power plant and various meteorological data from the same period, historical photovoltaic power sequences and candidate meteorological characteristic sequences are obtained. The variational mode decomposition (VMD) algorithm was used to decompose the historical photovoltaic power sequence into signals to obtain... A subsequence; wherein, during signal decomposition, the optimal parameter combination found by the improved Grey Wolf Optimization Algorithm (IGWO) is used. Decompose it, among which The optimal number of decomposition layers obtained by IGWO optimization. The optimal penalty factor obtained by IGWO optimization; The specific subsequences are as follows: One intrinsic mode function component and one residual component; The result Each subsequence is aligned and spliced ​​with the external meteorological features selected based on each candidate meteorological feature sequence in the time dimension to obtain a multi-channel input tensor; The PatchTST model is trained using multi-channel input tensors as training samples, and the trained PatchTST model is used as a photovoltaic power generation capacity prediction model.

[0007] A further improvement to the technical solution of this invention lies in finding the optimal parameter combination using IGWO. During the process, The optimization objective is set as the modality decomposition number of VMD. and secondary penalty factor Furthermore, the root mean square error (RMSE) of the PatchTST model on the validation set is used as the fitness function of IGWO. In the optimization process, the population size of IGWO, the maximum number of iterations, and the initial gray wolf population are first set, with each gray wolf's individual position representing a group. Candidate solutions; in each subsequent iteration, for each individual gray wolf, use the one it represents. The parameters are decomposed into VMD and combined with external meteorological features for prediction. The prediction error is calculated and used as the fitness value. The positions of Alpha, Beta and Delta wolves are updated according to the fitness value of the gray wolf population. The entire population is guided to conduct global exploration and local development in the direction of the lowest RMSE based on the mathematical model of encirclement, hunting and attack. The optimization process terminates after reaching the maximum number of iterations. At this point, the position of the Alpha wolf with the lowest fitness value is the optimal parameter combination. .

[0008] A further improvement to the technical solution of this invention lies in the process of selecting external meteorological features based on each candidate meteorological feature sequence. First, the Pearson correlation coefficient between the historical photovoltaic power series and each candidate meteorological feature series is calculated. Then, a correlation analysis is performed based on the calculation results. Finally, based on the correlation analysis results, several external meteorological features with the highest absolute correlation values ​​are selected.

[0009] A further improvement of the technical solution of the present invention is that the selected external meteorological characteristics include temperature, relative humidity and global horizontal irradiance.

[0010] A further improvement to the technical solution of this invention lies in the fact that the steps of obtaining the historical photovoltaic power sequence and each candidate meteorological feature sequence based on the historical power output data of the target photovoltaic power station and various meteorological data of the same period specifically include: Based on the target photovoltaic power station, historical power output data and various meteorological data from the same period are acquired to form raw data; The raw data is preprocessed by handling missing values, outliers, and normalization to obtain the final historical photovoltaic power sequence and various meteorological characteristic sequences.

[0011] A further improvement of the technical solution of the present invention is that, in the application process of the photovoltaic power generation capacity prediction model, the time series data to be predicted is first obtained based on the selected external meteorological characteristics, and then the photovoltaic power generation capacity prediction model is used to make predictions, and finally the photovoltaic power generation capacity prediction data corresponding to the time series data to be predicted is obtained.

[0012] In a second aspect, the present invention provides a photovoltaic power generation capacity prediction model training system, comprising: The data acquisition unit is used to acquire historical photovoltaic power sequences and candidate meteorological feature sequences based on the historical power output data of the target photovoltaic power plant and various meteorological data of the same period. The signal decomposition unit is used to perform signal decomposition on historical photovoltaic power sequences using the Variational Mode Decomposition (VMD) algorithm to obtain... A subsequence; wherein, during signal decomposition, the optimal parameter combination found by the improved Grey Wolf Optimization Algorithm (IGWO) is used. Decompose it, among which The optimal number of decomposition layers obtained by IGWO optimization. The optimal penalty factor obtained by IGWO optimization; The specific subsequences are as follows: One intrinsic mode function component and one residual component; The sample acquisition unit is used to obtain... Each subsequence is aligned and spliced ​​with the external meteorological features selected based on each candidate meteorological feature sequence in the time dimension to obtain a multi-channel input tensor; The training unit is used to train the PatchTST model using multi-channel input tensors as training samples, and the trained PatchTST model is used as a photovoltaic power generation capacity prediction model.

[0013] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the photovoltaic power generation capacity prediction model training method as described in any one of the first aspects of the present invention.

[0014] In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the photovoltaic power generation capacity prediction model training method as described in any one of the first aspects of the present invention.

[0015] In a fifth aspect, the present invention provides a computer program product comprising computer instructions which, when executed by a processor, implement the steps of the photovoltaic power generation capacity prediction model training method as described in any one of the first aspects of the present invention.

[0016] Compared with the prior art, the present invention has the following beneficial effects: This invention proposes an adaptive optimization method for VMD parameters based on an improved gray wolf optimization (IGWO) approach. Specifically, to address the parameter selection problem in VMD, this invention employs IGWO to implement the VMD decomposition parameters K and... The automatic optimization avoids the subjectivity of manual settings and can achieve the best decomposition effect. Furthermore, in a further preferred embodiment of the present invention, a specific implementation method is provided that uses the error of the final prediction model (PatchTST model) as the fitness function.

[0017] VMD decomposition of modes and multi-channel fusion of external meteorological factors; specifically, addressing the issue of large fluctuations in the original photovoltaic power generation data sequence, VMD decomposes the original sequence into multiple intrinsic mode components (IMFs) of different frequencies and a residual component. This technique not only reduces some unnecessary noise in the model prediction but also allows the subsequent prediction model to learn systematically, achieving better prediction results. Furthermore, in a further preferred embodiment of this invention, key meteorological features (such as global horizontal irradiance and temperature) selected by the Pearson Correlation Coefficient (PCC) are combined to construct a more information-rich multi-channel input, which helps improve prediction accuracy.

[0018] Multi-channel time series prediction based on the PatchTST model; in particular, regarding the problem of how to process and predict multi-channel fused data, this invention utilizes the unique "blocking" mechanism of the PatchTST model to effectively capture the local and global dependencies of time series, thereby improving prediction accuracy. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating a method for training a photovoltaic power generation capacity prediction model in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the principle of training a photovoltaic power generation capacity prediction model in a specific embodiment of the present invention; Figure 3 This is a flowchart illustrating the variational mode decomposition (VMD)-long short-term memory network (LSTM) prediction model in the existing technology. Figure 4 This is a schematic diagram of the photovoltaic power generation data decomposition results in an embodiment of the present invention; Figure 5 This is a schematic diagram of the local prediction results of the experimental model in the DKASC dataset in the first prediction embodiment of the present invention; Figure 6This is a schematic diagram of the local prediction results of the experimental model in the DKASC dataset in the second prediction embodiment of the present invention; Figure 7 This is a schematic diagram of the local prediction results of the experimental model in the DKASC dataset in the third prediction embodiment of the present invention; Figure 8 This is a schematic diagram of the local prediction results of the experimental model in the DKASC dataset in the fourth prediction embodiment of the present invention; Figure 9 This is a schematic diagram of a photovoltaic power generation capacity prediction model training system in an embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention; obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0022] Based on the technical solutions disclosed in the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this invention. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.

[0023] Please see Figure 1 and Figure 2 The present invention provides a method for training a photovoltaic power generation capacity prediction model, which specifically includes the following steps: Step 1: Based on the target photovoltaic power station, acquire historical power output data and various meteorological data from the same period to form raw data. Perform missing value processing, outlier processing, and data normalization preprocessing on the raw data to obtain the preprocessed historical photovoltaic power sequence and various meteorological characteristic sequences. In specific exemplary technical solutions, the collected meteorological data include, but are not limited to, global horizontal irradiance (GHI), temperature, relative humidity, wind speed, and wind direction.

[0024] In a specific exemplary technical solution, the specific steps for handling missing values, outliers, and data normalization preprocessing of the original data are as follows: Missing value handling includes: for a small number of missing values ​​in the data sequence, linear interpolation or the mean of the values ​​at the same time several days before and after the missing point is used to fill in the missing values, so as to ensure the integrity and continuity of the data sequence.

[0025] Outlier handling includes: using 3 σ Extreme outliers in power data (such as zero values ​​caused by grid maintenance or inverter failures, or instantaneous spikes far exceeding normal power generation capacity) are identified and removed using criteria or box plot methods. After removal, they are processed according to the missing value handling method.

[0026] Data normalization: In order to eliminate the differences in dimensions and orders of magnitude between different physical quantities (such as power, temperature, GHI, etc.) and avoid gradient vanishing or exploding during model training, the min-max scaling method is used on all preprocessed data to uniformly scale the values ​​to the range [0, 1].

[0027] The formula for calculating the maximum and minimum normalization is as follows: ; In the formula, This is the result of the maximum-minimum normalization process; The original value, and These are the minimum and maximum values ​​of the characteristic sequence, respectively.

[0028] In a preferred embodiment of the present invention, to reduce redundant information input, decrease model computational complexity, and avoid interference from irrelevant variables in the prediction, external meteorological factors are also screened. The specific process is as follows: Pearson correlation coefficients (PCCs) are calculated for the preprocessed historical photovoltaic power sequence and each candidate meteorological feature sequence (temperature, relative humidity, global horizontal irradiance, etc.). Based on the correlation analysis results, several external factors with the highest absolute correlation values ​​are selected as the final auxiliary input variables.

[0029] In this embodiment of the invention, the final input data are determined to be temperature, relative humidity, and global horizontal irradiance.

[0030] Specifically, the formula for calculating PCC is: ; In the formula, Representing variables With variables The Pearson correlation coefficient between them and These represent sample points for the two variables, and It is the sample mean. Indicates the number of samples.

[0031] Step 2: Input the preprocessed historical photovoltaic power sequence f(t) from Step 1 into the VMD model, using the optimal parameters found by IGWO. Perform signal decomposition. The optimal number of decomposition layers (VMD modal decomposition number) obtained by IGWO optimization. The optimal penalty factor is obtained by optimizing IGWO. Decomposition yields... An intrinsic mode function (IMF) component with different frequency scale characteristics ranging from high to low frequency, and a residual component Res representing the overall trend.

[0032] Interpretatively, VMD extracts modes by solving a constrained variational problem; its core is to find... The method identifies the modal functions and their respective center frequencies, minimizing their total bandwidth. This step is one of the core innovations of the technical solution in this invention, aiming to adaptively find the optimal parameter combination for VMD through an intelligent optimization algorithm. The goal is to maximize the decomposition effect. The optimization objectives are the number of mode decompositions K and the quadratic penalty factor in the VMD algorithm. .

[0033] Furthermore, the fitness function uses the root mean square error (RMSE) of the final prediction model (PatchTST) on the validation set as the fitness function for the IGWO algorithm. This setup constructs an end-to-end optimization closed loop from decomposition to prediction, ensuring that the selection of VMD parameters directly serves the goal of improving the final prediction accuracy.

[0034] Specifically, the formula for calculating RMSE is: ; in, It is the actual value. is the model's predicted value, and N is the number of samples.

[0035] The optimization process in this embodiment of the invention includes: setting parameters such as the population size and maximum number of iterations of the IGWO. The gray wolf population is initialized, where the position of each gray wolf represents a group. Candidate solutions. In each iteration, for each individual gray wolf, use the one it represents. The parameters undergo VMD decomposition and, combined with selected weather factor features, complete the subsequent prediction process, calculating the prediction error (i.e., fitness value). IGWO updates the positions of Alpha, Beta, and Delta wolves in real time based on the fitness values ​​of the gray wolf population, and guides the entire population towards the optimal solution (lowest RMSE) through global exploration and local development based on its unique encirclement, hunting, and attack mathematical model. The optimization process terminates after reaching the maximum number of iterations; the position of the Alpha wolf with the lowest fitness value at this point represents the globally optimal parameter combination. .

[0036] Step 3, decompose all the results obtained in Step 2. Each subsequence is aligned and spliced ​​with the selected external meteorological features in the time dimension to construct a multi-channel input matrix.

[0037] Specifically, for each training sample, a time sequence segment is constructed according to the set input sequence length (i.e., time step W), ultimately forming a three-dimensional input tensor of shape [B, W, C], where B is the batch size, W is the time step (window size), and C is the number of channels (Channels equal to...). ).

[0038] Step 4: Input the constructed multi-channel input tensor into the PatchTST model for training and prediction to achieve photovoltaic power generation capacity prediction.

[0039] In a specific exemplary technical solution, the PatchTST model includes: Patching & Embedding: The model first divides the time series of each channel (of length W) into multiple non-overlapping "patches" of fixed length S. Each "patch" is treated as an independent token and mapped to a D-dimensional embedding vector through a fully connected layer.

[0040] Transformer Encoder: The embedded patch sequence is fed into a standard Transformer encoder. This encoder consists of multiple identical layers stacked together, each layer containing two core submodules: The calculation process of multi-head self-attention is shown in the following formula: ; Where Q, K, and V represent the query, key, and value matrices, respectively, which are obtained by linear transformation of the embedding vector; The dimension of the key vector is used for scaling to prevent the inner product from becoming too large; This represents the normalized exponential function used to calculate attention weights, ensuring that the sum of all weights equals 1. This represents the multiplication of the query matrix and the transpose of the key matrix, used to calculate the correlation between time steps; The output matrix representing the attention mechanism is obtained by weighted summation. get.

[0041] A feed-forward network is a simple network consisting of two linear layers and an activation function.

[0042] Each submodule employs residual connections and layer normalization.

[0043] Finally, the output of a complete encoder layer can be represented as: ; ; In the formula, The hidden representation matrix represents the input feature sequence. This represents the intermediate feature matrix after processing by the multi-head attention mechanism. This represents the output feature matrix after processing by the feedforward neural network and layer normalization. This represents a multi-head attention mechanism function used to capture the correlation between different time slices. This represents a feedforward fully connected network used for feature nonlinear transformation. The representation layer normalization operation is used to stabilize the training process and accelerate convergence.

[0044] This structure can capture the dependencies between different "patches," thereby learning patterns in time series over a longer time span.

[0045] Forecasting Head: The output of the Transformer encoder (representing highly condensed feature information of the input sequence) passes through a final linear layer (forecasting head) and is directly mapped to the time step that needs to be predicted in the future, generating the final prediction result.

[0046] In summary, the technical solution provided by the embodiments of the present invention obtains the photovoltaic power generation capacity prediction result through data collection and preprocessing; external feature screening based on Pearson correlation coefficient; optimization of VMD decomposition parameters using IGWO; VMD signal decomposition based on optimized parameters; multi-channel input construction; prediction based on PatchTST model.

[0047] Please see Figure 3 In existing technical solutions, the technical process of the photovoltaic power generation capacity prediction method based on the combination of variational mode decomposition (VMD) and long short-term memory network (LSTM) (referred to as VMD-LSTM) is generally as follows: First, the VMD algorithm is used to decompose the original, non-stationary photovoltaic power time series into several intrinsic mode functions (IMFs) with finite bandwidths and a residual component. Interpretally, VMD has better performance in suppressing mode mixing than methods such as EMD, and can effectively separate fluctuation components of different frequencies and scales.

[0048] Then, for each IMF subsequence and residual sequence obtained from the decomposition, an independent LSTM model is built and trained. Through its unique gating mechanism, the LSTM model can learn and memorize the temporal dependencies in each subsequence. Finally, the prediction results of all independent LSTM models for each subsequence are linearly summed to obtain the final predicted value of future photovoltaic power generation.

[0049] The aforementioned "decompose first, then predict, then integrate" approach improves the accuracy of the prediction model to some extent by reducing the complexity of the original sequence. Although the VMD-LSTM method has achieved some success in photovoltaic prediction, it still has several core shortcomings that urgently need to be addressed: (1) The selection of VMD parameters is blind and subjective: The performance of the VMD algorithm is highly dependent on the setting of two key parameters: the mode decomposition number K and the quadratic penalty factor. α In existing VMD-LSTM methods, these two parameters are typically set manually based on researchers' experience or through time-consuming grid searches. This approach lacks adaptability and makes it difficult to find the optimal parameter combination for different datasets. Inappropriate parameter settings can lead to mode aliasing (features of multiple different scales are assigned to the same mode) or over-decomposition (features of the same scale are assigned to different modes), severely impacting the decomposition effect and the final prediction accuracy.

[0050] (2) The decomposition and prediction processes are isolated from each other: In the VMD-LSTM framework, VMD decomposition exists as an independent step in data preprocessing. The quality of the decomposition process cannot be adjusted based on feedback from the final prediction results. In other words, the goal of selecting VMD parameters is "to decompose well" rather than "to make the final prediction more accurate". This leads to a lack of synergistic optimization between the decomposition and prediction steps, which limits the upper limit of the overall model performance.

[0051] (3) Limitations of the prediction model itself: Although LSTM is good at processing time series, its recurrent structure makes it difficult to perform parallel computation and has low training efficiency. In addition, the standard LSTM model has limited ability to capture the "segmentation" characteristics in time series (i.e. the relationship between different time segments), while some newer attention-based models (such as Transformer) have shown greater potential in this regard.

[0052] In view of the above, the technical solution of this invention aims to solve the problems existing in photovoltaic power generation capacity prediction technology, such as VMD decomposition parameters relying on human experience, poor adaptability, and the disconnect between the decomposition and prediction processes, lacking a collaborative optimization mechanism. Specifically, this invention proposes a short-term photovoltaic power generation capacity prediction scheme that deeply integrates the improved Grey Wolf Optimization Algorithm (IGWO), Variational Mode Decomposition (VMD), and the PatchTST prediction model. Its purpose is to construct an integrated closed-loop framework of "optimization-decomposition-prediction," adaptively determining the optimal parameter combination for VMD through intelligent optimization algorithms, and utilizing a more advanced time series prediction model, thereby significantly improving the accuracy, robustness, and automation level of photovoltaic power generation capacity prediction.

[0053] Please see Figure 4 In this specific embodiment of the invention, the experimental data comes from a publicly available dataset on the DKASC website. The selected data is complete historical data from 2019, including photovoltaic power generation, temperature, relative humidity, and GHI, with a time resolution of 5 minutes, which can accurately reflect the temporal characteristics of photovoltaic power generation and changes in the external environment. The experimental data is divided into three parts in a 3:1:1 ratio: training data, validation data, and test data. This experiment sets the input sequence length of the model to 96 and the output sequence length to 96, in order to achieve effective prediction of the photovoltaic power generation level for the next day. Figure 4 The results of the training set after decomposition are shown, and it can be seen that the original non-stationary time series was successfully decomposed into several IMFs with different frequency characteristics and residual terms.

[0054] Please see Figures 5 to 8To intuitively understand the predictive performance of the IGWO-VMD-PatchTST model, this embodiment of the invention randomly selected four prediction results from the test set, as shown in the figure. As can be seen from the figure, whether it is the stable period or the fluctuating period of photovoltaic power, the prediction curve of the model can always closely follow the actual load curve, demonstrating excellent fitting ability.

[0055] The comparative analysis of the embodiments of the present invention shows that the IGWO-VMD-PatchTST model has higher accuracy and performs the best among the compared models. The results are shown in Table 1.

[0056] Table 1. Prediction results of different models

[0057] In summary, the technical solution of this invention employs an improved Grey Wolf Optimization (IGWO) algorithm to adaptively optimize the decomposition order of Variational Mode Decomposition (VMD). The PatchTST network is used to perform multi-step parallel predictions on the recombined multimodal features, and the prediction results of each sub-sequence are superimposed according to their original weights to output the final photovoltaic power output prediction value. Specifically, the technical solution of this invention effectively solves the problems of subjective parameter selection and the disconnect between decomposition and prediction processes in traditional methods by constructing an integrated "optimization-decomposition-prediction" framework and using the IGWO algorithm to adaptively optimize VMD parameters. Compared to the baseline model, this invention not only significantly improves the prediction accuracy and robustness of photovoltaic power generation capacity but also automates model construction, enhancing the practicality and generalization ability of the solution.

[0058] The following are embodiments of the apparatus of the present invention, which can be used to execute embodiments of the method of the present invention. For details not disclosed in the apparatus embodiments, please refer to the embodiments of the method of the present invention.

[0059] Please see Figure 9 In this embodiment of the invention, a photovoltaic power generation capacity prediction model training system is provided, comprising: The data acquisition unit is used to acquire historical photovoltaic power sequences and candidate meteorological feature sequences based on the historical power output data of the target photovoltaic power plant and various meteorological data of the same period. The signal decomposition unit is used to perform signal decomposition on historical photovoltaic power sequences using the Variational Mode Decomposition (VMD) algorithm to obtain... A subsequence; wherein, during signal decomposition, the optimal parameter combination found by the improved Grey Wolf Optimization Algorithm (IGWO) is used. Decompose it, among which The optimal number of decomposition layers obtained by IGWO optimization. The optimal penalty factor obtained by IGWO optimization; The specific subsequences are as follows: One intrinsic mode function component and one residual component; The sample acquisition unit is used to obtain... Each subsequence is aligned and spliced ​​with the external meteorological features selected based on each candidate meteorological feature sequence in the time dimension to obtain a multi-channel input tensor; The training unit is used to train the PatchTST model using multi-channel input tensors as training samples, and the trained PatchTST model is used as a photovoltaic power generation capacity prediction model.

[0060] In one embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used to execute the operation of a photovoltaic power generation capacity prediction model training method.

[0061] In one embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the operating system of the terminal. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor, which can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the photovoltaic power generation capacity prediction model training method in the above embodiments.

[0062] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) containing computer-usable program code.

[0063] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0064] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0065] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0066] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for training a photovoltaic power generation capacity prediction model, characterized in that, Includes the following steps: Based on the historical power output data of the target photovoltaic power plant and various meteorological data from the same period, historical photovoltaic power sequences and candidate meteorological feature sequences are obtained. The variational mode decomposition (VMD) algorithm was used to decompose the historical photovoltaic power sequence into signals to obtain... A subsequence; wherein, during signal decomposition, the optimal parameter combination found by the improved Grey Wolf Optimization Algorithm (IGWO) is used. Decompose it, among which The optimal number of decomposition layers obtained by IGWO optimization. The optimal penalty factor obtained by IGWO optimization; The specific subsequences are as follows: One intrinsic mode function component and one residual component; The result Each subsequence is aligned and spliced ​​with the external meteorological features selected based on each candidate meteorological feature sequence in the time dimension to obtain a multi-channel input tensor; The PatchTST model is trained using multi-channel input tensors as training samples, and the trained PatchTST model is used as a photovoltaic power generation capacity prediction model.

2. The photovoltaic power generation capacity prediction model training method according to claim 1, characterized in that, Find the optimal parameter combination using IGWO During the process, Set the optimization objective to the number of mode decompositions in VMD. and secondary penalty factor Furthermore, the root mean square error (RMSE) of the PatchTST model on the validation set is used as the fitness function of IGWO. In the optimization process, the population size of IGWO, the maximum number of iterations, and the initial gray wolf population are first set, with each gray wolf's individual position representing a group. Candidate solutions; in each subsequent iteration, for each individual gray wolf, use the one it represents. The parameters are decomposed into VMD and combined with external meteorological features for prediction. The prediction error is calculated and used as the fitness value. The positions of Alpha, Beta and Delta wolves are updated according to the fitness value of the gray wolf population. The entire population is guided to conduct global exploration and local development in the direction of the lowest RMSE based on the mathematical model of encirclement, hunting and attack. The optimization process terminates after reaching the maximum number of iterations. At this point, the position of the Alpha wolf with the lowest fitness value is the optimal parameter combination. .

3. The photovoltaic power generation capacity prediction model training method according to claim 1, characterized in that, In the process of selecting external meteorological features based on each candidate meteorological feature sequence First, the Pearson correlation coefficient between the historical photovoltaic power series and each candidate meteorological feature series is calculated. Then, a correlation analysis is performed based on the calculation results. Finally, based on the correlation analysis results, several external meteorological features with the highest absolute correlation values ​​are selected.

4. The photovoltaic power generation capacity prediction model training method according to claim 3, characterized in that, The selected external meteorological features include temperature, relative humidity, and global horizontal irradiance.

5. The photovoltaic power generation capacity prediction model training method according to claim 1, characterized in that, The specific steps for obtaining historical photovoltaic power sequences and candidate meteorological feature sequences based on historical power output data of the target photovoltaic power plant and various meteorological data from the same period include: Based on the target photovoltaic power station, historical power output data and various meteorological data from the same period are acquired to form raw data; The raw data is preprocessed by handling missing values, outliers, and normalization to obtain the final historical photovoltaic power sequence and various meteorological characteristic sequences.

6. The photovoltaic power generation capacity prediction model training method according to claim 1, characterized in that, In the application of the photovoltaic power generation capacity prediction model, the time series data to be predicted is first obtained based on the selected external meteorological characteristics, and then the photovoltaic power generation capacity prediction model is used to make predictions, finally obtaining the photovoltaic power generation capacity prediction data corresponding to the time series data to be predicted.

7. A photovoltaic power generation capacity prediction model training system, characterized in that, include: The data acquisition unit is used to acquire historical photovoltaic power sequences and candidate meteorological feature sequences based on the historical power output data of the target photovoltaic power plant and various meteorological data of the same period. The signal decomposition unit is used to perform signal decomposition on historical photovoltaic power sequences using the Variational Mode Decomposition (VMD) algorithm to obtain... A subsequence; wherein, during signal decomposition, the optimal parameter combination found by the improved Grey Wolf Optimization Algorithm (IGWO) is used. Decompose it, among which The optimal number of decomposition layers obtained by IGWO optimization. The optimal penalty factor obtained by IGWO optimization; The specific subsequences are as follows: One intrinsic mode function component and one residual component; The sample acquisition unit is used to obtain... Each subsequence is aligned and spliced ​​with the external meteorological features selected based on each candidate meteorological feature sequence in the time dimension to obtain a multi-channel input tensor; The training unit is used to train the PatchTST model using multi-channel input tensors as training samples, and the trained PatchTST model is used as a photovoltaic power generation capacity prediction model.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the photovoltaic power generation capacity prediction model training method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the photovoltaic power generation capacity prediction model training method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the photovoltaic power generation capacity prediction model training method as described in any one of claims 1 to 6.