WNet-based single-machine wind power ultra-short-term prediction method and device
By constructing a wind power prediction model based on a WNet dual-branch input structure and combining it with a multilayer perceptron network for deep fusion and transformation, the accuracy problem of wind power prediction is solved, and the accuracy and stability of wind power prediction are improved.
Patent Information
- Application Number
- CN202510800256.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2045-06-16
AI Technical Summary
Existing technologies struggle to accurately predict wind power output in power systems with a high proportion of renewable energy, impacting system stability.
A single-unit wind power ultra-short-term prediction method based on WNet is adopted. By acquiring and preprocessing historical power data, historical meteorological data and numerical weather prediction data, a WNet model with a dual-branch input structure is constructed. The model is then deeply fused and transformed using a multilayer perceptron network to output the wind power prediction results.
It improves the accuracy and stability of wind power prediction, and can flexibly adapt to the characteristics of different data sources to generate more accurate and stable wind power prediction results.
Smart Images

Figure CN120671924B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wind power generation prediction technology, and in particular to a method and device for ultra-short-term prediction of single-unit wind power based on WNet. Background Technology
[0002] With the acceleration of global urbanization and the continuous growth of energy demand, the overuse of traditional fossil fuels has led to serious environmental problems. Against this backdrop, wind power, as a zero-emission, renewable, and clean energy source, has received widespread attention globally. Wind power can not only reduce dependence on fossil fuels, lower air pollution, and improve air quality, but also enhance energy supply security, reduce reliance on imported energy, and thus promote sustainable economic and social development.
[0003] Accurate wind power forecasting is crucial for power system dispatch and operation. Accurate forecasts help power system operators better plan power generation, optimize resource allocation, and reduce reserve capacity requirements, thereby improving the economic efficiency and reliability of the power system. This is especially true in power systems with a high proportion of renewable energy, where the volatility of wind power has a more significant impact on system stability; therefore, improving the accuracy of wind power forecasting is particularly important. Summary of the Invention
[0004] In view of this, this application proposes a method and device for ultra-short-term prediction of single-unit wind power based on WNet.
[0005] Firstly, this application provides a method for ultra-short-term prediction of single-unit wind power based on WNet, including: Acquire preprocessed sample data of the target unit. The sample data includes historical power data, historical meteorological data, and numerical weather prediction data. The preprocessing includes outlier removal and standardization to eliminate dimensional differences. A dual-branch input structure is constructed based on the preprocessed sample data. The first branch input structure combines the preprocessed historical power data with the historical meteorological data into a joint input matrix, and the second branch input structure inputs the preprocessed numerical weather forecast data. Based on the dual-branch input structure, a WNet model suitable for wind power prediction is constructed, and the feature processing results output by the WNet model are obtained. The feature processing results include historical data feature vectors corresponding to the first branch input structure and numerical weather forecast feature vectors corresponding to the second branch input structure. By concatenating the historical data feature vector and the numerical weather forecast feature vector along the feature dimension, a combined feature is obtained. The combined features are deeply fused and transformed using a multilayer perceptron network to output wind power prediction results.
[0006] In one embodiment, the method further includes: The Huber loss function is used as the optimization objective, and the Adam optimizer is used to update the parameters of the multilayer perceptron network.
[0007] In one embodiment, acquiring the preprocessed sample data of the target unit includes: Obtain sample data within a predetermined time series length; Incomplete daily data with consecutive missing values exceeding a preset time threshold are removed as outliers, and data with consecutive missing values not exceeding the preset time threshold are filled using linear interpolation to obtain sample data with uniform resolution. The sample data with the uniform resolution is standardized to obtain the preprocessed sample data.
[0008] In one embodiment, the step of constructing a WNet model suitable for wind power prediction based on the dual-branch input structure and obtaining the feature processing results output by the WNet model includes: The dual-branch input structure is adjusted so that the height and width of the input data are even numbers and not less than preset values; Historical data features are extracted through the first branch input structure to obtain the historical data feature vector; wherein, the first branch input structure is an encoder-decoder structure, the upsampling operation of each layer of the decoder corresponds to the downsampling operation in the encoder, and the first branch input structure combines the multi-scale features extracted by the encoder with the upsampling results of the decoder through skip connections; Numerical weather forecast features are extracted through the second branch input structure to obtain the numerical weather forecast feature vector. The second branch input structure is an encoder-decoder structure, which combines the multi-scale features extracted by the encoder with the upsampling results of the decoder through a skip connection.
[0009] In one embodiment, adjusting the dual-branch input structure to make the height and width of the input data even and not less than a preset value includes: The input data of the dual-branch input structure is padded to adjust the height and width of the input data to an even number and not less than 8, wherein the padding operation uses zeros for padding.
[0010] In one embodiment, the step of extracting historical data features through the first branch input structure to obtain the historical data feature vector includes: The encoder of the first branch input structure extracts features through a two-dimensional convolutional layer and combines it with downsampling operations to obtain multi-scale feature representations; The bottleneck layer of the first branch input structure performs feature extraction and compression on the feature map after multiple convolutions of the encoder output, and passes the corresponding high-dimensional information to the decoder of the first branch input structure. The bottleneck layer is used to connect the encoder and the decoder. Based on the output data of the bottleneck layer of the first branch input structure, the decoder of the first branch input structure achieves feature fusion through a two-dimensional convolutional layer and performs upsampling using bilinear interpolation to output the first initial feature data. Based on the target size, the height and width of the first initial feature data are adjusted by bilinear interpolation to obtain the historical data feature vector.
[0011] In one embodiment, the step of extracting numerical weather forecast features through a second branch input structure to obtain the numerical weather forecast feature vector includes: The encoder of the second branch input structure extracts features through a two-dimensional convolutional layer and combines it with downsampling operations to obtain multi-scale feature representations; The bottleneck layer of the second branch input structure performs feature extraction and compression on the feature map after multiple convolutions of the encoder output, and passes the corresponding high-dimensional information to the decoder of the second branch input structure. The bottleneck layer is used to connect the encoder and the decoder. Based on the output data of the bottleneck layer of the second branch input structure, the decoder of the second branch input structure achieves feature fusion through a two-dimensional convolutional layer and uses bilinear interpolation for upsampling to output the second initial feature data; Based on the target size, the height and width of the second initial feature data are adjusted by bilinear interpolation to obtain the numerical weather forecast feature vector.
[0012] In one embodiment, the output data based on the bottleneck layer of the first branch input structure, wherein the decoder of the first branch input structure achieves feature fusion through a two-dimensional convolutional layer and performs upsampling using bilinear interpolation, outputs first initial feature data, including: S11: The encoder of the first branch input structure uses bilinear interpolation for upsampling and two-dimensional convolution to reduce the number of channels; the corresponding correlation formula is as follows: in, It is an upsampling operation. It is a two-dimensional convolution operation with a 3×3 kernel; It is the first The input of the layer is the first The layer output has 10 channels. , This is the upsampled feature matrix, here The number of channels corresponds to the number of downsampling layers. ,and , It is the feature matrix after two-dimensional convolution, with the number of channels being... The steps for upsampling using bilinear interpolation include: indexing the elements of the output feature matrix. Element index mapped to the input feature matrix , Based on the four nearest elements in the input feature matrix Perform interpolation. The interpolation formula is: in, ; S12: Obtain the result of step S11 With encoder number l Feature matrix after two-dimensional convolution Concatenation is performed along the channel dimension to achieve skip-step connections between the encoder and decoder. The corresponding correlation formula is as follows: in, and The number of channels is , The number of channels is 2 ; S13: Perform a two-dimensional convolution on the concatenated feature matrix to further fuse features and reduce the number of channels. The corresponding formula is as follows: in, Number of channels ; S14: Repeat steps S11 to S13 three times, and output the first initial feature data. .
[0013] In one embodiment, the output data of the bottleneck layer based on the second branch input structure, the decoder of the second branch input structure achieves feature fusion through a two-dimensional convolutional layer, and performs upsampling using bilinear interpolation to output second initial feature data, including: S21: The encoder of the second branch input structure uses bilinear interpolation for upsampling and two-dimensional convolution to reduce the number of channels; where the corresponding correlation formula is: in, It is an upsampling operation. It is a two-dimensional convolution operation with a 3×3 kernel; It is the first The input of the layer is the first The layer output has 10 channels. , This is the upsampled feature matrix, here The number of channels corresponds to the number of downsampling layers. ,and , It is the feature matrix after two-dimensional convolution, with the number of channels being... The steps for upsampling using bilinear interpolation include: indexing the elements of the output feature matrix. Element index mapped to the input feature matrix , Based on the four nearest elements in the input feature matrix Perform interpolation The interpolation formula is: in, ; S22: Obtain the result of step S21 With encoder number Feature matrix after two-dimensional convolution Concatenation is performed along the channel dimension to achieve skip-step connections between the encoder and decoder. The corresponding correlation formula is as follows: in and The number of channels is , The number of channels is 2 ; S23: Perform a two-dimensional convolution on the concatenated feature matrix to further fuse features and reduce the number of channels: in, Number of channels ; S24: Repeat steps S21 to S23 three times, and output the second initial feature data. .
[0014] Secondly, this application provides a single-unit wind power ultra-short-term forecasting device based on WNet, comprising: The acquisition module is used to acquire preprocessed sample data of the target unit. The sample data includes historical power data, historical meteorological data and numerical weather prediction data. The preprocessing includes outlier removal and standardization to eliminate dimensional differences. The first construction module is used to construct a dual-branch input structure based on the preprocessed sample data. The first branch input structure combines the preprocessed historical power data and the historical meteorological data into a joint input matrix, and the second branch input structure inputs the preprocessed numerical weather forecast data. The second construction module is used to construct a WNet model suitable for wind power prediction based on the dual-branch input structure, and obtain the feature processing results output by the WNet model. The feature processing results include historical data feature vectors corresponding to the first branch input structure and numerical weather forecast feature vectors corresponding to the second branch input structure. The splicing module is used to splice the historical data feature vector and the numerical weather forecast feature vector along the feature dimension to obtain combined features; The output module is used to perform deep fusion and transformation of the combined features through a multilayer perceptron network and output wind power prediction results.
[0015] The single-unit wind power ultra-short-term prediction method based on WNet proposed in this application has the following advantages over related technologies: 1. By preprocessing the sample data, outliers can be removed, resulting in higher reliability of the preprocessed sample data. This provides reliable data support for subsequent processing and helps improve prediction accuracy. Furthermore, the prediction method in this application comprehensively utilizes historical power data, historical meteorological data, and numerical weather prediction data. Through a dual-branch input structure, it fully mines the characteristic information of multi-source data, thereby further improving the prediction accuracy of single-unit wind power. Simultaneously, the dual-branch input structure allows for independent adjustment of input data and model design, flexibly adapting to the characteristics of different data sources.
[0016] 2. The prediction method in this application constructs a WNet model suitable for wind power prediction based on a dual-branch input structure. Due to the use of the WNet model, multi-scale features can be extracted through two-dimensional convolution and downsampling operations, and multi-level feature fusion can be achieved by combining upsampling and skip connection mechanisms, thus enhancing the model's feature representation capability. Based on this, a multilayer perceptron network is used to deeply fuse and transform the dual-branch feature extraction results. Utilizing the powerful nonlinear fitting capability of the multilayer perceptron network, the complex correlation between historical data and forecast data is flexibly captured, thereby effectively integrating multi-source information, adapting to prediction needs in different scenarios, and generating more accurate and stable wind power prediction results. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating a single-unit wind power ultra-short-term prediction method based on WNet in one embodiment of this application. Figure 2 This is a schematic diagram illustrating the principle of a single-unit wind power ultra-short-term prediction method based on WNet in one embodiment of this application; Figure 3 This is a schematic diagram illustrating the principle of a single-unit wind power ultra-short-term prediction method based on WNet in another embodiment of this application; Figure 4 This is a flowchart illustrating step S101 in one embodiment of this application; Figure 5 This is a flowchart illustrating step S103 in one embodiment of this application; Figure 6 This is a flowchart illustrating step S502 in one embodiment of this application; Figure 7 This is a flowchart illustrating step S503 in one embodiment of this application; Figure 8 This is a schematic diagram of the structure of a single-unit wind power ultra-short-term prediction device based on WNet in one embodiment of this application. Detailed Implementation
[0019] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0020] In some embodiments, such as Figure 1 As shown, this application provides a WNet-based method for ultra-short-term prediction of single-unit wind power, which includes the following steps S101 to S105.
[0021] S101: Obtain preprocessed sample data of the target unit. The sample data includes historical power data, historical meteorological data, and numerical weather prediction data. Preprocessing includes outlier removal and standardization to eliminate dimensional differences.
[0022] Wind turbines can be selected as target turbines, and historical power data, historical meteorological data, and numerical weather prediction data for these target turbines over a predetermined time series length can be collected as sample data. After acquiring the sample data, the data completeness of each time series (e.g., one day can be considered a time series) needs to be checked. If the data completeness of a time series is low, the data in that time series is considered outlier and needs to be removed to avoid negatively impacting the accuracy of wind power prediction.
[0023] By standardizing the sample data, historical power data, historical meteorological data, and numerical weather prediction data can be transformed into data of a uniform scale, ensuring the comparability of historical power data, historical meteorological data, and numerical weather prediction data, avoiding misleading the model weights or interpretation of results due to differences in numerical magnitude, thereby avoiding analytical bias caused by differences in dimensions, and improving the rationality of data visualization and feature engineering.
[0024] S102: Construct a dual-branch input structure based on the preprocessed sample data. The first branch input structure combines the preprocessed historical power data with historical meteorological data into a joint input matrix. The second branch input structure takes the preprocessed numerical weather prediction data as input. The first branch input structure, which combines historical power data with historical meteorological data into a joint input matrix, primarily represents historical trend changes, while the second branch input structure, which takes numerical weather prediction data as input, characterizes future fluctuations.
[0025] It can be understood that the first branch input structure is a historical power data and historical meteorological data branch, and the second branch input structure is a numerical weather prediction data branch. The dual-branch input structure simultaneously includes historical power data and historical meteorological data branches, as well as numerical weather prediction data branches, which can make full use of various power and meteorological information for prediction.
[0026] For example, to meet practical ultra-short-term forecasting requirements, use The prediction of the next 4 hours' data from the previous 24 hours, i.e., using a 15-minute time resolution, uses the previous 96 time steps of data to predict the next 16 time steps of data, represented by the following vectors:
[0027] in This represents the concatenation of two matrices along their feature dimensions. Indicates the first time point Historical meteorological elements and power generation. Simultaneously, to accommodate two-dimensional convolution operations, the input data was reshaped into... ,in This refers to the number of channels (features). 1 represents the height (time step), and 1 represents the width. This treats each feature as an independent channel. Subsequent 2D convolutional kernels slide across these channels to capture the relationships between features. Similarly, numerical weather forecast data input can be obtained. S103: Construct a WNet model suitable for wind power prediction based on a dual-branch input structure, and obtain the feature processing results of the WNet model output. The feature processing results include historical data feature vectors corresponding to the first branch input structure and numerical weather forecast feature vectors corresponding to the second branch input structure.
[0028] It can be understood that, based on the dual-branch input structure of step S102, historical data is used as the input to the first branch input structure (left branch), and numerical weather prediction data is used as the input to the second branch input structure (right branch). Both the first and second branch input structures consist of an encoder and a decoder. The encoder extracts features through a two-dimensional convolutional layer and combines downsampling operations to obtain multi-scale feature representations. The decoder achieves feature fusion through a two-dimensional convolutional layer, uses bilinear interpolation for upsampling to improve resolution, and introduces a skip connection mechanism to enhance feature transfer capability. A WNet model suitable for wind power prediction is constructed based on the dual-branch input structure. Finally, the WNet model outputs the historical data feature vector corresponding to the first branch input structure and the numerical weather prediction feature vector corresponding to the second branch input structure.
[0029] S104: Concatenate the historical data feature vector and the numerical weather prediction feature vector along the feature dimension to obtain the combined feature. Specifically, aligning the resolutions of the historical data feature vector and the numerical weather prediction feature vector, and then concatenating them along the feature dimension, yields the combined feature.
[0030] For example, historical data feature vectors 96 represents height, 1 represents width; Numerical weather forecast feature vector 16 represents the height, and 1 represents the width. The resolution of historical data feature vectors and numerical weather prediction feature vectors is not high; therefore, they need to be processed before being input into a multilayer perceptron (MLP) network for prediction. Dimensional reduction: in, It is a weight matrix. It is the bias vector, and then... and Concatenate along the feature dimension:
[0031] Among them, combined features .
[0032] S105: Deep fusion and transformation of combined features are performed using a multilayer perceptron network to output wind power prediction results. The principle behind the single-unit wind power ultra-short-term prediction method based on WNet for wind power prediction can be found in [link to relevant documentation]. Figure 2 , Figure 2 The future meteorological data in the data are determined based on numerical weather prediction data.
[0033] In this embodiment, the MLP network consists of multiple fully connected layers and activation functions: in, It is a multilayer perceptron method. It is a prediction result; specifically, first... Expand into a one-dimensional vector The final prediction result is obtained through a fourth linear mapping and the Gelu activation function. .
[0034] The aforementioned WNet-based method for ultra-short-term single-unit wind power prediction removes outliers by preprocessing sample data, resulting in highly reliable preprocessed data that supports subsequent processing and improves prediction accuracy. Furthermore, the prediction method in this application comprehensively utilizes historical power data, historical meteorological data, and numerical weather prediction data. By employing a dual-branch input structure, it fully leverages the characteristic information of multi-source data, further enhancing the prediction accuracy for single-unit wind power. Simultaneously, the dual-branch input structure allows for independent adjustment of input data and model design, flexibly adapting to the characteristics of different data sources.
[0035] It can also be understood that the prediction method in this application constructs a WNet model suitable for wind power prediction based on a dual-branch input structure. Because of the WNet model, multi-scale features can be extracted through two-dimensional convolution and downsampling operations, and multi-level feature fusion can be achieved by combining upsampling and skip connection mechanisms, thus enhancing the model's feature representation capability. On this basis, the dual-branch feature extraction results are deeply fused and transformed through a multilayer perceptron network. Utilizing the powerful nonlinear fitting capability of the multilayer perceptron network, the complex correlation between historical data and forecast data is flexibly captured, thereby effectively integrating multi-source information, adapting to prediction needs in different scenarios, and generating more accurate and stable wind power prediction results.
[0036] In some embodiments, the WNet-based single-unit wind power ultra-short-term prediction method further includes: using the Huber loss function as the optimization objective and employing the Adam optimizer to update the parameters of the multilayer perceptron network. The flow of the wind turbine power generation prediction method of this application embodiment, in conjunction with the above embodiments, can be as follows: Figure 3 As shown.
[0037] It is understandable that the Huber loss combines the advantages of mean squared error (MSE) and mean absolute error (MAE). When the error is small, squared loss is used to accelerate convergence, while linear loss is used to enhance robustness to outliers when the error is large. This embodiment uses the Huber loss function as the optimization objective, utilizes the Adam optimizer to minimize the Huber loss, and gradually adjusts the model parameters to ultimately obtain the optimal model predictive ability.
[0038] The formula for calculating Huber loss is as follows: in, It is the actual value. It is a threshold parameter used to control the switching point between squared loss and linear loss (usually set to a value that is not specified in the original text). The advantages of using the Huber loss function are that it is sensitive to small errors, which can accelerate model convergence; and it is robust to large errors, which can reduce the impact of outliers on model training. Using the Adam optimizer for parameter updates, combined with dynamic learning rate adjustment, early stopping strategies, and model saving, the model can be gradually optimized to obtain optimal predictive ability.
[0039] In some embodiments, such as Figure 4 As shown, in step S101, the sample data of the target unit after preprocessing is obtained, including the following steps S401 to S403.
[0040] S401: Obtain sample data within a predetermined time series length.
[0041] Obtain the sample wind turbine units in the time series length Historical power generation data within P Historical meteorological data W And the corresponding numerical weather prediction data F This forms sample data, where historical meteorological data contains M meteorological elements and numerical weather prediction data contains N meteorological elements, represented by the following vectors:
[0042] in, The length of the time series. Indicates the first Historical power generation data at a given time point. Indicates the first The first point in time Each meteorological element No. The first point in time Meteorological elements.
[0043] S402: Incomplete daily data with consecutive missing values exceeding a preset time threshold are removed as abnormal data, and data with consecutive missing values not exceeding the preset time threshold are filled using linear interpolation to obtain sample data with uniform resolution.
[0044] Among them, for historical power data P Historical meteorological data Numerical weather forecast data Check if there are consecutive missing data for more than a preset time threshold (e.g., 2 hours) in each time series. If so, delete the data for that day.
[0045] For consecutive missing data not exceeding a preset time threshold, linear interpolation is used to fill in the gaps. This is based on the missing time points in historical power data. Taking the data as an example, for missing values Its nearest non-missing value is and (in ),but: The processing of historical meteorological data and numerical weather prediction data follows the same principle. Simultaneously, the data is resampled using the linear interpolation method described above to ensure uniform resolution, for example, to 15 minutes, resulting in processed historical power data P and historical meteorological data. Sum numerical weather forecast data .
[0046] S403: Standardize the sample data with uniform resolution to obtain preprocessed sample data.
[0047] The standardization process includes data centralization and scaling. This is based on historical power data. For example, the standardized formula is:
[0048] in for mean Similarly, the standardized historical meteorological data can be obtained by taking the standard deviation as the standard deviation. Sum numerical weather forecast data .
[0049] In some embodiments, such as Figure 5 As shown, in step S103, a WNet model suitable for wind power prediction is constructed based on the dual-branch input structure, and the feature processing results of the WNet model output are obtained, including the following steps S501 to S503.
[0050] S501: Adjust the dual-branch input structure to make the height and width of the input data even and not less than the preset value.
[0051] In this dual-branch input structure, both the left and right branches consist of an encoder and a decoder. The encoder extracts features through a two-dimensional convolutional layer. Two-dimensional convolution is used for image data, and its operation is similar to one-dimensional convolution, but its window and kernel are two-dimensional. This application transfers two-dimensional convolution to time series prediction, using the number of features as the number of channels for convolution. To ensure that the input data has sufficient dimensionality for subsequent convolution and downsampling operations, the input data of the dual-branch input structure needs to be padded first, adjusting the height and width of the input data to even numbers and not less than preset values, so that uniform downsampling can be achieved in subsequent pooling operations.
[0052] S502: Historical data feature extraction is performed through the first branch input structure to obtain historical data feature vectors. The first branch input structure is an encoder-decoder structure, where the upsampling operation of each layer of the decoder corresponds to the downsampling operation in the encoder. The first branch input structure combines the multi-scale features extracted by the encoder with the upsampling results of the decoder through skip connections.
[0053] The first branch input structure is an encoder-decoder structure. The encoder extracts features through a two-dimensional convolutional layer and combines it with downsampling to obtain multi-scale feature representations, which can capture the complex correlation between wind power changes and meteorological conditions. Then, the decoder uses bilinear interpolation for upsampling to improve resolution, and introduces a skip connection mechanism to effectively retain and pass on the key features extracted at multiple scales, enhancing feature transfer capability, thereby extracting appropriate historical data feature vectors.
[0054] S503: Numerical weather forecast feature extraction is performed through the second branch input structure to obtain the numerical weather forecast feature vector. The second branch input structure is an encoder-decoder structure, which combines the multi-scale features extracted by the encoder with the upsampling results of the decoder through skip connections.
[0055] Similarly, the second branch's input structure is also an encoder-decoder structure. The encoder captures the multi-dimensional features of numerical weather forecast data through layers of two-dimensional convolution and downsampling operations. The decoder combines bilinear interpolation upsampling operations with a skip connection mechanism, enabling this branch to improve resolution while preserving multi-scale features of future weather conditions, thus providing strong support for short-term wind power forecasting.
[0056] In some embodiments, adjusting the dual-branch input structure to make the height and width of the input data even and not less than a preset value includes: performing a padding operation on the input data of the dual-branch input structure to make the height and width of the input data even and not less than 8, wherein the padding operation uses zeros for padding.
[0057] In this embodiment, the height and width of the input data are adjusted to even numbers and not less than 8 to ensure uniform downsampling in subsequent pooling operations. For example, for the height... Height after filling for: ,in express If the remainder after dividing by 2 is still less than 8, then the height is directly filled with 8. The width is filled in the same way, using zero padding.
[0058] In some embodiments, such as Figure 6 As shown, in step S502, historical data feature extraction is performed through the first branch input structure to obtain historical data feature vectors, including the following steps S601 to S604.
[0059] S601: The encoder of the first branch input structure extracts features through a two-dimensional convolutional layer and combines it with downsampling operations to obtain multi-scale feature representations.
[0060] Specifically, S601 may include steps 601a and 601b.
[0061] 601a: Multi-scale feature extraction using 2D convolution and downsampling captures the complex correlation between wind power variations and meteorological conditions. (The last sentence appears to be incomplete and possibly refers to a separate topic.) Taking a layer as an example, the input is the output feature matrix of the previous layer. Then, a two-dimensional convolution kernel is used to extract features: in, Represents two-dimensional convolution. This indicates a max pooling operation. It is the first The output of the layer is the first The input of the layer has 10 channels. , It is the feature matrix after 2D convolution and is used as the subsequent skip connection, with the number of channels being... , It is the first The layer output has 10 channels. ,in This means that the number of channels is doubled after the 2D convolution operation. The 2D convolution kernel size is 3×3, and the input matrix is padded with 0 in each of the four sides by 1 row / column to ensure that the size of the output feature matrix is the same as the size of the input matrix, avoiding the loss of edge information. The max pooling kernel size is 2×2, with a stride of 2, and the specific steps are as follows: in, and It is the element index of the output matrix. and It is the element position index within the pooling kernel.
[0062] 601b: Repeat step 601a three times to obtain the final encoder output. .
[0063] S602: The bottleneck layer of the first branch input structure extracts and compresses features from the feature map after multiple convolutions of the encoder output, and passes the corresponding high-dimensional information to the decoder of the first branch input structure. The bottleneck layer connects the encoder and decoder.
[0064] The bottleneck layer, as the key component connecting the encoder and decoder, performs deep feature extraction and compression on the feature map output by the encoder after multiple convolutions, and passes the corresponding high-dimensional information to the decoder. The corresponding formula is: S603: Output data based on the bottleneck layer of the first branch input structure. The decoder of the first branch input structure achieves feature fusion through a two-dimensional convolutional layer and uses bilinear interpolation for upsampling to output the first initial feature data.
[0065] S603 may include steps S11 to S14.
[0066] S11: The encoder of the first branch input structure uses bilinear interpolation for upsampling and two-dimensional convolution to reduce the number of channels; the corresponding correlation formula is as follows: in, It is an upsampling operation. It is a two-dimensional convolution operation with a 3×3 kernel; It is the first The input of the layer is the first The layer output has 10 channels. , This is the upsampled feature matrix, here The number of channels corresponds to the number of downsampling layers. ,and , It is the feature matrix after two-dimensional convolution, with the number of channels being... The steps for upsampling using bilinear interpolation include: indexing the elements of the output feature matrix. Element index mapped to the input feature matrix , Based on the four nearest elements in the input feature matrix Perform interpolation. The interpolation formula is: in, .
[0067] S12: Obtain the result of step S11 With encoder number l Feature matrix after two-dimensional convolution Concatenation is performed along the channel dimension to achieve skip-step connections between the encoder and decoder. The corresponding correlation formula is as follows: in, and The number of channels is , The number of channels is 2 .
[0068] S13: Perform a two-dimensional convolution on the concatenated feature matrix to further fuse features and reduce the number of channels. The corresponding formula is as follows: in, Number of channels .
[0069] S14: Repeat steps S11 to S13 three times, and output the first initial feature data. .
[0070] S604: Based on the target size, adjust the height and width of the first initial feature data using bilinear interpolation to obtain the historical data feature vector. For example, the target size is... Then, the height and width of the first initial feature data are adjusted by bilinear interpolation to output the historical data feature vector. .
[0071] In some embodiments, such as Figure 7 As shown, in step S503, numerical weather forecast features are extracted through the second branch input structure to obtain numerical weather forecast feature vectors, including the following steps S701 to S704.
[0072] S701: The encoder of the second branch input structure extracts features through a two-dimensional convolutional layer and combines it with downsampling operations to obtain multi-scale feature representations. Specifically, the encoder of the second branch input structure uses a two-dimensional convolutional layer to extract deep features from historical meteorological data and combines it with downsampling operations to obtain multi-scale feature representations. This encoder systematically extracts the spatiotemporal features of the input data through layer-by-layer convolution and pooling operations, and simultaneously provides multi-level feature information for subsequent skip connections through a feature preservation mechanism. Specifically, S701 may include steps 701a and 701b.
[0073] 701a: Multi-scale feature extraction using 2D convolution and downsampling to capture the relationships between numerical weather prediction data. (The last sentence appears to be incomplete and possibly refers to a separate topic.) Taking a layer as an example, the input is the output feature matrix of the previous layer. Then, feature extraction is performed using 2D convolution and downsampling: in, Represents two-dimensional convolution. This indicates a max pooling operation. It is the first The output of the layer is the first The input of the layer has 10 channels. , It is the feature matrix after 2D convolution and is used as the subsequent skip connection, with the number of channels being... , It is the first The layer output has 10 channels. ,in This means that the number of channels is doubled after a 2D convolution operation. The 2D convolution kernel size is 3×3, and the input image is padded with 0s in all four rows / columns to ensure that the size of the output feature matrix is the same as the input matrix size. The max pooling kernel size is 2×2 with a stride of 2, and the specific steps are as follows:
[0074] in, and It is the element index of the output matrix. and It is the element position index within the pooling kernel.
[0075] 701b: Repeat step 701a three times to obtain the final encoder output. .
[0076] S702: The bottleneck layer of the second branch input structure extracts and compresses features from the feature map after multiple convolutions of the encoder output, and passes the corresponding high-dimensional information to the decoder of the second branch input structure. The bottleneck layer connects the encoder and decoder. Similar to the bottleneck layer of the first branch input structure, the bottleneck layer of the second branch input structure further extracts and compresses features from the final output of the encoder, and then uses the result as the input to the decoder. The operation formula of the bottleneck layer is as follows: in, The number of channels is Twice as much.
[0077] S703: Output data based on the bottleneck layer of the second branch input structure. The decoder of the second branch input structure achieves feature fusion through a two-dimensional convolutional layer and uses bilinear interpolation for upsampling to output the second initial feature data.
[0078] S21: The encoder of the second branch input structure uses bilinear interpolation for upsampling and two-dimensional convolution to reduce the number of channels; the corresponding correlation formula is: in, It is an upsampling operation. It is a two-dimensional convolution operation with a 3×3 kernel; It is the first The input of the layer is the first The layer output has 10 channels. , This is the upsampled feature matrix, here The number of channels corresponds to the number of downsampling layers. ,and , It is the feature matrix after two-dimensional convolution, with the number of channels being... The steps for upsampling using bilinear interpolation include: indexing the elements of the output feature matrix. Element index mapped to the input feature matrix , Based on the four nearest elements in the input feature matrix Perform interpolation The interpolation formula is: in, .
[0079] S22: Obtain the result of step S21 With encoder number Feature matrix after two-dimensional convolution Concatenation is performed along the channel dimension to achieve skip-step connections between the encoder and decoder. The corresponding correlation formula is as follows: in and The number of channels is , The number of channels is 2 .
[0080] S23: Perform a two-dimensional convolution on the concatenated feature matrix to further fuse features and reduce the number of channels: in, Number of channels .
[0081] S24: Repeat steps S21 to S23 three times, and output the second initial feature data. .
[0082] S704: Based on the target size, adjust the height and width of the second initial feature data using bilinear interpolation to obtain the numerical weather forecast feature vector. For example, the target size is... Then, the height and width of the second initial feature data are adjusted by bilinear interpolation to output the numerical weather forecast feature vector. .
[0083] Based on the method described in the above embodiments, this embodiment uses a specific turbine at a certain MW wind farm as both the target and verification turbine. The verification was conducted by predicting the power generation of this turbine on July 25, 2024. Historical power data, historical meteorological data, and numerical weather prediction data for this turbine from March 1, 2023 to August 22, 2024 were collected. The historical meteorological data and numerical weather prediction data are from the wind measurement tower at the wind farm. Incomplete daily data with more than two consecutive hours of missing values were removed, and other missing data were filled using linear interpolation. The time resolution for the actual power generation prediction report is 15 minutes. The WNet-based single-unit wind power ultra-short-term prediction method shows a certain improvement in performance compared to other prediction models, as detailed in the table below.
[0084]
[0085] In some embodiments, such as Figure 8 As shown, this application also provides a single-unit wind power ultra-short-term prediction device 800 based on WNet, including: an acquisition module 801, a first construction module 802, a second construction module 803, a splicing module 804, and an output module 805.
[0086] The acquisition module 801 is used to acquire preprocessed sample data of the target unit. The sample data includes historical power data, historical meteorological data and numerical weather prediction data. The preprocessing includes outlier removal and standardization to eliminate dimensional differences.
[0087] The first construction module 802 is used to construct a dual-branch input structure based on the preprocessed sample data. The first branch input structure combines the preprocessed historical power data and historical meteorological data into a joint input matrix, and the second branch input structure inputs the preprocessed numerical weather forecast data.
[0088] The second construction module 803 is used to construct a WNet model suitable for wind power prediction based on a dual-branch input structure and obtain the feature processing results output by the WNet model. The feature processing results include historical data feature vectors corresponding to the first branch input structure and numerical weather forecast feature vectors corresponding to the second branch input structure.
[0089] The splicing module 804 is used to splice the historical data feature vector and the numerical weather forecast feature vector in the feature dimension to obtain the combined feature.
[0090] The output module 805 is used to perform deep fusion and transformation of the combined features through a multilayer perceptron network and output wind power prediction results.
[0091] In some embodiments, the WNet-based single-unit wind power ultra-short-term prediction device further includes an optimization module, which is used to update the parameters of the multilayer perceptron network using the Huber loss function as the optimization objective and the Adam optimizer.
[0092] It should be noted that the single-unit wind power ultra-short-term prediction device 800 based on WNet provided in this application embodiment and the single-unit wind power ultra-short-term prediction method based on WNet provided in this application embodiment are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned single-unit wind power ultra-short-term prediction method based on WNet, and the repeated parts will not be described again.
[0093] In some embodiments, this application also provides an electronic device, including a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the above-described WNet-based single-unit wind power ultra-short-term prediction method.
[0094] Specifically, the processor may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor may also include onboard memory for caching purposes. The processor may be a single processing unit or multiple processing units for performing different actions of the method flow according to embodiments of this application. Memory may be any medium capable of containing, storing, transmitting, propagating, or transmitting instructions. For example, memory may include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or propagation media. Specific examples of memory include: magnetic storage devices such as magnetic tape or hard disk drives (HDDs); optical storage devices such as optical discs (CD-ROMs); and may also be random access memory (RAM) or flash memory; and / or wired / wireless communication links.
[0095] This application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the above-described WNet-based method for ultra-short-term prediction of single-unit wind power.
[0096] According to embodiments of this application, a computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, optical fiber, radio frequency signals, etc., or any suitable combination thereof.
[0097] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application. Therefore, the scope of this application should not be limited to the above embodiments, but should be defined not only by the appended claims, but also by their equivalents. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for ultra-short-term prediction of single-unit wind power based on WNet, characterized in that, include: Acquire preprocessed sample data of the target unit. The sample data includes historical power data, historical meteorological data, and numerical weather prediction data. The preprocessing includes outlier removal and standardization to eliminate dimensional differences. A dual-branch input structure is constructed based on the preprocessed sample data. The first branch input structure combines the preprocessed historical power data and the historical meteorological data into a joint input matrix. The second branch input structure inputs the preprocessed numerical weather forecast data. The first branch input structure is an encoder-decoder structure, and the upsampling operation of each layer of the decoder corresponds to the downsampling operation in the encoder. Based on the dual-branch input structure, a WNet model suitable for wind power prediction is constructed, and the feature processing results output by the WNet model are obtained. The feature processing results include historical data feature vectors corresponding to the first branch input structure and numerical weather forecast feature vectors corresponding to the second branch input structure. The construction of the WNet model based on the dual-branch input structure and the acquisition of the feature processing results output by the WNet model include: adjusting the dual-branch input structure to make the height and width of the input data even and not less than preset values; the encoder of the two-branch input structure extracts features through a two-dimensional convolutional layer and combines downsampling operations to obtain multi-scale feature representations; the bottleneck layer extracts and compresses features from the multi-convolutional feature maps output by the encoder, passing the corresponding high-dimensional information to the decoder; the decoder achieves feature fusion through a two-dimensional convolutional layer and uses bilinear interpolation for upsampling, outputting first initial feature data and second initial feature data; the height and width of the first initial feature data and the second initial feature data are adjusted according to the target size using bilinear interpolation to obtain the feature processing results. By concatenating the historical data feature vector and the numerical weather forecast feature vector along the feature dimension, a combined feature is obtained. The combined features are deeply fused and transformed using a multilayer perceptron network to output wind power prediction results.
2. The single-unit wind power ultra-short-term prediction method based on WNet as described in claim 1, characterized in that, The method further includes: The Huber loss function is used as the optimization objective, and the Adam optimizer is used to update the parameters of the multilayer perceptron network.
3. The single-unit wind power ultra-short-term prediction method based on WNet as described in claim 1, characterized in that, The acquisition of preprocessed sample data of the target unit includes: Obtain sample data within a predetermined time series length; Incomplete daily data with consecutive missing values exceeding a preset time threshold are removed as outliers, and data with consecutive missing values not exceeding the preset time threshold are filled using linear interpolation to obtain sample data with uniform resolution. The sample data with the uniform resolution is standardized to obtain the preprocessed sample data.
4. The single-unit wind power ultra-short-term prediction method based on WNet as described in claim 1, characterized in that, The adjustment of the dual-branch input structure to make the height and width of the input data even and not less than a preset value includes: The input data of the dual-branch input structure is padded to adjust the height and width of the input data to an even number and not less than 8, wherein the padding operation uses zeros for padding.
5. The single-unit wind power ultra-short-term prediction method based on WNet as described in claim 1, characterized in that, The decoder of the first branch input structure achieves feature fusion through a two-dimensional convolutional layer and uses bilinear interpolation for upsampling, outputting the first initial feature data, including: S11: The decoder of the first branch input structure uses bilinear interpolation for upsampling and two-dimensional convolution to reduce the number of channels; the corresponding correlation formula is as follows: ; in, It is an upsampling operation. It is a two-dimensional convolution operation with a 3×3 kernel; It is the first The input of the layer is the first The layer output has 10 channels. , This is the upsampled feature matrix, here The number of channels corresponds to the number of downsampling layers. ,and , It is the feature matrix after two-dimensional convolution, with the number of channels being... The steps for upsampling using bilinear interpolation include: indexing the elements of the output feature matrix. Element index mapped to the input feature matrix , Based on the four nearest elements in the input feature matrix Perform interpolation. The interpolation formula is: ; in, ; S12: Obtain the result of step S11 With encoder number l Feature matrix after two-dimensional convolution Concatenation is performed along the channel dimension to achieve skip-step connections between the encoder and decoder. The corresponding correlation formula is as follows: ; in, and The number of channels is , The number of channels is 2 ; S13: Perform a two-dimensional convolution on the concatenated feature matrix to further fuse features and reduce the number of channels. The corresponding formula is as follows: ; in, Number of channels ; S14: Repeat steps S11 to S13 three times, and output the first initial feature data. .
6. The single-unit wind power ultra-short-term prediction method based on WNet as described in claim 1, characterized in that, The decoder of the second branch input structure achieves feature fusion through a two-dimensional convolutional layer and uses bilinear interpolation for upsampling, outputting second initial feature data, including: S21: The decoder of the second branch input structure uses bilinear interpolation for upsampling and two-dimensional convolution to reduce the number of channels; the corresponding correlation formula is: ; in, It is an upsampling operation. It is a two-dimensional convolution operation with a 3×3 kernel; It is the first The input of the layer is the first The layer output has 10 channels. , This is the upsampled feature matrix, here Corresponding to the number of downsampling layers, the number of channels is ,and , It is the feature matrix after two-dimensional convolution, with the number of channels being... The steps for upsampling using bilinear interpolation include: indexing the elements of the output feature matrix. Element index mapped to the input feature matrix , Based on the four nearest elements in the input feature matrix Perform interpolation The interpolation formula is: ; in, ; S22: Obtain the result of step S21 With encoder number Feature matrix after two-dimensional convolution Concatenation is performed along the channel dimension to achieve skip-step connections between the encoder and decoder. The corresponding correlation formula is as follows: in and The number of channels is , The number of channels is 2 ; S23: Perform a two-dimensional convolution on the concatenated feature matrix to further fuse features and reduce the number of channels: ; in, Number of channels ; S24: Repeat steps S21 to S23 three times, and output the second initial feature data. .
7. A single-unit wind power ultra-short-term forecasting device based on WNet, characterized in that, include: The acquisition module is used to acquire preprocessed sample data of the target unit. The sample data includes historical power data, historical meteorological data and numerical weather prediction data. The preprocessing includes outlier removal and standardization to eliminate dimensional differences. The first construction module is used to construct a dual-branch input structure based on the preprocessed sample data. The first branch input structure combines the preprocessed historical power data and the historical meteorological data into a joint input matrix. The second branch input structure inputs the preprocessed numerical weather forecast data. The first branch input structure is an encoder-decoder structure, and the upsampling operation of each layer of the decoder corresponds to the downsampling operation in the encoder. The second construction module is used to construct a WNet model suitable for wind power prediction based on the dual-branch input structure, and obtain the feature processing results output by the WNet model. The feature processing results include historical data feature vectors corresponding to the first branch input structure and numerical weather forecast feature vectors corresponding to the second branch input structure. The construction of the WNet model based on the dual-branch input structure and the acquisition of the feature processing results output by the WNet model include: adjusting the dual-branch input structure to make the height and width of the input data even and not less than preset values; the encoder of the two-branch input structure extracts features through a two-dimensional convolutional layer and obtains multi-scale feature representations by combining downsampling operations; and extracts and compresses features from the multi-convolutional feature maps output by the encoder through bottleneck layers, respectively, and passes the corresponding high-dimensional information to the decoder; the decoder achieves feature fusion through a two-dimensional convolutional layer and performs upsampling using bilinear interpolation, outputting first initial feature data and second initial feature data; and adjusts the height and width of the first initial feature data and the second initial feature data according to the target size using bilinear interpolation to obtain the feature processing results. The splicing module is used to splice the historical data feature vector and the numerical weather forecast feature vector along the feature dimension to obtain combined features; The output module is used to perform deep fusion and transformation of the combined features through a multilayer perceptron network and output wind power prediction results.
Citation Information
Patent Citations
Short-term wind power prediction method fusing multi-source information
CN111160621A
Short-time wind power prediction system and method for wind power plant
CN115564092A
