CN116526478B - Short-term wind power prediction method and system based on improved snake group optimization algorithm - Google Patents
Short-term wind power prediction method and system based on improved snake group optimization algorithm Download PDFInfo
- Publication number
- CN116526478B CN116526478B CN202310800611.3A CN202310800611A CN116526478B CN 116526478 B CN116526478 B CN 116526478B CN 202310800611 A CN202310800611 A CN 202310800611A CN 116526478 B CN116526478 B CN 116526478B
- Authority
- CN
- China
- Prior art keywords
- weather
- wind power
- male
- female
- short
- 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.)
- Active
Links
- 241000270295 Serpentes Species 0.000 title claims abstract description 50
- 238000005457 optimization Methods 0.000 title claims abstract description 36
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000013145 classification model Methods 0.000 claims abstract description 25
- 238000011176 pooling Methods 0.000 claims description 33
- 235000013305 food Nutrition 0.000 claims description 24
- 238000003066 decision tree Methods 0.000 claims description 12
- 230000006870 function Effects 0.000 claims description 12
- 230000013011 mating Effects 0.000 claims description 12
- 238000012549 training Methods 0.000 claims description 11
- 230000000739 chaotic effect Effects 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 8
- 238000012360 testing method Methods 0.000 claims description 7
- 230000002159 abnormal effect Effects 0.000 claims description 6
- 230000002457 bidirectional effect Effects 0.000 claims description 6
- 230000002779 inactivation Effects 0.000 claims description 6
- 230000007246 mechanism Effects 0.000 claims description 6
- 238000007781 pre-processing Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 claims description 6
- 238000013507 mapping Methods 0.000 claims description 4
- 239000013598 vector Substances 0.000 claims description 4
- 230000004913 activation Effects 0.000 claims description 3
- 238000013459 approach Methods 0.000 claims description 3
- 230000006399 behavior Effects 0.000 claims description 3
- 238000004140 cleaning Methods 0.000 claims description 3
- 235000013601 eggs Nutrition 0.000 claims description 3
- 239000000284 extract Substances 0.000 claims description 3
- 239000000463 material Substances 0.000 claims description 3
- 239000011159 matrix material Substances 0.000 claims description 3
- 230000035772 mutation Effects 0.000 claims description 2
- 230000003044 adaptive effect Effects 0.000 description 5
- 238000005070 sampling Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000004146 energy storage Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J3/00—Circuit arrangements for ac mains or ac distribution networks
- H02J3/004—Generation forecast, e.g. methods or systems for forecasting future energy generation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06F18/2148—Generating training patterns; Bootstrap methods, e.g. bagging or boosting characterised by the process organisation or structure, e.g. boosting cascade
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/243—Classification techniques relating to the number of classes
- G06F18/24323—Tree-organised classifiers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
- G06N3/0442—Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/048—Activation functions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N7/00—Computing arrangements based on specific mathematical models
- G06N7/08—Computing arrangements based on specific mathematical models using chaos models or non-linear system models
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J3/00—Circuit arrangements for ac mains or ac distribution networks
- H02J3/38—Arrangements for parallely feeding a single network by two or more generators, converters or transformers
- H02J3/381—Dispersed generators
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J2203/00—Indexing scheme relating to details of circuit arrangements for AC mains or AC distribution networks
- H02J2203/20—Simulating, e g planning, reliability check, modelling or computer assisted design [CAD]
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J2300/00—Systems for supplying or distributing electric power characterised by decentralized, dispersed, or local generation
- H02J2300/20—The dispersed energy generation being of renewable origin
- H02J2300/28—The renewable source being wind energy
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
- Y04S10/00—Systems supporting electrical power generation, transmission or distribution
- Y04S10/50—Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Power Engineering (AREA)
- Nonlinear Science (AREA)
- Algebra (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a short-term wind power prediction method and a short-term wind power prediction system based on an improved snake group optimization algorithm. According to the invention, the improved snake group optimization algorithm is used for optimizing three parameters, namely the learning rate, the tree depth and the optimal tree number of the extreme gradient lifting tree, so that the accuracy of the extreme gradient lifting tree classification model can be improved, the accuracy of the self-adaptive prediction model is further improved, and the problem that the existing wind power prediction scheme has larger error in the turning weather period is solved.
Description
Technical Field
The invention relates to the field of power prediction, in particular to a short-term wind power prediction method and system based on an improved snake group optimization algorithm.
Background
Wind energy has the outstanding advantages of abundant total resources, environmental protection, high automation degree of operation management, continuous reduction of electricity-making cost and the like, and is one of the most widely developed and applied renewable energy sources at present, and because wind power has strong intermittence and volatility, when the wind power is connected with a grid in a large scale, the stable operation and the electric energy quality of a power grid are seriously influenced; in the period of the turning weather, sudden changes of wind speed, temperature and the like can even cause damage to unit equipment, and large-scale off-grid power failure accidents occur; therefore, accurate wind power prediction is helpful for assisting steady-state operation of the power system, reasonably distributing energy storage and reducing operation cost. The current wind power prediction scheme is mature, but larger errors still exist in the turning weather period; aiming at the problem, the invention provides a short-term wind power prediction method and a short-term wind power prediction system based on an improved snake group optimization algorithm.
Disclosure of Invention
The invention aims to provide a short-term wind power prediction method and a short-term wind power prediction system based on an improved snake group optimization algorithm, which are used for solving the problem that an existing wind power prediction scheme has larger error in a turning weather period.
The technical scheme of the invention is as follows: a short-term wind power prediction method based on an improved snake group optimization algorithm comprises the following steps of
Step S1: collecting weather data of a wind power plant, and cleaning and interpolating abnormal data of the wind power plant by using a quartile method;
step S2: establishing an extreme gradient lifting tree (XGBoost) classification model and optimizing parameters of the extreme gradient lifting tree classification model by using an improved snake group optimization algorithm;
step S3: training and testing the classification model of the extreme gradient lifting tree by using the data and the numerical weather forecast obtained in the step S1, and dividing weather types;
step S4: constructing multidimensional feature matrixes under different weather according to the classification result;
step S5: constructing a self-adaptive prediction model;
step S6: and the wind power prediction under the turning weather is realized through the self-adaptive prediction model.
Further, the extreme gradient lifting tree sums the decision trees to obtain a final classification prediction result, and a calculation formula is as follows:
;
;
wherein ,for the s-th sample feature set, +.>Is the classification category corresponding to the s-th sample feature set, m is the feature number in the sample feature set,/->For the mth feature in the s-th sample feature set, K is the number of decision trees, ++>A weight representing the classification of the s-th sample feature set to the leaf node in the k-th decision tree;
objective function of decision treeThe calculation formula is as follows:
;
;
wherein ,for loss function->To classify the weights to the leaf nodes in the kth decision tree,for regularized item->For the true class of the s-th sample feature set, n is the number of sample feature sets, +.> and />For regularization coefficient, T is leaf node number, +.>The j-th leaf node is weighted.
Further, the improved snake colony optimization algorithm is simultaneously subjected to temperatureTempAnd food amountQThe impact of (2) is divided into three modes of behavior: searching for food mode, combat mode, mating mode, the steps are as follows:
step S21: generating an initialization populationWherein male and female individuals are treated with 1:1, an initialization formula is:
;
;
;
wherein ,to be the upper bound of the problem to be solved +.>The lower bound of the problem to be solved,tfor the current iteration number>For the maximum number of iterations to be performed,c 1 is a constant value, and is used for the treatment of the skin,ris a random number between (0, 1);
step S22: when the food is measuredQ<At 0.25, the snake group selects random position to search food and update position, and the position update formula of male and female is:
;
;
wherein ,is male or femaleiIndividual location, ->Is the random individual location in either the male or female,c 2 is constant (I)>Fitness for random individuals in either males or females, < >>Is the firstiFitness of individual individuals; />The ability to search for food for male or female individuals;
step S23: when the food is measuredQ>0.25 and temperatureTemp>0.6, the snake group starts to approach the food, and the position update formula of the group is as follows:
;
wherein ,for the location of the optimal individual in the entire population,c 3 is a constant;
step S24: when the food is measuredQ>0.25 and temperatureTemp<0.6, a random value is generated, if the random value is greater than the threshold value of 0.6, the snake group enters a combat mode, and the male and female position update formulas are as follows:
;
;
wherein ,combat competence for males/females, < +.>For optimal fitness of individuals, +.>Is the optimal male or female individual location;
if the random value is less than the threshold value of 0.6, the snake group enters a mating mode, and the male and female position updating formulas are as follows:
;
;
wherein ,M m/f mating ability to be male or female;
after mating, selecting whether to hatch eggs, and if so, replacing the worst male or female individuals, wherein the replacement formula is as follows:
;
wherein ,fitness for the worst individual;
the improved snake group optimization algorithm provides a bidirectional self-adaptive cauchy variation strategy, disturbance is added at the optimal solution and the worst solution of each iteration, and the bidirectional self-adaptive cauchy variation operation update formula is as follows:
;
;
wherein ,is a variation ofThe individual position of the last optimal or worst male or female,/->The individual position of the non-mutated, optimal or worst male or female,/for example>For adjusting the factor->Generating a function for a standard cauchy random variable, < >>Is the fitness of individuals in the mutated optimal or worst male or female, and is->Fitness for the non-variant optimal or worst male or female individuals;
the attraction factor of the t-th iteration of male or female is improved by the attraction strategy to improve the purposefulness and convergence rate of the early search of the algorithmThe calculation formula is as follows:
;
formula (8) is rewritten as:
;
the improved snake group optimization algorithm is initialized by adopting the distributed Berosulli chaotic map, and the Berosulli chaotic map formula is as follows:
;
;
wherein ,is the firstdChaos sequence generated by multiple iterations, < >>The value is 0.6%>New male or female individuals generated for chaotic mappingiIs a position of (c).
Further, the method for classifying weather types by the extreme gradient lifting tree classification model comprises the following steps:
step S31: manually marking the weather type of the collected wind farm weather data and the data processed by the quartile method;
step S32: initializing an extreme gradient lifting tree, optimizing three parameters, namely a learning rate, a tree depth and the number of optimal trees, of the extreme gradient lifting tree by taking an error rate of sample classification as an objective function through an improved snake group optimization algorithm, and optimizing to obtain optimal parameters;
step S33: training a extreme gradient lifting tree classification model by using the data of the numerical weather forecast and the weather type marked in the step S31 as inputs;
step S34: inputting a test set to verify classification accuracy of the extreme gradient lifting tree classification model;
step S35: and carrying out weather type division by taking the time period required to be divided into weather types into a trained model.
Further, the adaptive prediction model consists of a convolution layer (CNN), u spatial pyramid pooling layers (SPP), a flattening layer, a long short memory network (LSTM), a random inactivation layer, an attention mechanism and a full connection layer; the input multidimensional feature matrix extracts feature graphs with different dimensions through a convolution layer, u spatial pyramid pooling layers divide the different dimensions of the feature graphs into v parts according to the dimension v of a required pooling result, each part is subjected to maximum pooling to obtain the pooling result of each spatial pyramid pooling layer, then the results of the u spatial pyramid pooling layers are spliced and sent to a flattening layer to unify multidimensional features, the flattened feature graphs are input into a long and short memory network and then are prevented from being subjected to model self-adaptive prediction and fitting through a random inactivation layer, the output of the long and short memory network is re-weighted through an attention module before a full connection layer, and finally wind power prediction under turning weather is output through the full connection layer.
Further, the spatial pyramid pooling layer processes the input feature dimension by fixing the pooling output dimension, equally dividing the input feature into v parts according to the fixed pooling output dimension v, and performing maximum pooling in each region.
Further, when the long and short memory network processes the input sequence, the hidden layers of the long and short memory network are given the same weight, in the long sequence, important features in the short-period turning weather are easy to discard, and the attention mechanism calculates the attention weight by comparing the correlation between the vector of the previous hidden layer and the output, so that the acquisition of effective information is improved, and the key part in the time sequence is dynamically extracted;phidden layer output of time long and short memory networkTraining through full connection layer activation function tanh as input of attention mechanismpWeight coefficient of time->:
;
For a pair ofpWeight coefficient of time of dayAndphidden layer output of time long and short memory network>Weighted summation to obtainpOutput of time->:
;
wherein ,was the weight of the material to be weighed,is a bias term;Nis the time series length.
The invention provides a short-term wind power prediction system based on an improved snake swarm algorithm, which comprises a data acquisition module, a data preprocessing module, a weather classification module and a power prediction module; the data acquisition module is used for acquiring weather data of the sub-electric field; the data preprocessing module cleans and interpolates abnormal data of the wind power plant; the weather classification module is internally provided with an extreme gradient lifting tree classification model to divide weather types; the power prediction module is internally provided with a self-adaptive prediction model for predicting the power of the wind power plant according to the weather types divided by the weather classification module.
The invention also provides a nonvolatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the short-term wind power prediction method based on the improved snake swarm algorithm.
The invention has the beneficial effects that: according to the invention, the improved snake group optimization algorithm is used for optimizing three parameters, namely the learning rate, the tree depth and the number of the optimal trees, of the extremely gradient lifting tree, so that the accuracy of the turning weather classification model can be improved, the accuracy of the self-adaptive prediction model is further improved, and the problem that the existing wind power prediction scheme has larger error in the turning weather period is solved; the improved snake group optimization algorithm is used for solving the problem that the existing snake group optimization algorithm falls into a local optimal solution, and improving the population evolution effect and the convergence rate; the invention adopts the bernoulli chaotic mapping to replace pseudo random number initialization to enlarge the search area, increase the diversity of population and improve the global search performance.
Drawings
FIG. 1 is a flow chart of wind power prediction according to the present invention.
Fig. 2 is a block diagram of an adaptive predictive model according to the present invention.
Detailed Description
The invention is explained below with reference to the drawings.
Referring to fig. 1, the short-term wind power prediction method based on the improved snake group optimization algorithm comprises the following steps:
step S1: collecting weather data of a wind power plant, and cleaning and interpolating abnormal data of the wind power plant by using a quartile method;
step S2: establishing an extreme gradient lifting tree classification model and optimizing parameters of the extreme gradient lifting tree classification model by using an improved snake group optimization algorithm;
step S3: training and testing the classification model of the extreme gradient lifting tree by using the data and the numerical weather forecast obtained in the step S1, and dividing weather types;
step S4: constructing multidimensional feature matrixes under different weather according to the classification result;
step S5: constructing a self-adaptive prediction model;
step S6: and the wind power prediction under the turning weather is realized through the self-adaptive prediction model.
Further, the extreme gradient lifting tree sums the decision trees to obtain a final classification prediction result, and a calculation formula is as follows:
;
;
wherein ,for the s-th sample feature set, +.>Is the classification category corresponding to the s-th sample feature set, and m isNumber of features in sample feature set, +.>For the mth feature in the s-th sample feature set, K is the number of decision trees, ++>A weight representing the classification of the s-th sample feature set to the leaf node in the k-th decision tree;
objective function of decision treeThe calculation formula is as follows:
;
;
wherein ,for loss function->To classify the weights to the leaf nodes in the kth decision tree,for regularized item->For the true class of the s-th sample feature set, n is the number of sample feature sets, +.> and />For regularization coefficient, T is leaf node number, +.>The j-th leaf node is weighted.
Further, the improved snake colony optimization algorithm is simultaneously subjected to temperatureTempAnd food amountQThe impact of (2) is divided into three modes of behavior: searching for food mode, combat mode, mating mode, the steps are as follows:
step S21: generating an initialization populationWherein male and female individuals are treated with 1:1, an initialization formula is:
;
;
;
wherein ,to be the upper bound of the problem to be solved +.>The lower bound of the problem to be solved,tfor the current number of iterations,for the maximum number of iterations to be performed,c 1 is a constant value, and is used for the treatment of the skin,ris a random number between (0, 1);
step S22: when the food is measuredQ<At 0.25, the snake group selects random position to search food and update position, and the position update formula of male and female is:
;
;
wherein ,is male or femaleiIndividual location, ->Is the random individual location in either the male or female,c 2 is constant (I)>Fitness for random individuals in either males or females, < >>Is the firstiFitness of individual individuals;the ability to search for food for male or female individuals;
step S23: when the food is measuredQ>0.25 and temperatureTemp>0.6, the snake group starts to approach the food, and the position update formula of the group is as follows:
;
wherein ,for the location of the optimal individual in the entire population,c 3 is a constant;
step S24: when the food is measuredQ>0.25 and temperatureTemp<0.6, a random value is generated, if the random value is greater than the threshold value of 0.6, the snake group enters a combat mode, and the male and female position update formulas are as follows:
;
;
wherein ,combat competence for males/females, < +.>For optimal fitness of individuals, +.>Is the optimal male or female individual location;
if the random value is less than the threshold value of 0.6, the snake group enters a mating mode, and the male and female position updating formulas are as follows:
;
;
wherein ,M m/f mating ability to be male or female;
after mating, selecting whether to hatch eggs, and if so, replacing the worst male or female individuals, wherein the replacement formula is as follows:
;
wherein ,fitness for the worst individual;
the improved snake group optimization algorithm provides a bidirectional self-adaptive cauchy variation strategy, disturbance is added at the optimal solution and the worst solution of each iteration, and the bidirectional self-adaptive cauchy variation operation update formula is as follows:
;
;
wherein ,is the optimal or worst individual position of the male or female after mutation, < + >>The individual position of the non-mutated, optimal or worst male or female,/for example>For adjusting the factor->Generating a function for a standard cauchy random variable, < >>Is the fitness of individuals in the mutated optimal or worst male or female, and is->Fitness for the non-variant optimal or worst male or female individuals;
the attraction factor of the t-th iteration of male or female is improved by the attraction strategy to improve the purposefulness and convergence rate of the early search of the algorithmThe calculation formula is as follows:
;
formula (8) is rewritten as:
;
the improved snake group optimization algorithm is initialized by adopting the distributed Berosulli chaotic map, and the Berosulli chaotic map formula is as follows:
;
;
wherein ,is the firstdChaos sequence generated by multiple iterations, < >>The value is 0.6%>New male or female individuals generated for chaotic mappingiIs a position of (c).
The method for classifying weather types by using the extreme gradient lifting tree classification model comprises the following steps:
step S31: manually marking the weather type of the collected wind farm weather data and the data processed by the quartile method;
step S32: initializing an extreme gradient lifting tree, optimizing three parameters, namely a learning rate, a tree depth and the number of optimal trees, of the extreme gradient lifting tree by taking an error rate of sample classification as an objective function through an improved snake group optimization algorithm, and optimizing to obtain optimal parameters;
step S33: training a extreme gradient lifting tree classification model by using the data of the numerical weather forecast and the weather type marked in the step S31 as inputs;
step S34: inputting a test set to verify classification accuracy of the extreme gradient lifting tree classification model;
step S35: and carrying out weather type division by taking the time period required to be divided into weather types into a trained model.
Referring to fig. 2, the adaptive prediction model consists of a convolution layer, u spatial pyramid pooling layers, a flattening layer, a long and short memory network, a random inactivation layer, an attention mechanism and a full connection layer; the input multidimensional feature matrix extracts feature graphs with different dimensions through a convolution layer, u spatial pyramid pooling layers divide the different dimensions of the feature graphs into v parts according to the dimension v of a required pooling result, each part is subjected to maximum pooling to obtain the pooling result of each spatial pyramid pooling layer, then the results of the u spatial pyramid pooling layers are spliced and sent to a flattening layer to unify multidimensional features, the flattened feature graphs are input into a long and short memory network and then are prevented from being subjected to model self-adaptive prediction and fitting through a random inactivation layer, the output of the long and short memory network is re-weighted through an attention module before a full connection layer, and finally wind power prediction under turning weather is output through the full connection layer.
The spatial pyramid pooling layer processes the input feature dimension by fixing the pooling output dimension, equally divides the input feature into v parts according to the fixed pooling output dimension v, and performs maximum pooling in each region.
When the long and short memory network processes the input sequence, the hidden layers of the long and short memory network are given the same weight, in the long sequence, important features in the turning weather of a short period of time are easily discarded, and the attention mechanism calculates the attention weight by comparing the correlation between the vector of the previous hidden layer and the output, so that the acquisition of effective information is improved, and the key part in the time sequence is dynamically extracted;phidden layer output of time long and short memory networkTraining through full connection layer activation function tanh as input of attention mechanismpWeight coefficient of time->:
;
For a pair ofpWeight coefficient of time of dayAndptime of dayHidden layer output of short memory network>Weighted summation to obtainpOutput of time->:
;
wherein ,was the weight of the material to be weighed,is a bias term;Nis the time series length.
The short-term wind power prediction system based on the improved snake group optimization algorithm in the embodiment comprises a data acquisition module, a data preprocessing module, a weather classification module and a power prediction module; the data acquisition module is used for acquiring weather data of the wind power plant; the data preprocessing module cleans and interpolates abnormal data of the wind power plant; the weather classification module is internally provided with an extreme gradient lifting tree classification model to divide weather types; the power prediction module is internally provided with a self-adaptive prediction model for predicting the power of the wind power plant according to the weather types divided by the weather classification module.
In another embodiment, a non-volatile computer storage medium stores computer executable instructions that perform the short-term wind power prediction method based on the improved snake swarm optimization algorithm described above.
The invention also provides an embodiment for verifying the proposed prediction method, wherein the data are numerical weather prediction and output data of a certain wind farm in 2020 year, and the time resolution is 15min, and the method is characterized by wind speed and wind direction at 10m, 30m, 50m and 70m, temperature, humidity, air pressure and power. The turning weather with great influence on the running of the wind turbine generator is mainly divided into weather with large fluctuation of wind speed, low-temperature icing weather and high-temperature weather. The weather is uniformly marked as other types of weather except the low-temperature icing weather and the high-temperature weather, and after classification is completed, the weather with large fluctuation of wind speed is divided among the weather of other types, so that the interference of the weather with large fluctuation of wind speed on the classification of the weather of other types is avoided. The three weather types marked by the artificial mark in the sample are marked as No. 1-3 weather types in sequence according to 7: and 3, distributing the model into a training set and a testing set, and training the classification model of the extreme gradient lifting tree by taking the classification error rate as an objective function.
Classifying weather in two time periods by using an extreme gradient lifting tree weather classification model, wherein the time period 1 comprises 480 sampling points, the time period 2 comprises 960 sampling points, and the sampling frequency is 15min; the accuracy of the period 1 is 96.4583%, the accuracy of the period 2 is 98.1250%, the accuracy of the model on the weather classification of the types 2 and 3 is higher, and the accuracy of the model on the weather classification of the type 1 is lower.
In another embodiment, the adaptive prediction model (S-C-L-A) proposed by the invention is compared with the CNN-LSTM (C-L) model and the SPP-CNN-LSTM (S-C-L) model, and the mean absolute error MAE and the root mean square error RMSE are adopted as evaluation indexes, as shown in the table:
in the low-temperature icing weather, the average absolute error MAE of the C-L model is 3.0708, the average absolute error MAE of the S-C-L model is 2.4969, and the absolute error MAE of the self-adaptive prediction model is 1.7661; in high temperature weather, the average absolute error MAE of the C-L model is 3.9824, the average absolute error MAE of the S-C-L model is 2.3061, and the absolute error MAE of the adaptive prediction model is 1.0788; under the weather of large fluctuation of wind speed, the average absolute error MAE of the C-L model is 2.2551, the average absolute error MAE of the S-C-L model is 1.8890, and the absolute error MAE of the self-adaptive prediction model is 0.9365; in the low-temperature icing weather, the Root Mean Square Error (RMSE) of the C-L model is 20.4731, the Root Mean Square Error (RMSE) of the S-C-L model is 13.2473, and the Root Mean Square Error (RMSE) of the self-adaptive prediction model is 7.0962; in high temperature weather, the Root Mean Square Error (RMSE) of the C-L model is 20.6353, the Root Mean Square Error (RMSE) of the S-C-L model is 7.4355, and the Root Mean Square Error (RMSE) of the self-adaptive prediction model is 1.8111; under the weather of large fluctuation of wind speed, the Root Mean Square Error (RMSE) of the C-L model is 8.1925, the Root Mean Square Error (RMSE) of the S-C-L model is 6.8156, and the Root Mean Square Error (RMSE) of the self-adaptive prediction model is 2.0776; under different turning weather conditions, the average absolute error MAE and the root mean square error RMSE of the self-adaptive prediction model provided by the invention are smaller.
The above disclosure is only a preferred embodiment of the present invention, and it should be understood that the scope of the invention is not limited thereto, and those skilled in the art will appreciate that all or part of the procedures described above can be performed according to the equivalent changes of the claims, and still fall within the scope of the present invention.
Claims (7)
1. The short-term wind power prediction method based on the improved snake group optimization algorithm is characterized by comprising the following steps:
step S1: collecting weather data of a wind power plant, and cleaning and interpolating abnormal data of the wind power plant by using a quartile method;
step S2: establishing an extreme gradient lifting tree classification model and optimizing parameters of the extreme gradient lifting tree classification model by using an improved snake group optimization algorithm; improved optimization algorithm for snake group simultaneously receives temperatureTempAnd food amountQThe impact of (2) is divided into three modes of behavior: searching for food mode, combat mode, mating mode, the steps are as follows:
step S21: generating an initialization populationWherein male and female individuals are treated with 1:1, an initialization formula is:
(5);
(6);
(7);
wherein ,to be the upper bound of the problem to be solved +.>The lower bound of the problem to be solved,tfor the current iteration number>For the maximum number of iterations to be performed,c 1 is a constant value, and is used for the treatment of the skin,ris a random number between (0, 1);
step S22: when the food is measuredQ<At 0.25, the snake group selects random position to search food and update position, and the position update formula of male and female is:
(8);
(9);
wherein ,is male or femaleiIndividual location, ->Is the random individual location in either the male or female,c 2 is constant (I)>Fitness for random individuals in either males or females, < >>Is the firstiFitness of individual individuals; />The ability to search for food for male or female individuals;
step S23: when the food is measuredQ>0.25 and temperatureTemp>0.6, the snake group starts to approach the food, and the position update formula of the group is as follows:
(10);
wherein ,for the location of the optimal individual in the entire population,c 3 is a constant;
step S24: when the food is measuredQ>0.25 and temperatureTemp<0.6, a random value is generated, if the random value is greater than the threshold value of 0.6, the snake group enters a combat mode, and the male and female position update formulas are as follows:
(11);
(12);
wherein ,combat competence for males/females, < +.>For optimal fitness of individuals, +.>Is the optimal male or female individual location;
if the random value is less than the threshold value of 0.6, the snake group enters a mating mode, and the male and female position updating formulas are as follows:
(13);
(14);
wherein ,M m/f mating ability to be male or female;
after mating, selecting whether to hatch eggs, and if so, replacing the worst male or female individuals, wherein the replacement formula is as follows:
(15);
wherein ,fitness for the worst individual;
the improved snake group optimization algorithm provides a bidirectional self-adaptive cauchy variation strategy, disturbance is added at the optimal solution and the worst solution of each iteration, and the bidirectional self-adaptive cauchy variation operation update formula is as follows:
(16);
(17);
wherein ,is the optimal or worst individual position of the male or female after mutation, < + >>Individual position being the non-variant optimal or worst male or femalePut (I) at>For adjusting the factor->Generating a function for a standard cauchy random variable, < >>Is the fitness of individuals in the mutated optimal or worst male or female, and is->Fitness for the non-variant optimal or worst male or female individuals;
the attraction factor of the t-th iteration of male or female is improved by the attraction strategy to improve the purposefulness and convergence rate of the early search of the algorithmThe calculation formula is as follows:
(18);
formula (8) is rewritten as:
(19);
the improved snake group optimization algorithm is initialized by adopting the distributed Berosulli chaotic map, and the Berosulli chaotic map formula is as follows:
(20);
(21);
wherein ,is the firstdChaos sequence generated by multiple iterations, < >>The value is 0.6%>New male or female individuals generated for chaotic mappingiIs a position of (2);
step S3: training and testing the classification model of the extreme gradient lifting tree by using the data and the numerical weather forecast obtained in the step S1, and dividing weather types;
step S4: constructing multidimensional feature matrixes under different weather according to the classification result;
step S5: constructing a self-adaptive prediction model;
step S6: wind power prediction under the turning weather is realized through the self-adaptive prediction model;
the self-adaptive prediction model consists of a convolution layer, u space pyramid pooling layers, a flattening layer, a long and short memory network, a random inactivation layer, an attention mechanism and a full connection layer; the input multidimensional feature matrix extracts feature graphs with different dimensions through a convolution layer, u spatial pyramid pooling layers divide the different dimensions of the feature graphs into v parts according to the dimension v of a required pooling result, each part is subjected to maximum pooling to obtain the pooling result of each spatial pyramid pooling layer, then the results of the u spatial pyramid pooling layers are spliced and sent to a flattening layer to unify multidimensional features, the flattened feature graphs are input into a long and short memory network and then are prevented from being fitted by a self-adaptive prediction model through a random inactivation layer, the output of the long and short memory network is re-weighted through an attention module in front of a full connection layer, and finally wind power prediction under turning weather is output through the full connection layer.
2. The short-term wind power prediction method based on the improved snake group optimization algorithm as claimed in claim 1, wherein the final classification prediction result is obtained by summing a plurality of decision trees by the polar gradient lifting tree, and the calculation formula is as follows:
(1);
(2);
wherein ,for loss function->To classify the weights to the leaf nodes in the kth decision tree,for regularized item->For the true class of the s-th sample feature set, n is the number of sample feature sets, +.> and />For regularization coefficient, T is leaf node number, +.>The j-th leaf node is weighted.
3. The short-term wind power prediction method based on an improved snake swarm optimization algorithm according to claim 1, wherein the method for classifying weather types by using the extreme gradient lifting tree classification model comprises the following steps:
step S31: manually marking the weather type of the collected wind farm weather data and the data processed by the quartile method;
step S32: initializing an extreme gradient lifting tree, optimizing three parameters, namely a learning rate, a tree depth and the number of optimal trees, of the extreme gradient lifting tree by taking an error rate of sample classification as an objective function through an improved snake group optimization algorithm, and optimizing to obtain optimal parameters;
step S33: training a extreme gradient lifting tree classification model by using the data of the numerical weather forecast and the weather type marked in the step S31 as inputs;
step S34: inputting a test set to verify classification accuracy of the extreme gradient lifting tree classification model;
step S35: and carrying out weather type division by taking the time period required to be divided into weather types into a trained model.
4. The short-term wind power prediction method based on an improved snake group optimization algorithm according to claim 1, wherein the spatial pyramid pooling layer processes the input feature dimension by fixing the pooling output dimension, and the input feature is equally divided into v parts according to the fixed pooling output dimension v, and the maximum pooling is performed in each region.
5. The short-term wind power prediction method based on an improved snake group optimization algorithm according to claim 1, wherein when the long and short memory network processes an input sequence, hidden layers of the long and short memory network are given the same weight, in the long sequence, important features in turning weather of a short period are easily discarded, and an attention mechanism calculates attention weights of the previous hidden layer vectors by comparing the correlation between the previous hidden layer vectors and the output, so that effective information is obtained, and key parts in a time sequence are dynamically extracted;phidden layer output of time long and short memory networkTraining through full connection layer activation function tanh as input of attention mechanismpWeight coefficient of time->:
(22);
For a pair ofpWeight coefficient of time of dayAndphidden layer output of time long and short memory network>Weighted summation to obtainpOutput of time->:
(23);
wherein ,was the weight of the material to be weighed,as a result of the bias term,Nis the time series length.
6. A system for implementing the short-term wind power prediction method based on the improved snake group optimization algorithm of any of claims 1-5, comprising a data acquisition module, a data preprocessing module, a weather classification module, and a power prediction module; the data acquisition module is used for acquiring weather data of the wind power plant; the data preprocessing module cleans and interpolates abnormal data of the wind power plant; the weather classification module is internally provided with an extreme gradient lifting tree classification model to divide weather types; the power prediction module is internally provided with a self-adaptive prediction model for predicting the power of the wind power plant according to the weather types divided by the weather classification module.
7. A non-transitory computer storage medium having stored thereon computer executable instructions for performing the short-term wind power prediction method based on the improved snake group optimization algorithm of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310800611.3A CN116526478B (en) | 2023-07-03 | 2023-07-03 | Short-term wind power prediction method and system based on improved snake group optimization algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310800611.3A CN116526478B (en) | 2023-07-03 | 2023-07-03 | Short-term wind power prediction method and system based on improved snake group optimization algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116526478A CN116526478A (en) | 2023-08-01 |
CN116526478B true CN116526478B (en) | 2023-09-19 |
Family
ID=87408609
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310800611.3A Active CN116526478B (en) | 2023-07-03 | 2023-07-03 | Short-term wind power prediction method and system based on improved snake group optimization algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116526478B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117436011A (en) * | 2023-12-15 | 2024-01-23 | 四川泓宝润业工程技术有限公司 | Machine pump equipment fault prediction method, storage medium and electronic equipment |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11070056B1 (en) * | 2020-03-13 | 2021-07-20 | Dalian University Of Technology | Short-term interval prediction method for photovoltaic power output |
CN113326969A (en) * | 2021-04-29 | 2021-08-31 | 淮阴工学院 | Short-term wind speed prediction method and system based on improved whale algorithm for optimizing ELM |
CN113468817A (en) * | 2021-07-13 | 2021-10-01 | 淮阴工学院 | Ultra-short-term wind power prediction method based on IGOA (optimized El-electric field model) |
CN114330815A (en) * | 2021-11-10 | 2022-04-12 | 淮阴工学院 | Ultra-short-term wind power prediction method and system based on improved GOA (generic object oriented architecture) optimized LSTM (least Square TM) |
CN114386718A (en) * | 2022-03-16 | 2022-04-22 | 广州兆和电力技术有限公司 | Wind power plant output power short-time prediction algorithm combined with particle swarm neural network |
CN115545279A (en) * | 2022-09-19 | 2022-12-30 | 国网河南省电力公司电力科学研究院 | Wind power plant wind power prediction method |
CN115640868A (en) * | 2022-08-19 | 2023-01-24 | 广东工业大学 | Short-term prediction method for minority data wind power of newly-built wind power plant |
CN115995810A (en) * | 2022-12-12 | 2023-04-21 | 国网山东省电力公司德州供电公司 | Wind power prediction method and system considering weather fluctuation self-adaptive matching |
CN116307139A (en) * | 2023-03-02 | 2023-06-23 | 河海大学 | Wind power ultra-short-term prediction method for optimizing and improving extreme learning machine |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210341646A1 (en) * | 2020-12-23 | 2021-11-04 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Weather parameter prediction model training method, weather parameter prediction method, electronic device and storage medium |
-
2023
- 2023-07-03 CN CN202310800611.3A patent/CN116526478B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11070056B1 (en) * | 2020-03-13 | 2021-07-20 | Dalian University Of Technology | Short-term interval prediction method for photovoltaic power output |
CN113326969A (en) * | 2021-04-29 | 2021-08-31 | 淮阴工学院 | Short-term wind speed prediction method and system based on improved whale algorithm for optimizing ELM |
CN113468817A (en) * | 2021-07-13 | 2021-10-01 | 淮阴工学院 | Ultra-short-term wind power prediction method based on IGOA (optimized El-electric field model) |
CN114330815A (en) * | 2021-11-10 | 2022-04-12 | 淮阴工学院 | Ultra-short-term wind power prediction method and system based on improved GOA (generic object oriented architecture) optimized LSTM (least Square TM) |
CN114386718A (en) * | 2022-03-16 | 2022-04-22 | 广州兆和电力技术有限公司 | Wind power plant output power short-time prediction algorithm combined with particle swarm neural network |
CN115640868A (en) * | 2022-08-19 | 2023-01-24 | 广东工业大学 | Short-term prediction method for minority data wind power of newly-built wind power plant |
CN115545279A (en) * | 2022-09-19 | 2022-12-30 | 国网河南省电力公司电力科学研究院 | Wind power plant wind power prediction method |
CN115995810A (en) * | 2022-12-12 | 2023-04-21 | 国网山东省电力公司德州供电公司 | Wind power prediction method and system considering weather fluctuation self-adaptive matching |
CN116307139A (en) * | 2023-03-02 | 2023-06-23 | 河海大学 | Wind power ultra-short-term prediction method for optimizing and improving extreme learning machine |
Non-Patent Citations (3)
Title |
---|
IGSA优化LSSVM的短期风电功率预测研究;凤志民;田丽;吴道林;李从飞;;可再生能源(第11期);全文 * |
基于ADQPSO-KELM风电功率短期预测模型的研究;屈伯阳;付立思;;水电能源科学(第12期);全文 * |
基于帝王蝶优化算法的BP神经网络能源预测模型研究;颜高洋 等;《南昌工程学院学报》;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN116526478A (en) | 2023-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Ge et al. | A hybrid model for short-term PV output forecasting based on PCA-GWO-GRNN | |
JP5888640B2 (en) | Photovoltaic power generation prediction apparatus, solar power generation prediction method, and solar power generation prediction program | |
CN113762603B (en) | Photovoltaic base station short-term photovoltaic power prediction method based on improved sparrow algorithm optimization | |
CN116526478B (en) | Short-term wind power prediction method and system based on improved snake group optimization algorithm | |
CN110766200A (en) | Method for predicting generating power of wind turbine generator based on K-means mean clustering | |
Rao et al. | Dropout and pruned neural networks for fault classification in photovoltaic arrays | |
Hashemi et al. | Snow loss prediction for photovoltaic farms using computational intelligence techniques | |
CN110942205A (en) | Short-term photovoltaic power generation power prediction method based on HIMVO-SVM | |
CN110781595B (en) | Method, device, terminal and medium for predicting energy use efficiency (PUE) | |
CN112149883A (en) | Photovoltaic power prediction method based on FWA-BP neural network | |
CN106203698A (en) | A kind of photovoltaic generation Forecasting Methodology based on Unscented kalman filtering and neutral net | |
CN114330100A (en) | Short-term photovoltaic power probability interval prediction method | |
Saffari et al. | Deep convolutional graph rough variational auto-encoder for short-term photovoltaic power forecasting | |
CN114897204A (en) | Method and device for predicting short-term wind speed of offshore wind farm | |
CN115169742A (en) | Short-term wind power generation power prediction method | |
Chen et al. | Short interval solar power prediction for energy harvesting with low computation cost on edge computation network | |
CN116187540B (en) | Wind power station ultra-short-term power prediction method based on space-time deviation correction | |
CN117374941A (en) | Photovoltaic power generation power prediction method based on neural network | |
CN112307672A (en) | BP neural network short-term wind power prediction method based on cuckoo algorithm optimization | |
CN116896093A (en) | Online analysis and optimization method for grid-connected oscillation stability of wind farm | |
CN116341717A (en) | Wind speed prediction method based on error compensation | |
Velasco et al. | Performance analysis of multilayer perceptron neural network models in week-ahead rainfall forecasting | |
CN115688588A (en) | Sea surface temperature daily change amplitude prediction method based on improved XGB method | |
Shi et al. | Short-term photovoltaic power forecast based on long short-term memory network | |
CN113988189A (en) | Migration fault diagnosis method of cross-wind turbine generator |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |