Disclosure of Invention
Aiming at the problems, the ultra-short-term wind power prediction method and device based on CEEMD and CNN-LSTM models are provided, the CEEMD is adopted to perform modal decomposition on wind power time sequences, and then the CNN-LSTM models are used to perform feature extraction and prediction on each decomposed wind power time sequence to obtain a predicted value, so that the problems of modal aliasing of the EMD decomposition method and large EEMD reconstruction errors are solved, and the accuracy and the prediction efficiency of the models are improved.
The first aspect of the application provides an ultra-short-term wind power prediction method based on CEEMD and CNN-LSTM models, comprising the following steps:
acquiring wind power data of a wind power plant, preprocessing the wind power data, and determining a wind power time sequence, wherein the preprocessing comprises the steps of supplementing missing values, eliminating abnormal points and normalizing;
decomposing the wind power time sequence according to CEEMD, and determining an inherent mode average component;
carrying out feature extraction and prediction on the natural mode average component and the observed data according to a CNN-LSTM model, and outputting a predicted value;
and superposing the predicted values to determine a predicted result.
Optionally, the decomposing the wind power time sequence according to CEEMD, and determining an intrinsic mode average component includes:
adding white noise into an initial signal, and determining a mixed signal, wherein the white noise comprises positive random white noise and negative random white noise;
EMD (empirical mode decomposition) is carried out on the mixed signal, and an intrinsic mode function component and a residual wave are determined;
repeating the steps until the times of adding the white noise reach the preset times, carrying out set average on the intrinsic mode function components obtained through EMD decomposition of the preset times, and determining the intrinsic mode average components.
Optionally, the mixed signal is determined with the following formula:
wherein ,
is the mixed signal, u
i (t) is the white noise added the i-th time, x (t) is the initial signal, ζ
0 Is the noise amplitude, q takes 1 and 2.
Optionally, the natural mode function component and the residual wave are determined according to the following formula:
wherein ,
for the natural mode function component, +.>
K is the order of the eigenmode function, and K is the number of the intrinsic mode IMFs.
Optionally, the natural mode average component is determined according to the following formula:
wherein ,
and 2M is the preset times for the natural mode average component.
Optionally, the convolutional neural network CNN in the CNN-LSTM model is composed of a one-dimensional convolutional layer, a pooling layer and a Dropout layer, and the neural network LSTM is composed of an LSTM layer and a full connection layer.
Optionally, the CNN-LSTM model performs feature extraction and prediction on the natural modal average component and the observed data through the following modules, including:
a cellular state, which is used to preserve previously persisted important information, formulated as:
the forgetting door is used for determining the removal and the retention of information in the cell state of the upper layer, and is formulated as follows:
f t =σ·(W c [h t-1 ,x t ]+b f );
the input gate is used for processing the input of the current sequence position, determining information to be updated, updating the cell state, and formulating as:
i t =σ·(W i [h t-1 ,x t ]+b i );
the output gate is used for selectively outputting the important information stored in the cell state, and the output gate is formulated as follows:
o t =σ·(W o [h t-1 ,x t ]+b o );
wherein ,f
t I is a forgetful door
t O is an input door
t For the output gate, σ () is a sigmoid function, tanh () is a hyperbolic tangent function, W
f 、W
i 、W
c 、W
o As a weight matrix, h
t-1 X is the predicted value of the previous moment
t Is at presentTime of day input, b
f 、b
i 、b
c 、b
o As a result of the bias term,
c is the state of the cell at the current moment
t For the updated cell status, C
t-1 The cell status was all the previous time.
Optionally, the predicted value is output with the following formula:
h t =o t *tanh(C t ),
wherein ,ht And the predicted value is the predicted value of the current moment.
The second aspect of the application proposes an ultra-short-term wind power prediction device based on CEEMD and CNN-LSTM models, comprising:
the preprocessing module is used for acquiring wind power data of a wind power plant, preprocessing the wind power data and determining a wind power time sequence, wherein the preprocessing comprises the steps of supplementing missing values, eliminating abnormal points and normalizing;
the CEEMD decomposition module is used for decomposing the wind power time sequence according to CEEMD and determining an inherent mode average component;
the prediction module is used for carrying out feature extraction and prediction on the inherent modal average component and the observed data according to a CNN-LSTM model and outputting a predicted value;
and the superposition module is used for superposing the predicted values and determining a predicted result.
A third aspect of the present application proposes a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method according to any of the first aspects described above when executing the computer program.
The technical scheme provided by the embodiment of the application at least brings the following beneficial effects:
the method has the advantages that the CEEMD is adopted to perform modal decomposition on the wind power time sequences, the CNN-LSTM model is used to perform feature extraction and prediction on each decomposed wind power time sequence, a predicted value is obtained, the problem of modal aliasing of an EMD decomposition method and the problem of large EEMD reconstruction errors are solved, the accuracy and the prediction efficiency of the model are improved, and safe operation and economic dispatching of a power grid are realized.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and intended for the purpose of explaining the present application and are not to be construed as limiting the present application.
According to the prediction principle, the wind power prediction method can be divided into a physical method, a statistical analysis method and a learning-based method. The physical method is mainly a method for predicting by utilizing physical information around a wind farm and weather information obtained according to a weather forecast system. The physical method has the advantages that the support of historical wind power data is not needed, and the method has the defects that the method is very sensitive to initial parameters, such as the description information of the terrain, and if the initial parameters are wrong, larger prediction errors can be caused. The statistical analysis method needs a large amount of historical wind power data or historical wind speed data for statistical analysis, and common statistical analysis methods include artificial neural networks, support vector machines, kalman filtering and the like, and prediction is further performed by learning rules contained in the historical data. The statistical method has the advantages that on the premise that the amount of the historical data is enough, the prediction error can be minimized as much as possible, namely, the method has higher prediction precision, and the disadvantage that a large amount of historical data is needed to support for model learning.
The deep learning model in the statistical analysis method is improved, so that model prediction accuracy is improved, and safe operation and economic dispatch of the power grid are realized.
FIG. 1 is a flowchart illustrating an ultra-short term wind power prediction method based on CEEMD and CNN-LSTM models, according to an exemplary embodiment of the present application, comprising:
step 101, obtaining wind power data of a wind power plant, preprocessing the wind power data, and determining a wind power time sequence, wherein the preprocessing comprises deletion value supplementing, abnormal point eliminating and normalization processing.
In the embodiment of the application, the wind power data initially acquired is often missing and abnormal, so that the wind power data is optimized first.
The system loses a large amount of useful information due to the fact that wind power data are missing, uncertainty of the system is more remarkable, deterministic components in the system are harder to grasp, the excavation process is disordered due to the fact that data containing null values are included, unreliable output is caused, and therefore missing values are needed to be supplemented.
In the embodiment of the application, the missing value is filled in by mixing a plurality of filling modes such as manual filling, special value filling, average value filling, nearby filling and the like.
Secondly, processing the abnormal value in the wind power data, and eliminating the abnormal point in the embodiment of the application.
And (3) carrying out the supplement of the missing values and the elimination of the abnormal points on the wind power data, and carrying out the normalization processing on the processed wind power data so as to facilitate the subsequent algorithm to process the wind power data.
And 102, decomposing the wind power time sequence according to CEEMD, and determining an inherent mode average component.
In this embodiment, CEEMD is to add white noise to an original signal and subtract white noise from the original signal, and then average the two signals through EMD to cancel noise added to the signals.
In the embodiment of the application, the specific process of determining the natural mode average component is as follows:
first, white noise is added to an initial signal, and a mixed signal is determined, wherein the white noise includes positive random white noise and negative random white noise.
Wherein the mixed signal is determined by the following formula:
wherein ,
is a mixed signal, u
i (t) is the ith added white noise, x (t) is the initial signal, ζ
0 Is the noise amplitude, q takes 1 and 2.
And secondly, after determining the mixed signals, respectively performing empirical mode EMD decomposition on the mixed signals, and determining the intrinsic mode function components and residual waves of the mixed signals.
The process of decomposing the natural mode function component and the residual wave by the mixed signal is as follows:
wherein ,
is an intrinsic mode function component->
Is the residual wave, K is the order of the eigenmode function, and K isNumber of intrinsic mode IMFs. />
Repeating the steps until the number of times of adding white noise reaches the preset number of times, carrying out set average on the intrinsic mode function components obtained through EMD decomposition of the preset number of times, and determining the intrinsic mode average components.
The method comprises the following steps:
wherein ,
and 2M is the preset times as the natural mode average component, and the average of the IMF component sets of each order is the CEEMD decomposition result.
In the embodiment of the application, 100 is taken by 2M.
And step 103, carrying out feature extraction and prediction on the natural mode average component and the observed data according to the CNN-LSTM model, and outputting a predicted value.
In the embodiment of the application, the observation data are related data such as meteorological data and unit running state data.
The CNN in the CNN-LSTM model consists of a one-dimensional convolution layer, a pooling layer and a Dropout layer, and the LSTM consists of an LSTM layer and a full connection layer.
Each memory cell of the LSTM includes a cell state, a forgetting gate, an input gate, and an output gate, and the modules are described in detail below.
The cell state is used to preserve previously persisted important information formulated as:
the forgetting gate is used for determining the removal and retention of information in the state of the last layer of cells, and is formulated as follows:
f t =σ·(W c [h t-1 ,x t ]+b f );
the input gate is used for processing the input of the current sequence position, determining the information to be updated, and updating the cell state, and the method is formulated as:
i t =σ·(W i [h t-1 ,x t ]+b i );
the output gate is used for selectively outputting important information stored in the cell state, and the equation is as follows:
o t =σ·(W o [h t-1 ,x t ]+b o );
wherein ,f
t I is a forgetful door
t O is an input door
t For the output gate, σ () is a sigmoid function, tanh () is a hyperbolic tangent function, W
f 、W
i 、W
c 、W
o As a weight matrix, h
t-1 X is the predicted value of the previous moment
t B for current time input
f 、b
i 、b
c 、b
o As a result of the bias term,
c is the state of the cell at the current moment
t C for updated cell status
t-1 The cell state was the last moment.
Finally, outputting a final output result at the current moment, namely a predicted value, through the output gate and the updated cell state, wherein the specific process is as follows:
h t =o t *tanh(C t ),
wherein ,ht Is the predicted value of the current moment.
And 104, superposing the predicted values to determine a predicted result.
In the embodiment of the application, output predicted values of the average components of all the natural modes are overlapped to obtain a predicted result.
According to the embodiment of the application, the CEEMD is adopted to perform modal decomposition on the wind power time series, and then the CNN-LSTM model is used to perform feature extraction and prediction on each decomposed wind power time series to obtain the predicted value, so that the problem of modal aliasing of an EMD decomposition method and the problem of large EEMD reconstruction error are solved, the accuracy and the prediction efficiency of the model are improved, and safe operation and economic dispatching of a power grid are realized.
FIG. 2 is a block diagram of an ultra-short term wind power prediction apparatus 200 based on CEEMD and CNN-LSTM models, according to an exemplary embodiment of the present application, comprising: the preprocessing module 210, the CEEMD decomposition module 320, the prediction module 230, and the superposition module 240.
The preprocessing module 210 is configured to obtain wind power data of a wind farm, perform preprocessing on the wind power data, and determine a wind power time sequence, where the preprocessing includes deletion value alignment, abnormal point rejection, and normalization;
the CEEMD decomposition module 220 is configured to decompose the wind power time sequence according to CEEMD, determine an intrinsic mode average component, and determine an intrinsic mode average component;
the prediction module 230 is configured to perform feature extraction and prediction on the natural mode average component and the observed data according to the CNN-LSTM model, and output a predicted value;
and the superposition module 240 is configured to superimpose the predicted values and determine a predicted result.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
FIG. 3 illustrates a schematic block diagram of an example electronic device 300 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 3, the apparatus 300 includes a computing unit 301 that can perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 302 or a computer program loaded from a storage unit 303 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the device 300 may also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other by a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Various components in device 300 are connected to I/O interface 305, including: an input unit 306 such as a keyboard, a mouse, etc.; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, an optical disk, or the like; and a communication unit 309 such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 301 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 301 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the respective methods and processes described above, such as a voice instruction response method. For example, in some embodiments, the voice instruction response method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 300 via the ROM 302 and/or the communication unit 309. When the computer program is loaded into RAM 303 and executed by computing unit 301, one or more steps of the voice instruction response method described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the voice instruction response method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.