A data analysis-based current sensor anomaly identification method
By employing a weighted fusion method combining the K-means++ algorithm and a local anomaly discriminator, the problem of false alarms in current sensors under load changes was solved, achieving accurate identification of sensor anomalies and improving reliability.
Patent Information
- Application Number
- CN202610902573.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2046-06-23
AI Technical Summary
Existing current sensor anomaly identification methods have difficulty distinguishing between sensor malfunctions and characteristic fluctuations caused by changes in normal load conditions when the operating conditions of the load equipment change, leading to frequent false alarms.
A data analysis-based approach is adopted, which uses the K-means++ algorithm to cluster the multiple feature vectors output by the current sensor, identify the operating conditions, and construct a local anomaly discriminator. The anomaly score is optimized by weighted fusion of soft membership degree and confidence of the local anomaly discriminator, and the sensor anomaly is adaptively identified.
It effectively isolates feature differences caused by load changes, accurately captures sensor anomalies, reduces false alarm rates, and improves the reliability and adaptability of identification.
Smart Images

Figure CN122449452B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method for anomaly identification of current sensors based on data analysis. Background Technology
[0002] As a key sensing component in power systems, industrial automation, and intelligent equipment, the reliability of current sensors is directly related to the safety of system operation and the accuracy of status monitoring. The purpose of anomaly identification of current sensors is to promptly detect performance degradation, drift, or faults (such as zero-point drift, abnormal gain, nonlinear distortion, etc.) of the current sensors, so as to avoid a chain of misjudgments or safety accidents caused by sensor data distortion.
[0003] Currently, anomaly identification methods for current sensors are mainly based on rules or statistical models. One widely used anomaly identification method is as follows: during the current sensor's normal steady-state operating cycle, its output data is collected and a set of statistical characteristics (e.g., mean, variance, peak value, etc.) are calculated to establish a benchmark feature. In subsequent online monitoring, the real-time statistical characteristics of the current signal are calculated and compared with the benchmark feature. If the deviation between the real-time statistical characteristics and the benchmark feature exceeds a preset fixed threshold, the current sensor is determined to be abnormal.
[0004] However, in actual industrial scenarios, the operating status of the load equipment (such as motors and frequency converters) monitored by current sensors is not static. It undergoes legitimate and significant dynamic changes with production plans and process requirements (e.g., start-up, stop-up, speed adjustment, and loading). These normal operating condition changes also cause drastic changes in the statistical characteristics of the current signal, such as amplitude and fluctuation. As a result, existing current sensor anomaly identification methods are unable to effectively distinguish between feature distortion caused by sensor anomalies or feature fluctuations caused by normal operating condition changes of the load equipment. They have poor adaptability to changes in equipment operating conditions and often lead to a large number of false alarms in situations such as load switching.
[0005] Therefore, how to reduce false alarms caused by abnormal identification of current sensors under any operating conditions has become an urgent problem to be solved. Summary of the Invention
[0006] In view of this, embodiments of the present invention provide a current sensor anomaly identification method based on data analysis to solve the problem of how to reduce false alarms caused by current sensor anomaly identification under any operating conditions.
[0007] This invention provides a method for anomaly identification of current sensors based on data analysis, the method comprising the following steps:
[0008] Acquire the real-time current data sequence output by the current sensor, divide the real-time current data sequence into at least two non-overlapping subsequences, and extract features from each subsequence in a preset number of dimensions to obtain a multi-feature vector for each subsequence;
[0009] The K-means++ algorithm is used to cluster all multi-feature vectors to obtain K clusters, and each cluster represents a working condition.
[0010] For any working condition, the multi-feature vector under any working condition is compared with the normal sample set of any working condition to obtain the anomaly sensitivity score of each feature under any working condition, so as to determine the anomaly sensitive feature set of any working condition. Based on the anomaly sensitive feature set, a training sample set is selected from the normal sample set of any working condition. The single-class support vector machine is trained using the training sample set to obtain the local anomaly discriminator of any working condition.
[0011] Based on the local anomaly discriminator for each working condition, the local anomaly score of each multi-feature vector is obtained. The membership strength of each multi-feature vector in each working condition is adaptively analyzed. Combined with the confidence of the local anomaly discriminator for each working condition, the local anomaly scores of all multi-feature vectors are weighted and fused to obtain a comprehensive optimized anomaly score.
[0012] Anomalies in the current sensor are identified based on the comprehensive optimized anomaly score.
[0013] Preferably, the step of extracting features from each of the subsequences in a predetermined number of dimensions to obtain a multi-feature vector for each subsequence includes:
[0014] For any subsequence, extract the time-series features, frequency-domain features, and nonlinear features of the subsequence to form an initial multi-feature vector. The time-series features include mean, standard deviation, peak value, skewness, and waveform factor. The frequency-domain features include fundamental amplitude, harmonic distortion rate, and amplitude proportion of a specific harmonic. The nonlinear features include approximate entropy or sample entropy.
[0015] Obtain the initial multi-feature vector of each subsequence, and perform Z-score standardization on the feature values in the initial multi-feature vector of each subsequence according to the feature dimension to obtain the corresponding multi-feature vector of each subsequence.
[0016] Preferably, the step of comparing the multi-feature vector under any working condition with the normal sample set under any working condition to obtain the anomaly sensitivity score of each feature under any working condition includes:
[0017] Targeting features Extract features from each multi-feature vector under any given working condition. The corresponding eigenvalues are used to obtain the average eigenvalue and the standard deviation of the eigenvalues; features are extracted from each historical multi-feature vector in the normal sample set for any given working condition. The corresponding historical feature values are used to obtain the average historical feature value and the standard deviation of the historical feature value.
[0018] Calculate the absolute value of the difference between the average eigenvalue and the average historical eigenvalue; then, perform a weighted sum of the standard deviations of the eigenvalues and the historical eigenvalues to obtain the weighted eigenvalue standard deviation; finally, obtain the eigenvalue based on the ratio between the absolute value of the eigenvalue difference and the weighted eigenvalue standard deviation. Anomaly sensitivity score under any of the stated operating conditions.
[0019] Preferably, determining the abnormal sensitivity feature set for any of the operating conditions includes:
[0020] Based on the anomaly sensitivity score of each feature under any operating condition, a feature sequence is obtained in descending order of the anomaly sensitivity scores. The first D features of the feature sequence are taken to form the anomaly sensitivity feature set for any operating condition, where D is a positive integer.
[0021] Preferably, the adaptive analysis assigns each multi-feature vector to the membership strength under each working condition, and combines the confidence of the local anomaly discriminator for each working condition to perform weighted fusion of the local anomaly scores of all multi-feature vectors to obtain a comprehensive optimized anomaly score, including:
[0022] For any multi-feature vector, the soft weight of the multi-feature vector belonging to its respective working condition is obtained based on the Euclidean distance between the multi-feature vector and the cluster center corresponding to each working condition.
[0023] Based on the online real-time update method, the confidence weight of the local discriminator of the working condition to which any of the multiple feature vectors belong is obtained, and the product between the soft weight and the confidence weight is calculated as the comprehensive weight of any of the multiple feature vectors.
[0024] Obtain the comprehensive weight of each multi-feature vector, and based on the comprehensive weight of each multi-feature vector, perform a weighted average of the local anomaly scores of all multi-feature vectors to obtain the comprehensive optimized anomaly score.
[0025] Preferably, the step of obtaining the soft weight of any multi-feature vector belonging to its respective working condition based on the Euclidean distance between each multi-feature vector and the cluster center corresponding to each working condition includes:
[0026] Calculate the Euclidean distance between any of the multiple feature vectors and the cluster center corresponding to each working condition, and use the negative of each Euclidean distance as an exponential function with the natural constant as the base to obtain the soft membership degree of any of the multiple feature vectors to the cluster center corresponding to each working condition.
[0027] The soft weight of a given multi-feature vector belonging to its respective working condition is obtained by taking into account the proportion of the soft membership degree of any multi-feature vector to the cluster center corresponding to its working condition in the total soft membership degree of any multi-feature vector to the cluster centers corresponding to all working conditions.
[0028] Preferably, before acquiring the real-time current data sequence output by the current sensor, the following steps are included:
[0029] Multiple mutually exclusive operating conditions covering all operating states are identified. For each operating condition, when the current sensor is in normal condition, current time series data under the operating condition is collected, and features are extracted from the current time series data under a preset number of dimensions to obtain a normal sample set composed of multiple feature vectors under the operating condition.
[0030] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:
[0031] In this invention, the K-means++ algorithm is used to cluster all multi-feature vectors to classify operating conditions, isolating the feature differences of normal load changes between different clusters. Anomaly judgment is only made within the cluster based on the sensor's own fluctuations, fundamentally avoiding false alarms caused by legitimate operating condition changes such as load start-up, shutdown, and speed adjustment. By obtaining the anomaly sensitivity score of each feature under each operating condition, the anomaly sensitive feature set of each operating condition is obtained and the feature interference caused by load fluctuations is eliminated. Combined with the local anomaly discriminator for each operating condition, early weak faults such as zero-point drift and gain anomalies can be accurately captured. Finally, a soft membership degree and confidence weighted fusion mechanism of the local anomaly discriminator is introduced to optimize the local anomaly score detected by the local anomaly discriminator, alleviating the problems of blurred cluster boundaries and local model performance differences, adapting to complex and ever-changing industrial environments, and significantly improving the overall recognition reliability. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a flowchart of a current sensor anomaly identification method based on data analysis provided in Embodiment 1 of the present invention. Detailed Implementation
[0034] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.
[0035] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.
[0036] To illustrate the technical solution of the present invention, specific embodiments are described below.
[0037] See Figure 1 This is a flowchart of a current sensor anomaly identification method based on data analysis provided in Embodiment 1 of the present invention. Figure 1 As shown, the method may include:
[0038] Step S101: Obtain the real-time current data sequence output by the current sensor, divide the real-time current data sequence into at least two non-overlapping subsequences, and extract features from each subsequence in a preset number of dimensions to obtain a multi-feature vector for each subsequence.
[0039] Acquire real-time current data sequence from current sensor Here, n represents the length of the sequence. First, a moving average filter or a median filter is used to filter out high-frequency measurement noise and occasional pulse interference in the real-time current data sequence. For scenarios where power frequency interference may exist, a notch filter can be selectively applied. To capture the operating cycle of the load equipment, the continuous current signal (the filtered real-time current data sequence) is divided into non-overlapping segments according to a fixed time window (e.g., 10 seconds) or a fixed number of sampling points (e.g., 1000 points) to obtain multiple subsequences. Each subsequence is considered an independent analysis object.
[0040] Features are extracted from each subsequence from the following three dimensions to form the feature vector of the corresponding subsequence: time-domain features, including but not limited to mean, standard deviation, peak value, skewness, kurtosis, waveform factor, and impulse factor; frequency-domain features: Fast Fourier Transform (FFT) is performed on the segment data to calculate the amplitude of the fundamental wave (50Hz / 60Hz), total harmonic distortion (THD), and the amplitude proportion of specific harmonics (such as the 3rd, 5th, and 7th); nonlinear features: to capture subtle changes in the sensor response characteristics, approximate entropy or sample entropy is calculated to measure the complexity and regularity of the current signal.
[0041] In one embodiment, for any subsequence, the temporal features, frequency domain features, and nonlinear features of the subsequence are extracted to form an initial multi-feature vector. The temporal features include mean, standard deviation, peak value, skewness, and waveform factor. The frequency domain features include fundamental amplitude, harmonic distortion rate, and amplitude proportion of a specific harmonic. The nonlinear features include approximate entropy or sample entropy.
[0042] Obtain the initial multi-feature vector for each subsequence, and perform feature standardization on the initial multi-feature vector of each subsequence: according to the feature dimension, perform Z-score standardization on the feature values in the initial multi-feature vector of each subsequence, so that the mean of each feature is 0 and the standard deviation is 1, to eliminate the influence of dimensions and accelerate the convergence of subsequent models, thereby obtaining the multi-feature vector of each subsequence. Let the multi-feature vector of the m-th subsequence be denoted as... .
[0043] It should be noted that before obtaining the real-time current data sequence output by the current sensor, it is necessary to construct a normal sample reference set of the current sensor under different operating conditions. This set will serve as a benchmark reference for subsequent real-time analysis. The general process of constructing the normal sample reference set of the current sensor under different operating conditions is as follows:
[0044] (1) Determine multiple mutually exclusive operating conditions that cover all operating states.
[0045] Operating conditions refer to the operating state of equipment / systems under specific tasks, loads, and environmental conditions (such as "stable operation under low load" and "fluctuating operation under high load" for motors). Therefore, grouping the operating states of current sensors according to "operating conditions" yields different operating conditions. It is necessary to use domain knowledge or preliminary data analysis to classify states with similar operating characteristics into one category, forming several mutually exclusive operating conditions that cover all operating conditions.
[0046] (2) For each operating condition, when the current sensor is in normal condition, collect the current time sequence data under the operating condition.
[0047] During the initial operation phase when the current sensor is "completely normal" (the "initial operation phase" refers to the period in the early stage of the current sensor's commissioning when the current sensor is not contaminated (no faults, no drift, no incorrect installation)), sufficient and representative current time-series data are collected for each operating condition. The data collection method is to record the current time-series data of all current sensors under each operating condition through the conventional current sensor data collection process.
[0048] (3) Perform feature extraction on each current time series data under a preset number of dimensions to obtain a normal sample set composed of multiple feature vectors under the working condition.
[0049] In step (2), the current time series data under each working condition are processed according to the above-mentioned method of obtaining multiple feature vectors. The feature extraction is performed on each current time series data under a preset number of dimensions to obtain multiple feature vectors to form a normal sample set under the corresponding working condition. This is the benchmark reference for the normal state of the current sensor under the corresponding working condition, thereby obtaining the normal sample set for each working condition.
[0050] Step S102: Use the K-means++ algorithm to cluster all multi-feature vectors to obtain K clusters, and each cluster represents a working condition.
[0051] Based on the objective fact that "changes in operating conditions are the primary and legitimate source of variation, while sensor anomalies are secondary sources of variation that need to be detected," after obtaining multiple feature vectors of multiple subsequences of the real-time current data sequence, unsupervised clustering is used to coarsely classify the operating conditions of the multiple feature vectors of the multiple subsequences. The purpose is to group multiple feature vectors with similar external load characteristics (similar changes in operating conditions) into one category. Thus, for each operating condition, the main difference between its multiple feature vectors should be more likely to come from the different states of the sensor itself, rather than drastic changes in the load.
[0052] Since the fluctuations in the current signal output by the current sensor are mainly caused by two factors: external factors (normal start-up, shutdown, speed regulation, loading, etc. of the load equipment) and internal factors (zero drift, gain error, nonlinear faults, etc. of the sensor itself), clustering can isolate the feature differences with large amplitudes caused by external factors to different operating conditions. Therefore, in this embodiment of the invention, based on the signal morphology characteristics of the real-time current data sequence, the multi-feature vectors of all subsequences are divided into several clusters with equal internal feature patterns, so that each cluster represents a typical and similar operating state mode, that is, the operating condition.
[0053] Specifically, in this embodiment of the invention, the K-means++ algorithm is preferentially used to cluster all multi-feature vectors, resulting in K clusters. Each cluster represents a work condition. The K-means++ algorithm is an improved K-means algorithm. Its core improvement lies in the selection mechanism of the initial cluster centers. By making the initial cluster centers as dispersed as possible, the risk of the algorithm getting trapped in local optima is reduced, and the convergence speed is improved. The advantages of the K-means++ algorithm are that its principle is intuitive, its computational efficiency is high, and it effectively avoids the problem of traditional K-means getting trapped in local optima, making the clustering results more stable and representative. The K-means++ algorithm minimizes the sum of squared distances from all multi-feature vectors to the centers of their respective clusters. After iteration, it finally divides all multi-feature vectors into K mutually exclusive clusters and generates a cluster center for each cluster. It should be noted that the number of work conditions corresponding to the K clusters is less than or equal to the number of work conditions corresponding to the normal sample set constructed in step S101.
[0054] Among them, using the K-means++ algorithm to cluster all multi-feature vectors to obtain K clusters is an existing technology. Its general steps are as follows: (1) Use the elbow rule or silhouette coefficient to determine the K value in the K-means++ algorithm: The elbow rule is roughly operated as follows: calculate the sum of squared errors within the cluster under different K values (e.g., 2 to 10), draw the curve of K value and sum of squared errors, and select the K value corresponding to the inflection point of the curve; The silhouette coefficient is roughly operated as follows: calculate the average silhouette coefficient of all samples under different K values, which can measure the tightness of a sample with its own cluster and the separation from other clusters. The value range is [-1, 1]. The larger the average silhouette coefficient, the better the clustering effect. Select the K value that maximizes the average silhouette coefficient. (3) For each multi-feature vector Based on the output of the K-means algorithm, a cluster label is assigned to each feature vector. Based on the cluster label, all multi-feature vectors are divided into K clusters, and the cluster center of each cluster is obtained.
[0055] Step S103: For any working condition, compare the multi-feature vector under any working condition with the normal sample set of any working condition to obtain the anomaly sensitivity score of each feature under any working condition, so as to determine the anomaly sensitive feature set of any working condition. Based on the anomaly sensitive feature set, select a training sample set from the normal sample set of any working condition, and use the training sample set to train a single-class support vector machine to obtain a local anomaly discriminator for any working condition.
[0056] Under the same operating conditions, the feature distribution of normal samples of current sensors is relatively concentrated. When the current sensor malfunctions, some features will show significant deviations. Since some features may be strongly correlated with the load, they will also fluctuate with load fine-tuning when the current sensor is normal. Therefore, such features are noise for identifying current sensor malfunctions. Thus, it is necessary to measure the sensitivity of features under each operating condition to distinguish the ability to identify normal and abnormal operating conditions.
[0057] For operating condition k, the multi-feature vectors under operating condition k are compared with the normal sample set under operating condition k to obtain the anomaly sensitivity score of each feature under operating condition k, thereby determining the anomaly sensitive feature set for operating condition k: based on features For example, extracting features from each multi-feature vector under operating condition k. The corresponding eigenvalues are used to obtain the mean eigenvalue and the standard deviation of the eigenvalues; features are extracted from each historical multi-eigenvector in the normal sample set of working condition k. The corresponding historical feature values are used to obtain the average historical feature value and the standard deviation of the historical feature value.
[0058] Calculate the absolute value of the difference between the average eigenvalue and the average historical eigenvalue; then, perform a weighted sum of the standard deviations of the eigenvalues and the historical eigenvalues to obtain the weighted eigenvalue standard deviation; finally, obtain the eigenvalue based on the ratio between the absolute value of the eigenvalue difference and the weighted eigenvalue standard deviation. Anomaly sensitivity score under operating condition k.
[0059] In a real-time manner, features The formula for calculating the anomaly sensitivity score under operating condition k is as follows:
[0060]
[0061] in, Representation of features Anomaly sensitivity score under operating condition k Represents the features in each multi-feature vector under working condition k. The average of the corresponding eigenvalues, also known as the average eigenvalue, Represents the features in each multi-feature vector under working condition k. The standard deviation of the corresponding eigenvalues, also known as the eigenvalue standard deviation. This represents the features in each historical multi-feature vector of the normal sample set for operating condition k. The average value of the corresponding eigenvalues, also known as the average historical eigenvalues. This represents the features in each historical multi-feature vector of the normal sample set for operating condition k. The standard deviation of the corresponding eigenvalues, also known as the standard deviation of historical eigenvalues, where | represents the absolute value sign. The reference weight represents the normal sample set for operating condition k.
[0062] It should be noted that, The larger the value, the more characteristic it represents. The more sensitive the current sensor is to anomalies, the better the discrimination; using the average value of the eigenvalues instead of a single point is to enhance robustness and smooth instantaneous fluctuations; the reference weights of the normal sample set for operating condition k. The value range is [0, 1], with a reference value of 0.7 to give higher weight to the standard deviation of the normal sample set; the denominator design in this formula incorporates features. Inherent fluctuations under normal conditions And the observed fluctuations in the new batch This allows the formula to not only consider the degree of deviation of the feature mean (numerator), but also to penalize features that are inherently highly volatile or highly unstable in new batches, thereby screening out “abnormally sensitive features” that have significant and stable deviations.
[0063] Because the anomaly sensitivity score can dynamically evaluate the discriminative value of each feature under operating condition k without requiring a preset threshold, and can automatically favor features whose mean value deviates significantly from the normal baseline and whose distribution is relatively concentrated (small fluctuations) when the current sensor is abnormal, such features can provide more reliable anomaly signals. Therefore, based on features... The method for obtaining the anomaly sensitivity score under operating condition k involves obtaining a feature sequence based on the anomaly sensitivity score of each feature under operating condition k, and sorting the features in descending order of the anomaly sensitivity scores. The first D features of the feature sequence are then used to form the anomaly sensitivity feature set for operating condition k, where D is a positive integer. Preferably, in this embodiment of the invention, D is set to one-third of the number of features in 5 or more feature vectors, and the specific value can be set according to the actual situation.
[0064] After obtaining the abnormality-sensitive feature set of working condition k, a lightweight detection model, such as a one-class support vector machine or an isolated forest, is trained in conjunction with the normal sample set of working condition k as a local anomaly discriminator for working condition k. This local anomaly discriminator outputs a local anomaly score for each multi-feature vector under working condition k. The training method for this local anomaly discriminator is existing technology. In this embodiment of the invention, a one-class support vector machine (one-class SVM) is used as an example to describe the general process of training the local anomaly discriminator:
[0065] (1) Input preparation: For working condition k, only the feature columns corresponding to the abnormal sensitive feature set of working condition k are selected from its normal reference set to form the training data matrix. , where N represents the number of multi-feature vectors in the normal reference set, and D represents the number of features in the abnormally sensitive feature set.
[0066] (2) Model training to obtain a local anomaly discriminator: The goal of a single-class support vector machine is to find a hyperplane in a high-dimensional feature space such that the hyperplane can separate the vast majority of normal data points from the origin, and maximizes the distance (interval) from the hyperplane to the origin. This hyperplane is the boundary of the "normal" region. Therefore, the training data matrix... In a single-class support vector machine, solving the optimization problem yields the decision function. For a new sample point, the sign of the decision function (+1 or -1) directly indicates whether it is normal or abnormal, while the distance from the new sample point to the hyperplane is the local anomaly score of the new sample point.
[0067] Step S104: Based on the local anomaly discriminator for each working condition, obtain the local anomaly score of each multi-feature vector, adaptively analyze the membership strength of each multi-feature vector assigned to each working condition, and combine the confidence of the local anomaly discriminator for each working condition to perform weighted fusion of the local anomaly scores of all multi-feature vectors to obtain the comprehensive optimized anomaly score.
[0068] Following the method for obtaining the local anomaly discriminator for working condition k described above, the local anomaly discriminator for each working condition is obtained. Then, each multi-feature vector under each working condition is input into the corresponding local anomaly discriminator to obtain the local anomaly score for each multi-feature vector. However, considering that the K-means algorithm may have samples with ambiguous boundaries during actual clustering, and that the performance (discrimination confidence) of the local anomaly discriminators for different working conditions varies due to differences in training data quality and the separability of anomaly-sensitive feature sets, this embodiment of the invention constructs a decision layer to adaptively evaluate and analyze the membership strength of the current sample assigned to each working condition, as well as the reliability of the local anomaly discriminator for each working condition at the current moment. This layer then performs a weighted fusion of the local anomaly scores for all multi-feature vectors to optimize and correct the local anomaly score for each multi-feature vector.
[0069] For any multi-feature vector, based on the Euclidean distance between the multi-feature vector and the cluster center corresponding to each working condition, the soft weight of the multi-feature vector belonging to its working condition is obtained. Based on an online real-time update method, the confidence weight of the local discriminator of the working condition to which the multi-feature vector belongs is obtained, and the product between the soft weight and the confidence weight is calculated as the comprehensive weight of the multi-feature vector.
[0070] In one implementation, taking the i-th feature vector under working condition k as an example, the Euclidean distance between the i-th multiple feature vector and the cluster center corresponding to each working condition is calculated. The negative of each Euclidean distance is used as an exponential function with the natural constant as the base to obtain the soft membership degree of the i-th multiple feature vector to the cluster center corresponding to each working condition. Based on the proportion of the soft membership degree of the i-th multiple feature vector to the cluster center corresponding to its working condition in the soft membership degree of the i-th multiple feature vector to the cluster centers corresponding to all working conditions, the soft weight of the i-th multiple feature vector belonging to its working condition is obtained. The formula for calculating the soft weight of the i-th multiple feature vector belonging to its working condition k is as follows:
[0071]
[0072] in, This represents the soft weight by which the i-th multi-eigenvector belongs to its operating condition k. This represents an exponential function with the natural constant as its base. This represents the i-th multiple eigenvector under operating condition k. Indicates the corresponding cluster center. K represents the cluster center corresponding to working condition j, and K represents the number of working conditions, which is also the number of clusters.
[0073] It should be noted that, This represents the Euclidean distance between the i-th multi-feature vector and the cluster center corresponding to working condition k. This represents the accumulated Euclidean distance between the i-th multi-feature vector and the cluster center corresponding to each working condition. This accumulated value is used to calculate the Euclidean distance. Normalization is performed to determine the soft weight of the i-th multi-feature vector belonging to its working condition k. The greater the Euclidean distance between the i-th multi-feature vector and the cluster center corresponding to working condition k, the greater the corresponding soft weight.
[0074] The confidence weights of the local discriminator based on online updates of operating condition k according to historical performance. For example, if the confidence weight of the local discriminator for operating condition k is set to 1, and feedback is obtained (manual confirmation or periodic calibration), if the judgment of the local discriminator for operating condition k is confirmed to be correct, its confidence weight is slowly increased. If it is proven to be incorrect, its confidence weight is reduced. The rule setting standard is: if the judgment is proven correct, then the increment is... It is recommended to choose a small positive value, such as 0.01, 0.02, or 0.05; if the error is confirmed, the amount should be reduced. The setting should be greater than the increment. To reflect a more severe penalty, values of 0.05, 0.1, or 0.2 are recommended. A common ratio is 2 to 5 times the penalty or reward step size.
[0075] Similarly, the comprehensive weight of each multi-feature vector is obtained. Based on the comprehensive weight of each multi-feature vector, the local anomaly scores of all multi-feature vectors are weighted and averaged to obtain the comprehensive optimized anomaly score. The formula for calculating the comprehensive optimized anomaly score is as follows:
[0076]
[0077] in, This represents the comprehensive optimization anomaly score, where m represents the number of multiple feature vectors, i.e., the number of subsequences. This represents the soft weight by which the i-th multi-eigenvector belongs to its operating condition k. This represents the confidence weight of the local discriminator for the working condition k to which the i-th multi-feature vector belongs. This represents the local anomaly score of the i-th multi-feature vector output by the local anomaly discriminator for operating condition k.
[0078] It should be noted that, It is a weighted average of all local judgments after considering the similarity of each multi-feature vector with all working conditions and the reliability of the local anomaly discriminator of each working condition. For example, even if a sample is hard-classified to working condition A, if it is also close to the center of working condition B and the local anomaly discriminator of working condition B is considered more reliable, then the judgment of working condition B will also have a considerable weight in the final decision.
[0079] Step S105: Anomaly identification of the current sensor is performed based on the comprehensive optimized anomaly score.
[0080] After obtaining the comprehensive optimized anomaly score, dynamic thresholds are directly used for anomaly identification of the current sensor: during the initial normal operation phase of the current sensor, a series of samples are collected. Fractions, calculate their mean and standard deviation Set an abnormal threshold (For example During online monitoring, if the comprehensive optimization anomaly score is obtained in real time... This will trigger anomaly detection and alarm.
[0081] This invention, through condition perception and feature analysis, can adaptively isolate the impact of legitimate load changes into different operating conditions. Within each operating condition, it uses optimally selected features sensitive to the current sensor's own state for monitoring. Then, through a dynamic fusion mechanism, it comprehensively considers all factors, thereby greatly suppressing false alarms caused by normal equipment start-up and shutdown or load changes. This significantly improves the accuracy and reliability of current sensor anomaly identification in complex industrial environments.
[0082] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for anomaly identification of a current sensor based on data analysis, characterized in that, The method includes: Acquire the real-time current data sequence output by the current sensor, divide the real-time current data sequence into at least two non-overlapping subsequences, and extract features from each subsequence in a preset number of dimensions to obtain a multi-feature vector for each subsequence; The K-means++ algorithm is used to cluster all multi-feature vectors to obtain K clusters, and each cluster represents a working condition. For any working condition, the multi-feature vector under any working condition is compared with the normal sample set of any working condition to obtain the anomaly sensitivity score of each feature under any working condition, so as to determine the anomaly sensitive feature set of any working condition. Based on the anomaly sensitive feature set, a training sample set is selected from the normal sample set of any working condition. The single-class support vector machine is trained using the training sample set to obtain the local anomaly discriminator of any working condition. Based on the local anomaly discriminator for each working condition, the local anomaly score of each multi-feature vector is obtained. The membership strength of each multi-feature vector in each working condition is adaptively analyzed. Combined with the confidence of the local anomaly discriminator for each working condition, the local anomaly scores of all multi-feature vectors are weighted and fused to obtain a comprehensive optimized anomaly score. Anomalies in the current sensor are identified based on the comprehensive optimized anomaly score. The step of comparing the multi-feature vector under any operating condition with the normal sample set under any operating condition to obtain the anomaly sensitivity score of each feature under any operating condition includes: Targeting features Extract features from each multi-feature vector under any given working condition. The corresponding eigenvalues are used to obtain the average eigenvalue and the standard deviation of the eigenvalues; features are extracted from each historical multi-feature vector in the normal sample set for any given working condition. The corresponding historical feature values are used to obtain the average historical feature value and the standard deviation of the historical feature value. Calculate the absolute value of the difference between the average eigenvalue and the average historical eigenvalue; then, perform a weighted sum of the standard deviations of the eigenvalues and the historical eigenvalues to obtain the weighted eigenvalue standard deviation; finally, obtain the eigenvalue based on the ratio between the absolute value of the eigenvalue difference and the weighted eigenvalue standard deviation. Anomaly sensitivity score under any of the stated operating conditions; The adaptive analysis assigns the membership strength of each multi-feature vector to various working conditions, and combines the confidence of the local anomaly discriminator for each working condition to perform weighted fusion of the local anomaly scores of all multi-feature vectors, resulting in a comprehensive optimized anomaly score, including: For any multi-feature vector, the soft weight of the multi-feature vector belonging to its respective working condition is obtained based on the Euclidean distance between the multi-feature vector and the cluster center corresponding to each working condition. Based on the online real-time update method, the confidence weight of the local discriminator of the working condition to which any of the multiple feature vectors belong is obtained, and the product between the soft weight and the confidence weight is calculated as the comprehensive weight of any of the multiple feature vectors. Obtain the comprehensive weight of each multi-feature vector, and based on the comprehensive weight of each multi-feature vector, perform a weighted average of the local anomaly scores of all multi-feature vectors to obtain the comprehensive optimized anomaly score.
2. The current sensor anomaly identification method based on data analysis according to claim 1, characterized in that, The step of extracting features from each of the subsequences in a predetermined number of dimensions to obtain a multi-feature vector for each subsequence includes: For any subsequence, extract the time-series features, frequency-domain features, and nonlinear features of the subsequence to form an initial multi-feature vector. The time-series features include mean, standard deviation, peak value, skewness, and waveform factor. The frequency-domain features include fundamental amplitude, harmonic distortion rate, and amplitude proportion of a specific harmonic. The nonlinear features include approximate entropy or sample entropy. Obtain the initial multi-feature vector of each subsequence, and perform Z-score standardization on the feature values in the initial multi-feature vector of each subsequence according to the feature dimension to obtain the corresponding multi-feature vector of each subsequence.
3. The current sensor anomaly identification method based on data analysis according to claim 1, characterized in that, The determination of the abnormal sensitive feature set for any of the above operating conditions includes: Based on the anomaly sensitivity score of each feature under any operating condition, a feature sequence is obtained in descending order of the anomaly sensitivity scores. The first D features of the feature sequence are taken to form the anomaly sensitivity feature set for any operating condition, where D is a positive integer.
4. The current sensor anomaly identification method based on data analysis according to claim 1, characterized in that, The step of obtaining the soft weights of any multi-feature vector belonging to its respective working condition based on the Euclidean distance between each multi-feature vector and the cluster center corresponding to each working condition includes: Calculate the Euclidean distance between any of the multiple feature vectors and the cluster center corresponding to each working condition, and use the negative of each Euclidean distance as an exponential function with the natural constant as the base to obtain the soft membership degree of any of the multiple feature vectors to the cluster center corresponding to each working condition. The soft weight of a given multi-feature vector belonging to its respective working condition is obtained by taking into account the proportion of the soft membership degree of any multi-feature vector to the cluster center corresponding to its working condition in the total soft membership degree of any multi-feature vector to the cluster centers corresponding to all working conditions.
5. The current sensor anomaly identification method based on data analysis according to claim 1, characterized in that, Before acquiring the real-time current data sequence output by the current sensor, the process includes: Multiple mutually exclusive operating conditions covering all operating states are identified. For each operating condition, when the current sensor is in normal condition, current time series data under the operating condition is collected, and features are extracted from the current time series data under a preset number of dimensions to obtain a normal sample set composed of multiple feature vectors under the operating condition.
Citation Information
Patent Citations
Current transformer for fault diagnosis and processing
CN118091234A
Distribution box fault detection method, electronic equipment and readable storage medium
CN120387046A