Residual current anomaly detection and risk early warning system based on hybrid machine learning
Through multi-source sensor data acquisition and hybrid machine learning model, the problems of high false alarm rate and pattern recognition of traditional residual current monitoring systems are solved, high-precision residual current monitoring and risk warning are achieved, and the safety and stability of the electrical system are improved.
Patent Information
- Application Number
- CN202510681991.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-02
AI Technical Summary
The traditional residual current monitoring system has a high false alarm rate, which cannot deeply analyze the current mode and time series data, and it is difficult to identify complex abnormal current modes, resulting in insufficient safety and stability of the electrical system.
Multi-source sensor data acquisition, continuous wavelet transformation and principal component analysis combined with artificial neural network and support vector machine are used to perform time-frequency analysis and feature extraction of residual current signals to achieve high-precision abnormality detection and risk warning.
It improves the accuracy and reliability of residual current monitoring, reduces the false alarm rate, provides detailed abnormal event analysis, and ensures the stable operation and safety of the electrical system.
Smart Images

Figure CN120579103A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of residual current electrical fire monitoring technology, and in particular to a residual current anomaly detection and risk warning system based on hybrid machine learning. Background Art
[0002] In today's power systems, residual current monitoring is a crucial tool for ensuring electrical safety. Residual current, also known as leakage current, is often generated by insulation damage or ground faults in electrical equipment. If not monitored and addressed promptly, this current can lead to serious consequences such as electric shock, fire, and even explosion. Therefore, real-time, accurate monitoring and analysis of residual current are crucial for preventing and mitigating electrical accidents. Traditional residual current monitoring systems rely on simple threshold triggering mechanisms, issuing an alarm when they detect a current exceeding a predetermined threshold. However, this approach has significant limitations. First, high false alarm rates are a common problem, as many normal current fluctuations can also result in threshold violations. Second, these systems typically lack in-depth analysis of current patterns and time series data, making it difficult to identify complex abnormal current patterns.
[0003] With the advancement of sensor technology, modern residual current monitoring systems have begun to integrate various types of sensors, including residual current transformers, Hall effect sensors, power sensors, and environmental sensors (such as temperature and humidity sensors). These sensors can comprehensively collect data from electrical systems, providing a basis for more accurate current monitoring. Advances in signal processing technology have also brought new possibilities for residual current monitoring. Advanced signal processing techniques such as continuous wavelet transform (CWT) and principal component analysis (PCA) can be used for time-frequency analysis and feature extraction of current signals. CWT can effectively capture the frequency changes of current signals at different time scales, thereby revealing abnormal patterns in electrical systems. PCA can reduce the complexity of the data set, retain the most influential features, and contribute to the efficiency and accuracy of subsequent machine learning models.
[0004] The application of machine learning and artificial intelligence technologies has brought revolutionary changes to residual current monitoring. Machine learning models such as artificial neural networks (ANN) and support vector machines (SVM) perform well in processing complex and nonlinear data. They can learn from large amounts of electrical data and identify normal and abnormal current patterns, thereby improving the accuracy and reliability of residual current monitoring. The technical solution of the embodiment of the present invention is proposed under this technical background. It integrates multiple sensors, advanced signal processing technology and hybrid machine learning models to achieve more accurate and reliable residual current monitoring, thereby improving the safety and stability of the electrical system. This integration and innovation not only improves the accuracy of monitoring and reduces the false alarm rate, but also provides more detailed analysis of abnormal events, providing a strong guarantee for the safe operation of the power system. Summary of the Invention
[0005] Based on the above background, the present invention aims to provide a residual current anomaly detection and risk warning system based on hybrid machine learning. The system integrates multi-source sensor data acquisition, advanced signal processing technology, intelligent analysis of hybrid machine learning models and flexible early warning response mechanisms to achieve high-precision monitoring of residual current in electrical systems and rapid identification of abnormal conditions, ensuring stable operation and safety protection of electrical systems.
[0006] Specifically, the present invention provides a residual current anomaly detection and risk warning system based on hybrid machine learning, comprising:
[0007] The data acquisition unit is equipped with a residual current transformer, a Hall effect sensor, a power sensor, and a temperature and humidity sensor. It is used to collect residual current signals, branch line load current and voltage information in the electrical system, and monitor environmental parameters in real time.
[0008] Data preprocessing and feature extraction unit, used to standardize the collected data, and perform time-frequency analysis and feature dimension reduction on the residual current signal using continuous wavelet transform and principal component analysis;
[0009] The hybrid machine learning model unit extracts and classifies the feature data after dimensionality reduction by combining artificial neural networks and support vector machines to achieve residual current anomaly detection;
[0010] The risk identification and alarm unit classifies risks based on the classification probability confidence of the support vector machine and triggers different response measures;
[0011] The user interface and interaction unit is used to provide a graphical user interface to display real-time data, historical data trends, forecast results and alarm information, and allow users to adjust system parameters, including sampling frequency, alarm sensitivity, and early warning thresholds, and support user feedback and system adaptive adjustment through the graphical user interface.
[0012] Furthermore, the data acquisition unit includes:
[0013] Residual current transformers and Hall effect sensors: used to monitor the total system current at the entrance of the electrical system to capture abnormal current events;
[0014] Power sensor: Installed on the load circuit of an electrical device containing three load circuit units, used to monitor the current, voltage and load of the circuit with high precision;
[0015] Temperature and humidity sensors: used to monitor the impact of changes in environmental conditions on current characteristics;
[0016] Integrated processor: used to integrate the network time protocol to ensure the accuracy and real-time nature of the data, while recording the timestamp information of the data;
[0017] Signal amplification and filtering device: used to amplify and filter the signal output from the sensor, filter out noise, and enhance signal clarity;
[0018] Analog-to-digital converter: used to convert the amplified and filtered analog signal into a digital signal for subsequent processing.
[0019] Furthermore, the data acquisition unit further includes:
[0020] Power sensor data priority strategy, used to give priority to the data collected by the power sensor in subsequent data processing, improving the accuracy and robustness of anomaly detection;
[0021] A multi-source information fusion strategy is used to use power sensor data as the primary data source and residual current transformer and Hall effect sensor data as auxiliary data sources. A comprehensive fusion algorithm is used to integrate multi-source data to enhance data comprehensiveness.
[0022] Furthermore, the data preprocessing and feature extraction unit includes:
[0023] Continuous wavelet transform uses Morlet wavelet function to extract the frequency and amplitude characteristics of the current signal, which is used to detect the time-frequency characteristics of the current at different scales;
[0024] Analyze the energy spectrum of the continuous wavelet transform output and extract the specific frequency energy features corresponding to the abnormal state;
[0025] Principal component analysis is used to reduce the complexity of data and reduce noise and improve data analysis accuracy by selecting the principal component directions of important features;
[0026] The processed current characteristics are fused with the standardized temperature and humidity environmental data to enhance the model's ability to perceive changes in environmental conditions.
[0027] Furthermore, the formula of the continuous wavelet transform is:
[0028]
[0029] Among them, x(t) is the current data, t is the time, a is the scale parameter, b is the location parameter, ψ * represents the complex conjugate, ψ(t) is the selected mother wavelet function;
[0030] ψ(t) selects Morlet wavelet as the mother wavelet, and its expression is:
[0031]
[0032] Where ω0 is the center frequency and i is the imaginary unit.
[0033] Furthermore, the step of principal component analysis includes:
[0034] The data is standardized and the standardization formula is:
[0035]
[0036] Where Z is the standardized data matrix, X is the original data matrix, μ is the mean of each column, and σ is the standard deviation of each column; the covariance matrix is calculated as follows:
[0037]
[0038] Among them, Z T is the transpose of Z, n is the number of samples, and Σ is the covariance matrix;
[0039] Calculate the eigenvalues and eigenvectors of the covariance matrix Σ and perform eigendecomposition on the covariance matrix. The eigenvectors determine the direction of the principal components in the data, and the eigenvalues represent the variance in the direction of each principal component, that is, the amount of information.
[0040] Arrange the obtained eigenvalues in descending order, select the eigenvectors corresponding to the first k largest eigenvalues, and form the basis of the new feature space. d is selected by the cumulative variance explanation ratio, that is, the smallest d is selected so that:
[0041]
[0042] Among them, λi is the i-th eigenvalue, N is the total number of eigenvalues, and threshold is the preset threshold.
[0043] Furthermore, the parameters of the artificial neural network include:
[0044] The input layer contains d neurons, corresponding to the current and environmental features after principal component analysis;
[0045] The first hidden layer contains 2d neurons, and the second hidden layer contains d neurons;
[0046] The output layer contains one neuron and uses the sigmoid activation function to calculate the probability of sample abnormality.
[0047] Furthermore, the support vector machine uses a radial basis function as a kernel function to improve the accuracy of classifying abnormal states in a high-dimensional feature space.
[0048] Furthermore, the confidence calculation formula is:
[0049]
[0050] Among them, X i is the i-th sample of the input current, is the prediction classification result of the support vector machine. A positive value indicates current anomaly, and θ is the confidence threshold.
[0051] Furthermore, the risk identification and alarm unit performs classification based on the confidence level S of the support vector machine classification probability. The specific classification standards and response measures are as follows:
[0052] If S<0.3, the confidence level is low; a warning is issued and monitoring and inspection are recommended;
[0053] If 0.3≤S<0.7, the confidence level is medium; a serious warning is issued, the emergency plan is activated, and further diagnosis and repair are prepared;
[0054] If S ≥ 0.7, the confidence level is high; the power outage mechanism is immediately triggered to ensure safety, and the emergency response procedure is initiated to notify management and emergency services.
[0055] The residual current anomaly detection and risk warning system based on hybrid machine learning of the present invention has the following advantages:
[0056] 1. Improve the accuracy and real-time performance of residual current anomaly detection in electrical systems and effectively prevent electrical accidents.
[0057] 2. Introduce a hybrid machine learning model to improve the accuracy of classification prediction in small sample cases.
[0058] 3. Set up risk identification and alarm mechanisms, take corresponding early warning measures according to different confidence levels, and improve the safety and reliability of the system.
[0059] 4. Provide user interface and interactive functions to facilitate users to monitor and analyze the operating status of the electrical system in real time and optimize system performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 This is a system flow chart of an embodiment of the present invention: it shows the entire process of the residual current anomaly detection and risk warning system based on hybrid machine learning, including major links such as data acquisition, preprocessing, feature extraction, application of hybrid machine learning models, risk identification and alarm, as well as user interface and interaction;
[0061] Figure 2 Schematic diagram of a data acquisition unit according to an embodiment of the present invention: Detailed description of the structure of the data acquisition unit, including components such as a residual current transformer, a Hall effect sensor, a power sensor, a temperature and humidity sensor, and an integrated processor, and their connection methods;
[0062] Figure 3 This is a schematic diagram of a hybrid machine learning model for an embodiment of the present invention. It shows the structure and integration of an artificial neural network (ANN) and a support vector machine (SVM). This diagram illustrates the model's hierarchical structure, neuron configuration, and how the ANN and SVM work together to perform data analysis and prediction.
[0063] Figure 4 This is a flow chart of the risk identification and alarm unit of an embodiment of the present invention: it shows the entire process from receiving prediction results to executing response measures, ensuring that the system can effectively handle and respond to abnormal residual current conditions in the electrical system. DETAILED DESCRIPTION
[0064] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0065] This embodiment provides a residual current anomaly detection and risk warning system based on hybrid machine learning. The system integrates multi-source sensor data acquisition, advanced signal processing technology, intelligent analysis of hybrid machine learning models, and a flexible warning response mechanism to achieve high-precision monitoring of residual current in electrical systems and rapid identification of abnormal conditions, ensuring stable operation and safety protection of electrical systems.
[0066] Figure 1 This is the system flow chart of the system. Figure 1 As shown, the main components of the system are as follows:
[0067] S101 data acquisition unit: responsible for collecting residual current signals in the electrical system, including residual current data under normal working conditions and possible abnormal current data. The current of the entire system is monitored jointly by residual current transformers, Hall effect sensors and power sensors. For subsequent data processing, the current signal collected by the power sensor is given priority because it has higher accuracy and stability. At the same time, the data of the residual current transformer and the Hall effect sensor are used as auxiliary information for cross-validation and improving the reliability of detection. The environmental parameters collected by the temperature and humidity sensors will be input as auxiliary features into the data preprocessing and feature extraction unit (S102) to analyze the impact of environmental changes on current behavior, thereby improving the accuracy of anomaly detection. The Network Time Protocol (NTP) is integrated in the synchronous integrated processor to ensure the accuracy and real-time nature of the data, so as to facilitate the subsequent time positioning and analysis of abnormal current events;
[0068] Alternatively, as Figure 2 As shown, the sensors of the data acquisition unit S101 in this embodiment may include:
[0069] B1. Residual current transformer and Hall effect sensor: Install residual current transformer and Hall effect sensor at the entrance of the electrical system (inside the distribution box) to monitor the current of the entire system;
[0070] B2. Power sensor: In electrical equipment containing three load circuit units, install additional power sensors on the load lines connected to each load circuit unit to monitor the voltage, current and load conditions of the branch lines;
[0071] B3. Temperature and humidity sensors: Install temperature and humidity sensors near electrical equipment to capture environmental conditions;
[0072] B4. Integrated processor: An integrated processor is installed in the control cabinet to monitor and record electrical parameters (such as current, voltage, power, etc.) and environmental parameters (such as temperature, humidity) as well as timestamps;
[0073] B5. Signal amplification and filtering device: The signal output from the Hall effect sensor is amplified using an electronic amplifier. At the same time, a low-pass filter is used to filter out high-frequency noise to improve the clarity and accuracy of the signal.
[0074] B6. Analog-to-Digital Converter (ADC): Use the ADC to sample and quantize the filtered analog signal and convert it into digital form for further processing;
[0075] B7. Data Prioritization and Fusion Strategy: Establish data prioritization rules to prioritize the current signal collected by the power sensor in subsequent data processing due to its higher accuracy and stability. Simultaneously, combine data from the residual current transformer and Hall effect sensor to perform multi-source information fusion to improve the comprehensiveness and accuracy of detection. Specifically, power sensor data serves as the primary data source, while residual current transformer and Hall effect sensor data serve as auxiliary data sources. Data fusion algorithms integrate multi-source information to enhance the robustness and reliability of the anomaly detection model.
[0076] S102 Data Preprocessing and Feature Extraction Unit: This unit applies continuous wavelet transform (CWT), principal component analysis (PCA), and environmental data integration to perform time-frequency analysis, feature dimensionality reduction, and multi-source information fusion on the collected current signals and environmental parameters. CWT and PCA are primarily used to process the current signals collected by the power sensor, while temperature and humidity data are normalized and fused with the current features to enhance the model's ability to perceive environmental influences.
[0077] Alternatively, as Figure 3 As shown, S102 data preprocessing and feature extraction in this embodiment may specifically include:
[0078] C1. Apply CWT to process the collected current data. Since Morlet wavelet can provide good time-frequency localization characteristics, Morlet wavelet is used as the mother wavelet function for transformation to extract the frequency and amplitude information of the current signal. For each time t and each scale a, the calculation formula of CWT is as follows:
[0079]
[0080] Among them, x(t) is the current data, t is the time, a is the scale parameter, b is the location parameter, ψ * represents the complex conjugate, ψ(t) is the selected mother wavelet function;
[0081] ψ(t) selects Morlet wavelet as the mother wavelet, and its expression is:
[0082]
[0083] Where ω is the center frequency and i is the imaginary unit;
[0084] C2. Calculate the energy spectrum at each scale. Abnormal currents often exhibit high energy concentration at certain frequencies or scales. By analyzing the energy spectrum, key frequency features related to abnormal conditions can be screened out as the basis for subsequent feature extraction. The energy spectrum calculation formula is as follows:
[0085] E(a,b)=∫|CWT(a,b)| 2 db
[0086] Where |CWT(a,b)| 2 represents the energy of CWT;
[0087] C3. Arrange all the calculated energy values E(a,b) into a data matrix X, where each row corresponds to a specific scale a and each column corresponds to a specific position b;
[0088] C4. Perform principal component analysis (PCA) on the data matrix X to transform the data into a new coordinate system so that the data variance on each coordinate axis after transformation is maximized, thereby reducing the feature dimension and highlighting the most important signal features.
[0089] Optionally, PCA is implemented by the following steps:
[0090] 1. Standardize the data to ensure that the mean of each feature is 0 and the standard deviation is 1, eliminating the impact of different dimensions on the analysis results. The standardization formula is:
[0091]
[0092] Where Z is the standardized data matrix, X is the original data matrix, μ is the mean of each column, and σ is the standard deviation of each column;
[0093] 2. Calculate the covariance matrix, the formula is:
[0094]
[0095] Among them, Z T is the transpose of Z, n is the number of samples, and Σ is the covariance matrix;
[0096] 3. Calculate the eigenvalues and eigenvectors of the covariance matrix Σ and perform eigendecomposition on the covariance matrix. The eigenvectors determine the direction of the principal components in the data, and the eigenvalues represent the variance (information content) in the direction of each principal component.
[0097] 4. Arrange the obtained eigenvalues in descending order, select the eigenvectors corresponding to the first k largest eigenvalues, and form the basis of the new feature space. d is selected by the cumulative variance explanation ratio, that is, select the smallest d such that:
[0098]
[0099] Among them, λ i is the i-th eigenvalue, N is the total number of eigenvalues, and "threshold" is the preset threshold;
[0100] 5. Construct the projection matrix and transform the data. The data is transformed using the following formula:
[0101] M=ZW
[0102] Where M is the transformed data matrix, and W is the projection matrix composed of the selected d eigenvectors;
[0103] Optionally, the data matrix M is specifically:
[0104] M={m1,m2,…,m d}
[0105] Among them, m i The feature vector representing a single sample;
[0106] Environmental data integration:
[0107] After being standardized, the environmental parameters (temperature, humidity) are combined with the current signal features as additional features and input into the hybrid machine learning model. The specific steps are as follows:
[0108] 1. Standardization of environmental parameters:
[0109] The temperature and humidity data were standardized to ensure that the mean of each environmental characteristic was 0 and the standard deviation was 1, eliminating the influence of different dimensions on the analysis results.
[0110]
[0111] Among them, Z env is the standardized environmental data matrix, X env is the original environment data matrix, μ env and σ env are the mean and standard deviation of the environmental data respectively.
[0112] 2. Multi-source information fusion:
[0113] The standardized environmental parameter Z env Fuse with the current feature matrix M after PCA processing to form a comprehensive feature matrix M combined .
[0114] M combined =[M|Z env ]
[0115] Among them, [M|Z env] means to put M and Z env Concatenate by columns to form a new feature matrix.
[0116] 3. Input to the hybrid machine learning model:
[0117] Comprehensive feature matrix M combined As input, it is passed to the hybrid machine learning model unit (S103) to achieve more accurate current anomaly detection and risk warning.
[0118] The S103 hybrid machine learning model unit utilizes an artificial neural network (ANN) and support vector machine (SVM) in a hybrid machine learning model to predict residual current and classify abnormal conditions. The model input includes not only the reduced current signal characteristics but also processed temperature and humidity data to improve the accuracy and robustness of anomaly detection.
[0119] Alternatively, as Figure 3 As shown, the specific steps of constructing the hybrid machine learning model unit S103 of this embodiment are as follows:
[0120] D1. Data division and label setting:
[0121] The comprehensive feature matrix M combined Each sample m in i Assign a label n i , to indicate whether the residual current state corresponding to the sample is normal or abnormal. Then these labeled samples are divided into training set M train and the test set M test , where 70% of the samples are used for training and the remaining 30% for testing. The training set is used to train artificial neural networks (ANN) and support vector machines (SVM), and the test set is used to evaluate the performance of the model;
[0122] D2. Artificial Neural Network (ANN) Training:
[0123] (1) Construct an ANN structure with an input layer, two hidden layers, and an output layer. The input layer contains d neurons, corresponding to the d-dimensional current feature vector m after PCA processing. i The first hidden layer has 2d neurons, and the second hidden layer has d neurons. Both hidden layers use the Reluctant Unified Unit (ReLU) activation function. The output layer uses a sigmoid activation function and contains one neuron, which outputs the probability that a sample is anomaly. The binary cross-entropy loss function is used as the loss function L. The Adam optimizer is selected, with an initial learning rate of 0.001 and a learning rate decay strategy implemented to prevent overfitting.
[0124] (2) Assign reasonable initial values to all weights and bias parameters of the neural network, usually using a random initialization strategy. Input the training set data into the ANN and perform forward propagation to calculate the output. Based on the difference between the output and the actual label (quantified by the loss function), use the backpropagation algorithm to calculate the gradient of the loss function for each weight, and use the Adam optimizer to update the weights and biases in the network based on the calculated gradient. Apply an early stopping strategy to prevent overfitting. Iterate this process until the preset termination condition is reached (such as the maximum number of training rounds, convergence threshold, no further improvement in validation set performance, etc.);
[0125] Optionally, the first hidden layer has 2d neurons, accepting a d-dimensional input feature vector m i , set the weight matrix of the first hidden layer to W (1) , size is 2d×d, bias vector is b (1) , with a size of 2d×1, and the output h of the first hidden layer (1) It can be expressed as:
[0126] h (1) =f (1) (W (1) m i +b (1) )
[0127] Among them, f (1) is the ReLU activation function, expressed as: f (1) (x) = max(0,x);
[0128] Optionally, the second hidden layer has d neurons, receives the 2D output of the first hidden layer, and sets the weight matrix of the second hidden layer to W (2) , size is d×2d, bias vector is b (2) , with a size of d×1, and the output h of the second hidden layer (2) It can be expressed as:
[0129] h (2) =f (2) (W (2) h (1) +b (2) )
[0130] Among them, f (2) is the ReLU activation function;
[0131] Optionally, the output layer accepts the d-dimensional output of the second hidden layer. Let the weight vector of the output layer be W (3) , size is 1×d, bias is b (3) , is a scalar, output It can be expressed as:
[0132]
[0133] Where σ is the sigmoid activation function, defined as:
[0134] Alternatively, the formula for the binary cross entropy loss function L is:
[0135]
[0136] Among them, y i is the true label of the i-th sample, is the probability predicted by the model, and N is the number of samples;
[0137] Optionally, the weight and bias update rules are:
[0138]
[0139] Among them, w is the weight to be updated, α is the learning rate, and is the gradient of the loss function with respect to the weights w and bias b.
[0140] D3. Support Vector Machine (SVM) training:
[0141] The feature set extracted from the last hidden layer of ANN is in is the d-dimensional feature vector of the i-th sample after processing by the last hidden layer of the ANN. A radial basis function (RBF) is selected as the kernel function of the SVM, and the feature set H is used as the training dataset for the SVM model. In the SVM, the goal is to maximize the class margin while minimizing the classification error. The optimal SVM parameters, including the kernel function parameter γ and the regularization parameter C, are determined through cross-validation and grid search.
[0142] Optionally, the kernel function K is expressed as:
[0143]
[0144] Among them, γ>0 is the parameter of the kernel function, which controls the influence range of different features in high-dimensional space.
[0145] Optionally, the SVM training process includes solving the following optimization problem:
[0146]
[0147] Among them, ω is the normal vector of the hyperplane, b is the bias term, C is the regularization parameter used to balance the smoothness of the boundary and the classification accuracy, ξ iis a slack variable that allows some data points to be on the wrong side of the boundary;
[0148] D4. Model evaluation and optimization:
[0149] Use the trained ANN model to test the data set M test Perform forward propagation and extract feature vectors from the last hidden layer The eigenvector H test It will be used as the input of the SVM model and the predicted label probability set will be obtained after prediction Accuracy, recall, precision, and F1 score are used as evaluation metrics. Accuracy indicates the proportion of correct predictions made by the model, while recall and precision focus on the model's ability to predict the positive class and the accuracy of the predictions, respectively. The F1 score is the harmonic mean of recall and precision, used to comprehensively evaluate model performance. Based on the performance evaluation results, the ANN or SVM parameters are adjusted during model training to optimize model performance.
[0150] S104, Risk identification and alarm unit: Figure 4 As shown, the specific steps of the risk identification and alarm unit implementation process in S104 of this embodiment are as follows: First, the confidence S of the SVM classification probability is calculated. If S is close to 0, the model is uncertain; if S is close to 1, the model is very certain. Then, the confidence is graded: according to the confidence S, the prediction is divided into different confidence levels:
[0151] If S<0.3, the confidence level is low (Low Confidence);
[0152] If 0.3≤S<0.7, the confidence level is medium (Medium Confidence);
[0153] If S ≥ 0.7, the confidence level is high (High Confidence).
[0154] Depending on the confidence level, different response measures can be set:
[0155] Low confidence: Issues a warning and recommends monitoring and inspection, but no immediate action.
[0156] Medium confidence: Issue a serious warning, activate the emergency plan, and prepare for further diagnosis and possible repairs.
[0157] High confidence: Immediately triggers power outages to ensure safety, while initiating emergency response procedures to notify management and emergency services.
[0158] Optionally, the specific calculation formula of the confidence S is:
[0159]
[0160] Among them, X i is the i-th sample of the input current, is the prediction classification result of SVM. A positive value indicates current anomaly, and θ is the confidence threshold;
[0161] S105, User Interface and Interaction Unit: Provides a graphical user interface (GUI) to display real-time data, historical trends, and forecast results. The interface includes various data visualization tools, such as line charts and heat maps, as well as system configuration options. Users can adjust monitoring parameters such as sampling frequency and alarm sensitivity according to their needs and interact with the system through feedback mechanisms on the interface to further optimize system performance.
[0162] The above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the embodiments of the present invention have been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A residual current anomaly detection and risk warning system based on hybrid machine learning, characterized in that: include: The data acquisition unit is equipped with a residual current transformer, a Hall effect sensor, a power sensor, and a temperature and humidity sensor. It is used to collect residual current signals, branch line load current and voltage information in the electrical system, and monitor environmental parameters in real time. Data preprocessing and feature extraction unit, used to standardize the collected data, and perform time-frequency analysis and feature dimension reduction on the residual current signal using continuous wavelet transform and principal component analysis; The hybrid machine learning model unit extracts and classifies the feature data after dimensionality reduction by combining artificial neural networks and support vector machines to achieve residual current anomaly detection; The risk identification and alarm unit classifies risks based on the classification probability confidence of the support vector machine and triggers different response measures; The user interface and interaction unit is used to provide a graphical user interface to display real-time data, historical data trends, forecast results and alarm information, and allow users to adjust system parameters, including sampling frequency, alarm sensitivity, and early warning thresholds, and support user feedback and system adaptive adjustment through the graphical user interface.
2. The residual current anomaly detection and risk warning system based on hybrid machine learning according to claim 1 is characterized in that: The data acquisition unit includes: Residual current transformers and Hall effect sensors: used to monitor the total system current at the entrance of the electrical system to capture abnormal current events; Power sensor: Installed on the load circuit of an electrical device containing three load circuit units, used to monitor the current, voltage and load of the circuit with high precision; Temperature and humidity sensors: used to monitor the impact of changes in environmental conditions on current characteristics; Integrated processor: used to integrate the network time protocol to ensure the accuracy and real-time nature of the data, while recording the timestamp information of the data; Signal amplification and filtering device: used to amplify and filter the signal output from the sensor, filter out noise, and enhance signal clarity; Analog-to-digital converter: used to convert the amplified and filtered analog signal into a digital signal for subsequent processing.
3. The residual current anomaly detection and risk warning system based on hybrid machine learning according to claim 1 is characterized in that: The data acquisition unit further comprises: Power sensor data priority strategy, used to give priority to the data collected by the power sensor in subsequent data processing, improving the accuracy and robustness of anomaly detection; A multi-source information fusion strategy is used to use power sensor data as the primary data source and residual current transformer and Hall effect sensor data as auxiliary data sources. A comprehensive fusion algorithm is used to integrate multi-source data to enhance data comprehensiveness.
4. The residual current anomaly detection and risk warning system based on hybrid machine learning according to claim 1 is characterized in that: The data preprocessing and feature extraction unit includes: Continuous wavelet transform uses Morlet wavelet function to extract the frequency and amplitude characteristics of the current signal, which is used to detect the time-frequency characteristics of the current at different scales; Analyze the energy spectrum of the continuous wavelet transform output and extract the specific frequency energy features corresponding to the abnormal state; Principal component analysis is used to reduce the complexity of data and reduce noise and improve data analysis accuracy by selecting the principal component directions of important features; The processed current characteristics are fused with the standardized temperature and humidity environmental data to enhance the model's ability to perceive changes in environmental conditions.
5. The residual current anomaly detection and risk warning system based on hybrid machine learning according to claim 1 is characterized in that: The formula of the continuous wavelet transform is: Among them, x(t) is the current data, t is the time, a is the scale parameter, b is the location parameter, ψ * represents the complex conjugate, ψ(t) is the selected mother wavelet function; ψ(t) selects Morlet wavelet as the mother wavelet, and its expression is: Where ω0 is the center frequency and i is the imaginary unit.
6. The residual current anomaly detection and risk warning system based on hybrid machine learning according to claim 1 is characterized in that: The steps of principal component analysis include: The data is standardized and the standardization formula is: Where Z is the standardized data matrix, X is the original data matrix, μ is the mean of each column, and σ is the standard deviation of each column; Calculate the covariance matrix, the formula is: Among them, Z T is the transpose of Z, n is the number of samples, and Σ is the covariance matrix; Calculate the eigenvalues and eigenvectors of the covariance matrix Σ and perform eigendecomposition on the covariance matrix. The eigenvectors determine the direction of the principal components in the data, and the eigenvalues represent the variance in the direction of each principal component, that is, the amount of information. Arrange the obtained eigenvalues in descending order, select the eigenvectors corresponding to the first k largest eigenvalues, and form the basis of the new feature space. d is selected by the cumulative variance explanation ratio, that is, the smallest d is selected so that: Among them, λ i is the i-th eigenvalue, N is the total number of eigenvalues, and threshold is the preset threshold.
7. The residual current anomaly detection and risk warning system based on hybrid machine learning according to claim 1 is characterized in that: The parameters of the artificial neural network include: The input layer contains d neurons, corresponding to the current and environmental features after principal component analysis; The first hidden layer contains 2d neurons, and the second hidden layer contains d neurons; The output layer contains one neuron and uses the sigmoid activation function to calculate the probability of sample abnormality.
8. The residual current anomaly detection and risk warning system based on hybrid machine learning according to claim 1 is characterized in that: The support vector machine uses a radial basis function as a kernel function to improve the accuracy of abnormal state classification in a high-dimensional feature space.
9. The residual current anomaly detection and risk warning system based on hybrid machine learning according to claim 1 is characterized in that: The confidence calculation formula is: Among them, X i is the i-th sample of the input current, is the prediction classification result of the support vector machine. A positive value indicates current anomaly, and θ is the confidence threshold.
10. The residual current anomaly detection and risk warning system based on hybrid machine learning according to claim 1, characterized in that: The risk identification and alarm unit performs classification based on the confidence level S of the support vector machine classification probability. The specific classification standards and response measures are as follows: If S<0.3, the confidence level is low; a warning is issued and monitoring and inspection are recommended; If 0.3≤S<0.7, the confidence level is medium; a serious warning is issued, the emergency plan is activated, and further diagnosis and repair are prepared; If S ≥ 0.7, the confidence level is high; Immediately trigger the power outage mechanism to ensure safety, while simultaneously initiating emergency response procedures to notify management and emergency services.