Series ac arc fault detection method and system based on difference matrix and self-attention mechanism

The series AC arc fault detection method using difference matrix and self-attention mechanism solves the load shielding problem, achieves higher detection accuracy, and improves the ability to identify series AC arc faults.

CN119719849BActive Publication Date: 2026-06-05HARBIN INST OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HARBIN INST OF TECH
Filing Date
2024-12-06
Publication Date
2026-06-05

Smart Images

  • Figure CN119719849B_ABST
    Figure CN119719849B_ABST
Patent Text Reader

Abstract

The application discloses a series arc fault detection method and system based on a differential matrix and a self-attention mechanism, and belongs to the technical field of arc fault detection. In order to solve the problem that the existing series arc fault detection is prone to being shielded by a load, and the fault feature information carried by current is easy to be covered, and the detection accuracy needs to be improved, the application obtains a current signal time sequence under a load, reorganizes to obtain an m-row matrix, uses a principal component analysis method to obtain a principal component of each row, obtains a new sequence S with a length of m, performs different degree differential operations on the sequence S, and stacks the operation results into a matrix M; the matrix M is transposed and then stacked to obtain a stacked matrix, then visual processing is performed to obtain a differential matrix image; the differential matrix image is sent to a deep convolution network model fused with a self-attention mechanism for identification, and a series arc fault detection result is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of arc fault detection technology, specifically relating to a series AC arc fault detection method and system. Background Technology

[0002] When a series fault arc occurs in a circuit, it can easily ignite surrounding flammable materials, posing a safety hazard. Therefore, accurate detection of fault arcs is crucial. However, when a series fault arc occurs, the fault characteristic information carried by the current can easily be masked by so-called shielded loads, making accurate detection of series arc faults more challenging. Most current arc fault detection methods do not adequately consider the types of loads, and their detection accuracy needs improvement. Summary of the Invention

[0003] This invention addresses the problem that existing series fault arc fault detection methods suffer from the issue that fault characteristic information carried by the current can be easily masked by shielded loads, thus hindering the improvement of detection accuracy.

[0004] A series AC arc fault detection method based on difference matrix and self-attention mechanism includes:

[0005] Based on the acquired current signal time series under load, an m-row matrix is ​​reconstructed. Principal component analysis is then used to obtain the principal components of each row, resulting in a new sequence of length m. Differential operations are performed on the sequence S, and the results are superimposed into matrix M. The matrix M is then transposed and superimposed again to obtain the superimposed matrix. ; Matrix M e Visualization processing is performed to obtain the difference matrix image;

[0006] The difference matrix image is fed into a deep convolutional network model that incorporates a self-attention mechanism for identification, resulting in the detection results of series AC arc faults.

[0007] Furthermore, the process of acquiring the time series of the current signal under the load includes the following steps:

[0008] Using a single power cycle of 20ms as a calculation unit of the detection model, the current signal sequence in a single calculation unit is obtained at a sampling rate of 100kHz.

[0009] Furthermore, the current signal time series under the load needs to be normalized before reconstruction.

[0010] Furthermore, the new sequence of length m The results of the calculations are superimposed into a matrix. .

[0011] Furthermore, the difference matrix image is a three-channel image.

[0012] Furthermore, the deep convolutional network model that incorporates the self-attention mechanism is a ResNet18 network model that incorporates the self-attention mechanism, with the self-attention mechanism set after the fourth convolutional module of the ResNet18 network model.

[0013] A series AC arc fault detection system based on difference matrix and self-attention mechanism, comprising:

[0014] Current signal acquisition module, used to acquire the time series of current signals under load;

[0015] Matrix construction module: Based on the acquired current signal time series under load, an m-row matrix is ​​reconstructed. Principal component analysis is used to obtain the principal components of each row, resulting in a new sequence of length m. Differential operations are performed on the sequence S, and the results are superimposed into matrix M. The matrix M is then transposed and superimposed again to obtain the superimposed matrix. ;

[0016] Difference matrix image construction module: converts matrix M e Visualization processing is performed to obtain the difference matrix image;

[0017] Arc fault detection module: The difference matrix image is fed into a deep convolutional network model that incorporates a self-attention mechanism for identification, and the result of series AC arc fault detection is obtained.

[0018] Furthermore, the process of acquiring the time series of the current signal under the load includes the following steps:

[0019] Using a single power cycle of 20ms as a calculation unit of the detection model, the current signal sequence in a single calculation unit is obtained at a sampling rate of 100kHz.

[0020] Furthermore, a series AC arc fault detection system based on a difference matrix and a self-attention mechanism also includes a standardization module, which standardizes the current signal time series before reassembly.

[0021] Furthermore, the new sequence of length m The results of the calculations are superimposed into a matrix. .

[0022] Compared with the prior art, the present invention has the following advantages:

[0023] This invention converts the raw current signal into a difference matrix, which can effectively characterize the fault features in the arc current. Simultaneously, this invention constructs a convolutional neural network model incorporating a self-attention mechanism to extract key information from the difference matrix. This model can weight the positional information of the highlighted blocks in the difference matrix, which not only improves the model's detection performance but also effectively reduces the problem of fault feature information carried by the current being easily masked by shielded loads, thus significantly improving detection accuracy. Attached Figure Description

[0024] Figure 1 This is a flowchart of a series AC arc fault detection method based on difference matrix and self-attention mechanism;

[0025] Figure 2 These are the experimental circuits and equipment of the electric arc simulation experimental platform in the embodiments;

[0026] Figure 3 These are the current time-domain waveforms under different loads in the embodiments;

[0027] Figure 4 It is the differential signal between the normal current and the arc current under different loads in the embodiment;

[0028] Figure 5 These are difference matrix images under different load conditions in the embodiments;

[0029] Figure 6 This is the convolutional network model architecture with self-attention mechanism constructed in the embodiment;

[0030] Figure 7 This is a graph showing the training loss versus validation loss in the example.

[0031] Figure 8 This is the confusion matrix obtained from the test in the embodiment. Detailed Implementation

[0032] Specific implementation method one: Combining Figure 1 This implementation method is described below.

[0033] The series AC arc fault detection method based on difference matrix and self-attention mechanism described in this embodiment includes the following steps:

[0034] Step S1: Collect time-series data of current signals under different load conditions. Standardize and reduce the dimensionality of the original data to obtain a new sequence. Perform difference operations on the new sequence and stack the results into a matrix. Finally, perform data augmentation and visualization processing on the matrix to obtain the difference matrix image under the corresponding load conditions, which serves as the input parameter for the subsequent arc detection model. The specific steps are as follows:

[0035] Step S11: The time series T of the current signal under different loads is normalized by z-score according to equation (1) to obtain the normalized sequence D;

[0036]

[0037] in, This represents a current signal within a time series of current signals. , These are the mean and standard deviation, respectively.

[0038] In this embodiment, based on the study of series AC arc signals, the present invention ultimately uses a single power cycle of 20ms as a calculation unit in the detection model. At a sampling rate of 100kHz, the original data sequence of a single calculation unit is as follows: .

[0039] Step S12: Reorganize sequence D into a matrix of shape m×10, and then use principal component analysis to find the principal components of each row. Finally, a new sequence of length m is obtained. .

[0040] It should be noted that, based on research into series AC arc signals, this invention has found that, for a 20m computing unit, the time series obtained by principal component extraction at a 100kHz sampling rate yields a sequence... It can effectively characterize the features of current signals, thus not only ensuring the accuracy of subsequent processing, but also greatly reducing dimensionality, effectively reducing the amount of data to be processed and improving processing efficiency.

[0041] Step S13: Perform different degrees of difference operations on sequence S according to the method of equation (2), and superimpose the operation results into matrix M.

[0042]

[0043] To achieve data augmentation, matrix M is transposed and then superimposed to obtain the superimposed matrix M. e ;

[0044]

[0045] Step S14: Stack the matrix M e Visualization processing is performed to obtain a difference matrix image, which is a three-channel image, thus improving the accuracy of subsequent detection.

[0046] Step S2: Based on the difference matrix image obtained from processing the current data in Step S1, construct a deep convolutional network model with ResNet18 as the basic architecture and incorporating a self-attention mechanism. The specific steps are as follows:

[0047] Step S21: Construct the basic framework of the detection model, which is based on the ResNet18 architecture;

[0048] Step S22: Construct a convolutional network model incorporating a self-attention mechanism, where the self-attention mechanism is integrated after the fourth convolutional module in the basic framework of step S21. The feature map processed by the self-attention mechanism is added to the original feature map as the output, thereby achieving weighting of key features in the difference matrix.

[0049] Step S3: Based on the detection model constructed in Step S2, train and test the model using the input difference matrix dataset, and evaluate its effectiveness and accuracy based on the test results. The specific steps are as follows:

[0050] Step S31: Convert the entire original current signal dataset into a difference matrix dataset, and set labels for each visualization matrix to distinguish between normal and fault data for each type of load. Then, divide the difference matrix dataset into training, validation, and test sets for subsequent training and testing inputs.

[0051] Step S32: Use the difference matrix dataset to train and test some commonly used convolutional neural network models to prove the effectiveness of the difference matrix in feature extraction.

[0052] Step S33: Train and test the constructed detection model using the difference matrix dataset, and use multiple metrics to evaluate the detection results.

[0053] Example:

[0054] The AC series arc fault current data in this embodiment comes from, for example, Figure 2 The experimental platform shown is primarily used to observe the impact of arcing faults caused by arcing between graphite and copper contacts on the load current. The platform is powered by 220V at 50Hz. A current transformer is used to measure the current in the load circuit. The acquired current is transmitted to the host computer for storage via a data acquisition unit (NI / PCI6229). The data acquisition unit's sampling frequency is 100kHz. Six types of loads were used in the experiment, and their information is shown in Table 1.

[0055] Table 1 Load Types and Their Operating Conditions

[0056]

[0057] The above experimental platform was used to collect current signals from different loads during normal operation and during arc faults. Some of the collected signals are shown below. Figure 3 As shown. Figure 3 In the diagram, (a) corresponds to a resistor, (b) to an electronic light strip regulator, (c) to a switching power supply, (d) to a handheld drill, and (e) to a vacuum cleaner; Figure 3 In each subgraph, the left side of the red dashed line represents the normal current time-domain signal, and the right side of the red dashed line represents the current time-domain signal when an arc fault occurs. From Figure 3 As can be seen, the peak value of the current time-domain signal typically fluctuates during an arc fault. Furthermore, the arc current usually exhibits some singularities and zero-crossing phenomena. The zero-crossing phenomenon occurs because as the voltage decreases, the number of electrons generated by thermionic emission gradually decreases, and the arc gradually extinguishes. Then, as the voltage gradually increases until the conditions for arc ignition are met, the current will momentarily jump.

[0058] Based on the above analysis, the amplitude of the current signal changes when it crosses zero and generates singular values. To further observe the difference in fluctuations between normal current and arc current, a one-cycle current signal was extracted and differentially analyzed, yielding the following results: Figure 4 The results are shown. Figure 4 In the diagram, (a) corresponds to a resistor, (b) to an electronic light strip regulator, (c) to a switching power supply, (d) to a handheld drill, and (e) to a vacuum cleaner; from Figure 4 As can be seen, the maximum amplitude of the differential signal during arcing is usually larger than that during normal current. Furthermore, roughly speaking, the overall fluctuation of the arc current over the time period is more severe than that of the normal current.

[0059] The process for detecting AC series arc faults using arc fault data acquired through this experimental platform mainly includes the following aspects:

[0060] First, differential data processing is performed on the acquired raw current data. This invention uses a single power cycle (20ms) as a computational unit in the detection model. At a sampling rate of 100kHz, the raw data sequence of a single computational unit is... , where n is 2000. Then the original sequence T is subjected to z-score standardization as shown in equation (1) to obtain sequence D. Where μ is the mean of T and σ is the standard deviation of T.

[0061] Secondly, dimensionality reduction is performed on D. D is reorganized into a matrix of shape [m, 10], and principal component analysis (PCA) is used to obtain the principal components of each row. Finally, a new sequence of length m is obtained. In this embodiment, m=200. This step is equivalent to reducing the data length of a computing unit by a factor of 10.

[0062] Then, the sequence S is subjected to different degrees of difference operations according to equation (2), and the results are superimposed into matrix M. Since half of matrix M is zero, a large amount of useless information exists in the matrix. To compensate for this defect, matrix M is transposed before being superimposed, thus achieving data augmentation. Then, the superimposed matrix M is obtained. e M e It can be represented as

[0063]

[0064] Among them, M T This represents the transpose of M. Finally, M... e The difference matrix can be obtained by visualizing it. Figure 5 This is a visualization difference matrix showing the arc fault and normal operating conditions under different load conditions. According to the formula above, it's easy to see that the brighter the color of a region in the difference matrix, the more abrupt a change in the amplitude of the corresponding current signal. Conversely, the darker the color of a region, the less significant the change in the corresponding current signal. Figure 5 As can be seen, the difference matrix obtained from the normal current conversion and the difference matrix obtained from the arc current conversion differ to some extent under different load conditions. This indicates that the difference matrix can effectively characterize the fault features in the arc current, enabling it to distinguish between the normal current state and the arc state.

[0065] Subsequently, labels were assigned to normal and faulty data for each load type within the difference matrix dataset for differentiation. Details of the difference matrix dataset are shown in Table 2.

[0066] Table 2. Dataset label definitions and dataset size

[0067]

[0068] Then, the difference matrix dataset is divided into a training set, a validation set, and a test set. The training set accounts for 60%, and the test set and validation set each account for 20%.

[0069] After data processing, a model is built. Based on the ResNet18 architecture and self-attention mechanism, this invention constructs a model as follows: Figure 6The network model shown is an example of a self-attention mechanism, a special type of attention mechanism that mimics biological visual saliency detection and selective attention by performing attention calculations on the sequence itself, assigning different weights to different elements to obtain the internal connections within the sequence. In this invention, spatial self-attention is used to effectively enhance the positional differences of highlighted blocks in the difference matrix under different load conditions.

[0070] After building the model, several commonly used convolutional neural network (CNN) models were trained and pre-tested using a difference matrix dataset. The selected CNN models included CNN, ResNet18, and ResNet50. Furthermore, to demonstrate the superiority of the difference matrix, this invention utilized a grayscale image conversion method commonly used in existing research to construct a corresponding grayscale image dataset. Similarly, commonly used models were trained and tested using the grayscale image dataset. The test results using the two datasets are shown in Table 3.

[0071] Table 3 Training Pretest Results

[0072]

[0073] The results in the table above show that commonly used convolutional neural network models can achieve good classification results using difference matrices. This demonstrates the effectiveness of difference matrices in feature extraction. Comparing the test results of the two datasets, difference matrices can relatively effectively improve the detection performance of the model. This also illustrates the superiority of difference matrices in feature extraction.

[0074] The model is then trained. Several hyperparameters need to be set during training. The learning rate is set to 0.01, and a stochastic gradient descent optimizer is used to optimize the model's parameters. To improve training efficiency, images are grouped into a single batch of 16 for training. The loss function used during training is the cross-entropy function.

[0075] The proposed model was then trained using a difference matrix dataset. Figure 7 This demonstrates the changes in validation loss and training loss during the training process. From Figure 7 As can be seen, both the training loss and validation loss gradually decrease with the increase of the number of iterations, and the loss value tends to stabilize after 10 epochs. This indicates that the training process is effective and efficient. Figure 7 The red dashed line marks the minimum value of the validation loss, which is 0.0393. Therefore, the model from the 14th epoch is saved for subsequent testing.

[0076] The saved model was tested using the test set, and the test results were described using a confusion matrix. The results are as follows: Figure 8 As shown. (Through) Figure 8 As can be seen, only a small number of samples were incorrectly identified overall, resulting in a high overall accuracy. Specifically, for samples indicating an arcing condition, only four samples under a vacuum cleaner load were misclassified as normal. For samples indicating a normal condition, two samples with a handheld drill were misclassified as arcing faults. 100% detection accuracy was achieved for arcing faults under electronic light regulator and handheld drill load conditions. Furthermore, 100% detection accuracy was also achieved for resistance and normal current under vacuum cleaner load conditions. To further evaluate the performance of the detection model, the accuracy, precision, return rate, F1-score, specificity, sensitivity, and false alarm rate for each label were calculated based on the confusion matrix results and are summarized in Table 4. The results in Table 4 show that the detection model proposed in this invention achieves a high detection accuracy of 98.85%. Among the many labels, only label 9 (normal condition under handheld power station load) showed a low detection accuracy. This is because the detection model identified some of its samples as those corresponding to label 10 (normal condition under vacuum cleaner load). In summary, the arc fault detection framework proposed in this invention can achieve high accuracy in detecting series arc faults and identifying load types.

[0077] Table 4. Detection accuracy and time of the model

[0078]

[0079] To demonstrate the superiority of the proposed detection model, its detection performance was compared with other commonly used convolutional neural network models, and the results are shown in Table 5.

[0080] Table 5 Comparison of detection performance between the proposed method and commonly used methods

[0081]

[0082] Table 5 shows that the proposed model has advantages in accuracy, precision, recall, and F1-score compared to other commonly used models. The comparison between the proposed model and the ResNet18 model demonstrates that incorporating a self-attention mechanism into the model can improve its detection performance. This also verifies the effectiveness of the proposed model. Specific Implementation Method Two:

[0084] This embodiment is a series AC arc fault detection system based on difference matrix and self-attention mechanism, which is a program system corresponding to a series AC arc fault detection method based on difference matrix and self-attention mechanism.

[0085] This embodiment describes a series AC arc fault detection system based on a difference matrix and a self-attention mechanism, comprising:

[0086] A current signal acquisition module is used to acquire the time series of the current signal under the load; the process of acquiring the time series of the current signal under the load includes the following steps:

[0087] Using a single power cycle of 20ms as a calculation unit of the detection model, the current signal sequence in a single calculation unit is obtained at a sampling rate of 100kHz.

[0088] Standardization module: Standardizes the time series of streaming signals.

[0089] Matrix construction module: Based on the standardized current signal time series, an m-row matrix is ​​reconstructed. Principal component analysis is used to obtain the principal components of each row, resulting in a new sequence of length m. Differential operations are performed on the sequence S, and the results are superimposed into matrix M. The matrix M is then transposed and superimposed again to obtain the superimposed matrix. The new sequence of length m The results of the calculations are superimposed into a matrix. .

[0090] Difference matrix image construction module: converts matrix M e Visualization processing is performed to obtain a difference matrix image; the difference matrix image is a three-channel image.

[0091] Arc fault detection module: The difference matrix image is fed into a deep convolutional network model with self-attention mechanism for recognition to obtain the series AC arc fault detection result; the deep convolutional network model with self-attention mechanism is a ResNet18 network model with self-attention mechanism, and the self-attention mechanism is set after the fourth convolutional module of the ResNet18 network model.

[0092] The above examples of this invention are merely illustrative of the computational model and process of this invention, and are not intended to limit the implementation of this invention. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is impossible to exhaustively list all possible implementations here. Any obvious variations or modifications derived from the technical solutions of this invention are still within the scope of protection of this invention.

Claims

1. A method for detecting series AC arc faults based on difference matrix and self-attention mechanism, characterized in that, include: Based on the acquired current signal time series under load, an m-row matrix is ​​reconstructed. Principal component analysis is then used to obtain the principal components of each row, resulting in a new sequence of length m. Differential operations are performed on the sequence S, and the results are superimposed into a matrix M; the new sequence of length m The results of the calculations are superimposed into a matrix. ; Transpose matrix M and then superimpose them to obtain the superimposed matrix. ; Matrix M e Visualization processing is performed to obtain the difference matrix image; The difference matrix image is fed into a deep convolutional network model that incorporates a self-attention mechanism for identification, resulting in the detection results of series AC arc faults.

2. The series AC arc fault detection method based on difference matrix and self-attention mechanism according to claim 1, characterized in that, The process of obtaining the time series of the current signal under load includes the following steps: Using a single power cycle of 20ms as a calculation unit of the detection model, the current signal sequence in a single calculation unit is obtained at a sampling rate of 100kHz.

3. The series AC arc fault detection method based on difference matrix and self-attention mechanism according to claim 2, characterized in that, The current signal time series under the load needs to be normalized before reconstruction.

4. The series AC arc fault detection method based on difference matrix and self-attention mechanism according to claim 1, characterized in that, The difference matrix image is a three-channel image.

5. The series AC arc fault detection method based on difference matrix and self-attention mechanism according to claim 4, characterized in that, The deep convolutional network model that incorporates the self-attention mechanism is a ResNet18 network model that incorporates the self-attention mechanism, which is set after the fourth convolutional module of the ResNet18 network model.

6. A series AC arc fault detection system based on difference matrix and self-attention mechanism, characterized in that, include: Current signal acquisition module, used to acquire the time series of current signals under load; Matrix construction module: Based on the acquired current signal time series under load, an m-row matrix is ​​reconstructed. Principal component analysis is used to find the principal components of each row, resulting in a new sequence of length m. Differential operations are performed on the sequence S, and the results are superimposed into a matrix M; the new sequence of length m The results of the calculations are superimposed into a matrix. ; Transpose matrix M and then superimpose them to obtain the superimposed matrix. ; Difference matrix image construction module: converts matrix M e Visualization processing is performed to obtain the difference matrix image; Arc fault detection module: The difference matrix image is fed into a deep convolutional network model that incorporates a self-attention mechanism for identification, and the result of series AC arc fault detection is obtained.

7. The series AC arc fault detection system based on difference matrix and self-attention mechanism according to claim 6, characterized in that, The process of obtaining the time series of the current signal under load includes the following steps: Using a single power cycle of 20ms as a calculation unit of the detection model, the current signal sequence in a single calculation unit is obtained at a sampling rate of 100kHz.

8. The series AC arc fault detection system based on difference matrix and self-attention mechanism according to claim 7, characterized in that, It also includes a standardization module, which standardizes the current signal time series before reassembly.