A Spatiotemporal Data Anomaly Detection Method for Wind Turbines Based on a Diffusion Model
By combining the GRUfusion model and the self-attention mechanism, an improved diffusion model is used for spatiotemporal anomaly detection of wind turbine data. This solves the problems of ignoring spatial correlation and feature loss in existing methods, and achieves more accurate anomaly detection and early warning.
Patent Information
- Application Number
- CN202410355915.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2044-03-27
AI Technical Summary
Existing methods for detecting anomalies in wind turbine time-series data mainly focus on extracting temporal relationships, ignoring the correlation between different parts at the same time, resulting in inaccurate detection results. Furthermore, convolutional networks are prone to losing features during feature extraction, affecting the detection performance.
A diffusion model-based method for detecting anomalies in wind turbine spatiotemporal data is adopted. By combining the GRUfusion model and the self-attention mechanism, temporal and spatial features are extracted respectively, and feature fusion is performed through a multi-channel self-attention mechanism. An improved diffusion model is used for anomaly judgment. The method focuses on the noise prediction error at each step by improving the noise by adding noise in stages and the loss function.
It achieves more accurate detection of spatiotemporal data anomalies in wind turbines, can provide early warning of impending equipment anomalies, and can promptly detect component data deviations that have not exceeded the threshold, thereby improving the accuracy of detection and early warning capabilities.
Smart Images

Figure CN118051857B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wind turbine data anomaly detection technology, and in particular relates to a wind turbine spatiotemporal data anomaly detection method based on a diffusion model. This detection method is used for detecting spatiotemporal relationship anomalies in wind turbine data under multi-component collaboration. Background Technology
[0002] In recent years, with my country's continuous development, the demand for energy in industrial production has gradually shifted from non-renewable energy to renewable and clean energy. Under this situation, vigorously developing clean energy has become an important means for future economic development. Among these, wind-solar-storage complementary hydrogen production occupies a significant portion of the renewable energy field. Due to the uncertainty of wind and solar resources, changes often occur within a very short time, such as wind speed, sunlight, and yaw angle, sometimes even fluctuating significantly within seconds. Therefore, judging whether data changes are abnormal largely determines whether the entire wind power system can operate normally.
[0003] Because wind-solar-storage complementary hydrogen production systems are often composed of multiple subsystems, each responsible for different modules, and ultimately centrally stored, coordination of such distributed systems is crucial. For different systems, it's necessary to consider not only the temporal relationship of data across different time periods, but also the correlation of data from different locations at the same time, i.e., the spatial relationship of the data.
[0004] Currently, most anomaly detection methods for wind turbine time-series data focus on extracting the temporal relationships between different parts of the wind turbine or other equipment at the same time. For example, if the wind turbine rotor temperature rises for an extended period, even if it falls within the normal range as defined by the model, a significant temperature difference compared to other components indicates that some anomalies still exist. Therefore, focusing solely on temporal relationships for anomaly detection is likely to lead to incorrect assessments of this type of data. Thus, in addition to extracting temporal features, analyzing the spatial relationships within the data is crucial for achieving comprehensive anomaly detection in wind turbine data.
[0005] For spatial relationships in data, multi-layer convolutional neural networks are generally used for feature extraction. However, feature loss is unavoidable during the convolution process. For most image data processed by convolutional networks, slight feature loss may not have a significant impact. However, for rapidly changing wind turbine time-series data, even a small amount of data loss can lead to misjudgment or missed detection, causing serious consequences. Therefore, more accurate anomaly detection methods are needed.
[0006] Anomaly detection in time-series data typically employs a generative-reconstructive approach. This involves modeling normal data to learn its features, and then recognizing anomalies by recognizing significantly larger reconstruction errors when encountering abnormal data. Such models generally use convolution as the core, but due to the limitations of convolution, this invention chooses a more accurate diffusion model for its core construction. This model is combined with a self-attention mechanism and a GRU network to extract and integrate spatiotemporal features separately, achieving better anomaly detection results. Summary of the Invention
[0007] This invention addresses the shortcomings of existing time-series anomaly detection methods commonly used in wind turbine SCADA systems. It provides a diffusion model-based method for detecting spatiotemporal data anomalies in wind turbines. This method offers higher accuracy, more effective extraction of spatiotemporal relationships in data, and early warning when equipment anomalies are imminent. During equipment operation, if significant abnormal data is observed and a large reconstruction error is calculated, it will be considered an anomaly. Furthermore, if data from certain components deviates significantly from other components but does not exceed anomaly thresholds, this invention can also detect and issue warnings to a certain extent, thus mitigating losses in a timely manner.
[0008] The technical solution adopted by the present invention to solve the aforementioned technical problem is as follows:
[0009] A method for detecting spatiotemporal anomalies in wind turbine data based on a diffusion model, the method comprising the following:
[0010] Correlation analysis was performed on the collected SCADA time series data of wind turbine units. Data with excessive correlation were removed, and w attributes closely related to the operating status of the wind turbine were selected. Then, the data was divided into a w×w matrix using a sliding window mode.
[0011] A GRUfusion model is constructed, which includes a self-attention mechanism module, a GRU module, and a diffusion model. The w×w matrix is input into the GRU module to obtain temporal features, and the transposed matrix of the w×w matrix is input into the self-attention mechanism module to obtain spatial features. The temporal and spatial features are fused through multi-channel fusion and then concatenated into the diffusion model. The diffusion model outputs the prediction error, and then anomaly detection is performed.
[0012] The process of feature data concatenation is as follows: temporal features and spatial features are respectively position-encoded to obtain encoded temporal features and encoded spatial features. Then, the temporal features and encoded spatial features, and the spatial features and encoded temporal features are respectively subjected to multi-channel self-attention mechanism operations. The results are concatenated and then passed through a fully connected layer to obtain the feature data concatenation result.
[0013] Furthermore, the multi-channel self-attention mechanism includes two dual-channel self-attention mechanisms. Each dual-channel self-attention mechanism includes two query networks, two key networks, and one value network. The results of the two query networks and two key networks are added together and then multiplied. The result output by the softmax function is multiplied by the output of the value network, which is the output of one channel self-attention mechanism.
[0014] The output of the two channel attentions is used to obtain the feature data concatenation result through concatenation and fully connected operations.
[0015] Furthermore, the location coding process is based on Calculate frequency a i Where i is the i-th row vector in the input, and w is the dimension of the row vector, then according to Calculate the position code p i .
[0016] Furthermore, the diffusion model employs an improved diffusion model, which uses a staged noise figure α.
[0017]
[0018] Where ε and b are defined hyperparameters.
[0019] Add noise to the original data, and use the Hadamard product to add the noise. express,
[0020] Where s is the input data; For the mask matrix, The size is the same as s, and the elements in the mask matrix are the stage noise coefficients α, with values ranging from (0,1);
[0021] The loss function for the improved diffusion model is:
[0022]
[0023] in, For time step t, the mask matrix M tThe generated random noise, Let ∈ represent the expectation of the original data and random noise ∈. t This represents random noise generated during forward diffusion. Based on The noise predicted by backward denoising at a certain time step.
[0024] Furthermore, the criteria for anomaly detection are as follows:
[0025] Ω i ={ω i,1 ,ω i,2 ,…,ω i,t ,…,ω i,T}
[0026] For Ω i Statistical analysis and calculation of the values in the data. Determine if it is greater than ξw. If it is, then consider the i-th data x to be... i It is normal; otherwise, it is considered abnormal.
[0027] Where ξ is a predefined percentile, w is the window size; ω i,t For the i-th vector x i Noise prediction error for all time steps The prediction error of the final output ∈ i,T The ratio; T is the time step;
[0028]
[0029] Furthermore, ξ is 0.9.
[0030] Compared with the prior art, the beneficial effects of the present invention are:
[0031] The method of this invention extracts the temporal and spatial features from the wind turbine time series data separately, and uses a multi-channel self-attention mechanism to fuse the two features, highlighting the correlation between different features.
[0032] This invention employs a staged noise addition method, replacing linear noise with staged noise. This enhances the model's ability to predict target noise, achieving a more accurate denoising process and thus accurately generating the original data. This helps improve the model's ability to detect anomalies. It better reflects the actual training process. Furthermore, based on the improved noise addition method, the original loss function is modified. For anomaly detection, instead of relying solely on the output of the final step, the sum of the losses from each intermediate step is recorded, leading to a more accurate judgment. Attached Figure Description
[0033] Figure 1This is a flowchart illustrating the steps of a wind turbine spatiotemporal data anomaly detection method based on a diffusion model according to the present invention.
[0034] Figure 2 Wind speed was measured at a wind farm from January to June.
[0035] Figure 3 This is a comparison chart of wind speed and temperature measurements taken at a wind farm from January to June.
[0036] Figure 4 This is a schematic diagram of the self-attention mechanism module.
[0037] Figure 5 This is a schematic diagram of a classic GRU structure.
[0038] Figure 6 This is a multi-channel self-attention mechanism process.
[0039] Figure 7 This is a schematic diagram of the structure of the GRUfusion model according to an embodiment of the present invention. Detailed Implementation
[0040] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, but it is not intended to limit the scope of protection of this application.
[0041] This invention provides a method for detecting spatiotemporal anomalies in wind turbine data based on a diffusion model, such as... Figure 1 As shown in the diagram, the SCADA data of the wind turbine is first preprocessed to extract spatial and temporal features, then the two features are fused, and finally the prediction error is input into the diffusion model for anomaly detection. The specific steps are as follows:
[0042] Step 1 involves collecting SCADA data from the wind turbine. First, the collected time-series data is correlated using the Pearson correlation coefficient. Data with excessively strong correlations is removed, leaving w valuable fields. To enable the time-series data to be input into the diffusion model for calculation, a sliding window is used to divide the data into a w×w matrix. A row in the matrix is denoted as the time-series data s, ready to be input into the model. Data recorded by various sensors (including 28 parameters such as wind speed, power, wind direction, outdoor temperature, nacelle vibration, generator stator temperature, generator bearing temperature, generator air-cooled temperature, active power, nacelle cabinet temperature, nacelle air temperature, pitch shaft box temperature, generator stator winding temperature, main shaft gearbox temperature, main shaft impeller temperature, gearbox bearing temperature, and generator speed) allows for real-time recording of the operating status of various components at the wind power site.
[0043] This embodiment uses a dataset from a UK wind farm in 2021, which contains data from 78 component sensors. Using the Pearson correlation coefficient method and expert experience, 28 attributes closely related to the wind turbine's operating status were selected. Therefore, a 28x28 sliding window was used to read the data, reading 28 time points at a time. Since 28 attributes were selected from the dataset for sliding window calculation, w = 28.
[0044] Step 2: Construct the GRUfusion model by inputting the aforementioned time series data s into the GRUfusion model.
[0045] The GRUfusion model includes a self-attention mechanism module, a GRU module, and a diffusion model. The w×w matrix is input into the GRU module to obtain temporal features, and the transposed matrix of the w×w matrix is input into the self-attention mechanism module to obtain spatial features. The temporal and spatial features are combined through multi-channel fusion and then fed into the diffusion model. The diffusion model outputs the anomaly judgment result.
[0046] Self-attention mechanism module (see...) Figure 4 This consists of a Query network, a Key network, and a Value network. The outputs of the Query and Key networks are multiplied, then processed by a softmax function, and finally multiplied by the result of the Value network to obtain the output of the self-attention mechanism module, which is used to extract spatial features from the input data. For a sliding window of size w containing time-series data, s = {x1, x2, ..., x...} w In this context, extracting temporal features means processing each input x... i (i∈[1,w]), calculate the attention score with the remaining vectors. And to extract spatial features, if x1,x2,…,x w Viewed as row vectors within a window, to extract the spatial relationships between different attributes, column vectors are used as input to the attention module. This means the data input to the attention mechanism module is the transposed rank of a w×w matrix, where a row of the transposed rank is defined as y. i (i∈[1,w]), which is beneficial for extracting the spatial relationship between different attributes at the same time and calculating the spatial attention score.
[0047] For y1, all data within the current spatial window (including y1 itself) are related to y i All of these have varying degrees of influence. Therefore, a self-attention mechanism is used to extract y. iThe spatial relationship with the current window data is represented using weight values. First, y1 enters a Query network to obtain a q1 vector, and simultaneously all y1 vectors are processed. i Each input will generate a corresponding k using a key network and a value network. i and v i vector:
[0048] q1 = Query(y1) = W q ·y1+b1
[0049] k i =Key(y i ) = W k ·y i +b i
[0050] v i =Value(y) i ) = W v ·y i +b i
[0051] Among them W q W k W v ,b i These are all matrices and vectors that are continuously updated during the training process.
[0052] Then q1 is connected to each k respectively i Multiply to get α 1,i The result is input into the softmax layer to calculate the average weight α'. 1,i , and then with v i Multiply the output attention score z i .
[0053] α 1,i =q1·k i
[0054]
[0055] z i =α′ 1,i ·v i
[0056] Where i,j∈(1,w), they have the same meaning and are used to distinguish between the numerator and denominator. The calculation is the attention score of the first column vector to all column vectors in the window, thus determining the weight of different column vectors.
[0057] The self-attention mechanism module can produce an output that includes attention scores, which is the spatial feature.
[0058] GRU module (see GRU module) Figure 5 This is used to extract the temporal features of the input data. For a sliding window of size w containing time-series data, s = {x1, x2, ..., x...} w In this approach, data within a sliding window is sequentially input into the GRU unit for computation, extracting the temporal features and correlations of the data within a time period. Compared to LSTM, GRU does not introduce additional memory units; instead, it adds an update gate to the original RNN. GRU controls how much information the current state should retain from historical states and how much information should be received from candidate states.
[0059] For any time x i (i∈[1,w]), the latent space state of the previous time step is H i-1 The corresponding reset gate R is calculated. i and Update Gate Z i Define W xr W xz W hr W hz It is the weight parameter matrix, b r ,b z It is the bias term. σ is the sigmoid activation function, which transforms the calculated value to the (0,1) interval.
[0060] R i =σ(x i ·W xr +H i-1 ·W hr +b r )
[0061] Z i =σ(x i ·W xz +H i-1 ·W hz +b z )
[0062] Then, the hidden space state at the current moment is obtained by resetting the gate state.
[0063]
[0064] Among them W xh W hh It is the weight parameter matrix, b h It is the bias term, ⊙ represents the Hadamard product (element-wise multiplication of matrices), and the tanh activation function is used to restrict the output to the interval (-1, 1).
[0065] The current hidden space state has been determined. After that, it is also necessary to combine the updated gate Z i Determine the new hidden space state H i This step is based on new candidate states. and the old state H i-1 It is calculated. Update gate Z i Determine the proportion of each.
[0066]
[0067] Whenever Z i When the value of x is close to 1, GRU tends to preserve the old hidden space state and ignore the input x at the current time step. i This is equivalent to skipping the data at the current moment. And when it approaches 0, the new latent space state H... i It will approach the candidate state. This approach can address issues like gradient explosion and vanishing gradients that RNNs encounter when processing long-term sequences. For example, when all update gate values are close to 1, there's a high probability that the old latent space states will be retained, allowing for more efficient extraction of key temporal features.
[0068] The GRU algorithm removes the forget gate mechanism from LSTM and combines the forget gate and input gate of LSTM into one, called the update gate, which alleviates the problem of slow computation speed of LSTM for long sequences.
[0069] The feature data concatenation can be achieved by combining corresponding element-wise multiplication or positional encoding. A preferred feature data concatenation process is as follows: Temporal and spatial features are respectively positionally encoded to obtain encoded temporal and spatial features. Then, multi-channel self-attention mechanisms are applied to the temporal features and encoded spatial features, and vice versa. The results are concatenated and passed through a fully connected layer to obtain the final feature data concatenation. See [link to detailed process] for more information. Figure 6 :
[0070] The multi-channel self-attention mechanism includes two dual-channel self-attention mechanisms. Each dual-channel self-attention mechanism includes two query networks, two key networks, and one value network. The results of the two query networks and two key networks are added together and then multiplied. The result of the softmax function is multiplied by the output of the value network. This is the output of one channel self-attention mechanism. The outputs of the two channels are concatenated and fully connected to obtain the concatenated feature data.
[0071] By using two dual-channel architectures, attention scores for time-to-space and space-to-time features can be calculated separately. Each dual-channel will encode the position of the main feature used to calculate attention (the channel with the Value network is the main feature processed), which facilitates the model's learning of the data's arrangement patterns.
[0072] The process of position encoding is based on Calculate frequency a i Where i is the i-th row vector in the input, and w is the dimension of the row vector, then according to Calculate the position code p i ;
[0073] When encoding spatial features at location, w is a vector y i In terms of dimension, when encoding location for temporal features, w is a vector x. i The dimension, i∈[1,w]
[0074] After calculating the positional encoding, it is added to the main attribute (corresponding to the main feature) for calculating the attention score.
[0075] The diffusion model is a generative-reconstruction model that primarily uses generative diffusion. Generative-reconstruction models learn from input data, establish feature distributions for normal data, and then attempt to reconstruct results similar to the real data, continuously updating model parameters during the reconstruction process to achieve better generation results. After training, in the anomaly detection phase, if abnormal data is input, the reconstructed result will differ significantly from the original data because the generative-reconstruction model has not learned the feature distributions of such data. Anomalies are identified by setting a threshold for this difference. The diffusion model, in addition to the generative-reconstruction model, simultaneously trains a noise predictor. By gradually subtracting the predicted noise from the noisy results generated in the generation phase, it reconstructs the original data. The biggest advantage of the diffusion model is that it maintains the size of the original data during computation, thus reducing feature loss caused by convolution. Furthermore, because the dimensionality of temporal data is significantly smaller than that of image data, the problem of long computation time is alleviated. Using diffusion for anomaly detection in temporal data balances accuracy with a certain level of efficiency.
[0076] Generative models, such as AEG, VAE, and GAN, largely construct their main structure through operations like convolution and pooling, which inevitably leads to feature loss. For time-series data that typically has low dimensionality, even the loss of a small number of features can cause errors in anomaly detection, affecting the final result.
[0077] The working principle of diffusion consists of a forward diffusion process, a backward denoising process, and a noise predictor. In the forward diffusion process of the diffusion model, random noise is continuously added to the original data until the data becomes purely noisy. Let the original data be x. i,0 (i∈[1,w]), representing the data at time step 0, calculated at time step T (through T diffusion processes), α t For the t-th pre-set hyperparameter, i.e., t∈(1,T), the noisy data x at time t is calculated according to the following formula. i,t .
[0078]
[0079] Where, α t For predefined hyperparameters, different values are determined according to different time steps, where t-1 represents the corresponding value at time t-1, ∈ t-1 This represents the noise distribution at time step t-1.
[0080] x0 represents the original input, q(x i,1: T|x i,0 This represents calculating the probability distribution of data from the beginning of the original dataset to the end at time T. Simultaneously, it involves adding noise to the data x at time steps 0 to t. i,0 ~x i,t , can be determined by x i,0 Find the result of the product. Therefore, through Markov chains The probability distribution q(x) of the final noise can be obtained. i,T |x i,0 );
[0081] Where ∈' represents ∈ at all time steps T. t The result after multiplication conforms to a random Gaussian distribution; Because α in each time step t These are all predefined hyperparameters, and the value of α' can be obtained directly;
[0082] In the backward denoising process of diffusion, noise features learned in the forward stage are used to gradually remove some noise from the random noise generated by a Gaussian distribution until the original data is generated, thus enabling the generation of data. This allows the denoising distribution p to be inferred from the noisy data and time steps. θ (x i,t-1 |x i,t ), and can be obtained from x i,t Launch x i,t-1 .
[0083]
[0084] x i,t-1 =μ θ (x i,t ,t)+σ θ (x i,t ,t)·∈ t
[0085] Where, μ θ (x i,t ,t) and σ θ (x i,t ,t) is about x i,t The mean and variance of t; ∈ t This represents the noise distribution at time step t.
[0086] θ refers to the parameters that are updated internally by the diffusion model, I is the identity matrix, and N is the normal distribution.
[0087] Similarly, we can obtain from x i,t To x i,0 Markov chains:
[0088]
[0089] q refers to the distribution of the original data, which is difficult to determine directly during the diffusion process; p θ It is the distribution calculated by the model, with the aim of approximating the original distribution q, and the mean and variance of the two are close.
[0090] To obtain the result q(x) of the backward denoising... i,t-1 |x i,t Given x0, q(x) i,t-1 |x i,t The process can be decomposed into several forward diffusion processes: q(x) i,t |x i,t-1 ),q(x i,t-1 |x i,0 ),q(x i,t |x i,0 Based on the Gaussian distribution expansion, the mean and variance of the backward denoising can be calculated:
[0091]
[0092]
[0093] in, β t =1-α′ t .
[0094]
[0095] By training and updating the random noise ∈, the probability distribution for the next step is obtained. This leads to the training of a generative-reconstruction model with a noise predictor function, which continuously removes predicted noise from the noisy results obtained in the forward process, thereby generating the original data and achieving reconstruction.
[0096] The loss is calculated using the MSE loss function:
[0097]
[0098] Represents the expectation of the original data and random noise, ∈ t Represents random noise generated during forward diffusion, ∈ θ (x i,t ,t) is the noise predicted by backward denoising (the corresponding predicted noise is generated by the noise predictor based on the training results of a certain time step), and the purpose is to minimize the difference between the predicted noise and the corresponding random noise.
[0099] Improved diffusion model such as Figure 7 The diagram illustrates a partial denoising diffusion model, where noise is not added to the entire diffusion process; different levels of noise are added at different stages. After the feature data is concatenated, T diffusion operations are performed according to a predefined time step T. Each calculation adds corresponding noise to the data, and the added noise is predicted to ensure that the generated noise equals the predicted noise. After the diffusion calculation is complete, the resulting noisy data undergoes reverse denoising. Based on the previously trained noise predictor, corresponding noise is generated according to different time steps, subtracted from the data, and the final result is compared with the original input to calculate the loss and update the diffusion model's parameters.
[0100] For wind turbine timing data, the noise process is defined as a masking process. Corresponding to the original window data, there is a mask matrix M = {m}. l∈1:w,l∈1:w}, where m is an element in the mask matrix. The size is the same as the window size, and the mask matrix takes values in the range (0,1), representing the degree of noise addition. Furthermore, the noise in the improved diffusion model of this invention no longer uses linear noise, but instead employs a staged noise figure α. t Using the staged noise figure α t Construct a mask matrix
[0101]
[0102] Where ε and b are defined hyperparameters, and tanh is the hyperbolic tangent function;
[0103] By using this phased noise coefficient formula, different levels of noise are set at different training stages, and the phased noise coefficient generated at this stage is used to replace the previously described α. t For example, in the forward diffusion process, higher levels of noise are added to the earlier time steps; while in the later stages of diffusion, the original data already has a lot of noise added, so the addition of noise is reduced accordingly. The change in stage is adjusted by the value generated by tanh.
[0104] The Hadamard product is used for noise-adding operations. s is the previously defined data window. Noise is added to the original data, its characteristic distribution is learned, and finally, the distribution is calculated using time step t. Predict the distribution at stage t-1 's' represents the entire window. Simultaneously, the random noise generated at each time step also undergoes the above operation, defined as... The loss function for the final improved diffusion model is:
[0105]
[0106] in, For time step t, the mask matrix M t The generated random noise, This indicates that the original data x i,0 and the expectation of random noise ∈ t represents the random noise at each time step following a normal distribution, ∈ t This represents the random noise generated during forward diffusion at a certain time step. Based on The noise predicted by backward denoising at a certain time step.
[0107] This results in a GRUfusion model that has been generated by processing the input windowed time series data.
[0108] Step 3: When abnormal data is received, the data generated by the GRUfusion model based on this data will show significant differences. By setting a threshold for discrimination, abnormal data can be distinguished. This invention calculates the noise prediction error at each step in the reverse denoising process. By setting anomaly judgment criteria, the improved diffusion model focuses not only on the output of the final step, but also on the noise prediction error in each step.
[0109]
[0110] Ω i ={ω i,1 ,ω i,2 ,…,ωi,t ,…,ω i,T}
[0111] in, express The corresponding data x in the middle i The noise prediction error, ∈ i,T Corresponding to x i The final prediction error of the vector. Calculate the error for the i-th vector x. i Noise prediction error for all time steps The prediction error of the final output ∈ i,T The ratio is denoted as ω i,t ω of all time steps of the i-th vector i,t To form a vector, use Ω i express.
[0112] Finally, regarding Ω i Statistical analysis and calculation of the values in the data. Determine if it is greater than ξw, where ξ is a predefined percentile (set to 0.9 in this embodiment) and w is the window size; if it is greater, then the i-th data point x can be considered... i It is normal; otherwise, it is considered abnormal.
[0113] Figure 2 The data represents wind speed measurements, with the horizontal axis representing time points. The goal is to identify any anomalies in wind speed. Figure 3 The graph shows the spatial correlation between wind speed and temperature measurements at certain points in time. The method of this invention can identify the spatial relationships between data generated by different components. When there is a significant deviation in data between different components, but it does not exceed the threshold of a general anomaly detection model (e.g., when the outdoor temperature is below zero, but the fan gear temperature is 30°C, which does not exceed the anomaly threshold but may indicate an impending anomaly), using spatial relationships (i.e., the method of this invention) can promptly detect the problem.
[0114] Any aspects not covered in this invention are applicable to existing technologies.
Claims
1. A method for detecting spatiotemporal anomalies in wind turbine data based on a diffusion model, characterized in that, The detection method includes the following: Correlation analysis was performed on the collected SCADA time-series data of wind turbine units, and data with excessively strong correlations were removed, selecting the best data. The data is then divided into attributes closely related to the wind turbine's operating status using a sliding window approach. Matrix; Construct a GRUfusion model, which includes a self-attention mechanism module, a GRU module, and a diffusion model (diffusion). The matrix is input into the GRU module to obtain the time features. The transrank matrix of the matrix is input into the self-attention mechanism module to obtain spatial features. The temporal and spatial features are fused through multi-channel fusion and then concatenated into the diffusion model. The diffusion model outputs the prediction error and then performs anomaly detection. The process of feature data splicing is as follows: the temporal features and spatial features are respectively position-encoded to obtain encoded temporal features and encoded spatial features. Then, the temporal features and encoded spatial features, and the spatial features and encoded temporal features are respectively subjected to multi-channel self-attention mechanism operations. The results are spliced and then passed through a fully connected layer to obtain the feature data splicing result. The diffusion model employs an improved diffusion model, which incorporates staged noise figures. , , in For the defined hyperparameters, Add noise to the original data, and use the Hadamard product to add the noise. express, in, Input data; For the mask matrix, Size and The elements in the mask matrix are of uniform size and represent stage noise coefficients. The range of values is ; The loss function for the improved diffusion model is: , in, For time step t, the mask matrix The generated random noise, This indicates the relationship between the original data and random noise. Expectations This represents random noise generated during forward diffusion. Based on The noise predicted by backward denoising at a certain time step.
2. The detection method according to claim 1, characterized in that, The multi-channel self-attention mechanism includes two dual-channel self-attention mechanisms. Each dual-channel self-attention mechanism includes two query networks, two key networks, and one value network. The results of the two query networks and two key networks are added together and then multiplied. The result of the softmax function is multiplied by the output of the value network, which is the output of one channel self-attention mechanism. The output of the two channel attentions is used to obtain the feature data concatenation result through concatenation and fully connected operations.
3. The detection method according to claim 1, characterized in that, The process of position encoding is based on Calculate frequency , where i is the i-th row vector of the input. w Let be the dimension of the row vector, then according to Calculate the position code .
4. The detection method according to claim 1, characterized in that, The criteria for judging anomalies are: , right Statistical analysis and calculation of the values in the data. Determine if it is greater than If it is greater than, then the i-th data is considered to be... It is normal; otherwise, it is considered abnormal. in, For predefined percentiles, w For window size; For the i-th vector Noise prediction error for all time steps Prediction error with the final output The ratio; T is the time step; 。 5. The detection method according to claim 4, characterized in that, It is 0.9.
Citation Information
Patent Citations
Multi-dimensional time series data anomaly detection method and device based on adversarial training and frequency domain improved self-attention mechanism, and medium
CN116502164A
