State grid smart energy unit detection method based on correlation analysis
Through the detection method based on correlation analysis, multi-dimensional data of smart energy units are collected and processed in real time, feature correlation is calculated, abnormal detection and fault pattern recognition are carried out, and problems of low detection accuracy and false alarms and missed responses in traditional methods are solved, achieving high-precision real-time monitoring and fault diagnosis.
Patent Information
- Application Number
- CN202510161493.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-06-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing smart energy unit detection technology is difficult to meet the needs of high-precision real-time monitoring and fault diagnosis. It is mainly because traditional methods fail to fully consider the correlation and complex relationship between multi-dimensional data, resulting in low detection accuracy and prone to false alarms and missed alarms.
Using a detection method based on association analysis, multiple sensors collect multi-dimensional operation data in real time, perform data preprocessing and feature extraction, calculate the correlation between features, form a related feature set, and use multi-dimensional anomaly detection algorithm and decision tree algorithm for real-time monitoring and failure mode recognition.
It realizes high-precision real-time monitoring and fault diagnosis of smart energy units, significantly improves detection accuracy, reduces the risk of false alarms and missed alarms, and can more accurately identify abnormal characteristics and fault modes in system operation.
Smart Images

Figure CN120086767A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart grids, and particularly to a detection method for State Grid intelligent energy units based on association analysis. Background Art
[0002] With the rapid development of smart grids and intelligent energy systems, the State Grid Corporation has been continuously promoting the application of intelligent devices to improve the automation and accuracy of energy management; in intelligent energy units, a large number of sensors and monitoring devices are widely used to collect multi-dimensional operation data such as voltage, current, power, temperature, and humidity in real time; these data provide a necessary basis for system status monitoring, fault diagnosis, and maintenance; however, due to the large variety of devices, complex data dimensions, and changing system operating environments, it is difficult to meet the high-precision requirements for real-time monitoring and fault diagnosis of intelligent energy units simply relying on traditional detection methods and devices.
[0003] Existing detection technologies for intelligent energy units mainly focus on single indicators or traditional data processing methods, usually performing anomaly detection by setting thresholds or based on simple statistical methods. However, these methods have many limitations; firstly, traditional detection methods fail to fully consider the potential correlations between different features, ignoring the interaction and complex relationships between multi-dimensional data, resulting in low detection accuracy; secondly, most of the data processing methods in the existing technologies rely on manually set rules and experience, and have poor adaptability to multi-dimensional and multi-time scale data, and cannot cope with the dynamically changing power system states; with the increase in system scale and changes in operating conditions, traditional anomaly detection methods are prone to false alarms and missed alarms. Therefore, how to effectively extract key features from multi-dimensional data, analyze the correlation relationships between different features, and perform accurate fault mode recognition based on these correlation features has become a difficult problem in the current technology. Summary of the Invention
[0004] Based on the above purposes, the present invention provides a detection method for State Grid intelligent energy units based on association analysis.
[0005] The detection method for State Grid intelligent energy units based on association analysis includes the following steps:
[0006] S1: Real-time collect multi-dimensional operation data through a variety of sensors installed in the intelligent energy unit, including voltage, current, power, temperature, and humidity;
[0007] S2: Preprocess the collected multi-dimensional operation data, including data cleaning, missing value filling, and data normalization;
[0008] S3: Extract relevant features from the preprocessed data, including time-domain features, frequency-domain features, and trend features, to provide basic data for subsequent correlation analysis;
[0009] S4: Use statistical analysis methods to calculate the correlation between each feature, identify potential correlation relationships within the smart energy unit, and form a set of correlation features;
[0010] S5: Based on the set of correlation features, adopt a multi-dimensional anomaly detection algorithm to monitor the system operation status in real time, and identify abnormal features that deviate from the normal operation status;
[0011] S6: Combine the abnormal features identified in S5, and use a decision tree algorithm to perform fault mode recognition to determine whether there is a fault in the smart energy unit and its specific type.
[0012] Optionally, the S1 specifically includes:
[0013] S11: Install a variety of sensors inside the smart energy unit, including voltage sensors, current sensors, power sensors, temperature sensors, and temperature and humidity sensors;
[0014] S12: Use clock synchronization technology to timestamp the data collected by each sensor to ensure that the data from different sensors is aligned on the time axis.
[0015] Optionally, the S2 specifically includes:
[0016] S21: Perform data cleaning on the collected multi-dimensional operation data, including removing duplicate data entries and filtering out data records that do not conform to the predetermined format or range;
[0017] S22: For the missing values in the data set, use the linear interpolation method to fill them. According to the values of adjacent data points in the time series, predict and supplement the missing data points through a linear relationship to ensure the continuity and integrity of the data set;
[0018] S23: Perform normalization processing on the cleaned and filled data, and scale each item of data to the interval from 0 to 1 in proportion.
[0019] Optionally, the S3 specifically includes:
[0020] S31: Extract time-domain features from the preprocessed data, including calculating the mean, variance, peak value, root mean square value, and maximum and minimum values of each data sequence;
[0021] S32: Perform frequency-domain analysis on the preprocessed data, use the fast Fourier transform to convert the time-domain signal into a frequency-domain signal, extract the main frequency components and their corresponding amplitude and phase information, and form frequency-domain features
[0022] S33: Based on the preprocessed data, conduct trend analysis, extract long-term trend features, apply the moving average method to smooth the data sequence, calculate the linear regression slope to reflect the upward or downward trend of the data, and identify the long-term trend of periodic changes.
[0023] Optionally, the specific steps of S4 are as follows:
[0024] S41: Adopt the statistical analysis method of Spearman rank correlation coefficient to calculate the correlation between the extracted features, so as to quantify the degree of linear or monotonic relationship between the features;
[0025] S42: According to the calculated correlation results, set a specific correlation threshold, and screen out the feature pairs with the absolute value of the correlation coefficient higher than this threshold, so as to exclude the feature pairs with low correlation and retain the feature pairs with significant relevance;
[0026] S43: Analyze the screened feature pairs with high correlation, and identify the potential association relationships inside the intelligent energy unit, including the mutual influence between devices, the influence of environmental factors on device performance, and the interaction between different operating parameters;
[0027] S44: Combine the features corresponding to the identified potential association relationships to form an association feature set.
[0028] Optionally, the specific steps of S41 are as follows:
[0029] S411: For each extracted feature, sort the data according to its numerical value to generate a ranking sequence for each feature. Specifically, for each pair of features X and Y, sort their respective data points in ascending order and assign the corresponding rankings R X and R Y ;
[0030] S412: For each pair of features X and Y, calculate the ranking difference of the corresponding data points where i represents the i-th data point, and then calculate the square of the ranking difference of each data point
[0031] S413: Use the following formula to calculate the Spearman rank correlation coefficient ρ between features X and Y:
[0032] where, n 1 is the total number of data points, and d i is the ranking difference of the i-th data point;
[0033] S414: Record the calculated Spearman rank correlation coefficient ρ in the correlation matrix for subsequent correlation screening. Each element ρ in the correlation matrix XYIndicates the degree of correlation between feature X and feature Y.
[0034] Optionally, S5 specifically includes:
[0035] S51: Based on the associated feature set, establish a multi-dimensional anomaly detection model. Adopt the Mahalanobis distance algorithm, use historical normal operation data to train the model, calculate the mean vector and covariance matrix of the feature space, and define the boundary of the normal operation state.
[0036] S52: Receive the collected data in real time. After being processed by the preprocessing step S2 and the feature extraction step S3, generate an associated feature set that meets the requirements of the multi-dimensional anomaly detection model's feature space, providing real-time data input for subsequent anomaly detection.
[0037] S53: For the real-time generated associated feature set, apply the Mahalanobis distance algorithm to calculate the anomaly score of each data point, quantifying the degree of deviation between the data point and the normal operation state.
[0038] S54: According to the normal state boundary defined in the multi-dimensional anomaly detection model, set the threshold of the anomaly score, and compare the real-time calculated anomaly score with this threshold. If the score exceeds the threshold, it is determined as an abnormal feature.
[0039] S55: For the features determined to be abnormal, record their anomaly scores, timestamps, and related feature values.
[0040] Optionally, S51 specifically includes:
[0041] S511: Compose each data point in the associated feature set by column to construct a multi-dimensional feature space.
[0042] S512: According to the historical normal operation data, calculate the mean vector μ j and covariance matrix Σ; the mean vector is used to describe the average behavior of each feature in the normal state, and the covariance matrix is used to represent the correlation between features.
[0043] S513: Through the calculated mean vector and covariance matrix, use the Mahalanobis distance to define the boundary of the normal operation state; for any new data point X i ′, calculate its Mahalanobis distance D M from the mean vector, and the formula is: where D M represents the degree of deviation of the data point X i ′ from the normal operation state, μ j is the mean of the jth feature, and ∑ -1 is the inverse matrix of the covariance matrix.
[0044] S514: The Mahalanobis distance distribution calculated from historical normal data. Set an anomaly scoring threshold α. When the Mahalanobis distance D of the real-time data point M is greater than this threshold, it is determined to deviate from the normal operating state.
[0045] Optionally, the S6 specifically includes:
[0046] S61: Use historical fault data and corresponding anomaly features to train a decision tree model; specifically including the following sub-steps:
[0047] S611: Annotate the historical data to clarify the fault type or normal state corresponding to each data point, forming a labeled data set where X i represents the feature vector of the i-th data point, and Y i represents its corresponding label;
[0048] S612: According to the importance of features and information gain, select the optimal features for data set splitting, construct the nodes and branches of the decision tree; and repeat this splitting process until the stopping condition is met;
[0049] S62: Input the real-time anomaly features detected in S5 into the trained decision tree model for fault mode recognition; the specific operations include:
[0050] S621: Match the real-time anomaly features with the feature nodes in the decision tree model, make judgments along the decision path, and finally reach the leaf node to determine the fault type or determine it as the normal state;
[0051] S622: According to the output of the decision tree model, classify and identify the specific fault types of the intelligent energy unit, including equipment overload, poor contact or abnormal temperature;
[0052] S63: Confirm the fault types identified by the decision tree model and record relevant information, including fault types, occurrence times and affected ranges.
[0053] Optionally, the S612 specifically includes:
[0054] S6121: For each anomaly feature, calculate its information gain to evaluate the importance of the feature. The formula is: IG(T, F) = H(T) - H(T|F), where IG(T, F) represents the information gain of feature F for the target variable T, H(T) represents the entropy of the target variable T, and H(T|F) represents the conditional entropy of the target variable T under the condition that feature F is known;
[0055] S6122: Based on the information gain calculated in S6121, select the feature F with the largest information gain * as the splitting feature of the current node;
[0056] S6123: Use the feature F selected in S6122 * , and split the current dataset D into several subsets D 1 , D 2 ,..., D k , where k is the number of values of the feature F * , and each subset D j contains all data points where the value of the feature F * is j;
[0057] S6124: According to the subsets D 1 , D 2 ,..., D k after splitting in S6123, construct corresponding decision tree branch nodes for each subset, and each branch node corresponds to a value of the feature F * and connect to a new sub-node or leaf node;
[0058] S6125: Repeat S6121 to S6124 for each subset D j until a predetermined stop condition is met, and the stop conditions include:
[0059] Stop condition 1, all samples in the dataset belong to the same category;
[0060] Stop condition 2, reach the preset maximum depth of the decision tree;
[0061] Stop condition 3, the number of samples in the dataset is lower than the preset minimum sample number threshold.
[0062] Advantages of the present invention:
[0063] In the present invention, by collecting multi-dimensional operation data in real time and preprocessing and feature extracting the data, the present invention can systematically extract key features with high discriminative ability from complex data; secondly, by calculating the correlation between features through statistical analysis methods, the potential connections between different features can be identified, thereby forming a more accurate set of correlated features, providing a reliable basis for subsequent anomaly detection and fault diagnosis.
[0064] In the present invention, by adopting a multi-dimensional anomaly detection algorithm and combining real-time monitoring data, abnormal features deviating from the normal operating state can be effectively identified, and based on these abnormal features, the decision tree algorithm is used for fault mode recognition to accurately judge the fault type of the intelligent energy unit. This method has high detection accuracy and real-time performance, and can significantly reduce the risk of false alarms and missed alarms. Brief Description of the Drawings
[0065] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only those of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0066] Figure 1 Schematic diagram of the detection method for the State Grid intelligent energy unit in the embodiment of the present invention;
[0067] Figure 2 Schematic diagram of the method for identifying abnormal features in the embodiment of the present invention. Detailed Embodiments
[0068] The present invention will be described in detail below with reference to the drawings and specific embodiments. At the same time, it should be noted here that in order to make the embodiments more detailed, the following embodiments are the best and preferred embodiments. For some well-known technologies, those skilled in the art can also adopt other alternative methods for implementation; moreover, the drawings are only for more specifically describing the embodiments and are not intended to specifically limit the present invention.
[0069] It should be noted that in the specification, when referring to "an embodiment", "embodiments", "exemplary embodiments", "some embodiments", etc., it indicates that the described embodiments may include specific features, structures or characteristics, but not necessarily every embodiment includes such specific features, structures or characteristics. In addition, when combining embodiments to describe specific features, structures or characteristics, implementing such features, structures or characteristics in combination with other embodiments (whether explicitly described or not) should be within the knowledge of those skilled in the relevant art.
[0070] Generally, terms can be understood at least in part from their use in the context. For example, at least in part depending on the context, the term "one or more" used herein can be used to describe any feature, structure or characteristic in a singular sense, or can be used to describe a combination of features, structures or characteristics in a plural sense. In addition, the term "based on" can be understood not necessarily to convey a set of exclusive factors, but rather, at least in part depending on the context, to allow for the existence of other factors that may not be explicitly described.
[0071] As Figure 1 - Figure 2 shown, the detection method for the State Grid intelligent energy unit based on association analysis includes the following steps:
[0072] S1: Through a variety of sensors installed in the intelligent energy unit, multi-dimensional operation data is collected in real time, including voltage, current, power, temperature and humidity;
[0073] S2: Preprocess the collected multi-dimensional operation data, including data cleaning, missing value filling, and data normalization, to ensure the integrity and accuracy of the data;
[0074] S3: Extract relevant features from the preprocessed data, including time-domain features, frequency-domain features, and trend features, to provide basic data for subsequent correlation analysis;
[0075] S4: Use statistical analysis methods to calculate the correlation between each feature, identify potential correlation relationships within the smart energy unit, and form a set of correlation features;
[0076] S5: Based on the set of correlation features, adopt a multi-dimensional anomaly detection algorithm to monitor the system operation status in real time and identify abnormal features deviating from the normal operation state;
[0077] S6: Combine the abnormal features identified in S5 and use a decision tree algorithm to perform fault mode recognition to determine whether there is a fault in the smart energy unit and its specific type.
[0078] S1 specifically includes:
[0079] S11: Install a variety of sensors inside the smart energy unit, including voltage sensors, current sensors, power sensors, temperature sensors, and temperature and humidity sensors; among them, the voltage sensor is used to monitor the voltage level, the current sensor is used to measure the current intensity, the power sensor is used to calculate the power consumption, the temperature sensor is used to detect the device temperature, and the humidity sensor is used to monitor the environmental humidity. These sensors are connected to the data acquisition module through a standardized interface to ensure real-time data transmission and accurate acquisition;
[0080] S12: Use clock synchronization technology to timestamp the data collected by each sensor to ensure that the data from different sensors is aligned on the time axis, eliminate data offset caused by differences in sensor response time, and ensure the temporal consistency of the data; this provides a solid data foundation for subsequent preprocessing, feature extraction, and fault diagnosis.
[0081] S2 specifically includes:
[0082] S21: Clean the collected multi-dimensional operation data, including removing duplicate data entries and filtering out data records that do not conform to the predetermined format or range, to ensure that the processed data set does not contain redundant or incorrect data, thereby improving data quality;
[0083] S22: For the missing values in the data set, use linear interpolation to fill them. According to the values of adjacent data points in the time series, predict and supplement the missing data points through a linear relationship to ensure the continuity and integrity of the data set and avoid bias in subsequent analysis caused by missing values;
[0084] S23: Normalize the data after cleaning and filling, scale each item of data proportionally to the range of 0 to 1. Use the min-max normalization method. By calculating the difference between each data point and its minimum and maximum values, it is converted into a normalized value to eliminate the influence of different dimensions on subsequent feature extraction and correlation analysis, ensuring that each feature is compared and analyzed on the same scale. Through the above steps, the accuracy and reliability of data preprocessing are significantly improved, providing high-quality basic data for subsequent feature extraction, correlation analysis, and fault diagnosis.
[0085] S3 specifically includes:
[0086] S31: Extract time-domain features from the preprocessed data, including calculating the mean, variance, peak value, root mean square value, and maximum and minimum values of each data sequence. Time-domain features are used to describe the basic statistical characteristics of data in the time dimension, reflecting the stability and fluctuation of equipment operation.
[0087] S32: Perform frequency-domain analysis on the preprocessed data. Use the Fast Fourier Transform (FFT) to convert the time-domain signal into a frequency-domain signal, extract the main frequency components and their corresponding amplitude and phase information to form frequency-domain features. Frequency-domain features are used to identify periodic changes and high-frequency noise, helping to detect abnormal frequency fluctuations during equipment operation.
[0088] S33: Based on the preprocessed data, conduct trend analysis, extract long-term trend features, apply the Moving Average method to smooth the data sequence, calculate the linear regression slope to reflect the upward or downward trend of the data, and identify the long-term trend of periodic changes.
[0089] The specific steps for trend analysis are as follows:
[0090] Moving Average method: For a given data sequence D = {d 1 , d 2 ,..., d n}, calculate its moving average value, and the formula is: where MA t is the moving average value at the t-th moment, w is the window size, and d n is the n-th value in the data sequence. This method smooths the data sequence, removes short-term fluctuations, and highlights the long-term trend.
[0091] Linear regression slope: Apply a linear regression model to the data sequence to solve for the slope β of the regression line, which reflects the upward or downward trend of the data. The model expression of linear regression is: y = α + βx, where y is the predicted value, x is the index of time or data points, α is the intercept, and β is the slope of the regression line; the slope β reflects the overall trend of the data sequence. If β > 0, it indicates an upward trend in the data; if β < 0, it indicates a downward trend in the data.
[0092] Long-term trend identification: Based on the smoothed data sequence and the results of linear regression, further identify the long-term trend in the data. By analyzing the moving average and regression slope, determine the long-term change trend of the data and correlate it with the operating state of the device to judge whether there is a performance decline or fatigue loss.
[0093] S4 specifically includes:
[0094] S41: Use the statistical analysis method of Spearman rank correlation coefficient to calculate the correlation between the extracted features to quantify the degree of linear or monotonic relationship between the features.
[0095] S42: According to the calculated correlation results, set a specific correlation threshold and screen out the feature pairs with the absolute value of the correlation coefficient higher than this threshold, so as to exclude the feature pairs with low correlation and retain the feature pairs with significant relevance, providing a feature set for key attention in subsequent analysis.
[0096] S43: Analyze the screened high-correlation feature pairs to identify potential correlation relationships within the smart energy unit, including the mutual influence between devices, the influence of environmental factors on device performance, and the interaction between different operating parameters.
[0097] S44: Combine the features corresponding to the identified potential correlation relationships to form an associated feature set for subsequent anomaly detection and fault diagnosis; through the above steps, it is possible to accurately calculate and screen out the significant correlations between the features within the smart energy unit, identify the potential correlation relationships in the system operation, and form a high-quality associated feature set.
[0098] S41 specifically includes:
[0099] S411: For each extracted feature, sort the data according to its numerical size to generate a ranking sequence for each feature. Specifically, for each pair of features X and Y, sort their respective data points in ascending order and assign corresponding rankings R X and R Y ;
[0100] S412: For each pair of features X and Y, calculate the ranking difference of the corresponding data points where i represents the i-th data point, and then calculate the square of the ranking difference for each data point
[0101] S413: Calculate the Spearman rank correlation coefficient ρ between features X and Y using the following formula:
[0102] where, n 1 is the total number of data points, and d i is the ranking difference of the i-th data point. This correlation coefficient ρ is used to quantify the degree of monotonic relationship between features. The value range of ρ is from -1 to 1, where ρ = 1 indicates a perfect positive correlation, ρ = -1 indicates a perfect negative correlation, and ρ = 0 indicates no correlation;
[0103] S414: Record the calculated Spearman rank correlation coefficient ρ in the correlation matrix for subsequent correlation screening. Each element ρ XY in the correlation matrix represents the degree of correlation between feature X and feature Y; Through the above steps, using the Spearman rank correlation coefficient to calculate the correlation between features can accurately quantify the degree of monotonic relationship between each feature.
[0104] S5 specifically includes:
[0105] S51: Based on the associated feature set, establish a multi-dimensional anomaly detection model. Adopt the Mahalanobis distance algorithm and use historical normal operation data to train the model to calculate the mean vector and covariance matrix of the feature space to define the boundary of the normal operation state;
[0106] S52. Receive the collected data in real time, and after being processed by the preprocessing step S2 and the feature extraction step S3, generate an associated feature set that meets the requirements of the multi-dimensional anomaly detection model feature space, providing real-time data input for subsequent anomaly detection;
[0107] S53: Apply the Mahalanobis distance algorithm to the real-time generated associated feature set to calculate the anomaly score for each data point, quantifying the degree of deviation between the data point and the normal operation state;
[0108] S54: According to the normal state boundary defined in the multi-dimensional anomaly detection model, set the threshold of the anomaly score, and compare the real-time calculated anomaly score with this threshold. If the score exceeds the threshold, it is determined as an abnormal feature;
[0109] S55: For the features determined to be abnormal, record their anomaly scores, timestamps, and related feature values; Through the above steps, it is possible to effectively monitor the system operation state based on the associated feature set and accurately identify abnormal features that deviate from the normal operation state.
[0110] S51 specifically includes:
[0111] S511: Compose each data point in the associated feature set by column to construct a multi-dimensional feature space;
[0112] S512: Calculate the mean vector μ of each feature based on historical normal operation data j and covariance matrix ∑; The mean vector is used to describe the average behavior of each feature in the normal state, and the covariance matrix is used to represent the correlation between features; The specific calculation formula is:
[0113]
[0114] where, X j,i ′ is the value of the j-th feature at the i-th data point, μ j is the mean of the j-th feature, ∑ is the covariance matrix, X i ′ is the feature vector of the i-th data point, n 2 is the number of historical normal data;
[0115] S513: Use the calculated mean vector and covariance matrix to define the boundary of the normal operation state using the Mahalanobis distance; For any new data point X i ′, calculate its Mahalanobis distance D M from the mean vector, and the formula is: where, D M represents the degree of deviation of the data point X i ′ from the normal operation state, μ j is the mean of the j-th feature, ∑ -1 is the inverse matrix of the covariance matrix;
[0116] S514: Set an anomaly score threshold α based on the Mahalanobis distance distribution calculated from historical normal data. When the Mahalanobis distance D M of the real-time data point is greater than this threshold, it is determined to deviate from the normal operation state and enter the anomaly detection stage. This threshold α can be determined by statistical analysis methods, cross-validation and other means.
[0117] S6 specifically includes:
[0118] S61: Use historical fault data and corresponding abnormal features to train a decision tree model; Specifically includes the following sub-steps:
[0119] S611: Label the historical data to clarify the fault type or normal state corresponding to each data point, and form a labeled data set where X iRepresents the feature vector of the i-th data point, Y i Represents its corresponding label (fault type or normal);
[0120] S612: According to the importance of features and information gain, select the optimal features for dataset segmentation, construct the nodes and branches of the decision tree; and repeat this segmentation process until the stopping condition is met;
[0121] S62: Input the real-time abnormal features detected in S5 into the trained decision tree model for fault mode recognition; the specific operations include:
[0122] S621: Match the real-time abnormal features with the feature nodes in the decision tree model, make judgments along the decision path, and finally reach the leaf node to determine the fault type or determine it as the normal state;
[0123] S622: According to the output of the decision tree model, classify and identify the specific fault types of the smart energy unit, including equipment overload, poor contact or abnormal temperature;
[0124] S63: Confirm the fault types identified by the decision tree model and record relevant information, including fault types, occurrence times and influence scopes, for subsequent maintenance and analysis; through the above steps, it is possible to combine the abnormal features identified in step S5 and use the decision tree algorithm to accurately identify the fault mode of the smart energy unit, enhancing the operation reliability and system security of the smart energy unit.
[0125] S612 specifically includes:
[0126] S6121: For each abnormal feature, calculate its information gain (Information Gain, IG) to evaluate the importance of the feature. Information gain is used to measure the reduction in uncertainty brought by using a certain feature for dataset segmentation. The formula is: IG(T, F) = H(T) - H(T|F), where IG(T, F) represents the information gain of feature F for the target variable T, H(T) represents the entropy of the target variable T, and H(T|F) represents the conditional entropy of the target variable T under the condition that feature F is known; the formula for entropy is: where c is the number of categories of the target variable, p i is the probability of category i, k is the number of values of feature F, p(F j ) is the probability that feature F takes the value j, and H(T|F j ) is the conditional entropy of the target variable T when feature F takes the value j;
[0127] S6122: Based on the information gain calculated in S6121, select the feature F with the largest information gain * as the segmentation feature of the current node;
[0128] S6123: Use the feature F selected in S6122 * , and divide the current data set D into several subsets D 1 , D 2 ,..., D k , where k is the number of values of the feature F * , and each subset D j contains all data points where the value of the feature F * is j;
[0129] S6124: According to the subsets D 1 , D 2 ,..., D k after the division in S6123, construct corresponding decision tree branch nodes for each subset, and each branch node corresponds to a value of the feature F * and is connected to a new sub - node or leaf node;
[0130] S6125: For each subset D j , repeatedly execute S6121 to S6124, recursively perform feature importance evaluation, optimal feature selection, data set division, and node and branch construction until a predetermined stop condition is met. The stop conditions include:
[0131] Stop condition 1, all samples in the data set belong to the same class;
[0132] Stop condition 2, reach the preset maximum depth of the decision tree;
[0133] Stop condition 3, the number of samples in the data set is lower than the preset minimum sample number threshold; Through the above steps, the most discriminative features can be systematically evaluated and selected for data set division, and an efficient and accurate decision tree model can be constructed.
[0134] The present invention covers any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of the present invention. To enable the public to have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention. However, those skilled in the art can fully understand the present invention without these detailed descriptions. Additionally, well - known methods, processes, procedures, components, and circuits are not described in detail to avoid unnecessary confusion to the essence of the present invention.
[0135] The above - mentioned are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A method for detecting smart energy units of a State Grid based on correlation analysis, characterized in that: The following steps are involved: S1: Through the various sensors installed in the smart energy unit, multi-dimensional operating data is collected in real time, including voltage, current, power, temperature and humidity; S2: Preprocess the collected multi-dimensional operation data, including data cleaning, missing value filling and data normalization; S3: Extract relevant features from the preprocessed data, including time domain features, frequency domain features and trend features, to provide basic data for subsequent correlation analysis; S4: Calculate the correlation between the features using statistical analysis methods, identify the potential correlation relationships within the smart energy unit, and form a correlation feature set; S5: Based on the associated feature set, a multi-dimensional anomaly detection algorithm is used to monitor the system operation status in real time and identify abnormal features that deviate from the normal operation status; S6: Combined with the abnormal features identified in S5, the decision tree algorithm is used to identify fault patterns to determine whether the smart energy unit has a fault and its specific type.
2. The method for detecting a State Grid smart energy unit based on correlation analysis according to claim 1 is characterized in that: The S1 specifically includes: S11: Install multiple sensors inside the smart energy unit, including voltage sensors, current sensors, power sensors, temperature sensors, and temperature and humidity sensors; S12: Use clock synchronization technology to time-stamp the data collected by each sensor to ensure that the data from different sensors are aligned on the time axis.
3. The method for detecting a smart energy unit of a State Grid based on correlation analysis according to claim 1 is characterized in that: The S2 specifically includes: S21: performing data cleaning on the collected multi-dimensional operation data, including removing duplicate data entries and filtering out data records that do not conform to a predetermined format or range; S22: For missing values in the data set, linear interpolation is used to fill them. According to the values of adjacent data points in the time series, the missing data points are predicted and supplemented through linear relationships to ensure the continuity and integrity of the data set; S23: Normalize the cleaned and filled data, and scale each data item to the range of 0 to 1.
4. The method for detecting a smart energy unit of a State Grid based on correlation analysis according to claim 1 is characterized in that: The S3 specifically includes: S31: extracting time domain features from the preprocessed data, including calculating the mean, variance, peak, root mean square value, and maximum and minimum values of each data sequence; S32: Perform frequency domain analysis on the preprocessed data, convert the time domain signal into a frequency domain signal using fast Fourier transform, extract the main frequency components and their corresponding amplitude and phase information, and form frequency domain features; S33: Based on the preprocessed data, trend analysis is performed to extract long-term trend characteristics, the moving average method is applied to smooth the data series, the linear regression slope is calculated to reflect the upward or downward trend of the data, and the long-term trend of cyclical changes is identified.
5. The method for detecting a State Grid smart energy unit based on correlation analysis according to claim 1 is characterized in that: The S4 specifically includes: S41: The Spearman rank correlation coefficient statistical analysis method is used to calculate the correlation between the extracted features to quantify the degree of linear or monotonic relationship between the features; S42: according to the calculated correlation result, a specific correlation threshold is set, and feature pairs whose absolute value of correlation coefficient is higher than the threshold are screened out, thereby excluding feature pairs with low correlation and retaining features with significant correlation; S43: Analyze the selected high-correlation feature pairs to identify potential correlation relationships within the smart energy unit, including the mutual influence between devices, the impact of environmental factors on device performance, and the interaction between different operating parameters; S44: Combining features corresponding to the identified potential association relationships to form an association feature set.
6. The method for detecting a State Grid smart energy unit based on correlation analysis according to claim 5 is characterized in that: The S41 specifically includes: S411: For each extracted feature, sort the data according to its numerical value to generate a ranking sequence for each feature. Specifically, for each pair of features X and Y, sort their respective data points in ascending order and assign corresponding rankings R X and R Y ; S412: For each pair of features X and Y, calculate the ranking difference of the corresponding data points Where i represents the i-th data point, and then the square of the ranking difference of each data point is calculated S413: Calculate the Spearman rank correlation coefficient ρ between features X and Y using the following formula: Where n1 is the total number of data points, d i is the ranking difference of the i-th data point; S414: Record the calculated Spearman rank correlation coefficient ρ in the correlation matrix for subsequent correlation screening. Each element ρ in the correlation matrix XY Indicates the degree of correlation between feature X and feature Y.
7. The method for detecting a smart energy unit of a State Grid based on correlation analysis according to claim 1 is characterized in that: The S5 specifically includes: S51: Based on the associated feature set, a multi-dimensional anomaly detection model is established. The Mahalanobis distance algorithm is used to train the model using historical normal operation data, and the mean vector and covariance matrix of the feature space are calculated to define the boundary of the normal operation state. S52: receiving the collected data in real time, and processing it through the preprocessing step S2 and the feature extraction step S3 to generate a correlation feature set that meets the feature space requirements of the multi-dimensional anomaly detection model, so as to provide real-time data input for subsequent anomaly detection; S53: applying the Mahalanobis distance algorithm to the associated feature set generated in real time to calculate the anomaly score of each data point, and quantifying the degree of deviation between the data point and the normal operating state; S54: according to the normal state boundary defined in the multi-dimensional anomaly detection model, a threshold of the anomaly score is set, and the anomaly score calculated in real time is compared with the threshold. If the score exceeds the threshold, it is determined to be an abnormal feature; S55: For features determined to be abnormal, record their abnormality scores, timestamps, and related feature values.
8. The method for detecting a State Grid smart energy unit based on correlation analysis according to claim 7 is characterized in that: The S51 specifically includes: S511: Organize each data point in the associated feature set into columns to construct a multidimensional feature space; S512: Calculate the mean vector μ of each feature based on historical normal operation data j and covariance matrix ∑; the mean vector is used to describe the average behavior of each feature under normal conditions, and the covariance matrix is used to represent the correlation between features; S513: The Mahalanobis distance is used to define the boundary of the normal operation state through the calculated mean vector and covariance matrix; for any new data point X i ′, calculate the Mahalanobis distance D between it and the mean vector M , the formula is: Among them, D M Represents data point X i ′Degree of deviation from normal operation, μ j is the mean of the jth feature, ∑ -1 is the inverse matrix of the covariance matrix; S514: According to the Mahalanobis distance distribution calculated from the historical normal data, an abnormality score threshold α is set. M When it is greater than the threshold, it is determined to be a deviation from the normal operating state.
9. The method for detecting a State Grid smart energy unit based on correlation analysis according to claim 1 is characterized in that: The S6 specifically includes: S61: Using historical fault data and corresponding abnormal features, training a decision tree model; specifically including the following sub-steps: S611: Label the historical data, clarify the fault type or normal state corresponding to each data point, and form a labeled data set Where X i represents the feature vector of the i-th data point, Y i Indicates the corresponding label; S612: According to the importance and information gain of the features, the optimal features are selected to segment the data set, and the nodes and branches of the decision tree are constructed; and the segmentation process is repeated until the stop condition is met; S62: Input the real-time abnormal features detected in S5 into the trained decision tree model to perform fault mode recognition; the specific operations include: S621: Match the real-time abnormal features with the feature nodes in the decision tree model, make judgments along the decision path, and finally reach the leaf node to determine the fault type or judge it as a normal state; S622: According to the output of the decision tree model, classify and identify the specific fault type of the smart energy unit, including device overload, poor contact or abnormal temperature; S63: Confirm the fault type identified by the decision tree model and record relevant information, including the fault type, occurrence time, and impact scope.
10. The method for detecting a smart energy unit of a State Grid based on correlation analysis according to claim 9 is characterized in that: The S612 specifically includes: S6121: For each abnormal feature, calculate its information gain to evaluate the importance of the feature, the formula is: IG(T, F) = H(T)-H(T|F), where IG(T, F) represents the information gain of feature F for target variable T, H(T) represents the entropy of target variable T, and H(T|F) represents the conditional entropy of target variable T under the condition that feature F is known; S6122: Based on the information gain calculated in S6121, select the feature F with the largest information gain * As the segmentation feature of the current node; S6123: Use the feature F selected in S6122 * , divide the current data set D into several subsets D1, D2, ..., D k , where k is the feature F * The number of values of each subset D j Contains feature F * All data points with value j; S6124: According to the subsets D1, D2, ..., D k , construct corresponding decision tree branch nodes for each subset, each branch node corresponds to feature F * A value of and connected to the new child node or leaf node; S6125: For each subset D j S6121 to S6124 are repeatedly executed until a predetermined stop condition is met, wherein the stop condition includes: Stop condition 1, all samples in the data set belong to the same category; Stop condition 2: reaching the preset maximum depth of the decision tree; Stop condition 3: the number of samples in the data set is lower than the preset minimum sample number threshold.
Citation Information
Patent Citations
Fire hazard monitoring method and system for low-voltage line of distribution network
CN118965240A
Sensor-based explosion-proof junction box fault diagnosis method and system
CN119293598A
Photovoltaic operation fault diagnosis method and system
CN119382613A
Intelligent early warning diagnosis method realized based on intelligent power plant
CN119414814A
Cited By
Operation and maintenance fault monitoring method based on multi-modal feature extraction
CN121167514A