Photovoltaic output prediction method based on RIME-RF spatial downscaling
By employing the RIME-RF spatial downscaling method and an optimized VMD-CNN-GRU-SE attention mechanism model, the problem of insufficient generalization ability of photovoltaic power generation output prediction under extreme weather conditions is solved, achieving high-precision and high-stability short-term prediction to meet the needs of grid dispatch.
Patent Information
- Application Number
- CN202511193951.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-12-23
AI Technical Summary
Existing photovoltaic power generation output prediction methods have limited generalization ability under extreme weather or sudden changes in conditions, making it difficult to meet the needs of grid dispatch and safe operation. Furthermore, traditional methods have high computational costs and long simulation cycles, making it difficult to achieve real-time short-term predictions at the minute or hour level.
A photovoltaic power output prediction method based on RIME-RF spatial downscaling is adopted. By collecting photovoltaic power plant data and local meteorological observation data, and combining the random forest algorithm optimized for frost and ice and the VMD-CNN-GRU-SE attention mechanism model optimized for black kites, hyperparameters and feature extraction are optimized to achieve high-precision short-term power prediction.
It significantly reduces downscaling error, improves the accuracy and stability of photovoltaic power output prediction, and can maintain high accuracy and stability under complex weather conditions, meeting the real-time dispatch requirements of the power grid.
Smart Images

Figure CN121189133A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic power prediction technology, and specifically to a photovoltaic power output prediction method based on RIME-RF spatial downscaling. Background Technology
[0002] With the rapid growth of photovoltaic power generation capacity, its output power is highly nonlinear and spatially heterogeneous due to atmospheric factors such as cloud cover and aerosols, posing higher requirements for power grid dispatch and safe operation. Numerical weather prediction (NWP) data has the advantages of wide coverage and long forecast lead time, but its spatial resolution is usually on the order of several kilometers to tens of kilometers, which is difficult to meet the needs of single stations or power plant groups for local refined meteorological information. Therefore, spatial downscaling technology has emerged.
[0003] Traditional spatial downscaling methods are mainly divided into two categories: statistical downscaling and dynamic downscaling. Statistical downscaling mines the mapping relationship between historical observation data and numerical weather prediction (NWP) data, employing machine learning models such as multiple regression, support vector machines, or random forests to construct input-output mappings. This improves spatial resolution and corrects for systematic errors. Random forests have become an important tool in this field due to their strong nonlinear fitting ability, robustness to outliers and missing values, and ease of tuning hyperparameters (number of trees, maximum depth, minimum number of leaf nodes, etc.). However, these methods have limited generalization ability under extreme weather or abrupt changes in conditions, making it difficult to fully characterize atmospheric dynamic processes. Dynamic downscaling, on the other hand, is based on high-resolution regional meteorological models. It obtains a fine-grained meteorological field grid by grid-by-grid by numerically solving atmospheric dynamic and physical process equations. It has high physical reliability, but it is heavily dependent on computing power and parameter settings, resulting in high computational costs and long simulation cycles, making it unsuitable for real-time short-term forecasts at the minute or hour level. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a photovoltaic power output prediction method based on RIME-RF spatial downscaling, which can more accurately capture subtle meteorological changes affecting photovoltaic power, significantly reduce downscaling errors, and improve short-term power prediction accuracy, providing an efficient and reliable technical solution for photovoltaic power output prediction.
[0005] The technical solution adopted in this invention is as follows:
[0006] The photovoltaic power output prediction method based on RIME-RF spatial downscaling includes the following steps:
[0007] Step 1: Collect photovoltaic power data of photovoltaic power plants in the target area and local meteorological observation LMD data, extract common data between numerical weather prediction (NWP) data and local meteorological observation LMD data, and construct input feature set;
[0008] Step 2: Optimize the hyperparameters of the Random Forest (RF) algorithm based on the Frost Ice Optimization (RIME) algorithm, construct the RIME-RF model, and spatially downscale the numerical weather prediction (NWP) data;
[0009] Step 3: A photovoltaic power prediction model based on the VMD-CNN-GRU-SE attention mechanism optimized by Black-winged Kite Optimization (BKA) is adopted. The prediction model is trained using the original numerical weather prediction (NWP) data combined with photovoltaic power data, and the prediction model is trained using the spatially downscaled numerical weather prediction (NWP) data combined with photovoltaic power data.
[0010] Step 4: Validation on the test set shows that the proposed method significantly reduces downscaling error and improves short-term power prediction accuracy, providing an efficient and reliable technical solution for photovoltaic power output prediction.
[0011] In step 1, common data between low-resolution numerical weather prediction (NWP) data and high-resolution local meteorological observation (LMD) data are extracted. The raw data in the numerical weather prediction (NWP) data contains total irradiance, and the raw data in the local meteorological observation (LMD) data contains total irradiance. These are used as input and target data, respectively, to construct an input feature set.
[0012] In step 2, the input feature set is read, and the RIME-RF model is used to spatially downscale the numerical weather prediction (NWP) data. During the call to the random forest (RF) algorithm, the frost optimization (RIME) algorithm is used to optimize the hyperparameters of the random forest, such as the number of trees and the minimum number of leaf nodes, so that it can be closer to the high-resolution local meteorological observation (LMD) data, and the high-resolution numerical weather prediction (NWP) data fitting value is output.
[0013] In step 2, the Frost Ice Optimization (RIME) algorithm includes the following steps:
[0014] a1: Randomly extract multiple subsets of the input feature set;
[0015] Let the input feature set be:
[0016] D = {(x1,y1),(x2,y2),…,(x N ,y N )} (1);
[0017] Where the total number of samples is D; (x1, y1) represents the first sample and its label; (x2, y2) represents the second sample and its label; (x N ,y N ) represents the Nth sample and its label.
[0018] If a random forest is constructed with T trees, then T subsets of the dataset need to be generated:
[0019] D (t) =Bootstrap(D,N),t=1,2,…,T (2);
[0020] Where: D (t) The training subset of the t-th tree is represented; Bootstrap(D,N) means that N samples are drawn with replacement from D to form a new dataset; T represents the total number of subsets to be generated.
[0021] a2: By recursively partitioning the feature space (e.g., minimizing the mean squared error MSE), the subset of data is split into child nodes until the stopping condition (e.g., maximum depth, minimum number of samples) is met, thereby constructing a decision tree;
[0022] Given a feature dimension j∈{1,2,…,d} and a splitting threshold s, where d represents the total dimension of the features, the data is divided into two subsets: left and right.
[0023] Left subset:
[0024] D L (j,s)={(x i ,y i )∈D∣x ij ≤s} (3);
[0025] In the formula: D L (j,s) represents the subset of samples that are less than or equal to the splitting threshold s in the j-th feature dimension; j is the feature dimension index; s is the feature splitting threshold; x ij This represents the value of the i-th sample in the j-th feature dimension.
[0026] Right Subset:
[0027] D R (j,s)={(x i ,y i )∈D∣x ij >s} (4);
[0028] In the formula: D R (j,s) represents the subset of samples that are greater than the segmentation threshold s in the j-th feature dimension.
[0029] Under this partition, the average target values of the left and right subsets are respectively:
[0030] Left subset mean:
[0031]
[0032] In the formula: The average value of the target values in the left subset; Describing the left subset D L The average value of the target value (label); D L y represents the set of samples that fall into the left subset; i This represents the true target value of the i-th sample.
[0033] Right subset mean:
[0034]
[0035] In the formula: D is the average of the objective values in the right subset; R This represents the set of samples that are included in the right subset.
[0036] The mean square error (MSE) corresponding to this partition is defined as:
[0037]
[0038] In the formula: MSE(j,s) represents the mean square error of the partition obtained when feature j and split point s are selected; n represents the total number of samples.
[0039] The algorithm aims to find the combination that minimizes the above error among all possible features j and the splitting threshold s, i.e.:
[0040] (j * ,s * ) = argmin j,s MSE(j,s) (8);
[0041] In the formula: MSE(j,s) is the mean square error generated when dividing points s using feature j; j * s * These are the optimal feature and the optimal split point selected for the final splitting;
[0042] a3: Train a decision tree for each subset of the dataset until all decision trees have been trained;
[0043] For each subset D (t) Using recursive partitioning (the previous part of the MSE minimization formula (8) to construct the regression tree h) t (x):
[0044] h t (x) = DecisionTreeTrain(D (t) (9);
[0045] In the formula: DecisionTreeTrain represents the training process based on the MSE minimization criterion.
[0046] a4: For regression problems, the prediction result is determined by taking the average value.
[0047] For regression tasks, the prediction results of random forests are calculated using the arithmetic mean of the outputs of each decision tree, i.e.:
[0048]
[0049] In the formula: h is the final predicted value for the input sample x; t (x) is the predicted value of the t-th tree for sample x; T is the total number of trees.
[0050] Step 2 includes:
[0051] b1: Soft Cream Search Strategy:
[0052] As shown in the following formula:
[0053]
[0054] In the above formula: n i This represents the value of the i-th particle at its current position; n i-k This represents the value of the particle k positions prior to the i-th particle; n i-1 n represents the value of the preceding particle adjacent to the i-th particle; i+1 The value of the next adjacent particle to the i-th particle; n i+k This represents the value of a particle k positions away from the i-th particle; k represents the radius of the search range.
[0055]
[0056] In the above formula: R represents the updated position of the particle; i represents the particle number; j represents the dimension number, i.e., the current position coordinate of the particle in the j-th dimension; best,j Let represent the position coordinates of the globally optimal particle in the current population in the j-th dimension.
[0057] The parameter r1 is a random number in the range (-1, 1), and r1 controls the direction of particle motion;
[0058] cosθ will change with the number of iterations;
[0059] β is an environmental factor that follows the number of iterations to simulate the influence of the external environment and is used to ensure the convergence of the algorithm;
[0060] h is the adhesion degree, which is a random number in the range (0,1) and is used to control the distance between the centers of two fog particles;
[0061] b Uij and b Lij These are the upper and lower bounds of the escape space, representing the effective region for restricting particle motion.
[0062] E is the adhesion coefficient, which affects the agglomeration probability of the agent and increases with the number of iterations.
[0063] r2 is a random number in the range (0,1), which, together with E, controls whether particles condense, i.e. whether particle positions are updated.
[0064]
[0065] In the above formula: t is the current iteration number; T is the maximum number of iterations of the algorithm.
[0066]
[0067] In the above formula: the mathematical model of β is a step function; [·] indicates rounding; the default value of w is 5, which is used to control the number of segments in the step function.
[0068] b2: Hard Frost Puncture Mechanism:
[0069] This hard frost puncture mechanism allows particles in the RIME algorithm to exchange with each other, improving the algorithm's convergence speed and ability to escape local optima. The formula for inter-particle substitution is as follows:
[0070]
[0071] In the above formula: R represents the updated position information (coordinates) of the i-th particle in the j-th dimension; best,j F represents the position coordinates of the globally optimal particle in the current population in the j-th dimension; normr r3 is the normalized value of the current agent's fitness, indicating the chance of the i-th rime-agent being selected; r3 is a random number in the range (-1, 1); F normr (S i S represents the fitness value S of the current i-th agent. i The normalized result typically ranges from [0,1] and is used to measure the probability that the individual is selected for position updating; S i Let represent the fitness value of the i-th agent, which is the performance evaluation value calculated by the objective function for this individual in the current iteration, such as error, objective function value, etc.
[0072] b3: Positive Greed Mechanism:
[0073] A forward greedy mechanism is used for population updates in the metaheuristic optimization algorithm RIME. This forward greedy mechanism determines whether to replace an individual by comparing its updated fitness value with its original value, and simultaneously replaces the solutions of both individuals.
[0074] In a positively greedy mechanism, the population update rules are as follows:
[0075]
[0076] In the formula: (X a ,X b () represents the parameter combination before optimization; (X) a′ ,X b′ ) represents the optimized parameter combination; X a X is the solution vector for the current individual a; b Let f(·) be the solution vector of another individual b compared with it; f(·) is the fitness function; X a′ X b′ These are the two individual solutions after the update; "<" indicates that the comparison sign is reversed for a minimization problem.
[0077] In step 2, the RIME (Frost Ice Optimization) algorithm is used to optimize hyperparameters such as the number of trees in the random forest and the minimum number of leaf nodes during the call to the Random Forest (RF) algorithm.
[0078] Let the hyperparameter vector to be optimized be:
[0079] P = [n tree ,n leaf (17);
[0080] Where: n tree n is the number of decision trees in the random forest. leaf The minimum number of samples in the leaf node.
[0081] In the RIME algorithm, each individual (particle) corresponds to a candidate combination of hyperparameters:
[0082]
[0083] In the formula: i is the individual ID, X i ∈Ω, where Ω is the search space, defined by the upper and lower bounds of the hyperparameter values; The hyperparameter representing the number of random forest trees corresponding to the i-th individual; The hyperparameter representing the minimum number of leaf nodes in the random forest corresponding to the i-th individual is denoted as .
[0084] To evaluate the performance of each hyperparameter combination, the mean squared error (MSE) on the validation set is used as the fitness function:
[0085]
[0086] In the formula: F(X) i ) represents the fitness value of the i-th individual; N val y is the number of samples in the validation set; m This represents the true output value of the m-th validation set sample. To use parameter X i The predicted output value of the trained RF model on this sample; m represents the index number of the validation set sample.
[0087] In step 3, a photovoltaic power prediction model based on the VMD-CNN-GRU-SE attention mechanism optimized by Black-winged Kite Optimization (BKA) is designed. It is trained by combining the original and downscaled numerical weather prediction (NWP) data with power data. The model uses variational mode decomposition to process non-stationary signals, CNN to extract deep features, GRU to capture temporal dependencies, and the SE module to dynamically relabel channel weights.
[0088] Step 3, based on Black-winged Kite Optimization (BKA), includes:
[0089] 1) Population initialization:
[0090] Distribute the position of each black-winged kite evenly:
[0091] X i =BK lb +rand(BK ub -BK lb (20);
[0092] Among them, X i Let $\mathbf{i}$ represent the position vector (current position) of the $i$-th black-winged kite, composed of position values for each dimension, used to represent the solution of an individual in the population; $i$ is an integer between 1 and $pop$, and $BK$ is the base vector. lb and BK ub are the lower and upper bounds of the j-th dimension Blackwing Kite, respectively, and rand is a value randomly selected between [0,1].
[0093] During initialization, BKA selects the individual with the best fitness value as the leader in the initial group, which is considered the optimal position for the Black-winged Kite. Below is the mathematical representation of the initial leader XL, using the minimum value as an example:
[0094]
[0095] Among them, f best min(f(X)) represents the optimal (minimum) fitness value in the current population, used to measure the performance of the best individual in the population; i)) represents selecting the minimum value from the set of fitness values {f(X1), f(X2), ..., f(Xpop)} of all individuals (taking a minimization problem as an example); f(X i ) represents the i-th individual (position vector X) i The fitness value of X is the performance evaluation value obtained by substituting the position Xi into the objective function f(·); L X(find(f) represents the position vector of the individual with the best fitness value in the current population, i.e., the leader in the initial stage; best ==f(X) i ))) indicates that a fitness value equal to f has been found. best The `find(f)` function returns the individual's index and its location vector. best ==f(X) i )) represents the search population where the fitness value equals the current best fitness value f. best Individual ID (index); f best ==f(X) i () indicates whether the fitness value of the i-th individual is equal to the optimal fitness value f. best This is used to determine the location of the optimal individual.
[0096] 2) Attack behavior:
[0097] Mathematical model of Blackwing Kite attack behavior:
[0098]
[0099] In the formula, This represents the position of the i-th Black-winged Kite individual in the (t+1)-th iteration (i.e., the position of the next generation); Let represent the current position of the i-th Black-winged Kite individual in the t-th iteration (i.e., the position of the current generation); r is a random number between 0 and 1; p is a constant of 0.9; T is the total number of iterations, and t is the number of iterations completed so far.
[0100] 3) Migration behavior:
[0101] Mathematical model of black-winged kite migration behavior:
[0102]
[0103] in, This represents the position of the i-th Black-winged Kite individual in the (t+1)-th iteration (i.e., the position of the next generation); Let C(0,1) represent the current position of the i-th Black-winged Kite individual in the t-th iteration (i.e., the position of the current generation); C(0,1) represents a standard normal distribution (Gaussian distribution) with a mean of 0 and a standard deviation of 1, used to increase the randomness of the search. F represents the leading scorer of the i-th dimension black-winged kite in the t-th iteration so far; i F represents the current position in dimension j obtained by any black-winged kite in the t-th iteration; ri Let C(0,1) represent the fitness value of any black-winged kite at a random position in the j-th dimension during the t-th iteration; C(0,1) represents the Cauchy mutation; m represents a perturbation factor or coefficient of variation defined by a trigonometric function (including sine) to adjust the amplitude of position updates and increase the flexibility of position changes.
[0104]
[0105] Where r represents a random number between 0 and 1;
[0106] The probability density function of the one-dimensional Cauchy distribution is:
[0107]
[0108] Where f(x,δ,μ) represents the probability density function of the Cauchy distribution; x represents the point where the probability is to be calculated under the distribution, i.e., the position value of an individual in a certain dimension; δ represents the scale parameter of the Cauchy distribution, which controls the "width" of the distribution; and μ represents the position parameter of the Cauchy distribution, i.e., the center point of the distribution.
[0109] When ō = 1 and μ = 0, its probability density function becomes the standard form, and the exact formula is as follows:
[0110]
[0111] Step 3 employs a photovoltaic power prediction model based on the VMD-CNN-GRU-SE attention mechanism optimized by Black-winged Kite Optimization (BKA), specifically including:
[0112] 1) Photovoltaic power data is generated using a two-dimensional convolutional network, as shown in the following formula:
[0113]
[0114] Y = W * X (29);
[0115] In the above formula, y ij ω represents the number of the output feature map at position (i,j) after a 2D convolution operation; uv This represents the weight parameter in the u-th row and v-th column of the convolution kernel (filter W); x i-u+1,j-v+1 Y represents the local region value in the input data X corresponding to the convolution kernel position (u,v); i and j are the output subscripts of the convolution; uv represents the dimension subscript of the convolution kernel; Y represents the output feature map of the convolution operation; X is the input data matrix; W is the filter.
[0116] 2) The operating mechanism of the gated recurrent unit (GRU) network is as follows:
[0117]
[0118] In the formula, r t z t These are the reset door and the update door, respectively; h t The hidden state to be passed to the next time step; h tt For candidate hidden states; x t Enter information for the current moment; h t-1 The hidden state is the value from the previous time step; σ is the sigmoid activation function; tanh is the activation function that assigns the data to [-1, 1]; W z [h t-1 ,x t [Indicates updating gate z] t The weighting term; W r [h t-1 ,x t ] indicates resetting the gate r t The weighting term; W h [h t-1 ,x t ] represents the candidate hidden state h tt The weighting calculation item; b z This indicates updating the offset in the gate; b r This indicates resetting the offset within the door; b h This represents the offset in the calculation of the candidate hidden state.
[0119] 3) VMD decomposes the original complex signal into K intrinsic mode functions (IMFs) with finite bandwidth and extracts the center frequency of each IMF. The decomposition process is as follows:
[0120] S3.1: Perform Hilbert transform on the original signal to modulate the signal spectrum to the corresponding frequency band:
[0121]
[0122] In the formula: H(t) represents the analyzed signal after Hilbert transform and modulation; δ(t) is the impulse function; u k (t) represents the k-th modal component after decomposition; t is time; ω k For the corresponding IMF component u k The center frequency of (t); This represents the complex exponential modulation factor.
[0123] S3.2: Calculate the L2 norm of the squared gradient of the demodulated signal, with the constrained variational model as follows:
[0124]
[0125] In the above formula: f represents the original input signal; ||i|| represents the square of the L2 norm; {u k} represents the set of all IMF components; {ω k} represents the set of center frequencies of all IMF components; k represents the subscript of the modal component.
[0126] S3.3: To transform a constrained problem into an unconstrained problem, the Lagrangian function is introduced:
[0127]
[0128] In the above formula: L(u k ,ω k λ) represents the Lagrange function; f(t) represents the original input signal; λ(t) represents the functional form of the Lagrange multiplier; λ represents the Lagrange multiplier; α represents the penalty factor;
[0129] S3.4: To solve equation (33) using the alternating direction multiplier algorithm, continuously update λ until k IMF components are obtained. n+1 ,Right now:
[0130]
[0131] In the above formula: λ n+1 (ω) represents the frequency domain of the Lagrange multipliers in the (n+1)th iteration; λ n (ω) represents the frequency domain of the Lagrange multipliers in the nth iteration; τ represents the time constant; f(ω) represents the frequency domain representation of the original input signal; This represents the frequency domain representation of the k-th IMF component during the (n+1)-th iteration.
[0132] S3.5: Set the judgment precision ε>0, and stop the iteration when equation (34) is satisfied:
[0133]
[0134] In the above formula: Let represent the representation of the k-th IMF component in the frequency domain ω during the n-th iteration.
[0135] 4) The SE (Squeeze-and-Excitation) attention mechanism achieves adaptive adjustment of feature channels through two stages.
[0136] Working principle: The original input data X' (spatial dimension H'×W', number of channels C') is generated into a feature map X (spatial dimension H×W, number of channels C) through convolution operation. During this process, the SE module compresses spatial information through global average pooling, and then generates channel weight vectors through a multilayer perceptron, which accurately enhances key feature channels and suppresses redundant information.
[0137] First, F tr This step is a transformation operation, which involves performing a convolution on the input features for any given transformation F. tr The input X is mapped to the feature map U, as defined in equation (35):
[0138] Ftr:X→U,X∈R H′×W′×C′ ,U∈R H×W×C (35);
[0139] In the above formula: R H′×W′×C′ R represents the dimensional space of the original input data X'; H×W×C This represents the dimensional space of the feature map U after the convolution operation.
[0140] Next is the Squeeze operation, which uses global average pooling to reduce the dimensionality of the input feature map in space and extract global information. The specific calculation formula is shown in equation (36):
[0141]
[0142] Where z represents the global feature, F sq (x) represents the function representation of the Squeeze operation; F sq This represents the squeeze operation, where x represents the input feature map, H is the height of the feature map, W is the width of the feature map, and u... c (i,j) is the feature vector of the pixel in the i-th row and j-th column.
[0143] Therefore, formula (36) transforms the input of U[H×W×C] into the output of Z[1×1×C], where C is the number of channels in the input feature map.
[0144] The excitation operation uses the sigmoid function to convert the learned channel correlations into probability values of 0 to 1, representing the importance score of each channel. These scores are used to weight the feature responses of each channel, thereby strengthening important channel features and suppressing unimportant channel features, as shown in equation (37).
[0145] s = f ex (z,W)=σ(W2δ(W1z)) (37);
[0146] Where s represents the incentive score vector; fex (z,W) represents the activation function; δ(W1z) represents the result of the ReLU activation function applied to W1z; f ex The values represent the activation operations, W1 and W2 weight matrices; σ is the Sigmoid function; and δ is the ReLU activation function.
[0147] The prediction model, built upon historical operational data and deep learning methods, first reconstructs the time-series data into feature-label pairs: using weather parameters and load data at the current sampling time as features, and load data at subsequent sampling times as labels, to form a supervised learning sample set. The complete prediction process includes the following steps:
[0148] Step 1: Normalize the original dataset and divide it into training, validation and test sets according to the proportions.
[0149] Step 2: VMD decomposes the original complex signal into K intrinsic mode functions (IMFs) with finite bandwidth and extracts the center frequency of the corresponding IMF;
[0150] Step 3: Deep feature extraction is performed on the time series data preprocessed by Variational Mode Decomposition (VMD) using a CNN network;
[0151] Step 4: Input the feature sequences processed by the CNN network into the GRU network, and use its gating mechanism to capture the temporal dependencies of the power data;
[0152] Step 5: Recalibrate the channel weights of the hidden states output by the GRU network using the SE module to enhance key timing features and suppress noise interference;
[0153] Global average pooling is performed on the hidden state matrix HHH output by the GRU along the time dimension to obtain the global feature description vector s for each channel:
[0154]
[0155] In the formula: H t,c This represents the hidden state value of the c-th channel at time step t; s c represents the global average feature value of the c-th channel; T represents the total number of time steps.
[0156] Inputting the channel description vector s into the channel weight generation module, which consists of two fully connected layers, yields the channel weight vector w:
[0157] w=σ(W2δ(W1s)) (39);
[0158] In the formula: W1 represents the weight matrix of the first fully connected layer; W2 represents the weight matrix of the second fully connected layer; r is the channel compression ratio, used to reduce computation and increase nonlinearity; δ(·) represents the ReLU activation function; σ(·) represents the Sigmoid activation function; w represents the normalized channel weight vector.
[0159] Multiply the channel weight vector w element-wise with the original GRU output hidden state H for each channel to obtain the weighted hidden state matrix.
[0160]
[0161] In the formula: This represents the hidden state matrix after channel weight recalibration; w c Let be the weight value of the c-th channel.
[0162] Step 6: After the reweighted features are mapped through the fully connected layer, they are restored to the actual power prediction value through inverse normalization, and the model parameters are saved simultaneously.
[0163] The reweighted feature z is mapped to a normalized power prediction vector through a fully connected layer.
[0164]
[0165] In the formula: W fc b is the weight matrix of the fully connected layer; fc φ is the bias vector of the fully connected layer; φ(·) is the activation function, which can be taken as the identity mapping if it is a linear regression. This is the normalized predicted value output by the network.
[0166] During training, Min–Max normalization is used, linearly scaling to [a, b], commonly [0, 1]. The normalized form of the original sample y is:
[0167]
[0168] The corresponding inverse normalization is:
[0169]
[0170] In the formula: y min y max It is the minimum / maximum power scalar or dimensionally stored vector recorded in the training set (or used during normalization); a, b represent the left and right endpoints of the Min–Max normalization interval.
[0171] Step 7: Use the test set to verify the model's ability to predict future power, and evaluate the model's accuracy by comparing the predicted values with the measured data.
[0172] This invention provides a photovoltaic power output prediction method based on RIME-RF spatial downscaling, with the following technical advantages:
[0173] 1) In step 1 of this invention, photovoltaic power plant power data, local meteorological observation (LMD) data, and numerical weather prediction (NWP) data are simultaneously collected during the data input stage. Common data is extracted to construct a fused input feature set, achieving complementarity between macro-meteorological trends and local fine-grained meteorological features. Compared with existing prediction methods that rely solely on a single data source, this strategy significantly reduces prediction bias caused by data source limitations, improves the completeness and representativeness of input features, and thus enhances the model's generalization ability and stability under different meteorological conditions.
[0174] 2) In step 2 of this invention, during the NWP data spatial downscaling process, the Frost and Ice Optimization (RIME) algorithm is used to adaptively optimize the hyperparameters of the Random Forest (RF) model globally. This overcomes the shortcomings of existing methods that rely on manual experience to set parameters and struggle to balance accuracy and stability. The RIME algorithm can efficiently search for the optimal parameter combination in high-dimensional space, enabling the RF model to dynamically adjust for different regional meteorological characteristics, achieving simultaneous improvement in downscaling accuracy and generalization performance. This automated and high-precision parameter optimization strategy differs from existing technologies.
[0175] 3) Step 3 of this invention proposes a VMD-CNN-GRU-SE photovoltaic power prediction model based on Black-winged Kite Optimization (BKA). Variational Mode Decomposition (VMD) reduces the non-stationarity of the original sequence, Convolutional Neural Network (CNN) extracts local mode features, Gated Recurrent Unit (GRU) models temporal dependencies, Squeeze-and-Excitation (SE) modules adaptively allocate feature channel weights, and the BKA algorithm globally optimizes the key hyperparameters of multiple modules. Compared with existing single or unoptimized combined models, this method maintains high accuracy and stability under complex and variable weather conditions, achieving collaborative optimization of signal decomposition, feature extraction, temporal modeling, and dynamic weighting. Attached Figure Description
[0176] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0177] Figure 1 This is a flowchart of the present invention.
[0178] Figure 2 This is a diagram of the random forest algorithm structure.
[0179] Figure 3 A diagram illustrating the RIME-RF hyperparameter optimization process.
[0180] Figure 4A diagram illustrating the RIME-RF hyperparameter optimization process.
[0181] Figure 5(a) shows the performance of the RIME-RF regression model. Figure 1 ;
[0182] Figure 5(b) shows the performance of the RIME-RF regression model. Figure 2 ;
[0183] Figure 5(c) shows the performance of the RIME-RF regression model. Figure 3 ;
[0184] Figure 5(d) shows the performance of the RIME-RF regression model. Figure 4 .
[0185] Figure 6(a) shows the scatter density of the RIME-RF model. Figure 1 ;
[0186] Figure 6(b) shows the scatter density of the RIME-RF model. Figure 2 ;
[0187] Figure 6(c) shows the scatter density of the RIME-RF model. Figure 3 . Detailed Implementation
[0188] A photovoltaic power output prediction method based on RIME-RF spatial downscaling is proposed. First, historical power generation data from photovoltaic power plants in the target area, along with numerical weather prediction (NWP) and local meteorological observation (LMD) data, are collected. Total irradiance from both is used as an input-target pair to construct a feature set. Then, the RIME optimization algorithm is used to optimize hyperparameters such as the number of trees and the minimum number of leaf nodes in the random forest, constructing a RIME-RF model for high-precision spatial downscaling of the NWP data. Next, a prediction model based on Black-winged Kite Optimization (BKA) using a VMD-CNN-GRU-SE attention mechanism is designed. This model is trained using both original and downscaled NWP data combined with power data. Variational mode decomposition is used to process non-stationary signals, CNN extracts deep features, GRU captures temporal dependencies, and the SE module dynamically relabels channel weights. Finally, the method is validated on a test set, demonstrating that it significantly reduces downscaling errors and improves short-term power prediction accuracy, providing an efficient and reliable technical solution for photovoltaic power output prediction.
[0189] The photovoltaic power output prediction method based on RIME-RF spatial downscaling includes the following steps:
[0190] Step 1: Collect photovoltaic power data and local meteorological observation (LMD) data of photovoltaic power plants in the target area, extract common data between numerical weather prediction (NWP) data and local meteorological observation (LMD) data, and construct input feature set;
[0191] Step 2: Optimize the hyperparameters of the Random Forest (RF) algorithm based on the Frost Ice Optimization (RIME) algorithm, construct the RIME-RF model, and perform high-precision spatial downscaling on numerical weather prediction (NWP) data;
[0192] Step 3: A photovoltaic power prediction model based on the VMD-CNN-GRU-SE attention mechanism optimized by Black-winged Kite Optimization (BKA) is adopted. The prediction model is trained using the original numerical weather prediction (NWP) data combined with photovoltaic power data, and the prediction model is trained using the spatially downscaled numerical weather prediction (NWP) data combined with photovoltaic power data.
[0193] Step 4: Validation on the test set shows that the proposed method significantly reduces downscaling error and improves short-term power prediction accuracy, providing an efficient and reliable technical solution for photovoltaic power output prediction.
[0194] In step 1, common data between low-resolution numerical weather prediction (NWP) data and high-resolution local meteorological observation (LMD) data are extracted. The raw data in the numerical weather prediction (NWP) data contains total irradiance, and the raw data in the local meteorological observation (LMD) data contains total irradiance. These are used as input and target data, respectively, to construct an input feature set.
[0195] In step 2, the input feature set is read, and the RIME-RF model is used to spatially downscale the numerical weather prediction (NWP) data. During the call to the random forest (RF) algorithm, the frost optimization (RIME) algorithm is used to optimize the hyperparameters of the random forest, such as the number of trees and the minimum number of leaf nodes, so that it can be closer to the high-resolution local meteorological observation (LMD) data, and the high-resolution numerical weather prediction (NWP) data fitting value is output.
[0196] In step 2, the Frost Ice Optimization (RIME) algorithm includes the following steps:
[0197] a1: Randomly extract multiple subsets of the input feature set;
[0198] Let the input feature set be:
[0199] D = {(x1,y1),(x2,y2),…,(x N ,y N )}(1);
[0200] Where the total number of samples is D; (x1, y1) represents the first sample and its label; (x2, y2) represents the second sample and its label; (x N ,y N ) represents the Nth sample and its label.
[0201] If a random forest is constructed with T trees, then T subsets of the dataset need to be generated:
[0202] D (t) =Bootstrap(D,N),t=1,2,…,T(2);
[0203] Where: D (t) The training subset of the t-th tree is represented; Bootstrap(D,N) means that N samples are drawn with replacement from D to form a new dataset; T represents the total number of subsets to be generated.
[0204] a2: By recursively partitioning the feature space (e.g., minimizing the mean squared error MSE), the subset of data is split into child nodes until the stopping condition (e.g., maximum depth, minimum number of samples) is met, thereby constructing a decision tree;
[0205] Given a feature dimension j∈{1,2,…,d} and a splitting threshold s, where d represents the total dimension of the features, the data is divided into two subsets: left and right.
[0206] Left subset:
[0207] D L (j,s)={(x i ,y i )∈D∣x ij ≤s} (3);
[0208] In the formula: D L (j,s) represents the subset of samples that are less than or equal to the splitting threshold s in the j-th feature dimension; j is the feature dimension index; s is the feature splitting threshold; x ij This represents the value of the i-th sample in the j-th feature dimension.
[0209] Right Subset:
[0210] D R (j,s)={(x i ,y i )∈D∣x ij >s} (4);
[0211] In the formula: D R (j,s) represents the subset of samples that are greater than the segmentation threshold s in the j-th feature dimension.
[0212] Under this partition, the average target values of the left and right subsets are respectively:
[0213] Left subset mean:
[0214]
[0215] In the formula: The average value of the target values in the left subset; Describing the left subset D L The average value of the target value (label); D L y represents the set of samples that fall into the left subset; i This represents the true target value of the i-th sample.
[0216] Right subset mean:
[0217]
[0218] In the formula: D is the average of the objective values in the right subset; R This represents the set of samples that are included in the right subset.
[0219] The mean square error (MSE) corresponding to this partition is defined as:
[0220]
[0221] In the formula: MSE(j,s) represents the mean square error of the partition obtained when feature j and split point s are selected; n represents the total number of samples.
[0222] The algorithm aims to find the combination that minimizes the above error among all possible features j and the splitting threshold s, i.e.:
[0223] (j * ,s * ) = argmin j,s MSE(j,s)(8);
[0224] In the formula: MSE(j,s) is the mean square error generated when dividing points s using feature j; j * s * These are the optimal feature and the optimal split point selected for the final splitting;
[0225] a3: Train a decision tree for each subset of the dataset until all decision trees have been trained;
[0226] For each subset D (t) Using recursive partitioning (the previous part of the MSE minimization formula (8) to construct the regression tree h) t (x):
[0227] h t (x) = DecisionTreeTrain(D (t) (9);
[0228] In the formula: DecisionTreeTrain represents the training process based on the MSE minimization criterion.
[0229] a4: For regression problems, the prediction result is determined by taking the average value.
[0230] For regression tasks, the prediction results of random forests are calculated using the arithmetic mean of the outputs of each decision tree, i.e.:
[0231]
[0232] In the formula: h is the final predicted value for the input sample x; t (x) is the predicted value of the t-th tree for sample x; T is the total number of trees.
[0233] Since single trees are prone to overfitting, the Random Forest (RF) algorithm reduces the reliance on a single decision tree by using "random sampling" and "random feature selection," thus avoiding overfitting.
[0234] Step 2 includes:
[0235] b1: Soft Cream Search Strategy:
[0236] By simulating the motion of soft frost particles in frozen ice, a stepwise search and development method is proposed for the exploration algorithm. This strategy allows the algorithm to switch between large-scale exploration and small-scale development, thereby achieving efficient and high-precision optimization. The equation is shown below:
[0237]
[0238] In the above formula: n i This represents the value of the i-th particle at its current position; n i-k This represents the value of the particle k positions prior to the i-th particle; n i-1 n represents the value of the preceding particle adjacent to the i-th particle; i+1 The value of the next adjacent particle to the i-th particle; n i+k This represents the value of a particle k positions away from the i-th particle; k represents the radius of the search range.
[0239]
[0240] In the above formula: R represents the updated position of the particle; i represents the particle number; j represents the dimension number, i.e., the current position coordinate of the particle in the j-th dimension; best,j Let represent the position coordinates of the globally optimal particle in the current population in the j-th dimension.
[0241] The parameter r1 is a random number in the range (-1, 1), and r1 controls the direction of particle motion;
[0242] cosθ will change with the number of iterations;
[0243] β is an environmental factor that follows the number of iterations to simulate the influence of the external environment and is used to ensure the convergence of the algorithm;
[0244] h is the adhesion degree, which is a random number in the range (0,1) and is used to control the distance between the centers of two fog particles;
[0245] b Uij and b Lij These are the upper and lower bounds of the escape space, representing the effective region for restricting particle motion.
[0246] E is the adhesion coefficient, which affects the agglomeration probability of the agent and increases with the number of iterations.
[0247] r2 is a random number in the range (0,1), which, together with E, controls whether particles condense, i.e. whether particle positions are updated.
[0248]
[0249] In the above formula: t is the current iteration number; T is the maximum number of iterations of the algorithm.
[0250]
[0251] In the above formula: the mathematical model of β is a step function; [·] indicates rounding; the default value of w is 5, which is used to control the number of segments in the step function.
[0252] b2: Hard Frost Puncture Mechanism:
[0253] This hard frost puncture mechanism allows particles in the RIME algorithm to exchange with each other, improving the algorithm's convergence speed and ability to escape local optima. The formula for inter-particle substitution is as follows:
[0254]
[0255] In the above formula: R represents the updated position information (coordinates) of the i-th particle in the j-th dimension; best,j F represents the position coordinates of the globally optimal particle in the current population in the j-th dimension; normr r3 is the normalized value of the current agent's fitness, indicating the chance of the i-th rime-agent being selected; r3 is a random number in the range (-1, 1); F normr (S i S represents the fitness value S of the current i-th agent. iThe normalized result typically ranges from [0,1] and is used to measure the probability that the individual is selected for position updating; S i Let represent the fitness value of the i-th agent, which is the performance evaluation value calculated by the objective function for this individual in the current iteration, such as error, objective function value, etc.
[0256] b3: Positive Greed Mechanism:
[0257] A forward greedy mechanism is used for population updates in the metaheuristic optimization algorithm RIME. This forward greedy mechanism determines whether to replace an individual by comparing its updated fitness value with its original value, and simultaneously replaces the solutions of both individuals.
[0258] In a positively greedy mechanism, the population update rules are as follows:
[0259]
[0260] In the formula: (X a ,X b () represents the parameter combination before optimization; (X) a′ ,X b′ ) represents the optimized parameter combination; X a X is the solution vector for the current individual a; b Let f(·) be the solution vector of another individual b compared with it; f(·) is the fitness function; X a′ X b′ These are the two individual solutions after the update; "<" indicates that the comparison sign is reversed for a minimization problem.
[0261] This mechanism not only ensures the continuous availability of excellent individuals, improving the quality of the global solution, but also guarantees that the population evolves towards a better direction in each iteration.
[0262] In step 2, the RIME (Frost Ice Optimization) algorithm is used to optimize hyperparameters such as the number of trees in the random forest and the minimum number of leaf nodes during the call to the Random Forest (RF) algorithm.
[0263] Let the hyperparameter vector to be optimized be:
[0264] P = [n tree ,n leaf (17);
[0265] Where: n tree n is the number of decision trees in the random forest. leaf The minimum number of samples in the leaf node.
[0266] In the RIME algorithm, each individual (particle) corresponds to a candidate combination of hyperparameters:
[0267]
[0268] In the formula: i is the individual ID, X i ∈Ω, where Ω is the search space, defined by the upper and lower bounds of the hyperparameter values; The hyperparameter representing the number of random forest trees corresponding to the i-th individual; The hyperparameter representing the minimum number of leaf nodes in the random forest corresponding to the i-th individual is denoted as .
[0269] To evaluate the performance of each hyperparameter combination, the mean squared error (MSE) on the validation set is used as the fitness function:
[0270]
[0271] In the formula: F(X) i ) represents the fitness value of the i-th individual; N val y is the number of samples in the validation set; m This represents the true output value of the m-th validation set sample. To use parameter X i The predicted output value of the trained RF model on this sample; m represents the index number of the validation set sample.
[0272] The optimization process is shown in Figure 5. The Frost Ice Optimization (RIME) algorithm significantly improves the performance of the Random Forest (RF) algorithm.
[0273] In step 3, a photovoltaic power prediction model based on the VMD-CNN-GRU-SE attention mechanism optimized by Black-winged Kite Optimization (BKA) is designed. It is trained by combining the original and downscaled numerical weather prediction (NWP) data with power data. The model uses variational mode decomposition to process non-stationary signals, CNN to extract deep features, GRU to capture temporal dependencies, and the SE module to dynamically relabel channel weights.
[0274] Step 3, based on Black-winged Kite Optimization (BKA), includes:
[0275] 1) Population initialization:
[0276] As with most optimization algorithms, the position of each black-winged kite is evenly distributed:
[0277] X i =BK lb +rand(BK ub -BK lb (20);
[0278] Among them, X iLet $\mathbf{i}$ represent the position vector (current position) of the $i$-th black-winged kite, composed of position values for each dimension, used to represent the solution of an individual in the population; $i$ is an integer between 1 and $pop$, and $BK$ is the base vector. lb and BK ub are the lower and upper bounds of the j-th dimension Blackwing Kite, respectively, and rand is a value randomly selected between [0,1].
[0279] During initialization, BKA selects the individual with the best fitness value as the leader in the initial group, which is considered the optimal position for the Black-winged Kite. Below is the mathematical representation of the initial leader XL, using the minimum value as an example:
[0280]
[0281] Among them, f best min(f(X)) represents the optimal (minimum) fitness value in the current population, used to measure the performance of the best individual in the population; i )) represents selecting the minimum value from the set of fitness values {f(X1), f(X2), ..., f(Xpop)} of all individuals (taking a minimization problem as an example); f(X i ) represents the i-th individual (position vector X) i The fitness value of X is the performance evaluation value obtained by substituting the position Xi into the objective function f(·); L X(find(f) represents the position vector of the individual with the best fitness value in the current population, i.e., the leader in the initial stage; best ==f(X) i ))) indicates that a fitness value equal to f has been found. best The `find(f)` function returns the individual's index and its location vector. best ==f(X) i )) represents the search population where the fitness value equals the current best fitness value f. best Individual ID (index); f best ==f(X) i () indicates whether the fitness value of the i-th individual is equal to the optimal fitness value f. best This is used to determine the location of the optimal individual.
[0282] 2) Attack behavior:
[0283] The black-winged kite is a predator of small mammals and insects on the grasslands. It moves with the wind in the air, rapidly changing the angle of its wingtips, hovering silently, and then swiftly swooping down to attack its prey. This strategy includes various attack behaviors used for global exploration and searching. Below is a mathematical model of the black-winged kite's attack behavior:
[0284]
[0285] In the formula, This represents the position of the i-th Black-winged Kite individual in the (t+1)-th iteration (i.e., the position of the next generation); Let represent the current position of the i-th Black-winged Kite individual in the t-th iteration (i.e., the position of the current generation); r is a random number between 0 and 1; p is a constant of 0.9; T is the total number of iterations, and t is the number of iterations completed so far.
[0286] 3) Migration behavior:
[0287] Bird migration is a complex behavior influenced by environmental factors such as climate and food supply. Birds migrate to adapt to seasonal changes and obtain better living conditions and resources. This invention proposes a hypothesis based on bird migration: during migration, individuals with superior navigational abilities assume a leadership role, and their path decisions directly affect the group's migration success rate. A dynamic leadership adjustment mechanism is proposed: when the group's current fitness is lower than that of a random sample, the leader voluntarily relinquishes navigational control; conversely, it continues to lead the migration direction. This mechanism achieves dynamic selection of leaders through real-time fitness assessment, effectively improving the migration success rate.
[0288] The following is a mathematical model of the migration behavior of black-winged kites:
[0289]
[0290] in, This represents the position of the i-th Black-winged Kite individual in the (t+1)-th iteration (i.e., the position of the next generation); Let C(0,1) represent the current position of the i-th Black-winged Kite individual in the t-th iteration (i.e., the position of the current generation); C(0,1) represents a standard normal distribution (Gaussian distribution) with a mean of 0 and a standard deviation of 1, used to increase the randomness of the search. F represents the leading scorer of the i-th dimension black-winged kite in the t-th iteration so far; i F represents the current position in dimension j obtained by any black-winged kite in the t-th iteration; ri Let C(0,1) represent the fitness value of any black-winged kite at a random position in the j-th dimension during the t-th iteration; C(0,1) represents the Cauchy mutation; m represents a perturbation factor or coefficient of variation defined by a trigonometric function (including sine) to adjust the amplitude of position updates and increase the flexibility of position changes.
[0291]
[0292] Where r represents a random number between 0 and 1;
[0293] The Cauchy distribution is a continuous probability distribution with two parameters. The probability density function of the one-dimensional Cauchy distribution is:
[0294]
[0295] Where f(x,δ,μ) represents the probability density function of the Cauchy distribution; x represents the point where the probability is to be calculated under the distribution, i.e., the position value of an individual in a certain dimension; δ represents the scale parameter of the Cauchy distribution, which controls the "width" of the distribution; and μ represents the position parameter of the Cauchy distribution, i.e., the center point of the distribution.
[0296] When ō = 1 and μ = 0, its probability density function becomes the standard form, and the exact formula is as follows:
[0297]
[0298] Step 3 employs a photovoltaic power prediction model based on the VMD-CNN-GRU-SE attention mechanism optimized by Black-winged Kite Optimization (BKA), specifically including:
[0299] 3) Photovoltaic power data is a typical multi-feature single-label time series, requiring the use of a two-dimensional convolutional network, as shown in the following formula:
[0300]
[0301] Y = W * X (29);
[0302] In the above formula, y ij ω represents the number of the output feature map at position (i,j) after a 2D convolution operation; uv This represents the weight parameter in the u-th row and v-th column of the convolution kernel (filter W); x i-u+1,j-v+1 Y represents the local region value in the input data X corresponding to the convolution kernel position (u,v); i and j are the output subscripts of the convolution; uv represents the dimension subscript of the convolution kernel; Y represents the output feature map of the convolution operation; X is the input data matrix; W is the filter.
[0303] 4) The operating mechanism of the gated cyclic unit (GRU) network is as follows:
[0304]
[0305] In the formula, r t z t These are the reset door and the update door, respectively; h t The hidden state to be passed to the next time step; h tt For candidate hidden states; x t Enter information for the current moment; h t-1 The hidden state is the value from the previous time step; σ is the sigmoid activation function; tanh is the activation function that assigns the data to [-1, 1]; W z [h t-1,x t [Indicates updating gate z] t The weighting term; W r [h t-1 ,x t ] indicates resetting the gate r t The weighting term; W h [h t-1 ,x t ] represents the candidate hidden state h tt The weighting calculation item; b z This indicates updating the offset in the gate; b r This indicates resetting the offset within the door; b h This represents the offset in the calculation of the candidate hidden state.
[0306] The CNN-GRU-SE model uses the Gated Recurrent Unit (GRU) network as the core to build a time series data processing framework. It fully utilizes the unique advantages of the GRU network in processing time series data, dynamically filters and retains key feature information during long sequence propagation, and effectively solves the long-term dependency modeling problem caused by gradient vanishing or gradient exploding.
[0307] Compared to Long Short-Term Memory (LSTM) networks, Gated Recurrent Unit (GRU) networks significantly improve training efficiency while ensuring the reliability of temporal feature extraction through a simplified gating structure. This parameter simplification design, combined with a dynamic gating adjustment mechanism, not only reduces model complexity but also suppresses the risk of overfitting during training, enabling the model to possess both computational efficiency and generalization ability in time series prediction tasks.
[0308] 3) VMD is an adaptive time-frequency analysis method for processing non-stationary signals. VMD decomposes the original complex signal into K intrinsic mode functions (IMFs) with finite bandwidth and extracts the center frequency of the corresponding IMF. The decomposition process is as follows:
[0309] S3.1: Perform Hilbert transform on the original signal to modulate the signal spectrum to the corresponding frequency band:
[0310]
[0311] In the formula: H(t) represents the analyzed signal after Hilbert transform and modulation; δ(t) is the impulse function; u k (t) represents the k-th modal component after decomposition; t is time; ω k For the corresponding IMF component u k The center frequency of (t); This represents the complex exponential modulation factor.
[0312] S3.2: Calculate the L2 norm of the squared gradient of the demodulated signal, with the constrained variational model as follows:
[0313]
[0314] In the above formula: f represents the original input signal; ||i|| represents the square of the L2 norm; {u k} represents the set of all IMF components; {ω k} represents the set of center frequencies of all IMF components; k represents the subscript of the modal component.
[0315] S3.3: To transform a constrained problem into an unconstrained problem, the Lagrangian function is introduced:
[0316]
[0317] In the above formula: L(u k ,ω k λ) represents the Lagrange function; f(t) represents the original input signal; λ(t) represents the functional form of the Lagrange multiplier; λ represents the Lagrange multiplier; α represents the penalty factor;
[0318] S3.4: To solve equation (33) using the alternating direction multiplier algorithm, continuously update λ until k IMF components are obtained. n+1 ,Right now:
[0319]
[0320] In the above formula: λ n+1 (ω) represents the frequency domain of the Lagrange multipliers in the (n+1)th iteration; λ n (ω) represents the frequency domain of the Lagrange multipliers in the nth iteration; τ represents the time constant; f(ω) represents the frequency domain representation of the original input signal; This represents the frequency domain representation of the k-th IMF component during the (n+1)-th iteration.
[0321] S3.5: Set the judgment precision ε>0, and stop the iteration when equation (34) is satisfied:
[0322]
[0323] In the above formula: Let represent the representation of the k-th IMF component in the frequency domain ω during the n-th iteration.
[0324] 4) The Squeeze-and-Excitation (SE) attention mechanism is an adaptive optimization method that enhances the representational ability of neural networks by dynamically learning channel weights. Its core functionality involves two stages to adaptively adjust feature channels.
[0325] The core advantage of the Selective Attention (SE) mechanism lies in its excellent portability and lightweight structure. This mechanism can be flexibly embedded into various architectures such as convolutional neural networks and fully connected layers, achieving plug-and-play functionality through adaptive adjustment of channel weights. Its working principle is as follows: the original input data X' (spatial dimension H'×W', number of channels C') is convolved to generate a feature map X (spatial dimension H×W, number of channels C). During this process, the SE module compresses spatial information through global average pooling, and then generates channel weight vectors through a multilayer perceptron, precisely enhancing key feature channels and suppressing redundant information. This selective attention mechanism significantly reduces the number of model parameters while effectively improving network efficiency.
[0326] First, F tr This step is a transformation operation, which involves performing a convolution on the input features for any given transformation F. tr The input X is mapped to the feature map U, as defined in equation (35):
[0327] Ftr:X→U,X∈R H′×W′×C′ ,U∈R H×W×C (35);
[0328] In the above formula: R H′×W′×C′ R represents the dimensional space of the original input data X'; H×W×C This represents the dimensional space of the feature map U after the convolution operation.
[0329] Next is the Squeeze operation, which uses global average pooling to reduce the dimensionality of the input feature map in space and extract global information. This helps to capture the overall contextual information of the input feature map, not just limited to local regions. The specific calculation formula is shown in equation (36):
[0330]
[0331] Where z represents the global feature, F sq (x) represents the function representation of the Squeeze operation; F sq This represents the squeeze operation, where x represents the input feature map, H is the height of the feature map, W is the width of the feature map, and u... c (i,j) is the feature vector of the pixel in the i-th row and j-th column.
[0332] Therefore, formula (36) transforms the input of U[H×W×C] into the output of Z[1×1×C], where C is the number of channels in the input feature map.
[0333] The main purpose of the excitation operation is to activate the learned channel correlations. By using the sigmoid function, the learned channel correlations are transformed into probability values of 0 to 1, representing the importance score of each channel. These scores are used to weight the feature responses of each channel, thereby strengthening important channel features and suppressing unimportant channel features, as shown in equation (37).
[0334] s = f ex (z,W)=σ(W2δ(W1z)) (37);
[0335] Where s represents the incentive score vector; f ex (z,W) represents the activation function; δ(W1z) represents the result of the ReLU activation function applied to W1z; f ex The values represent the activation operations, W1 and W2 weight matrices; σ is the Sigmoid function; and δ is the ReLU activation function.
[0336] The prediction model, built upon historical operational data and deep learning methods, utilizes a supervised learning paradigm to model time-series data. First, the time-series data is reconstructed into feature-label pairs: weather parameters and load data at the current sampling time are used as features, and load data from subsequent sampling times are used as labels, forming a supervised learning sample set. The complete prediction process includes the following steps:
[0337] Step 1: Normalize the original dataset and divide it into training, validation and test sets according to the proportions.
[0338] Step 2: VMD decomposes the original complex signal into K intrinsic mode functions (IMFs) with finite bandwidth and extracts the center frequency of the corresponding IMF;
[0339] Step 3: Deep feature extraction is performed on the time series data preprocessed by Variational Mode Decomposition (VMD) using a CNN network;
[0340] Step 4: Input the feature sequences processed by the CNN network into the GRU network, and use its gating mechanism to capture the temporal dependencies of the power data;
[0341] Step 5: Recalibrate the channel weights of the hidden states output by the GRU network using the SE module to enhance key timing features and suppress noise interference.
[0342] Global average pooling is performed on the hidden state matrix HHH output by the GRU along the time dimension to obtain the global feature description vector s for each channel:
[0343]
[0344] In the formula: H t,c This represents the hidden state value of the c-th channel at time step t; s c represents the global average feature value of the c-th channel; T represents the total number of time steps.
[0345] Inputting the channel description vector s into the channel weight generation module, which consists of two fully connected layers, yields the channel weight vector w:
[0346] w=σ(W2δ(W1s)) (39);
[0347] In the formula: W1 represents the weight matrix of the first fully connected layer; W2 represents the weight matrix of the second fully connected layer; r is the channel compression ratio (usually 8 or 16), used to reduce computation and increase nonlinearity; δ(·) represents the ReLU activation function; σ(·) represents the Sigmoid activation function; w represents the normalized channel weight vector.
[0348] Multiply the channel weight vector w element-wise with the original GRU output hidden state H for each channel to obtain the weighted hidden state matrix.
[0349]
[0350] In the formula: This represents the hidden state matrix after channel weight recalibration; w c Let be the weight value of the c-th channel.
[0351] Step 6: After the reweighted features are mapped through the fully connected layer, they are restored to the actual power prediction value through inverse normalization, and the model parameters are saved simultaneously.
[0352] The reweighted feature z is mapped to a normalized power prediction vector through a fully connected layer.
[0353]
[0354] In the formula: W fc b is the weight matrix of the fully connected layer; fc φ is the bias vector of the fully connected layer; φ(·) is the activation function, which can be taken as the identity mapping if it is a linear regression. This is the normalized predicted value output by the network.
[0355] During training, Min–Max normalization is used, linearly scaling to [a, b], commonly [0, 1]. The normalized form of the original sample y is:
[0356]
[0357] The corresponding inverse normalization is:
[0358]
[0359] In the formula: y min y max It is the minimum / maximum power scalar or dimensionally stored vector recorded in the training set (or used during normalization); a, b represent the left and right endpoints of the Min–Max normalization interval.
[0360] Step 7: Use the test set to verify the model's ability to predict future power, and evaluate the model's accuracy by comparing the predicted values with the measured data.
[0361] In the verification process of this invention, a typical power station was analyzed with a time resolution of 15 minutes. The nwp_globalirrad, lmd_totalirrad and photovoltaic power data were selected. The data of the second to last week was used as the validation set, the data of the last week was used as the test set, and the data of other time periods were used as the training set.
[0362] The training set training effect, validation set validation effect, test set testing effect, and comparison of original data and regression data using the RIME-RF regression model are shown below. Figures 5(a) to 5(d) As shown.
[0363] Overall, the RIME-RF regression model fits the data well. The trends of the true and fitted values are generally consistent across the training, validation, and test sets, demonstrating the model's generalization ability across different time periods. Some extreme values in Figure 6(b) show deviations, which may be related to seasonality, data noise, model limitations, or other factors. In general, the RIME-RF model performs well, effectively capturing the complex nonlinear relationship between input features and the target, bringing the spatial distribution of NWP data closer to the spatial distribution of LMD observation data, thereby improving spatial accuracy and local performance.
[0364] Figures 6(a) to 6(c) This is a scatter density plot of the training, validation, and test sets for a RIME-RF regression model, used to evaluate the relationship between the model's fitted values and the true values. Figures 6(a) to 6(c) As shown, the scatter plots of the training, validation, and test sets all exhibit high goodness of fit, with data points closely distributed around the fitted line, indicating that the model can capture data trends well across different time periods. Although some data points deviate slightly from the fitted line, the overall fit remains good.
[0365] To further evaluate the impact of NWP spatial downscaling on prediction accuracy, this invention employs the VMD-CNN-GRU-SE attention mechanism prediction model based on BKA optimization used in Part III. The prediction model was trained using both the original NWP data combined with photovoltaic power data and the downscaled NWP data combined with photovoltaic power data. The two types of photovoltaic power predictions were then compared and analyzed, as shown in Table 1.
[0366] Table 1 Comparison of Error Evaluation Indicators
[0367]
[0368] As shown in Table 1, the comparison of photovoltaic power predictions before and after downscaling reveals that all error indicators show an optimization trend after downscaling, and the prediction accuracy is improved. The reduction in root mean square error and mean absolute error indicates that the prediction results are closer to the observed values overall, while the decrease in the absolute value of the deviation means that the predicted values are more in line with the actual situation in terms of overall trend. The increase in correlation coefficient and coefficient of determination indicates that the correlation and fit between the predicted and observed values are enhanced after downscaling, and the model's explanatory power for photovoltaic power changes is improved. Although the qualification rate has only improved slightly, the improvement is still minor.
[0369] The reason lies in the fact that downscaling improves the resolution of the original NWP data, making it closer to the actual environment of a photovoltaic power plant. Simultaneously, the downscaling process introduces corrections that better reflect the local physical characteristics of photovoltaic power plants, enabling the prediction model to more accurately reflect the real physical processes and effectively reducing systematic biases in the original data. Furthermore, downscaling may also enhance the data's sensitivity to changes in local meteorological conditions, allowing the model to more accurately capture subtle changes in meteorological factors affecting photovoltaic power, thereby improving prediction accuracy.
Claims
1. A photovoltaic power output prediction method based on RIME-RF spatial downscaling, characterized in that... Includes the following steps: Step 1: Collect photovoltaic power data of photovoltaic power plants in the target area and local meteorological observation LMD data, extract common data between numerical weather prediction (NWP) data and local meteorological observation LMD data, and construct input feature set; Step 2: Optimize the hyperparameters of the Random Forest (RF) algorithm based on the frost-ice optimized RIME algorithm, construct the RIME-RF model, and spatially downscale the numerical weather prediction (NWP) data; Step 3: A photovoltaic power prediction model based on the VMD-CNN-GRU-SE attention mechanism optimized by Black-winged Kite BKA is adopted. The prediction model is trained using the original numerical weather prediction (NWP) data combined with photovoltaic power data, and then trained using the spatially downscaled numerical weather prediction (NWP) data combined with photovoltaic power data.
2. The photovoltaic power output prediction method based on RIME-RF spatial downscaling according to claim 1, characterized in that: In step 1, common data between low-resolution numerical weather prediction (NWP) data and high-resolution local meteorological observation (LMD) data are extracted. The raw data in the NWP data contains total irradiance, and the raw data in the LMD data contains total irradiance. These are used as input and target data, respectively, to construct an input feature set.
3. The photovoltaic power output prediction method based on RIME-RF spatial downscaling according to claim 2, characterized in that: In step 2, the input feature set is read, and the RIME-RF model is used to spatially downscale the numerical weather prediction (NWP) data. During the call to the random forest RF algorithm, the frost-optimized RIME algorithm is used to optimize the hyperparameters of the random forest, such as the number of trees and the minimum number of leaf nodes, so that it can be closer to the high-resolution local meteorological observation (LMD) data, and the high-resolution numerical weather prediction (NWP) data fitting value is output.
4. The photovoltaic power output prediction method based on RIME-RF spatial downscaling according to claim 3, characterized in that: In step 2, the frost-optimized RIME algorithm includes the following steps: a1: Randomly extract multiple subsets of the input feature set; Let the input feature set be: D={(x1,y1),(x2,y2),…,(x N ,y N )}(1); Where the total number of samples is D; (x1, y1) represents the first sample and its label; (x2, y2) represents the second sample and its label; (x N ,y N ) represents the Nth sample and its label; If a random forest is constructed with T trees, then T subsets of the dataset need to be generated: D (t) =Bootstrap(D,N),t=1,2,…,T(2); Where: D (t) The training subset of the t-th tree is represented; Bootstrap(D,N) means that N samples are drawn with replacement from D to form a new dataset; T represents the total number of subsets to be generated. a2: By recursively partitioning the feature space, the subset of data is split into child nodes until the stopping condition is met, thereby constructing a decision tree; Given a feature dimension j∈{1,2,…,d} and a partition threshold s, where d represents the total dimension of the features; the data is partitioned into two subsets: Left subset: D L (j,s)={(x i ,y i )∈D∣x ij ≤s} (3); In the formula: D L (j,s) represents the subset of samples that are less than or equal to the splitting threshold s in the j-th feature dimension; j is the feature dimension index; s is the feature splitting threshold; x ij This represents the value of the i-th sample in the j-th feature dimension; Right Subset: D R (j,s)={(x i ,y i )∈D∣x ij >s} (4); In the formula: D R (j,s) represents the subset of samples that are greater than the segmentation threshold s in the j-th feature dimension; Under this partition, the average target values of the left and right subsets are respectively: Left subset mean: In the formula: The average value of the target values in the left subset; Describing the left subset D L The average value of the target value; D L y represents the set of samples that fall into the left subset; i This represents the true target value of the i-th sample; Right subset mean: In the formula: D is the average of the objective values in the right subset; R The set of samples that represents the right subset; The mean square error (MSE) corresponding to this partition is defined as: In the formula: MSE(j,s) represents the mean square error of the partition obtained when feature j and split point s are selected; n represents the total number of samples; The algorithm aims to find the combination that minimizes the above error among all possible features j and the splitting threshold s, i.e.: (j * ,s * )=argmin j,s MSE(j,s)(8); In the formula: MSE(j,s) is the mean square error generated when dividing points s using feature j; j * s * These are the optimal feature and the optimal split point selected for the final splitting; a3: Train a decision tree for each subset of the dataset until all decision trees have been trained; For each subset D (t) Using recursive partitioning, i.e., the MSE minimization formula (8) in the previous part, a regression tree h is constructed. t (x): h t (x)=DecisionTreeTrain(D (t) )(9); In the formula: DecisionTreeTrain represents the training process based on the MSE minimization criterion; a4: For regression problems, the prediction result is determined by taking the average value. For regression tasks, the prediction results of random forests are calculated using the arithmetic mean of the outputs of each decision tree, i.e.: In the formula: h is the final predicted value for the input sample x; t (x) is the predicted value of the t-th tree for sample x; T is the total number of trees.
5. The photovoltaic power output prediction method based on RIME-RF spatial downscaling according to claim 4, characterized in that: Step 2 includes: b1: Soft Cream Search Strategy: As shown in the following formula: In the above formula: n i This represents the value of the i-th particle at its current position; n i-k This represents the value of the particle k positions prior to the i-th particle; n i-1 n represents the value of the preceding particle adjacent to the i-th particle; i+1 The value of the next adjacent particle to the i-th particle; n i+k This represents the value of a particle k positions away from the i-th particle; k represents the radius of the search range. In the above formula: R represents the updated position of the particle; i represents the particle number; j represents the dimension number, i.e., the current position coordinate of the particle in the j-th dimension; best,j Let represent the position coordinates of the globally optimal particle in the current population in the j-th dimension; The parameter r1 is a random number in the range (-1, 1), and r1 controls the direction of particle motion; cosθ will change with the number of iterations; β is an environmental factor that follows the number of iterations to simulate the influence of the external environment and is used to ensure the convergence of the algorithm; h is the adhesion degree, which is a random number in the range (0,1) and is used to control the distance between the centers of two fog particles; b Uij and b Lij These are the upper and lower bounds of the escape space, representing the effective region for restricting particle motion. E is the adhesion coefficient, which affects the agglomeration probability of the agent and increases with the number of iterations. r2 is a random number in the range (0,1), which, together with E, controls whether particles condense, i.e. whether particle positions are updated. In the above formula: t is the current iteration number; T is the maximum number of iterations of the algorithm; In the above formula: the mathematical model of β is a step function; [·] indicates rounding; the default value of w is 5, which is used to control the number of segments in the step function; b2: Hard Frost Puncture Mechanism: This hard frost puncture mechanism allows particles in the RIME algorithm to exchange with each other; the formula for inter-particle substitution is shown below: In the above formula: R represents the updated position information (coordinates) of the i-th particle in the j-th dimension; best,j F represents the position coordinates of the globally optimal particle in the current population in the j-th dimension; normr r3 is the normalized value of the current agent's fitness, indicating the chance of the i-th agent being selected; r3 is a random number in the range (-1, 1); F normr (S i S represents the fitness value of the current i-th agent. i The normalized result typically ranges from [0,1] and is used to measure the probability that the individual is selected for position updating; S i Let represent the fitness value of the i-th agent, which is the performance evaluation value of the individual calculated according to the objective function in the current iteration; b3: Positive Greed Mechanism: A forward greedy mechanism is used for population updates in the metaheuristic optimization RIME algorithm. This forward greedy mechanism determines whether to replace an individual by comparing its updated fitness value with its value before the update, and also replaces the solutions of both individuals. In a positively greedy mechanism, the population update rules are as follows: In the formula: (X a ,X b () represents the parameter combination before optimization; (X) a′ ,X b′ ) represents the optimized parameter combination; X a X is the solution vector for the current individual a; b Let f(·) be the solution vector of another individual b compared with it; f(·) is the fitness function; X a′ X b′ These are the two individual solutions after the update; "<" indicates that the comparison sign is reversed for a minimization problem.
6. The photovoltaic power output prediction method based on RIME-RF spatial downscaling according to claim 5, characterized in that: In step 2, the RIME algorithm is optimized using Frost Ice. During the process of calling the Random Forest (RF) algorithm, hyperparameters such as the number of random forest trees and the minimum number of leaf nodes are optimized. Let the hyperparameter vector to be optimized be: P=[n tree ,n leaf ] (17); Where: n tree n is the number of decision trees in the random forest. leaf The number of samples in the smallest leaf node; In the RIME algorithm, each individual (particle) corresponds to a candidate combination of hyperparameters: In the formula: i is the individual ID, X i ∈Ω, where Ω is the search space, defined by the upper and lower bounds of the hyperparameter values; The hyperparameter representing the number of random forest trees corresponding to the i-th individual; The hyperparameter representing the minimum number of leaf nodes in the random forest corresponding to the i-th individual; To evaluate the performance of each hyperparameter combination, the mean squared error (MSE) on the validation set is used as the fitness function: In the formula: F(X) i ) represents the fitness value of the i-th individual; N val y is the number of samples in the validation set; m This represents the true output value of the m-th validation set sample. To use parameter X i The predicted output value of the trained RF model on this sample; m represents the index number of the validation set sample.
7. The photovoltaic power output prediction method based on RIME-RF spatial downscaling according to claim 6, characterized in that: In step 3, a photovoltaic power prediction model based on the VMD-CNN-GRU-SE attention mechanism optimized by Black-winged Kite BKA is designed. It is trained by combining the original and downscaled numerical weather prediction (NWP) data with power data. The model uses variational mode decomposition to process non-stationary signals, CNN to extract deep features, GRU to capture temporal dependencies, and the SE module to dynamically relabel channel weights.
8. The photovoltaic power output prediction method based on RIME-RF spatial downscaling according to claim 7, characterized in that: Step 3, optimizing BKA based on the Black-winged Kite includes: 1) Population initialization: Distribute the position of each black-winged kite evenly: X i =BK lb +rand(BK ub -BK lb )(20); Among them, X i Let $\mathbf{i}$ represent the position vector (current position) of the $i$-th black-winged kite, composed of position values for each dimension, used to represent the solution of an individual in the population; $i$ is an integer between 1 and $pop$, and $BK$ is the base vector. lb and BK ub These are the lower and upper bounds of the j-th dimension Blackwing Kite, respectively, and rand is a value randomly selected between [0,1]. During initialization, BKA selects the individual with the best fitness value as the leader in the initial group, which is considered the optimal position for the Black-winged Kite. Below is the mathematical representation of the initial leader XL; for the minimum value, we have: Among them, f best min(f(X)) represents the minimum fitness value in the current population, used to measure the performance of the best individual in the population; i )) represents selecting the minimum value from the set of fitness values {f(X1), f(X2), ..., f(Xpop)} of all individuals; f(X i X represents the fitness value of the i-th individual, which is the performance evaluation value obtained by substituting the position Xi into the objective function f(·); L X(find(f) represents the position vector of the individual with the best fitness value in the current population, i.e., the leader in the initial stage; best ==f(X) i ))) indicates that a fitness value equal to f has been found. best The `find(f)` function returns the individual's index and its location vector. best ==f(X) i )) represents the search population where the fitness value equals the current best fitness value f. best Individual ID; f best ==f(X) i () indicates whether the fitness value of the i-th individual is equal to the optimal fitness value f. best This is used to determine the location of the optimal individual; 2) Attack behavior: Mathematical model of Blackwing Kite attack behavior: In the formula, This represents the position of the i-th black-winged kite individual in the (t+1)-th iteration, i.e., the position of the next generation; This represents the current position of the i-th Black-winged Kite individual in the t-th iteration, i.e., the position of the current generation; r is a random number between 0 and 1; p is a constant of 0.9; T is the total number of iterations, and t is the number of iterations completed so far; 3) Migration behavior: Mathematical model of black-winged kite migration behavior: in, This represents the position of the i-th black-winged kite individual in the (t+1)-th iteration, i.e., the position of the next generation; Let C(i) represent the current position of the i-th Black-winged Kite individual in the t-th iteration, i.e., the position of the current generation; C(0,1) represents a standard normal distribution with a mean of 0 and a standard deviation of 1, used to increase the randomness of the search. F represents the leading scorer of the i-th dimension black-winged kite in the t-th iteration so far; i F represents the current position in dimension j obtained by any black-winged kite in the t-th iteration; ri Let C(0,1) represent the fitness value of any black-winged kite at a random position in the j-th dimension during the t-th iteration; C(0,1) represents the Cauchy mutation; m represents a perturbation factor or coefficient of variation defined by a trigonometric function to adjust the magnitude of position updates, increasing the flexibility of position changes. Where r represents a random number between 0 and 1; The probability density function of the one-dimensional Cauchy distribution is: Where f(x,δ,μ) represents the probability density function of the Cauchy distribution; x represents the point where the probability is to be calculated under the distribution, i.e., the location value of an individual in a certain dimension; δ represents the scale parameter of the Cauchy distribution, which controls the "width" of the distribution; and μ represents the location parameter of the Cauchy distribution, i.e., the center point of the distribution. When ō = 1 and μ = 0, its probability density function becomes the standard form, as shown in the following formula:
9. The photovoltaic power output prediction method based on RIME-RF spatial downscaling according to claim 8, characterized in that: Step 3 employs a photovoltaic power prediction model based on the VMD-CNN-GRU-SE attention mechanism optimized by the Black-winged Kite Optimized BKA, specifically including: 1) Photovoltaic power data is generated using a two-dimensional convolutional network, as shown in the following formula: Y = W * X (29); In the above formula, y ij ω represents the number of the output feature map at position (i,j) after a 2D convolution operation; uv This represents the weight parameter in the u-th row and v-th column of the convolution kernel; x i-u+1,j-v+1 Y represents the local region value in the input data X corresponding to the convolution kernel position (u,v); i and j are the output subscripts of the convolution; uv represents the dimension subscript of the convolution kernel; Y represents the output feature map of the convolution operation; X is the input data matrix; W is the filter; 2) The operating mechanism of the gated recurrent unit (GRU) network is as follows: In the formula, r t z t These are the reset door and the update door, respectively; h t The hidden state to be passed to the next time step; h tt For candidate hidden states; x t Enter information for the current moment; h t-1 The hidden state is the value from the previous time step; σ is the sigmoid activation function; tanh is the activation function that assigns the data to [-1, 1]; W z [h t-1 ,x t [Indicates updating gate z] t The weighting term; W r [h t-1 ,x t ] indicates resetting the gate r t The weighting term; W h [h t-1 ,x t ] represents the candidate hidden state h tt The weighting calculation item; b z This indicates updating the offset in the gate; b r This indicates resetting the offset within the door; b h This represents the offset in the calculation of the candidate hidden state; 3) VMD decomposes the original complex signal into K intrinsic mode functions (IMFs) with finite bandwidth and extracts the center frequency of the corresponding IMF; the decomposition process is as follows: S3.1: Perform Hilbert transform on the original signal to modulate the signal spectrum to the corresponding frequency band: In the formula: H(t) represents the analyzed signal after Hilbert transform and modulation; δ(t) is the impulse function; u k (t) represents the k-th modal component after decomposition; t is time; ω k For the corresponding IMF component u k The center frequency of (t); Indicates the complex exponential modulation factor; S3.2: Calculate the L2 norm of the squared gradient of the demodulated signal, with the constrained variational model as follows: In the above formula: f represents the original input signal; ||i|| represents the square of the L2 norm; {u k } represents the set of all IMF components; {ω k } represents the set of center frequencies of all IMF components; k represents the subscript of the modal component; S3.3: To transform a constrained problem into an unconstrained problem, the Lagrangian function is introduced: In the above formula: L(u k ,ω k λ) represents the Lagrange function; f(t) represents the original input signal; λ(t) represents the functional form of the Lagrange multiplier; λ represents the Lagrange multiplier; α represents the penalty factor; S3.4: To solve equation (33) using the alternating direction multiplier algorithm, continuously update λ until k IMF components are obtained. n+1 ,Right now: In the above formula: λ n+1 (ω) represents the frequency domain of the Lagrange multipliers in the (n+1)th iteration; λ n (ω) represents the frequency domain of the Lagrange multipliers in the nth iteration; τ represents the time constant; f(ω) represents the frequency domain representation of the original input signal; This represents the frequency domain representation of the k-th IMF component during the (n+1)-th iteration; S3.5: Set the judgment precision ε>0, and stop the iteration when equation (34) is satisfied: In the above formula: This represents the representation of the k-th IMF component in the frequency domain ω during the n-th iteration; 4) The SE attention mechanism achieves adaptive adjustment of feature channels through two stages, and its working principle is as follows: The original input data X' (spatial dimension H'×W', number of channels C') is generated into a feature map X (spatial dimension H×W, number of channels C) through convolution operation. In this process, the SE module compresses spatial information through global average pooling, and then generates channel weight vectors through a multilayer perceptron to accurately enhance key feature channels and suppress redundant information. First, F tr It is a transformation operation, which involves performing a convolution on the input features for any given transformation F. tr The input X is mapped to the feature map U, as defined in equation (35): Ftr:X→U,X∈R H′×W′×C′ ,U∈R H×W×C (35); In the above formula: R H′×W′×C′ R represents the dimensional space of the original input data X'; H×W×C This represents the dimensional space of the feature map U after the convolution operation; Next is the Squeeze operation, which uses global average pooling to reduce the dimensionality of the input feature map in space and extract global information; the specific calculation formula is shown in equation (36): Where z represents the global feature, F sq (x) represents the function representation of the Squeeze operation; F sq This represents the squeeze operation, where x represents the input feature map, H is the height of the feature map, W is the width of the feature map, and u... c (i,j) is the feature vector of the pixel in the i-th row and j-th column; Therefore, formula (36) transforms the input of U[H×W×C] into the output of Z[1×1×C], where C is the number of channels in the input feature map; The excitation operation uses the sigmoid function to convert the learned channel correlations into probability values of 0 to 1, representing the importance score of each channel. These scores are used to weight the feature responses of each channel, thereby strengthening the features of important channels and suppressing the features of unimportant channels, as shown in equation (37). s=f ex (z,W)=σ(W2δ(W1z)) (37); Where s represents the incentive score vector; f ex (z,W) represents the activation function; δ(W1z) represents the result of the ReLU activation function applied to W1z; f ex The values represent the activation operations, W1 and W2 weight matrices; σ is the Sigmoid function; and δ is the ReLU activation function.
10. The photovoltaic power output prediction method based on RIME-RF spatial downscaling according to claim 9, characterized in that: The prediction model, built based on historical operational data and deep learning methods, first reconstructs the time series data into feature-label pairs: using weather parameters and load data at the current sampling time as features, and load data at subsequent sampling times as labels, to form a supervised learning sample set; the complete prediction process includes the following steps: Step 1: Normalize the original dataset and divide it into training set, validation set and test set according to the proportions; Step 2: VMD decomposes the original complex signal into K intrinsic mode functions (IMFs) with finite bandwidth and extracts the center frequency of the corresponding IMF; Step 3: Deep feature extraction is performed on the time series data preprocessed by Variational Mode Decomposition (VMD) using a CNN network; Step 4: Input the feature sequences processed by the CNN network into the GRU network, and use its gating mechanism to capture the temporal dependencies of the power data; Step 5: Recalibrate the channel weights of the hidden states output by the GRU network using the SE module to enhance key timing features and suppress noise interference; Global average pooling is performed on the hidden state matrix HHH output by the GRU along the time dimension to obtain the global feature description vector s for each channel: Where: H t,c This represents the hidden state value of the c-th channel at time step t; s c This represents the global average eigenvalue of the c-th channel; T represents the total number of time steps. Inputting the channel description vector s into the channel weight generation module, which consists of two fully connected layers, yields the channel weight vector w: w=σ(W2δ(W1s)) (39); In the formula: W1 represents the weight matrix of the first fully connected layer; W2 represents the weight matrix of the second fully connected layer; r is the channel compression ratio, used to reduce computation and increase nonlinearity; δ(·) represents the ReLU activation function; σ(·) represents the Sigmoid activation function; w represents the normalized channel weight vector; Multiply the channel weight vector w element-wise with the original GRU output hidden state H for each channel to obtain the weighted hidden state matrix. In the formula: This represents the hidden state matrix after channel weight recalibration; w c Let be the weight value of the c-th channel; Step 6: After the reweighted features are mapped through the fully connected layer, they are restored to the actual power prediction value through inverse normalization operation, and the model parameters are saved simultaneously. The reweighted feature z is mapped to a normalized power prediction vector through a fully connected layer. In the formula: W fc b is the weight matrix of the fully connected layer; fc φ is the bias vector of the fully connected layer; φ(·) is the activation function, which can be taken as the identity mapping if it is a linear regression. This is the normalized predicted value output by the network; During training, Min–Max normalization is used, linearly scaling to [a, b], commonly [0, 1]. The normalized form of the original sample y is: The corresponding inverse normalization is: In the formula: y min y max These are the minimum / maximum power scalars or vectors stored by dimension recorded in the training set; a and b represent the left and right endpoints of the Min–Max normalized interval. Step 7: Use the test set to verify the model's ability to predict future power, and evaluate the model's accuracy by comparing the predicted values with the measured data.
Citation Information
Cited By
Multi-objective optimization method for injection molding process parameters of thin-wall shell plastic part
CN121697176A
Organic aerosol concentration calibration method based on deep learning
CN122306664A