A method, device and computer-readable storage medium for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost

The combined prediction method of xLSTM and XGBoost solves the problem of low prediction accuracy of the proportion of renewable energy power generation, achieves more efficient and accurate prediction results, and supports the stable scheduling of the power system.

CN120124848BActive Publication Date: 2025-10-03QINGDAO UNIV OF TECH +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510185607.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-10-03
Estimated Expiration
2045-02-20

AI Technical Summary

Technical Problem

Existing linear models have limited effectiveness in predicting the proportion of renewable energy power generation and have low accuracy, making it difficult to meet the accurate scheduling needs of the power system.

Method used

A combined prediction method based on xLSTM and XGBoost is adopted to improve the prediction accuracy through data preprocessing, feature screening, dimensionality reduction and model weight optimization, combined with the human evolution algorithm HEOA.

Benefits of technology

It improves the accuracy and efficiency of the forecast of the proportion of renewable energy power generation, enhances the reliability and stability of the power system, and reduces the impact of noise on the forecast.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120124848B_ABST
    Figure CN120124848B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of data processing, and more specifically, relates to a method, device, and computer-readable storage medium for predicting the proportion of renewable energy power generation in an electric power system based on xLSTM and XGBoost. The method comprises collecting renewable energy power generation data from a power grid and preprocessing the data; after data preprocessing, performing feature screening on the data set by using the maximum information coefficient to obtain a preprocessed data set; dividing the preprocessed data set; performing dimensionality reduction processing using a trained IPCA model; using xLSTM and XGBoost models for modeling and prediction; and using HEOA to optimize the weights of the xLSTM and XGBoost models to obtain a final combined prediction result. The present invention solves the problem that the prediction of the proportion of renewable energy power generation is complex and nonlinear, and that linear models have limited effectiveness and low accuracy in processing the prediction of the proportion of renewable energy power generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data processing, and more specifically, relates to a method, device and computer-readable storage medium for predicting the proportion of renewable energy power generation in an electric power system based on xLSTM and XGBoost. Background Art

[0002] To address the challenges of energy shortages and environmental pollution, scientists and engineers around the world are actively developing and promoting sustainable new energy technologies, which has led to a gradual increase in the proportion of renewable energy generation in the global energy mix. Against the backdrop of the increasing penetration of unstable renewable energy sources (such as wind and solar), accurately predicting the proportion of renewable energy generation has become a key issue in order to better economically plan, dispatch, and manage the various power generation units, energy storage units, compensation units, and power consumption units in the power system, obtain more accurate operational and dispatching safety boundaries for the new power system, and ensure the reliability and stability of the power system.

[0003] Chinese patent document CN1 1 6739118A discloses a power load forecasting method based on LSTM-XGBoost to implement an error correction mechanism, comprising: using seasonal trend decomposition of local weighted regression to decompose the original power data into different components and using the Pearson Correlation Coefficient (PCC) to perform feature selection on the component sequence; using a long short-term memory network (LSTM) to complete the first step of component prediction; using the stacking integration idea, the LSTM component prediction results are input as new features into the extreme gradient boosting to perform the second step of component prediction after error correction; and reconstructing the component prediction results into a complete time series to obtain the power load forecast value.

[0004] In summary, existing time series forecasting methods typically rely on linear models, such as the autoregressive moving average (ARMA) model, which uses the relationship between historical data to establish a regression equation to predict future target values. However, forecasting the proportion of renewable energy generation is complex and nonlinear, and these linear models are limited in effectiveness and have low accuracy when dealing with this problem. Summary of the Invention

[0005] The present invention aims to overcome at least one of the defects of the above-mentioned prior art and provide a method for predicting the proportion of renewable energy power generation in power systems based on xLSTM and XGBoost, so as to solve the problem that linear models have limited effect and low accuracy in processing the prediction of renewable energy power generation proportion.

[0006] In another aspect of the present invention, a device for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost is provided.

[0007] In another aspect of the present invention, a computer-readable storage medium is provided to carry a method for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost.

[0008] This paper proposes a prediction method based on the combination of xLSTM and XGBoost. First, the xLSTM and XGBoost models are trained on a training set. The trained xLSTM and XGBoost models are then applied to a validation set using the Human Evolutionary Optimization Algorithm (HEOA) to optimize the combined weights of the two models. Finally, on a test set, the xLSTM and XGBoost models are weighted together using the optimal weights to generate the final prediction results.

[0009] The detailed technical solutions of the present invention are as follows:

[0010] A method for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost, the method comprising:

[0011] S1. Collect renewable energy power generation data from the power grid and preprocess the data to obtain a data set. The preprocessing includes removing outliers and using spline interpolation to process missing values ​​to improve data quality.

[0012] S2. After data preprocessing, the dataset is filtered for features using the maximum information coefficient to identify features that have important predictive effects on the proportion of new energy. This yields a preprocessed dataset, which includes feature columns and target columns, providing effective input features for the xLSTM and XGBoost models.

[0013] Furthermore, we screened out features that have important predictive effects on the proportion of renewable energy. A total of 13 features with important predictive effects were screened out, including the measured value of bus voltage, the estimated value of bus voltage phase angle, the reactive power of renewable energy and conventional energy at the current moment, the reactive power measured at the compensator, the total load active power and reactive power at the current moment, and the measured values ​​of active and reactive power at the high, medium, and low ends of the transformer.

[0014] The maximum information coefficients MIC used include:

[0015] S21, mutual information MI:

[0016]

[0017] In formula (1), Y represents the proportion of new energy, and X represents the characteristics related to the proportion of new energy; m and n represent the value ranges of variables X and Y, which are divided into m columns and n rows of grids respectively; X r 、Y s It represents the specific values ​​of random variables X and Y, the rth value of the discretized X variable and the sth value of the discretized Y variable; D(X r ) represents the variable X r The probability distribution of D(Y s ) represents the variable Y s The probability distribution of D(X r ,Y s ) represents the variable X r and Y s The joint probability distribution of

[0018] S22, Maximum Information Coefficient MIC:

[0019]

[0020] Where a and b represent the number of grid divisions in the X and Y directions, respectively; B is a variable parameter set to the 0.6th power of the data volume.

[0021] S3. Based on the preprocessed dataset, the data is divided into training, validation, and test sets in chronological order. The first 60% of the data is used for training, the next 20% is used for validation to optimize the model weights, and the last 20% of the data is used as the test set to evaluate the generalization performance of the model in the online prediction scenario.

[0022] S4. Perform incremental principal component analysis (PCA) dimensionality reduction on the preprocessed dataset in S3 to achieve dimensionality reduction. Principal components with cumulative contributions exceeding 99% are selected to train the IPCA model, preserving the most important information features of the data. Principal component is a term used in PCA, referring to new variables obtained by linearly combining the original features. These new variables, i.e., principal components, are sorted by variance, reflecting the most important direction of change in the data.

[0023] The trained IPCA model is then used to perform dimensionality reduction on the training, validation, and test sets, simulating the online data stream processing process. This dimensionality reduction process helps reduce the data dimension while retaining key information features, thereby improving the efficiency of subsequent model training and prediction accuracy.

[0024] Furthermore, the IPCA model adopted is:

[0025] Dataset:

[0026] A centered =A-μ (3);

[0027] Covariance matrix:

[0028]

[0029] Update the covariance matrix:

[0030]

[0031] Eigendecomposition:

[0032] ∑=QAQ T (6);

[0033] projection:

[0034] A reduced =A reduced W (7);

[0035] In formulas (3) to (7), A is the original data matrix, i.e., the data of the preprocessed data set, including feature columns and target columns; μ is the mean vector of each feature, indicating that each column of data is averaged; A centered is the centered data matrix (each feature minus the mean); ∑ new is the updated covariance matrix, which represents the comprehensive covariance of the current data batch and the existing data; ∑ old is the covariance matrix of historical data, i.e. the first N old The covariance of samples; batch is the covariance matrix of the current batch of data, calculated in the same way as in standard PCA, N old is the number of samples of historical data; N new is the number of samples in the current batch of data; N is the number of samples; Q is the eigenvector matrix of the covariance matrix; Λ refers to the diagonal matrix, including the eigenvalues; Q T is the transposed matrix of Q; X reduced is the data matrix after dimensionality reduction; W is the projection matrix composed of the first k principal component eigenvectors; the superscript T indicates the transpose of the matrix.

[0036] S5. Based on the dimensionality-reduced training set, the xLSTM and XGBoost models were established and trained. For the xLSTM model, appropriate hyperparameters were determined through manual tuning, and the xLSTM model was trained to achieve predictions. For the XGBoost model, its hyperparameters were optimized through a grid search method, and finally the XGBoost model was trained and predictions were performed.

[0037] Furthermore, the xLSTM is composed of an sLSTM followed by an mLSTM stacked in series:

[0038] The sLSTM (scalar LSTM) used is:

[0039] Cell state: c t =f t ⊙c t-1 +i t ⊙z t ;

[0040] Normalized state: n t =f t ⊙n t-1 +i t ;

[0041] Hidden state:

[0042] Candidate cell states:

[0043] Input Gate:

[0044] Forget Gate: or

[0045] Output Gate:

[0046] x t is the input data of the current time step, t is the current time step; h t-1 is the hidden state of the previous time step; c t , c t-1 is the cell state at the current and previous time steps; n t , n t-1 is the normalized state of the current and previous time steps; f t ,i t , o t is the output of the forget gate, input gate, and output gate; z t is the candidate cell state; w i , w f , w o , w z is the weight matrix of the input gate, forget gate, output gate and candidate cell state; r i , r f , r o , r z is the recursive weight matrix of the input gate, forget gate, output gate and candidate cell state; b i , b f , b o , b z is the bias term of the input gate, forget gate, output gate and candidate cell state; σ, φ, exp are activation functions; ⊙ is the Hadamard product, which means element-wise multiplication; the superscript T indicates the transpose of the matrix.

[0047] The mLSTM used is:

[0048] Cell status:

[0049] Normalized state: n t =f t ⊙n t-1 +i t ;

[0050] Hidden state:

[0051] The attention mechanism of mLSTM includes:

[0052] Query vector: q t =W q x t +b q ;

[0053] Key vector:

[0054] Value vector: v t =W v x t +b v ;

[0055] Input gate: i t =exp(w i T x t +b i );

[0056] Forget Gate: or

[0057] Output Gate:

[0058] x t is the input data of the current time step; h t , h t-1 is the hidden state of the current and previous time steps; c t , c t-1 is the cell state at the current and previous time steps; n t , n t-1 is the normalized state of the current and previous time steps; q t , k t , v t are the query, key, and value of the attention mechanism; W q , W k , W v , w i , w f , wo is the weight matrix of query vector, key vector, value vector, input gate, forget gate and output gate; b q , b k ,b v , b i , b f , b o is the bias term of query vector, key vector, value vector, input gate, forget gate and output gate; f t ,i t , o t are the outputs of the forget gate, input gate, and output gate; σ, φ, exp are activation functions; ⊙ is the Hadamard product, which means element-wise multiplication; the superscript T indicates the transpose of the matrix.

[0059] Furthermore, the XGBoost model used is:

[0060]

[0061]

[0062] In formulas (8) to (11), is the loss function, y i refers to the true value of the i-th sample, Refers to the predicted value of the i-th sample, Ω(f k ) refers to the regularization term, T refers to the number of leaf nodes, w j The weight of the jth leaf node, the γ leaf node penalty coefficient, the complexity of the limited tree, the λ regularization coefficient, The predicted value of the τth round, f τ (ξ i ) The output of the decision tree constructed in the τth round, ξ i is the input feature vector of the i-th sample.

[0063] S6. Based on the reduced-dimensionality validation set, HEOA is used to optimize the weights of the xLSTM and XGBoost models. An automated search strategy is used to determine the optimal weight combination of the two base models, optimizing the objective function (mean square error MSE) to improve prediction accuracy. Finally, on the reduced-dimensionality test set, the optimal weight combination is used to perform a weighted fusion of the xLSTM and XGBoost test set predictions, yielding the final prediction and the final combined prediction.

[0064] Furthermore, the HEOA model adopted is:

[0065]

[0066] In formula (12), W λIndicates the weight of the λth model. When λ=1, it represents the xLSTM model, and when λ=2, it represents the XGBoost model. is the position of the λth individual in the ω+1 generation; β is the adaptive factor; ω is the number of current iterations; Max iter is the maximum number of iterations; represents the average position of the population in the ωth generation; W best is the current optimal solution; Levy(dim) represents the Levy flight distribution, which introduces randomness; f jump is the jump factor rand is a random number between [0, 1].

[0067] Furthermore, the missing values ​​are supplemented by spline interpolation, specifically including:

[0068] 1. Spline function:

[0069] S p (u) = a p +b p (uu p )+c p (uu p ) 2 +d p (uu p ) 3 (13);

[0070] 2. Interpolation point consistency:

[0071] S p (u p+Δp )=S p+Δp (u p+Δp ) (14);

[0072] 3. First-order derivative continuity:

[0073] S p ′(u p+Δp )=S p+Δp ′(u p+Δp ) (15);

[0074] 4. Second-order derivative continuity:

[0075] S p ″(u p+Δp )=S p+Δp ″(u p+Δp ) (16);

[0076] In formulas (13) to (16), u is the independent variable of interpolation, [u p ,u p+Δp ] are two data points in the missing interval, u p and up+Δp is the horizontal coordinate of two adjacent known data points, S p (u) is the corresponding interval [u p ,u p+Δp ] interpolation function, a p , b p , c p , d p These are the unknown coefficients to be found; S p (u p+Δp ) is the pth spline function S p (u) at node u p+Δp The value at S p+Δp (u p+Δp ) is the p+Δpth spline function S p+Δp (u) at node u p+Δp The value at .

[0077] In another aspect of the present invention, a device for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost is provided, the device comprising:

[0078] at least one processor; and

[0079] A memory storing instructions, which, when executed by the at least one processor, causes the at least one processor to execute the method for predicting the proportion of renewable energy power generation in an electric power system based on xLSTM and XGBoost as described above.

[0080] In another aspect of the present invention, a computer-readable storage medium is provided, which stores executable instructions. When the instructions are executed, the machine executes the above-mentioned method for predicting the proportion of renewable energy power generation in the power system based on xLSTM and XGBoost.

[0081] Compared with the prior art, the present invention has the following beneficial effects:

[0082] (1) The present invention provides a method, device, and computer-readable storage medium for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost. This method combines xLSTM and XGBoost based on IPCA data dimensionality reduction. xLSTM excels at capturing long-term dependencies in time series data, while XGBoost excels in processing nonlinear relationships and high-dimensional features, is efficient to train, and is robust to noisy data. Combining the two models through HEOA further improves prediction performance and accuracy.

[0083] (2) The present invention provides a method, device and computer-readable storage medium for predicting the proportion of renewable energy power generation in an electric power system based on xLSTM and XGBoost. The method uses MIC to screen features and then uses the IPCA method to reduce the dimensionality of high-dimensional data. This not only reduces the complexity of model training, but also reduces the impact of data noise on prediction accuracy, thereby providing subsequent models with more streamlined and reliable feature inputs, greatly improving prediction efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 This is the MIC correlation coefficient heat map between the proportion of new energy and the characteristics in the present invention;

[0085] Figure 2 This is the raw data of renewable energy proportion for a certain power grid in China for a whole year;

[0086] Figure 3 This is the new energy proportion test data set after data preprocessing;

[0087] Figure 4 Design a flowchart for the xLSTM and XGBoost combined prediction method for new energy proportion based on IPCA data dimensionality reduction;

[0088] Figure 5 This is a diagram showing the prediction effect of using traditional LSTM as a model training;

[0089] Figure 6 This is a graph showing the prediction effect of training a combined model of xLSTM and XGBoost. DETAILED DESCRIPTION

[0090] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0091] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.

[0092] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0093] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.

[0094] Example 1

[0095] Ginseng Figure 1 This embodiment provides a method for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost, the method comprising:

[0096] S1. Acquire data: Collect renewable energy power generation data from the power grid, which is time series data; then preprocess the data to obtain a data set, which includes the proportion of renewable energy and related features of the proportion of renewable energy; the preprocessing includes removing outliers in the data, checking whether the data contains missing values, and supplementing the missing values ​​using spline interpolation;

[0097] Preferably, the outlier removal refers to:

[0098] Abnormal data (17);

[0099] Normal data (18);

[0100] In formulas (17) to (18), V meas is the voltage measurement, V volt is the voltage rated value. When the voltage measurement value deviates from the voltage rated value by more than 8%, the data is considered abnormal data.

[0101] Preferably, the present invention adopts the spline interpolation method to fill the missing values, thereby ensuring the integrity and reliability of the data;

[0102] In this embodiment, the spline interpolation method used is specifically:

[0103] S11, spline function:

[0104] S p (u) = a p +b p (uu p )+c p (uu p ) 2 +d p (uu p ) 3 (13);

[0105] S12, interpolation point consistency:

[0106] S p (u p+Δp )=S p+Δp (u p+Δp ) (14);

[0107] S13. First-order derivative continuity:

[0108] S p ′(u p+Δp )=S p+Δp ′(u p+Δp ) (15);

[0109] S14. Second-order derivative continuity:

[0110] S p ″(u p+Δp )=S p+Δp ″(u p+Δp ) (16);

[0111] In formulas (13) to (16), u is the independent variable of interpolation, [u p ,u p+Δp ] are two data points in the missing interval, u p and u p+Δp is the horizontal coordinate of two adjacent known data points, S p (u) is the corresponding interval [u p ,u p+Δp ] interpolation function, a p , b p , c p , d p is the unknown coefficient to be determined, S p (u p+Δp ) is the pth spline function S p (u) at node u p+Δp The value at S p+Δp (u p+Δp ) is the p+Δpth spline function S p+Δp (u) at node u p+Δp The value at .

[0112] S2, feature screening of the data set to obtain a preprocessed data set;

[0113] After data preprocessing, the dataset is feature screened using the Maximum Information Coefficient (MIC) to identify features that have an important predictive effect on the proportion of new energy. This results in a preprocessed dataset, which includes feature columns and target columns, providing effective input features for the xLSTM and XGBoost models. The feature columns are features that have an important predictive effect on the proportion of new energy.

[0114] Preferably, the maximum information coefficient (MIC) is a statistic used to measure the correlation between two variables, and is particularly suitable for evaluating complex, nonlinear data relationships.

[0115] In this embodiment, the maximum information coefficient MIC used is:

[0116] S21, mutual information MI:

[0117]

[0118] In formula (1), Y represents the proportion of new energy, and X represents the characteristics related to the proportion of new energy; m and n represent the value ranges of variables X and Y, which are divided into m columns and n rows of grids respectively; X r 、Y s It represents the specific values ​​of random variables X and Y, the rth value of the discretized X variable and the sth value of the discretized Y variable; D(X r ) represents the variable X r The probability distribution of D(Y s ) represents the variable Y s The probability distribution of D(X r ,Y s ) represents the variable X r and Y s The joint probability distribution of

[0119] S22, Maximum Information Coefficient MIC:

[0120]

[0121] In formula (2), a and b represent the number of grid divisions in the X and Y directions, respectively; B is a variable parameter set to the 0.6 power of the data volume.

[0122] After the above processing, in this embodiment, a total of 13 features with important predictive effects were screened out, such as Figure 4 As shown, including the measured value of bus voltage (V meas ), the estimated phase angle of the bus voltage (A v ), the reactive power of new energy and conventional energy at the current moment (Q N , Q T ), the reactive power (CQ) measured at the compensator, the total load active power and reactive power (LP, LQ) at the current moment, and the measured values ​​of the active (GP, ZP, DP) and reactive power (GQ, ZQ, DQ) at the high, middle and low ends of the transformer.

[0123] S3. Based on the preprocessed data set, it is divided into training set, validation set and test set in chronological order. The first 60% of the data is used for training, the next 20% of the data is used as the validation set, and the last 20% is used as the test set for online prediction scenarios. Figure 2 Shown is the entire data target value of new energy. Figure 3 Shown are the target values ​​of the divided test set.

[0124] For time series data, the order of time is the key factor and the order cannot be disrupted. Sequential division can preserve the time correlation of the data and the long-term trends and cyclical characteristics in the data. In particular, time series data with seasonal fluctuations can prevent future information from leaking into the past.

[0125] S4. IPCA data dimensionality reduction:

[0126] Perform incremental principal component analysis (IPCA) dimensionality reduction on the preprocessed dataset in S3, and select principal components with cumulative contributions exceeding 99% to construct the IPCA model, preserving the important information characteristics of the data to the greatest extent possible.

[0127] The trained IPCA model is then used to perform dimensionality reduction on the training, validation, and test sets, simulating the online data stream processing process. This dimensionality reduction process helps reduce the data dimension while retaining key information features, thereby improving the efficiency of subsequent model training and prediction accuracy.

[0128] Preferably, the IPCA model used in this embodiment is:

[0129] Dataset:

[0130] A centered =A-μ (3);

[0131] Covariance matrix:

[0132]

[0133] Update the covariance matrix:

[0134]

[0135] Eigendecomposition:

[0136] ∑=QAQ T (6);

[0137] projection:

[0138] A reduced =A reduced W (7);

[0139] In formulas (3) to (7), A is the original data matrix, i.e., the data of the preprocessed data set, including feature columns and target columns; μ is the mean vector of each feature, indicating that each column of data is averaged; A centered is the data matrix after centering, with the mean value of each feature subtracted; ∑ newis the updated covariance matrix, which represents the comprehensive covariance of the current data batch and the existing data; ∑ old is the covariance matrix of historical data, i.e. the first N old The covariance of samples; batch is the covariance matrix of the current batch of data, calculated in the same way as in standard PCA, N old is the number of samples of historical data; N new is the number of samples in the current batch of data; N is the number of samples; Q is the eigenvector matrix of the covariance matrix; Λ refers to the diagonal matrix, including the eigenvalues; Q T is the transposed matrix of Q; X reduced is the data matrix after dimensionality reduction; W is the projection matrix composed of the first k principal component eigenvectors; the superscript T indicates the transpose of the matrix.

[0140] S5. Establish xLSTM prediction model and XGBoost prediction model:

[0141] Based on the dimensionality-reduced training set, we built and trained xLSTM and XGBoost models. For the xLSTM model, we manually tuned its hyperparameters and trained the xLSTM model to achieve predictions. For the XGBoost model, we used a grid search method to optimize its hyperparameters and trained the XGBoost model to achieve predictions.

[0142] Preferably, the xLSTM model used in this embodiment is composed of an sLSTM followed by an mLSTM stacked in series:

[0143] The sLSTM (scalar LSTM) used is:

[0144] Cell state: c t =f t ⊙c t-1 +i t ⊙z t ;

[0145] Normalized state: n t =f t ⊙n t-1 +i t ;

[0146] Hidden state:

[0147] Candidate cell states:

[0148] Input Gate:

[0149] Forget Gate: or

[0150] Output Gate:

[0151] x t is the input data of the current time step; h t-1 is the hidden state of the previous time step; c t , c t-1 is the cell state at the current and previous time steps; n t , n t-1 is the normalized state of the current and previous time steps; f t ,i t , o t is the output of the forget gate, input gate, and output gate; z t is the candidate cell state; w i , w f ,w o , w z is the weight matrix of the input gate, forget gate, output gate and candidate cell state; r i , r f , r o , r z is the recursive weight matrix of the input gate, forget gate, output gate and candidate cell state; b i , b f , b o , b z is the bias term of the input gate, forget gate, output gate and candidate cell state; σ, φ, exp are activation functions; ⊙ is the Hadamard product, which means element-wise multiplication; T represents the transpose of the matrix.

[0152] The mLSTM (Matrix LSTM) used is:

[0153] Cell status:

[0154] Normalized state: n t =f t ⊙n t-1 +i t ;

[0155] Hidden state:

[0156] The attention mechanism of mLSTM includes:

[0157] Query vector: q t =W q x t +b q ;

[0158] Key vector:

[0159] Value vector: v t =W v x t +b v ;

[0160] Input gate: i t =exp(w i T x t +b i );

[0161] Forget Gate: or

[0162] Output Gate:

[0163] x t is the input data of the current time step; h t , h t-1 is the hidden state of the current and previous time steps; c t , c t-1 is the cell state at the current and previous time steps; n t , n t-1 is the normalized state of the current and previous time steps; q t , k t , v t are the query, key, and value of the attention mechanism; W q , W k ,W v ,w i , w f ,w o is the weight matrix of query vector, key vector, value vector, input gate, forget gate and output gate; b q , b k ,b v , b i , b f , b o is the bias term of query vector, key vector, value vector, input gate, forget gate and output gate; f t ,i t , o t are the outputs of the forget gate, input gate, and output gate; σ, φ, exp are activation functions; ⊙ is the Hadamard product, which means element-wise multiplication; T represents the transpose of the matrix.

[0164] Preferably, the XGBoost model used in this embodiment is:

[0165]

[0166] In formulas (8) to (11), is the loss function, y i refers to the true value of the i-th sample, Refers to the predicted value of the i-th sample, Ω(f k ) refers to the regularization term, T refers to the number of leaf nodes, w j The weight of the jth leaf node, the γ leaf node penalty coefficient, the complexity of the limited tree, the λ regularization coefficient, The predicted value of the τth round, f τ (ξ i ) The output of the decision tree constructed in the τth round, ξ i is the input feature vector of the i-th sample.

[0167] S6. HEOA searches for optimal weights: Based on the validation set after dimensionality reduction, HEOA is used to optimize the weights of the xLSTM and XGBoost models. Through an automated search strategy, the optimal weight combination of the two base models is determined, and the objective function, namely the mean square error (MSE), is optimized to improve prediction accuracy.

[0168] Finally, the prediction results of the xLSTM test set and the XGBoost test set are weighted and fused by the optimal weight combination on the test set after dimensionality reduction, so as to obtain the final prediction and the final combined prediction results.

[0169] This fusion strategy effectively combines the advantages of the two base models and further improves the prediction accuracy and generalization ability. The prediction results of the combined model in this invention are as follows: Figure 5 As shown, the traditional LSTM prediction results are as follows Figure 6 shown.

[0170] Preferably, the HEOA model used in this embodiment is:

[0171]

[0172] In formula (12), W λ Indicates the weight of the λth model. When λ=1, it represents the xLSTM model, and when λ=2, it represents the XGBoost model. is the position of the λth individual in the ω+1 generation; β is the adaptive factor; ω is the number of current iterations; Max iter is the maximum number of iterations; represents the average position of the population in the ωth generation; W best is the current optimal solution; Levy(dim) represents the Levy flight distribution, which introduces randomness; f jump is the jump factor rand is a random number between [0, 1].

[0173] On the other hand, this embodiment uses indicators such as mean square error (MSE), mean absolute error (MAE), and coefficient of determination (R2) to evaluate the prediction results of the combined model in S6, comprehensively measuring the prediction accuracy and reliability of each model;

[0174] The evaluation indicators of the traditional model and the combined model are compared. The comparison of the evaluation indicators of the traditional model and the combined model is shown in Table 1. It can be seen from the results that the combined model in this embodiment has a good performance in multiple evaluation indicators (R 2 , MSE, and MAE) are all superior to the traditional model, namely the LSTM model, which verifies the feasibility of the proposed combined model in terms of prediction accuracy and practicality, and provides theoretical support and practical basis for the application of the model.

[0175] Table 1 Evaluation index table of traditional model and combined model

[0176]

[0177] Example 2

[0178] This embodiment provides a device for implementing a method for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost. The device includes:

[0179] at least one processor; and

[0180] A memory storing instructions, which, when executed by the at least one processor, enables the at least one processor to execute the above-mentioned embodiment, which provides a method for predicting the proportion of renewable energy power generation in an electric power system based on xLSTM and XGBoost.

[0181] In this embodiment, electronic devices include but are not limited to: personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile computing devices, smart phones, tablet computers, cellular phones, personal digital assistants (PDAs), handheld devices, messaging devices, wearable computing devices, consumer electronic devices, etc.

[0182] Example 3

[0183] This embodiment also provides a computer-readable storage medium storing executable instructions, which, when executed, enable the machine to perform the above-mentioned embodiment. This embodiment provides a method for predicting the proportion of renewable energy power generation in an electric power system based on xLSTM and XGBoost.

[0184] Specifically, a system or device equipped with a readable storage medium can be provided, on which software program codes that implement the functions of any of the above-mentioned embodiments are stored, and a computer or processor of the system or device can read and execute instructions stored in the readable storage medium.

[0185] In this case, the program code itself read from the computer-readable medium can realize the function of any one of the above embodiments, and thus the computer-readable code and the computer-readable storage medium storing the computer-readable code constitute part of this specification.

[0186] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (e.g., CD-ROMs, CD-Rs, CD-RWs, DVD-ROMs, DVD-RAMs, DVD-RWs, DVD-RWs), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or a cloud via a communication network.

[0187] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0188] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0189] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0190] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0191] Obviously, the above embodiments of the present invention are merely examples for the purpose of clearly illustrating the technical solutions of the present invention, and are not intended to limit the specific implementation methods of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of the present invention shall be included within the scope of protection of the claims of the present invention.

Claims

1. A method for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost, characterized in that: The method comprises: S1. Collect renewable energy power generation data from the power grid and preprocess the data to obtain a data set. The preprocessing includes removing outliers and processing missing values ​​using spline interpolation. S2. After data preprocessing, feature screening is performed on the data set using the maximum information coefficient to identify features that have an important predictive effect on the proportion of new energy, thereby obtaining a preprocessed data set. The preprocessed data set includes a feature column and a target column. The feature column is a feature that has an important predictive effect on the proportion of new energy; S3. Based on the preprocessed dataset, divide the data into training set, validation set and test set in chronological order; S4. Perform incremental principal component analysis and dimensionality reduction on the preprocessed dataset in S3, select principal components with cumulative contributions exceeding 99% to train the IPCA model, and then use the trained IPCA model to perform dimensionality reduction on the training set, validation set, and test set. S5. Based on the dimensionality-reduced training set, build and train the xLSTM and XGBoost models. For the xLSTM model, manually tune the hyperparameters and train the xLSTM model to achieve predictions. For the XGBoost model, use a grid search method to optimize its hyperparameters and train the XGBoost model to achieve predictions. S6. Based on the validation set after dimensionality reduction, HEOA is used to optimize the weights of the xLSTM and XGBoost models. Through an automated search strategy, the optimal weight combination of the two base models is determined to optimize the objective function. Finally, on the test set after dimensionality reduction, the prediction results of the xLSTM test set and the prediction results of the XGBoost test set are weighted and fused according to the weights to obtain the final combined prediction result. The maximum information coefficients used include: S21, mutual information MI: (1); In formula (1), Y represents the proportion of new energy, and X represents the characteristics related to the proportion of new energy; m and n represent the value ranges of variables X and Y, i.e., m columns and n rows, respectively, divided into a grid of m columns and n rows; They represent the rth value of the discretized X variable and the sth value of the discretized Y variable respectively; Representing variables The probability distribution of Representing variables The probability distribution of Representing variables and The joint probability distribution of S22, Maximum Information Coefficient MIC: (2); In formula (2), and Respectively expressed in and The number of grid divisions in the direction; B is a variable parameter, set to 0.6 power of the data amount; The features selected as being important for predicting the proportion of renewable energy include: the measured value of bus voltage, the estimated value of the phase angle of bus voltage, the reactive power of renewable energy and conventional energy at the current moment, the reactive power measured at the compensator, the total load active power and reactive power at the current moment, and the measured values ​​of active and reactive power at the high, medium, and low ends of the transformer; The HEOA model used is: (12); In formula (12), Indicates the The weight of the model, When , it represents the xLSTM model, When , it represents the XGBoost model; It is Individuals in The position of the generation; is the adaptive factor; is the number of current iterations; is the maximum number of iterations; Indicates that the population Average position of generations; is the current optimal solution; express Flight distribution,introducing randomness; is the jump factor is a random number between [0,1].

2. The method for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost according to claim 1 is characterized in that: The IPCA model used is: Dataset: (3); Covariance matrix: (4); Update the covariance matrix: (5); feature break down: (6); projection: (7); In formulas (3) to (7), A is the original data matrix, i.e., the data of the preprocessed data set, including feature columns and new energy proportion columns; is the mean vector of each feature, indicating that each column of data is averaged; is the centered data matrix with the mean of each feature subtracted; is the updated covariance matrix, which represents the combined covariance of the current data batch and the existing data; is the covariance matrix of historical data, i.e. The covariance of the samples; is the covariance matrix of the current batch of data, calculated in the same way as in standard PCA. is the number of samples of historical data; is the number of samples in the current batch of data; N is the number of samples; is the eigenvector matrix of the covariance matrix; is a diagonal matrix containing eigenvalues; yes The transposed matrix of is the data matrix after dimensionality reduction; is the projection matrix consisting of the first k principal component eigenvectors; the superscript T indicates the transpose of the matrix.

3. The method for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost according to claim 2 is characterized in that: The xLSTM is composed of an sLSTM followed by an mLSTM stacked in series: The sLSTM used is: Cell status: ; Normalized state: ; Hidden state: ; Candidate cell states: ; Input Gate: ; Forget Gate: or ; Output Gate: ; is the input data of the current time step, and t is the current time step; is the hidden state at the previous time step; are the cell states at the current and previous time steps, respectively; are the normalized states of the current and previous time steps, respectively; They are the outputs of the forget gate, input gate, and output gate respectively; is a candidate cell state; are the weight matrices of the input gate, forget gate, output gate, and candidate cell state respectively; are the recursive weight matrices of the input gate, forget gate, output gate, and candidate cell state respectively; They are the bias items of input gate, forget gate, output gate and candidate cell state respectively; is the activation function; is the Hadamard product, which means element-wise multiplication; the superscript T indicates the transpose of the matrix; The mLSTM used is: Cell status: ; Normalized state: ; Hidden state: ; The attention mechanism of mLSTM includes: Query vector: ; Key vector: ; Value vector: ; Input Gate: ; Forget Gate: or ; Output Gate: ; is the input data of the current time step; are the hidden states of the current and previous time steps respectively; are the cell states at the current and previous time steps, respectively; are the normalized states of the current and previous time steps, respectively; are the query, key, and value of the attention mechanism respectively; are the weight matrices of query vector, key vector, value vector, input gate, forget gate, and output gate respectively; They are the bias terms of query vector, key vector, value vector, input gate, forget gate and output gate respectively; They are the outputs of the forget gate, input gate, and output gate respectively; All are activation functions; is the Hadamard product, which means element-wise multiplication; the superscript T indicates the transpose of the matrix; The XGBoost model used is: (8); (9); (10); ; In formulas (8)~(11), is the loss function, refers to the true value of the i-th sample, refers to the predicted value of the i-th sample, is the regularization term, refers to the number of leaf nodes, No. leaf node weights, Leaf node penalty coefficient, limiting the complexity of the tree, Regularization coefficient, No. The predicted value of the round, No. The output of the decision tree constructed in rounds, is the input feature vector of the i-th sample.

4. The method for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost according to claim 1 is characterized in that: The method of processing missing values ​​by spline interpolation includes: S11, spline function: (13); S12, interpolation point consistency: (14); S13. First-order derivative continuity: (15); S14. Second-order derivative continuity: (16); In formulas (13)~(16), is the independent variable of the interpolation, are two data points in the missing interval, and are the horizontal coordinates of two adjacent known data points, The corresponding interval The interpolation function, are the unknown coefficients to be found, is the pth spline function At the node The value at It is spline function At the node The value at .

5. A device for predicting the proportion of renewable energy power generation in a power system based on xLSTM and XGBoost, characterized in that: The device comprises: processor; a memory having stored thereon a computer program executable on the processor; Wherein, when the computer program is executed by the processor, the steps of a method for predicting the proportion of renewable energy power generation in an electric power system based on xLSTM and XGBoost as described in any one of claims 1 to 4 are implemented.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Power load prediction method for realizing error correction mechanism based on LSTM-XGBoost

    CN116739118A

  • Construction and prediction method of carbon emission prediction model based on Stacking algorithm and medium

    CN115860173A

  • Hybrid deep learning-based photovoltaic power generation prediction method and device, and storage medium

    CN118554433A