Wind power anomaly detection and correction method and device
By combining Beta-VAE and DECTIN models, the problem of anomalies and missing data in wind power data was solved, achieving high-precision detection and correction, and improving the monitoring and prediction capabilities of wind power equipment.
Patent Information
- Application Number
- CN202510889301.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-17
AI Technical Summary
Outliers and missing values exist in wind power data, and existing methods have limited effectiveness in detection and correction, affecting the health management of wind farms and the stability of the power grid.
The Beta-VAE model is used for feature extraction and anomaly detection. Z-score normalization and dynamic thresholding are combined to generate a mask matrix. The DECTIN model is used to fill in missing signals. The hyperparameters are optimized through an improved wave search optimization algorithm to improve detection and correction accuracy.
Effectively identifying anomalies and filling in missing data improves the accuracy of wind power equipment monitoring and wind power prediction, providing strong technical support for the health management of wind power equipment.
Smart Images

Figure CN120804972A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of wind power data processing, and particularly relates to a wind power abnormality detection and correction method and device. BACKGROUND
[0002] Wind power generation, as a clean and renewable energy source, plays an important role in the optimization of global energy structure. However, the accuracy of wind power data directly affects the operation efficiency of wind farms and the reliability of power grid scheduling. In actual application, wind power data collected during the operation of wind power equipment may contain abnormal points and missing values due to the influence of factors such as wind speed, wind direction, environmental temperature, mechanical vibration, and generator current. If these abnormal and missing data are not effectively processed, it may lead to an increase in wind power prediction error and affect the health management of wind farms and the stability of power grids. Therefore, abnormality detection and missing value filling and correction of wind power data have become key technical problems in wind power operation and maintenance.
[0003] At present, common wind power abnormality detection methods include statistical analysis, machine learning, and deep learning. Among them, traditional statistical analysis methods (such as mean sliding detection, Z-score, principal component analysis, etc.) have poor adaptability to nonlinear complex signals and limited detection effect; machine learning methods (such as support vector machines, decision trees, random forests, etc.) have been improved, but are still limited by manual feature engineering and model generalization ability. In recent years, deep learning methods have made significant progress in anomaly detection, especially the variational autoencoder (VAE), whose improved version Beta-VAE can learn the latent distribution of data and calculate abnormal scores through reconstruction error, effectively improving the accuracy of anomaly detection. In terms of missing data filling and correction, traditional methods such as linear interpolation, spline interpolation, and K-nearest neighbor filling often fail to fully utilize the spatiotemporal correlation characteristics of time series, resulting in low filling accuracy. In recent years, deep learning-based time series interpolation methods have become a research hotspot, among which the convolutional time series interpolation network (DECTIN) has shown superior filling and correction ability in time series data interpolation, and can fully utilize time dependence and local patterns to generate high-quality missing data filling and correction results. However, the filling and correction effect of the DECTIN model is greatly influenced by the selection of hyperparameters, and manual tuning of hyperparameters has problems such as low efficiency and easy to fall into local optimum. Therefore, it is urgent to develop a wind power abnormality detection and correction method to effectively improve the quality of wind power data and provide important support for intelligent monitoring of wind farms, wind power prediction, and wind turbine health management. SUMMARY
[0004] Invention purposes: To solve the above technical problems, the application provides a wind power anomaly detection and correction method and device. The abnormality and missing problems in wind power data are effectively solved, the accuracy of wind power equipment monitoring and wind power prediction is improved, and strong technical support is provided for the health management of wind power equipment.
[0005] Technical solutions: The application provides a wind power anomaly detection and correction method, which comprises the following steps:
[0006] (1) Collect wind power equipment and environmental signal data through five sensors of vibration, temperature, wind direction, current and wind speed, generate time series signals and form an original signal matrix;
[0007] (2) The original signal matrix is preprocessed by using Z-score standardization method to obtain a standardized signal matrix; the scale difference between signals is eliminated;
[0008] (3) The standardized signal matrix is input into the Beta-VAE model for feature extraction and anomaly detection, the corresponding score is generated according to the RMSE and KL divergence, the threshold is set to find the abnormal points, and the abnormal score and mask matrix are generated;
[0009] (4) The mask matrix and the original signal matrix are fused to form a new encoding matrix, and the DECTIN model of the convolution time series interpolation network is used for missing signal filling and correction;
[0010] (5) The improved wave search optimization algorithm WSA is used to optimize the hyperparameters of the DECTIN model;
[0011] (6) The optimized DECTIN model is used to correct the abnormal signal.
[0012] Further, the step (1) comprises the following steps:
[0013] (11) The five sensors of vibration, temperature, wind direction, current and wind speed each generate a group of time series signals in a sampling period, denoted as X i =[x i1 ,x i2 ,…,x in ], wherein i represents the sensor number, and n represents the time step of sampling;
[0014] (12) Five groups of time series signals are combined to form an n*5-dimensional original signal matrix, and the signal matrix is as follows:
[0015]
[0016] Wherein, n represents the time step, the column number is the number of sensors, and the generated signal matrix is used as the data preprocessing input of step (2) to provide a basis for subsequent processing.
[0017] Further, the step (2) Z-score standardization process includes:
[0018] (21) Calculate the mean μ of the signal for each column of sensor signals of the original signal matrix i and the standard deviation σ i ;
[0019] (22) For each column of sensor time series signals, the following formula is used for standardization processing:
[0020]
[0021] Where: z ij is the standardized signal value; x ij is the original signal value, representing the sampling value of sensor i at time step j; μ is the mean of the ith sensor signal, used to eliminate the offset of the signal; σ is the standard deviation of the ith sensor signal, used to normalize the difference in signal amplitude. Through this standardization method, the signals of different sensors are converted to a standard distribution with a mean of 0 and a standard deviation of 1. This can effectively eliminate the differences in physical units or signal magnitudes of sensors, ensuring that subsequent models can handle different signals fairly. On the other hand, the distribution of standardized data is more uniform, which can improve the stability and accuracy of Beta-VAE in feature extraction and anomaly detection.
[0022] (23) Generate the standardized signal matrix Z n×5 , which is in the form of:
[0023]
[0024] Further, the step (3) feature extraction and anomaly detection step is as follows:
[0025] (31) Divide the standardized signal matrix Z n×5 into training set Ztrain and test set Ztest according to 8:2;
[0026] (32) Generate latent features h through the Beta-VAE model:
[0027] μ, log_var = encoder(Z)
[0028] σ = exp(0.5 * log_var) ε ~ N(0, I)
[0029] h = μ + σ ⊙ ε
[0030] Where ⊙ represents element-wise multiplication, μ represents the mean vector, and σ represents the standard deviation vector.
[0031] The Beta-VAE model is an improved version of the traditional VAE model. The core improvement is to introduce a regularization parameter β in the loss function, which strengthens the constraint on the latent feature space and forces the latent variables to follow a standard normal distribution, thereby improving the feature decoupling capability.
[0032] (33) Divide the feature subsets and calculate the indicators
[0033] Divide the latent feature space into several feature subsets, each corresponding to a different sensor type or physical feature dimension. For each subset k, independently calculate the following indicators:
[0034] Root Mean Square Error (RMSE): measures the reconstruction accuracy of subset k
[0035]
[0036] where m i is the original signal, is the reconstructed signal, and N is the number of samples.
[0037] KL divergence: measures the deviation of the latent distribution of subset k from the standard normal prior
[0038]
[0039] where d k is the dimension number of subset k, μj and σj are the mean and standard deviation of the latent variables, respectively.
[0040] (34) Generate anomaly score
[0041] Subset anomaly score:
[0042] S k = α·RMSE k + β score · KL k
[0043] where: α and βscore are adjustment parameters that control the contribution of RMSE and KL divergence to the score, βscore ≥ 0, and the weight of KL divergence in anomaly detection is increased.
[0044]
[0045] Global anomaly score:
[0046]
[0047] where: ω k is the weight of subset k, satisfying is the total number of subsets.
[0048] (35) generating a mask matrix
[0049] by dynamic threshold T i score S i determination, generating a mask matrix M representing the abnormal points:
[0050]
[0051] The dynamic threshold T calculation method is:
[0052] T i = μ s +k·σ S
[0053] Where: μ s and σ S are the mean and standard deviation of the anomaly score S i , k is an adjustable parameter (recommended value 2.0-3.0), which controls the sensitivity of anomaly detection.
[0054] Further, the step (4) includes: (41) initialize the missing position and splice the observed signal to generate the sequence of the filled and corrected sequence:
[0055]
[0056] Where, is the element by element multiplication, which ensures that the observed values remain unchanged;
[0057] (42) extract global features by self-attention mechanism:
[0058] A1=SelfAttention(Xc;M)
[0059] (43) feedforward network for nonlinear mapping:
[0060] Z1=FFN(A1)
[0061] Where, Z1 is the mapped feature matrix, which is used to further generate the filling value.
[0062] (44) reconstruction module generates an optimized sequence:
[0063]
[0064] Where, Z2 is the nonlinear mapping feature representation, is the optimized filling and correction sequence generated by the reconstruction module; W α , B α , W β and B β are the weight and bias parameters in the reconstruction module.
[0065] (45) Weighted fusion to generate the final filling correction sequence:
[0066]
[0067] where γ is the weighting matrix for fusion.
[0068] Further, the improved wave search optimization algorithm WSA of step (5) optimizes the hyperparameters of the DECTIN model, including:
[0069] (51) Calculate the fitting gradient using the central difference method
[0070] g i = (f(W +εi ) - f(W -εi )) / 2ε
[0071] W inew = W i - α·g i
[0072] where W+εi = Wi+ε, W-εi = Wi-ε, g is the gradient, and α is the step size coefficient. The initial value of α is set to α0 = 0.3,
[0073] The final step size is determined by step size test. The step size test method is as follows: if the fitness value after initial step size iteration is less than or equal to the current fitness value, then α = α0 / c, otherwise α = α0*c, where c is a scaling factor. In the formula, the central difference method is used to fit the analytical information of the optimization problem to search for the optimal solution, thereby improving the search efficiency and accuracy.
[0074] (52) Dynamic step size adjustment: when the fitness value after α iteration is less than or equal to the current value, α = α0 / c, otherwise α = α0*c, where c is a scaling factor;
[0075] (53) Reflection phase execution
[0076]
[0077] where β = 0.75 + e-i / n w2 , β is the reflection intensity coefficient, r2 is a random value between 0 and 1, and n w2 is the number of particles simulating the reflected electromagnetic wave. W fi is the position matrix of W rearranged in order of fitness value from small to large. It simulates that particles with lower fitness values encounter obstacles and reflect towards W best , while the remaining particles with higher fitness values continue to diffuse outward. best
[0078] (54) Receive phase execution of dual path selection mechanism,
[0079]
[0080] In the formula, delta is a receiving coefficient, delta=0.6+(1.2-0.5)sin(tpi / 2T), eta is a random number subject to normal distribution, and nw3 is the number of particles simulating received electromagnetic waves. is the historical optimal position obtained by convolution. Lambda is a correction factor, lambda=(2t / T-0.7) / (0.78+|2t / T-0.7|)+1. R3, r4, r5 and r6 are random numbers between 0 and 1.
[0081] Further, the wave search optimization further comprises:
[0082] The initialization stage is realized by generating an initial particle position;
[0083] adopting as the fitness index, wherein Z ture is a real signal matrix, and Z fill is a signal matrix after filling and correction;
[0084] The global development stage generates
[0085] In the formula, Wmin is a vector composed of minimum values in each dimension of W, Wmax is a vector composed of maximum values in each dimension of W, and r1 is a random number between 0 and 1;
[0086] The local exploration stage comprises three stages of electromagnetic wave emission, reflection and reception.
[0087] Further, the step (6) comprises:
[0088] The optimized Beta-VAE-DECTIN model is verified on a test set containing 20% abnormal signals;
[0089] A dynamic threshold adjustment strategy is adopted to automatically adjust the abnormality judgment threshold T according to the seasonal characteristics;
[0090] Time correlation analysis is performed on continuous abnormal points to generate a corrected confidence index.
[0091] The application further discloses a computer readable storage medium, which stores a computer program, and when the program is executed by a processor, the wind power abnormality detection and correction method is realized.
[0092] The application further discloses a wind power data processing device, comprising a processor, a memory storing a computer program, a sensor interface module connected with vibration, temperature, wind direction, current and wind speed sensors, and a communication module for transmitting the corrected signal to a wind farm monitoring platform.
[0093] Beneficial effects: Compared with the prior art, the technical scheme of the application has the following remarkable advantages: the application firstly learns the potential distribution of normal wind power data by Beta-VAE, calculates an abnormal score and identifies an abnormal point, and regards the abnormal data as missing data. Subsequently, DECTIN is used for missing data filling and correction to ensure the integrity and rationality of the data. In order to further improve the filling and correction accuracy of DECTIN, an improved wave search optimization algorithm is introduced, the key hyperparameters such as learning rate, network layer number and attention head number are optimized by simulating the propagation and reflection process of waves, so as to improve the filling and correction quality and the accuracy of abnormal detection. The method effectively improves the quality of wind power data, and provides important support for intelligent monitoring of wind farms, wind power prediction and wind turbine health management. BRIEF DESCRIPTION OF DRAWINGS
[0094] Figure 1 FIG. 1 is a flowchart of a wind power abnormality detection and correction method according to the application;
[0095] Figure 2 FIG. 2 is a framework diagram of the wind power abnormality detection and correction method according to the application. DETAILED DESCRIPTION
[0096] The technical scheme of the application will be further described in detail below through specific embodiments.
[0097] As shown in FIG. 1, the wind power abnormality detection and correction method according to the application comprises the following steps: Figure 1-2
[0098] Step (1), collect multiple signals of wind power equipment and its environment through five sensors of vibration, temperature, wind direction, current and wind speed, and each sensor generates a set of time series signals in a sampling period, denoted as X i = [x i1 ,x i2 ,…,x in ], where i denotes the sensor number and n is the time step of the sample. These signals reflect key state information of the device and environment, for example, the vibration sensor records the mechanical vibration signal when the device is running, the temperature sensor monitors the temperature change of the device and the surrounding environment, the wind direction and speed sensor records the dynamic change of the wind resource, and the current sensor measures the power output of the wind power device. The time series signals of the five sensors are combined to form a signal matrix Xn×5, where n is the time step and the number of columns is the number of sensors. The signal matrix is as follows:
[0099]
[0100] The generated signal matrix X is used as the input of step (2) to provide the basis for subsequent data preprocessing.
[0101] Step (2), data preprocessing of the signal matrix X generated in step (1) n×5 Data preprocessing is performed using the Z-score standardization method to eliminate the scale difference between different sensor signals and enhance the adaptability of the subsequent model.
[0102] Specifically, for the time series signal of each column sensor in the signal matrix, the following formula is used for standardization processing:
[0103]
[0104] Where: z ij is the standardized signal value; x ij is the original signal value, representing the sampling value of sensor i at time step j; is the mean value of the i-th sensor signal, used to eliminate the offset of the signal; is the standard deviation of the i-th sensor signal, used to normalize the difference in signal amplitude.
[0105] Through this standardization method, the signals of different sensors are uniformly converted to a standard distribution with a mean of 0 and a standard deviation of 1. This can effectively eliminate the differences in physical units or signal magnitudes of different sensors, ensuring that the subsequent model can handle different signals fairly. On the other hand, the distribution of standardized data is more uniform, which can improve the stability and accuracy of the variational autoencoder (Beta-VAE) in feature extraction and anomaly detection.
[0106] Applying the above formula to each column of the signal matrix, we can get the standardized signal matrix Z n×5 , which has the form:
[0107]
[0108] The standardized signal matrix Z n×5As the input of Beta-VAE, it can provide a balanced and high-quality data basis for the variational autoencoder, supporting more accurate feature extraction and anomaly detection.
[0109] Step (3), standardizing the signal matrix Z generated in step (2) n×5 Input the variational autoencoder (Beta-VAE) model for feature extraction and anomaly detection. The specific process is as follows: First, divide the matrix Z into training set Ztrain and test set Ztest according to the proportion of 80% and 20%. Optimize the parameters of Beta-VAE through the training set, complete the training of the model. n×5
[0110] The data set will be divided into training set according to the proportion of 80%, which is used to train the optimized Beta-VAE-DECTIN model, and the remaining 20% data is used for test set, which is used to evaluate the generalization ability and actual application effect of the model. The training set contains normal and abnormal signals, which helps the model learn signal features and anomaly detection, and the test set is used to verify the performance of the model.
[0111] In the feature extraction stage, the signal matrix Ztest is input into the encoder, which maps it to the latent feature space to generate latent features h, where h is represented by the mean vector μ and the standard deviation vector σ:
[0112] μ, σ = Encoder(Ztrain)
[0113] According to the reparameterization trick, sample the latent feature h:
[0114] h = μ + σ ⊙ ∈, ∈ ~ N(0, 1)
[0115] Where ⊙ represents element-wise multiplication.
[0116] Next, further analyze the latent feature h and divide it into several feature subsets Each subset h sub ,k represents important features related to different dimensions of signal anomaly detection. Then, decode and error calculation are independently performed for each feature subset h sub ,k. Specifically, input the feature subset h sub ,k into the decoder to generate the corresponding reconstructed signal
[0117]
[0118] Calculate the root mean square error (RMSE) of the feature subset to evaluate the reconstruction quality:
[0119]
[0120] where N k and M k are the number of samples and features of the feature subset h sub ,k respectively.
[0121] Meanwhile, the KL divergence corresponding to each feature subset is calculated:
[0122]
[0123] where σ k,j and μ k,j are the standard deviation and mean of the feature subset h sub ,k respectively.
[0124] The RMSE and KL divergence of each subset are integrated to obtain the anomaly score S k of the subset:
[0125] S k = α·RMSE k + β·D kl,k
[0126] where α and β are adjustment parameters used to control the contribution of RMSE and KL divergence to the score.
[0127] Finally, the anomaly scores of all subsets are weighted and fused to generate the global anomaly score Si:
[0128] S i = ω k ·S k,i
[0129] where ω k is the weight of the subset k, which can be dynamically adjusted according to the relevance or importance of the subset.
[0130] According to the set threshold T, the global anomaly score Si is judged for abnormal points, and the mask matrix M ij representing the abnormal points is generated, using 1 to represent abnormality and 0 to represent normality or slight abnormality without correction.
[0131]
[0132] Step (4), DECTIN model is an improved time series signal filling correction network based on CTIN, which combines local convolution feature extraction and global dependence modeling capability of Transformer, and improves the recovery accuracy and stability in the scene of missing time series data. The model introduces a three-stage architecture of filling module, reconstruction module and weighted inference module, and designs an initialization mechanism for unobserved signal positions, making it more robust and generalizable when facing outliers and missing data. Compared with the traditional CTIN model based on Transformer, DECTIN introduces local convolution kernel structure at the encoding end to enhance the model's response to local mutation features.
[0133] When dealing with outliers, DECTIN treats the outlier position as a missing position and estimates the missing signal based on the mask matrix M and the normalized signal matrix Z using the initialization method. At this time, the missing position is assigned an initial value and concatenated with the observed signal to form an initial multivariate time series.
[0134] First, a filling correction module is constructed by combining convolution and Transformer, and the missing values are filled and corrected by extracting features through the following steps:
[0135] Self-attention mechanism extracts global temporal dependence:
[0136] A1=SelfAttention(Xc;M)
[0137] Where A1 is the feature representation extracted by the self-attention mechanism, which contains global dependence information.
[0138] Feedforward network for nonlinear mapping:
[0139] Z1=FFN(A1)
[0140] Where Z1 is the mapped feature matrix, which is used to further generate filling correction values.
[0141] Fill in the missing values to generate a preliminary filling correction sequence:
[0142]
[0143] Where, is the time series signal matrix after preliminary filling correction; W1 and B1 are learnable weight matrix and bias term.
[0144] Keep the observed signal and concatenate to generate the sequence after filling correction:
[0145]
[0146] where is element-wise multiplication, which ensures that the observed values remain unchanged.
[0147] Next, the inpainting-corrected signal is input into the reconstruction module to further optimize the inpainting correction quality, and the input into the reconstruction module to further optimize the inpainting correction quality:
[0148] Self-attention mechanism extracts reconstruction features:
[0149]
[0150] where A2 is the global time-dependent feature extracted by the reconstruction module.
[0151] Feedforward network nonlinear mapping:
[0152] Z2 = FFN(A2)
[0153] where Z2 is the feature representation after nonlinear mapping.
[0154] Reconstruction sequence calculation:
[0155]
[0156] where is the optimized inpainting-corrected sequence generated by the reconstruction module; W α , B α , W β and B β are the weight and bias parameters in the reconstruction module.
[0157] Finally, DECTIN introduces a weighting mechanism to fuse the results of the inpainting module and the reconstruction module:
[0158] Calculate the weighting coefficient:
[0159] α = Softmax(h1 / (h1+h2))
[0160] where h1 and h2 are the loss measurement indicators of the inpainting module and the reconstruction module.
[0161] Generate the weight adjustment matrix:
[0162] γ = (1-M)⊙(α+β) / 2 + M⊙α
[0163] where γ is the weighting matrix used for fusion; β is the smoothing weighting coefficient, used to adjust the weight distribution of the unobserved region.
[0164] Generate the final inpainting-corrected sequence:
[0165]
[0166] The objective function of DECTIN is the reconstruction error, which is the difference between the padded signal and the original signal. The goal is to minimize this error, ensuring that the padded signal is as close to the true signal as possible.
[0167]
[0168] Among them, xi is the original signal (including the missing value part). is the signal after filling and correction by the DECTIN model. N is the number of samples in the signal.
[0169] Step (5): During the training process of the DECTIN model, the selection of hyperparameters has a significant impact on the model performance. In order to further improve the filling correction effect and anomaly detection accuracy of the wind power signal, an improved wave search optimization algorithm is introduced to optimize the hyperparameters of the DECTIN model, including the learning rate, the number of network layers, and the number of attention heads. The algorithm simulates the propagation and reflection process of waves and continuously adjusts the hyperparameters of the model in the search space to find the optimal solution. Specifically, the wave search algorithm can effectively explore and utilize the hyperparameter space of the model, avoid the local optimal problem in traditional methods, and improve the robustness and prediction accuracy of the DECTIN model.
[0170] The specific process of the wave search optimization algorithm is as follows:
[0171] 1. Initialization phase
[0172] First, a series of initialization preparations need to be performed. Assume that the number of particles is n, the dimension of the problem to be optimized is d, and the position of the electromagnetic wave particle W is simulated by a matrix:
[0173]
[0174] And use f([W n1 ,W n2 ,…W nd ]) represents the fitness value of the nth individual, and the fitness value of the population can be represented by the following vector:
[0175] F=[f([W 11 ,W 12 ,…W 1d ]);f([W 21 ,W 22 ,…W 2d ])…f([W n1 ,W n2 ,…W nd ])]
[0176] Finally, prepare n random numbers k1, k2...Kn from 0 to 1 to initialize the particle positions.
[0177]
[0178] W = lb + x * (ub - lb)
[0179] where xi is the homogenized ki, xi* is a random value in x, lb and ub are the lower and upper bounds of the search space.
[0180] 2. Calculate fitness
[0181] The patent uses the Mean Absolute Error (MAE) as the fitness index, which is used to measure the performance of the DECTIN model under the current hyperparameter setting. The formula of the Mean Absolute Error is as follows:
[0182]
[0183] where Z ture is the real signal matrix, Z fill is the signal matrix after filling and correction.
[0184] 3. Global development stage
[0185]
[0186] In the formula, Wmin is a vector composed of the minimum value of each dimension of W, Wmax is a vector composed of the maximum value of each dimension of W, fmean is the average value of all particle fitness values, r1 is a random number between 0 and 1, t is the current iteration number, and t is the total iteration number. The advantage of the above formula is that it can gradually narrow the search range, and the newly generated point is generated within the narrowed range, improving the search efficiency. An improved greedy mechanism is used to control the position of the population near the global optimal position.
[0187] 4. Local exploration stage
[0188] (1) Transmit electromagnetic waves
[0189]
[0190] In the formula σ is the waveform size control coefficient, m is a column vector with elements following a normal distribution and arranged in order, W best is the current optimal position, W li is the position matrix after rearranging the proximity of W i and W best , f max is the maximum fitness value in the group.
[0191] (2) Reflect electromagnetic waves
[0192]
[0193] where β = 0.75 + e-i / n w2 , β is the reflection intensity coefficient, r2 is a random value between 0 and 1, n w2 is the number of particles simulating the reflected electromagnetic wave. W fi is the position matrix of W after rearrangement according to the fitness values from small to large. Particles (particles with lower fitness values) are simulated to encounter obstacles and reflect to W best , while the remaining particles (particles with higher fitness values) continue to diffuse outward. best
[0194] (3) Receiving electromagnetic wave
[0195]
[0196] where δ is the receiving coefficient, δ = 0.6 + (1.2 - 0.5) sin (tπ / 2T), η is a random number subject to normal distribution, n w3 is the number of particles simulating the received electromagnetic wave. is the historical optimal position obtained by convolution. λ is the correction factor, λ = (2t / T - 0.7) / (0.78 + |2t / T - 0.7|) + 1. r3, r4, r5, r6 are random numbers between 0 and 1. It is simulated that radar usually normally receives electromagnetic waves, but sometimes it will be disturbed and needs to be corrected and processed. Its role is to make the particle swarm search in the current optimal direction. At the same time, there is a certain probability to deflect to the W direction to reduce the possibility of falling into local optimum.
[0197] Improvement of wave search optimization algorithm:
[0198] In order to further improve the global and local search performance of the wave search algorithm (Wave Search Algorithm, WSA), avoid falling into local optimal solution and speed up the convergence speed, this patent introduces a fitting gradient optimization strategy based on central difference method. This strategy guides the algorithm to search accurately along the optimization direction by fitting gradient information, and combines with dynamic step adjustment mechanism to enhance the local convergence effect on the basis of maintaining global exploration ability, so as to further improve the efficiency and precision of DECTIN model hyperparameter optimization. Its formula is as follows:
[0199] g i = (f(W +εi ) - f(W -εi )) / 2ε
[0200] W inew = W i - α·g i
[0201] In the formula, W+εi=Wi+ε, W-εi=Wi-ε, g is a gradient, and a is a step size factor. The initial value of a is set as α0=0.3, and the final step size is determined through a step size test. The step size test method is as follows: if the fitness value after iteration of the initial step size is less than or equal to the current fitness value, then α=α0 / c, otherwise α=α0*c, wherein c is a scaling factor. In the formula, the central difference method is used to fit the analytical information of the optimization problem, which is used to search for an optimal solution, so as to improve the search efficiency and accuracy. It is worth noting that the strategy is a deterministic optimization technique. The WSA algorithm combines deterministic and nondeterministic optimization techniques by introducing the strategy.
[0202] To implement the method of the above-mentioned embodiments, the application further provides a computer readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned wind power anomaly detection and correction method.
[0203] To implement the above-mentioned embodiments, the application further provides a wind power data processing device, comprising: a processor; a memory storing a computer program; a sensor interface module connected to vibration, temperature, wind direction, current and wind speed sensors; a communication module for transmitting the corrected signal to a wind farm monitoring platform; wherein the processor implements the above-mentioned method when executing the program.
Claims
1. A method for detecting and correcting wind power anomaly, characterized in that: The following steps are involved: (1) Collect wind power equipment and environmental signal data through five sensors: vibration, temperature, wind direction, current, and wind speed, generate time series signals and form the original signal matrix; (2) Using the Z-score standardization method to preprocess the original signal matrix to obtain a standardized signal matrix; (3) Input the normalized signal matrix into the variational autoencoder Beta-VAE model for feature extraction and anomaly detection to generate anomaly scores and mask matrices; (4) The mask matrix and the original signal matrix are fused to form a new encoding matrix, and the convolutional temporal interpolation network DECTIN model is used to fill in the missing signal; (5) Using the improved wave search optimization algorithm WSA to optimize the hyperparameters of the DECTIN model; (6) Use the optimized DECTIN model to correct abnormal signals.
2. The method according to claim 1, characterized in that The specific steps of step (1) include: (11) The five sensors of vibration, temperature, wind direction, current and wind speed each generate a set of time series signals in one sampling period, denoted as X i =[x i1 ,x i2 ,…,x in ], where i represents the sensor number and n is the sampling time step; (12) The five groups of time series signals are combined to form an n×5 dimensional original signal matrix. The signal matrix is as follows: Where n represents the time step and the number of columns is the number of sensors.
3. The method according to claim 1, characterized in that The Z-score normalization process in step (2) includes: (21) Calculate the mean value μ of each sensor signal in the original signal matrix i and standard deviation σ i ; (22) The time series signal of each sensor column is normalized using the following formula: Where: z ij is the normalized signal value, x ij is the original signal value, which represents the sampling value of sensor i at time step j, μ i is the mean value of the ith sensor signal, σ i is the standard deviation of the ith sensor signal; (23) Generate the standardized signal matrix Z n×5 , which has the form:
4. The method according to claim 1, wherein The feature extraction and anomaly detection steps in step (3) are as follows: (31) The normalized signal matrix Z n×5 Divide into training set Ztrain and test set Ztest according to 8:2; (32) Generate latent features h through Beta-VAE model: h=μ+σ⊙∈,∈~N(0,1) Among them, ⊙ represents the bit-by-bit multiplication of elements, μ represents the mean vector, σ represents the standard deviation vector, and ε represents random noise; (33) Divide feature subsets and calculate indicators: The potential feature space is divided into several feature subsets k, each subset k corresponds to a different sensor type or physical feature dimension, and the root mean square error RMSE and KL divergence D of each subset are calculated independently. kl,k ; (34) Generate anomaly score: Subset Anomaly Scoring: S k =α·RMSE k +β score ·KL k Among them: α and β score To adjust the parameters and control the contribution of RMSE and KL divergence to the score, β score ≥0, Enhance the weight of KL divergence in anomaly detection; Global Anomaly Score: Where: k is the weight of subset k, satisfying K is the total number of subsets; (35) Generate mask matrix: Through the dynamic threshold T i Score the global anomaly S i Make a judgment and generate a mask matrix M representing the abnormal points: The dynamic threshold Ti is calculated as follows: T i =μ s +k·s S Where: μ s and σ S The abnormality score S i The mean and standard deviation of , k is an adjustable parameter that controls the sensitivity of anomaly detection.
5. The method according to claim 1, wherein The step (4) comprises: (41) Initialize the missing position and splice the observed signal to generate the filled and corrected sequence: Among them, ⊙ is the element-by-element multiplication, ensuring that the observed value remains unchanged; (42) Extract multi-scale features through the local context enhancement module: perform a one-dimensional convolution operation on the spliced signal matrix to capture local temporal dependencies and then fuse them with the global self-attention features: X conv =conv1D(x′1,k=3,stride=1) A1=SelfAttention(X conv ;M)+SelfAttention(X 1′ ;M) (43) Feedforward network performs nonlinear mapping: Z1=FFN(A1) Among them, Z1 is the mapped feature matrix, which is used to further generate filling values; (44) Reconstruction module generates optimized sequence: Among them, Z2 is the feature representation after nonlinear mapping, is the optimized filling and correction sequence generated by the reconstruction module; W α , B α , W β and B β are the weight and bias parameters in the reconstruction module; (45) Weighted fusion generates the final filling correction sequence: Among them, γ is the weight matrix used for fusion.
6. The method according to claim 1, characterized in that The improved wave search optimization algorithm WSA of step (5) optimizes the hyper parameters of the DECTIN model including: (51) The fitting gradient is calculated using the central difference method g i =(f(W +εi )-f(W -εi )) / 2ε W inew =W i -α·g i Where W+εi=Wi+ε,W-εi=Wi-ε,g is the gradient, α is the step coefficient, and the initial value of α is set to α0=0.3, The final step size is determined through a step size test. The step size test method is as follows: if the fitness value after the initial step size iteration is less than or equal to the current fitness value, then α = α0 / c; otherwise, α = α0*c, where c is a scaling factor. The central difference method is used to fit the analytical information of the problem to be optimized to search for the optimal solution, thereby improving search efficiency and accuracy. (52) Dynamic step size adjustment: when the fitness after α iteration is ≤ the current value, α = α0 / c, otherwise α = α0*c, where c is the scaling factor; (53) Reflection phase execution Where β = 0.75 + ei / n w2 , β is the reflection intensity coefficient, r2 is a random value from 0 to 1, n w2 is the number of particles simulating reflected electromagnetic waves, W fi It is the position matrix after W is rearranged in the order of fitness value from small to large, simulating the particles with low fitness value encountering obstacles and moving towards W. best Reflection, while the remaining particles with higher fitness values are away from W best Continue to spread outward; (54) Dual path selection mechanism is implemented in the receiving stage Where δ is the receiving coefficient, δ = 0.6 + (1.2 - 0.5) sin (tπ / 2T), η is a random number that obeys the normal distribution, n w3 To simulate the number of particles receiving electromagnetic waves, is the historical optimal position obtained by convolution, λ is the correction factor, λ = (2t / T-0.7) / (0.78+|2t / T-0.7|)+1, r3, r4, r5, r6 are random numbers between 0 and 1.
7. The method according to claim 6, characterized in that The wave search optimization also includes: Initialization phase passes Generate initial particle positions; use As the fitness index, Z ture is the real signal matrix, Z fill is the signal matrix after filling and correction; Global development stage generation Where Wmin is a vector consisting of the minimum values of each dimension of W, Wmax is a vector consisting of the maximum values of each dimension of W, and r1 is a random number between 0 and 1; The local exploration phase includes three operations: electromagnetic wave emission, reflection and reception.
8. The method according to claim 1, characterized in that The step (6) comprises: The optimized Beta-VAE-DECTIN model is validated on a test set containing 20% abnormal signals; A dynamic threshold adjustment strategy is adopted to automatically adjust the anomaly judgment threshold T according to seasonal characteristics; Perform time correlation analysis on consecutive outliers to generate modified confidence indicators.
9. A computer-readable storage medium, characterized in that A computer program is stored, and when the program is executed by a processor, the wind power anomaly detection and correction method according to any one of claims 1 to 8 is implemented.
10. A wind power data processing device, characterized in that: include: processor; A memory storing a computer program; a sensor interface module connected to vibration, temperature, wind direction, current and wind speed sensors; a communication module for transmitting the corrected signal to a wind farm monitoring platform; wherein, when the processor executes the program, it implements the method according to any one of claims 1 to 8.
Citation Information
Cited By
Power system state estimation method, device and equipment and storage medium
CN121598010A