Offshore wind power output prediction method, system, device and medium
Through the combined method of deep learning and machine learning, the spatiotemporal characteristics of wind power output data are extracted and fused, which solves the problem that traditional wind power power prediction methods are difficult to capture spatiotemporal correlations, and achieves higher prediction accuracy and stability.
Patent Information
- Application Number
- CN202411841747.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-12-13
AI Technical Summary
Traditional wind power power prediction methods are difficult to fully capture the spatial and temporal correlations in power data, resulting in a decrease in prediction accuracy.
Using a combination of deep learning and machine learning, the original power characteristics of wind power output data are extracted through Bi-LSTM neural network, and trend components, seasonal components and residual terms are obtained through time-sequence decomposition. At the same time, an MLP model was established to extract external factor characteristics, and fusion of time and space attention was carried out to obtain the fusion characteristics for prediction.
It effectively improves the accuracy and stability of wind power power prediction, enhances the anti-interference ability of the model, and can better capture the periodic fluctuations and randomness of wind power.
Smart Images

Figure CN120012974A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wind power prediction, and in particular to an offshore wind power output prediction method, system, device and medium. Background Art
[0002] Electricity demand forecasting plays a key role in power system planning and provides a solid foundation for the economic operation of the power system. The core focus of this forecasting task is wind power. By deeply predicting the spatiotemporal distribution of wind power, it provides a reliable basis for power system planning and operation decisions. Accurate power forecasting directly affects the utilization rate of power generation equipment and the effect of economic dispatch, further enhancing the safety and stability of the power system. On the contrary, inaccurate forecasts may lead to increased operating costs, increased power losses, increased economic pressure, and even have a negative impact on the stable operation of the power system and the balance of supply and demand in the power market. Therefore, accurate wind power forecasting is crucial.
[0003] However, traditional power forecasting methods usually ignore the temporal and spatial correlation in output data. Power data usually exhibits obvious seasonal, periodic and trend characteristics, and traditional methods are difficult to fully capture these characteristics. This results in a decrease in the accuracy of power forecast results. Therefore, an innovative method is needed to better utilize the temporal and spatial correlation in power data to improve the accuracy and stability of power forecasting. Summary of the invention
[0004] The purpose of the present invention is to provide an offshore wind power output prediction method, system, device and medium in order to overcome the defects of poor accuracy in the above-mentioned prior art.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] A method for predicting offshore wind power output comprises the following steps:
[0007] S1: Obtain historical data of offshore wind power output, perform preprocessing, obtain preprocessed data, input the preprocessed data into the Bi-LSTM neural network, and obtain the first output;
[0008] S2: Decompose the preprocessed data in time series to obtain the output trend, model the output trend through the Bi-LSTM neural network to obtain the second output, and splice the first output and the second output to obtain the splicing result;
[0009] S3: For the meteorological factors that affect the prediction of offshore wind power output, an MLP model is established to extract features and obtain the third output. The third output and the splicing result are fused by spatiotemporal attention to obtain fused features.
[0010] S4: Make predictions based on the fused features to obtain prediction results.
[0011] Furthermore, the preprocessing calculation expression is:
[0012]
[0013] Where i is the customer-side load category and j is the time scale.
[0014] Furthermore, the computational expression of the propagation process of the Bi-LSTM neural network is:
[0015] f t =σ(Y f ·[h t-1 ,x t ]+b f )
[0016] i t =σ(Y i ·[h t-1 ,x t ]+b i )
[0017]
[0018] o t =σ(Y o ·[h t-1 ,x t ]+b o )
[0019] h t =o t tanh(C t )
[0020] In the formula, the matrix Y f , Y i , Y c , Y o Control the weights of the gate states respectively; is the state of the cell at time t, o t is the output of the activation function sigmod, σ is the S(x) function; the activation function tanh is the hyperbolic tangent function; [·,·] is h t-1 and x t The connection operation, f t It is the forget gate, t is the input gate, b f , b i , b c , b o is the offset.
[0021] Furthermore, the time series is decomposed to obtain trend component, seasonal component and residual term, and a ternary array of trend component, seasonal component and residual term is established as the output trend.
[0022] Furthermore, the calculation expression of time series decomposition is:
[0023] X 1 (t)=H(t)+K(t)+R(t)
[0024] Where, X 1 (t) is the observed value at time t, H(t) represents the trend component at time t; K(t) represents the seasonal component at time t; R(t) represents the residual term at time t;
[0025] The calculation expressions of trend component and seasonal component are:
[0026]
[0027] Where, X 1 (t-1), X 1 (t-v+1), X 1 (tv) represent the observed values at time t-1, t-v+1, and tv respectively, X 1 (j) represents the data set X 1 The observed value at the jth time point in ; Represents the data set X 1 The average of all observations in ; represents the average value of all time points in the data set; v represents the length of the seasonal cycle; θ 0 ,θ 1 They represent the trend constant and trend slope respectively; t(j) represents the time point corresponding to the j-th observation value.
[0028] Furthermore, the MLP model uses the back-propagation algorithm to update and adjust the weights. The output expression of the intermediate hidden layer of the MLP model is:
[0029] H=f(X h W h +b h )
[0030] In the formula, H is the output of the middle hidden layer, X h is the input of the middle hidden layer, W h is the weight of the middle hidden layer, b h is the threshold of the middle hidden layer, and f is the activation function of the middle hidden layer;
[0031] The output layer output expression of the MLP model is:
[0032] O=g(Xo W o +b o )
[0033] In the formula, O is the output of the output layer, X o is the input of the output layer, W o is the output layer weight, b o is the output layer threshold, and g is the activation function of the output layer.
[0034] Furthermore, in spatiotemporal attention fusion, the calculation expression of attention allocation is:
[0035] e i =h(q,k i )
[0036]
[0037] Where h() is the attention score function, e i is the attention size of the i-th key value, α i is the corresponding weight, and e is the natural base.
[0038] A second aspect of the present invention is an offshore wind power output prediction system, comprising:
[0039] Preprocessing module: obtain historical data of offshore wind power output, perform normalization processing, use Bi-LSTM to extract the normalization processing results, and obtain the first output;
[0040] Time series decomposition module: Decompose wind power output data by time series to obtain wind power output trend, use Bi-LSTM to extract wind power output trend, and obtain the second output;
[0041] Model combination prediction module: Use MLP to obtain the third output, splice the first output, the second output and the third output, and make a prediction based on the splicing result to obtain the prediction result;
[0042] Evaluation module: The accuracy of the prediction results is evaluated through mean absolute error, root mean square error and determination coefficient.
[0043] A third aspect of the present invention is an offshore wind power output prediction device, comprising a memory, a processor, and a program stored in the memory, wherein when the processor executes the program, any of the above offshore wind power output prediction methods is implemented.
[0044] A fourth aspect of the present invention is a storage medium having a program stored thereon, which implements any of the above offshore wind power output prediction methods when the program is executed.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] 1) The present invention adopts a method that combines deep learning with machine learning, and respectively extracts the original power characteristics of wind power output data, the trend characteristics obtained by time series decomposition of wind power output data, and the external factor characteristics extracted by MPL, and integrates them to obtain the prediction results, which can effectively improve the overall prediction performance, enhance the model's anti-interference ability, and improve the prediction accuracy.
[0047] 2) The present invention enhances the accuracy and robustness of power prediction through the comprehensive application of multiple models, can effectively capture the periodic fluctuations of wind power, deeply explore the randomness of data through two-dimensional spatial modeling, and improve the stability of prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 The figure is a flow chart of the prediction method of the present invention.
[0049] Figure 2 Obtain a plot of the trend, seasonal, and residual components for the STL decomposition.
[0050] Figure 3 Comparison chart of the prediction curve of the prediction model combining Bi-LSTM and temporal attention mechanism and the prediction curve of LSTM, Bi-LSTM without MLP model, KAN and Auto former model. DETAILED DESCRIPTION
[0051] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0052] Example 1
[0053] The present invention is a method for predicting offshore wind power output, comprising the following steps:
[0054] S1: Obtain historical data of offshore wind power output, perform preprocessing, obtain preprocessed data, input the preprocessed data into the Bi-LSTM neural network, and obtain the first output;
[0055] S1.1: Preprocess the historical output data X of offshore wind power, mainly including correcting and filling the abnormal values and vacant values contained in the data, and normalizing the data. The processed data set is represented as X'.
[0056] The following is the formula for normalizing the data:
[0057]
[0058] Where i is the customer-side load category and j is the time scale.
[0059] S1.2: The Bi-LSTM neural network will process these features. The propagation process of the LSTM network is as follows:
[0060] f t =σ(Y f ·[h t-1 ,x t ]+b f )
[0061] i t =σ(Y i ·[h t-1 ,x t ]+b i )
[0062]
[0063] o t =σ(Y o ·[h t-1 ,x t ]+b o )
[0064] h t =o t tanh(C t )
[0065] Among them, the matrix Y f , Y i , Y c , Y o Control the weights of the gate states respectively; is the state of the cell at time t, o t is the output of the activation function sigmod, σ is the S(x) function; the activation function tanh is the hyperbolic tangent function; [·,·] is h t-1 and x t Connect the operations. t It is the forget gate, t is the input gate. b f , b i , b c , b o is the offset.
[0066] The obtained original wind power characteristic is the first output.
[0067] S2: Decompose the preprocessed data in time series to obtain the output trend, model the output trend through the Bi-LSTM neural network to obtain the second output, and splice the first output and the second output to obtain the splicing result;
[0068] The offshore wind power output data is decomposed by STL, and the trend component, seasonal component and residual term are obtained by time series decomposition. A ternary array of trend component, seasonal component and residual term is established as the output trend. The output trend is modeled by Bi-LSTM, and the obtained output is spliced with the first output.
[0069] The calculation expression of time series decomposition is:
[0070] X 1 (t)=H(t)+K(t)+R(t)
[0071] In the formula, X 1 (t) is the observed value at time t, H(t) represents the trend component at time t; K(t) represents the seasonal component at time t; R(t) represents the residual term at time t;
[0072] The calculation expressions of trend component and seasonal component are:
[0073]
[0074] In the formula, X 1 (t-1), X 1 (t-v+1), X 1 (tv) represent the observed values at time t-1, t-v+1, and tv respectively, X 1 (j) represents the data set X 1 The observed value at the jth time point in ; Represents the data set X 1 The average of all observations in ; represents the average value of all time points in the data set; v represents the length of the seasonal cycle; θ 0 ,θ 1 They represent the trend constant and trend slope respectively; t(j) represents the time point corresponding to the j-th observation value.
[0075] S3: For the meteorological factors that affect the prediction of offshore wind power output, an MLP model is established to extract features and obtain the third output. The third output and the splicing result are fused by spatiotemporal attention to obtain fused features.
[0076] The MLP model is used to extract features of external factors (such as weather, market fluctuations, etc.) that affect offshore wind power output forecasting. MLP usually uses the back propagation algorithm (BP) to update and adjust weights. The output expression of the intermediate hidden layer of the MLP model is:
[0077] H=f(X h W h +b h )
[0078] In the formula, H is the output of the middle hidden layer, X h is the input of the middle hidden layer, W h is the weight of the middle hidden layer, b h is the threshold of the middle hidden layer, and f is the activation function of the middle hidden layer, which usually includes Relu, Logistic, and tanh;
[0079] The output layer output expression of the MLP model is:
[0080] O=g(X o W o +b o )
[0081] In the formula, O is the output of the output layer, X o is the input of the output layer, W o is the output layer weight, b o is the output layer threshold, and g is the activation function of the output layer.
[0082] The obtained external factor features are concatenated with the feature splicing results of S2 to perform spatiotemporal attention fusion, a set of keys k = (k 1 ,k 2 ,...,k n ) and its corresponding value v=(v 1 ,v 2 ,...,v n ) Under the reference of query q, the final output o is obtained, and the calculation expression of attention allocation is:
[0083] e i =h(q,k i )
[0084]
[0085] Where h() is the attention score function, e i is the attention size of the i-th key value, α i is the corresponding weight, and e is the natural base.
[0086] S4: Make predictions based on the fused features to obtain prediction results.
[0087] The mean absolute error (MAE), root mean square error (RMSE) and coefficient of determination (R 2 ) are used to measure the prediction accuracy of the combined prediction model trained in step 3.
[0088] Use the trained model to predict the wind power output value. The prediction results are as follows: Figure 2As shown in the figure, the mean absolute error (MAE), root mean square error (RMSE) and coefficient of determination (R 2 ) is used to measure the accuracy of the prediction algorithm. The calculation formula is as follows:
[0089]
[0090] Where y i and are the true value and predicted value at time i respectively.
[0091] Example 2
[0092] This embodiment is based on the python platform, and performs simulation and optimization analysis in the WIN11 operating system, i9 CPU, and 2.20GHz processor environment. The specific solution flow chart is as follows Figure 1 shown.
[0093] In this embodiment, the output data of an offshore wind farm is used to predict the output of the wind farm. 80% of the sample data set is used as a training set and 20% as a test set. The training set is used to train the model and the test set is used to verify the effectiveness of the model.
[0094] To verify the effectiveness of the method proposed in Example 1, the following five scenarios are set up in this embodiment for comparative analysis: Scenario 1: Wind power prediction is performed using the Bi-LSTM combined prediction model described in the present invention; Scenario 2: The Bi-LSTM in the method proposed in this article is replaced by LSTM to predict offshore wind power; Scenario 3: The MLP model in the method proposed in this article is removed, and the influence of external factors on offshore wind power output prediction is ignored; Scenario 4: Wind power prediction is performed using the KAN model; Scenario 5: Wind power prediction is performed using the Auto former model.
[0095] The comparison curves of the predicted curves and actual values of the five scenarios are as follows: Figure 3 As shown, it can be seen that the predicted value of the wind power curve based on the Bi-LSTM combined prediction model is closer to the true value. This is because the output data after MLP processing is smoother, and the STL decomposition method is used to decompose it into trend, seasonal and residual components to improve the performance of the prediction model input data; the combined prediction model is used to predict different components separately, enhance the model's anti-interference ability, and better predict the wind power curve. Therefore, the prediction curve based on the Bi-LSTM combined prediction model is better than other single prediction models.
[0096] The comparison of prediction model evaluation parameters for the five scenarios is shown in Table 1:
[0097] Table 1 Comparison of prediction model evaluation parameters
[0098]
[0099] As can be seen from Table 1, compared with other single prediction models, the Bi-LSTM combined prediction model can effectively improve the accuracy of wind power prediction; the prediction method proposed in this paper performs better than other comparison models in all indicators, and its performance in MAE and RMSE indicators is 12.3157 and 17.2559, which is at least 0.6002 and 1.2460 lower than the performance of other models in MAE and RMSE; at the same time, the performance in R2 indicator is 0.9107, which is at least 0.0134 higher than the performance of other models in R2. Analysis of the above results shows that the MAE value and RMSE value of the wind power prediction results have been reduced to a certain extent, and the R2 value has increased to a certain extent, which verifies that the model proposed in this invention has good applicability in wind power prediction.
[0100] Example 3
[0101] This embodiment provides a system for realizing the above-mentioned offshore wind power output prediction based on Bi-LSTM and temporal attention mechanism, including:
[0102] The preprocessing module normalizes the historical data of offshore wind power, uses the Bi-LSTM model to capture the correlation information before and after the data, models the complex dynamic characteristics existing in the offshore wind power time series data, and obtains the original wind power characteristics;
[0103] STL decomposition module, which decomposes wind power output data through STL to obtain wind power output trend, and uses Bi-LSTM to model wind power output trend to obtain trend characteristics;
[0104] The model combination prediction module uses the MLP (Multilayer Perceptron) model to extract features of external factors that affect offshore wind power output (such as weather, market fluctuations, etc.), and fuses the processed offshore wind power output and wind power output trend with the external influencing factor data. The original wind power features and trend features are first spliced, and then the spatiotemporal attention is fused with the external factor features to obtain the prediction results.
[0105] The evaluation module uses three indicators, namely mean absolute error, root mean square error and determination coefficient, to evaluate the prediction accuracy of the model combination prediction module.
[0106] Example 4
[0107] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0108] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0109] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A method for predicting offshore wind power output, characterized in that: The following steps are involved: S1: Obtain historical data of offshore wind power output, perform preprocessing, obtain preprocessed data, input the preprocessed data into the Bi-LSTM neural network, and obtain the first output; S2: Decompose the preprocessed data in time series to obtain the output trend, model the output trend through the Bi-LSTM neural network to obtain the second output, and splice the first output and the second output to obtain the splicing result; S3: For the meteorological factors that affect the prediction of offshore wind power output, an MLP model is established to extract features and obtain the third output. The third output and the splicing result are fused by spatiotemporal attention to obtain fused features. S4: Make predictions based on the fused features to obtain prediction results.
2. The offshore wind power output prediction method according to claim 1, characterized in that: The calculation expression of the preprocessing is: Where i is the customer-side load category and j is the time scale.
3. The offshore wind power output prediction method according to claim 1, characterized in that: The computational expression of the propagation process of the Bi-LSTM neural network is: f t =σ(Y f ·[h t-1 ,x t ]+b f ) i t =σ(Y i ·[h t-1 ,x t ]+b i ) the t =σ(Y o ·[h t-1 ,x t ]+b o ) h t =o t ·tanh(C t ) In the formula, the matrix Y f , Y i , Y c , Y o Control the weights of the gate states respectively; is the state of the cell at time t, o t is the output of the activation function sigmod, σ is the S(x) function; the activation function tanh is the hyperbolic tangent function; [·,·] is h t-1 and x t The connection operation, f t It is the forget gate, t is the input gate, b f , b i , b c , b o is the offset.
4. The offshore wind power output prediction method according to claim 1, characterized in that: The time series decomposition obtains a trend component, a seasonal component and a residual term, and a ternary array of the trend component, the seasonal component and the residual term is established as an output trend.
5. The offshore wind power output prediction method according to claim 4, characterized in that: The calculation expression of the time series decomposition is: X1(t)=H(t)+K(t)+R(t) In the formula, X1(t) is the observed value at time t, H(t) represents the trend component at time t; K(t) represents the seasonal component at time t; R(t) represents the residual term at time t; The calculation expressions of the trend component and seasonal component are respectively: In the formula, X1(t-1), X1(t-v+1), and X1(tv) represent the observation values at time t-1, t-v+1, and tv respectively, and X1(j) represents the observation value at the jth time point in the data set X1; Represents the average value of all observations in the data set X1; represents the average value of all time points in the data set; v represents the length of the seasonal cycle; θ0 and θ1 represent the trend constant and trend slope respectively; t(j) represents the time point corresponding to the jth observation.
6. The offshore wind power output prediction method according to claim 1, characterized in that: The MLP model uses a back propagation algorithm to update and adjust weights. The output expression of the intermediate hidden layer of the MLP model is: H=f(X h W h +b h ) In the formula, H is the output of the middle hidden layer, X h is the input of the middle hidden layer, W h is the weight of the middle hidden layer, b h is the threshold of the middle hidden layer, and f is the activation function of the middle hidden layer; The output layer output expression of the MLP model is: O=g(X o W o +b o ) In the formula, O is the output of the output layer, X o is the input of the output layer, W o is the output layer weight, b o is the output layer threshold, and g is the activation function of the output layer.
7. The offshore wind power output prediction method according to claim 1, characterized in that: In the spatiotemporal attention fusion, the calculation expression of attention allocation is: e i =h(q,k i ) Where h() is the attention score function, e i is the attention size of the i-th key value, α i is the corresponding weight, and e is the natural base.
8. An offshore wind power output prediction system, characterized in that: include: Preprocessing module: obtain historical data of offshore wind power output, perform normalization processing, use Bi-LSTM to extract the normalization processing results, and obtain the first output; Time series decomposition module: Decompose wind power output data by time series to obtain wind power output trend, use Bi-LSTM to extract wind power output trend, and obtain the second output; Model combination prediction module: Use MLP to obtain the third output, splice the first output, the second output and the third output, and make a prediction based on the splicing result to obtain the prediction result; Evaluation module: The accuracy of the prediction results is evaluated through mean absolute error, root mean square error and determination coefficient.
9. An offshore wind power output prediction device, comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, an offshore wind power output prediction method as described in any one of claims 1-8 is implemented.
10. A storage medium having a program stored thereon, characterized in that: When the program is executed, an offshore wind power output prediction method as described in any one of claims 1-8 is implemented.
Citation Information
Patent Citations
Machine room temperature prediction method based on deep parallel network
CN113779107A
Photovoltaic output prediction method based on maximum expectation sample weighted neural network model
CN115660182A
Wind power interval prediction and interpretable method considering space-time correlation
CN116937579A
Apparatus and method for recognizing speech using attention-based context-dependent acoustic model
US20180047389A1
Disk drive failure prediction with neural networks
US20200104200A1