CN114139777A - Wind power prediction method and device - Google Patents

Wind power prediction method and device Download PDF

Info

Publication number
CN114139777A
CN114139777A CN202111349004.7A CN202111349004A CN114139777A CN 114139777 A CN114139777 A CN 114139777A CN 202111349004 A CN202111349004 A CN 202111349004A CN 114139777 A CN114139777 A CN 114139777A
Authority
CN
China
Prior art keywords
moth
wind power
flame
stsr
fitness
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.)
Pending
Application number
CN202111349004.7A
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.)
Beijing Huaneng Xinrui Control Technology Co Ltd
Original Assignee
Beijing Huaneng Xinrui Control Technology Co Ltd
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 Beijing Huaneng Xinrui Control Technology Co Ltd filed Critical Beijing Huaneng Xinrui Control Technology Co Ltd
Priority to CN202111349004.7A priority Critical patent/CN114139777A/en
Publication of CN114139777A publication Critical patent/CN114139777A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E40/00Technologies for an efficient electrical power generation, transmission or distribution
    • Y02E40/70Smart grids as climate change mitigation technology in the energy generation sector
    • YGENERAL 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
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS 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/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems 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)
  • Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Primary Health Care (AREA)
  • Water Supply & Treatment (AREA)
  • Public Health (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The invention provides a wind power prediction method and device. The method comprises the following steps: collecting operating data of the wind turbine generator; preprocessing data based on Kalman filtering; constructing an extended depth STSR-LSTM network; optimizing parameters of an extended depth STSR-LSTM network based on a moth flame algorithm; the performance verification of the proposed medium-and-long-term wind power prediction method. The invention provides a wind power prediction method based on moth flame algorithm optimization gating recurrent neural network deep learning, and aims to realize accurate prediction of fan power. The method focuses on medium-and-long-term wind power prediction, provides an extended depth sequence to sequence long-and-short-term memory regression network model to improve the prediction performance, and can effectively improve the wind power prediction precision. The method optimizes the parameters in the deep learning and neural network model through the moth flame algorithm, thereby further ensuring the performance of the algorithm.

Description

Wind power prediction method and device
Technical Field
The invention belongs to the technical field of wind power prediction, and particularly relates to a wind power prediction method and device.
Background
Under the background of new energy power, the schedulability of a power grid, energy and the reserve thereof and the power generation cost relative to the traditional thermal power are considered at the same time for realizing the balance of the supply and the demand of the electric energy. Wind power generation has the advantages of high economy, mature technical development, environmental friendliness and the like, and is therefore considered to be one of the most promising renewable energy sources in modern power systems. Wind power is used as an intermittent power source, and in order to realize the full development of the wind power in the global range, an optimal mode of connecting the wind power to a power grid needs to be explored to ensure the safe and stable operation of the power grid. Therefore, a relation model between meteorological factors and the output power of the unit is obtained on the basis of high-quality wind power generation data set identification, and then wind power is predicted on the basis of the model, so that reference is provided for power grid dispatching operation to improve stability of the power grid dispatching operation.
In order to improve the accuracy and robustness of wind power generation power prediction, experts and scholars at home and abroad make continuous efforts. The two main aspects are the time range of the prediction and the method used. According to different technologies, wind power prediction models can be divided into physical models, mathematical models, intelligent models and hybrid models, and weather forecast information is often involved in the wind power prediction process. In order to avoid a complex mechanism analysis process in a modeling process, the traditional methods such as a neural network, an extreme learning machine, a radial neural network and fuzzy logic control are widely applied to wind power prediction. Although the method does not depend on a preset prediction model, the obtained residual error is almost constant. Meanwhile, considering that the residual error is not always predictable, the existence of unpredictability thereof may reduce the accuracy of the power prediction result. Therefore, the introduction of deep learning is crucial to solving this problem. Different from the generalized model, the deep learning model responds to the evolution modes in different data sets, and generates an optimization result according to the input time sequence data. In the aspect of power generation prediction of new energy resources such as wind power and the like, the performance of the deep learning network is superior to that of a traditional prediction model. The application of the deep learning method and the neural decomposition network to the dependent method can further improve the correction efficiency of the deep network in consideration of the non-stationary and non-linear characteristics of the residual error.
Disclosure of Invention
The invention aims to at least solve one of the technical problems in the prior art and provides a wind power prediction method and a wind power prediction device.
In one aspect of the present invention, a wind power prediction method is provided, where the method includes:
collecting operating data of the wind turbine generator;
preprocessing data based on Kalman filtering;
constructing an extended depth STSR-LSTM network;
optimizing parameters of an extended depth STSR-LSTM network based on a moth flame algorithm;
the performance verification of the proposed medium-and-long-term wind power prediction method.
In some embodiments, the collecting of the wind turbine operating data includes:
setting the output power of the wind turbine generator as the only output variable y, and obtaining the ground through a principal component methodScreening input variables such as potential, altitude, air temperature, wind speed and wind direction to obtain n input variables serving as final input variables { u } of the neural network model1,u2,…,un};
And acquiring N groups of actual operation data of the wind turbine generator at sampling intervals T based on the obtained input and output variables, wherein the sampling data needs to fully cover the wide load range operation working conditions of the wind turbine generator under different environmental conditions in order to ensure the universality and generalization capability of the obtained prediction model.
In some embodiments, the kalman filter-based data preprocessing comprises:
setting a discrete model of the wind turbine generator as follows:
Figure BDA0003355022090000021
wherein: x (k) is a system state variable, u (k) is an input variable at the time k, y (k) is an output variable at the time k, and A, B, H are a state matrix, an input matrix and an output matrix of the system respectively; xi (k) and eta (k) are system process noise and measurement noise respectively; setting error covariance matrixes caused by the two noises as Q and R respectively;
in consideration of the predicted value and the detected value of the system, Kalman filtering updates the covariance matrix of the system state estimation in real time, and the estimation of the next output moment is realized by calculating Kalman gain; the time update formula of the kalman filter is:
Figure BDA0003355022090000031
wherein:
Figure BDA0003355022090000032
for the system a-priori state estimates at time k,
Figure BDA0003355022090000033
for the system optimal state estimation at time k-1,
Figure BDA0003355022090000034
a covariance matrix estimated for the system prior state at time k;
the state update formula is:
Figure BDA0003355022090000035
wherein: k (k) represents Kalman filtering gain, and P (k) is a covariance matrix estimated for the posterior state at the moment k;
estimating the output of the next moment based on the estimation predicted value and the current detection value of the previous step, wherein the residual error between the detection output and the prediction output is as follows:
Figure BDA0003355022090000036
in some embodiments, the extended depth STSR-LSTM network has a four-layer structure, being a sequence input layer, a full-link layer, a regression output layer, and a depth LSTM layer;
the construction of the extended depth STSR-LSTM network comprises the following steps:
setting the learnable weight of each layer as an input weight X, a regression weight S and a deviation c; and matrices X, S and c also represent the input and regression weights and biases for the components; the following matrix is defined:
Figure BDA0003355022090000037
wherein g, j, p and h respectively represent a forgetting gate, an output gate, an input gate and a unit candidate gate;
the cell location at step k is determined by the following equation:
dk=gk⊙dk-1+jk⊙hk (6)
wherein: as represents a Hadamard product for calculating the vector multiplication of the augmented depth STSR-LSTM network; the time step estimate for the hidden state is:
Ik=pk⊙σd(dk) (7)
in the formula: sigmadIs an activation function; and measuring the state of an activation function in the extended depth STSR-LSTM layer by adopting a hyperbolic tangent function, wherein the time steps are as follows:
an input gate:
jk=σh(Xjyk+SjIk-1+cj) (8)
forget the door:
gk=σh(Xgyk+SgIk-1+cg) (9)
unit candidate gate:
hk=σh(Xhyk+ShIk-1+ch) (10)
an output gate:
pk=σh(Xpyu+SpIk-1+cp) (11)
accelerating convergence process based on Adam function; an adaptive moment estimation function Adam is used in the convergence process of the algorithm, and the function keeps the previous square gradient wuAn exponential decay average of (d); in addition, the Adam function may also measure a second gradient nuAverage value of (d); w is auAnd nuNon-central variance and mean, respectively, having the following expression:
Figure BDA0003355022090000041
wherein: beta is a12∈[0,1](ii) a Further, the learning attenuation rates of the two moving average functions are updated using the following formula:
Figure BDA0003355022090000042
then, updating parameters through an extended depth STSR-LSTM formula:
Figure BDA0003355022090000043
data partitioning of training and testing results; the average wind power generation and demand of 15 minutes must be balanced between the user side and the grid-connected side, so that the wind power generation and demand can be divided into a plurality of subsets; management of the power system supply and demand balance is based on energy production schedules delivered and calculated on the previous day, typically using 15 minute intervals for monthly, seasonal and annual wind power forecasts;
predicting future time step based on the sampled data and updating state network; an augmented depth STSR-LSTM network and a state update function are used to predict future time step values in given time series data and to change the network state for each prediction step in the future to predict a plurality of time step values in the future.
In some embodiments, the parameter optimization of the moth flame algorithm based extended depth STSR-LSTM network comprises:
algorithm initialization:
setting parameters and initializing a population; assuming the moth population size is NmThe number of variables to be optimized is d, and at the same time, the number of flames is NfThe maximum iteration number is M; the position vector of the individual in the moth population is initialized as follows:
Mi,j=(ubj-lbj)·rand(0,1)+lbj (i=1,2,…,Nm;j=1,2,…,d) (15)
wherein: mi,jIs the location of the ith moth in the jth search dimension; ubjAnd lbjRepresenting the upper and lower boundaries of the j-th dimension search space;
further, the entire moth population can be represented as:
Figure BDA0003355022090000051
wherein: k is the current iteration step and is taken as 1;
defining a fitness function FM according to actual optimization requirements; the initial fitness vector of the moth population is as follows:
Figure BDA0003355022090000052
flame position:
self-adaptive calculation of flame number, moth species population fitness sequencing and flame position determination;
in the searching process of the moth flame algorithm, moth is used as a searching subject, flames are used as a set of the current optimal moth positions, and the initial number N of the moth flames isfEqual to the size of the moth population; the moth position is updated to face the corresponding flame, if NfKeeping the value high all the time will lead to a reduction in the production capacity and therefore introduce an adaptive flame number as shown below;
Figure BDA0003355022090000061
then, the fitness values of the moths are sorted in ascending order, and the first N is selectedf(k) A member generated flame fitness vector, ff (k); furthermore, the corresponding moth position is considered as the position of the flame f (k);
Figure BDA0003355022090000062
Figure BDA0003355022090000063
wherein: FFi(i=1,2,…,Nf) The fitness of the ith moth;
and (3) updating the position of the moth:
repositioning and fitness calculation based on the logarithmic spiral;
Mi(k+1)=|Mi(k)-Fj(k)|·e·cos(2πλ)+Fj(k) (i=1,2,…,Nm;j=1,2,…,Nf) (21)
wherein: i Mi–FjL is the distance from the ith moth to the jth flame, and lambda is [ r,1 ]]R is expressed as follows:
Figure BDA0003355022090000064
after the position of the moth is updated, a new fitness vector FM (k +1) is obtained;
and (3) updating the flame position:
fitness ranking and elite retention;
the mixed fitness function vector containing the fitness values of the relocated moth and the current flame is sorted and named FMnew
FMnew=sort[FM(k+1),FF(k)] (23)
Will FMnewThe first item N in (1)f(k) Considering as elite, and updating the flame position vector FF (k + 1); in addition, the moth population M (k +1) and its fitness vector FM (k +1) are also represented by the first N of the new rank vectorsmItem updating;
and (4) process judgment:
setting and judging termination conditions;
taking the maximum iteration times or the acceptable search precision of the current iteration as a termination condition; thus, if either of these two conditions is met, the entire search process ends; otherwise, k is k +1, and the steps are returned to further optimization.
In some embodiments, the performance verification of the proposed medium-and long-term wind power prediction method includes:
the code compiling of the proposed algorithm is realized based on Matlab, Demola, Python and C/C + + software platforms, and simulation test is carried out;
and setting related performance indexes in wind power prediction, and verifying feasibility and effectiveness of the wind power prediction method through quantitative statistics and qualitative analysis.
In another aspect of the present invention, there is provided a wind power prediction apparatus, including:
the acquisition module is used for acquiring the operating data of the wind turbine generator;
the preprocessing module is used for preprocessing data based on Kalman filtering;
the building module is used for building the depth-enhanced STSR-LSTM network;
the optimization module is used for optimizing parameters of the depth-increasing STSR-LSTM network based on the moth flame algorithm;
and the verification module is used for verifying the performance of the proposed medium-and-long-term wind power prediction method.
In some embodiments, the acquisition module is further specifically configured to:
setting the output power of the wind turbine generator as the unique output variable y, obtaining input variables such as terrain, altitude, air temperature, wind speed and wind direction through a principal component method, screening to obtain n input variables as final input variables of the neural network model { u }1,u2,…,un};
And acquiring N groups of actual operation data of the wind turbine generator at sampling intervals T based on the obtained input and output variables, wherein the sampling data needs to fully cover the wide load range operation working conditions of the wind turbine generator under different environmental conditions in order to ensure the universality and generalization capability of the obtained prediction model.
In another aspect of the present invention, an electronic device is provided, including:
one or more processors;
a storage unit for storing one or more programs which, when executed by the one or more processors, enable the one or more processors to implement the method according to the preceding description.
In another aspect of the invention, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, is adapted to carry out the method according to the above.
The wind power prediction method and the device provided by the invention are based on the new energy consumption requirement of a novel power system in China, and provide the wind power prediction method based on moth flame algorithm optimization gating recurrent neural network deep learning for improving the stability of a power grid under wind power access so as to realize accurate prediction of fan power. The invention considers the problem of insufficient research related to the current medium-long term wind power prediction, focuses on the medium-long term wind power prediction, provides an extended depth sequence to sequence long-term short-term memory regression (STSR-LSTM) network model to improve the prediction performance, and can effectively improve the wind power prediction precision. The method optimizes the parameters in the deep learning and neural network model through the moth flame algorithm, thereby further ensuring the performance of the algorithm.
Drawings
FIG. 1 is a flow chart of a wind power prediction method proposed by the present invention;
FIG. 2 is a schematic block diagram of an extended depth STSR-LSTM network constructed in accordance with the present invention;
fig. 3 is a schematic structural diagram of a wind power prediction device provided by the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
One aspect of the present embodiment, as shown in fig. 1, relates to a wind power prediction method, where the method includes:
s1: and collecting the operating data of the wind turbine generator.
S2: and preprocessing data based on Kalman filtering.
S3: and constructing an extended depth STSR-LSTM network.
S4: and optimizing parameters of the STSR-LSTM network based on the depth of propagation of the moth flame algorithm.
S5: the performance verification of the proposed medium-and-long-term wind power prediction method.
The method provided by the invention is a data-driven modeling method in essence. Therefore, step S1 can be embodied as:
s1.1: setting the output power of the wind turbine generator asObtaining the input variables such as terrain, altitude, air temperature, wind speed, wind direction and the like through a principal component method, screening the input variables to obtain n input variables serving as the final input variables { u } of the neural network model1,u2,…,un}。
S1.2: based on each input and output variable obtained in S1.1, acquiring N10000 groups of actual operation data of the wind turbine generator at a sampling interval T of 15min, wherein the sampling data needs to fully cover the wide load range operation working condition of the wind turbine generator under different environmental conditions in order to ensure the universality and generalization capability of the obtained prediction model.
Based on the wind turbine generator sampling data in S1, preprocessing is carried out by using a Kalman filtering method to realize data denoising. Based on the fact that the kalman filter performs optimal estimation on the current state of the system through the measured value and the predicted value of the system, the adverse effects of process noise and measurement noise can be effectively alleviated, and the step S2 can be embodied as
S2.1: setting a discrete model of the wind turbine generator as follows:
Figure BDA0003355022090000091
wherein: x (k) is a system state variable, u (k) is an input variable at the time k, y (k) is an output variable at the time k, and A, B, H are a state matrix, an input matrix and an output matrix of the system respectively; xi (k) and eta (k) are system process noise and measurement noise respectively; setting error covariance matrixes caused by the two noises as Q and R respectively;
s2.2: in consideration of the predicted value and the detected value of the system, Kalman filtering updates the covariance matrix of the system state estimation in real time, and the estimation of the next output moment is realized by calculating Kalman gain; the time update formula of the kalman filter is:
Figure BDA0003355022090000092
wherein:
Figure BDA0003355022090000093
for the system a-priori state estimates at time k,
Figure BDA0003355022090000094
for the system optimal state estimation at time k-1,
Figure BDA0003355022090000095
a covariance matrix estimated for the system prior state at time k;
the state update formula is:
Figure BDA0003355022090000101
wherein: k (k) denotes the Kalman filter gain, and P (k) is the covariance matrix estimated for the posterior state at time k.
S2.3: estimating the output of the next moment based on the estimation predicted value and the current detection value of the previous step, wherein the residual error between the detection output and the prediction output is as follows:
Figure BDA0003355022090000102
based on the denoised data of S2, an extended depth STSR-LSTM network model shown in FIG. 2 is constructed in S3. The model has a four-layer structure, which is respectively as follows: a sequence input layer, a full connection layer, a regression output layer and a depth LSTM layer. And statistical learning techniques are introduced to improve the reliability of the derived features and expected performance.
S3.1: the extended depth STSR-LSTM network is a recurrent neural network that establishes long-term dependencies between actual and predicted read sequence data steps. The layer Sequence Input Layer (SIL) and the STSR-LSTM layer are two main components of the extended depth STSR-LSTM network. The SIL provides a network sequence and time series data. The STSR-LSTM layer learns the long-term reliability between data sequence steps. Setting the learnable weight of each layer as an input weight X, a regression weight S and a deviation c; and matrices X, S and c also represent the input and regression weights and biases for the components; the following matrix is defined:
Figure BDA0003355022090000103
wherein g, j, p and h respectively represent a forgetting gate, an output gate, an input gate and a unit candidate gate;
the cell location at step k is determined by the following equation:
dk=gk⊙dk-1+jk⊙hk (6)
wherein: as represents a Hadamard product for calculating the vector multiplication of the augmented depth STSR-LSTM network; the time step estimate for the hidden state is:
Ik=pk⊙σd(dk) (7)
in the formula: sigmadIs an activation function; and measuring the state of an activation function in the extended depth STSR-LSTM layer by adopting a hyperbolic tangent function, wherein the time steps are as follows:
an input gate:
jk=σh(Xjyk+SjIk-1+cj) (8)
forget the door:
gk=σh(Xgyk+SgIk-1+cg) (9)
unit candidate gate:
hk=σh(Xhyk+ShIk-1+ch) (10)
an output gate:
pk=σh(Xpyu+SpIk-1+cp) (11)
s3.2: accelerating convergence process based on Adam function; an adaptive moment estimation function Adam is used in the convergence process of the algorithm, and the function keeps the previous square gradient wuAn exponential decay average of (d); in addition, the Adam function may also measure a second gradient nuAverage value of (2);wuAnd nuNon-central variance and mean, respectively, having the following expression:
Figure BDA0003355022090000111
wherein: beta is a12∈[0,1](in this example, take β1=0.6,β20.4); further, the learning attenuation rates of the two moving average functions are updated using the following formula:
Figure BDA0003355022090000112
then, updating parameters through an extended depth STSR-LSTM formula:
Figure BDA0003355022090000113
s3.3: data partitioning of training and testing results; the average wind power generation and demand of 15 minutes must be balanced between the user side and the grid-connected side, so that the wind power generation and demand can be divided into a plurality of subsets; management of the power system supply and demand balance is based on energy production schedules delivered and calculated the previous day, typically using 15 minute intervals for monthly, seasonal and annual wind power forecasts.
S3.4: predicting future time step based on the sampled data and updating state network; an augmented depth STSR-LSTM network and a state update function are used to predict future time step values in given time series data and to change the network state for each prediction step in the future to predict a plurality of time step values in the future. The training data parameters are used to normalize the test data. After accessing the actual time phase values between predictors, the depth STSR-LSTM network state is updated with the measured values instead of the predictors. In addition, the network state is reset or adjusted to prevent the previous prediction values from affecting the new data prediction.
Parameter selection of the extended depth STSR-LSTM network model constructed in the S3 is a key influence factor of wind power prediction efficiency and accuracy. Therefore, the parameters of the constructed extended depth STSR-LSTM network model are optimized by the moth flame algorithm in step S4.
The moth flame algorithm is inspired by the phototaxis of moths, and each member of a moth population flies towards a light source at a fixed angle. The distance between the moth and the light source has great influence on the movement track of the moth. Taking moon light and artificial light as examples (e.g. flames), moths can travel in a straight line because the moon is far enough away. However, when facing an artificial light source, the fixed angle navigation of the moth results in a spiral flight path, a process very similar to the optimization problem regarding the light source position as the optimal solution.
S4.1: algorithm initialization: setting parameters and initializing a population; assuming the moth population size is Nm(this example selects Nm50). The number of variables to be optimized is d (in this example, d is 5), and at the same time, the number of flames is NfThe initial value is 50. The maximum iteration number is M-30; the position vector of the individual in the moth population is initialized as follows:
Mi,j=(ubj-lbj)·rand(0,1)+lbj (i=1,2,…,Nm;j=1,2,…,d) (15)
wherein: mi,jIs the location of the ith moth in the jth search dimension; ubjAnd lbjRepresents the upper and lower bounds of the j-th dimension search space, in this embodiment, ub1=…=ubj=1,lb1=…=lbj=-1。
Further, the entire moth population can be represented as:
Figure BDA0003355022090000121
wherein: k is the current iteration step and is taken as 1;
defining a fitness function FM according to actual optimization requirements; the initial fitness vector of the moth population is as follows:
Figure BDA0003355022090000131
s4.2: flame position: self-adaptive calculation of flame number, moth species population fitness sequencing and flame position determination.
In the searching process of the moth flame algorithm, moth is used as a searching subject, flames are used as a set of the current optimal moth positions, and the initial number N of the moth flames isfEqual to the size of the moth population; the moth position is updated to face the corresponding flame, if NfKeeping the value high all the time will lead to a reduction in the production capacity and therefore introduce an adaptive flame number as shown below;
Figure BDA0003355022090000132
then, the fitness values of the moths are sorted in ascending order, and the first N is selectedf(k) A member generated flame fitness vector, ff (k); furthermore, the corresponding moth position is considered as the position of the flame f (k);
Figure BDA0003355022090000133
Figure BDA0003355022090000134
wherein: FFi(i=1,2,…,Nf) The fitness of the ith moth.
S4.3: and (3) updating the position of the moth: repositioning and fitness calculation based on logarithmic spirals.
Mi(k+1)=|Mi(k)-Fj(k)|·e·cos(2πλ)+Fj(k) (i=1,2,…,Nm;j=1,2,…,Nf) (21)
Wherein: i Mi-FjL is the distance from the ith moth to the jth flame, and lambda is [ r,1 ]]R is expressed as follows:
Figure BDA0003355022090000135
and after the position of the moth is updated, obtaining a new fitness vector FM (k + 1).
S4.4: and (3) updating the flame position: fitness ranking and elite retention.
The mixed fitness function vector containing the fitness values of the relocated moth and the current flame is sorted and named FMnew
FMnew=sort[FM(k+1),FF(k)] (23)
Will FMnewThe first item N in (1)f(k) Considering as elite, and updating the flame position vector FF (k + 1); in addition, the moth population M (k +1) and its fitness vector FM (k +1) are also represented by the first N of the new rank vectorsmItem updating;
s4.5: and (4) process judgment: and setting and judging termination conditions.
Taking the maximum iteration times or the acceptable search precision of the current iteration as a termination condition; thus, if either of these two conditions is met, the entire search process ends; otherwise, k is k +1, and the step 4.2 is returned to for further optimization.
In order to verify the effectiveness of the wind power prediction method based on moth flame algorithm optimization gating recurrent neural network deep learning, a numerical test is carried out by relying on a Matlab simulation platform. Based on this, S5 may be embodied as:
s5.1: and realizing code writing of the proposed algorithm and performing simulation test based on software platforms such as Matlab and the like.
S5.2: and setting performance indexes related to wind power prediction accuracy and speed, namely modeling speed Ts, model output mean square error MSE and fitting degree eta. The feasibility and the effectiveness of the wind power prediction method designed by the invention are verified through quantitative statistics and qualitative analysis.
The wind power prediction method provided by the invention is based on the new energy consumption requirement of a novel power system in China, and provides a moth flame algorithm-based optimized gating recurrent neural network deep learning wind power prediction method for improving the stability of a power grid under wind power access so as to realize accurate prediction of fan power. The invention considers the problem of insufficient research related to the current medium-long term wind power prediction, focuses on the medium-long term wind power prediction, provides an extended depth sequence to sequence long-term short-term memory regression (STSR-LSTM) network model to improve the prediction performance, and can effectively improve the wind power prediction precision. The method optimizes the parameters in the deep learning and neural network model through the moth flame algorithm, thereby further ensuring the performance of the algorithm.
In another aspect of the present invention, as shown in fig. 3, a wind power prediction apparatus 100 is provided, and the apparatus 100 is adapted to the method described above. The apparatus 100 comprises:
the acquisition module 110 is used for acquiring the operation data of the wind turbine generator;
a preprocessing module 120 for data preprocessing based on kalman filtering;
a build module 130 for building an extended depth STSR-LSTM network;
an optimization module 140, configured to optimize parameters of the enhanced depth STSR-LSTM network based on a moth flame algorithm;
the verification module 150 is used for verifying the performance of the proposed medium-and-long-term wind power prediction method.
The wind power prediction device provided by the invention is based on the new energy consumption requirement of a novel power system in China, and provides a moth flame algorithm-based optimized gating recurrent neural network deep learning wind power prediction device for improving the stability of a power grid under wind power access so as to realize accurate prediction of fan power. The invention considers the problem of insufficient research related to the current medium-long term wind power prediction, focuses on the medium-long term wind power prediction, provides an extended depth sequence to sequence long-term short-term memory regression (STSR-LSTM) network model to improve the prediction performance, and can effectively improve the wind power prediction precision. The method optimizes the parameters in the deep learning and neural network model through the moth flame algorithm, thereby further ensuring the performance of the algorithm.
In some embodiments, the acquisition module 110 is further specifically configured to:
setting the output power of the wind turbine generator as the unique output variable y, obtaining input variables such as terrain, altitude, air temperature, wind speed and wind direction through a principal component method, screening to obtain n input variables as final input variables of the neural network model { u }1,u2,…,un};
And acquiring N groups of actual operation data of the wind turbine generator at sampling intervals T based on the obtained input and output variables, wherein the sampling data needs to fully cover the wide load range operation working conditions of the wind turbine generator under different environmental conditions in order to ensure the universality and generalization capability of the obtained prediction model.
In another aspect of the present invention, an electronic device is provided, including:
one or more processors;
a storage unit for storing one or more programs which, when executed by the one or more processors, enable the one or more processors to implement the method according to the preceding description.
In another aspect of the invention, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, is adapted to carry out the method according to the above.
The computer readable medium may be included in the apparatus, device, system, or may exist separately.
The computer readable storage medium may be any tangible medium that can contain or store a program, and may be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, more specific examples of which include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, an optical fiber, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
The computer readable storage medium may also include a propagated data signal with computer readable program code embodied therein, for example, in a non-transitory form, such as in a carrier wave or in a carrier wave, wherein the carrier wave is any suitable carrier wave or carrier wave for carrying the program code.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (10)

1. A wind power prediction method is characterized by comprising the following steps:
collecting operating data of the wind turbine generator;
preprocessing data based on Kalman filtering;
constructing an extended depth STSR-LSTM network;
optimizing parameters of an extended depth STSR-LSTM network based on a moth flame algorithm;
the performance verification of the proposed medium-and-long-term wind power prediction method.
2. The method of claim 1, wherein the collecting of the wind turbine operating data comprises:
setting the output power of the wind turbine generator as the unique output variable y, obtaining input variables such as terrain, altitude, air temperature, wind speed and wind direction through a principal component method, screening to obtain n input variables as final input variables of the neural network model { u }1,u2,…,un};
And acquiring N groups of actual operation data of the wind turbine generator at sampling intervals T based on the obtained input and output variables, wherein the sampling data needs to fully cover the wide load range operation working conditions of the wind turbine generator under different environmental conditions in order to ensure the universality and generalization capability of the obtained prediction model.
3. The method of claim 1, wherein the kalman filter based data preprocessing comprises:
setting a discrete model of the wind turbine generator as follows:
Figure FDA0003355022080000011
wherein: x (k) is a system state variable, u (k) is an input variable at the time k, y (k) is an output variable at the time k, and A, B, H are a state matrix, an input matrix and an output matrix of the system respectively; xi (k) and eta (k) are system process noise and measurement noise respectively; setting error covariance matrixes caused by the two noises as Q and R respectively;
in consideration of the predicted value and the detected value of the system, Kalman filtering updates the covariance matrix of the system state estimation in real time, and the estimation of the next output moment is realized by calculating Kalman gain; the time update formula of the kalman filter is:
Figure FDA0003355022080000021
wherein:
Figure FDA0003355022080000022
for the system a-priori state estimates at time k,
Figure FDA0003355022080000023
for the system optimal state estimation at time k-1,
Figure FDA0003355022080000024
a covariance matrix estimated for the system prior state at time k;
the state update formula is:
Figure FDA0003355022080000025
wherein: k (k) represents Kalman filtering gain, and P (k) is a covariance matrix estimated for the posterior state at the moment k;
estimating the output of the next moment based on the estimation predicted value and the current detection value of the previous step, wherein the residual error between the detection output and the prediction output is as follows:
Figure FDA0003355022080000026
4. the method of any of claims 1 to 3, wherein the extended depth STSR-LSTM network has a four-layer structure, being a sequence input layer, a full-link layer, a regression output layer and a depth LSTM layer;
the construction of the extended depth STSR-LSTM network comprises the following steps:
setting the learnable weight of each layer as an input weight X, a regression weight S and a deviation c; and matrices X, S and c also represent the input and regression weights and biases for the components; the following matrix is defined:
Figure FDA0003355022080000027
wherein g, j, p and h respectively represent a forgetting gate, an output gate, an input gate and a unit candidate gate;
the cell location at step k is determined by the following equation:
dk=gk⊙dk-1+jk⊙hk (6)
wherein: as represents a Hadamard product for calculating the vector multiplication of the augmented depth STSR-LSTM network; the time step estimate for the hidden state is:
Ik=pk⊙σd(dk) (7)
in the formula: sigmadIs an activation function; measuring activation functions in extended depth STSR-LSTM layers using hyperbolic tangent functionThe state, time steps are as follows:
an input gate:
jk=σh(Xjyk+SjIk-1+cj) (8)
forget the door:
gk=σh(Xgyk+SgIk-1+cg) (9)
unit candidate gate:
hk=σh(Xhyk+ShIk-1+ch) (10)
an output gate:
pk=σh(Xpyu+SpIk-1+cp) (11)
accelerating convergence process based on Adam function; an adaptive moment estimation function Adam is used in the convergence process of the algorithm, and the function keeps the previous square gradient wuAn exponential decay average of (d); in addition, the Adam function may also measure a second gradient nuAverage value of (d); w is auAnd nuNon-central variance and mean, respectively, having the following expression:
Figure FDA0003355022080000031
wherein: beta is a12∈[0,1](ii) a Further, the learning attenuation rates of the two moving average functions are updated using the following formula:
Figure FDA0003355022080000032
then, updating parameters through an extended depth STSR-LSTM formula:
Figure FDA0003355022080000033
data partitioning of training and testing results; the average wind power generation and demand of 15 minutes must be balanced between the user side and the grid-connected side, so that the wind power generation and demand can be divided into a plurality of subsets; management of the power system supply and demand balance is based on energy production schedules delivered and calculated on the previous day, typically using 15 minute intervals for monthly, seasonal and annual wind power forecasts;
predicting future time step based on the sampled data and updating state network; an augmented depth STSR-LSTM network and a state update function are used to predict future time step values in given time series data and to change the network state for each prediction step in the future to predict a plurality of time step values in the future.
5. The method according to any one of claims 1 to 3, wherein the parameter optimization of the moth flame algorithm based extended depth STSR-LSTM network comprises:
algorithm initialization:
setting parameters and initializing a population; assuming the moth population size is NmThe number of variables to be optimized is d, and at the same time, the number of flames is NfThe maximum iteration number is M; the position vector of the individual in the moth population is initialized as follows:
Mi,j=(ubj-lbj)·rand(0,1)+lbj(i=1,2,…,Nm;j=1,2,…,d) (15)
wherein: mi,jIs the location of the ith moth in the jth search dimension; ubjAnd lbjRepresenting the upper and lower boundaries of the j-th dimension search space;
further, the entire moth population can be represented as:
Figure FDA0003355022080000041
wherein: k is the current iteration step and is taken as 1;
defining a fitness function FM according to actual optimization requirements; the initial fitness vector of the moth population is as follows:
Figure FDA0003355022080000042
flame position:
self-adaptive calculation of flame number, moth species population fitness sequencing and flame position determination;
in the searching process of the moth flame algorithm, moth is used as a searching subject, flames are used as a set of the current optimal moth positions, and the initial number N of the moth flames isfEqual to the size of the moth population; the moth position is updated to face the corresponding flame, if NfKeeping the value high all the time will lead to a reduction in the production capacity and therefore introduce an adaptive flame number as shown below;
Figure FDA0003355022080000051
then, the fitness values of the moths are sorted in ascending order, and the first N is selectedf(k) A member generated flame fitness vector, ff (k); furthermore, the corresponding moth position is considered as the position of the flame f (k);
Figure FDA0003355022080000052
Figure FDA0003355022080000053
wherein: FFi(i=1,2,…,Nf) The fitness of the ith moth;
and (3) updating the position of the moth:
repositioning and fitness calculation based on the logarithmic spiral;
Mi(k+1)=|Mi(k)-Fj(k)|·e·cos(2πλ)+Fj(k)(i=1,2,…,Nm;j=1,2,…,Nf) (21)
wherein: i Mi–FjL is the distance from the ith moth to the jth flame, and lambda is [ r,1 ]]R is expressed as follows:
Figure FDA0003355022080000054
after the position of the moth is updated, a new fitness vector FM (k +1) is obtained;
and (3) updating the flame position:
fitness ranking and elite retention;
the mixed fitness function vector containing the fitness values of the relocated moth and the current flame is sorted and named FMnew
FMnew=sort[FM(k+1),FF(k)] (23)
Will FMnewThe first item N in (1)f(k) Considering as elite, and updating the flame position vector FF (k + 1); in addition, the moth population M (k +1) and its fitness vector FM (k +1) are also represented by the first N of the new rank vectorsmItem updating;
and (4) process judgment:
setting and judging termination conditions;
taking the maximum iteration times or the acceptable search precision of the current iteration as a termination condition; thus, if either of these two conditions is met, the entire search process ends; otherwise, k is k +1, and the steps are returned to further optimization.
6. The method according to any one of claims 1 to 4, wherein the performance verification of the proposed medium-and long-term wind power prediction method comprises:
the code compiling of the proposed algorithm is realized based on Matlab, Demola, Python and C/C + + software platforms, and simulation test is carried out;
and setting related performance indexes in wind power prediction, and verifying feasibility and effectiveness of the wind power prediction method through quantitative statistics and qualitative analysis.
7. A wind power prediction apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring the operating data of the wind turbine generator;
the preprocessing module is used for preprocessing data based on Kalman filtering;
the building module is used for building the depth-enhanced STSR-LSTM network;
the optimization module is used for optimizing parameters of the depth-increasing STSR-LSTM network based on the moth flame algorithm;
and the verification module is used for verifying the performance of the proposed medium-and-long-term wind power prediction method.
8. The apparatus of claim 7, wherein the acquisition module is further specifically configured to:
setting the output power of the wind turbine generator as the unique output variable y, obtaining input variables such as terrain, altitude, air temperature, wind speed and wind direction through a principal component method, screening to obtain n input variables as final input variables of the neural network model { u }1,u2,…,un};
And acquiring N groups of actual operation data of the wind turbine generator at sampling intervals T based on the obtained input and output variables, wherein the sampling data needs to fully cover the wide load range operation working conditions of the wind turbine generator under different environmental conditions in order to ensure the universality and generalization capability of the obtained prediction model.
9. An electronic device, comprising:
one or more processors;
a storage unit to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, is able to carry out a method according to any one of claims 1 to 6.
CN202111349004.7A 2021-11-15 2021-11-15 Wind power prediction method and device Pending CN114139777A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111349004.7A CN114139777A (en) 2021-11-15 2021-11-15 Wind power prediction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111349004.7A CN114139777A (en) 2021-11-15 2021-11-15 Wind power prediction method and device

Publications (1)

Publication Number Publication Date
CN114139777A true CN114139777A (en) 2022-03-04

Family

ID=80394311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111349004.7A Pending CN114139777A (en) 2021-11-15 2021-11-15 Wind power prediction method and device

Country Status (1)

Country Link
CN (1) CN114139777A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115796231A (en) * 2023-01-28 2023-03-14 湖南赛能环测科技有限公司 Ultrashort-term wind speed prediction method based on temporal analysis

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115796231A (en) * 2023-01-28 2023-03-14 湖南赛能环测科技有限公司 Ultrashort-term wind speed prediction method based on temporal analysis
CN115796231B (en) * 2023-01-28 2023-12-08 湖南赛能环测科技有限公司 Temporal analysis ultra-short term wind speed prediction method

Similar Documents

Publication Publication Date Title
CN109902801B (en) Flood collective forecasting method based on variational reasoning Bayesian neural network
CN107622329A (en) The Methods of electric load forecasting of Memory Neural Networks in short-term is grown based on Multiple Time Scales
CN109711617A (en) A kind of medium-term and long-term Runoff Forecast method based on BLSTM deep learning
CN112488396A (en) Wavelet transform-based electric power load prediction method of Holt-Winters and LSTM combined model
CN114330935B (en) New energy power prediction method and system based on multiple combination strategies integrated learning
CN113537582B (en) Photovoltaic power ultra-short-term prediction method based on short-wave radiation correction
CN111967696A (en) Neural network-based electric vehicle charging demand prediction method, system and device
CN112686481A (en) Runoff forecasting method and processor
Dong et al. Short-term building cooling load prediction model based on DwdAdam-ILSTM algorithm: A case study of a commercial building
Cruz et al. Prediction intervals with LSTM networks trained by joint supervision
CN115186923A (en) Photovoltaic power generation power prediction method and device and electronic equipment
CN117526274A (en) New energy power prediction method, electronic equipment and storage medium in extreme climate
CN116578551A (en) GRU-GAN-based power grid data restoration method
CN114139777A (en) Wind power prediction method and device
Alharbi et al. Short-term wind speed and temperature forecasting model based on gated recurrent unit neural networks
CN117557375A (en) Transaction evaluation method and related device based on virtual power plant
CN108875960A (en) A kind of learning method and system of the timing ambiguity Cognitive Map based on gradient decline
CN112381315A (en) LS-SVM intelligent platform area load prediction method and system based on PSO optimization
CN115907131B (en) Method and system for constructing electric heating load prediction model in northern area
CN117252288A (en) Regional resource active support capacity prediction method and system
Kumar et al. A Machine Learning Framework for Prediction Interval based Technique for Short-Term Solar Energy Forecast
CN113240181B (en) Rolling simulation method and device for reservoir dispatching operation
CN115563848A (en) Distributed photovoltaic total radiation prediction method and system based on deep learning
CN114676866A (en) Method, device and storage medium for correcting load prediction before day based on error correction
Elahe et al. An adaptive and parallel forecasting strategy for short-term power load based on second learning of error trend

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