CN114330815A - Ultra-short-term wind power prediction method and system based on improved GOA (generic object oriented architecture) optimized LSTM (least Square TM) - Google Patents

Ultra-short-term wind power prediction method and system based on improved GOA (generic object oriented architecture) optimized LSTM (least Square TM) Download PDF

Info

Publication number
CN114330815A
CN114330815A CN202111325107.XA CN202111325107A CN114330815A CN 114330815 A CN114330815 A CN 114330815A CN 202111325107 A CN202111325107 A CN 202111325107A CN 114330815 A CN114330815 A CN 114330815A
Authority
CN
China
Prior art keywords
locust
max
wind power
lstm
lstm model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202111325107.XA
Other languages
Chinese (zh)
Inventor
胡浩文
夏鑫
王晓露
吕文卓
刘康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huaiyin Institute of Technology
Original Assignee
Huaiyin Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huaiyin Institute of Technology filed Critical Huaiyin Institute of Technology
Priority to CN202111325107.XA priority Critical patent/CN114330815A/en
Publication of CN114330815A publication Critical patent/CN114330815A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Air Conditioning Control Device (AREA)

Abstract

The invention discloses an ultra-short-term wind power prediction method and system based on improved GOA optimized LSTM, which comprises the following steps: s1: acquiring wind power data and preprocessing the wind power data to obtain a plurality of components; constructing a corresponding input matrix for each component, and determining a training matrix and a test matrix of each component; s2: constructing an independent LSTM model for each component; s3: carrying out parameter optimization on the number h of hidden layer neurons and the learning rate alpha of the LSTM model constructed by each component by using the improved GOA, and training to obtain the LSTM model with optimal parameters; s4: and inputting the test matrix corresponding to each component into the corresponding LSTM model which has the optimal parameters and is trained to obtain a predicted value, and aggregating the obtained predicted values of the components to obtain a final prediction result. The method can realize high-precision prediction of the ultra-short-term wind power.

Description

Ultra-short-term wind power prediction method and system based on improved GOA (generic object oriented architecture) optimized LSTM (least Square TM)
Technical Field
The invention relates to the technical field of wind power prediction, in particular to an ultra-short-term wind power prediction method and system based on improved GOA optimized LSTM.
Background
At present, research methods in the aspect of wind power prediction can be generally divided into three types, namely a physical model, a statistical model and artificial intelligence. The physical model estimates wind power through physical factors and meteorological data, and the performance of the physical model in short-term prediction is poor. The statistical method is to use a mathematical model based on historical data to predict wind speed and wind power, and a typical statistical model is based on the premise that wind speed data are normally distributed and linearly related, so that the prediction performance cannot be guaranteed because the wind speed data do not conform to the actual situation. In artificial intelligence, because wind speed has strong nonlinearity and intermittence, a wind speed sequence is directly modeled and predicted, the nonlinearity and the intermittence have large influence on prediction accuracy, the accuracy of wind power prediction by using CEEMDAN and LSTM models in the prior art is still limited, and the accuracy of short-term wind power prediction needs to be further improved.
Disclosure of Invention
The purpose of the invention is as follows: aiming at the defects, the invention provides the ultra-short-period wind power prediction method based on the improved GOA optimized LSTM, which can better realize the prediction of the ultra-short-period wind power and improve the prediction precision. Meanwhile, the invention also provides an ultra-short-term wind power prediction system based on the improved GOA optimized LSTM.
The technical scheme is as follows: in order to solve the problems, the ultra-short-term wind power prediction method based on the improved GOA optimized LSTM comprises the following steps:
s1: acquiring wind power data and preprocessing the wind power data to obtain a plurality of components; constructing a corresponding input matrix for each component, and determining a training matrix and a test matrix of each component;
s2: constructing an independent LSTM model for each component;
s3: carrying out parameter optimization on the number h of hidden layer neurons and the learning rate alpha of the LSTM model constructed by each component by using the improved GOA, and training to obtain the LSTM model with optimal parameters; the wind power prediction mathematical model based on the LSTM model with the optimal parameters is as follows:
yi=fLSTM(h,α)
hmin≤h≤hmax
αmin≤α≤αmax
in the formula: h ismaxIs the upper bound, alpha, of the number h of hidden layer neuronsmaxIs the upper bound of the learning rate alpha, hminIs the lower bound, α, of the number h of neurons in the hidden layerminIs the lower bound of the learning rate α;
the improved GOA is obtained by improving a decreasing coefficient c of the GOA by adopting a self-adaptive decreasing coefficient updating mechanism and introducing a gold sine operator into the updating of the individual positions of the locusts in the GOA;
the specific steps of parameter optimization comprise:
s3.1: initializing related algorithm parameters; setting the population number N of the locust, the spatial dimension d and the maximum iteration number TmaxThe upper bound ub of the space is set to hmax、αmax(ii) a The lower bound lb of the space is set to hmin、αmin(ii) a The current iteration time t is 1, and the space position of the current locust is generated
Figure BDA0003346664230000021
S3.2: obtaining a predicted value y through LSTM model trainingiObtaining the locust fitness value by utilizing the fitness function fitness, and saving the locust position with the minimum current fitness value as an optimal solution to a variable
Figure BDA0003346664230000022
The fitness function, fitness, is:
Figure BDA0003346664230000023
in the formula, tiIs the actual value of the training sample;
s3.3: judging whether the current iteration time T reaches the maximum iteration time Tmax(ii) a If yes, executing S3.5, otherwise executing S3.4;
s3.4: updating the decreasing coefficient c, and normalizing the distance between the locusts to be [1,4 ]]Introducing a gold sine operator to update the position of the locust, calculating a new locust fitness value when the current iteration time t is t +1, comparing the position of the locust with the minimum new locust fitness value with the current optimal solution, and updating the position of the locust if the position of the locust is superior to the current optimal solution
Figure BDA0003346664230000024
Otherwise, executing S3.3;
s3.5: output of
Figure BDA0003346664230000025
Extracting the number h of hidden layer neurons and the learning rate alpha from the LSTM model to obtain an LSTM model with optimal parameters;
s4: and inputting the test matrix of each component into a corresponding LSTM model which has optimal parameters and is trained to obtain a predicted value, and aggregating the obtained predicted values of the components to obtain a final prediction result.
Has the advantages that: compared with the prior art, the invention has the following remarkable advantages: combining the LSTM with the improved GOA, and optimizing parameters of the LSTM model by using the improved GOA; and obtaining the predicted value of each component by using the trained LSTM model with the optimal parameters and the test data of the corresponding component, and aggregating to obtain the final predicted value.
Further, the method also comprises the step of S5: three evaluation indexes commonly used in wind power prediction are selected: root mean square error RMSE, mean absolute error MAE and maximum absolute error EmaxThe predicted performance of the method described in S1-S4 was evaluated.
Further, the preprocessing performed on the data in S1 includes:
s1.1: decomposing the historical wind power data sequence by adopting CEEMDAN to obtain s-1 intrinsic mode function components and 1 residual error component;
s1.2: and analyzing the correlation relation among the variables of each component by adopting a correlation coefficient method, screening out main subcomponents, constructing a corresponding input matrix, normalizing all the input matrices and the target variables into [0,1], and determining a training matrix and a test matrix of each component.
Further, each component in S2 constructs an independent LSTM model with repeated module chain structures inside, and the calculation process is as follows:
ft=σ(Wfxt+Wfht-1+bf)
it=σ(Wixt+Wiht-1+bi)
Figure BDA0003346664230000031
ot=σ(Woxt+Woht-1+bo),ht=ot tanh(Ct)
in the formula: f. oftThe output result of the forgetting gate at the time t is shown; i.e. itIndicating the processing result of the input gate at the time t;
Figure BDA0003346664230000032
representing the state of the input unit at time t; ctRepresenting the gating state at time t; otRepresenting the processing result of the output gate; h istAn output value representing time t; wfWeight, W, for connecting input values in forgetting gateiWeight, W, for connected input values in input gatecFor updating the weight, W, of the connected input value in the gateoWeights for the connected input values in the output gates; bfBias for forgetting door, biOffset of input gate, bcUpdating the offset of the gate and boBeing biasing of output gatesσ and tanh are sigmoid function and tanh function respectively; to realize regression prediction, a linear regression layer is added on the basis of the LSTM model as follows:
yt=Wyoht+by
in the formula: wyoIs the weight of the linear regression layer; byThreshold value of the linear regression layer, ytIs a prediction result.
Further, the formula of the adaptive decreasing coefficient updating mechanism described in S3 is as follows:
Figure BDA0003346664230000033
wherein T is the current iteration number of the algorithm, TmaxIs the maximum iteration number;
the introduced golden sine operator is as follows:
Figure BDA0003346664230000034
Figure BDA0003346664230000041
Figure BDA0003346664230000042
r3=-π+2π(1-g)
r4=-π+2πg
in the formula:
Figure BDA0003346664230000043
for the position of the ith locust of the d dimension when the algorithm is iterated to the t time,
Figure BDA0003346664230000044
the position of the jth locust in the d dimension when the algorithm is iterated to the t time, dij(t) is the distance between the ith and jth locusts in the population of locusts at the tth iteration,
Figure BDA0003346664230000045
is the current optimal individual position, r1Is [0,2 π]Random number between r2Is [0, pi ]]A random number in between;
Figure BDA0003346664230000046
representing the spatial location of the locust;
Figure BDA0003346664230000047
representing the spatial position of the locust after being updated by a gold sine operator formula; ubdExpressed as the upper bound of the d-dimensional space; lbdDenoted as the lower bound of the d-dimensional space.
Further, said RMSE, MAE and EmaxThe three evaluation index formulas are as follows:
Figure BDA0003346664230000048
Figure BDA0003346664230000049
Emax=max(|Pti-Pyi|)
in the formula: n is the number of samples, PtiIs the actual power at time t, PyiPredicted power for time t, PcapAnd the total capacity of the wind power plant is obtained.
The invention also provides an ultrashort-term wind power prediction system based on the improved GOA optimized LSTM, which comprises the following steps:
the data acquisition and preprocessing module is used for acquiring wind power data and preprocessing the wind power data to obtain a plurality of components; constructing a corresponding input matrix for each component, and determining a training matrix and a test matrix of each component;
the LSTM model building module is used for building an independent LSTM model for each component;
the parameter optimization module is used for performing parameter optimization on the number h of hidden layer neurons and the learning rate alpha of the LSTM model constructed by each component by using the improved GOA, and training to obtain the LSTM model with optimal parameters; the wind power prediction mathematical model based on the LSTM model with the optimal parameters can be expressed as follows:
yi=fLSTM(h,α)
hmin≤h≤hmax
αmin≤α≤αmax
in the formula: h ismaxIs the upper bound, alpha, of the number h of hidden layer neuronsmaxIs the upper bound of the learning rate alpha, hminIs the lower bound, α, of the number h of neurons in the hidden layerminIs the lower bound of the learning rate α;
the improved GOA is obtained by improving a decreasing coefficient c of the GOA by adopting a self-adaptive decreasing coefficient updating mechanism and introducing a gold sine operator into the updating of the individual positions of the locusts in the GOA;
the specific steps of parameter optimization comprise:
s3.1: initializing related algorithm parameters; setting the population number N of the locust, the spatial dimension d and the maximum iteration number TmaxThe upper bound ub of the space is set to hmax、αmax(ii) a The lower bound lb of the space is set to hmin、αmin(ii) a The current iteration time t is 1, and the space position of the current locust is generated
Figure BDA0003346664230000051
S3.2: obtaining a predicted value y through LSTM model trainingiObtaining the locust fitness value by utilizing the fitness function fitness, and saving the locust position with the minimum current fitness value as an optimal solution to a variable
Figure BDA0003346664230000052
The fitness function, fitness, is:
Figure BDA0003346664230000053
in the formula, tiIs the actual value of the training sample;
s3.3: judging whether the current iteration time T reaches the maximum iteration time Tmax(ii) a If yes, executing S3.5, otherwise executing S3.4;
s3.4: updating the decreasing coefficient c, and normalizing the distance between the locusts to be [1,4 ]]Introducing a gold sine operator to update the position of the locust, calculating a new locust fitness value when the current iteration time t is t +1, comparing the position of the locust with the minimum new locust fitness value with the current optimal solution, and updating the position of the locust if the position of the locust is superior to the current optimal solution
Figure BDA0003346664230000054
Otherwise, executing S3.3;
s3.5: output of
Figure BDA0003346664230000055
Extracting the number h of hidden layer neurons and the learning rate alpha from the LSTM model to obtain an LSTM model with optimal parameters;
and the prediction result aggregation module is used for inputting the test matrix of each component into the corresponding LSTM model which has the optimal parameters and is trained to obtain a prediction value, and aggregating the obtained prediction values of the components to obtain a final prediction result.
Has the advantages that: compared with the prior art, the invention has the following remarkable advantages: the system provided by the invention can be used for realizing the prediction of the ultra-short-term wind power with higher precision.
Further, the system further comprises a prediction performance evaluation module, which is used for selecting three evaluation indexes commonly used in wind power prediction: root mean square error RMSE, mean absolute error MAE and maximum absolute error EmaxAnd evaluating the prediction performance of the prediction result aggregation module.
The invention also provides a computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the above-mentioned method steps.
The invention also provides a debugging device, a memory, a processor and a program stored and executable on said memory, said program realizing the steps of the method as described above when executed by the processor.
Drawings
FIG. 1 is a flow chart of a method provided by the present invention;
FIG. 2 is a diagram of an LSTM memory cell.
Detailed Description
The ultra-short-term wind power prediction method based on the improved GOA optimized LSTM is further described below with reference to the accompanying drawings.
As shown in fig. 1: the invention provides an ultra-short-term wind power prediction method based on improved GOA optimized LSTM, which comprises the following specific steps:
(1) acquiring and preprocessing wind power plant data;
specifically, historical wind power data with 250h continuous in 5 months and 10min sampling time resolution is obtained from a wind power plant data acquisition and monitoring control system, and a training data sample and a test data sample are selected; decomposing the historical wind power data sequence by adopting a CEEMDAN or other decomposition algorithms to obtain s-1 intrinsic mode function components and 1 residual error component; analyzing the correlation relation among variables of each component by adopting a correlation coefficient method, screening out main subcomponents, constructing corresponding input matrixes, obtaining K components and constructing corresponding K input matrixes, wherein K is greater than 1, normalizing all the input matrixes and target variables into [0,1], and determining a training matrix and a test matrix of each component;
(2) constructing an independent LSTM model for each of the components;
as shown in fig. 2, the LSTM model has repeated module chain structures inside, i.e. a forgetting gate, an input gate, an update gate and an output gate, and the calculation process is as follows:
ft=σ(Wfxt+Wfht-1+bf)
it=σ(Wixt+Wiht-1+bi)
Figure BDA0003346664230000061
ot=σ(Woxt+Woht-1+bo),ht=ot tanh(Ct)
in the formula: f. oftThe output result of the forgetting gate at the time t is shown; i.e. itIndicating the processing result of the input gate at the time t;
Figure BDA0003346664230000071
representing the state of the input unit at time t; ctRepresenting the gating state at time t; otRepresenting the processing result of the output gate; h istAn output value representing time t; wfWeight, W, for connecting input values in forgetting gateiWeight, W, for connected input values in input gatecFor updating the weight, W, of the connected input value in the gateoWeights for the connected input values in the output gates; bfBias for forgetting door, biOffset of input gate, bcUpdating the offset of the gate and boFor the offset of the output gate, σ and tanh are sigmoid function and tanh function respectively; to realize regression prediction, a linear regression layer is added on the basis of the LSTM model as follows:
yt=Wyoht+by
in the formula: wyoIs the weight of the linear regression layer; byThreshold value of the linear regression layer, ytIs a prediction result.
(3) Improving a GOA algorithm to obtain an improved GOA;
in order to meet the actual requirements of the traditional locust algorithm in different periods: the descending coefficient c is required to be large and slowly descended at the early stage of the algorithm, and the algorithm has enough capacity and time to carry out global search to reach the approximate range of the global optimal solution; and the descending coefficient c is required to be smaller and to descend rapidly at the later stage of the algorithm, so that the algorithm can be rapidly converged to the local optimal solution. The phenomenon that the algorithm stops converging near the local optimal value at the later iteration stage is improved, so that the algorithm jumps out of the local optimal value at the later iteration stage to obtain a better convergence effect.
The adaptive decreasing coefficient updating mechanism is adopted to improve the decreasing coefficient c of the GOA, and the formula is as follows:
Figure BDA0003346664230000072
wherein T is the current iteration number of the algorithm, TmaxIs the maximum iteration number;
introducing a golden sine operator at the position of the locust individual position for improvement, wherein the formula is as follows:
Figure BDA0003346664230000073
Figure BDA0003346664230000074
Figure BDA0003346664230000075
r3=-π+2π(1-g)
r4=-π+2πg
in the formula:
Figure BDA0003346664230000081
for the position of the ith locust of the d dimension when the algorithm is iterated to the t time,
Figure BDA0003346664230000082
the position of the jth locust in the d dimension when the algorithm is iterated to the t time, dij(t) is the distance between the ith and jth locusts in the population of locusts at the tth iteration,
Figure BDA0003346664230000083
is the current optimal individual position, r1Is [0,2 π]Random number between r2Is [0, pi ]]A random number in between;
Figure BDA0003346664230000084
representing the spatial location of the locust;
Figure BDA0003346664230000085
representing the spatial position of the locust after being updated by a gold sine operator formula; ubdExpressed as the upper bound of the d-dimensional space; lbdDenoted as the lower bound of the d-dimensional space.
(4) Optimizing parameters of the LSTM model by using the improved GOA;
specifically, parameter optimization is carried out on the number h of hidden layer neurons and the learning rate alpha of the LSTM model constructed by each component by utilizing the Improved GOA (IGOA), and the LSTM model with the optimal parameters, namely an IGOA-LSTM model, is obtained through training; the optimal parameters h and alpha are output through IGOA optimization and are substituted back to the LSTM model, and the wind power prediction mathematical model based on the IGOA-LSTM model can be expressed as follows:
yi=fLSTM(h,α)
hmin≤h≤hmax
αmin≤α≤αmax
in the formula: y isiPredicting the LSTM model training; h ismaxIs the upper bound, alpha, of the number h of hidden layer neuronsmaxIs the upper bound of the learning rate alpha, hminIs the lower bound, α, of the number h of neurons in the hidden layerminIs the lower bound of the learning rate α;
the specific steps of parameter optimization comprise:
(4.1) initializing relevant algorithm parameters; setting the population number N of the locust, the spatial dimension d and the maximum iteration number TmaxThe upper bound ub of the space is set to hmax、αmax(ii) a The lower bound lb of the space is set to hmin、αmin(ii) a The current iteration time t is 1, and the space position of the current locust is generated
Figure BDA0003346664230000086
(4.2) calculating the optimal fitness of the individual; specifically, the predicted value y obtained through the training of the LSTM modeliObtaining the locust fitness value by utilizing the fitness function fitness, and taking the locust position with the minimum current fitness value as the optimal locust position to be stored in a variable
Figure BDA0003346664230000087
The fitness function fitness is as follows:
Figure BDA0003346664230000088
in the formula, tiIs the actual value of the training sample; y isiPredicting the LSTM model training;
(4.3) judging whether the current iteration time T reaches the maximum iteration time Tmax(ii) a If yes, executing (4.5), otherwise executing (4.4);
(4.4) updating the decreasing coefficient c by the adaptive decreasing coefficient updating mechanism, and normalizing the distance between the locusts to be [1,4 ]]Introducing a gold sine operator to update the position of the locust; the current iteration time t is t +1, the LSTM model training is returned to obtain a new predicted value, a new locust fitness value is calculated, a new optimal locust position is obtained to be compared with the current optimal locust position, and if the current optimal locust position is better than the current optimal locust position, the new optimal locust position is updated
Figure BDA0003346664230000091
Otherwise, executing (4.3);
(4.5) output
Figure BDA0003346664230000092
And extracting the number h of hidden layer neurons and the learning rate alpha required by the LSTM model to obtain the LSTM model with optimal parameters.
(5) Inputting the test matrix of each component into a corresponding LSTM model which has optimal parameters and is trained to obtain a predicted value, and aggregating the predicted values of the components to obtain a final result, namely obtaining the predicted result by adopting a CEEMDAN-IGOA-LSTM model method.
(6) Three evaluation indexes commonly used in wind power prediction are selected: the root mean square error RMSE, the mean absolute error MAE and the maximum absolute error Emax, the predicted performance of the method described in steps (1) - (5) was evaluated. Wherein RMSE, MAE and EmaxThe three evaluation index formulas are as follows:
Figure BDA0003346664230000093
Figure BDA0003346664230000094
Emax=max(|Pti-Pyi|)
in the formula: n is the number of samples, PtiIs the actual power at time i, PyiPredicted power for time i, PcapAnd the total capacity of the wind power plant is obtained.
After the obtained data are preprocessed by the method, 1050 samples of the first 175h are used for training, 450 samples of the last 75h are used for predicting, and the ELM, the GOA-ELM, the LSTM, the GOA-LSTM and the CEEMDAN-IGOA-LSTM are subjected to error evaluation analysis respectively, and the results are as follows:
TABLE 1
Figure BDA0003346664230000095
As can be seen from Table 1, by comparing the ELM model and the LSTM model, the LSTM model has excellent nonlinear fitting ability; by comparing the LSTM and the GOA-LSTM, the GOA algorithm can effectively optimize the parameter selection of the LSTM model; compared with the CEEMDAN-IGOA-LSTM and other four models, the improved GOA optimized LSTM prediction model provided by the invention has better nonlinear fitting capability, and the ultra-short-term wind power prediction precision is further effectively improved.
In addition, the invention also provides an ultra-short-term wind power prediction system based on the improved GOA optimized LSTM, which comprises the following steps:
the data acquisition and preprocessing module is used for acquiring wind power data and preprocessing the wind power data to obtain a plurality of components; constructing a corresponding input matrix for each component, and determining a training matrix and a test matrix of each component;
the LSTM model building module is used for building an independent LSTM model for each component;
the parameter optimization module is used for performing parameter optimization on the number h of hidden layer neurons and the learning rate alpha of the LSTM model constructed by each component by using the improved GOA, and training to obtain the LSTM model with optimal parameters; the wind power prediction mathematical model based on the LSTM model with the optimal parameters can be expressed as follows:
yi=fLSTM(h,α)
hmin≤h≤hmax
αmin≤α≤αmax
in the formula: h ismaxIs the upper bound, alpha, of the number h of hidden layer neuronsmaxIs the upper bound of the learning rate alpha, hminIs the lower bound, α, of the number h of neurons in the hidden layerminIs the lower bound of the learning rate α;
the improved GOA is obtained by improving a decreasing coefficient c of the GOA by adopting a self-adaptive decreasing coefficient updating mechanism and introducing a gold sine operator into the updating of the individual positions of the locusts in the GOA;
the specific steps of parameter optimization comprise:
s3.1: initializing related algorithm parameters; setting the population number N of the locust, the spatial dimension d and the maximum iteration number TmaxThe upper bound ub of the space is set to hmax、αmax(ii) a The lower bound lb of the space is set to hmin、αmin(ii) a The current iteration time t is 1, and the space position of the current locust is generated
Figure BDA0003346664230000101
S3.2: obtaining a predicted value y through LSTM model trainingiObtaining the locust fitness value by utilizing the fitness function fitness, and saving the locust position with the minimum current fitness value as an optimal solution to a variable
Figure BDA0003346664230000102
The fitness function, fitness, is:
Figure BDA0003346664230000103
in the formula, tiIs the actual value of the training sample; y isiPredicting the LSTM model training;
s3.3: judging whether the current iteration time T reaches the maximum iteration time Tmax(ii) a If yes, executing S3.5, otherwise executing S3.4;
s3.4: updating the decreasing coefficient c, and normalizing the distance between the locusts to be [1,4 ]]Introducing a gold sine operator to update the position of the locust, calculating a new locust fitness value when the current iteration time t is t +1, comparing the position of the locust with the minimum new locust fitness value with the current optimal solution, and updating the position of the locust if the position of the locust is superior to the current optimal solution
Figure BDA0003346664230000111
Otherwise, executing S3.3;
s3.5: output of
Figure BDA0003346664230000112
Extracting the number h of hidden layer neurons and the learning rate alpha from the LSTM model to obtain an LSTM model with optimal parameters;
and the prediction result aggregation module is used for inputting the test matrix of each component into the corresponding LSTM model which has the optimal parameters and is trained to obtain a prediction value, and aggregating the obtained prediction values of the components to obtain a final prediction result.
The prediction performance evaluation module is used for selecting three types of commonly used comments in wind power predictionThe price index is as follows: root mean square error RMSE, mean absolute error MAE and maximum absolute error EmaxAnd evaluating the prediction performance of the prediction result aggregation module.
The invention also provides a computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the above-mentioned method steps.
The invention also provides a debugging device, a memory, a processor and a program stored and executable on the memory, which when executed by the processor implements the steps of the above method.

Claims (10)

1. An ultra-short-term wind power prediction method based on improved GOA optimized LSTM is characterized by comprising the following steps:
s1: acquiring wind power data and preprocessing the wind power data to obtain a plurality of components; constructing a corresponding input matrix for each component, and determining a training matrix and a test matrix of each component;
s2: constructing an independent LSTM model for each component;
s3: carrying out parameter optimization on the number h of hidden layer neurons and the learning rate alpha of the LSTM model constructed by each component by using the improved GOA, and training to obtain the LSTM model with optimal parameters; the wind power prediction mathematical model based on the LSTM model with the optimal parameters is as follows:
yi=fLSTM(h,α)
hmin≤h≤hmax
αmin≤α≤αmax
in the formula: h ismaxIs the upper bound, alpha, of the number h of hidden layer neuronsmaxIs the upper bound of the learning rate alpha, hminIs the lower bound, α, of the number h of neurons in the hidden layerminIs the lower bound of the learning rate α;
the improved GOA is obtained by improving a decreasing coefficient c of the GOA by adopting a self-adaptive decreasing coefficient updating mechanism and introducing a gold sine operator into the updating of the individual positions of the locusts in the GOA;
the specific steps of parameter optimization comprise:
s3.1: initializing related algorithm parameters; setting the population number N of the locust, the spatial dimension d and the maximum iteration number TmaxThe upper bound ub of the space is set to hmax、αmax(ii) a The lower bound lb of the space is set to hmin、αmin(ii) a The current iteration time t is 1, and the space position of the current locust is generated
Figure FDA0003346664220000011
S3.2: obtaining a predicted value y through LSTM model trainingiObtaining the locust fitness value by utilizing the fitness function fitness, and saving the locust position with the minimum current fitness value as an optimal solution to a variable
Figure FDA0003346664220000012
The fitness function, fitness, is:
Figure FDA0003346664220000013
in the formula, tiIs the actual value of the training sample;
s3.3: judging whether the current iteration time T reaches the maximum iteration time Tmax(ii) a If yes, executing S3.5, otherwise executing S3.4;
s3.4: updating the decreasing coefficient c, and normalizing the distance between the locusts to be [1,4 ]]Introducing a gold sine operator to update the position of the locust, calculating a new locust fitness value when the current iteration time t is t +1, comparing the position of the locust with the minimum new locust fitness value with the current optimal solution, and updating the position of the locust if the position of the locust is superior to the current optimal solution
Figure FDA0003346664220000014
Otherwise, executing S3.3;
s3.5: output of
Figure FDA0003346664220000021
Extracting the number h of hidden layer neurons and the learning rate alpha from the LSTM model to obtain an LSTM model with optimal parameters;
s4: and inputting the test matrix of each component into a corresponding LSTM model which has optimal parameters and is trained to obtain a predicted value, and aggregating the obtained predicted values of the components to obtain a final prediction result.
2. The ultra-short-term wind power prediction method based on improved GOA optimized LSTM, as claimed in claim 1, further comprising S5: three evaluation indexes commonly used in wind power prediction are selected: root mean square error RMSE, mean absolute error MAE and maximum absolute error EmaxThe predicted performance of the method described in S1-S4 was evaluated.
3. The ultra-short-term wind power prediction method based on improved GOA optimized LSTM according to claim 1, wherein the preprocessing in S1 comprises:
s1.1: decomposing the historical wind power data sequence by adopting CEEMDAN to obtain s-1 intrinsic mode function components and 1 residual error component;
s1.2: and analyzing the correlation relation among the variables of each component by adopting a correlation coefficient method, screening out main subcomponents, constructing a corresponding input matrix, normalizing all the input matrices and the target variables into [0,1], and determining a training matrix and a test matrix of each component.
4. The ultra-short-term wind power prediction method based on improved GOA optimized LSTM, as claimed in claim 1, wherein each component in S2 builds an independent LSTM model with repeated module chain structure inside, and the calculation process is as follows:
ft=σ(Wfxt+Wfht-1+bf)
it=σ(Wixt+Wiht-1+bi)
Figure FDA0003346664220000022
ot=σ(Woxt+Woht-1+bo),ht=ottanh(Ct)
in the formula: f. oftThe output result of the forgetting gate at the time t is shown; i.e. itIndicating the processing result of the input gate at the time t;
Figure FDA0003346664220000023
representing the state of the input unit at time t; ctRepresenting the gating state at time t; otRepresenting the processing result of the output gate; h istAn output value representing time t; wfWeight, W, for connecting input values in forgetting gateiWeight, W, for connected input values in input gatecFor updating the weight, W, of the connected input value in the gateoWeights for the connected input values in the output gates; bfBias for forgetting door, biOffset of input gate, bcUpdating the offset of the gate and boFor the offset of the output gate, σ and tanh are sigmoid function and tanh function respectively; to realize regression prediction, a linear regression layer is added on the basis of the LSTM model as follows:
yt=Wyoht+by
in the formula: wyoIs the weight of the linear regression layer; byThreshold value of the linear regression layer, ytIs a prediction result.
5. The ultra-short-term wind power prediction method based on improved GOA optimized LSTM according to claim 1, wherein the formula of said adaptive decreasing coefficient updating mechanism in S3 is as follows:
Figure FDA0003346664220000031
wherein T is the current iteration number of the algorithm, TmaxIs the maximum iteration number;
the introduced golden sine operator is as follows:
Figure FDA0003346664220000032
Figure FDA0003346664220000033
Figure FDA0003346664220000034
r3=-π+2π(1-g)
r4=-π+2πg
in the formula:
Figure FDA0003346664220000035
for the position of the ith locust of the d dimension when the algorithm is iterated to the t time,
Figure FDA0003346664220000036
the position of the jth locust in the d dimension when the algorithm is iterated to the t time, dij(t) is the distance between the ith and jth locusts in the population of locusts at the tth iteration,
Figure FDA0003346664220000037
is the current optimal individual position, r1Is [0,2 π]Random number between r2Is [0, pi ]]A random number in between;
Figure FDA0003346664220000038
representing the spatial location of the locust;
Figure FDA0003346664220000039
representing the spatial position of the locust after being updated by a gold sine operator formula; ubdExpressed as the upper bound of the d-dimensional space; lbdDenoted as the lower bound of the d-dimensional space.
6. The ultra-short-term wind power prediction method based on improved GOA optimized LSTM as claimed in claim 2, wherein the RMSE, MAE and EmaxThe three evaluation index formulas are as follows:
Figure FDA00033466642200000310
Figure FDA0003346664220000041
Emax=max(|Pti-Pyi|)
in the formula: n is the number of samples, PtiIs the actual power at time t, PyiPredicted power for time t, PcapAnd the total capacity of the wind power plant is obtained.
7. An ultra-short-term wind power prediction system based on improved GOA optimized LSTM specifically comprises:
the data acquisition and preprocessing module is used for acquiring wind power data and preprocessing the wind power data to obtain a plurality of components; constructing a corresponding input matrix for each component, and determining a training matrix and a test matrix of each component;
the LSTM model building module is used for building an independent LSTM model for each component;
the parameter optimization module is used for performing parameter optimization on the number h of hidden layer neurons and the learning rate alpha of the LSTM model constructed by each component by using the improved GOA, and training to obtain the LSTM model with optimal parameters; the wind power prediction mathematical model based on the LSTM model with the optimal parameters can be expressed as follows:
yi=fLSTM(h,α)
hmin≤h≤hmax
αmin≤α≤αmax
in the formula: y isiIs the LSTM model output value; h ismaxIs the upper bound, alpha, of the number h of hidden layer neuronsmaxIs the upper bound of the learning rate alpha, hminIs the lower bound, α, of the number h of neurons in the hidden layerminIs the lower bound of the learning rate α;
the improved GOA is obtained by improving a decreasing coefficient c of the GOA by adopting a self-adaptive decreasing coefficient updating mechanism and introducing a gold sine operator into the updating of the individual positions of the locusts in the GOA;
the specific steps of parameter optimization comprise:
s3.1: initializing related algorithm parameters; setting the population number N of the locust, the spatial dimension d and the maximum iteration number TmaxThe upper bound ub of the space is set to hmax、αmax(ii) a The lower bound lb of the space is set to hmin、αmin(ii) a The current iteration time t is 1, and the space position of the current locust is generated
Figure FDA0003346664220000042
S3.2: obtaining a predicted value y through LSTM model trainingiObtaining the locust fitness value by utilizing the fitness function fitness, and saving the locust position with the minimum current fitness value as an optimal solution to a variable
Figure FDA0003346664220000043
The fitness function, fitness, is:
Figure FDA0003346664220000044
in the formula, tiIs the actual value of the training sample;
s3.3: judging whether the current iteration time T reaches the maximum iteration time Tmax(ii) a If so, executing S3.5, otherwise executingLine S3.4;
s3.4: updating the decreasing coefficient c, and normalizing the distance between the locusts to be [1,4 ]]Introducing a gold sine operator to update the position of the locust, calculating a new locust fitness value when the current iteration time t is t +1, comparing the position of the locust with the minimum new locust fitness value with the current optimal solution, and updating the position of the locust if the position of the locust is superior to the current optimal solution
Figure FDA0003346664220000051
Otherwise, executing S3.3;
s3.5: output of
Figure FDA0003346664220000052
Extracting the number h of hidden layer neurons and the learning rate alpha from the LSTM model to obtain an LSTM model with optimal parameters;
and the prediction result aggregation module is used for inputting the test matrix of each component into the corresponding LSTM model which has the optimal parameters and is trained to obtain a prediction value, and aggregating the obtained prediction values of the components to obtain a final prediction result.
8. The ultra-short-term wind power prediction system based on improved GOA optimized LSTM according to claim 7, further comprising a prediction performance evaluation module for selecting three evaluation indexes commonly used in wind power prediction: root mean square error RMSE, mean absolute error MAE and maximum absolute error EmaxAnd evaluating the prediction performance of the prediction result aggregation module.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
10. A debugging device characterized by a memory, a processor and a program stored and executable on said memory, said program realizing the steps of the method according to any one of claims 1 to 6 when executed by the processor.
CN202111325107.XA 2021-11-10 2021-11-10 Ultra-short-term wind power prediction method and system based on improved GOA (generic object oriented architecture) optimized LSTM (least Square TM) Withdrawn CN114330815A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111325107.XA CN114330815A (en) 2021-11-10 2021-11-10 Ultra-short-term wind power prediction method and system based on improved GOA (generic object oriented architecture) optimized LSTM (least Square TM)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111325107.XA CN114330815A (en) 2021-11-10 2021-11-10 Ultra-short-term wind power prediction method and system based on improved GOA (generic object oriented architecture) optimized LSTM (least Square TM)

Publications (1)

Publication Number Publication Date
CN114330815A true CN114330815A (en) 2022-04-12

Family

ID=81044646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111325107.XA Withdrawn CN114330815A (en) 2021-11-10 2021-11-10 Ultra-short-term wind power prediction method and system based on improved GOA (generic object oriented architecture) optimized LSTM (least Square TM)

Country Status (1)

Country Link
CN (1) CN114330815A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116526478A (en) * 2023-07-03 2023-08-01 南昌工程学院 Short-term wind power prediction method and system based on improved snake group optimization algorithm
CN117557361A (en) * 2023-11-10 2024-02-13 纬创软件(武汉)有限公司 User credit risk assessment method and system based on data analysis

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116526478A (en) * 2023-07-03 2023-08-01 南昌工程学院 Short-term wind power prediction method and system based on improved snake group optimization algorithm
CN116526478B (en) * 2023-07-03 2023-09-19 南昌工程学院 Short-term wind power prediction method and system based on improved snake group optimization algorithm
CN117557361A (en) * 2023-11-10 2024-02-13 纬创软件(武汉)有限公司 User credit risk assessment method and system based on data analysis
CN117557361B (en) * 2023-11-10 2024-04-26 纬创软件(武汉)有限公司 User credit risk assessment method and system based on data analysis

Similar Documents

Publication Publication Date Title
CN110751318B (en) Ultra-short-term power load prediction method based on IPSO-LSTM
CN111860982A (en) Wind power plant short-term wind power prediction method based on VMD-FCM-GRU
CN111639748A (en) Watershed pollutant flux prediction method based on LSTM-BP space-time combination model
Bernal et al. Financial market time series prediction with recurrent neural networks
CN114330815A (en) Ultra-short-term wind power prediction method and system based on improved GOA (generic object oriented architecture) optimized LSTM (least Square TM)
CN107480815A (en) A kind of power system taiwan area load forecasting method
CN111784061B (en) Training method, device and equipment for power grid engineering cost prediction model
CN113095550A (en) Air quality prediction method based on variational recursive network and self-attention mechanism
CN110443419A (en) Medium-term and long-term Runoff Forecast method based on ICEEMDAN and extreme learning machine
CN111030889A (en) Network traffic prediction method based on GRU model
CN111931983A (en) Precipitation prediction method and system
CN111985719A (en) Power load prediction method based on improved long-term and short-term memory network
CN115587666A (en) Load prediction method and system based on seasonal trend decomposition and hybrid neural network
CN114781692A (en) Short-term power load prediction method and device and electronic equipment
CN114912673A (en) Water level prediction method based on whale optimization algorithm and long-term and short-term memory network
CN116665483A (en) Novel method for predicting residual parking space
CN115456245A (en) Prediction method for dissolved oxygen in tidal river network area
CN112949894B (en) Output water BOD prediction method based on simplified long-short-term memory neural network
CN114154401A (en) Soil erosion modulus calculation method and system based on machine learning and observation data
CN111861002A (en) Building cold and hot load prediction method based on data-driven Gaussian learning technology
CN111369078A (en) Water supply quality prediction method based on long-term and short-term memory neural network
CN116663404A (en) Flood forecasting method and system coupling artificial intelligence and Bayesian theory
CN115577856A (en) Method and system for predicting construction cost and controlling balance of power transformation project
CN113962431A (en) Bus load prediction method for two-stage feature processing
CN110414146B (en) Water environment treatment project design parameter optimization method based on deep learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220412