PSO-LSTM-Adaboost-based wind and light power combined prediction method
The PSO-LSTM-Adaboost method optimizes the wind and light power prediction, and the particle swarm algorithm is used to optimize the LSTM hyperparameters and adjust the weights in the wind and light power prediction, which solves the nonlinear relationship and hyperparameter optimization problems in the wind and light power prediction, improving the prediction accuracy and stability.
Patent Information
- Application Number
- CN202510547171.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-12
AI Technical Summary
The existing wind and light power prediction methods have shortcomings in dealing with complex nonlinear relationships, model generalization capabilities and hyperparameter optimization, resulting in low prediction accuracy and stability.
The combined prediction method of PSO-LSTM-Adaboost is adopted to optimize the hyperparameters of the LSTM model through the PSO algorithm, and dynamically adjust the sample and weak predictor weights in combination with the Adaboost algorithm to build a strong predictor, and use the Dropout layer to prevent overfitting and improve model performance.
The accuracy and stability of wind and light power prediction are significantly improved, and the problems of insufficient generalization ability of a single model in complex nonlinear relationships and difficulty in hyperparameter optimization are solved, thereby achieving higher prediction accuracy and model stability.
Smart Images

Figure CN120473986A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of power systems and renewable energy, and in particular to a wind-solar power combination prediction method based on PSO-LSTM-Adaboost. Background Art
[0002] With the continuous development of new energy technologies, renewable energy sources such as wind and solar power are increasingly accounting for a larger share of power systems. However, the intermittent and fluctuating nature of wind and solar power poses significant challenges to grid dispatch and energy management. The accuracy of wind farm and photovoltaic power station output forecasts directly impacts grid dispatch stability and renewable energy integration efficiency. Accurate wind and solar power forecasting is crucial for improving grid stability and reliability, reducing operating costs, and promoting the effective integration of renewable energy.
[0003] Traditional wind and solar power forecasting methods primarily rely on physical models and statistical methods. Physical models make predictions based on meteorological data and physical laws, but these models typically require large amounts of input data and are computationally complex. Furthermore, the accuracy of this information processing directly impacts the forecast results. While statistical methods such as time series analysis can capture statistical patterns in the data, wind and solar power are subject to nonlinear influences such as complex meteorological conditions. This makes time series methods based on linear assumptions inaccurate when processing wind and solar power data. In recent years, machine learning methods such as support vector machines have been widely used in wind and solar power forecasting. These methods can effectively handle nonlinear relationships and improve forecast accuracy. However, single machine learning models still suffer from insufficient model generalization and difficulty optimizing hyperparameters when faced with complex wind and solar power data.
[0004] Long short-term memory (LSTM) networks are widely used in wind and solar power forecasting due to their powerful time series modeling capabilities. LSTMs can effectively capture long-term dependencies in time series, improving forecasting accuracy. However, the selection of LSTM model hyperparameters significantly impacts model performance. Traditional hyperparameter tuning methods often rely on experience and trial and error, which is inefficient and difficult to find the global optimal solution. The particle swarm optimization (PSO) algorithm, an optimization algorithm based on swarm intelligence, effectively solves global optimization problems. PSO simulates the foraging behavior of bird flocks to search for the optimal solution in the solution space and has been successfully applied to hyperparameter optimization of various machine learning models. The Adaboost ensemble learning method significantly improves model prediction performance by combining multiple weak predictors to build a strong predictor. Adaboost adjusts sample weights and weak predictor weights, allowing subsequent weak predictors to pay more attention to samples that were previously mispredicted, thereby gradually improving the overall model performance. However, existing wind and solar power forecasting methods still have shortcomings in handling complex nonlinear relationships, model generalization, and hyperparameter optimization. Therefore, developing a wind-solar power combination prediction method that can effectively combine PSO, LSTM and Adaboost has important theoretical and practical significance for improving prediction accuracy and stability. Summary of the Invention
[0005] Aiming at the shortcomings of existing wind and solar power prediction methods in dealing with complex nonlinear relationships, model generalization ability and hyperparameter optimization, this paper proposes a wind and solar power combined prediction method based on PSO-LSTM-Adaboost. This method improves the accuracy and stability of wind and solar power prediction by optimizing model hyperparameters and ensemble learning strategies.
[0006] In order to achieve the above-mentioned purpose of the invention, the technical solution adopted by the present invention is as follows:
[0007] Step 1: Obtain a historical wind and solar power generation data set, divide the data set into a training set and a test set, and perform normalization processing;
[0008] Step 2: Build an LSTM-based neural network model, use the Adam optimization algorithm to train the model, and initially adjust the hyperparameters to improve performance;
[0009] Step 3: Use the Adaboost algorithm to combine multiple weak predictors (LSTM models) to build a strong predictor, adjust the sample weights and weak predictor weights, and gradually improve the model prediction accuracy;
[0010] Step 4: Use the PSO algorithm to optimize the hyperparameters of the LSTM model (learning rate, number of hidden layer nodes, regularization coefficient, etc.);
[0011] Step 5: Use the optimized LSTM model and Adaboost algorithm to train the training set, make predictions on the test set, and restore the prediction results to the actual values through denormalization.
[0012] Step 6: Calculate the mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and coefficient of determination (R 2 ) and relative prediction deviation (RPD) to evaluate model performance.
[0013] Furthermore, in step 1, a historical wind and solar power generation data set is obtained. The photovoltaic data set includes 16 sets of meteorological data, including temperature, cloud opacity, direct solar radiation index, and diffuse solar radiation index. The wind power data set includes 9 sets of meteorological data, including wind speed, wind direction, temperature, humidity, and air pressure. Both wind and solar data sets are sampled at a 15-minute frequency, generating 96 wind and solar power observations daily. Using a time series partitioning method, 80% of the data set is used as a training set, and 20% as a test set. Extreme value normalization is used to normalize the data values to between 0 and 1.
[0014] The normalization formula is:
[0015]
[0016] Among them, x t is the original data, x' t is the normalized data, x min is the minimum value in the data set, x max is the maximum value in the data set.
[0017] Furthermore, in step 2, multiple LSTM networks are initialized, whose structure includes a sequence input layer, a sequence folding layer, an LSTM layer (including dropout), a fully connected layer, and a regression layer. The initial learning rate, number of hidden layer nodes, and L2 regularization coefficient of the LSTM are preliminarily adjusted.
[0018] The Adam optimization algorithm is used for model training, and its weight update rules are as follows:
[0019] (1) Gradient calculation: Calculate the gradient g of the loss function with respect to the weight t
[0020] (2) First-order moment estimation:
[0021] m t =β1m t-1 +(1-β1)g t
[0022] (3) Second-order moment estimation:
[0023]
[0024] (4) Bias correction:
[0025]
[0026] (5) Weight update:
[0027]
[0028] Among them, θ is the weight, g t is the gradient, α is the learning rate, β1, β2 are the decay rates of Adam, and ε is the numerical stability parameter.
[0029] Furthermore, in step 3, the Adaboost algorithm is used to combine multiple weak predictors (LSTM models) to build a strong predictor, adjust the sample weights and weak predictor weights, and gradually improve the model prediction accuracy.
[0030] (1) Sample weight initialization: Initially, all samples have equal weights to ensure that each sample has the same influence in the early stages of training.
[0031] All samples are equally weighted:
[0032]
[0033] Where N is the number of training samples, D 1.j is the weight of sample j in the first iteration.
[0034] (2) Weak predictor training: Each weak predictor (LSTM model) is trained based on the current sample weight. Samples with larger weights have a greater impact on the model.
[0035] (3) Weak predictor prediction: Use the trained weak predictor to predict the training set and obtain the predicted value of each sample.
[0036] (4) Calculate the error of the weak predictor: The performance of the weak predictor is measured by the weighted error. The smaller the error, the better the performance of the weak predictor.
[0037] The prediction error for each sample is:
[0038]
[0039] Among them, y j represents the true value of the jth sample, Represents the predicted value of the i-th weak predictor for the j-th sample
[0040] (5) Calculate the weight of the weak predictor: The weight of the weak predictor is proportional to its performance. The weak predictor with better performance has a greater influence in the final strong predictor.
[0041] (6) Update sample weights: The sample weights are adjusted according to the prediction error of the weak predictor. The weights of misclassified samples are increased, and the weights of correctly classified samples are reduced. This makes the subsequent weak predictors pay more attention to misclassified samples.
[0042] The sample weight is adjusted based on the prediction error, and the update rule is:
[0043]
[0044] Among them, D i+1,j is the weight of sample j in the i+1th iteration.
[0045] (7) Construct a strong predictor: The outputs of all weak predictors are weighted and summed to obtain the final strong predictor output, thereby improving the prediction accuracy of the overall model.
[0046] Strong predictor:
[0047]
[0048] Where M is the number of weak predictors, α m is the weight of the mth weak predictor, is the predicted value of the mth weak predictor for the jth sample, is the final prediction value of the strong predictor for the jth sample.
[0049] Furthermore, in step 4, the process of optimizing the hyperparameters of the LSTM model using the PSO algorithm includes:
[0050] (1) Initialize the particle swarm: Randomly generate the position and velocity of each particle in the swarm, ensuring that the initial position is within the defined search space.
[0051] (2) Fitness evaluation: For each particle, the LSTM model is trained using its position (hyperparameter combination), and the MSE on the training set is calculated as the fitness value.
[0052] (3) Update individual optimal and global optimal: Record the historical optimal position and fitness value of each particle. Find the global optimal position and fitness value among all particles.
[0053] Update particle velocity and position:
[0054] Update speed:
[0055]
[0056] Update location:
[0057]
[0058] Among them, r1 and r2 are random numbers between [0,1], t is the current iteration number, ω is the inertia weight, c1 and c2 are learning factors, is the position of the i-th particle at iteration number t, is the velocity of the i-th particle at iteration number t, p besti is the historical optimal position of the i-th particle, g best is the global optimal position of all particles.
[0059] (4) Speed and position update: According to the speed and position update formula of PSO, the movement direction and position of each particle are adjusted. Ensure that the updated position is within the search space. If it is out of range, the position is limited to the boundary value.
[0060] (5) Termination condition: When the maximum number of iterations is reached, the global optimal position is output as the optimal hyperparameter combination.
[0061] Furthermore, in step 5, the specific steps of using the optimized LSTM model and Adaboost algorithm for training and prediction are as follows:
[0062] (1) Initialize the LSTM model using the hyperparameters (learning rate, number of hidden layer nodes, L2 regularization coefficient) optimized by PSO and build the LSTM network structure, including the input layer, LSTM layer, Dropout layer, fully connected layer, and regression layer. Set training options, such as the maximum number of training rounds, initial learning rate, etc. Train the LSTM model using the training set.
[0063] (2) Initialize the sample weights. Initially, the weights of all samples are equal.
[0064] (3) Weak predictor training and weight update. For each weak predictor (LSTM model), the current sample weight is used to train the weak predictor, calculate the weighted error of the weak predictor, calculate the weight of the weak predictor, and update the sample weight.
[0065] (4) Construct a strong predictor and sum the weighted outputs of all weak predictors to obtain the final strong predictor output.
[0066] (5) Use the trained Adaboost ensemble model to predict the test set and obtain the prediction results.
[0067] (6) Restore the normalized prediction results to the actual value.
[0068] The anti-normalization formula is:
[0069]
[0070] Among them, y max and y min is the maximum and minimum value of the output data, is the normalized predicted value, is the predicted value (actual value) after denormalization.
[0071] Furthermore, in step 6, the mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and coefficient of determination (R 2 ) and relative prediction deviation (RPD) and other indicators to evaluate the model performance, and its mathematical models are:
[0072]
[0073]
[0074] Among them, y j is the true value of the jth sample, is the predicted value after denormalization, N is the number of samples, is the mean of the true values.
[0075] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0076] The PSO algorithm ensures that the LSTM model can quickly converge and find the global optimal solution during training, while the Adaboost algorithm further improves the model's predictive performance by combining multiple weak predictors to build a strong predictor. The PSO algorithm automatically optimizes LSTM hyperparameters (learning rate, number of hidden layer nodes, and regularization coefficient), avoiding the subjective errors of manual parameter adjustment. An Adaboost sample weight update strategy based on an error threshold (0.01) is proposed, dynamically increasing the weight of high-error samples (weight amplification factor of 1.1) to improve the model's sensitivity to sudden changes in output. Combining the Dropout layer in the LSTM network with the PSO-optimized L2 regularization term creates a dual regularization mechanism, addressing the problem of overfitting the training data to a single model. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0078] Figure 1 The present invention is a flowchart of the method.
[0079] Figure 2The photoelectric training set prediction results of the present invention and the existing method are shown in FIG
[0080] Figure 3 The photoelectric test set prediction results of the present invention and the existing method are shown in FIG
[0081] Figure 4 The wind power training set prediction results of the present invention and the existing method are shown in the figure
[0082] Figure 5 The wind power test set prediction results of the present invention and the existing method are shown in the figure DETAILED DESCRIPTION
[0083] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0084] The wind and solar power combined prediction method based on PSO-LSTM-Adaboost provided by the present invention is based on Figure 1 , the method comprises the following steps:
[0085] Step 1: Obtain a historical wind and solar power generation data set, divide the data set into a training set and a test set, and perform normalization processing;
[0086] Step 2: Build an LSTM-based neural network model, use the Adam optimization algorithm to train the model, and initially adjust the hyperparameters to improve performance;
[0087] Step 3: Use the Adaboost algorithm to combine multiple weak predictors (LSTM models) to build a strong predictor, adjust the sample weights and weak predictor weights, and gradually improve the model prediction accuracy;
[0088] Step 4: Use the PSO algorithm to optimize the hyperparameters of the LSTM model (learning rate, number of hidden layer nodes, regularization coefficient, etc.);
[0089] Step 5: Use the optimized LSTM model and Adaboost algorithm to train the training set, make predictions on the test set, and restore the prediction results to the actual values through denormalization.
[0090] Step 6: Calculate the mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and coefficient of determination (R 2 ) and relative prediction deviation (RPD) to evaluate model performance.
[0091] In step 1, a historical wind and solar power generation data set is obtained. The photovoltaic data set includes 16 sets of meteorological data, including temperature, cloud opacity, direct solar radiation index, and diffuse solar radiation index. The wind power data set includes 9 sets of meteorological data, including wind speed, wind direction, temperature, humidity, and air pressure. Both wind and solar data sets are sampled at a 15-minute frequency, generating 96 wind and solar power observations daily. Using a time series partitioning method, 80% of the data set is used as a training set, and 20% as a test set. Extreme value normalization is used to normalize the data values to between 0 and 1.
[0092] The normalization formula is:
[0093]
[0094] Among them, x t is the original data, x' t is the normalized data, x min is the minimum value in the data set, x max is the maximum value in the data set.
[0095] In step 2, multiple LSTM networks are initialized, including a sequence input layer, a sequence folding layer, an LSTM layer (including dropout), a fully connected layer, and a regression layer. The initial learning rate, number of hidden layer nodes, and L2 regularization coefficient of the LSTM are preliminarily adjusted.
[0096] The Adam optimization algorithm is used for model training, and its weight update rules are as follows:
[0097] (1) Gradient calculation: Calculate the gradient g of the loss function with respect to the weight t
[0098] (2) First-order moment estimation:
[0099] m t =β1m t-1 +(1-β1)g t
[0100] (3) Second-order moment estimation:
[0101]
[0102] (4) Bias correction:
[0103]
[0104] (5) Weight update:
[0105]
[0106] Among them, θ is the weight, g tis the gradient, α is the learning rate, β1, β2 are the decay rates of Adam, and ε is the numerical stability parameter.
[0107] In step 3, the Adaboost algorithm is used to combine multiple weak predictors (LSTM models) to build a strong predictor, adjust the sample weights and weak predictor weights, and gradually improve the model prediction accuracy.
[0108] (1) Sample weight initialization: Initially, all samples have equal weights to ensure that each sample has the same influence in the early stages of training.
[0109] All samples are equally weighted:
[0110]
[0111] Where N is the number of training samples, D 1.j is the weight of sample j in the first iteration.
[0112] (2) Weak predictor training: Each weak predictor (LSTM model) is trained based on the current sample weight. Samples with larger weights have a greater impact on the model.
[0113] (3) Weak predictor prediction: Use the trained weak predictor to predict the training set and obtain the predicted value of each sample.
[0114] (4) Calculate the error of the weak predictor: The performance of the weak predictor is measured by the weighted error. The smaller the error, the better the performance of the weak predictor.
[0115] The prediction error for each sample is:
[0116]
[0117] Among them, y j represents the true value of the jth sample, Represents the predicted value of the i-th weak predictor for the j-th sample
[0118] (5) Calculate the weight of the weak predictor: The weight of the weak predictor is proportional to its performance. The weak predictor with better performance has a greater influence in the final strong predictor.
[0119] (6) Update sample weights: The sample weights are adjusted according to the prediction error of the weak predictor. The weights of misclassified samples are increased, and the weights of correctly classified samples are reduced. This makes the subsequent weak predictors pay more attention to misclassified samples.
[0120] The sample weight is adjusted based on the prediction error, and the update rule is:
[0121]
[0122] Among them, D i+1,j is the weight of sample j in the i+1th iteration.
[0123] (7) Construct a strong predictor: The outputs of all weak predictors are weighted and summed to obtain the final strong predictor output, thereby improving the prediction accuracy of the overall model.
[0124] Strong predictor:
[0125]
[0126] Where M is the number of weak predictors, α m is the weight of the mth weak predictor, is the predicted value of the mth weak predictor for the jth sample, is the final prediction value of the strong predictor for the jth sample.
[0127] In step 4, the process of optimizing the hyperparameters of the LSTM model using the PSO algorithm includes:
[0128] (1) Initialize the particle swarm: Randomly generate the position and velocity of each particle in the swarm, ensuring that the initial position is within the defined search space.
[0129] (2) Fitness evaluation: For each particle, the LSTM model is trained using its position (hyperparameter combination), and the MSE on the training set is calculated as the fitness value.
[0130] (3) Update individual optimal and global optimal: Record the historical optimal position and fitness value of each particle. Find the global optimal position and fitness value among all particles.
[0131] Update particle velocity and position:
[0132] Update speed:
[0133]
[0134] Update location:
[0135]
[0136] Among them, r1 and r2 are random numbers between [0,1], t is the current iteration number, ω is the inertia weight, c1 and c2 are learning factors, is the position of the i-th particle at iteration number t, is the velocity of the i-th particle at iteration number t, p besti is the historical optimal position of the i-th particle, g best is the global optimal position of all particles.
[0137] (4) Speed and position update: According to the speed and position update formula of PSO, the movement direction and position of each particle are adjusted. Ensure that the updated position is within the search space. If it is out of range, the position is limited to the boundary value.
[0138] (5) Termination condition: When the maximum number of iterations is reached, the global optimal position is output as the optimal hyperparameter combination.
[0139] In step 5, the specific steps of using the optimized LSTM model and Adaboost algorithm for training and prediction are as follows:
[0140] (1) Initialize the LSTM model using the hyperparameters (learning rate, number of hidden layer nodes, L2 regularization coefficient) optimized by PSO and build the LSTM network structure, including the input layer, LSTM layer, Dropout layer, fully connected layer, and regression layer. Set training options, such as the maximum number of training rounds, initial learning rate, etc. Train the LSTM model using the training set.
[0141] (2) Initialize the sample weights. Initially, the weights of all samples are equal.
[0142] (3) Weak predictor training and weight update. For each weak predictor (LSTM model), the current sample weight is used to train the weak predictor, calculate the weighted error of the weak predictor, calculate the weight of the weak predictor, and update the sample weight.
[0143] (4) Construct a strong predictor and sum the weighted outputs of all weak predictors to obtain the final strong predictor output.
[0144] (5) Use the trained Adaboost ensemble model to predict the test set and obtain the prediction results.
[0145] (6) Restore the normalized prediction results to the actual value.
[0146] The anti-normalization formula is:
[0147]
[0148] Among them, y max and y min is the maximum and minimum value of the output data, is the normalized predicted value, is the predicted value (actual value) after denormalization.
[0149] In step 6, the mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and coefficient of determination (R 2) and relative prediction deviation (RPD) and other indicators to evaluate the model performance, and its mathematical models are:
[0150]
[0151] Among them, y j is the true value of the jth sample, is the predicted value after denormalization, N is the number of samples, is the mean of the true values.
[0152] like Figure 2-5 As shown in the figure, the PSO-LSTM-Adaboost method is closer to the true value under the method proposed in this invention. This shows that the prediction method proposed in this invention is effective and its prediction performance is better than the existing LSTM and LSTN-Adaboost prediction methods, with higher prediction accuracy.
Claims
1. A wind-solar power combination prediction method based on PSO-LSTM-Adaboos, characterized in that: The method specifically comprises the following steps: Step 1: Obtain a historical wind and solar power generation data set, divide the data set into a training set and a test set, and perform normalization processing; Step 2: Build an LSTM-based neural network model, use the Adam optimization algorithm to train the model, and initially adjust the hyperparameters to improve performance; Step 3: Use the Adaboost algorithm to combine multiple weak predictors (LSTM models) to build a strong predictor, adjust the sample weights and weak predictor weights, and gradually improve the model prediction accuracy; Step 4: Use the PSO algorithm to optimize the hyperparameters of the LSTM model (learning rate, number of hidden layer nodes, regularization coefficient, etc.); Step 5: Use the optimized LSTM model and Adaboost algorithm to train the training set, make predictions on the test set, and restore the prediction results to the actual values through denormalization. Step 6: Calculate the mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and coefficient of determination (R 2 ) and relative prediction deviation (RPD) to evaluate model performance.
2. A wind-solar power combination prediction method based on PSO-LSTM-Adaboos according to claim 1, characterized in that: In step 1, a historical wind and solar power generation data set is obtained. The photovoltaic data set includes 16 sets of meteorological data, including temperature, cloud opacity, direct solar radiation index, and diffuse solar radiation index. The wind power data set includes 9 sets of meteorological data, including wind speed, wind direction, temperature, humidity, and air pressure. Both wind and solar data sets are sampled at a 15-minute frequency, generating 96 wind and solar power observations daily. Using a time series partitioning method, 80% of the data set is used as a training set, and 20% as a test set. Extreme value normalization is used to normalize the data values to between 0 and 1. The normalization formula is: Among them, x t is the original data, x′ t is the normalized data, x min is the minimum value in the data set, x max is the maximum value in the data set.
3. A wind-solar power combination prediction method based on PSO-LSTM-Adaboos according to claim 1, characterized in that: In step 2, multiple LSTM networks are initialized, including a sequence input layer, a sequence folding layer, an LSTM layer (including dropout), a fully connected layer, and a regression layer. The initial learning rate, number of hidden layer nodes, and L2 regularization coefficient of the LSTM are preliminarily adjusted. The Adam optimization algorithm is used for model training, and its weight update rules are as follows: (1) Gradient calculation: Calculate the gradient g of the loss function with respect to the weight t (2) First-order moment estimation: m t =β1m t-1 +(1-β1)g t (3) Second-order moment estimation: (4) Bias correction: (5) Weight update: Among them, θ is the weight, g t is the gradient, α is the learning rate, β1, β2 are the decay rates of Adam, and ε is the numerical stability parameter.
4. A wind-solar power combination prediction method based on PSO-LSTM-Adaboos according to claim 1, characterized in that: In step 3, the Adaboost algorithm is used to combine multiple weak predictors (LSTM models) to build a strong predictor, adjust the sample weights and weak predictor weights, and gradually improve the model prediction accuracy. (1) Sample weight initialization: Initially, all samples have equal weights to ensure that each sample has the same influence in the early stages of training. All samples are equally weighted: Where N is the number of training samples, D 1.j is the weight of sample j in the first iteration. (2) Weak predictor training: Each weak predictor (LSTM model) is trained based on the current sample weight. Samples with larger weights have a greater impact on the model. (3) Weak predictor prediction: Use the trained weak predictor to predict the training set and obtain the predicted value of each sample. (4) Calculate the error of the weak predictor: The performance of the weak predictor is measured by the weighted error. The smaller the error, the better the performance of the weak predictor. The prediction error for each sample is: Among them, y j represents the true value of the jth sample, Represents the predicted value of the i-th weak predictor for the j-th sample (5) Calculate the weight of the weak predictor: The weight of the weak predictor is proportional to its performance. The weak predictor with better performance has a greater influence in the final strong predictor. (6) Update sample weights: The sample weights are adjusted according to the prediction error of the weak predictor. The weights of misclassified samples are increased, and the weights of correctly classified samples are reduced. This makes the subsequent weak predictors pay more attention to misclassified samples. The sample weight is adjusted based on the prediction error, and the update rule is: Among them, D i+1,j is the weight of sample j in the i+1th iteration. (7) Construct a strong predictor: The outputs of all weak predictors are weighted and summed to obtain the final strong predictor output, thereby improving the prediction accuracy of the overall model. Strong predictor: Where M is the number of weak predictors, α m is the weight of the mth weak predictor, is the predicted value of the mth weak predictor for the jth sample, is the final prediction value of the strong predictor for the jth sample.
5. A wind-solar power combination prediction method based on PSO-LSTM-Adaboos according to claim 1, characterized in that: In step 4, the process of optimizing the hyperparameters of the LSTM model using the PSO algorithm includes: (1) Initialize the particle swarm: Randomly generate the position and velocity of each particle in the swarm, ensuring that the initial position is within the defined search space. (2) Fitness evaluation: For each particle, the LSTM model is trained using its position (hyperparameter combination), and the MSE on the training set is calculated as the fitness value. (3) Update individual optimal and global optimal: Record the historical optimal position and fitness value of each particle. Find the global optimal position and fitness value among all particles. Update particle velocity and position: Update speed: Update location: Among them, r1 and r2 are random numbers between [0,1], t is the current iteration number, ω is the inertia weight, c1 and c2 are learning factors, is the position of the i-th particle at iteration number t, is the velocity of the i-th particle at iteration number t, p besti is the historical optimal position of the i-th particle, g best is the global optimal position of all particles. (4) Speed and position update: According to the speed and position update formula of PSO, the movement direction and position of each particle are adjusted. Ensure that the updated position is within the search space. If it is out of range, the position is limited to the boundary value. (5) Termination condition: When the maximum number of iterations is reached, the global optimal position is output as the optimal hyperparameter combination.
6. A wind-solar power combination prediction method based on PSO-LSTM-Adaboos according to claim 1, characterized in that: In step 5, the specific steps of using the optimized LSTM model and Adaboost algorithm for training and prediction are as follows: (1) Initialize the LSTM model using the hyperparameters (learning rate, number of hidden layer nodes, L2 regularization coefficient) optimized by PSO and build the LSTM network structure, including the input layer, LSTM layer, Dropout layer, fully connected layer, and regression layer. Set training options, such as the maximum number of training rounds, initial learning rate, etc. Train the LSTM model using the training set. (2) Initialize the sample weights. Initially, the weights of all samples are equal. (3) Weak predictor training and weight update. For each weak predictor (LSTM model), the current sample weight is used to train the weak predictor, calculate the weighted error of the weak predictor, calculate the weight of the weak predictor, and update the sample weight. (4) Construct a strong predictor and sum the weighted outputs of all weak predictors to obtain the final strong predictor output. (5) Use the trained Adaboost ensemble model to predict the test set and obtain the prediction results. (6) Restore the normalized prediction results to the actual value. The anti-normalization formula is: Among them, y max and y min is the maximum and minimum value of the output data, is the normalized predicted value, is the predicted value (actual value) after denormalization.
7. A wind-solar power combination prediction method based on PSO-LSTM-Adaboos according to claim 1, characterized in that: In step 6, the mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and coefficient of determination (R 2 ) and relative prediction deviation (RPD) and other indicators to evaluate the model performance, and its mathematical models are: Among them, y j is the true value of the jth sample, is the predicted value after denormalization, N is the number of samples, is the mean of the true values.