A method and device for predicting wind power

By adopting the parameter optimization method of augmented depth STSR-LSTM network and moth flame algorithm in wind power prediction, the residual unpredictability problem in wind power prediction is solved, and higher prediction accuracy and stability are achieved, especially in medium- and long-term prediction.

CN114139777BActive Publication Date: 2025-03-18BEIJING HUANENG XINRUI CONTROL TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111349004.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-15
Publication Date
2025-03-18
Estimated Expiration
2041-11-15

AI Technical Summary

Technical Problem

The prior art has residual unpredictability in wind power prediction, resulting in a decrease in the accuracy of prediction results, especially in the lack of effective research and methods in medium- and long-term prediction.

Method used

The augmented depth STSR-LSTM network is used in combination with the moth flame algorithm, and data preprocessing is performed through Kalman filtering, and the parameters in the deep learning model are optimized to improve the medium- and long-term prediction performance of wind power.

Benefits of technology

It effectively improves the accuracy and stability of wind power power prediction, especially in medium- and long-term prediction, which significantly improves the accuracy and reliability of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114139777B_ABST
    Figure CN114139777B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for predicting wind power. The method includes: collecting wind turbine operation data; data preprocessing based on Kalman filtering; constructing an augmented deep STSR-LSTM network; optimizing parameters of the augmented deep STSR-LSTM network based on the moth flame algorithm; and verifying the performance of the proposed medium- and long-term wind power prediction method. The wind power prediction method of the present invention provides a wind power prediction method based on deep learning of a moth flame algorithm-optimized gated recursive neural network to achieve accurate prediction of wind turbine power. The present invention focuses on medium- and long-term wind power prediction, and proposes an augmented deep sequence-to-sequence long short-term memory regression network model to improve prediction performance, which can effectively improve the accuracy of wind power prediction. The present invention optimizes the parameters in the deep learning and neural network models used by the moth flame algorithm, thereby further ensuring the algorithm performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of wind power prediction, and in particular relates to a wind power prediction method and device. Background Art

[0002] In the context of new energy power, in order to achieve a balance between supply and demand of electricity, it is necessary to consider the dispatchability of the power grid, energy and its reserves, and the cost of power generation relative to traditional thermal power. Wind power generation has the advantages of high economy, relatively mature technology development and environmental friendliness, so it is regarded as one of the most promising renewable energy sources in modern power systems. As an intermittent power source, in order to achieve its long-term development on a global scale, it is necessary to explore the best way to connect it to the power grid to ensure the safe and stable operation of the power grid. To this end, it is necessary to identify the relationship model between meteorological factors and unit output power based on high-quality wind power data sets, and then predict wind power based on this model, so as to provide a reference for grid dispatching and operation to improve its stability.

[0003] In order to improve the accuracy and robustness of wind power forecasting, domestic and foreign experts and scholars have made unremitting efforts. They mainly start from two aspects, namely the time range of forecasting and the methods used. According to the different technologies used, wind power forecasting models can be divided into physical models, mathematical models, intelligent models and hybrid models, and meteorological forecast information is often involved in the process of wind power forecasting. In order to avoid the complex mechanism analysis process in the modeling process, traditional neural networks, extreme learning machines, radial neural networks and fuzzy logic control methods are widely used in wind power forecasting. Although the above methods do not rely on the preset prediction model, the residuals obtained are almost constant. At the same time, considering that the residuals are not always predictable, the existence of their unpredictability will reduce the accuracy of the power forecast results. Therefore, the introduction of deep learning is crucial to solve this problem. Unlike generalized models, deep learning models respond to evolutionary patterns in different data sets and generate optimization results based on the input time series data. In the prediction of renewable energy power generation such as wind power, the performance of deep learning networks is better than that of traditional prediction models. Considering the non-stationary and nonlinear characteristics of the residuals, applying deep learning methods and neural decomposition networks to subordinate methods can further improve the correction efficiency of deep networks. Summary of the invention

[0004] The present invention aims to solve at least one of the technical problems existing in the prior art and provides a wind power prediction method and device.

[0005] In one aspect of the present invention, a method for predicting wind power is provided, the method comprising:

[0006] Collection of wind turbine operation data;

[0007] Data preprocessing based on Kalman filter;

[0008] Construction of augmented deep STSR-LSTM network;

[0009] Parameter optimization of augmented deep STSR-LSTM network based on moth flame algorithm;

[0010] Performance verification of the proposed medium- and long-term wind power forecasting method.

[0011] In some implementations, the collection of wind turbine operation data includes:

[0012] Assume that the output power of the wind turbine is the only output variable y, and the input variables such as terrain, altitude, temperature, wind speed, and wind direction are obtained by principal component method to screen and obtain n input variables as the final neural network model input variables {u1,u2,…,u n};

[0013] Based on the obtained input and output variables, N groups of actual operating data of wind turbines are obtained at a sampling interval T. To ensure the universality and generalization ability of the obtained prediction model, the sampling data must fully cover the operating conditions of the wind turbines in a wide load range under different environmental conditions.

[0014] In some embodiments, the data preprocessing based on Kalman filtering includes:

[0015] Assume that the discrete model of the wind turbine is:

[0016]

[0017] Where: x(k) is the system state variable, u(k) is the input variable at time k, y(k) is the output variable at time k, A, B, H are the system state matrix, input matrix and output matrix respectively; ξ(k) and η(k) are the system process noise and measurement noise respectively; and the error covariance matrices caused by the above two noises are assumed to be Q and R respectively;

[0018] Considering the predicted value and detected value of the system, the Kalman filter updates the covariance matrix of the system state estimation in real time, and estimates the output at the next moment by calculating the Kalman gain; the time update formula of the Kalman filter is:

[0019]

[0020] in: is the system prior state estimate at time k, is the optimal state estimate of the system at time k-1, is the covariance matrix of the system prior state estimate at time k;

[0021] The state update formula is:

[0022]

[0023] Where: K(k) represents the Kalman filter gain, P(k) is the posterior state estimation covariance matrix at time k;

[0024] The output at the next moment is estimated based on the estimated prediction value of the previous step and the current detection value, and the residual between the detection output and the predicted output is:

[0025]

[0026] In some embodiments, the augmented deep STSR-LSTM network has a four-layer structure, namely a sequence input layer, a fully connected layer, a regression output layer and a deep LSTM layer;

[0027] The construction of the augmented deep STSR-LSTM network includes:

[0028] Assume that the learnable weights of each layer are input weights X, regression weights S, and biases c; and the matrices X, S, and c also represent the input and regression weights and biases of the components; define the following matrices:

[0029]

[0030] Where g, j, p and h represent the forget gate, output gate, input gate and unit candidate gate respectively;

[0031] The cell position at step k is determined by the following equation:

[0032] d k =g k ⊙d k-1 +j k ⊙h k (6)

[0033] Where: ⊙ represents the Hadamard product, which is used to calculate the vector multiplication of the augmented deep STSR-LSTM network; the time step of the hidden state is estimated as:

[0034] I k =p k ⊙σ d (d k ) (7)

[0035] Where: d is the activation function; the hyperbolic tangent function is used to measure the state of the activation function in the extended depth STSR-LSTM layer, and the time step is as follows:

[0036] Input Gate:

[0037] j k =σ h (X j y k +S j I k-1 +c j ) (8)

[0038] Forget Gate:

[0039] g k =σ h (X g y k +S g I k-1 +c g ) (9)

[0040] Unit candidate gate:

[0041] h k =σ h (X h y k +S h I k-1 +c h ) (10)

[0042] Output Gate:

[0043] p k =σ h (X p y u +S p I k-1 +c p ) (11)

[0044] Accelerated convergence process based on Adam function; Adaptive moment estimation function Adam is used in the algorithm convergence process, which maintains the previous square gradient w u The exponential decay average of ; In addition, the Adam function can also measure the second gradient n u The average value of w u and n u are the non-central variance and mean, respectively, and have the following expressions:

[0045]

[0046] Among them: β1, β2∈[0,1]; further, the following formula is used to update the learning decay rate of the above two moving average functions:

[0047]

[0048] Then the parameters are updated by augmenting the deep STSR-LSTM formula:

[0049]

[0050] Data partitioning for training and testing results; The user side and the grid side must balance the 15-minute average wind power generation and demand, so they can be divided into multiple subsets; The management of the power system supply and demand balance is based on the energy production plan delivered and calculated the previous day, and generally uses 15-minute time intervals for monthly, seasonal and annual wind power forecasts;

[0051] Future time step prediction and state network update based on sampled data; use the augmented deep STSR-LSTM network and state update function to predict future time step values ​​in given time series data, and change the network state for each future prediction step to predict multiple future time step values.

[0052] In some embodiments, the parameter optimization of the augmented deep STSR-LSTM network based on the moth flame algorithm includes:

[0053] Algorithm initialization:

[0054] Parameter setting and population initialization; assuming that the moth population size is N m , the number of variables to be optimized is d, and at the same time, let the number of flames be N f , the maximum number of iterations is M; the position vector of individuals in the moth population is initialized as:

[0055] M i,j =(ub j -lb j )·rand(0,1)+lb j (i=1,2,…,N m ; j=1,2,…,d) (15)

[0056] Where: M i,j is the position of the i-th moth in the j-th search dimension; ub j and lb j Represents the upper and lower bounds of the j-th dimension search space;

[0057] Furthermore, the entire moth population can be expressed as:

[0058]

[0059] Where: k is the current iteration step, and here it is 1;

[0060] The fitness function FM is defined according to the actual optimization requirements; the initial fitness vector of the moth population is:

[0061]

[0062] Flame Position:

[0063] adaptive calculation of flame number, fitness ranking of moth populations and determination of flame positions;

[0064] In the search process of the moth flame algorithm, moths are used as the search subject, and flames are used as the set of the current optimal moth positions. The initial number N f is equal to the moth population size; since the moth position is updated toward the corresponding flame, if N f Keeping the value high will lead to a decrease in mining capacity, so the adaptive flame number shown in the following formula is introduced;

[0065]

[0066] Then, sort the fitness values ​​of the moths in ascending order and select the first N f (k) The fitness vector FF(k) of the flame generated by the member; in addition, the corresponding moth position is regarded as the position of the flame F(k);

[0067]

[0068]

[0069] Among them: FF i (i=1,2,…,N f ) is the fitness of the ith moth;

[0070] Moth Location Update:

[0071] Logarithmic spiral-based repositioning and fitness calculation;

[0072] M i (k+1)=|M i (k)-F j (k)|·e bλ ·cos(2πλ)+F j (k) (i=1,2,…,N m ; j = 1, 2, ..., N f )(twenty one)

[0073] Where: |M i –F j | is the distance from the i-th moth to the j-th flame, λ is a constant between [r,1], and the expression of r is as follows:

[0074]

[0075] After the moth position is updated, a new fitness vector FM(k+1) is obtained;

[0076] Flame position update:

[0077] Fitness ranking and elite retention;

[0078] Sort the mixed fitness function vector containing the fitness values ​​of the relocated moths and the current flame and name it FM new :

[0079] FM new =sort[FM(k+1),FF(k)] (23)

[0080] FM new The first item N in f (k) is regarded as an elite, and the flame position vector FF(k+1) is updated; in addition, the moth population M(k+1) and its fitness vector FM(k+1) are also composed of the first N m Item update;

[0081] Process judgment:

[0082] Termination condition setting and judgment;

[0083] The termination condition is that the current iteration reaches the maximum number of iterations or the search accuracy is acceptable; therefore, if any of these two conditions is met, the entire search process ends; otherwise, k=k+1, and the above steps are returned for further optimization.

[0084] In some embodiments, the performance verification of the proposed medium- and long-term wind power forecasting method includes:

[0085] Implement the code of the proposed algorithm based on Matlab, Demola, Python, and C / C++ software platforms and conduct simulation tests;

[0086] Relevant performance indicators in wind power forecasting are set, and the feasibility and effectiveness of the wind power forecasting method are verified through quantitative statistics and qualitative analysis.

[0087] Another aspect of the present invention provides a wind power prediction device, the device comprising:

[0088] Collection module, used for collecting wind turbine operation data;

[0089] Preprocessing module, used for data preprocessing based on Kalman filtering;

[0090] Building module for augmenting the construction of deep STSR-LSTM network;

[0091] Optimization module for parameter optimization of augmented deep STSR-LSTM network based on moth flame algorithm;

[0092] Verification module, used to verify the performance of the proposed medium- and long-term wind power forecasting method.

[0093] In some implementations, the acquisition module is further used to:

[0094] Assume that the output power of the wind turbine is the only output variable y, and the input variables such as terrain, altitude, temperature, wind speed, and wind direction are obtained by principal component method to screen and obtain n input variables as the final neural network model input variables {u1,u2,…,u n};

[0095] Based on the obtained input and output variables, N groups of actual operating data of wind turbines are obtained at a sampling interval T. To ensure the universality and generalization ability of the obtained prediction model, the sampling data must fully cover the operating conditions of the wind turbines in a wide load range under different environmental conditions.

[0096] Another aspect of the present invention provides an electronic device, comprising:

[0097] one or more processors;

[0098] A storage unit is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors can implement the method described above.

[0099] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program can implement the method described above when executed by a processor.

[0100] The wind power prediction method and device of the present invention are based on the new energy consumption demand of my country's new power system. In order to improve the stability of the power grid under wind power access, a wind power prediction method based on the moth flame algorithm optimized gated recursive neural network deep learning is provided to achieve accurate prediction of wind turbine power. Taking into account the current lack of research related to medium- and long-term wind power prediction, the present invention focuses on medium- and long-term wind power prediction, and proposes an augmented deep sequence to sequence long short-term memory regression (STSR-LSTM) network model to improve prediction performance, which can effectively improve the accuracy of wind power prediction. The present invention optimizes the parameters in the deep learning and neural network models used by the moth flame algorithm, thereby further ensuring the performance of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0101] Figure 1 This is a flow chart of the wind power prediction method proposed by the present invention;

[0102] Figure 2The principle block diagram of the augmented depth STSR-LSTM network constructed for the present invention;

[0103] Figure 3 This is a schematic diagram of the structure of the wind power prediction device proposed in the present invention. DETAILED DESCRIPTION

[0104] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0105] In one aspect of this embodiment, Figure 1 As shown, it relates to a wind power prediction method, the method comprising:

[0106] S1: Collection of wind turbine operation data.

[0107] S2: Data preprocessing based on Kalman filtering.

[0108] S3: Construction of augmented deep STSR-LSTM network.

[0109] S4: Parameter optimization of augmented deep STSR-LSTM network based on moth flame algorithm.

[0110] S5: Performance verification of the proposed medium- and long-term wind power forecasting method.

[0111] Since the method proposed in the present invention is essentially a data-driven modeling method, step S1 can be specifically implemented as follows:

[0112] S1.1: Assume that the output power of the wind turbine is the only output variable y. The input variables such as terrain, altitude, temperature, wind speed, and wind direction are obtained by principal component method, and then n input variables are obtained as the final neural network model input variables {u1,u2,…,u n}.

[0113] S1.2: Based on the input and output variables obtained in S1.1, N = 10,000 sets of actual operating data of wind turbines are obtained with a sampling interval of T = 15 min. To ensure the universality and generalization ability of the obtained prediction model, the sampling data must fully cover the wide load range operating conditions of the unit under different environmental conditions.

[0114] Based on the wind turbine sampling data in S1, the Kalman filter method is used for preprocessing to achieve data denoising. Kalman filtering makes the best estimate of the current state of the system through the system's measured values ​​and predicted values, which can effectively reduce the adverse effects of process noise and measurement noise. Based on this, step S2 can be concretized as follows:

[0115] S2.1: Assume that the discrete model of the wind turbine is:

[0116]

[0117] Where: x(k) is the system state variable, u(k) is the input variable at time k, y(k) is the output variable at time k, A, B, H are the system state matrix, input matrix and output matrix respectively; ξ(k) and η(k) are the system process noise and measurement noise respectively; and the error covariance matrices caused by the above two noises are assumed to be Q and R respectively;

[0118] S2.2: Considering the predicted value and detected value of the system, the Kalman filter updates the covariance matrix of the system state estimation in real time, and estimates the output at the next moment by calculating the Kalman gain; the time update formula of the Kalman filter is:

[0119]

[0120] in: is the system prior state estimate at time k, is the optimal state estimate of the system at time k-1, is the covariance matrix of the system prior state estimate at time k;

[0121] The state update formula is:

[0122]

[0123] Where: K(k) represents the Kalman filter gain, and P(k) is the posterior state estimation covariance matrix at time k.

[0124] S2.3: Estimate the output at the next moment based on the estimated prediction value of the previous step and the current detection value, and the residual between the detection output and the predicted output is:

[0125]

[0126] Based on the denoised data of S2, constructed in S3 Figure 2 The augmented deep STSR-LSTM network model is shown in Figure 1. The model has a four-layer structure, namely: sequence input layer, fully connected layer, regression output layer and deep LSTM layer. In order to improve the reliability of derived features and expected performance, statistical learning technology is introduced.

[0127] S3.1: The augmented deep STSR-LSTM network is a recurrent neural network that can establish long-term dependencies between actual and predicted read sequence data steps. The sequence input layer (SIL) and the STSR-LSTM layer are the two main components of the augmented deep STSR-LSTM network. The SIL provides the network sequence and time series data. The STSR-LSTM layer learns the long-term reliability between the data sequence steps. Let the learnable weights of each layer be the input weight X, the regression weight S, and the bias c; and the matrices X, S, and c also represent the input and regression weights and bias of the components; define the following matrix:

[0128]

[0129] Where g, j, p and h represent the forget gate, output gate, input gate and unit candidate gate respectively;

[0130] The cell position at step k is determined by the following equation:

[0131] d k =g k ⊙d k-1 +j k ⊙h k (6)

[0132] Where: ⊙ represents the Hadamard product, which is used to calculate the vector multiplication of the augmented deep STSR-LSTM network; the time step of the hidden state is estimated as:

[0133] I k =p k ⊙σ d (d k ) (7)

[0134] Where: d is the activation function; the hyperbolic tangent function is used to measure the state of the activation function in the extended depth STSR-LSTM layer, and the time step is as follows:

[0135] Input Gate:

[0136] j k =σ h (X j y k +S j I k-1 +c j ) (8)

[0137] Forget Gate:

[0138] g k =σ h (X g y k +S g Ik-1 +c g ) (9)

[0139] Unit candidate gate:

[0140] h k =σ h (X h y k +S h I k-1 +c h ) (10)

[0141] Output Gate:

[0142] p k =σ h (X p y u +S p I k-1 +c p ) (11)

[0143] S3.2: Accelerated convergence process based on Adam function; Adaptive moment estimation function Adam is used in the algorithm convergence process, which maintains the previous square gradient w u The exponential decay average of ; In addition, the Adam function can also measure the second gradient n u The average value of w u and n u are the non-central variance and mean, respectively, and have the following expressions:

[0144]

[0145] Where: β1, β2∈[0,1] (in this embodiment, β1=0.6, β2=0.4); further, the following formula is used to update the learning decay rate of the above two moving average functions:

[0146]

[0147] Then the parameters are updated by augmenting the deep STSR-LSTM formula:

[0148]

[0149] S3.3: Data partitioning for training and testing results; The user side and the grid-connected side must balance the 15-minute average wind power generation and demand, so they can be divided into multiple subsets; The management of the supply and demand balance of the power system is based on the energy production plan delivered and calculated the previous day, and generally uses 15-minute time intervals for monthly, seasonal and annual wind power forecasts.

[0150] S3.4: Future time step prediction and state network update based on sampled data; Use an augmented deep STSR-LSTM network and state update function to predict future time step values ​​in a given time series data, and change the network state for each future prediction step to make predictions for multiple future time step values. The training data parameters are used to standardize the test data. After accessing the actual time phase values ​​between the predicted values, the deep STSR-LSTM network state is updated using the measured values ​​instead of the predicted values. In addition, the network state is reset or adjusted to prevent previous predicted values ​​from affecting new data predictions.

[0151] The parameter selection of the augmented deep STSR-LSTM network model constructed in S3 is a key factor affecting the efficiency and accuracy of wind power prediction. Therefore, in step S4, the parameters of the constructed augmented deep STSR-LSTM network model are optimized by the moth flame algorithm.

[0152] The moth flame algorithm is inspired by the phototropism of moths, where each member of a moth swarm flies toward a light source at a fixed angle. The distance between the moth and the light source has a great influence on the trajectory of the moth. Taking moonlight and artificial light (such as a flame) as an example, since the moon is far enough away, the moth can travel in a straight line. 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 an optimization problem that considers the position of the light source as the optimal solution.

[0153] S4.1: Algorithm initialization: parameter setting and population initialization; assuming that the moth population size is N m (This embodiment selects N m =50). The number of variables to be optimized is d (in this embodiment, d=5). At the same time, the number of flames is N. f The initial value is 50. The maximum number of iterations is M = 30; the position vector of individuals in the moth population is initialized as:

[0154] M i,j =(ub j -lb j )·rand(0,1)+lb j (i=1,2,…,N m ; j=1,2,…,d) (15)

[0155] Where: M i,j is the position of the i-th moth in the j-th search dimension; ub j and lb j represents the upper and lower bounds of the j-th dimension search space. In this embodiment, ub1=…=ub j =1, lb1=…=lb j =-1.

[0156] Furthermore, the entire moth population can be expressed as:

[0157]

[0158] Where: k is the current iteration step, and here it is 1;

[0159] The fitness function FM is defined according to the actual optimization requirements; the initial fitness vector of the moth population is:

[0160]

[0161] S4.2: Flame position: adaptive calculation of flame number, fitness ranking of moth populations and determination of flame position.

[0162] In the search process of the moth flame algorithm, moths are used as the search subject, and flames are used as the set of the current optimal moth positions. The initial number N f is equal to the moth population size; since the moth position is updated toward the corresponding flame, if N f Keeping the value high will lead to a decrease in mining capacity, so the adaptive flame number shown in the following formula is introduced;

[0163]

[0164] Then, sort the fitness values ​​of the moths in ascending order and select the first N f (k) The fitness vector FF(k) of the flame generated by the member; in addition, the corresponding moth position is regarded as the position of the flame F(k);

[0165]

[0166]

[0167] Among them: FF i (i=1,2,…,N f ) is the fitness of the ith moth.

[0168] S4.3: Moth position updating: logarithmic spiral-based repositioning and fitness calculation.

[0169] M i (k+1)=|M i (k)-F j (k)|·e bλ ·cos(2πλ)+F j (k) (i=1,2,…,N m ; j = 1, 2, ..., N f )(twenty one)

[0170] Where: |M i -Fj | is the distance from the i-th moth to the j-th flame, λ is a constant between [r,1], and the expression of r is as follows:

[0171]

[0172] After the moth position is updated, a new fitness vector FM(k+1) is obtained.

[0173] S4.4: Flame position update: fitness ranking and elite retention.

[0174] Sort the mixed fitness function vector containing the fitness values ​​of the relocated moths and the current flame and name it FM new :

[0175] FM new =sort[FM(k+1),FF(k)] (23)

[0176] FM new The first item N in f (k) is regarded as an elite, and the flame position vector FF(k+1) is updated; in addition, the moth population M(k+1) and its fitness vector FM(k+1) are also composed of the first N m Item update;

[0177] S4.5: Process judgment: setting and judging the termination conditions.

[0178] The termination condition is that the current iteration reaches the maximum number of iterations or the search accuracy is acceptable; therefore, if any of these two conditions is met, the entire search process ends; otherwise, k=k+1, and return to step 4.2 for further optimization.

[0179] In order to verify the effectiveness of the wind power prediction method based on the moth flame algorithm optimization gated recursive neural network deep learning, numerical tests were carried out on the Matlab simulation platform. Based on this, S5 can be concretized as:

[0180] S5.1: Write code for the proposed algorithm based on Matlab and other software platforms and perform simulation tests.

[0181] S5.2: Set performance indicators related to wind power prediction accuracy and speed, namely modeling speed Ts, model output mean square error MSE and fitting degree η. The feasibility and effectiveness of the wind power prediction method designed by the present invention are verified through quantitative statistics and qualitative analysis.

[0182] The wind power prediction method of the present invention is based on the new energy consumption demand of my country's new power system. In order to improve the stability of the power grid under wind power access, a wind power prediction method based on the moth flame algorithm optimization gated recursive neural network deep learning is provided to achieve accurate prediction of wind turbine power. Taking into account the current lack of research related to medium- and long-term wind power prediction, the present invention focuses on medium- and long-term wind power prediction, and proposes an augmented deep sequence to sequence long short-term memory regression (STSR-LSTM) network model to improve prediction performance, which can effectively improve the accuracy of wind power prediction. The present invention optimizes the parameters in the deep learning and neural network models used by the moth flame algorithm, thereby further ensuring the performance of the algorithm.

[0183] Another aspect of the present invention, as Figure 3 As shown, a wind power prediction device 100 is provided, and the device 100 is applicable to the method described above. The device 100 comprises:

[0184] The collection module 110 is used for collecting the operation data of the wind turbine generator set;

[0185] A preprocessing module 120, for data preprocessing based on Kalman filtering;

[0186] Construction module 130, for building an augmented deep STSR-LSTM network;

[0187] An optimization module 140 for optimizing parameters of an augmented deep STSR-LSTM network based on a moth flame algorithm;

[0188] The verification module 150 is used to verify the performance of the proposed medium- and long-term wind power prediction method.

[0189] The wind power prediction device of the present invention is based on the new energy consumption demand of my country's new power system. In order to improve the stability of the power grid under wind power access, a wind power prediction device based on the moth flame algorithm optimization gated recursive neural network deep learning is provided to achieve accurate prediction of wind turbine power. Taking into account the current lack of research related to medium- and long-term wind power prediction, the present invention focuses on medium- and long-term wind power prediction, and proposes an augmented deep sequence to sequence long short-term memory regression (STSR-LSTM) network model to improve prediction performance, which can effectively improve the accuracy of wind power prediction. The present invention optimizes the parameters in the deep learning and neural network models used by the moth flame algorithm, thereby further ensuring the performance of the algorithm.

[0190] In some implementations, the acquisition module 110 is further configured to:

[0191] Assume that the output power of the wind turbine is the only output variable y, and the input variables such as terrain, altitude, temperature, wind speed, and wind direction are obtained by principal component method to screen and obtain n input variables as the final neural network model input variables {u1,u2,…,u n};

[0192] Based on the obtained input and output variables, N groups of actual operating data of wind turbines are obtained at a sampling interval T. To ensure the universality and generalization ability of the obtained prediction model, the sampling data must fully cover the operating conditions of the wind turbines in a wide load range under different environmental conditions.

[0193] Another aspect of the present invention provides an electronic device, comprising:

[0194] one or more processors;

[0195] A storage unit is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors can implement the method described above.

[0196] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program can implement the method described above when executed by a processor.

[0197] The computer-readable medium may be included in the apparatus, device, or system of the present invention, or may exist independently.

[0198] Among them, computer-readable storage media can be any tangible media that contains or stores a program, which can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment. More specific examples include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0199] The computer-readable storage medium may also include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code, specific examples of which include but are not limited to electromagnetic signals, optical signals, or any suitable combination thereof.

[0200] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. A wind power prediction method, characterized in that: The method comprises: Collection of wind turbine operation data; Data preprocessing based on Kalman filter; Construction of augmented deep STSR-LSTM network; Parameter optimization of augmented deep STSR-LSTM network based on moth flame algorithm; Perform performance verification on wind power prediction methods; The augmented deep STSR-LSTM network has a four-layer structure, namely a sequence input layer, a fully connected layer, a regression output layer and a deep LSTM layer; The construction of the augmented deep STSR-LSTM network includes: Assume that the learnable weights of each layer are input weights X, regression weights S, and biases c; and the matrices X, S, and c also represent the input and regression weights and biases of the components; define the following matrices: Where g, j, p and h represent the forget gate, output gate, input gate and unit candidate gate respectively; The cell position at step k is determined by the following equation: d k =g k ⊙d k-1 +j k ⊙h k (6) Where: ⊙ represents the Hadamard product, which is used to calculate the vector multiplication of the augmented deep STSR-LSTM network; the time step of the hidden state is estimated as: I k =p k ⊙σ d (d k ) (7) Where: d is the activation function; the hyperbolic tangent function is used to measure the state of the activation function in the extended depth STSR-LSTM layer, and the time step is as follows: Input Gate: j k =σ h (X j y k +S j I k-1 +c j ) (8) Forget Gate: g k =σ h (X g y k +S g I k-1 +c g ) (9) Unit candidate gate: h k =σ h (X h y k +S h I k-1 +c h ) (10) Output Gate: p k =σ h (X p y u +S p I k-1 +c p ) (11) Accelerated convergence process based on Adam function; Adaptive moment estimation function Adam is used in the algorithm convergence process, which maintains the previous square gradient w u The exponential decay average of ; In addition, the Adam function can also measure the second gradient n u The average value of w u and n u are the non-central variance and mean, respectively, and have the following expressions: Among them: β1, β2∈[0,1]; further, the following formula is used to update the learning decay rate of the above two moving average functions: Then the parameters are updated by augmenting the deep STSR-LSTM formula: Data partitioning for training and testing results; The user side and the grid side must balance the 15-minute average wind power generation and demand, so they can be divided into multiple subsets; The management of the power system supply and demand balance is based on the energy production plan delivered and calculated the previous day, using 15-minute time intervals for monthly, seasonal and annual wind power forecasts; Future time step prediction and state network update based on sampled data; use augmented deep STSR-LSTM network and state update function to predict future time step values ​​in given time series data, and change the network state for each future prediction step to predict multiple future time step values; The parameter optimization of the augmented deep STSR-LSTM network based on the moth flame algorithm includes: Algorithm initialization: Parameter setting and population initialization; assuming that the moth population size is N m , the number of variables to be optimized is d, and at the same time, let the number of flames be N f , the maximum number of iterations is M; the position vector of individuals in the moth population is initialized as: M i,j =(ub j -lb j )·rand(0,1)+lb j (i=1,2,…,N m ;j=1,2,…,d) (15) Where: M i,j is the position of the i-th moth in the j-th search dimension; ub j and lb j Represents the upper and lower bounds of the j-th dimension search space; Furthermore, the entire moth population can be expressed as: Where: k is the current iteration step, and here it is 1; The fitness function FM is defined according to the actual optimization requirements; the initial fitness vector of the moth population is: Flame Position: adaptive calculation of flame number, fitness ranking of moth populations and determination of flame positions; In the search process of the moth flame algorithm, moths are used as the search subject, and flames are used as the set of the current optimal moth positions. The initial number N f is equal to the moth population size; since the moth position is updated toward the corresponding flame, if N f Keeping the value high will lead to a decrease in mining capacity, so the adaptive flame number shown in the following formula is introduced; Then, sort the fitness values ​​of the moths in ascending order and select the first N f (k) The fitness vector FF(k) of the flame generated by the member; in addition, the corresponding moth position is regarded as the position of the flame F(k); Among them: FF i (i=1,2,…,N f ) is the fitness of the ith moth; Moth Location Update: Logarithmic spiral-based repositioning and fitness calculation; M i (k+1)=|M i (k)-F j (k)|·e bλ ·cos(2πλ)+F j (k)(i=1,2,…,N m ;j=1,2,…,N f ) (21) Where: |M i –F j | is the distance from the ith moth to the jth flame, λ is a constant between [r,1], and the expression of r is as follows: After the moth position is updated, a new fitness vector FM(k+1) is obtained; Flame position update: Fitness ranking and elite retention; Sort the mixed fitness function vector containing the fitness values ​​of the relocated moths and the current flame and name it FM new : FM new =sort[FM(k+1),FF(k)] (23) FM new The first item N in f (k) is regarded as an elite, and the flame position vector FF(k+1) is updated; in addition, the moth population M(k+1) and its fitness vector FM(k+1) are also composed of the first N m Item update; Process judgment: Termination condition setting and judgment; The termination condition is that the current iteration reaches the maximum number of iterations or the search accuracy is acceptable; therefore, if any of these two conditions is met, the entire search process ends; otherwise, k=k+1, and the above steps are returned for further optimization.

2. The method according to claim 1, characterized in that The collection of wind turbine operation data includes: Assume that the output power of the wind turbine is the only output variable y, and the input variables of terrain, altitude, temperature, wind speed and wind direction are obtained by principal component method, and then n input variables are obtained as the final neural network model input variables {u1,u2,…,u n }; Based on the obtained input and output variables, N groups of actual operating data of wind turbines are obtained at a sampling interval T. To ensure the universality and generalization ability of the obtained prediction model, the sampling data must fully cover the operating conditions of the wind turbines in a wide load range under different environmental conditions.

3. The method according to claim 1, characterized in that The data preprocessing based on Kalman filtering includes: Assume that the discrete model of the wind turbine is: Where: x(k) is the system state variable, u(k) is the input variable at time k, y(k) is the output variable at time k, A, B, H are the system state matrix, input matrix and output matrix respectively; ξ(k) and η(k) are the system process noise and measurement noise respectively; and the error covariance matrices caused by the above two noises are assumed to be Q and R respectively; Considering the predicted value and detected value of the system, the Kalman filter updates the covariance matrix of the system state estimation in real time, and estimates the output at the next moment by calculating the Kalman gain; the time update formula of the Kalman filter is: in: is the system prior state estimate at time k, is the optimal state estimate of the system at time k-1, is the covariance matrix of the system prior state estimate at time k; The state update formula is: Where: K(k) represents the Kalman filter gain, P(k) is the posterior state estimation covariance matrix at time k; The output at the next moment is estimated based on the estimated prediction value of the previous step and the current detection value, and the residual between the detection output and the predicted output is:

4. The method according to any one of claims 1 to 3, characterized in that: The performance verification of the wind power prediction method includes: Implement the code of the proposed algorithm based on Matlab, Demola, Python, and C / C++ software platforms and conduct simulation tests; Relevant performance indicators for wind power forecasting are set, and the feasibility and effectiveness of the wind power forecasting method are verified through quantitative statistics and qualitative analysis.

5. A wind power prediction device, characterized in that: The device comprises: Collection module, used for collecting wind turbine operation data; Preprocessing module, used for data preprocessing based on Kalman filtering; Building module for augmenting the construction of deep STSR-LSTM network; Optimization module for parameter optimization of augmented deep STSR-LSTM network based on moth flame algorithm; A verification module, used to verify the performance of the wind power prediction method; The augmented deep STSR-LSTM network has a four-layer structure, namely a sequence input layer, a fully connected layer, a regression output layer and a deep LSTM layer; The building blocks are specifically used for: Assume that the learnable weights of each layer are input weights X, regression weights S, and biases c; and the matrices X, S, and c also represent the input and regression weights and biases of the components; define the following matrices: Where g, j, p and h represent the forget gate, output gate, input gate and unit candidate gate respectively; The cell position at step k is determined by the following equation: d k =g k ⊙d k-1 +j k ⊙h k (6) Where: ⊙ represents the Hadamard product, which is used to calculate the vector multiplication of the augmented deep STSR-LSTM network; the time step of the hidden state is estimated as: I k =p k ⊙σ d (d k ) (7) Where: d is the activation function; the hyperbolic tangent function is used to measure the state of the activation function in the extended depth STSR-LSTM layer, and the time step is as follows: Input Gate: j k =σ h (X j y k +S j I k-1 +c j ) (8) Forget Gate: g k =σ h (X g y k +S g I k-1 +c g ) (9) Unit candidate gate: h k =σ h (X h y k +S h I k-1 +c h ) (10) Output Gate: p k =σ h (X p y u +S p I k-1 +c p ) (11) Accelerated convergence process based on Adam function; Adaptive moment estimation function Adam is used in the algorithm convergence process, which maintains the previous square gradient w u The exponential decay average of ; In addition, the Adam function can also measure the second gradient n u The average value of w u and n u are the non-central variance and mean, respectively, and have the following expressions: Among them: β1, β2∈[0,1]; further, the following formula is used to update the learning decay rate of the above two moving average functions: Then the parameters are updated by augmenting the deep STSR-LSTM formula: Data partitioning for training and testing results; The user side and the grid side must balance the 15-minute average wind power generation and demand, so they can be divided into multiple subsets; The management of the power system supply and demand balance is based on the energy production plan delivered and calculated the previous day, using 15-minute time intervals for monthly, seasonal and annual wind power forecasts; Future time step prediction and state network update based on sampled data; use augmented deep STSR-LSTM network and state update function to predict future time step values ​​in given time series data, and change the network state for each future prediction step to predict multiple future time step values; The optimization module is specifically used for: Algorithm initialization: Parameter setting and population initialization; assuming that the moth population size is N m , the number of variables to be optimized is d, and at the same time, let the number of flames be N f , the maximum number of iterations is M; the position vector of individuals in the moth population is initialized as: M i,j =(ub j -lb j )·rand(0,1)+lb j (i=1,2,…,N m ;j=1,2,…,d) (15) Where: M i,j is the position of the i-th moth in the j-th search dimension; ub j and lb j Represents the upper and lower bounds of the j-th dimension search space; Furthermore, the entire moth population can be expressed as: Where: k is the current iteration step, and here it is 1; The fitness function FM is defined according to the actual optimization requirements; the initial fitness vector of the moth population is: Flame Position: adaptive calculation of flame number, fitness ranking of moth populations and determination of flame positions; In the search process of the moth flame algorithm, moths are used as the search subject, and flames are used as the set of the current optimal moth positions. The initial number N f is equal to the moth population size; since the moth position is updated toward the corresponding flame, if N f Keeping the value high will lead to a decrease in mining capacity, so the adaptive flame number shown in the following formula is introduced; Then, sort the fitness values ​​of the moths in ascending order and select the first N f (k) The fitness vector FF(k) of the flame generated by the member; in addition, the corresponding moth position is regarded as the position of the flame F(k); Among them: FF i (i=1,2,…,N f ) is the fitness of the ith moth; Moth Location Update: Logarithmic spiral-based repositioning and fitness calculation; M i (k+1)=|M i (k)-F j (k)|·e bλ ·cos(2πλ)+F j (k)(i=1,2,…,N m ;j=1,2,…,N f )(21) Where: |M i –F j | is the distance from the ith moth to the jth flame, λ is a constant between [r,1], and the expression of r is as follows: After the moth position is updated, a new fitness vector FM(k+1) is obtained; Flame position update: Fitness ranking and elite retention; Sort the mixed fitness function vector containing the fitness values ​​of the relocated moths and the current flame and name it FM new : FM new =sort[FM(k+1),FF(k)] (23) FM new The first item N in f (k) is regarded as an elite, and the flame position vector FF(k+1) is updated; in addition, the moth population M(k+1) and its fitness vector FM(k+1) are also composed of the first N m Item update; Process judgment: Termination condition setting and judgment; The termination condition is that the current iteration reaches the maximum number of iterations or the search accuracy is acceptable; therefore, if any of these two conditions is met, the entire search process ends; otherwise, k=k+1, and the above steps are returned for further optimization.

6. The device according to claim 5, characterized in that The acquisition module is also specifically used for: Assume that the output power of the wind turbine is the only output variable y, and the input variables of terrain, altitude, temperature, wind speed and wind direction are obtained by principal component method, and then n input variables are obtained as the final neural network model input variables {u1,u2,…,u n }; Based on the obtained input and output variables, N groups of actual operating data of wind turbines are obtained at a sampling interval T. To ensure the universality and generalization ability of the obtained prediction model, the sampling data must fully cover the operating conditions of the wind turbines in a wide load range under different environmental conditions.

7. An electronic device, characterized in that: include: one or more processors; A storage unit, used to store 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 any one of claims 1 to 4.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 can be implemented.

Citation Information

Patent Citations

  • Reactive power optimization control method of distribution network

    CN108808693A

  • A method for forecasting annual electric load by using moth flame optimization algorithm

    CN109325609A