Wind turbine data anomaly detection method based on kernel density estimation and shannon entropy
By combining kernel density estimation with Shannon entropy, the accuracy and robustness issues of anomaly detection in wind turbine data were addressed, achieving efficient detection of isolated points and cluster anomalies and improving detection accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV OF TECH
- Filing Date
- 2023-05-11
- Publication Date
- 2026-05-12
AI Technical Summary
Existing density-based anomaly detection methods suffer from insufficient accuracy, significant parameter influence, and poor robustness in wind turbine data, making it difficult to effectively detect isolated points and cluster anomalies.
A method combining kernel density estimation and Shannon entropy is adopted. Neighboring points are determined by Mahalanobis distance, kernel density estimation and local entropy calculation are performed, outlier data points are screened out, and entropy density ratio is used for sorting and screening.
It improves the accuracy and robustness of anomaly detection, especially showing high detection accuracy in low-dimensional and high-dimensional data, while reducing algorithm complexity.
Smart Images

Figure CN116578927B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of anomaly detection technology, and in particular relates to a method for anomaly detection of wind turbine data based on kernel density estimation and Shannon entropy. Background Technology
[0002] In recent years, the global utilization rate of renewable energy has been increasing, and wind power is an important component of renewable energy. A wind turbine is a system that converts the kinetic energy of wind into electrical energy. Multidimensional data from wind turbines, such as blade rotation speed, electricity generation, blade temperature, and tilt angle, are also known as wind turbine data. The analysis and research of wind turbine data is of great significance to promoting the development of wind power technology. In the analysis and research of wind turbine data, how to detect outliers in the data has become a hot topic of research.
[0003] Density-based anomaly detection techniques encompass many types, such as neighbor-based, frequency-based, and classification-based density methods. These techniques have been widely applied in numerous fields, including industrial quality inspection, medical image analysis, and video surveillance. Density estimation-based anomaly detection methods offer advantages such as strong interpretability and low algorithmic complexity. The purpose of density estimation is to understand the underlying probability density, drawing a set of independent and identically distributed examples, thus enabling data analysis under unsupervised conditions. By analyzing the obtained density values, relationships between data points can be identified, thereby determining whether data represents anomalies.
[0004] Despite significant progress in density-based anomaly detection, several challenges remain, such as how to more accurately obtain the density distribution of data, what methods to use to measure the relationships between data points, and how to reduce the impact of the values of some parameters on the results. Summary of the Invention
[0005] The purpose of this application is to provide a method for detecting anomalies in wind turbine data based on kernel density estimation and Shannon entropy, which can be used to detect anomalous samples in a dataset containing outliers.
[0006] To achieve the above objectives, the technical solution of this application is as follows:
[0007] A method for detecting anomalies in wind turbine data based on kernel density estimation and Shannon entropy includes:
[0008] For any data point among all the data points to be detected, find the k neighbor data points based on Mahalanobis distance;
[0009] Kernel density estimation is performed on all data points to obtain the density estimate for each data point;
[0010] Using density estimates, normalize a data point and its k neighbors and calculate the local entropy.
[0011] Divide the local entropy value by the density estimate of the data point to obtain the entropy density ratio. Sort the entropy density ratios by size to filter out outlier data points.
[0012] Furthermore, kernel density estimation is performed on all data points to obtain the density estimate for each data point, using the following formula:
[0013]
[0014] in This represents the density estimate of data point x, where x is d-dimensional, n is the number of data points in the dataset, and h represents the bandwidth during the fitting process. Represents the kernel function.
[0015] Furthermore, the kernel function is a Gaussian kernel function.
[0016] Furthermore, the step of normalizing a data point and its K neighboring points using the density estimate and calculating the local entropy includes:
[0017] For data point x i The density estimate is normalized to obtain the normalized density estimate.
[0018]
[0019] in, Represents data point x i The density estimate, Knn(x) i (k) represents the x of the data point i The set of k neighbor data points;
[0020] For data point x i The j-th neighbor data point x ij Perform a normalization operation to obtain the normalized density estimate.
[0021]
[0022] in, Represents data point x ij The density estimate, Represents data point x il The density estimate;
[0023] The data point x is calculated using the following formula. i The local entropy value E(x)i ):
[0024]
[0025] in,
[0026] Furthermore, the step of sorting the entropy density ratios by magnitude and filtering out outlier data points includes:
[0027] Sort the entropy density ratios by size, preset the number of outlier data points t, and then select t data points as outlier data points from largest to smallest according to the entropy density ratio.
[0028] This application provides a method for anomaly detection in wind turbine data based on kernel density estimation and Shannon entropy. First, it requires inputting a dataset of the same dimension and a k value (not exceeding the number of data points). Then, based on Mahalanobis distance, it calculates the k neighboring points for each data point. Next, it performs kernel density estimation on all data points, and for each point and its neighbors, it calculates a local probability value using the density value, and then calculates the entropy by normalizing the probability value. Finally, it divides the entropy value of each point by its own density value to obtain the entropy-density ratio. Finally, by sorting the entropy-density ratios, points with larger entropy-density ratios are identified as anomalies. This method offers the following technical advantages:
[0029] By employing KNN, kernel density estimation, and Shannon entropy from information theory, this paper combines traditional and machine learning algorithms, improving the accuracy of the algorithm while minimizing its complexity.
[0030] It effectively addresses the issues of isolated point anomalies and cluster anomalies in datasets, achieving high detection accuracy in both low-dimensional and high-dimensional datasets.
[0031] This invention has strong robustness. The performance of anomaly detection algorithms using the KNN algorithm is generally greatly affected by the size of the number of neighbors k, but this invention has been tested and found to be very robust to the value of k. Attached Figure Description
[0032] Figure 1 This is a flowchart of the wind turbine data anomaly detection method based on kernel density estimation and Shannon entropy proposed in this application.
[0033] Figure 2 The figure shows the results of the method of this application in detecting on ten-dimensional data compared with other methods. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0035] In one embodiment, such as Figure 1 As shown, a method for detecting anomalies in wind turbine data based on kernel density estimation and Shannon entropy is proposed, including:
[0036] Step S1: For any data point among all the data points to be detected, find the k neighbor data points based on Mahalanobis distance.
[0037] In this embodiment, multidimensional data of wind turbine units are used as the data to be tested. This data can be multidimensional data of one or more wind turbine units. Each data point to be tested is obtained by sampling, and the data points have the same dimension.
[0038] In this embodiment, the number of neighbors k is preset, which represents the number of neighbor data points (referred to as neighbor points) that a data point finds. Therefore, the value of k should be less than the number of data points in the dataset.
[0039] This embodiment calculates the k neighboring data points of a data point and uses Mahalanobis distance to measure the distance between data points. In low-dimensional data, Mahalanobis distance is similar to the commonly used Euclidean distance. However, in high-dimensional data, Euclidean distance cannot accurately measure the distance between points because the variance and mean of the data differ across dimensions, resulting in poor performance of Euclidean distance as a distance metric. Mahalanobis distance uses the covariance matrix between data points during calculation, which better considers the data characteristics across various dimensions and provides better performance in high-dimensional data. The formula for Mahalanobis distance is expressed as follows:
[0040]
[0041] Wherein dM(x i ,x j ) represents data point x i With x j Mahalanobis distance between them, (x i -x j ) T Representing point x i Values of each dimension and point x j The transpose of the differences between the values of each dimension, Σ -1 x represents i and x j The inverse of the covariance matrix.
[0042] The KNN algorithm is improved by using Mahalanobis distance as a measure of distance between points. KNN is a machine learning algorithm that finds the K nearest neighbors of a given center point. By finding neighbors, the distribution characteristics of a data point can be determined. Using Mahalanobis distance can more accurately find neighbors in high-dimensional data. The formula is as follows:
[0043] Knn(x i ,k)=S(dM(x i ,x j ),k),x j ∈X,x j ≠x i
[0044] Wherein Knn(x) i (k) represents x i The k nearest neighbor data points of the center, S(dM(x) i ,x j ),k) represents the relationship with x i The k data points with the smallest Mahalanobis distance, x j Belongs to all data points and is not equal to x i .
[0045] Step S2: Perform kernel density estimation on all data points to obtain the density estimate for each data point.
[0046] This step is used to estimate the kernel density of all data points, thereby obtaining the global density value of the data points. Kernel density estimation is a nonparametric test method that does not utilize prior knowledge about the data distribution and makes no assumptions about the data distribution. It is a method that studies the characteristics of data distribution starting from the data sample itself. The purpose of kernel density estimation is to estimate the probability density function of the given sample data. The estimation result is mainly affected by the estimation bandwidth and the kernel function. Since different data have different characteristics, different kernel functions are needed for estimation. The estimation bandwidth determines the sample data points used in the estimation process. It is particularly important to note that when the data dimension is uncertain or in high-dimensional data, the estimation bandwidth needs to be multiplied by the power of d. The formula for kernel density estimation is shown below:
[0047]
[0048] in This represents the density estimate of data point x, where x is d-dimensional, n is the number of data points in the dataset, and h represents the bandwidth during the fitting process. Represents the kernel function.
[0049] Considering that most real-world data follow a Gaussian distribution, and that the Gaussian distribution is more general in mathematical statistics, this application uses the Gaussian kernel function as the kernel function for this method, as shown below:
[0050]
[0051] Where exp represents the exponential function, and ||x|| represents the norm of the data point x.
[0052] Substituting the Gaussian kernel function into the formula for kernel density estimation, the kernel density estimate for a specific data point in this example is as follows:
[0053]
[0054] Where x j This means that the data excluding x i The remaining points.
[0055] The above formula yields the kernel density estimation results for all data points, which can better measure the density value of each data point in the dataset. The larger the density value, the more points there are near this point, and the more it is in a cluster of data points. The smaller the density value, the fewer points there are near this point, and the more isolated it is.
[0056] Step S3: Using the density estimate, normalize a data point and its K neighboring points and calculate the local entropy value.
[0057] Combined with x obtained from the KNN algorithm in step S1 i The density estimates obtained by applying kernel density estimation to all data points in step S2, along with the neighboring points of x, can be used to obtain the density estimates for point x. i The local entropy value centered on.
[0058] In a specific embodiment, the step of normalizing a data point and its K neighboring points using the density estimate and calculating the local entropy value includes:
[0059] Step S3.1, for data point x i The density estimate is normalized to obtain the normalized density estimate.
[0060] The density estimate after kernel density estimation may be greater than 1. Considering that in the entropy calculation process, the sum of the probability values of the data points to be calculated must be equal to 1, therefore, for data point x... i and data point x i For the neighbor data points of the center, we can first use an exponential function to transform them, and then use a normalization method to obtain the normalized density estimate.
[0061] Data point x i The density estimate after local normalization is shown below:
[0062]
[0063] in, Represents data point x i The density estimate, Knn(x) i (k) represents the x of the data point i The set of k neighbor data points, x m Represents the set Knn(x) i Data points in (k).
[0064] Step S3.2, for data point x i The j-th neighbor data point x ij Perform a normalization operation to obtain the normalized density estimate.
[0065] Its formula is expressed as follows:
[0066]
[0067] Where x ij Representing point x i The j-th neighbor data point, x represents ij The normalized density estimate, Represents data point x ij The density estimate, Represents data point x il Density estimate, data point x il Represents data point x i Neighbor data points.
[0068] Step S3.3: Calculate the data point x using the following formula. i The local entropy value E(x) i ):
[0069]
[0070] The local entropy value calculated in this embodiment uses Shannon entropy. In information theory, Shannon entropy is used to represent the amount of information. In machine learning, Shannon entropy reflects the degree of disorder (or order) of a system. The more ordered a system is, the lower its information entropy, and vice versa. In probability, it mainly manifests as whether the probability distribution is uniform, requiring that the sum of the probability values of the points used for calculation equals 1.
[0071] Normalization has already been achieved in the previous steps, so here we can directly use the normalized density estimate to calculate the value at point x. i The local entropy value centered at the center is represented as follows:
[0072]
[0073] In the formula E(x) i ) represents point x i The local entropy value is calculated for all data points in the dataset.
[0074] This embodiment obtains the probability of the current data point appearing among all local points based on the definition of probability, as shown below:
[0075]
[0076]
[0077] Step S4: Divide the local entropy value by the density estimate of the data point to obtain the entropy density ratio. Sort the entropy density ratios by size and filter out abnormal data points.
[0078] In step S3, data point x was obtained. i The local entropy value is used to describe the local density relationship of the current data point and to measure whether the density distribution of the current data point is uniform. In this step, the position of the data point in the global data points needs to be considered, so the entropy value is divided by the point x. i The density estimate yields the entropy density ratio of the global data, as shown below:
[0079]
[0080] Where ED(x) i ) represents point x i The ratio of entropy density, E(x) i ) represents point x i The local entropy value, Representing point x i The global density estimate.
[0081] When ED(x) i The larger the value of ED(x), the smaller the density value and the larger the local entropy value at that point, which can be identified as an outlier; when ED(x) is larger... i The smaller the value, the greater the density and the smaller the local entropy at that point, indicating that it is a normal point.
[0082] After calculating the entropy density ratio of all data points in the dataset, the dataset is sorted, and then outlier data points are filtered out based on the sorting results.
[0083] Specifically, outlier data points are filtered based on the sorting results. The number of outlier data points, 't', can be preset, and then 't' data points are selected as outliers based on their entropy density ratio, from largest to smallest. Alternatively, a threshold for the entropy density ratio can be set, and data points with an entropy density ratio greater than the threshold are considered outliers.
[0084] Through the above steps, the sequence number of the abnormal data point and the entropy density ratio of the abnormal data point are finally output, thus completing the anomaly detection in the dataset.
[0085] This application also provides experimental data to verify the effectiveness and efficiency of the proposed method. The method was tested on a 10-dimensional dataset with 700 data points, including 70 outliers. To test the robustness of the proposed method to the K value in KNN, the K value was gradually changed from 50 to 290 in increments of 10. Anomaly detection tests were performed against KNN, DCROD, and the proposed method, yielding the following results: Figure 2 The results are shown (MDNE is the method of this application), and the results for specific K values are plotted in the table below.
[0086] Table 1. Comparison of AUROC scores between this invention and other density anomaly detection methods.
[0087]
[0088] Table 1
[0089] As shown in Table 1, when the three methods were tested on the same dataset, it was found that the test results of KNN and DCROD under ten-dimensional data were greatly affected by the value of K, while the method of this application showed high robustness and the AUROC value remained above 0.97.
[0090] In summary, this application proposes a data anomaly detection method based on kernel density estimation and Shannon entropy. It utilizes KNN, kernel density estimation, and Shannon entropy to analyze data points in the dataset from both local and global perspectives, obtaining an entropy density ratio as a metric for outliers. Based on the entropy density ratio, outliers in the dataset can be filtered out. After testing and validation, this method demonstrates stronger robustness and higher AUROC value compared to other density-based anomaly detection methods.
[0091] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for detecting anomalies in wind turbine data based on kernel density estimation and Shannon entropy, characterized in that, The wind turbine data anomaly detection method based on kernel density estimation and Shannon entropy includes: For any data point among all the data points to be detected, calculate the distance based on the Mahalanobis distance. k One neighbor data point; Kernel density estimation is performed on all data points to obtain the density estimate for each data point; Using density estimates, for a data point and its k Normalize the neighboring points and calculate the local entropy value; Divide the local entropy value by the density estimate of the data point to obtain the entropy density ratio. Sort the entropy density ratios by size to filter out outlier data points. The density estimate is used for a data point and its... k Normalize the neighboring points and calculate the local entropy value, including: For data points The density estimate is normalized to obtain the normalized density estimate. : ; in, Representing data points The density estimate, Representing data points of k A set of neighbor data points; For data points The j Neighbor data points Perform a normalization operation to obtain the normalized density estimate. : ; in, Representing data points The density estimate, Representing data points The density estimate; The data points are calculated using the following formula. Local entropy : ; in, .
2. The wind turbine data anomaly detection method based on kernel density estimation and Shannon entropy according to claim 1, characterized in that, The kernel density estimation is performed on all data points to obtain the density estimate for each data point, using the following formula: ; in Representing data points x Density estimates, data points x yes d Dimensional data, n This refers to the number of data points in the dataset. h This represents the bandwidth during the fitting process. Represents the kernel function.
3. The wind turbine data anomaly detection method based on kernel density estimation and Shannon entropy according to claim 2, characterized in that, The kernel function used is a Gaussian kernel function.
4. The wind turbine data anomaly detection method based on kernel density estimation and Shannon entropy according to claim 1, characterized in that, The step of sorting the entropy density ratios by magnitude and filtering out outlier data points includes: Sort the entropy density ratios by magnitude, and preset the number of outlier data points to be output. t Then, select from largest to smallest according to the entropy density ratio. t These data points are considered outliers.