A photovoltaic power generation power prediction method based on VMD-ISSA-BiGRU

The BiGRU-Transformer model, optimized by variational mode decomposition and an improved sparrow search algorithm, overcomes the limitations of traditional photovoltaic power generation prediction models in handling long-term dependencies, achieving higher prediction accuracy and engineering applicability, and adapting to dynamic changes in photovoltaic power under complex meteorological conditions.

CN121124032BActive Publication Date: 2026-03-03SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511657044.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-03-03
Estimated Expiration
2045-11-13

AI Technical Summary

Technical Problem

Traditional photovoltaic power generation prediction models have limitations in handling long-term series dependencies. The GRU structure is difficult to fully capture the long-term dynamic changes of photovoltaic power under complex meteorological conditions, and the traditional correlation coefficient method has limited ability to mine high-dimensional nonlinear meteorological features, resulting in low prediction accuracy and poor dynamic processing capabilities.

Method used

We employ variational mode decomposition (VMD) to decompose photovoltaic power sequences, combine Pearson correlation coefficient to screen time-series features, and use an improved sparrow search algorithm (ISSA) to optimize the hyperparameters of the BiGRU-Transformer model. We construct a hybrid deep learning architecture where BiGRU captures local dependencies, Transformer captures global dependencies, and the ISSA optimization strategy is combined to improve model performance.

Benefits of technology

It significantly improves the accuracy and engineering applicability of photovoltaic power generation prediction. By suppressing non-stationarity and noise interference, it enhances the model's global search and generalization capabilities, and adapts to nonlinear dynamic changes under complex meteorological conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121124032B_ABST
    Figure CN121124032B_ABST
Patent Text Reader

Abstract

A photovoltaic power prediction method based on VMD-ISSA-BiGRU relates to the technical field of new energy power generation, comprising: acquiring a photovoltaic power sequence and a meteorological data sequence; performing variational mode decomposition on the photovoltaic power sequence; extracting time sequence features from each intrinsic mode component and the meteorological data sequence, and analyzing the correlation between each time sequence feature and power output; optimizing the hyperparameters of the BiGRU-Transformer model using ISSA; constructing the BiGRU-Transformer model based on the optimized hyperparameters and the retained time sequence features; inputting the intrinsic mode components into the BiGRU-Transformer model for calculation to obtain the prediction values of each component; and performing linear reconstruction on the prediction results of all components to obtain a photovoltaic power prediction sequence; which is used to solve the problems of low traditional prediction accuracy and poor dynamic processing capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of new energy power generation technology, specifically to a photovoltaic power generation prediction method based on VMD-ISSA-BiGRU. Background Technology

[0002] With the rapid development of new energy power globally, solar photovoltaic power generation has been widely used in power systems due to its safety, efficiency, and cleanliness. However, photovoltaic power output exhibits significant fluctuations, intermittency, and instability, and is significantly affected by weather conditions, posing a severe challenge to the stable operation of the power grid and power dispatch. Therefore, improving the prediction accuracy of photovoltaic power generation has become a key technical issue for ensuring power system security and optimizing energy allocation.

[0003] Significant progress has been made in photovoltaic power generation forecasting research over the past few decades, especially with the development of artificial intelligence and optimization algorithms, leading to data-driven forecasting methods becoming mainstream. Currently, various models have been proposed and applied to photovoltaic power forecasting. For example:

[0004] The paper "Short-Term Photovoltaic Power Forecasting Based on VMD and ISSA-GRU" published in the *IEEE Open Access Journal of Power and Energy* (2021, 9: 105939–105950) describes a method that reduces the non-stationarity of the original power series through VMD (Variational Mode Decomposition), filters meteorological factors using Pearson and Spearman correlation coefficients, and optimizes the GRU (Gated Recurrent Unit) hyperparameters using ISSA (Improved SparrowSearch Algorithm) to improve prediction accuracy. However, this model has limitations in handling long-term series dependencies. The GRU structure struggles to fully capture the long-term dynamic changes of photovoltaic power under complex meteorological conditions, and traditional correlation coefficient methods have limited ability to mine high-dimensional nonlinear meteorological features.

[0005] The paper "A novel integrated photovoltaic power forecasting model based on variational mode decomposition and CNN-BiGRU considering meteorological variables" (published in *Electric Power Systems Research*, 2022, 213, 108796) extracts deep features between meteorological factors and power using a convolutional neural network (CNN) and captures temporal dependencies using a bidirectional gated recurrent unit (BiGRU). While this model performs well in local feature extraction, its ability to model long-term dependencies remains insufficient. Furthermore, the lack of intelligent optimization algorithms for hyperparameter tuning makes it prone to getting trapped in local optima, affecting its generalization ability and prediction accuracy.

[0006] Therefore, we propose a forecasting method that can improve forecast accuracy and engineering applicability. Summary of the Invention

[0007] The purpose of this invention is to provide a photovoltaic power generation prediction method based on VMD-ISSA-BiGRU, which solves the problems of low prediction accuracy and poor dynamic processing capability of traditional methods.

[0008] This invention is achieved through the following technical solution:

[0009] A photovoltaic power generation prediction method based on VMD-ISSA-BiGRU specifically includes:

[0010] Acquire photovoltaic power sequences and meteorological data sequences, divide the raw data into training, validation and test sets in an 8:1:1 ratio, and preprocess the data;

[0011] Variational mode decomposition was performed on the photovoltaic power sequence to obtain eight intrinsic mode components;

[0012] For each intrinsic mode component and meteorological data sequence, time series features are extracted, and Pearson correlation coefficient is used to analyze the correlation between each time series feature and power output, retaining time series features with an absolute value of correlation coefficient greater than 0.3;

[0013] The hyperparameters of the BiGRU-Transformer model were optimized using ISSA.

[0014] Based on the optimized hyperparameters and the preserved temporal features, a BiGRU-Transformer model is constructed.

[0015] The eight intrinsic mode components are input into the BiGRU-Transformer model for calculation to obtain the predicted values ​​of each component.

[0016] The prediction results of all components are linearly reconstructed to obtain the photovoltaic power prediction sequence.

[0017] Furthermore, the process of optimizing the hyperparameters of the BiGRU-Transformer model using ISSA is as follows:

[0018] S1. Set the ISSA algorithm parameters, determine the hyperparameters to be optimized and their search range, and define the fitness function;

[0019] S2. Use Circle chaotic mapping to generate the initial sparrow population;

[0020] S3. Set the current iteration number ;

[0021] S4. For each individual in the population, construct a BiGRU-Transformer model using the hyperparameter combination it represents, and compute its fitness value on the validation set;

[0022] S5. Sort the current population according to fitness values, assign the top 20% with the best fitness as discoverers, and the rest as followers. Then, according to the warning mechanism, randomly select 10% of the individuals in the population as scouts.

[0023] S6. Update the positions of the discoverer, follower, and scout respectively, and check the positions of all newly generated individuals to ensure that they do not exceed the preset hyperparameter search range;

[0024] S7. Compare the fitness values ​​of all individuals. If there is an individual that is better than the current global optimum, then update the optimum and its corresponding optimum fitness.

[0025] S8. Order ,like If the result is positive, return to S4; otherwise, terminate the iteration and output the global historical best position.

[0026] Furthermore, the initial sparrow population is generated using the Circle chaotic mapping, and the calculation formula is as follows:

[0027]

[0028] In the formula, For the first The chaotic mapping value of the second time; This represents the number of iterations. , , For control coefficients; This is the remainder function.

[0029] Furthermore, the location update mechanism for the discoverer is calculated using the following formula:

[0030]

[0031] In the formula, For the first The discoverer's position in the next iteration; The total number of discoverers; A random number between 0 and 1; This represents the maximum number of iterations. Random numbers that satisfy a normal distribution; For all elements equal to 1 matrix; This is a warning value; This is the safety threshold.

[0032] Furthermore, a strategy of non-linear decreasing weights is introduced to optimize the location update mechanism of the discoverer. The specific formula is as follows:

[0033]

[0034]

[0035] in, For the first The discoverer was in the first Position on the dimension To update the weights, This indicates the current iteration number.

[0036] Furthermore, the Levy flight strategy is used to optimize the location update mechanism of the discoverer. The specific formula is as follows:

[0037]

[0038] in, This indicates the location of the discoverer after optimization using the Levy flight strategy. This indicates the discoverer's position after optimization using non-linear decreasing weights. This indicates the step size control parameter. This represents the current optimal solution. Indicates the search path, satisfying The Levy flight path was obtained using the Mantegna algorithm:

[0039]

[0040] in, and It is a random variable that follows a normal distribution; For stability parameters; for Standard deviation; This is a gamma function.

[0041] Furthermore, the position update mechanism of the follower is calculated using the following formula:

[0042]

[0043] In the formula, For the first The position of the follower in the next iteration. For the first The worst position of the follower in the next iteration; For the first The optimal position of the follower in the next iteration; for A matrix, where the matrix elements are randomly set to 1 or -1; The total number of followers.

[0044] Furthermore, the position update mechanism of the follower is improved by adopting the Cauchy mutation strategy, specifically as follows:

[0045]

[0046] in, For followers In the The new position on the dimensional, The current iteration number The global optimal position;

[0047] and The standard Cauchy distribution function is as follows:

[0048]

[0049] in, Let be the probability density function of the Cauchy distribution; It is a random variable.

[0050] Furthermore, the location update mechanism of the scout is calculated using the following formula:

[0051]

[0052] In the formula, For the first The scout's optimal position in the next iteration; Random numbers that satisfy a normal distribution; For followers At time step Location; A random number between -1 and 1; This is the current fitness value; For the best global fitness; The worst fitness; It is a very small constant.

[0053] Furthermore, the step of inputting the eight intrinsic mode components into the BiGRU-Transformer model for calculation to obtain the predicted value of each component specifically includes:

[0054] The BiGRU part captures the local dependencies of temporal features in a certain intrinsic mode component;

[0055]

[0056] In the formula, and Let represent the hidden states of the BiGRU network at time steps t and i, respectively; Represents the forward hidden state sequence, Represents the reverse hidden state sequence;

[0057] Input the processed result into the Transformer section;

[0058] The Transformer part captures the global dependencies of temporal features in the intrinsic modal components to obtain the predicted values.

[0059] The technical solution of the present invention has at least the following advantages and beneficial effects:

[0060] This invention discloses a photovoltaic power generation prediction method based on VMD-ISSA-BiGRU. By combining variational mode decomposition with the BiGRU-Transformer hybrid model, a complete "decomposition-prediction-reconstruction" prediction framework is constructed. Furthermore, VMD effectively suppresses the non-stationarity and noise interference of the original photovoltaic power sequence. The BiGRU-Transformer model fully leverages the synergistic advantages of BiGRU (Bidirectional Gated Recurrent Unit) in capturing local temporal dependencies and Transformer (converter model) in capturing global long-term dependencies, thereby enabling more accurate modeling of the nonlinear dynamic changes of photovoltaic power under complex meteorological conditions.

[0061] Furthermore, ISSA is used to automatically optimize the hyperparameters of the BiGRU-Transformer model, overcoming the shortcomings of traditional manual parameter tuning, which is highly subjective and prone to getting trapped in local optima. Moreover, ISSA significantly enhances the algorithm's global search capability, convergence speed, and population diversity through improvements such as Circle chaotic mapping initialization, nonlinear decreasing weights, Levy flight strategy, and Cauchy mutation strategy. This enables the algorithm to adaptively find the optimal combination of hyperparameters, further improving model performance and enhancing the engineering adaptability of the method.

[0062] Furthermore, by using the Pearson correlation coefficient to screen highly correlated time-series features, the data dimensionality and computational complexity are effectively reduced, while key influencing factors are retained, thus improving model training efficiency and generalization ability. Attached Figure Description

[0063] Figure 1 This is a flowchart of a photovoltaic power generation prediction method based on VMD-ISSA-BiGRU according to the present invention;

[0064] Figure 2 This is a diagram of the bidirectional GRU network structure of the present invention;

[0065] Figure 3 This is a diagram showing the random population distribution and Circle chaotic mapping distribution of the present invention;

[0066] Figure 4 This is a schematic diagram of the Levy flight of the present invention. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0068] Example 1

[0069] like Figure 1 The photovoltaic power generation prediction method based on VMD-ISSA-BiGRU shown here specifically includes:

[0070] Acquire photovoltaic power sequences and meteorological data sequences, divide the raw data into training, validation and test sets in an 8:1:1 ratio, and preprocess the data;

[0071] The meteorological data series includes total irradiance, ambient temperature, time, wind speed, and humidity, while the preprocessing process involves filling in missing values, removing outliers, and normalizing the data.

[0072] Variational mode decomposition was performed on the photovoltaic power sequence to obtain eight intrinsic mode components;

[0073] The parameters for variational mode decomposition are set as follows: number of decomposition levels. Punishment factor Noise tolerance DC component The purpose of variational mode decomposition is to suppress non-stationarity and noise interference.

[0074] For each intrinsic mode component and meteorological data sequence, time series features are extracted, and Pearson correlation coefficient is used to analyze the correlation between each time series feature and power output, retaining time series features with an absolute value of correlation coefficient greater than 0.3;

[0075] Extracting temporal features can be achieved using methods such as first-order difference, sliding window mean (window size 4), and temporal lag term (lag=3).

[0076] The hyperparameters of the BiGRU-Transformer model were optimized using ISSA.

[0077] First, it effectively overcomes the shortcomings of traditional manual parameter tuning, which is highly subjective and prone to getting trapped in local optima. Second, ISSA significantly enhances the algorithm's global search capability, convergence speed, and population diversity through improvements such as Circle chaotic mapping initialization, nonlinear decreasing weights, Levy flight strategy, and Cauchy mutation strategy. This enables it to adaptively find the optimal combination of hyperparameters, further improving model performance and enhancing the engineering adaptability of the method.

[0078] Based on the optimized hyperparameters and the preserved temporal features, a BiGRU-Transformer model is constructed.

[0079] This model is a hybrid deep learning architecture that deeply integrates bidirectional gated recurrent units (BiGRU) and Transformer encoders. It is specifically designed for the strong volatility, intermittency and nonlinear characteristics of photovoltaic power sequences that are highly dependent on meteorological factors. It can collaboratively capture local fine-grained temporal dependencies and global long-range feature associations in the sequence.

[0080] The BiGRU-Transformer model comprises a BiGRU part and a Transformer part. BiGRU is an optimized structure for traditional recurrent neural networks (RNNs). Traditional RNNs struggle to effectively learn long-range dependencies when analyzing sequential data, while BiGRU alleviates this problem to some extent by introducing a gating mechanism to regulate information transmission. The GRU unit mainly includes two key structures: an update gate and a reset gate. The update gate controls the extent to which hidden state information from the previous time step is passed to the current state, used to capture long-term dependencies; the reset gate controls the influence of the previous state on the current candidate state, helping to capture short-term fluctuations or abrupt changes. In photovoltaic forecasting, BiGRU can effectively handle time-series inputs such as irradiance, temperature, wind speed, and historical power, capturing their dynamic characteristics over time.

[0081] Therefore, BiGRU adopts a bidirectional architecture based on GRU, simultaneously capturing historical and future information through two independent GRU networks: a forward GRU and a backward GRU. The forward GRU processes the input sequence in chronological order, gradually accumulating historical information; the backward GRU processes the same sequence in reverse chronological order, pointing from "future" to "past," effectively supplementing the subsequent contextual dependencies that the forward network did not fully capture. Finally, the forward and backward hidden states at each time step are concatenated or weighted and fused to form a joint hidden state output containing more comprehensive temporal features. This structure is particularly suitable for photovoltaic power generation prediction because it can simultaneously model the past evolution and future trends of meteorological factors (such as cloud movement and gradual changes in illumination), improving the ability to perceive complex weather changes and patterns such as diurnal and seasonal cycles.

[0082] In addition, a BiGRU network consisting of a two-layer GRU network, such as Figure 2 As shown, this model can capture bidirectional information from the past and future, providing richer feature representations for photovoltaic power generation prediction. The forward GRU processes the input sequence in a forward-looking manner, while the backward GRU processes the information in reverse order. The output of the entire network is ultimately generated from the forward and backward outputs, as described below:

[0083]

[0084] In the formula, Represents the forward hidden state sequence, The model represents the reverse hidden state sequence. The input layer receives multi-dimensional temporal features, including historical power data from the photovoltaic power plant, real-time irradiance, ambient temperature, humidity, wind speed, wind direction, and meteorological parameters such as cloud cover. These parameters are standardized and input step-by-step. Each gating unit in the GRU hidden layer calculates the gating signal and candidate state based on the current input (e.g., irradiance and temperature at time t) and the previous hidden state. The bidirectional GRU further extracts higher-level temporal features through a two-layer structure: the first-layer GRU learns local time dependencies and instantaneous fluctuations, while the second layer captures longer-term periodic and trend patterns. Finally, the hidden state sequence output by the BiGRU (i.e., the concatenation of forward and reverse states) contains rich temporal dynamic features from the photovoltaic power generation data, such as short-term fluctuations, responses to sudden weather changes, solar radiation intensity changes, and equipment operating status, providing robust feature representations for the subsequent Transformer module.

[0085] The Transformer, a deep learning model proposed by Google in 2017, uses a self-attention mechanism at its core to generate representations of input and output, gradually replacing traditional convolutional neural networks (CNNs) and recurrent neural networks (RNNs). This mechanism can capture the dependencies between any two elements in a sequence and supports parallel processing of the entire sequence, thus significantly improving computational efficiency. The model employs an encoder-decoder architecture, mainly including input embedding, output embedding, positional encoding, a multi-head self-attention module, and a feedforward neural network.

[0086] In photovoltaic (PV) power prediction, the Transformer model first maps input data, including PV power sequences, meteorological observation data, and temporal features, into high-dimensional vectors through an input embedding layer, and introduces positional encoding to preserve temporal sequence information. Utilizing a multi-head self-attention mechanism in the encoder, it computes the global correlations between features at different time steps in parallel, identifying the potential impact of key meteorological events such as persistent cloudy weather and sudden gusts on power generation, and outputting a high-dimensional feature representation that integrates global contextual information. The decoder then generates future power prediction sequences based on the encoded features, using either autoregressive or non-autoregressive methods. Finally, the prediction result is obtained through a linear output layer. This structure not only simultaneously models the complex interaction between historical power data and future meteorological conditions but also possesses stronger temporal feature extraction capabilities and higher computational efficiency, making it suitable for accurate prediction of highly volatile PV power generation.

[0087] Combining BiGRU with Transformer leverages the strengths of both. Transformer excels at capturing global dependencies, while BiGRU handles local dependencies better. This combination enables more effective modeling and prediction of photovoltaic power sequence data.

[0088] Furthermore, the BiGRU-Transformer model can incorporate Adaptive Temporal Embedding to encode the raw photovoltaic power data at different time scales (such as daily or seasonal cycles), further enhancing the model's ability to represent the temporal patterns of photovoltaic power and improving the temporal feature vector. The description is as follows:

[0089]

[0090] In the formula This is the normalized time offset; Encoding the daily cycle pattern; Encoding monthly cycle patterns; Encoding the annual cycle pattern;

[0091] In addition, to address the nonlinear characteristics of photovoltaic power sequences, such as strong volatility, intermittency, and high dependence on meteorological factors, the project introduced a Meteorological Attention Module. This module explicitly models the nonlinear relationship between meteorological factors and photovoltaic power output by weighted fusion of meteorological factors, where the attention weights of each meteorological factor are... The photovoltaic power sequence data was obtained through a gated network calculation. The specific calculation process is as follows:

[0092]

[0093] In the formula, This indicates the historical photovoltaic power sequence after BiGRU encoding at the current time step. The hidden state contains the temporal characteristics of historical power generation; Indicates the current time step The raw meteorological data vector typically includes multiple meteorological factors such as temperature, irradiance, humidity, wind speed, and cloud cover. This indicates a vector concatenation operation that fuses power features and meteorological features into a joint representation. The weights and biases are for the first-level linear transformation. For example, activation functions (such as ReLU); The weights and biases for the second-level linear transformation; The Sigmoid activation function compresses the output to the [0,1] interval, representing the importance weight of each meteorological factor; This is the final generated meteorological attention weight vector, whose dimensions are the same as those of the meteorological data. Consistent, each element corresponds to a weight of a meteorological factor. Ultimately, the weighted meteorological representation... It is obtained by multiplying the raw meteorological data element-wise with the attention weights:

[0094]

[0095] In the formula This refers to raw meteorological data (such as temperature, cloud cover, etc.).

[0096] Finally, the IMF component characteristics and weighted meteorological characterization were combined. and time feature vector The input features are concatenated to form enhanced input features, which are then fed into the Transformer encoder. This design enables the model to adaptively adjust its attention to various meteorological factors based on the current power generation status, significantly improving the robustness of predictions under complex weather conditions. Furthermore, the temporal embedding explicitly provides multi-scale periodic information such as daily, monthly, and yearly data, allowing the model to fully utilize the temporal patterns of photovoltaic power generation and improve the accuracy of predictions for periodic fluctuations.

[0097] As needed, the parameters of the ISSA-optimized BiGRU-Transformer model are set as follows:

[0098] BiGRU layer: Number of layers: 2, Number of hidden units per layer: 128, Output feature dimension: 256 (after bidirectional concatenation).

[0099] Transformer encoder: Number of layers: 2, Number of attention heads: 8, Feed-Forward Dimension: 512.

[0100] Output layer: Fully connected layer (Linear activation), with an output dimension of 1 (power prediction value).

[0101] Training parameters: Optimizer: Adam, Learning rate (lr): 0.001, Momentum parameter: , Batch Size: 64, Number of Epochs: 200.

[0102] Early Stopping: Monitor the validation set loss and terminate training if it does not decrease for 15 consecutive rounds to prevent overfitting.

[0103] Loss function: Mean Squared Error (MSE), used for gradient backpropagation.

[0104] The eight intrinsic mode components are input into the BiGRU-Transformer model for calculation to obtain the predicted values ​​of each component. The specific process is as follows:

[0105] The BiGRU part captures the local dependencies of temporal features in a certain intrinsic mode component. The specific calculation formula is as follows:

[0106]

[0107] In the formula, and These represent the hidden states of the BiGRU network at time steps t and i, respectively, containing the sequence information learned by the network up to the current time step; Represents the forward hidden state sequence, Represents the reverse hidden state sequence;

[0108] Input the processed result into the Transformer section;

[0109] The Transformer part captures the global dependencies of temporal features in the intrinsic modal components to obtain the predicted values.

[0110] The prediction results of all components are linearly reconstructed to obtain the photovoltaic power prediction sequence.

[0111] Example 2

[0112] As an example, due to the significant volatility, intermittency, and nonlinearity of photovoltaic power sequences, and their high dependence on meteorological factors such as irradiance, temperature, and humidity, traditional parameter optimization methods struggle to adapt to their complex time-varying characteristics and are prone to getting trapped in local optima. Sparrow Search Algorithm (SSA), a group optimization algorithm that simulates the foraging behavior of sparrows, achieves global optimization through a cooperative and competitive mechanism among three types of individuals: discoverers, followers, and scouts. Therefore, several improved strategies are introduced based on the traditional SSA (Sparrow Search Algorithm), forming the Improved Sparrow Search Algorithm (ISSA), making it more suitable for photovoltaic power prediction scenarios.

[0113] In photovoltaic power generation prediction, ISSA is used to optimize the hyperparameters of the BiGRU-Transformer model, such as the number of network layers, hidden units, learning rate, and number of attention heads, to improve prediction accuracy and generalization ability. In ISSA, the position of an individual in a sparrow population represents a set of hyperparameter combinations to be optimized. The sparrow population includes: discoverers, representing the current better hyperparameter configuration, responsible for guiding the population to search for better regions; followers, representing suboptimal configurations, which are further optimized by learning and following discoverers; and scouts, responsible for escaping local optima and avoiding premature convergence.

[0114] In addition, ISSA is used to optimize the hyperparameters of the BiGRU-Transformer model. The specific process is as follows:

[0115] S1. Set the ISSA algorithm parameters, determine the hyperparameters to be optimized and their search range, and define the fitness function;

[0116] S2. Use Circle chaotic mapping to generate the initial sparrow population;

[0117] S3. Set the current iteration number ;

[0118] S4. For each individual in the population, construct a BiGRU-Transformer model using the hyperparameter combination it represents, and compute its fitness value on the validation set;

[0119] S5. Sort the current population according to fitness values, assign the top 20% with the best fitness as discoverers, and the rest as followers. Then, according to the warning mechanism, randomly select 10% of the individuals in the population as scouts.

[0120] S6. Update the positions of the discoverer, follower, and scout respectively, and check the positions of all newly generated individuals to ensure that they do not exceed the preset hyperparameter search range;

[0121] S7. Compare the fitness values ​​of all individuals. If there is an individual that is better than the current global optimum, then update the optimum and its corresponding optimum fitness.

[0122] The fitness function is the prediction error of the BiGRU-Transformer model on the validation set. Therefore, the optimization objective is to minimize the mean squared error (MSE) on the validation set. The hyperparameters to be optimized include: number of BiGRU layers [1,2,3], number of BiGRU hidden units [64,128,256], number of Transformer encoder layers [1,2], number of attention heads [4,8,16], feedforward network dimension [256,512,1024], and learning rate [0.0001,0.001,0.01].

[0123] S8. Order ,like If the result is positive, return to S4; otherwise, terminate the iteration and output the global historical best position.

[0124] Furthermore, since the Sparrow Search algorithm uses a random generation method during population initialization, it is prone to uneven and homogeneous initial population distribution, reducing the algorithm's optimization efficiency. Therefore, introducing a Circle chaotic sequence for population initialization can make the initial population distribution of the Sparrow Search algorithm more uniform, ensure the traversal of optimization results, and improve the convergence speed of the algorithm in the early stages. The specific calculation formula is as follows:

[0125]

[0126] In the formula, For the first The chaotic mapping value of the second time; This represents the number of iterations. , , For control coefficients; As the modulo function is used, it can be seen that adding the Circle chaotic map can enhance the diversity of the SSA population (i.e., the breadth of hyperparameter combinations, avoiding getting trapped in local optima) and improve the global solution capability of the SSA algorithm. A comparison of the random population distribution and the Circle chaotic map distribution is shown below. Figure 3 As shown in the figure, (a) is the random population distribution and (b) is the Circle chaotic mapping distribution. Compared with the random mapping distribution, adding the Circle chaotic mapping can distribute the SSA population more evenly, making the distribution of individuals in the population more uniform, avoiding local clustering, and reducing the possibility of SSA getting trapped in local optima.

[0127] The location update mechanism for the discoverer, as needed, is calculated using the following formula:

[0128]

[0129] In the formula, For the first The discoverer's position in the next iteration; The total number of discoverers; A random number between 0 and 1; This represents the maximum number of iterations. Random numbers that satisfy a normal distribution are used to introduce random perturbations; For all elements equal to 1 Matrix is ​​used for dimension alignment; This is a warning value used to simulate environmental risks (i.e., increased prediction errors caused by factors such as sudden weather changes). The safety threshold represents the level of environmental safety (i.e., the prediction error is within an acceptable range).

[0130] Furthermore, since the position update of the discoverer often uses a fixed weight during the iteration process of SSA, this may cause the algorithm to converge prematurely to a local optimum rather than a global optimum. Therefore, to overcome this defect, a non-linear decreasing weight strategy is introduced to optimize the position update mechanism of the discoverer, enabling it to search the solution space more broadly and avoid falling into the trap of local optima. The specific formula is as follows:

[0131]

[0132]

[0133] in, For the first The discoverer was in the first Position on the dimension To update the weights, This indicates the current iteration number. As the iteration number increases, the weight gradually decreases non-linearly. That is, in the later stages of the search, the scope of the discoverer gradually narrows and shifts to a more refined local search, so as to more accurately locate the vicinity of the global optimum.

[0134] Furthermore, while introducing a nonlinear decreasing weight strategy into the position update formula can improve convergence, such an algorithm may still get stuck in local optima when dealing with high-dimensional complex problems. Therefore, combining the characteristics of Levy flight—long-distance jumps with short-distance fine-grained search—can effectively improve the global search capability of the discoverer. Incorporating the Levy flight term encourages the discoverer to perform large-scale jumps (i.e., move significantly in the solution space to explore a wider area) with a certain probability, thus escaping local optima and improving the randomness and diversity of its solutions. Therefore, the Levy flight strategy is adopted to optimize the position update mechanism of the discoverer. The specific formula is as follows:

[0135]

[0136] in, This indicates the location of the discoverer after optimization using the Levy flight strategy. This represents the discoverer position after optimization using non-linear decreasing weights, i.e. , This indicates the step size control parameter. , This represents the current optimal solution. Indicates the search path, satisfying The Levy flight path was obtained using the Mantegna algorithm:

[0137]

[0138] in, Let be the random step size of Levy's flight. and It is a random variable that follows a normal distribution and is used to generate the Levy flight path using the Mantegna algorithm; It is a normal distribution function. This is a stability parameter, related to the characteristic index of the Levy distribution, and usually takes a value in the range of (0,2], used to control the shape of the Levy distribution; for Standard deviation; It is a gamma function;

[0139] The combination of the Levy flight mechanism and nonlinear decreasing weights enables the algorithm to generate high-quality solutions during the solution process, greatly enhancing the algorithm's search capability. A schematic diagram of the Levy flight is shown below. Figure 4 As shown.

[0140] The position update mechanism of the follower, as required, is calculated using the following formula:

[0141]

[0142] In the formula, For the first The position of the follower in the next iteration. For the first The worst position of the follower in the next iteration; For the first The optimal position of the follower in the next iteration; for A matrix, where the matrix elements are randomly set to 1 or -1; The total number of followers.

[0143] In addition, the position update mechanism of the follower is improved by adopting the Cauchy mutation strategy, specifically as follows:

[0144]

[0145] in, For followers In the The new position on the dimension represents the updated position of the follower individual after the Cauchy mutation. The current iteration number The global optimal position represents the best hyperparameter combination found so far;

[0146] and The standard Cauchy distribution function is as follows:

[0147]

[0148] in, Let be the probability density function of the Cauchy distribution; The variable is a random variable; the Cauchy distribution is introduced to generate the variant, which enhances the diversity and global exploration capability of the algorithm, thus allowing the algorithm to flexibly switch between fine-grained search in a small range and large-scale leap exploration.

[0149] The location update mechanism for the scouts, as needed, is calculated using the following formula:

[0150]

[0151] In the formula, For the first The scout's optimal position in the next iteration; Random numbers that satisfy a normal distribution; For followers At time step Location; A random number between -1 and 1; This is the current fitness value; For the best global fitness; The worst fitness; It is a very small constant, mainly used to prevent very small positive numbers introduced by division by zero errors in mathematical calculations.

[0152] In summary, due to the strong volatility, intermittency, and significant weather dependence of photovoltaic power output, traditional models often rely on manual parameter tuning, making it difficult to adapt to the complex and ever-changing weather-power mapping relationship. In contrast, the ISSA optimization mechanism has strong global search capabilities and adaptive adjustment mechanisms, which can dynamically adjust hyperparameters according to different weather conditions (such as seasonal variations and irradiance fluctuations), thereby better adapting to the nonlinear and time-varying characteristics of photovoltaic power generation. It adaptively searches for the most suitable hyperparameter combination for local climate and seasonal characteristics, thereby improving the model's predictive robustness under different climatic backgrounds.

[0153] In addition, the ISSA parameters are set as follows: sparrow population size 50, maximum number of iterations 100, warning value ST=0.8, discoverer proportion PD=20%, and scout proportion SD=10%. The algorithm simulates sparrow foraging behavior, classifying individuals into three categories: discoverers, followers, and scouts. In photovoltaic power prediction, discoverers are responsible for global exploration in a broad parameter space. Their position updates introduce nonlinear decreasing weights, allowing the algorithm to explore extensively in the early stages of iteration and finely tune it in the later stages to adapt to the non-stationary changes in photovoltaic data. Followers enhance the diversity of local search through Cauchy mutation strategy, improving their response to transient meteorological disturbances such as sudden changes in irradiance. Scouts, based on the warning mechanism, promptly escape local optima, preventing the model from converging to suboptimal solutions prematurely.

[0154] Example 3

[0155] As one example, the photovoltaic power prediction sequence output by the BiGRU-Transformer model can be subjected to secondary verification, specifically as follows:

[0156] The following evaluation metrics were calculated on the test set: root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²).

[0157] Then, the performance of this model is compared with that of traditional prediction models (LSTM, SVR, ARIMA);

[0158] If this model reduces RMSE and MAE by more than 10% and R² reaches more than 0.98, then this volt power prediction sequence is the final prediction result.

[0159] If the conditions are not met, ISSA will re-optimize the hyperparameters of the BiGRU-Transformer model and make predictions.

[0160] Output the final prediction results and performance indicators, and draw curves comparing the actual and predicted values, residual distribution plots, and error histograms to intuitively demonstrate the model's prediction effect.

[0161] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A photovoltaic power generation power prediction method based on VMD-ISSA-BiGRU, characterized in that, Specifically comprising: Obtaining photovoltaic power sequence and meteorological data sequence, dividing the original data into training set, validation set and test set according to the ratio of 8:1:1, and preprocessing the data; Performing variational mode decomposition on the photovoltaic power sequence to obtain eight intrinsic mode components; Extracting time sequence features from each intrinsic mode component and meteorological data sequence respectively, and using the Pearson correlation coefficient to analyze the correlation between each time sequence feature and power output, and retaining the time sequence features with an absolute value of the correlation coefficient greater than 0.3; The specific process is as follows: S1. Set the ISSA algorithm parameters, determine the hyperparameters to be optimized and their search range, and define the fitness function; S2. Generate an initial sparrow population using Circle chaotic mapping; S3. Set the current iteration number ; S4. For each individual in the population, use the hyperparameter combination represented by it to build a BiGRU-Transformer model, and calculate its fitness value on the validation set; S5. Sort the current population according to the fitness value, divide the top 20% with the best fitness value as discoverers, and the remaining as followers, and randomly select 10% of individuals from the population as scouts according to the alarm mechanism; S6. Update the positions of discoverers, followers and scouts respectively, and check the positions of all newly generated individuals to ensure they do not exceed the preset hyperparameter search range; S7. Compare the fitness values of all individuals, and if there is an individual better than the current global optimal solution, update the optimal solution and its corresponding optimal fitness value; S8. Let , if , then go to S4; otherwise terminate iteration, output global historical optimal position; Based on the optimized hyperparameters and retained time sequence features, a BiGRU-Transformer model is constructed: The BiGRU-Transformer model includes a BiGRU part and a Transformer part; The BiGRU part is a bidirectional architecture based on GRU, and the calculation formula is: In the formula, and respectively represent the hidden state of the BiGRU network at time steps t and i, which contains the sequence information learned by the network up to the current time step; represents the forward hidden state sequence, represents the reverse hidden state sequence; An adaptive time embedding is introduced to concatenate the time feature vector to the Transformer part, and the mathematical formula is: In the formula is a normalized time offset; is an encoding of a daily periodicity; is an encoding of a monthly periodicity; is an encoding of an annual periodicity; A meteorological attention module is introduced to concatenate the weighted meteorological representation to the Transformer part, and the mathematical formula is: In the formula is the original weather data, is the attention weight of the weather factor, and the mathematical formula is In the formula, denotes the hidden state of the history photovoltaic power sequence after BiGRU encoding at the current time step ; denotes the original weather data vector at the current time step ; denotes the vector splicing operation, which fuses the power features and weather features into a joint representation; is the weight and bias of the first layer linear transformation, is the activation function; is the weight and bias of the second layer linear transformation; is the Sigmoid activation function; Eight intrinsic mode components are input into the BiGRU-Transformer model for calculation to obtain the prediction values of each component, which specifically includes: The BiGRU part captures the local dependency relationship of the time sequence features in a certain intrinsic mode component; The processed results are input into the Transformer part; The Transformer part captures the global dependency relationship of the time sequence features in the intrinsic mode component to obtain the prediction value; The prediction results of all components are linearly reconstructed to obtain the photovoltaic power prediction sequence.

2. The VMD-ISSA-BiGRU-based photovoltaic power generation power prediction method according to claim 1, characterized in that: The initial sparrow population is generated using Circle chaotic mapping, and the calculation formula is: wherein is the first chaotic map value; is the iteration number; , , is the control coefficient; is the modulo function.

3. The VMD-ISSA-BiGRU-based photovoltaic power generation power prediction method according to claim 1, characterized in that: The position updating mechanism of the discoverer, and the calculation formula is: In the formula, For the first The discoverer's position in the next iteration; The total number of discoverers, It is an exponential function; A random number between 0 and 1; This represents the maximum number of iterations. Random numbers that satisfy a normal distribution; For all elements equal to 1 matrix; This is a warning value; This is the safety threshold.

4. The VMD-ISSA-BiGRU-based photovoltaic power generation power prediction method according to claim 3, characterized in that: A nonlinear decreasing weight strategy is introduced to optimize the position updating mechanism of the discoverer, and the specific formula is: wherein, is the position of the th discoverer in the th dimension, is the update weight, denotes the current iteration number.

5. The VMD-ISSA-BiGRU-based photovoltaic power generation power prediction method according to claim 4, characterized in that: A Levy flight strategy is used to optimize the position updating mechanism of the discoverer, and the specific formula is: where, represents the position of the discoverer optimized by Levy flight strategy, represents the position of the discoverer optimized by non-linear decreasing weight, represents the step control parameter, represents the current optimal solution, represents the search path, satisfying The Levy flight path obtained by using the Mantegna algorithm is: wherein, is a random step for Levy flight, and is a random variable subject to a normal distribution, is a normal distribution function, is a stability parameter; is a standard deviation; is a gamma function.

6. The VMD-ISSA-BiGRU-based photovoltaic power generation power prediction method according to claim 3, characterized in that: The position updating mechanism of the follower, whose calculation formula is: wherein is the position of the follower in the th iteration; is the worst position of the follower in the th iteration; is the best position of the follower in the th iteration; is a matrix with random elements of 1 or -1 ; is the total number of followers.

7. The VMD-ISSA-BiGRU-based photovoltaic power generation power prediction method according to claim 6, characterized in that: The position updating mechanism of the follower is improved by using Cauchy mutation strategy, which is specifically: wherein, is the follower at the first iteration new position in the d-th dimension, is the current iteration number global optimum position at the k-th iteration; And is the standard Cauchy distribution function, in particular: wherein is a probability density function of a Cauchy distribution; is a random variable.

8. The VMD-ISSA-BiGRU-based photovoltaic power generation power prediction method according to claim 6, characterized in that: The position updating mechanism of the scout, whose calculation formula is: where, is the optimal position of the scout in the nth iteration; is the optimal position of the scout in the nth iteration; is a random number satisfying a normal distribution; is the follower is the position of the follower at time step n; is a random number between -1 and 1; is the current fitness value; is the global best fitness; is the global best fitness; is the worst fitness; is a very small constant.