Series alternating current arc fault detection method and system based on difference matrix and self-attention mechanism
Through the series AC arc fault detection method based on the differential matrix and self-attention mechanism, the problem of fault characteristic information being masked by masked load in the prior art is solved, and a higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202411789571.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-06
AI Technical Summary
In the existing series fault arc fault detection methods, the fault characteristic information carried by the current is easily masked by the masked load, resulting in insufficient detection accuracy.
A series AC arc fault detection method based on the differential matrix and self-attention mechanism is adopted to generate the differential matrix images through principal component analysis and differential operations, and the deep volume network model with the fused self-attention mechanism is used for identification.
Effectively characterize the fault characteristics in arc current, reduce the risk that fault characteristic information is masked by masked load, and improve detection accuracy.
Smart Images

Figure CN119719849A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of arc fault detection, and in particular relates to a series AC arc fault detection method and system. Background Art
[0002] When a series arc fault occurs in a circuit, it is easy to ignite the surrounding flammable materials, which will lead to safety hazards. Therefore, accurate detection of arc faults is crucial. However, when a series arc fault occurs, the fault characteristic information carried by the current can be easily masked by the so-called shielding load, making accurate detection of series arc faults more challenging. Most of the current arc fault detection methods do not consider the full range of load types, and their detection accuracy needs to be improved. Summary of the invention
[0003] The present invention aims to solve the problem in the existing series fault arc fault detection that the fault characteristic information carried by the current is easily covered by the shielding load, resulting in the detection accuracy needing to be improved.
[0004] A series AC arc fault detection method based on a difference matrix and a self-attention mechanism, comprising:
[0005] Based on the acquired current signal time series under the load, a matrix with m rows is reorganized, and the principal component of each row is obtained by principal component analysis method to obtain a set of new sequences S with a length of m. Differential operations are performed on the sequence S to different degrees, and the operation results are superimposed into a matrix M; the matrix M is transposed and then superimposed to obtain the superimposed matrix M e =M+M T ; The matrix M e Perform visualization processing to obtain a difference matrix image;
[0006] The difference matrix image is sent to the deep convolution network model integrated with the self-attention mechanism for recognition, and the series AC arc fault detection result is obtained.
[0007] Furthermore, the process of obtaining the time series of the current signal under the load includes the following steps:
[0008] A single power cycle of 20 ms is used as a calculation unit of the detection model, and the current signal sequence in a single calculation unit is obtained at a sampling rate of 100 kHz.
[0009] Furthermore, the time series of the current signal under the load needs to be normalized before being reorganized.
[0010] Furthermore, the new sequence S with a length of m = s1, s2, ..., s m , and superimpose the operation results into a matrix
[0011] Furthermore, the difference matrix image is a three-channel image.
[0012] Furthermore, the deep convolutional network model integrating the self-attention mechanism is a ResNet18 network model integrating the self-attention mechanism, and the self-attention mechanism is set after the fourth convolution module of the ResNet18 network model.
[0013] A series AC arc fault detection system based on difference matrix and self-attention mechanism, comprising:
[0014] A current signal acquisition module, used to acquire a time series of current signals under load;
[0015] Matrix construction module: Based on the acquired current signal time series under the load, a matrix with m rows is reorganized, and the principal component of each row is obtained by principal component analysis method to obtain a set of new sequences S with a length of m. Differential operations are performed on the sequence S to different degrees, and the results are superimposed into a matrix M; the matrix M is transposed and then superimposed to obtain the superimposed matrix M e =M+M T ;
[0016] Difference matrix image building module: The matrix M e Perform visualization processing to obtain a difference matrix image;
[0017] Arc fault detection module: The differential matrix image is sent to the deep convolution network model integrated with the self-attention mechanism for recognition to obtain the series AC arc fault detection results.
[0018] Furthermore, the process of obtaining the time series of the current signal under the load includes the following steps:
[0019] A single power cycle of 20 ms is used as a calculation unit of the detection model, and the current signal sequence in a single calculation unit is obtained at a sampling rate of 100 kHz.
[0020] Furthermore, a series AC arc fault detection system based on a difference matrix and a self-attention mechanism also includes a normalization module, which normalizes the current signal time series under the load before the current signal time series is reorganized.
[0021] Furthermore, the new sequence S with a length of m = s1, s2, ..., s m , and superimpose the operation results into a matrix
[0022] Compared with the prior art, the present invention has the following advantages:
[0023] The present invention converts the original current signal into a differential matrix, which can effectively characterize the fault characteristics in the arc current. At the same time, the present invention constructs a convolutional neural network model that integrates the self-attention mechanism to extract the key information in the differential matrix. Through this model, the position information of the highlight color blocks in the differential matrix can be weighted, which can not only improve the detection performance of the model itself, but also effectively reduce the problem that the fault characteristic information carried by the current is easily covered by the shielding load. From this perspective, the detection accuracy can also be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flow chart of a series AC arc fault detection method based on difference matrix and self-attention mechanism;
[0025] Figure 2 It is the experimental circuit and experimental equipment of the arc simulation experimental platform in the embodiment;
[0026] Figure 3 is the current time domain waveform under different loads in the embodiment;
[0027] Figure 4 is a differential signal between a normal current and an arc current under different loads in the embodiment;
[0028] Figure 5 is a differential matrix image under different load conditions in the embodiment;
[0029] Figure 6 It is a convolutional network model architecture integrating a self-attention mechanism constructed in the embodiment;
[0030] Figure 7 is a graph of training loss and validation loss in the embodiment;
[0031] Figure 8 It is the confusion matrix obtained by testing in the embodiment. DETAILED DESCRIPTION
[0032] Specific implementation method 1: Combination Figure 1 To explain this embodiment,
[0033] A series AC arc fault detection method based on a difference matrix and a self-attention mechanism described in this embodiment includes the following steps:
[0034] Step S1, collect the time series data of the current signal under different load conditions, standardize the original sequence, and reduce the dimension to obtain a new sequence. Perform differential operation on the new sequence and stack the operation results into a matrix. Finally, perform data enhancement and visualization on the matrix to obtain the differential matrix image under the corresponding load conditions as the input parameter of the subsequent arc detection model. The specific steps are as follows:
[0035] Step S11, performing z-score normalization processing on the acquired current signal time series T under different loads according to formula (1) to obtain a normalized sequence D;
[0036]
[0037] Among them, t i represents a current signal in the current signal time series, μ and σ are the mean and standard deviation respectively.
[0038] In this embodiment, after studying the series AC arc signal, the present invention finally uses a single power cycle of 20ms as a calculation unit of the detection model. At a sampling rate of 100kHz, the original data sequence of a single calculation unit is T=t1, t2, ..., t n .
[0039] Step S12: reorganize the sequence D into a matrix of shape m×10, and then use the principal component analysis method to obtain the principal component of each row. Finally, a new sequence S=s1,s2,...,s with a length of m is obtained. m .
[0040] It should be noted that: after studying the series AC arc signal, the present invention found that for the 20m computing unit, the time series at a sampling rate of 100kHz, the main component extraction is performed to obtain the sequence S = s1, s2, ..., s m It can well characterize the characteristics of the current signal, so it can not only effectively ensure the accuracy of subsequent processing, but also greatly reduce the dimension, which can effectively reduce the amount of data processing and improve processing efficiency.
[0041] Step S13: perform differential operations of different degrees on the sequence S according to formula (2), and superimpose the operation results into a matrix M.
[0042]
[0043] To achieve data enhancement, the matrix M is transposed and then superimposed to obtain the superimposed matrix M e ;
[0044] M e =M+M T
[0045] Step S14: superimpose the matrix M e Visualization processing is performed to obtain a difference matrix image, which is a three-channel image, which can improve the subsequent detection accuracy.
[0046] Step S2: Based on the differential matrix image obtained by processing the current data in step S1, a deep convolution network model with ResNet18 as the basic architecture and integrated self-attention mechanism is constructed. The specific steps are as follows:
[0047] Step S21, constructing a basic framework of the detection model, wherein the framework is based on the ResNet18 architecture;
[0048] Step S22: construct a convolutional network model integrating the self-attention mechanism, wherein the self-attention mechanism is integrated after the fourth convolution module of the basic framework of step S21. The feature map after the self-attention mechanism operation is added to the original feature map as the output, thereby realizing the weighting of the key features in the difference matrix.
[0049] Step S3: Based on the detection model constructed in step S2, input the difference matrix data set to train and test the model, and evaluate the effectiveness and accuracy based on the test results. The specific steps are as follows:
[0050] Step S31, convert all the original current signal data sets into differential matrix data sets, and set the labels of each visualization matrix to distinguish the normal data and fault data of each type of load. Then, divide the differential matrix data set into training set, verification set and test set for subsequent training and test input;
[0051] Step S32: using the difference matrix data set 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: Use the difference matrix data set to train and test the constructed detection model, and use multiple indicators to evaluate the detection results.
[0053] Example:
[0054] The AC series arc fault current data in this embodiment comes from Figure 2 The experimental platform shown in the figure is mainly used to observe the influence of arc fault caused by arcing between graphite contact and copper contact on load current. The power supply of the platform is 220V, 50Hz. The current transformer is used to measure the current in the load circuit. The collected current can be transmitted to the host through the data acquisition device NI / PCI6229 for storage. The sampling frequency of the data acquisition device is 100kHz. There are 6 types of loads in the experiment, and the load information is shown in Table 1.
[0055] Table 1 Load types and their working conditions
[0056]
[0057] The above experimental platform was used to collect current signals of different loads during normal operation and when an arc fault occurred. Some of the collected signals are as follows: Figure 3 shown. Figure 3 (a) corresponds to a resistor, (b) corresponds to an electronic light bar regulator, (c) corresponds to a switching power supply, (d) corresponds to a handheld electric drill, and (e) corresponds to a vacuum cleaner; Figure 3 In each sub-figure, the left side of the red dotted line represents the normal current time domain signal, and the right side of the red dotted line represents the current time domain signal when an arc fault occurs. Figure 3 It can be seen that when an arc fault occurs, the peak value of the current time domain signal usually fluctuates. In addition, there are usually some singular values and zero-crossing phenomena in the arc current. Among them, the zero-crossing phenomenon is because as the voltage decreases, the electrons generated by thermal emission gradually decrease, and the arc will gradually extinguish. Then, as the voltage gradually increases until the arcing condition is reached, the current will instantly jump.
[0058] According to the above analysis, the current signal will change in amplitude when it crosses zero or produces a singular value. In order to further observe the fluctuation difference between normal current and arc current, a current signal of one cycle is intercepted for differential operation, and the following is obtained: Figure 4 Results shown. Figure 4 (a) corresponds to a resistor, (b) corresponds to an electronic light bar regulator, (c) corresponds to a switching power supply, (d) corresponds to a handheld electric drill, and (e) corresponds to a vacuum cleaner; Figure 4 It can be seen that the maximum amplitude of the differential signal during arcing is usually larger than the maximum amplitude of the differential signal during normal current. In addition, roughly speaking, the overall fluctuation of arc current in a time period is more severe than the overall fluctuation of normal current.
[0059] Using the arc fault data obtained by the experimental platform, the process of AC series arc fault detection mainly includes the following aspects:
[0060] First, differential data processing is performed on the acquired raw current data. The present invention uses a single power cycle (20ms) as a calculation unit of the detection model. At a sampling rate of 100kHz, the raw data sequence of a single calculation unit is T=t1, t2, ..., t n , where n is 2000. Then the original sequence T is subjected to z-score normalization as shown in formula (1) to obtain the sequence D. Where μ is the mean of T and σ is the standard deviation of T.
[0061] Secondly, D is reduced in dimension. D is reorganized into a matrix of shape [m, 10], and the principal component analysis (PCA) method is used to obtain the principal component of each row. Finally, a new sequence S = s1, s2, ..., s with a length of m is obtained. m, in this embodiment, m=200. This step is equivalent to reducing the data length of a computing unit by 10 times.
[0062] Then, according to formula (2), the sequence S is subjected to different degrees of differential operation, and the operation results are superimposed into a matrix M. Since half of the matrix M is zero, there is a lot of useless information in the matrix. In order to make up for this defect, the matrix M is transposed and then superimposed to achieve data enhancement. Then, the superimposed matrix M is obtained e . M e It can be expressed as
[0063] M e =M+M T (3)
[0064] Among them, M T Represents the transpose of M. Finally, M e After visualization, the difference matrix can be obtained. Figure 5 is a visualized differential matrix of arc fault and normal working state under different load conditions. According to the above formula, it is easy to know that the brighter the color of the area in the differential matrix, the more the current signal amplitude corresponding to the area has changed suddenly. On the contrary, the darker the color of the area, the less the current signal corresponding to the area has changed. Figure 5 It can be seen that under different load conditions, the difference matrix obtained by normal current conversion and the difference matrix obtained by arc current conversion have certain differences. This shows that the difference matrix can effectively characterize the fault characteristics in the arc current, so that it can distinguish the normal state of the current from the arc state.
[0065] Subsequently, in the difference matrix dataset, labels are set for the normal data and fault data of each type of load to distinguish them. The details of the difference matrix dataset are shown in Table 1.
[0066] Table 1 Dataset label definition and dataset size
[0067]
[0068] Then, the difference matrix data set is divided into training set, validation set and test set, where the training set accounts for 60%, the test set and validation set each account for 20%.
[0069] After the data processing is completed, the model is established. Based on the ResNet18 architecture and self-attention mechanism, the present invention constructs the following Figure 6The network model shown. The self-attention mechanism is a special attention mechanism that imitates biological visual saliency detection and selective attention, performs attention calculation on the sequence itself, and assigns different weight information to different elements to obtain the internal connection of the sequence. In the present invention, the spatial self-attention function is used to effectively enhance the position difference of the highlight color blocks in the difference matrix under different load conditions.
[0070] After the model is established, the differential matrix data set is used to train and pre-test some commonly used convolutional neural network models. The selected convolutional neural network models include CNN, ResNet18 and ResNet50. In addition, in order to illustrate the superiority of the differential matrix, the present invention uses the grayscale image conversion method commonly used in existing research to construct the corresponding grayscale image data set. Similarly, the commonly used models are trained and tested using the grayscale image data set. The test results using the two data sets are shown in Table 2.
[0071] Table 2 Training and pre-test results
[0072]
[0073] From the results in the above table, we can see that the commonly used convolutional neural network model can achieve good classification results through the difference matrix. This proves the effectiveness of the difference matrix in feature extraction. From the comparison of the test results of the two data sets, the difference matrix can relatively effectively improve the detection performance of the model. This also shows that the difference matrix has certain advantages in feature extraction.
[0074] The model is then trained. Some hyperparameters need to be set when training the proposed model. Among them, the learning rate is set to 0.01, and the stochastic gradient descent optimizer is used to optimize the parameters of the model. In order to improve the training efficiency, the images are combined into a batch size for training, and the batch size is set to 16. The loss function during the training process is the cross entropy function.
[0075] Subsequently, the proposed model is trained using the difference matrix dataset. Figure 7 It shows the changes of validation loss and training loss during training. Figure 7 It can be seen that both the training loss and the validation loss gradually decrease with the increase of the number of iterations, and the loss value tends to be stable after 10 epochs. This shows that the training process is effective and efficient. Figure 7 The red dotted line in the figure marks the lowest point of the validation loss, which is 0.0393. Therefore, the model of the 14th epoch is saved for subsequent testing.
[0076] The saved model is tested using the test set, and the test results are described using the confusion matrix. The results are as follows: Figure 8 As shown. Figure 8 It can be seen that in general, only a small number of samples are identified as the wrong type, and the overall accuracy is high. Among them, for samples in arc state, only 4 samples under vacuum cleaner load are misjudged as normal state. For samples in normal state, 2 samples of handheld electric drills are misjudged as arc faults. 100% detection accuracy can be achieved for arc faults under electronic light regulator and handheld electric drill load conditions. In addition, 100% detection accuracy can also be achieved for normal current under resistor and vacuum cleaner load conditions. In order to further evaluate the performance of the detection model, the accuracy, precision, return rate, F1-score, specificity, sensitivity, and false alarm rate of each type of label are calculated according to the results of the confusion matrix, and the statistics are shown in Table 3. It can be seen from the results shown in Table 3 that the detection model proposed by the present invention can achieve a high detection accuracy of 98.85%. Among many labels, only the detection accuracy of label 9 (normal state under handheld power station load) is low. This is because the detection model identifies some of its samples as samples corresponding to label 10 (normal state under vacuum cleaner load). In general, the arc fault detection framework proposed in the present invention can achieve high-accuracy series arc fault detection and load type identification.
[0077] Table 3 Detection accuracy and time of the model
[0078]
[0079] In order to illustrate the superiority of the proposed detection model, it is compared with other commonly used convolutional neural network models in terms of detection performance, and the results are shown in Table 4.
[0080] Table 4 Comparison of detection performance between the proposed method and commonly used methods
[0081]
[0082] From Table 4, it can be seen that the proposed model has certain advantages over other commonly used models in terms of accuracy, precision, recall rate and F1-score. The comparison results between the proposed model and the ResNet18 model show that incorporating the self-attention mechanism into the model can improve the detection performance of the model. This also verifies the effectiveness of the proposed model. Specific implementation method 2:
[0084] This embodiment is a series AC arc fault detection system based on a differential matrix and a self-attention mechanism, which is a program system corresponding to a series AC arc fault detection method based on a differential matrix and a self-attention mechanism.
[0085] The present embodiment provides a series AC arc fault detection system based on a difference matrix and a self-attention mechanism, comprising:
[0086] The 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] A single power cycle of 20 ms is used as a calculation unit of the detection model, and the current signal sequence in a single calculation unit is obtained at a sampling rate of 100 kHz.
[0088] Standardization module: standardizes the flow signal time series.
[0089] Matrix construction module: Based on the normalized current signal time series, a matrix with m rows is reorganized, and the principal component of each row is obtained by principal component analysis to obtain a new sequence S with a length of m. Differential operations are performed on the sequence S to different degrees, and the results are superimposed into a matrix M; the matrix M is transposed and then superimposed to obtain the superimposed matrix M e =M+M T The new sequence S with a length of m = s1, s2, ..., s m , and superimpose the operation results into a matrix
[0090] Difference matrix image building module: The matrix M e Perform visualization processing to obtain a difference matrix image; the difference matrix image is a three-channel image.
[0091] Arc fault detection module: The differential matrix image is sent to a deep convolution network model integrated with a self-attention mechanism for identification to obtain a series AC arc fault detection result; the deep convolution network model integrated with a self-attention mechanism is a ResNet18 network model integrated with a self-attention mechanism, and the self-attention mechanism is set after the fourth convolution module of the ResNet18 network model.
[0092] The above calculation examples of the present invention are only used to explain the calculation model and calculation process of the present invention in detail, and are not intended to limit the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is impossible to list all the implementation methods here. All obvious changes or modifications derived from the technical solution of the present invention are still within the scope of protection of the present invention.
Claims
1. A series AC arc fault detection method based on difference matrix and self-attention mechanism, characterized in that: include: Based on the acquired current signal time series under the load, a matrix with m rows is reorganized, and the principal component of each row is obtained by principal component analysis method to obtain a set of new sequences S with a length of m. Differential operations are performed on the sequence S to different degrees, and the operation results are superimposed into a matrix M; the matrix M is transposed and then superimposed to obtain the superimposed matrix M e =M+M T ; The matrix M e Perform visualization processing to obtain a difference matrix image; The difference matrix image is sent to the deep convolution network model integrated with the self-attention mechanism for recognition, and the series AC arc fault detection result is obtained.
2. A 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 the load includes the following steps: A single power cycle of 20 ms is used as a calculation unit of the detection model, and the current signal sequence in a single calculation unit is obtained at a sampling rate of 100 kHz.
3. A series AC arc fault detection method based on difference matrix and self-attention mechanism according to claim 2, characterized in that: The time series of the current signal under the load needs to be normalized before being reorganized.
4. A series AC arc fault detection method based on difference matrix and self-attention mechanism according to any one of claims 1 to 3, characterized in that: The new sequence S with a length of m = s1, s2, ...., s m , and superimpose the operation results into a matrix 5. A series AC arc fault detection method based on difference matrix and self-attention mechanism according to claim 4, characterized in that: The difference matrix image is a three-channel image.
6. A series AC arc fault detection method based on difference matrix and self-attention mechanism according to claim 5, characterized in that: The deep convolution network model integrating the self-attention mechanism is a ResNet18 network model integrating the self-attention mechanism, and the self-attention mechanism is set after the fourth convolution module of the ResNet18 network model.
7. A series AC arc fault detection system based on difference matrix and self-attention mechanism, characterized in that: include: A current signal acquisition module, used to acquire a time series of current signals under load; Matrix construction module: Based on the acquired current signal time series under the load, a matrix with m rows is reorganized, and the principal component of each row is obtained by principal component analysis method to obtain a set of new sequences S with a length of m. Differential operations are performed on the sequence S to different degrees, and the results are superimposed into a matrix M; the matrix M is transposed and then superimposed to obtain the superimposed matrix M e =M+M T ; Difference matrix image building module: The matrix M e Perform visualization processing to obtain a difference matrix image; Arc fault detection module: The differential matrix image is sent to the deep convolution network model integrated with the self-attention mechanism for recognition to obtain the series AC arc fault detection results.
8. A series AC arc fault detection system based on difference matrix and self-attention mechanism according to claim 7, characterized in that: The process of obtaining the time series of the current signal under the load includes the following steps: A single power cycle of 20 ms is used as a calculation unit of the detection model, and the current signal sequence in a single calculation unit is obtained at a sampling rate of 100 kHz.
9. A series AC arc fault detection system based on difference matrix and self-attention mechanism according to claim 8, characterized in that: The invention also includes a normalization module, which performs normalization processing on the flow signal time series before the current signal time series under the load is reorganized.
10. A series AC arc fault detection system based on difference matrix and self-attention mechanism according to any one of claims 7 to 9, characterized in that: The new sequence S with a length of m = s1, s2, ...., s m , and superimpose the operation results into a matrix
Citation Information
Patent Citations
Photovoltaic array series arc fault diagnosis method
CN115498956A
Multi-modal medical image fusion method based on space attention and reversible neural network
CN115620108A
Series arc fault detection method and system
CN115856504A
Time sequence feature extraction method, device, equipment, medium and product
CN116304628A
SDP-CNN-based fault diagnosis method and device for optical fiber current transformer of energy dissipation device
CN117331016A
Cited By
Arc fault detection method
CN122471081A