Short-term photovoltaic power prediction method for optimizing bidirectional gating circulation unit based on improved crown porcupine algorithm
By improving the crown porcupine algorithm to optimize the bidirectional gated cyclic unit network, the problems of difficulty in selecting super parameters and local optimal solutions in photovoltaic power prediction are solved, and higher prediction accuracy and algorithm convergence speed are achieved.
Patent Information
- Application Number
- CN202510004444.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-06-03
AI Technical Summary
It is difficult to select hyperparameters for existing photovoltaic power prediction methods, and the group intelligent optimization algorithm is easily trapped in the local optimal solution, affecting the prediction accuracy.
The improved crown porcupine algorithm is used to optimize the bidirectional gated cyclic unit network. By improving the fully ensemble empirical mode decomposition and fuzzy C-mean clustering algorithm of adaptive white noise, the characteristic information of the photovoltaic power generation power data is obtained, the bidirectional gated cyclic unit network model is constructed, and the improved crown porcupine algorithm is used to optimize the network parameters.
The accuracy of photovoltaic power prediction is improved, local optimal solutions are avoided, and the convergence speed and prediction effect of the algorithm are improved.
Smart Images

Figure CN120090163A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power generation output power prediction, and particularly relates to a short-term photovoltaic power prediction method based on an improved crown porcupine algorithm for optimizing a bidirectional gated recurrent unit. Background Art
[0002] As a core component of renewable energy, the technological progress of photovoltaic power generation directly affects the development and utilization of new energy. Accurate power prediction can not only improve the operation efficiency of power stations, but also help power dispatching, balance supply and demand, and promote the development of renewable energy. However, the photovoltaic power generation is affected by meteorological conditions such as solar irradiance, temperature, humidity and other factors, and has strong volatility and unpredictability. Therefore, accurate photovoltaic power prediction can reduce the impact of this volatility on the power grid, improve the stability and security of the power grid operation, and enable the power system to more reasonably dispatch power generation resources.
[0003] Most traditional photovoltaic power prediction methods are based on machine learning models and statistical methods. Although these methods can achieve certain prediction effects, they cannot fully exploit the feature information between data, which limits the data processing ability. With the development of deep learning, neural networks have powerful learning and feature extraction capabilities and are widely used in power prediction. However, there are still some problems. For example, the neural network model has the problem that the poor selection of hyperparameters affects the prediction accuracy; the swarm intelligence optimization algorithm has the problems of being easily trapped in local optimal solutions and slow convergence, which ultimately affects the prediction accuracy. Summary of the Invention
[0004] To overcome the problems that it is difficult to select hyperparameters for the neural network prediction model, and the swarm intelligence optimization algorithm is easily trapped in local optimum, which ultimately affects the convergence and finally the prediction accuracy. The present invention provides a short-term photovoltaic power prediction method based on an improved crown porcupine algorithm for optimizing a bidirectional gated recurrent unit network. This method obtains the optimal combination of hyperparameters of the bidirectional gated recurrent unit (BiGRU) network through the improved crown porcupine algorithm (ICPO) to improve the accuracy of photovoltaic power prediction.
[0005] The technical solution adopted by the present invention is as follows:
[0006] A short-term photovoltaic power prediction method based on an improved crown porcupine algorithm for optimizing a bidirectional gated recurrent unit includes the following steps:
[0007] Step 1: Obtain the historical photovoltaic power generation data of a photovoltaic power station and the corresponding meteorological factor data of the photovoltaic array area, and perform similar-day clustering processing on these data;
[0008] Step 2: Decompose the photovoltaic power generation data into several subsequences by improved complete ensemble empirical mode decomposition with adaptive noise (ICEEMDAN), and form a data set with the meteorological factor data;
[0009] Step 3: Construct a bidirectional gated recurrent unit (BiGRU) network model;
[0010] Step 4: Use the improved crown porcupine optimization (ICPO) to optimize the parameters of the bidirectional gated recurrent unit (BiGRU) network model and predict the short-term photovoltaic power.
[0011] The said Step 1 includes the following steps:
[0012] S1.1: Use the fuzzy C-means clustering algorithm to perform similar-day clustering on the photovoltaic power generation data. The clustering algorithm is as follows:
[0013]
[0014] In formula (1): x i represents the i-th photovoltaic power data to be clustered, v j represents the j-th clustering center, u ij represents the membership degree of the i-th photovoltaic power data to be clustered belonging to the j-th clustering center, c is the number of clustering centers, n is the number of photovoltaic power data, represents the weight of the i-th photovoltaic power data to be clustered belonging to the j-th clustering center, m is the fuzzy factor, v k represents the k-th clustering center and k≠j;
[0015] S1.2: Perform normalization processing on the similar-day data after clustering:
[0016]
[0017] In formula (2): x′ is the normalized photovoltaic power generation data, x is the initial photovoltaic power generation data, x max is the maximum value of the initial photovoltaic power generation data in this column, x min is the minimum value of the initial photovoltaic power generation data in this column.
[0018] The said Step 2 includes the following steps:
[0019] S2.1: Define the original photovoltaic power generation data sequence s(t), and construct a photovoltaic power generation sequence s i (t) with added white noise on the original photovoltaic power generation data sequence s(t), as follows:
[0020]
[0021] In Equation (3): t is the time value, w i (t) is the i-th group of white noise added, E 1 (w i (t)) is the first-order mode component generated by the EMD algorithm for decomposing the sequence, E k (w i (t)) is the k-th order mode component generated by the EMD algorithm for decomposing the sequence, std is the standard deviation, α 0 is the initial denoising value, ε 0 is the reciprocal of the signal-to-noise ratio between the initially added noise and the sequence to be analyzed.
[0022] S2.2: Use EMD decomposition to obtain the first residual component R 1 (t), expressed as:
[0023] R 1 (t) = <M(s i (t))> (4);
[0024] In Equation (4): M(s i (t)) represents the local mean of the photovoltaic power sequence s i (t) with added white noise, <·> represents taking the average of the entire sequence;
[0025] S2.3: Calculate the first mode component I IMF1 (t):
[0026] I IMF1 (t) = s(t) - R 1 (t) (5);
[0027] S2.4: Add white noise. The k-th group of residual component R k (t) and mode component I IMFk (t) are:
[0028] R k (t) = <M(R k-1 (t) + α k-1 E k (w k (t)))> (6);
[0029] I IMFk (t) = R k-1 (t) - R k (t) (7);
[0030] In the formula: R k-1 (t) is the (k - 1)-th group of residual component; α k-1is the denoising value of the (k - 1)-th group; M represents taking the average of the component sequence; S2.5: Repeat the above steps to solve all components and the final residual, and decompose the photovoltaic power to obtain k IMF components:
[0031]
[0032] In Equation (8): represents the value of the i-th IMF component at time t, where i is between [1, k].
[0033] In Step 2, combined with the meteorological factor data, the dataset input into the bidirectional gated recurrent unit (BiGRU) network model is:
[0034]
[0035] In Equation (9): x t1 、x t2 、...x tm respectively represent the values of the total horizontal irradiance, diffuse horizontal irradiance, temperature, relative humidity, and wind speed at time t, and m = 5; represents the value of the i-th IMF component at time t, where i is between [1, k].
[0036] In the said Step 3, the calculation method of the bidirectional gated recurrent unit (BiGRU) network model includes:
[0037]
[0038] In Equation (10): GRU(i) is the gated recurrent unit, x t is the input data at the t-th moment, and are the output states of the forward layer and the backward layer at the t-th moment respectively, and are the output states of the forward layer and the backward layer at the (t - 1)-th moment respectively, α t and β t are the output weights of the forward layer and the backward layer respectively, b t is the bias term, and h t is the combined output state;
[0039] The calculation process of GRU is as follows:
[0040]
[0041] In Equation (11): x t represents the input data at the t-th moment; W z 、W t 、W h 、U z 、U t, U h is the weight matrix, and h t , h t-1 represent the state variables of the hidden layer at time t and t - 1 respectively. is the candidate hidden state; σ represents the Sigmoid function; represents the Hadamard product; z t and r t represent the states of the update gate and the reset gate at time t respectively.
[0042] In step 4, the parameters of the bidirectional gated recurrent unit (BiGRU) network model include the number of neurons n in the hidden layer and the learning rate l, and include the following steps:
[0043] S4.1: Set the initial values: population size n, maximum number of iterations T max , population dimension dim, number of neurons s in the hidden layer, and learning rate l;
[0044] S4.2: Use the mean square error output by the bidirectional gated recurrent unit (BiGRU) network model as the fitness function of the population, and its expression is:
[0045]
[0046] In formula (12), F(s, l) is the fitness function, s is the number of neurons in the hidden layer, l is the learning rate, N is the total number of samples, i is the current sample number, and y i is the i-th predicted value, is the i-th true value;
[0047] S4.3: Adopt a strategy that combines Chebyshev chaos and reverse learning for population initialization, and the calculation method is as follows:
[0048]
[0049] In formula (13), n is a positive integer, x n is the n-th generation population; x n+1 is the (n + 1)-th generation population, and x new is the reverse solution corresponding to the initial solution x n generated by Chebyshev chaos, k is the order, rand(0, 1) is a random number between [0, 1], ub and lb are the upper and lower bounds of the population, and g n is the mapping angle, and arccosx n is the inverse cosine function of x n ;
[0050] S4.4: Adopt a cyclic population reduction strategy to accelerate the convergence speed of the algorithm, and its expression is:
[0051]
[0052] In formula (14), N min is the minimum number of the newly generated population, s is the current fitness function evaluation value, % is the modulo operation, T is the number of loops, T max is the maximum number of loops, N' is the current loop population size, and N is the next loop population size;
[0053] S4.5: The porcupine individual includes the first defense and the second defense in the exploration stage. The first defense is visual defense, simulating the behavior of the porcupine becoming alert when discovering a predator. Its expression is:
[0054]
[0055] In the formula, τ 1 is a random number based on the normal distribution, is the position of the i-th porcupine at the t-th iteration, is the position of the i-th porcupine at the (t + 1)-th iteration, τ 2 is a random value in the interval [0, 1], is the optimal solution of the evaluation function, is the vector generated between the current CP and the randomly selected CP from the population, is the position of the predator at iteration t;
[0056] S4.6: When the predator approaches the porcupine, the second defense, i.e., sound defense, is adopted, simulating the behavior of the porcupine roaring at the predator. Its expression is:
[0057]
[0058] In formula (17), U 1 is a random binary number, y is the predator position, τ 3 is a random value in the interval [0, 1], is the position of porcupine r1 at the t-th iteration, is the position of porcupine r2 at the t-th iteration, and r1, r2 are random positive integers in the interval [1, N];
[0059] S4.7: The porcupine individual includes the third defense and the fourth defense in the exploitation stage. The third defense is odor attack, simulating the behavior of the porcupine releasing a stinking odor at the predator. Its expression is:
[0060]
[0061] In formula (18), r1, r2, r3 are random positive integers in the interval [1, N], δ is the direction control parameter, γ tis the defense factor for the t-th iteration, is the gas diffusion factor for the i-th population at the t-th iteration; is the position of the crested porcupine r3 at the t-th iteration,
[0062] Specifically, the expression of the direction control parameter δ is:
[0063]
[0064] In Equation (19), rand(0,1) is a random number in the range of 0 to 1;
[0065] Specifically, the defense factor γ t has the following expression:
[0066]
[0067] In Equation (20), T max represents the maximum number of iterations, and t represents the current number of iterations;
[0068] Specifically, the gas diffusion factor has the following expression:
[0069]
[0070] In Equation (21), F i t is the objective function value of the position of the i-th crested porcupine individual at the t-th iteration, and ε is a value approaching 0;
[0071] S4.8: When the predator is very close to the crested porcupine, the fourth defense, i.e., physical attack, is adopted. Simulate the crested porcupine turning its back to the predator and attacking the predator with the sharp spines on its back. Its expression is:
[0072]
[0073] In Equation (22), is the optimal individual at the t-th iteration, α is the convergence factor, τ 4 , τ 5 are random values between [0,1], F i t is the objective function value of the position of the i-th crested porcupine individual at the t-th iteration, and δ represents the direction control parameter.
[0074] The present invention is a short-term photovoltaic power prediction method based on an improved crested porcupine algorithm for optimizing a bidirectional gated recurrent unit network. The technical effects are as follows:
[0075] 1) In step 1 of the present invention, considering that the photovoltaic power data under the same weather type has similarity, by clustering the power data according to the weather type and using it as the training set input of the model, it is beneficial to improve the model prediction accuracy.
[0076] 2) In step 2 of the present invention, the power signal is decomposed by improving the complete ensemble empirical mode decomposition algorithm with adaptive white noise (ICEEMDAN) to obtain several sub-components with stronger regularity, which can reduce the complexity of the original data, facilitate the feature extraction of the photovoltaic power data by the model, and improve the prediction accuracy.
[0077] 3) In step 3 of the present invention, the bidirectional gated recurrent unit (BiGRU) is used to obtain the long-term relationship information of the sequence and capture the bidirectional features of the sequence, which is beneficial to improving the prediction accuracy.
[0078] 4) In step 4 of the present invention, aiming at the problem that the crown porcupine algorithm is easy to fall into the local optimal solution, the population is initialized by introducing the Chebyshev chaotic map and the reverse learning strategy, so that the distribution of the population in the search space is more uniform; the cyclic population reduction strategy is used to accelerate the algorithm convergence speed, which is beneficial to improving the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 is the flow chart of the present invention.
[0080] Figure 2 is the structure diagram of the bidirectional gated recurrent unit.
[0081] Figure 3 is the clustering result of similar days.
[0082] Figure 4 is the fitness comparison chart of the crown porcupine algorithm and the improved crown porcupine algorithm.
[0083] Figure 5 is the photovoltaic power prediction result. DETAILED DESCRIPTION OF THE INVENTION
[0084] A short-term photovoltaic power prediction method based on an improved crown porcupine algorithm to optimize the bidirectional gated recurrent unit includes the following steps:
[0085] Step S1: Obtain the historical photovoltaic power generation data of the photovoltaic power station and the corresponding meteorological factor data of the photovoltaic array area, and perform similar day clustering processing on the data;
[0086] Step S2: Decompose the photovoltaic power generation data into several subsequences by improving the complete ensemble empirical mode decomposition with adaptive white noise (ICEEMDAN), and form a data set with the meteorological factor data;
[0087] Step S3: Construct a Bidirectional Gated Recurrent Unit (BiGRU) network model;
[0088] Step S4: Use the Improved Crown Porcupine Optimization (ICPO) algorithm to optimize the parameters of the BiGRU network for short-term photovoltaic power prediction.
[0089] Step S1: Select data from February, May, August, and November of a certain photovoltaic power station in a year to represent four seasons. The data includes measured photovoltaic power generation data and meteorological factor data corresponding to the photovoltaic array area. The acquisition time period is set from 6:00 am to 8:00 pm, and the acquisition interval is 15 minutes, resulting in a total of 5152 data entries. Each data entry includes temperature, total horizontal solar radiation, diffuse solar radiation, relative humidity, and photovoltaic power generation, forming a measured sample data set for photovoltaic power prediction. Select the meteorological factor data and photovoltaic power generation data from 8:00 to 11:00 on May 22nd, as shown in Table 1.
[0090] Table 1 Meteorological factor data and photovoltaic power generation data from 8:00 to 11:00 on May 22nd
[0091]
[0092] S1.1: Use the fuzzy C-means clustering algorithm to cluster the photovoltaic power data to obtain photovoltaic power data under different weather types, Figure 3 Plot the clustering results. From Figure 3 it can be seen that the photovoltaic power data is clustered into three weather types: sunny, cloudy, and rainy. The photovoltaic power data under the same weather type is similar;
[0093] S1.2: Normalize the clustered data:
[0094]
[0095] In the formula, x′ is the normalized photovoltaic power generation value of the sample, x is the initial photovoltaic power generation value, x max is the maximum value of the photovoltaic power generation in this column, and x min is the minimum value of the photovoltaic power generation in this column;
[0096] Step S2: Use ICEEMDAN to decompose the photovoltaic power generation sequence data. The calculation process is as follows:
[0097] S2.1: Define the original sequence s(t), and construct a new sequence s i (t) on the original sequence s(t) as follows:
[0098]
[0099] Where: t is the time value, w i (t) is the i-th group of added white noise, E 1 (w i (t)) is the first-order modal component generated by the EMD algorithm for decomposing the sequence, E 1 (w i (t)) is the k-th order modal component generated by the EMD algorithm for decomposing the sequence, std is the standard deviation, α 0 is the initial denoising value, ε 0 is the reciprocal of the signal-to-noise ratio between the initially added noise and the sequence to be analyzed;
[0100] S2.2: The first residual component R 1 (t) can be obtained by EMD decomposition and is expressed as:
[0101] R 1 (t) = <M(s i (t))> (4);
[0102] Where: M(s i (t)) represents the local mean of the photovoltaic power generation sequence s i (t) with added white noise, and <·> represents taking the average of the entire sequence;
[0103] S2.3: Calculate the first modal component I IMF1 (t):
[0104] I IMF1 (t) = s(t) - R 1 (t) (5);
[0105] S2.4: Add white noise. The k-th group of residual component R k (t) and modal component I IMFk (t) are:
[0106] R k (t) = <M(R k-1 (t) + α k-1 E k (w k (t)))> (6);
[0107] I IMFk (t) = R k-1 (t) - R k (t) (7);
[0108] Where, R k-1 (t) is the (k - 1)-th group of residual component, α k-1 is the (k - 1)-th group of denoising value, and M represents taking the average of the component sequence;
[0109] S2.5: Repeat the above steps to solve all components and the final residual. Decompose the photovoltaic power to obtain k IMF components. Combine the meteorological factor data to form a data set. Divide the data set into a training set and a test set according to the ratio of 8:2. The data set input into the bidirectional gated recurrent unit BiGRU network is:
[0110]
[0111] where x t1 , x t2 ,... x tm represent the values of the total horizontal irradiance, diffuse horizontal irradiance, temperature, relative humidity, and wind speed at time t, respectively, and m = 5; represents the value of the i-th IMF component at time t, and i is between [1, k];
[0112] Step S3, construct a bidirectional gated recurrent unit BiGRU model, and the calculation method is as follows:
[0113]
[0114] where: GRU(i) is the gated recurrent unit, x t is the input data at the t-th moment, and are the output states of the forward layer and the backward layer at the t-th moment, respectively, and are the output states of the forward layer and the backward layer at the (t - 1)-th moment, respectively. α t and β t are the output weights of the forward layer and the backward layer, respectively. b t is the bias term, and h t is the combined output state;
[0115] Furthermore, the calculation process of GRU is as follows:
[0116]
[0117] where: x t represents the input data at the t-th moment; W z , W t , W h , U z , U t , U h are weight matrices, h t , h t-1 represent the state quantities of the hidden layer at the t-th moment and the (t - 1)-th moment, respectively, is the candidate hidden state; σ represents the Sigmoid function; represents the Hadamard product; z t and rt respectively represent updating the status of the update gate and the reset gate at time t;
[0118] Step S4, use the improved crown porcupine optimization algorithm ICPO to optimize the parameters of the bidirectional gated recurrent unit BiGRU network to predict the short-term photovoltaic power. The model parameters include the number of neurons n in the hidden layer and the learning rate l, and the following steps are included:
[0119] S401: Set the initial values: the population size n = 25, the maximum number of iterations T max = 30, the population dimension dim = 2, the number of neurons s in the hidden layer = 64, and the learning rate l = 0.01;
[0120] S4.2: Take the mean square error of the BiGRU output as the fitness function of the population, and its expression is:
[0121]
[0122] In the formula, f(σ,C) is the fitness function, s is the number of neurons in the hidden layer, l is the learning rate, N is the total number of samples, i is the current sample number, y i is the i-th predicted value, is the i-th true value;
[0123] S4.3: Adopt a strategy of fusing Chebyshev chaos and reverse learning for population initialization, and the calculation method is as follows:
[0124]
[0125] In the formula, n is a positive integer, x n is the n-th generation population; x n+1 is the (n + 1)-th generation population, x new is the reverse solution corresponding to the initial solution x n generated by Chebyshev chaos, k is the order, rand(0,1) is a random number between [0,1], ub and lb are the upper and lower bounds of the population, g n is the mapping angle, arccosx n is the inverse cosine function of x n ;
[0126] S4.4: Adopt a cyclic population reduction strategy to accelerate the convergence speed of the algorithm, and its expression is:
[0127]
[0128] In the formula, N min is the minimum number of the newly generated population, s is the current fitness function evaluation value, % is the modulo operation, T is the number of cycles, T maxis the maximum number of cycles, N′ is the current cycle population size, and N is the next cycle population size;
[0129] S4.5: The porcupine individual in the exploration stage includes the first defense and the second defense. The first defense is visual defense, simulating the behavior of a porcupine becoming alert when discovering a predator. Its expression is:
[0130]
[0131] In the formula, τ 1 is a random number based on the normal distribution, is the position of the i-th porcupine at the t-th iteration, is the position of the i-th porcupine at the (t + 1)-th iteration, τ 2 is a random value in the interval [0, 1], is the optimal solution of the evaluation function, is the vector generated between the current CP and a randomly selected CP from the population, is the position of the predator at iteration t;
[0132] S4.6: When the predator approaches the porcupine, the second defense, i.e., sound defense, is adopted, simulating the behavior of a porcupine growling at the predator. Its expression is:
[0133]
[0134] In the formula, U 1 is a random binary number, y is the predator position, τ 3 is a random value in the interval [0, 1], is the position of porcupine r1 at the t-th iteration, is the position of porcupine r2 at the t-th iteration, and r1, r2 are random positive integers in the interval [1, N];
[0135] S4.7: The porcupine individual in the exploitation stage includes the third defense and the fourth defense. The third defense is odor attack, simulating the behavior of a porcupine releasing a stinking odor at the predator. Its expression is:
[0136]
[0137] In the formula, r1, r2, r3 are random positive integers in the interval [1, N], δ is the direction control parameter, γ t is the defense factor at the t-th iteration, is the gas diffusion factor of the i-th population at the t-th iteration;
[0138] Specifically, the expression of the direction control parameter δ is:
[0139]
[0140] where is a random number in the range of 0 to 1;
[0141] Specifically, the defense factor γ t has the following expression:
[0142]
[0143] where T max represents the maximum number of iterations, and t represents the current number of iterations;
[0144] Specifically, the gas diffusion factor has the following expression:
[0145]
[0146] where F i t is the objective function value at the position of the i-th crowned porcupine individual at the t-th iteration, and ε is a value approaching 0;
[0147] S4.8: When the predator is very close to the crowned porcupine, the fourth defense, i.e., physical attack, is adopted. Simulate the crowned porcupine attacking the predator with the sharp spines on its back facing away from the predator. Its expression is:
[0148]
[0149] where is the optimal individual at the t-th iteration, α is the convergence factor, τ 4 and τ 5 are random values between [0, 1], F i t is the objective function value at the position of the i-th crowned porcupine individual at the t-th iteration, and δ represents the direction control parameter;
[0150] To verify the effectiveness of the improved crowned porcupine algorithm (ICEEMDAN - ICPO - BiGRU) proposed in the present invention for optimizing the bidirectional gated recurrent unit model, comparative experiments are carried out with the bidirectional gated recurrent unit (ICEEMDAN - BiGRU) and the crowned porcupine algorithm - optimized bidirectional gated recurrent unit (ICEEMDAN - CPO - BiGRU). To ensure the reliability of the experiment, the experiment is carried out under the same conditions and environment.
[0151] In the present invention, the mean absolute error (MAE) and root mean square error (RMSE) are used as the evaluation indicators of the model. The experimental results are shown in Table 2. By comparison, it can be seen that the prediction accuracy of the model of the present invention is higher.
[0152] Table 2 Comparison of prediction results of different models
[0153]
[0154] In the present invention, Figure 4 a fitness comparison graph of the improved crested porcupine algorithm and the crested porcupine algorithm is drawn. It can be seen from Figure 4 that the improved crested porcupine algorithm has a faster convergence speed than the crested porcupine algorithm and can effectively jump out of the local optimal solution.
[0155] In the present invention, Figure 5 a prediction result graph of different models is drawn. It can be seen from Figure 5 that the present invention has a higher prediction accuracy compared with other models.
Claims
1. A short-term photovoltaic power prediction method based on an improved crown porcupine algorithm to optimize a bidirectional gated cyclic unit, characterized in that The following steps are involved: Step 1: Obtain historical photovoltaic power generation data of the photovoltaic power station and corresponding meteorological factor data of the photovoltaic array area, and perform similar day clustering processing on these data; Step 2: Decompose the photovoltaic power data into several subsequences through the improved complete ensemble empirical mode decomposition of adaptive white noise (ICEEMDAN), and form a data set with meteorological factor data; Step 3: Construct a bidirectional gated recurrent unit (BiGRU) network model; Step 4: Use the improved crown porcupine algorithm ICPO to optimize the parameters of the bidirectional gated recurrent unit (BiGRU) network model to predict the short-term photovoltaic power.
2. The short-term photovoltaic power prediction method based on the improved crown porcupine algorithm to optimize the bidirectional gated cyclic unit according to claim 1 is characterized by: The step 1 comprises the following steps: S1.1: Use the fuzzy C-means clustering algorithm to cluster the photovoltaic power generation data into similar days, as shown below: In formula (1): x i represents the ith photovoltaic power data to be clustered, v j represents the jth cluster center, u ij It indicates the membership degree of the i-th photovoltaic power data to be clustered to the j-th cluster center, c is the number of cluster centers, n is the number of photovoltaic power data, represents the weight of the i-th photovoltaic power data to be clustered belonging to the j-th cluster center, m is the fuzzy factor, v k represents the kth cluster center and k≠j; S1.2: Normalize the clustered similar day data: In formula (2), x′ is the normalized photovoltaic power data, x is the initial photovoltaic power data, and x max is the maximum value of the initial photovoltaic power data in this column, x min It is the minimum value of the initial photovoltaic power generation data in this column.
3. The short-term photovoltaic power prediction method based on the improved crown porcupine algorithm to optimize the bidirectional gated cyclic unit according to claim 1 is characterized by: The step 2 comprises the following steps: S2.1: Define the original photovoltaic power generation data sequence s(t), and construct the photovoltaic power generation data sequence s(t) with white noise added on the original photovoltaic power generation data sequence s(t) i (t), as follows: In formula (3), t is the time value, w i (t) is the i-group white noise added, E1(w i (t)) is the first-order modal component generated by the EMD algorithm decomposition sequence, E k (w i (t)) is the k-order modal component generated by the EMD algorithm decomposition sequence, std is the standard deviation, α0 is the initial denoising value, and ε0 is the inverse of the signal-to-noise ratio between the first added noise and the analyzed sequence; S2.2: Use EMD decomposition to get the first residual component R1(t), expressed as: R1(t)=<M(s i (t))> (4); In formula (4): M(s i (t)) represents the photovoltaic power generation sequence s with added white noise i The local mean of (t), <·> means averaging the entire sequence; S2.3: For the first modal component I IMF1 (t) Calculate: I IMF1 (t)=s(t)-R1(t) (5); S2.4: Add white noise, the kth group of residual components R k (t) and modal component I IMFk (t) is: R k (t)=<M(R k-1 (t)+α k-1 E k (w k (t)))>(6); I IMFk (t)=R k-1 (t)-R k (t)(7); Where: R k-1 (t) is the k-1th group of residual components; α k-1 is the k-1th group of denoised values; M represents the average of the component sequence; S2.5: Repeat the above steps to solve all components and the final residual, and decompose the photovoltaic power generation into k IMF components: In formula (8): Represents the value of the i-th IMF component at time t, where i is between [1, k].
4. The short-term photovoltaic power prediction method based on the improved crown porcupine algorithm to optimize the bidirectional gated cyclic unit according to claim 3 is characterized by: In step 2, combined with the meteorological factor data, the data set input into the Bidirectional Gated Recurrent Unit (BiGRU) network model is: In formula (9): x t1 、x t2 ,...x tm They represent the values of total horizontal irradiance, diffuse horizontal irradiance, temperature, relative humidity, and wind speed at time t, respectively, m = 5; Represents the value of the i-th IMF component at time t, where i is between [1, k].
5. The short-term photovoltaic power prediction method based on the improved crown porcupine algorithm to optimize the bidirectional gated cyclic unit according to claim 1 is characterized by: In step 3, the calculation method of the bidirectional gated recurrent unit (BiGRU) network model includes: In formula (10), GRU(i) is the gated recurrent unit, x t Input data for time t, and are the output states of the forward layer and the reverse layer at time t, respectively. and are the output states of the forward layer and the reverse layer at time t-1, respectively, t and β t are the output weights of the forward layer and the reverse layer, respectively, and b t is the bias term, h t It is the joint output state; The calculation process of GRU is as follows: In formula (11): x t represents the input data at time t; W z , W t , W h , U z , U t , U h is the weight matrix, h t 、h t-1 Represent the state of the hidden layer at time t and time t-1 respectively, is the candidate hidden state; σ represents the Sigmoid function; represents the Hadamard product; z t and r t They represent updating the state of the gate and resetting the state of the gate at time t respectively.
6. The short-term photovoltaic power prediction method based on the improved crown porcupine algorithm to optimize the bidirectional gated cyclic unit according to claim 5, characterized in that: In step 4, the Bidirectional Gated Recurrent Unit (BiGRU) network model parameters include the number of hidden layer neurons n and the learning rate l, and the following steps are included: S4.1: Set initial values: population size n, maximum number of iterations T max , population dimension dim, number of hidden layer neurons s and learning rate l; S4.2: The mean square error of the output of the BiGRU network model is used as the fitness function of the population, and its expression is: In formula (12), F(s,l) is the fitness function, s is the number of neurons in the hidden layer, l is the learning rate, N is the total number of samples, i is the current sample number, and y is the training rate. i is the i-th predicted value, is the i-th true value; S4.3: The population is initialized by fusion Chebyshev chaos and reverse learning strategy. The calculation method is as follows: In formula (13), n is a positive integer, x n is the nth generation population; x n+1 is the n+1th generation population, x new Generate the initial solution x corresponding to Chebyshev chaos n The inverse solution of , k is the order, rand(0,1) is a random number between [0,1], ub and lb are the upper and lower bounds of the population, g n For the mapping angle, arccosx n For x n The arccosine function of ; S4.4: Adopt the cyclic population reduction strategy to accelerate the convergence speed of the algorithm, and its expression is: In formula (14), N min is the minimum number of newly generated populations, s is the current fitness function evaluation value, % is the remainder operation, T is the number of cycles, T max is the maximum number of cycles, N′ is the current cycle population size, and N is the next cycle population size; S4.5: The crested porcupine individuals have the first and second defenses in the exploration phase. The first defense is visual defense, which simulates the behavior of the crested porcupine when it finds a predator and becomes alert. Its expression is: Where τ1 is a random number based on normal distribution, is the position of the i-th crested porcupine at the t-th iteration, is the position of the i-th crested porcupine at the t+1th iteration, τ2 is a random value in the interval [0,1], is the optimal solution of the evaluation function, is the vector generated between the current CP and a CP randomly selected from the population, is the position of the predator at iteration t; S4.6: When a predator approaches a crested porcupine, the second defense, sound defense, is used to simulate the behavior of the crested porcupine roaring at the predator. The expression is: In formula (17), U1 is a random binary number, y is the predator position, τ3 is a random value in the interval [0,1], is the position of crested porcupine r1 in the tth iteration, is the position of the crested porcupine r2 at the tth iteration, where r1 and r2 are random positive integers in the interval [1,N]; S4.7: The crested porcupine individuals include the third and fourth defenses during the development stage. The third defense, odor attack, simulates the behavior of the crested porcupine releasing a foul odor to the predator, and its expression is: In formula (18), r1, r2, r3 are random positive integers in the interval [1, N], δ is the direction control parameter, γ t is the defense factor of the tth iteration, is the gas diffusion factor of the tth iteration of the ith population; is the position of crested porcupine r3 in the tth iteration, Specifically, the expression of the direction control parameter δ is: In formula (19), rand(0,1) is a random number ranging from 0 to 1; Specifically, defense factor γ t The expression is: In formula (20), T max represents the maximum number of iterations, and t represents the current number of iterations; Specifically, the gas diffusion factor The expression is: In formula (21), is the objective function value of the position of the i-th crested porcupine individual at the t-th iteration, and ε is a value that tends to 0; S4.8: When the predator is very close to the crested porcupine, the fourth defense, physical attack, is used to simulate the crested porcupine turning its back to the predator and using its back spikes to attack the predator. The expression is: In formula (22), is the optimal individual of the tth iteration, α is the convergence factor, τ4 and τ5 are random values between [0,1], and F i t is the objective function value of the position of the i-th crested porcupine individual at the t-th iteration, and δ represents the direction control parameter.
Citation Information
Patent Citations
Ultra-short-term photovoltaic power combined prediction method based on similar daily clustering and multi-source data
CN117613894A
Photovoltaic short-term generation power combined prediction method, system, equipment and medium
CN118801343A
Multivariable generating capacity regression prediction method, system and device based on CPO-BiTCN-BiGRU and medium
CN119050989A
Distributed photovoltaic power generation power intelligent prediction system and method
CN119129860A
Ultra-short-term photovoltaic power interval prediction method based on data optimization and deep learning
CN119180377A
Cited By
New energy storage and energy supply lithium battery state prediction method and device, and storage medium
CN120490837A
Photovoltaic power prediction method and system based on multi-strategy optimization MVMD
CN122365424A