A wind power prediction method based on wavelet-sg noise reduction and related equipment
By combining wavelet-SG denoising method and deep spatiotemporal attention network, the problem of balancing noise filtering and feature preservation in wind power prediction is solved, improving prediction accuracy and real-time performance, and is suitable for wind power prediction in complex environments.
Patent Information
- Application Number
- CN202611050624.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-11-06
AI Technical Summary
Existing wind power forecasting methods struggle to balance filtering high-frequency noise with preserving local physical features when processing noisy data, resulting in insufficient forecast accuracy and lag. Furthermore, traditional single-network methods are ineffective in predicting complex, non-stationary wind power sequences.
The wavelet-SG denoising method is used to perform adaptive thresholding and wavelet reconstruction on the wind power sequence. Combined with multinomial smoothing filtering and deep spatiotemporal attention network, the prediction accuracy and real-time performance are improved through adaptive threshold denoising, local least squares fitting smoothing and feature extraction.
It achieves the preservation of local physical characteristics while removing high-frequency noise, improves the stability and accuracy of wind power prediction, reduces prediction errors, and adapts to the real-time prediction needs in complex environments.
Smart Images

Figure CN123048926A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wind power prediction technology, specifically involving a wind power prediction method and related equipment based on wavelet-SG denoising. Background Technology
[0002] Current mainstream wind power forecasting methods can be divided into two categories: physical methods and data-driven artificial intelligence methods. Physical methods, centered on numerical weather prediction, heavily rely on detailed geographical and meteorological modeling. However, they suffer from limited generalization ability and high computational costs, making them unsuitable for site-level forecasting needs in complex terrains. In recent years, data-driven methods, represented by deep learning, have become the mainstream research approach. Long Short-Term Memory (LSTM) networks, with their excellent modeling ability for long-range time series dependencies, have been widely used in wind power forecasting. However, wind farms operate in harsh outdoor environments, and the collected power data often contains a large amount of broadband random noise and local abrupt changes. A single deep learning model cannot directly extract effective physical evolution patterns from noisy data, leading to a significant decline in forecast accuracy.
[0003] To address this challenge, the industry has widely adopted signal preprocessing techniques to assist in modeling. Current mainstream solutions include Empirical Mode Decomposition (EMD), Variational Mode Decomposition (VMD), and Wavelet Transform (WT). EMD is prone to mode aliasing, making it unable to stably separate power fluctuation characteristics at different scales. While VMD effectively overcomes mode aliasing, its decomposition performance is highly dependent on the manual tuning of the preset number of modes K and the penalty factor α. Furthermore, the parallel prediction of multiple subsequences exponentially increases computational complexity, making it difficult to meet the real-time requirements of ultra-short-term prediction. Wavelet Transform, as a classic time-frequency analysis tool, performs excellently in denoising scenarios. However, when using only soft / hard thresholding for denoising, it is highly susceptible to "ringing effects" and artifacts at local abrupt changes such as power jumps caused by sudden wind speed variations, resulting in distortion and loss of core physical features.
[0004] In summary, existing single noise reduction or signal decomposition schemes have always failed to achieve an ideal balance between "fully filtering out high-frequency noise" and "completely preserving local physical features." At the same time, the computational cost of complex decomposition methods is too high, making it difficult to balance prediction accuracy and real-time requirements. There is an urgent need to build a new wind power prediction framework that balances efficient noise smoothing, no local distortion, and compatibility with deep learning feature mining. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a wind power prediction method and related equipment based on wavelet-SG denoising, which addresses the shortcomings of the prior art. This method solves the problems that existing single denoising methods are prone to signal feature loss, and that traditional single networks have insufficient prediction accuracy and lag for complex non-stationary wind power sequences.
[0006] The objective of this invention is achieved through the following technical solutions: In a first aspect, the present invention provides a wind power prediction method based on wavelet-SG denoising, comprising: Obtain historical wind power sequence data from wind farms; The wind power sequence data is decomposed by wavelet decomposition, and the decomposed detail coefficients are processed and reconstructed by wavelet based on an adaptive threshold to obtain a preliminary denoised sequence. The initial denoised sequence is smoothed by local least squares fitting using a polynomial smoothing filter to obtain a hybrid denoised sequence. The hybrid denoising sequence is reconstructed into feature samples using a sliding window, and the feature samples are normalized to obtain normalized feature samples. The normalized feature samples are input into a pre-trained deep spatiotemporal attention network for feature extraction and prediction to obtain normalized prediction values. The normalized predicted value is denormalized according to the normalization parameter to obtain the final wind power predicted value.
[0007] As a further improvement of the present invention, before performing wavelet decomposition on the wind power sequence data, a step of outlier detection and correction on the wind power sequence data is included, specifically: Calculate the first and third quartiles of the wind power sequence data, and obtain the interquartile range; Based on the first quartile, the third quartile, and the interquartile range, the upper and lower boundaries for outlier detection are set. Determine whether the current data point in the wind power sequence data exceeds the upper and lower boundaries. If it does, it is determined to be an outlier, and a one-dimensional median filter is used to select the adjacent data points before and after the outlier for replacement and correction.
[0008] As a further improvement of the present invention, the step of performing wavelet decomposition on the wind power sequence data, and processing and reconstructing the decomposed detail coefficients based on an adaptive threshold to obtain a preliminary denoised sequence includes: The wind power sequence data is decomposed into multiple layers using discrete wavelet transform to obtain approximation coefficients and detail coefficients for each layer. Based on the first-level detail coefficients, the median absolute deviation method is used to estimate the noise standard deviation; The adaptive threshold is calculated based on the noise standard deviation and the sequence length. A soft thresholding function is used, and the adaptive threshold is applied to process the detail coefficients of each layer. The processed detail coefficients and the approximation coefficients are subjected to discrete wavelet inverse transform to reconstruct the preliminary denoised sequence.
[0009] As a further improvement of the present invention, the step of using a polynomial smoothing filter to perform local least-squares fitting smoothing on the initial denoised sequence to obtain a hybrid denoised sequence includes: The Savitzky-Golay filter is used as the polynomial smoothing filter. Within a sliding window centered on the current target data point, a polynomial of a preset order is used to fit and calculate the initial denoised sequence; The least squares solution is obtained by minimizing the sum of squared fitting errors as the objective function. The solution process is equivalent to a discrete convolution operation. The initial denoised sequence is then filtered and smoothed using the filter convolution coefficients to obtain the hybrid denoised sequence.
[0010] As a further improvement of the present invention, the step of reconstructing the hybrid denoising sequence into feature samples using a sliding window and normalizing the feature samples to obtain normalized feature samples includes: The historical observation time step is set as the length of the sliding window, and the one-dimensional hybrid denoising sequence is converted into a multi-dimensional input matrix and target prediction vector to construct the feature sample. The maximum and minimum values in the input matrix are obtained as the normalization parameters. The input matrix is linearly mapped using the normalization parameter by the maximum-minimum normalization method to obtain the normalized feature samples.
[0011] As a further improvement of the present invention, the deep spatiotemporal attention network includes a local feature extraction module, a bidirectional temporal feature extraction module, and a self-attention module connected in sequence; The normalized feature samples are input into a pre-trained deep spatiotemporal attention network for feature extraction and prediction to obtain normalized predicted values. The specific data processing procedure is as follows: The local feature extraction module includes a one-dimensional convolutional neural network, which is used to perform local feature mapping on the input normalized feature samples and extract local power mutation features. The bidirectional temporal feature extraction module includes a bidirectional long short-term memory network, which is used to receive the local power mutation features, calculate the forward hidden state and the reverse hidden state respectively and splice them together to output temporal features containing long-range evolutionary dependencies. The self-attention module is used to receive the temporal features, calculate the query vector, key vector and value vector respectively, dynamically weight the key time steps in the temporal features by calculating the self-attention weights, and output the attention feature matrix. The attention feature matrix is sequentially passed through a global average pooling layer and a fully connected layer for dimensionality reduction and mapping, and the normalized prediction value is output.
[0012] As a further improvement of the present invention, the deep spatiotemporal attention network is pre-trained through the following model training steps: Obtain historical wind power training data, perform denoising, smoothing and normalization processing on the historical wind power training data, and construct a model training sample set; The training sample set of the model is input into a deep spatiotemporal attention network for forward propagation, and the network prediction results are output. A training loss function is constructed based on the mean squared error, and an L2 regularization penalty term is added to the training loss function; The Adam optimizer is used to update the weight parameters of network nodes through backpropagation based on the training loss function until the preset early stopping mechanism condition or the maximum number of iterations is reached, thus obtaining the trained deep spatiotemporal attention network.
[0013] As a further improvement of the present invention, the step of performing denormalization processing on the normalized predicted value according to the normalization parameter to obtain the final wind power predicted value includes:
[0014] in, This is the predicted value of actual wind power. For normalized predicted values, The maximum value, It is the minimum value.
[0015] Secondly, the present invention provides a wind power prediction system based on wavelet-SG denoising, comprising: The data acquisition module is used to acquire historical wind power sequence data of wind farms; The wavelet denoising module is used to perform wavelet decomposition on the wind power sequence data, and process and reconstruct the decomposed detail coefficients based on an adaptive threshold to obtain a preliminary denoised sequence. A polynomial smoothing module is used to perform local least-squares fitting smoothing on the initial denoised sequence using a polynomial smoothing filter to obtain a hybrid denoised sequence. The feature construction module is used to reconstruct the hybrid denoising sequence into feature samples using a sliding window, and to normalize the feature samples to obtain normalized feature samples. The network prediction module is used to input the normalized feature samples into a pre-trained deep spatiotemporal attention network for feature extraction and prediction to obtain normalized prediction values. The inverse normalization module is used to inverse normalize the normalized predicted value according to the normalization parameters to obtain the final wind power predicted value.
[0016] Thirdly, the present invention provides a computer device, comprising: a processor and a computer-readable storage medium; A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the wind power prediction method based on wavelet-SG denoising as described above.
[0017] Fourthly, the present invention provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and executed as described above for wind power prediction based on wavelet-SG denoising.
[0018] The beneficial effects of this invention are as follows: This invention provides a wind power prediction method based on wavelet-SG denoising. It decomposes wind power sequence data using wavelet decomposition and processes and reconstructs detail coefficients based on an adaptive threshold. The adaptive threshold is dynamically adjusted according to the noise level of each detail coefficient, allowing the high-frequency noise suppression intensity to change with the local features of the signal. This overcomes the shortcomings of existing technologies where fixed threshold denoising leads to excessive smoothing of effective abrupt changes or excessive noise residue. Furthermore, it uses a polynomial smoothing filter to perform local least-squares fitting smoothing on the initial denoised sequence to obtain a hybrid denoised sequence. Based on wavelet denoising, residual spikes are smoothed using local polynomial fitting, overcoming the shortcomings of existing technologies where wavelet reconstruction may introduce pseudo-Gibbs oscillations and insufficient smoothness of the denoised sequence. Finally, it uses a sliding window to reconstruct the hybrid denoised sequence into feature samples and performs normalization processing. This invention transforms a one-dimensional time series into a two-dimensional sample matrix and unifies the dimensions, overcoming the shortcomings of existing technologies that directly input the original sequence, resulting in inconsistent network input dimensions, divergent numerical distributions, and difficulties in model convergence. By inputting normalized feature samples into a pre-trained deep spatiotemporal attention network for feature extraction and prediction, this network dynamically allocates feature weights at different times and spatial locations through an attention mechanism. This allows the model to focus on historical periods that contribute significantly to the current prediction, overcoming the shortcomings of traditional recurrent neural networks that treat all historical periods equally and allow irrelevant periods to interfere with prediction accuracy. Finally, by inverse-normalizing the normalized predicted values according to the normalization parameters, the final wind power prediction value is obtained, restoring the dimensionless value of the network output to the original power dimension. This overcomes the shortcomings of existing technologies where the dimensionless prediction output makes the results unusable for scheduling decisions. The spatiotemporal attention network of this invention captures long-range dependencies on the denoised clean sequence, inverse normalization ensures the usability of the output, and the collaborative efforts of each layer achieve a balance between noise suppression and feature preservation, ultimately improving the stability and accuracy of wind power prediction. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the wind power prediction method based on wavelet-SG denoising in an embodiment of the present invention. Figure 2 This is an internal structural diagram of a computer device in an embodiment of the present invention. Detailed Implementation
[0021] To make the objectives and technical solutions of this invention clearer and easier to understand, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. The specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.
[0022] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific embodiments. The described embodiments are only some embodiments of the present invention, and not all embodiments.
[0023] Existing wind power forecasting methods are mainly divided into physical methods and data-driven methods. Physical methods, represented by numerical weather prediction, heavily rely on accurate geographical and meteorological modeling, have limited generalization ability, and are computationally expensive. In recent years, data-driven methods, represented by deep learning, have become mainstream, with Long Short-Term Memory (LSTM) networks showing significant advantages in handling time-series dependencies. However, when the power data collected from wind farms in harsh environments contains a large amount of broadband random noise and local abrupt changes, a single network model often struggles to directly extract effective physical evolution patterns, leading to a decrease in prediction accuracy.
[0024] To alleviate these problems, existing solutions often incorporate various signal preprocessing techniques. Empirical Mode Decomposition (EMD) is susceptible to mode aliasing; while Variational Mode Decomposition (VMD) overcomes aliasing, its decomposition performance heavily relies on the preset number of modes and penalty factor, and requires parallel prediction of multiple subsequences, resulting in exponentially increasing computational complexity and making it difficult to meet real-time requirements. Wavelet transform, as a classic time-frequency analysis tool, performs excellently in denoising; however, simply using wavelet soft or hard thresholding often produces ringing effects or local artifacts at local abrupt changes in the signal, causing distortion and loss of useful signal features.
[0025] Furthermore, traditional single-time-series networks often suffer from prediction lag when wind power experiences sharp increases or decreases because they cannot assign differentiated attention to key time steps, making it difficult to meet the accuracy requirements of grid-connected dispatch under extreme weather conditions.
[0026] To address the aforementioned shortcomings, this application provides a wind power prediction method based on wavelet and SG denoising. It integrates multi-resolution wavelet adaptive threshold denoising, Savitzky-Golay polynomial local least squares smoothing, and deep spatiotemporal attention network into the same closed-loop prediction process. This allows the original wind power sequence to undergo high-fidelity hybrid denoising before being fed into the prediction model, thereby removing high-frequency random noise while fully preserving the local abrupt change characteristics of the power waveform.
[0027] Example 1 This embodiment provides a wind power prediction method based on wavelet-SG denoising, and the specific implementation method is as follows.
[0028] S1. Obtain historical wind power sequence data of wind farms.
[0029] Historical wind power sequence data refers to a one-dimensional time series consisting of the active power output values of wind turbine generators continuously recorded by the wind farm data acquisition and monitoring control system (SCADA) within a specific sampling period. This sequence data is the fundamental input for all subsequent data processing and model analysis, and its data quality directly determines the effectiveness of subsequent noise reduction processing and predictive modeling. Figure 1 As shown, the process sequentially involves outlier correction, wavelet decomposition for denoising, SavitzkyGolay secondary smoothing, feature reconstruction and normalization, deep spatiotemporal attention network prediction, and inverse normalization output.
[0030] This embodiment also includes a step of outlier detection and correction for the wind power sequence data, specifically: calculating the first quartile and the third quartile of the wind power sequence data, and obtaining the interquartile range; setting the upper and lower boundaries for outlier detection based on the first quartile, the third quartile, and the interquartile range; determining whether the current data point in the wind power sequence data exceeds the upper and lower boundaries, and if it does, determining it as an outlier, and using a one-dimensional median filter to select adjacent data points before and after the outlier for replacement and correction.
[0031] This paper employs the interquartile range (IQR) algorithm for anomaly detection. The power sequence is calculated. First quartile With the third quartile This leads to the interquartile range. The outlier detection boundary is:
[0032]
[0033] If the true power value at a certain moment or If any data point is found to be outlier, it is identified as an anomaly. To maintain the physical continuity of the time series, a one-dimensional median filter is used to select adjacent preceding and following data points for replacement and correction, thereby obtaining the cleaned wind power series. .
[0034] S2. Perform wavelet decomposition on the wind power sequence data, and process and reconstruct the detailed coefficients after decomposition based on adaptive threshold to obtain a preliminary denoised sequence.
[0035] Specifically, the wind power sequence data is decomposed into multiple layers using discrete wavelet transform to obtain approximation coefficients and detail coefficients at each layer; based on the first layer detail coefficients, the noise standard deviation is estimated using the median absolute deviation method; an adaptive threshold is calculated based on the noise standard deviation and the sequence length; a soft threshold function is used to process the detail coefficients at each layer using the adaptive threshold; and the processed detail coefficients and approximation coefficients are subjected to inverse discrete wavelet transform to reconstruct a preliminary denoised sequence.
[0036] Wavelet decomposition refers to using discrete wavelet transform to decompose the input wind power sequence data into multiple layers, obtaining approximation coefficients and detail coefficients at each layer. The approximation coefficients reflect the low-frequency trend components of the signal, while the detail coefficients at each layer reflect the high-frequency detail components of the signal at different scales. The broadband random noise mixed in the wind power sequence is mainly distributed in the high-frequency detail coefficients; therefore, noise suppression can be achieved by specifically processing the detail coefficients.
[0037] As some embodiments of the present invention, the sym4 wavelet basis function is selected for the cleaned sequence. conduct Layered discrete wavelet decomposition yields approximate coefficients. and multi-layer detail coefficient To avoid over-denoising caused by a fixed threshold, this invention employs an adaptive threshold estimation algorithm based on median absolute deviation (MAD). First, the noise standard deviation is estimated using the first-layer detail coefficients. Noise standard deviation for:
[0038] Calculate the adaptive threshold based on the general threshold criterion. :
[0039] in, Where is the sequence length; to ensure the continuity of the reconstructed signal, a soft thresholding function is used to process the high-frequency detail coefficients:
[0040] Finally, an inverse wavelet transform is performed on the processed coefficients to obtain a preliminary denoised sequence. .
[0041] S3. Use a polynomial smoothing filter to perform local least squares fitting smoothing on the initial denoised sequence to obtain a hybrid denoised sequence.
[0042] While wavelet thresholding can effectively filter out high-frequency random noise, wavelet reconstruction often induces ringing effects and local artifacts at local extrema where sudden changes in wind speed cause drastic power jumps, leading to signal distortion. This invention employs a series Savitzky-Golay (SG) filter for secondary smoothing. The core idea of SG filtering is to perform polynomial least-squares fitting on local data within a sliding window. This smooths residual noise while perfectly preserving key nonlinear characteristics of wind power, such as peaks, troughs, and widths.
[0043] In this invention, the Savitzky-Golay filter is specifically used as the polynomial smoothing filter. The Savitzky-Golay filter is a polynomial smoothing method based on local least squares fitting. Its core idea is to use a polynomial of a preset order to fit the initial denoised sequence within a sliding window centered on the current target data point, and solve for the least squares solution with the objective function of minimizing the sum of squared fitting errors.
[0044] A sliding window is a local data interval centered on the current target data point and extending forward and backward by m data points. The total length of the window is 2m plus 1.
[0045] Specifically, in terms of data points Centered sliding window Inside, adopt polynomial of order right A fitting operation is performed. The optimization objective is to minimize the sum of squared fitting errors:
[0046] After solving this least squares problem, the filtering process is equivalent to a set of fixed coefficients. Discrete convolution operation:
[0047] This embodiment uses a second-order polynomial ( ) and a window with a length of 5 ( The final output is a high-quality, denoised sequence that eliminates local distortions. .
[0048] S4. Use a sliding window to reconstruct the hybrid denoised sequence into feature samples, and normalize the feature samples to obtain normalized feature samples.
[0049] To adapt to the supervised learning mode of deep learning models, a sliding window technique is adopted. Feature extraction and reconstruction are performed. The historical observation time step is set to... Transforming one-dimensional time series data into a multi-dimensional feature matrix With the target prediction vector :
[0050]
[0051] At the same time, the feature data is mapped to The normalization interval is used to eliminate dimensional differences, accelerate the convergence speed of neural network gradient descent, and improve the model's generalization ability. The normalization formula is:
[0052] in, This represents the minimum value of the feature within the sliding window. This is the maximum value.
[0053] S5. Input the normalized feature samples into a pre-trained deep spatiotemporal attention network for feature extraction and prediction to obtain normalized prediction values.
[0054] The deep spatiotemporal attention network comprises a local feature extraction module, a bidirectional temporal feature extraction module, and a self-attention module connected in sequence. The design of this network architecture fully considers the dual characteristics of wind power sequences, which exhibit both local abrupt changes and long-range dependencies.
[0055] The local feature extraction module contains a one-dimensional convolutional neural network (CNN) used to perform local feature mapping on the input normalized feature samples and extract local power abrupt change features. The one-dimensional convolutional layer captures local correlations between adjacent time steps through sliding operations of the convolutional kernel along the sequence direction, effectively identifying short-term power fluctuation patterns. The local feature extraction process is represented as follows:
[0056] in, For convolution kernel, Represents the convolution operation. Representative batch normalization operation.
[0057] The bidirectional temporal feature extraction module includes a bidirectional long short-term memory network (LSTM) to receive local power mutation features. It calculates the forward and reverse hidden states separately and concatenates them, outputting temporal features containing long-range evolutionary dependencies. The LSTM network processes sequence data simultaneously along both the forward (from past to future) and reverse (from future to past) time dimensions. The forward hidden state h (right arrow t) encodes the influence of historical information on future states, while the reverse hidden state h (left arrow t) encodes the retrospective influence of future information on the current state. The complete temporal features are obtained through concatenation operations. Specifically, the... Input is fed into a bidirectional long short-term memory network layer to compute the forward hidden state. With reverse hidden state The complete temporal features are obtained by splicing them together.
[0058] Next, The attention weights are calculated from the input attention layer, as shown in the following expression:
[0059]
[0060]
[0061] in, , , These are the query vector, key vector, and value vector, respectively. The key dimension is the self-attention mechanism, which enables the model to adaptively assign higher weights to the time steps in the historical time series that have the most critical impact on the current prediction time, effectively alleviating the prediction lag problem of traditional time series models during periods of drastic fluctuations.
[0062] The attention feature matrix is sequentially passed through a global average pooling layer and a fully connected layer for dimensionality reduction and mapping, outputting a normalized prediction value. The global average pooling layer compresses the attention feature matrix into a one-dimensional vector, and the fully connected layer maps this vector to the final scalar prediction output.
[0063] The deep spatiotemporal attention network is pre-trained through the following model training steps: Historical wind power training data is acquired, and this data is denoised, smoothed, and normalized to construct a model training sample set; the model training sample set is input into the deep spatiotemporal attention network for forward propagation, and the network prediction results are output; a training loss function is constructed based on the mean squared error, and an L2 regularization penalty term is added to the training loss function; the Adam optimizer is used to update the weight parameters of the network nodes based on the training loss function through backpropagation until a preset early stopping mechanism condition or the maximum number of iterations is reached, resulting in the trained deep spatiotemporal attention network. Specifically, in this embodiment, an L2 regularization penalty term is added to the training loss function:
[0064] in, Mean square error, The regularization coefficient is . This refers to network weights.
[0065] S6. Perform inverse normalization on the normalized predicted value according to the normalization parameter to obtain the final wind power predicted value.
[0066] Specifically, the test set data is input into the trained and converged deep spatiotemporal attention network for forward propagation to obtain the normalized prediction results of the network output. To obtain wind power predictions with practical physical meaning, inverse normalization is performed using the aforementioned maximum and minimum parameters. The formula is as follows:
[0067] Finally obtained This is the actual predicted wind power value. Compared with the un-noise-reduced model, the prediction results of this invention show a significant reduction in both root mean square error (RMSE) and average absolute error (MAE).
[0068] To verify the predictive performance of this invention in the daily operation scenario of an inland plain wind farm, a large onshore wind farm in northern my country was selected as the implementation object. This wind farm has flat terrain and wind speeds exhibit typical diurnal periodic fluctuations. However, due to aging sensor equipment and the impact of long-distance communication, the power sequences recorded by its Supervisory Control and Data Acquisition (SCADA) system are often mixed with high-frequency electromagnetic noise and mechanical noise. This embodiment provides a detailed description of the method of this invention based on a set of actual operating data from this wind farm. The specific steps are as follows: Step 1: Collect historical wind power data for the wind farm for 20 consecutive days from March 1, 2023 to March 20, 2023 (sampling interval is 5 minutes, totaling 5760 sample points). Use the interquartile range (IQR) algorithm to detect outliers, and use a one-dimensional median filter to smooth and replace the detected outliers.
[0069] Step 2: The repaired power data is decomposed into 5-level discrete wavelet decomposition using the sym4 wavelet basis. The median absolute deviation is estimated based on the first-level detail coefficients. The adaptive threshold is calculated and soft thresholding is performed before reconstructing the signal to remove high-frequency wind noise. Subsequently, a second-order Savitzky-Golay (SG) filter with a window length of 5 is used to perform local polynomial fitting on the wavelet reconstructed signal to eliminate local artifacts and ringing effects.
[0070] Step 3: Slide the high-quality sequence after noise reduction through a window of 216 time steps (corresponding to an 18-hour historical span) to construct a supervised learning feature matrix, and use the Min-Max method to map the data to the [0,1] interval, dividing it into training and test sets in an 8:2 ratio.
[0071] Step 4: Input the training set into the CNN-BiLSTM-Attention joint network. Local fluctuation features are extracted through one-dimensional convolution (32 channels, 5 kernels), and then input into a BiLSTM layer containing 64 neurons to extract bidirectional long-range temporal dependencies. A multi-head self-attention layer (2 heads) dynamically allocates time-step weights, and finally outputs the prediction results. The training process uses the Adam optimizer and L2 regularization.
[0072] Step 5: Input the test set into the converged training model for single-step rolling prediction, and perform inverse normalization on the network output to obtain the final wind power prediction value and calculate the evaluation index.
[0073] Wind power prediction is based on a wavelet-SG hybrid denoising method and a deep spatiotemporal attention network. Addressing the characteristics of wind farms in actual operation, such as strong wind speed randomness, sensor-acquired signals containing a large amount of broadband high-frequency noise, and local abrupt changes, a multi-resolution wavelet transform is used for preliminary denoising, combined with local polynomial smoothing filtering and a deep network for accurate prediction. Traditional single wavelet denoising methods are prone to producing distorted ringing effects near power abrupt changes (such as step jumps caused by gusts), while conventional moving average filtering tends to smooth out the true physical extrema, causing the deep learning network to receive incorrect temporal features, thus leading to decreased prediction accuracy and time lag.
[0074] The Savitzky-Golay filtering algorithm is a polynomial smoothing method based on local least squares fitting. It effectively smooths residual noise while perfectly preserving the nonlinear dynamic characteristics of the signal waveform, such as peaks, troughs, and width. Hybrid cascading wavelet transform and SG filtering leverages the advantages of wavelet filtering for global broadband noise while completely eliminating reconstruction artifacts using SG filtering, achieving lossless denoising of complex wind power signals. For the cleaned, high-quality data, this invention designs a CNN-BiLSTM-Attention prediction architecture. CNN extracts micro-changes, BiLSTM captures macro-trends, and a self-attention mechanism strengthens the perception weights for key meteorological nodes. The effectiveness of this method is verified through testing on a real wind farm dataset. Compared to undenoised models or single signal decomposition algorithms, this method exhibits overwhelming advantages in the coefficient of determination (R²) and root mean square error (RMSE), significantly reducing the risk of overfitting. It possesses key theoretical innovation significance and extremely high engineering application value for power grid dispatching.
[0075] To further verify the predictive robustness of this invention under extreme weather conditions, an offshore wind farm along the eastern coast of my country was selected as the implementation subject. Offshore wind farm environments are extremely complex, especially during the peak typhoon season in summer and autumn, when drastic changes in wind speed cause wind turbine output to drop sharply or climb in stages. This highly volatile data not only includes broadband environmental noise caused by turbulence but also exhibits extremely strong nonlinear characteristics, posing a significant challenge to the anti-interference capability of the prediction model. This embodiment is based on measured data during a typhoon, and the specific steps are as follows: Step 1: Collect ultra-short-term wind power data of the offshore wind farm during the typhoon season (August 1, 2023 - August 15, 2023) (sampling interval is 5 minutes, totaling 4320 sample points). For communication packet loss and spike anomalies caused by severe weather, the interquartile range (IQR) algorithm is used for location, and median filtering is used to complete the continuity restoration of the data sequence.
[0076] Step 2: In response to the drastic fluctuations in power sequences during the typhoon season, we first perform a 5-level decomposition of the sym4 wavelet to extract the trend term and use an adaptive soft threshold based on MAD to remove high-frequency turbulence noise. On this basis, we introduce a Savitzky-Golay (SG) filter with a polynomial order of 2 and a window length of 5 for secondary fine smoothing to ensure that the waveform does not become distorted in the range of drastic rises or falls in wind power.
[0077] Step 3: Transform the double-smoothed data into a multi-dimensional time-series feature set. Set the sliding window length to 144 (corresponding to 12 hours of historical input) and predict the power value at the next time step. Use the extreme value normalization formula to eliminate the dimensional influence caused by drastic data fluctuations, accelerating the stable convergence of the subsequent neural network gradient.
[0078] Step 4: Construct a deep prediction network. The input data is first reduced in dimensionality of local spatial features by adding a Conv1D layer with Dropout and batch normalization. Then, it enters a BiLSTM layer to mine the dynamic patterns of the context in the massive time series data. Next, by introducing a Self-Attention mechanism, higher attention weights are automatically assigned to key historical data before the sudden change in wind speed.
[0079] Step 5: Input the test set data into the trained prediction model, perform inverse normalization on the normalized values output by the model to restore them to the actual power, and complete the error analysis and model performance evaluation by comparing them with the real power data.
[0080] To address the technical challenges of extremely drastic wind speed variations and abrupt power fluctuations in offshore wind power or extreme weather scenarios, a wind power prediction framework based on wavelet-SG cascaded noise reduction and a deep spatiotemporal attention network is proposed. In such highly volatile scenarios, the raw acquired data contains not only high-frequency mechanical noise from wind turbine blade rotation but also environmental noise caused by airflow turbulence. Traditional variational mode decomposition (VMD) or empirical mode decomposition (EMD) methods are problematic. Firstly, parameter optimization is extremely time-consuming. Secondly, mode aliasing is prone to occur, and the multiple low-energy subsequences derived from the decomposition often interfere with the attention allocation of the deep network.
[0081] This invention innovatively introduces a wavelet-SG hybrid denoising mechanism. Wavelet adaptive threshold denoising quickly filters out background white noise; while Savitzky-Golay filtering performs detail filtering, using least-squares polynomials to repair the waveform within a sliding window. This perfectly repairs high-frequency spikes and ringing distortion left by the inverse wavelet transform without changing the wind power ramp / drop slope. After obtaining a clean and faithful wind power sequence, this embodiment feeds it into a CNN-BiLSTM-Attention joint model. Due to the introduction of a self-attention mechanism, when facing complex nonlinear sequences during typhoon season, the model no longer blindly and equally memorizes all historical segments, but intelligently focuses on the core precursor time steps that cause dramatic power changes. Extensive engineering experiments show that this prediction method effectively overcomes the fatal weaknesses of traditional deep learning models, such as prediction lag and large peak and trough prediction biases under extreme weather conditions. Compared with a single denoising network, its test set average absolute error (MAE) is significantly reduced, providing solid technical support for the grid connection safety of new power systems in response to extreme weather.
[0082] Example 2 This embodiment provides a wind power prediction system based on wavelet-SG denoising, the system comprising: The data acquisition module is used to acquire historical wind power sequence data of wind farms; The wavelet denoising module is used to perform wavelet decomposition on the wind power sequence data, and process and reconstruct the decomposed detail coefficients based on an adaptive threshold to obtain a preliminary denoised sequence. A polynomial smoothing module is used to perform local least-squares fitting smoothing on the initial denoised sequence using a polynomial smoothing filter to obtain a hybrid denoised sequence. The feature construction module is used to reconstruct the hybrid denoising sequence into feature samples using a sliding window, and to normalize the feature samples to obtain normalized feature samples. The network prediction module is used to input the normalized feature samples into a pre-trained deep spatiotemporal attention network for feature extraction and prediction to obtain normalized prediction values. The inverse normalization module is used to inverse normalize the normalized predicted value according to the normalization parameters to obtain the final wind power predicted value.
[0083] Specific limitations regarding the wavelet-SG denoising-based wind power prediction system can be found in the above section on the limitations of the wavelet-SG denoising-based wind power prediction method; the corresponding technical effects are equivalent and will not be repeated here. Each module in the aforementioned wavelet-SG denoising-based wind power prediction system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, allowing the processor to call and execute the corresponding operations of each module.
[0084] Example 3 Figure 2 An internal structural diagram of a computer device is shown in one embodiment. This computer device may specifically be a terminal or a server. Figure 2 As shown, the computer device includes a processor, memory, network interface, display, camera, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a wind power prediction method based on wavelet-SG noise reduction. The display screen can be an LCD screen or an e-ink display screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device casing, or an external keyboard, touchpad, or mouse.
[0085] As will be understood by those skilled in the art, computer equipment Figure 2 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. A specific computing device may include more or fewer components than those shown in the figure, or combine certain components, or have the same component arrangement.
[0086] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described above.
[0087] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0088] In summary, the wind power prediction method, system, computer equipment, and storage medium based on wavelet-SG denoising provided in this application achieve full-process optimization of wind power sequences from data cleaning to intelligent prediction through the synergistic cooperation of a wavelet-SG hybrid cascade denoising mechanism and a deep spatiotemporal attention network. The multi-scale resolution characteristics and adaptive threshold strategy of wavelet transform accurately remove broadband random high-frequency noise, while the local polynomial least squares smoothing of the Savitzky Golay filter completely eliminates the ringing effect and artifacts generated at local abrupt change points in wavelet reconstruction. The two are cascaded to form an efficient and lightweight hybrid denoising link. The high-quality sequence after hybrid denoising is fed into a CNNBiLSTMAttention joint network. A one-dimensional convolutional neural network extracts local power change features, a bidirectional long short-term memory network captures bidirectional long-range evolutionary dependencies, and a self-attention mechanism dynamically focuses on key historical time steps. The three work together to accurately capture local fluctuations and global trends in wind power. Compared with existing technologies where single denoising methods are prone to signal feature loss and traditional single networks have insufficient prediction accuracy and lag for complex non-stationary wind power sequences, the method proposed in this invention achieves significant reductions in indicators such as root mean square error and mean absolute error, effectively alleviating the prediction lag problem under extreme weather conditions.
[0089] The various embodiments in this specification are described in a progressive manner. For directly identical or similar parts of the embodiments, refer to each other. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. It should be noted that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0090] The above-described embodiments are merely preferred embodiments of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various improvements and substitutions without departing from the principles of the present invention, and these improvements and substitutions should also be considered within the scope of protection of the present invention. Therefore, the scope of protection of this invention should be determined by the scope of the claims.
Claims
1. A wind power prediction method based on wavelet-SG denoising, characterized in that, include: Obtain historical wind power sequence data from wind farms; The wind power sequence data is decomposed by wavelet decomposition, and the decomposed detail coefficients are processed and reconstructed by wavelet based on an adaptive threshold to obtain a preliminary denoised sequence. The initial denoised sequence is smoothed by local least squares fitting using a polynomial smoothing filter to obtain a hybrid denoised sequence. The hybrid denoising sequence is reconstructed into feature samples using a sliding window, and the feature samples are normalized to obtain normalized feature samples. The normalized feature samples are input into a pre-trained deep spatiotemporal attention network for feature extraction and prediction to obtain normalized prediction values. The normalized predicted value is denormalized according to the normalization parameter to obtain the final wind power predicted value.
2. The wind power prediction method based on wavelet-SG denoising according to claim 1, characterized in that, Before performing wavelet decomposition on the wind power sequence data, the method further includes an outlier detection and correction step on the wind power sequence data, specifically: Calculate the first and third quartiles of the wind power sequence data, and obtain the interquartile range; Based on the first quartile, the third quartile, and the interquartile range, the upper and lower boundaries for outlier detection are set. Determine whether the current data point in the wind power sequence data exceeds the upper and lower boundaries. If it does, it is determined to be an outlier, and a one-dimensional median filter is used to select the adjacent data points before and after the outlier for replacement and correction.
3. The wind power prediction method based on wavelet-SG denoising according to claim 2, characterized in that, The wind power sequence data is subjected to wavelet decomposition, and the decomposed detail coefficients are processed and reconstructed using an adaptive threshold to obtain a preliminary denoised sequence, including: The wind power sequence data is decomposed into multiple layers using discrete wavelet transform to obtain approximation coefficients and detail coefficients for each layer. Based on the first-level detail coefficients, the median absolute deviation method is used to estimate the noise standard deviation; The adaptive threshold is calculated based on the noise standard deviation and the sequence length. A soft thresholding function is used, and the adaptive threshold is applied to process the detail coefficients of each layer. The processed detail coefficients and the approximation coefficients are subjected to discrete wavelet inverse transform to reconstruct the preliminary denoised sequence.
4. The wind power prediction method based on wavelet-SG denoising according to claim 1, characterized in that, The process of applying a polynomial smoothing filter to the initial denoised sequence using local least-squares fitting smoothing to obtain a hybrid denoised sequence includes: The Savitzky-Golay filter is used as the polynomial smoothing filter. Within a sliding window centered on the current target data point, a polynomial of a preset order is used to fit and calculate the initial denoised sequence; The least squares solution is obtained by minimizing the sum of squared fitting errors as the objective function. The solution process is equivalent to a discrete convolution operation. The initial denoised sequence is then filtered and smoothed using the filter convolution coefficients to obtain the hybrid denoised sequence.
5. The wind power prediction method based on wavelet-SG denoising according to claim 4, characterized in that, The process of reconstructing the hybrid denoising sequence into feature samples using a sliding window and then normalizing the feature samples to obtain normalized feature samples includes: The historical observation time step is set as the length of the sliding window, and the one-dimensional hybrid denoising sequence is converted into a multi-dimensional input matrix and target prediction vector to construct the feature sample. The maximum and minimum values in the input matrix are obtained as the normalization parameters. The input matrix is linearly mapped using the normalization parameter by the maximum-minimum normalization method to obtain the normalized feature samples.
6. The wind power prediction method based on wavelet-SG denoising according to claim 5, characterized in that, The deep spatiotemporal attention network includes a local feature extraction module, a bidirectional temporal feature extraction module, and a self-attention module connected in sequence. The normalized feature samples are input into a pre-trained deep spatiotemporal attention network for feature extraction and prediction to obtain normalized predicted values. The specific data processing procedure is as follows: The local feature extraction module includes a one-dimensional convolutional neural network, which is used to perform local feature mapping on the input normalized feature samples and extract local power mutation features. The bidirectional temporal feature extraction module includes a bidirectional long short-term memory network, which is used to receive the local power mutation features, calculate the forward hidden state and the reverse hidden state respectively and splice them together to output temporal features containing long-range evolutionary dependencies. The self-attention module is used to receive the temporal features, calculate the query vector, key vector and value vector respectively, dynamically weight the key time steps in the temporal features by calculating the self-attention weights, and output the attention feature matrix. The attention feature matrix is sequentially passed through a global average pooling layer and a fully connected layer for dimensionality reduction and mapping, and the normalized prediction value is output.
7. The wind power prediction method based on wavelet-SG denoising according to claim 6, characterized in that, The deep spatiotemporal attention network is pre-trained through the following model training steps: Obtain historical wind power training data, perform denoising, smoothing and normalization processing on the historical wind power training data, and construct a model training sample set; The training sample set of the model is input into a deep spatiotemporal attention network for forward propagation, and the network prediction results are output. A training loss function is constructed based on the mean squared error, and an L2 regularization penalty term is added to the training loss function; The Adam optimizer is used to update the weight parameters of network nodes through backpropagation based on the training loss function until the preset early stopping mechanism condition or the maximum number of iterations is reached, thus obtaining the trained deep spatiotemporal attention network.
8. The wind power prediction method based on wavelet-SG denoising according to claim 1, characterized in that, The step of inverse-normalizing the normalized predicted value according to the normalization parameter to obtain the final wind power predicted value includes: in, This is the predicted value of actual wind power. For normalized predicted values, The maximum value, It is the minimum value.
9. A wind power prediction system based on wavelet-SG denoising, characterized in that, include: The data acquisition module is used to acquire historical wind power sequence data of wind farms; The wavelet denoising module is used to perform wavelet decomposition on the wind power sequence data, and process and reconstruct the decomposed detail coefficients based on an adaptive threshold to obtain a preliminary denoised sequence. A polynomial smoothing module is used to perform local least-squares fitting smoothing on the initial denoised sequence using a polynomial smoothing filter to obtain a hybrid denoised sequence. The feature construction module is used to reconstruct the hybrid denoising sequence into feature samples using a sliding window, and to normalize the feature samples to obtain normalized feature samples. The network prediction module is used to input the normalized feature samples into a pre-trained deep spatiotemporal attention network for feature extraction and prediction to obtain normalized prediction values. The inverse normalization module is used to inverse normalize the normalized predicted value according to the normalization parameters to obtain the final wind power predicted value.
10. A computer device, characterized in that, include: Processor and computer-readable storage media; A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the wind power prediction method based on wavelet-SG denoising as described in any one of claims 1 to 7.
