A wind farm wind condition prediction method based on neural network
By introducing convolution modules, recurrent neural network modules, attention mechanism modules and full connection modules into the timing prediction model, the problem of difficulty in capturing semantic correlation information in the existing technology is solved, and more accurate wind conditions prediction is achieved in the wind farm.
Patent Information
- Application Number
- CN202311325594.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2025-03-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing deep learning-based timing prediction models are not effective when predicting wind conditions in wind farms, and it is difficult to capture semantic correlation information between long time series.
A wind condition prediction method based on neural network is adopted, including convolutional module, recurrent neural network module, attention mechanism module and full connection module. Through these modules, multi-level feature extraction and analysis of timing data is performed to generate prediction results.
This method can accurately capture semantic correlation information between long time series, significantly improving the accuracy of wind conditions prediction in wind farms.
Smart Images

Figure CN117371594B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of time series prediction, and in particular to a method for predicting wind conditions in a wind farm based on a neural network. Background Art
[0002] Time series forecasting can predict the development trend of future data by analyzing the changing patterns of historical data. This helps enterprises, governments and other organizations to formulate corresponding strategies and measures to deal with possible risks and opportunities in advance. Based on the results of time series forecasting, decision makers can more accurately evaluate the possible results and impacts of different decision plans, so as to make more scientific and effective decisions. Time series forecasting can also help us understand possible scenarios in the future, thereby reducing risks caused by information asymmetry and uncertainty. Time series forecasting has a wide range of applications in many fields, such as finance, meteorology, sales, energy, etc.
[0003] In the early days, the models used for time series prediction were mainly statistical learning models. Traditional statistical learning models, such as ARMA (Autoregressive moving average model), ARIMA (Autoregressive Integrated Moving Average model), Hidden Markov Model, Random Walk, etc., once dominated the field of time series prediction due to their relatively mature models and strong interpretability. With the enrichment of data resources and the improvement of hardware computing power, the current models used for time series prediction are mainly machine learning models and deep learning models. Traditional statistical learning models are linear models, and their ability to fit and predict nonlinear time series data is limited. In addition, these models are not effective in processing large-scale, high-dimensional data, and practical problems are difficult to meet the assumptions of traditional statistical learning models. Artificial neural networks have shown performance superior to traditional machine learning models in computer vision, natural language processing, speech recognition and other fields. With the rapid development of artificial intelligence with deep learning as the core, the use of neural networks for time series prediction has become a research direction that has attracted much attention. However, existing time series prediction models based on deep learning have poor prediction results, limited ability to capture semantic correlation information between longer time series, and cannot fully utilize the computing power of neural networks and the information of time series data. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a wind farm wind condition prediction method based on a neural network, which can accurately capture the semantic association information between longer time series and obtain relatively accurate prediction results.
[0005] The technical solution adopted by the present invention to solve the technical problem is: to provide a wind farm wind condition prediction method based on a neural network, comprising the following steps:
[0006] Obtain the timing data to be tested;
[0007] The time series data to be tested is put into a time series prediction model to obtain a prediction result; wherein the time series prediction model includes:
[0008] The convolution module extracts features from the input time series data to obtain a first feature vector;
[0009] A recurrent neural network module extracts the sequence characteristics of the time series data based on the first feature vector to obtain a second feature vector;
[0010] An attention mechanism module, which uses an attention mechanism to analyze the second feature vector to obtain a third feature vector;
[0011] A fully connected module generates a prediction result according to the third feature vector.
[0012] Furthermore, the attention mechanism module includes a first normalization layer, which performs layer normalization processing on the input data and outputs it to the attention mechanism layer. The attention mechanism layer analyzes the data output by the first normalization layer, and outputs the analysis result after layer normalization processing via a second normalization layer. The first normalization layer and the second normalization layer are residually connected.
[0013] Furthermore, the time series prediction model also includes a batch normalization module, which is placed between the convolution module and the recurrent neural network module, and is used to standardize the data output by the convolution module and output it to the recurrent neural network module.
[0014] Furthermore, the convolution module is a convolutional neural network.
[0015] Furthermore, the convolutional neural network adopts a GELU activation function.
[0016] Furthermore, the recurrent neural network module is a bidirectional long short-term memory network.
[0017] Furthermore, the attention mechanism module is constructed based on a multi-head self-attention mechanism.
[0018] Furthermore, the fully connected module includes no less than two fully connected layers.
[0019] Furthermore, the fully connected layer adopts a GELU activation function.
[0020] Furthermore, between the step of acquiring the time series data to be tested and the step of placing the time series data to be tested into the time series prediction model, there is also a step of preprocessing the time series data to be tested, including:
[0021] The number of feature dimensions of the time series data to be tested is processed to be the same as the preset number by using PCA dimensionality reduction and feature construction;
[0022] Based on the time series data to be tested processed in the previous step, the time series feature data is constructed using Min-Max standardization and sliding window method;
[0023] The time series characteristic data is output.
[0024] Beneficial Effects
[0025] Due to the adoption of the above technical solution, the present invention has the following advantages and positive effects compared with the prior art:
[0026] (1) The present invention adopts multi-level feature extraction in the time series prediction model. Convolutional neural networks have excellent spatial automatic clustering and feature extraction capabilities and can obtain local features from raw data. The present invention captures the spatial characteristics of time series fluctuations in time series data through convolution and pooling operations, which is conducive to extracting the overall dynamics and potential laws of the environment in the short term.
[0027] (2) The present invention introduces long-sequence dependency and memory capabilities into the time series prediction model. As a special recurrent neural network (RNN), the long short-term memory network (LSTM) can capture the dependency relationship in long sequences. By introducing the long short-term memory network, the long-term dependency effect in time series data can be effectively processed, which is conducive to mining the interaction between time series data and the environment and discovering potential prediction signals.
[0028] (3) The present invention introduces a selective attention mechanism into the time series prediction model. The attention mechanism can assign different attention weights according to different parts of the input data. In the time series prediction process, the attention mechanism can adaptively discover key information closely related to the prediction target, thereby improving the prediction accuracy.
[0029] (4) The present invention achieves end-to-end learning. The time series prediction model constructed by the present invention can directly convert the input data into the final time series prediction results, and the optimization parameters in the whole process can be learned in an end-to-end manner. During the training process, the network can automatically learn the features of different levels in the whole sequence, making the model more efficient and accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 is a flow chart of the present invention;
[0031] Figure 2 It is a schematic diagram of the structure of the present invention;
[0032] Figure 3 Result diagram of comparative experiment in the embodiment of the present invention. DETAILED DESCRIPTION
[0033] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.
[0034] The embodiment of the present invention relates to a time series prediction method based on a neural network, such as Figure 1 As shown, the following steps are included:
[0035] Obtain the timing data to be tested;
[0036] The time series data to be tested is put into a time series prediction model to obtain a prediction result; wherein the time series prediction model includes:
[0037] The convolution module extracts features from the input time series data to obtain a first feature vector;
[0038] A recurrent neural network module extracts the sequence characteristics of the time series data based on the first feature vector to obtain a second feature vector;
[0039] An attention mechanism module obtains a third eigenvector based on the second eigenvector using an attention mechanism analysis;
[0040] The fully connected module generates prediction results based on the third eigenvector.
[0041] First, we train the time series prediction model, which includes the following steps:
[0042] A1. Obtain training data. You can process time series data into 16 feature dimensions through pre-processing methods such as PCA dimensionality reduction and feature construction.
[0043] A2. Preprocess the training data, including constructing time series feature data using Min-Max normalization and sliding window method.
[0044] A3. Obtain a pre-established time series prediction model, load the above training data into the model, and obtain the prediction results.
[0045] A4. Perform model training based on the real label annotation.
[0046] Then, the time series forecasting model is used for forecasting, which includes the following steps:
[0047] B1. Obtain time series test data. You can process the time series data into 16 feature dimensions through pre-processing methods such as PCA dimensionality reduction and feature construction. The processing method is consistent with the training data processing method.
[0048] B2. Preprocess the above training data, including Min-Max normalization and sliding window method to construct time series feature data.
[0049] B3. Obtain the trained time series prediction model, load the above training data into the model, and obtain the prediction results of each closing price.
[0050] B4. Calculate the test result indicators such as RMSE, MSE, MAE, MAPE, and R2 based on the true label annotation.
[0051] like Figure 2 As shown, the time series prediction model in this embodiment is specifically described below.
[0052] Convolutional module:
[0053] Used to extract features from input time series data to obtain a first feature vector;
[0054] It includes a one-dimensional convolution layer Conv_ld, which has 16 input channels, 32 output channels, a convolution kernel size of 3, a padding of 1, a stride of 1, and a GELU activation function.
[0055] Batch Normalization Module:
[0056] It is used to standardize the data output by the convolution module and then output it to the recurrent neural network module;
[0057] It includes a one-dimensional batch normalization layer BN_ld, and the number of input channels of the one-dimensional batch normalization layer BN_ld is 32.
[0058] Recurrent Neural Network Module:
[0059] Used to extract the sequence characteristics of the time series data based on the first feature vector to obtain a second feature vector;
[0060] It includes a bidirectional long short-term memory network BiLSTM, which has 32 input channels, 32 hidden layer size, 2 layers, and a neuron inactivation rate of 0.2.
[0061] Attention mechanism module:
[0062] Used to obtain the third eigenvector based on the second eigenvector using the attention mechanism;
[0063] The attention mechanism module includes a first normalization layer LN_01, which performs layer normalization processing on the input data and outputs it to the multi-head self-attention mechanism layer MHSA, and the multi-head self-attention mechanism layer MHSA analyzes the data output by the first normalization layer LN_01, and outputs the analysis result after layer normalization processing via the second normalization layer LN_02, wherein the first normalization layer LN_01 is residually connected with the second normalization layer LN_02;
[0064] Among them, the number of input channels of the first normalization layer LN_01 and the second normalization layer LN_02 is 64, and the number of attention heads of the multi-head attention mechanism layer MHSA is 8.
[0065] Fully connected modules:
[0066] generating a prediction result according to the third eigenvector;
[0067] The fully connected module includes a first fully connected layer Linear_01 and a second fully connected layer Linear_02;
[0068] Among them, the first fully connected layer Linear_01 has 512 input channels and 16 output channels, the second fully connected layer Linear_02 has 16 input channels and 1 output channel, and both fully connected layers use the GELU activation function.
[0069] When the above time series prediction model receives the time series data to be tested, it first applies the convolution layer for feature extraction to improve the ability to process and understand the data. Then the batch normalization layer is used to process the output of the convolution layer to make the input data distribution more stable, so that the training process becomes smoother, the gradient descent speed is accelerated, and the model is easier to converge. Then the GELU activation function is used to process the output to improve the nonlinear expression ability of the model. Next, a bidirectional long short-term memory neural network is used to model the data in order to capture the long-term dependencies of the time series. Since the bidirectional long short-term memory neural network adds a reverse layer, it can consider both historical and future information at the same time, so it performs well in many sequence data modeling tasks. Then the attention mechanism is introduced to improve the model's recognition ability and accuracy of long-term dependencies. The attention mechanism used in the experiment is the self-attention mechanism, which generates the corresponding query vector, key vector, and value vector based on the input information, and then calculates the attention distribution. When calculating the attention, the residual connection is used to allow the network to capture the span changes between different layers, so that even if the number of network layers is very deep, it can easily learn the same transformation of the previous layer or pass the transformation to the next layer. This connection can effectively reduce the problem of gradient vanishing and gradient exploding, improve the stability and efficiency of the network, and make the network converge more easily. Subsequently, the sequence information is processed using layer normalization in the feature dimension, so that the features in the network are independent of each other and not affected by the batch size, making the back propagation of the network more stable and reducing the problem of gradient vanishing and gradient exploding. Finally, a fully connected layer is used to map the sequence information to the corresponding target information dimension to obtain the prediction result.
[0070] In practice, the wind farm wind condition data set of the Baidu Paddle Platform is used for prediction. The data set comes from all the data on January 18, 2017. The data is recorded every 30 seconds, including the four characteristics of the inverter grid-side active power, external temperature, wind direction, and wind speed at the current moment. The total amount of data is 2880. The data training set and test set are divided in a ratio of 4:1. The comparison test results are as follows: Figure 3 As shown in the results, it can be seen that the time series prediction model CNN-LSTM-Attention in this embodiment has a significant improvement in prediction accuracy on the test set compared with baseline models such as multi-layer perceptron (MLP), support vector regression (SVR), and extreme gradient boosting decision tree (XGBoost).
[0071] In summary, this model that uses convolutional neural networks (CNNs), long short-term memory neural networks, and attention mechanisms for time series prediction has strong advantages and can perform well in various time series prediction tasks. At the same time, by combining different types of neural networks and taking advantage of their respective advantages, the model's prediction ability can be further improved.
Claims
1. A wind farm wind condition prediction method based on neural network, characterized in that: The following steps are involved: Acquire time series data to be measured, wherein the time series data to be measured includes time series data of the outside temperature, wind direction, wind speed of the wind farm, and active power on the grid side of the inverter; The time series data to be measured is placed in a time series prediction model to obtain the prediction results of the outside temperature, wind direction, wind speed, and active power of the inverter grid side of the wind farm; wherein the time series prediction model includes: A convolution module extracts features from the input time series data to obtain a first feature vector; the convolution module is a convolutional neural network, and the convolutional neural network uses a GELU activation function; A recurrent neural network module extracts the sequence characteristics of the time series data based on the first feature vector to obtain a second feature vector; A batch normalization module, which is placed between the convolution module and the recurrent neural network module, and is used to normalize the data output by the convolution module and then output it to the recurrent neural network module; An attention mechanism module, which uses an attention mechanism to analyze the second feature vector to obtain a third feature vector; the attention mechanism module includes a first normalization layer, the first normalization layer performs layer normalization processing on the input data and outputs it to the attention mechanism layer, the attention mechanism layer analyzes the data output by the first normalization layer, and outputs the analysis result after layer normalization processing via a second normalization layer, and the first normalization layer is residually connected to the second normalization layer; A fully connected module generates a prediction result according to the third feature vector.
2. The method for predicting wind conditions in a wind farm based on a neural network according to claim 1, characterized in that: The recurrent neural network module is a bidirectional long short-term memory network.
3. The method for predicting wind conditions in a wind farm based on a neural network according to claim 1, characterized in that: The attention mechanism module is built based on a multi-head self-attention mechanism.
4. The method for predicting wind conditions in a wind farm based on a neural network according to claim 1, characterized in that: The fully connected module includes no less than two fully connected layers.
5. The method for predicting wind conditions in a wind farm based on a neural network according to claim 4, characterized in that: The fully connected layer adopts the GELU activation function.
6. The method for wind farm wind condition prediction based on neural network according to claim 1, characterized in that: Between the step of acquiring the time series data to be tested and the step of placing the time series data to be tested into the time series prediction model, a step of preprocessing the time series data to be tested is also included, including: PCA dimension reduction and feature construction are used to process the number of feature dimensions of the time series data to be tested to be the same as the preset number; based on the time series data to be tested processed in the previous step, the Min-Max standardization and sliding window method are used to construct the time series data. Sequential feature data; The time series characteristic data is output.
Citation Information
Patent Citations
Mixed time period mode multivariable time sequence prediction method based on neural network
CN114004338A
Multivariate time series prediction method and system for Internet of Things
CN115759461A