Detection method for alternating current series arc fault
By introducing improved residual neural networks and multi-task learning in arc fault detection, combining spatial attention mechanisms and task adaptive weights, the problem of difficulty in detecting series arc faults in the existing technology is solved, and the detection effect of high accuracy and low complexity is achieved.
Patent Information
- Application Number
- CN202510288158.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-06-13
AI Technical Summary
The existing arc fault detection methods are difficult to effectively detect series arc faults, and the existing algorithms have poor detection performance, excessive computational complexity, and single functions.
A detection method based on improved residual neural network (SAM-ResNet18) and multi-task learning is designed to improve the detection accuracy and applicability of the model by introducing spatial attention mechanism and task uncertainty adaptive weights.
High accuracy detection of AC series arc faults is achieved, training time is reduced, and model applicability and functional integration are improved.
Smart Images

Figure CN120145154A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of arc fault detection, and particularly to a detection method for AC series arc faults. Background Art
[0002] In recent years, China's economic strength has been steadily improving, and the power industry has also developed vigorously. All kinds of electrical equipment are not only widely used in the industrial field, but also deeply penetrate into thousands of households and become an indispensable part of daily life. However, with the increase of service life, the circuit has been in an overloaded operation state for a long time, and problems such as line aging and insulation layer damage have gradually emerged, which have laid hidden dangers for the generation of fault arcs and may thus trigger serious safety accidents.
[0003] Fault arcs are mainly divided into three types: series, parallel, and ground fault arcs. When a parallel or ground fault arc occurs, there is usually a current greater than 75A passing through the circuit. In response to this situation, existing circuit breakers already have effective isolation and protection capabilities, which can ensure circuit safety to a certain extent. In contrast, series fault arcs have become the main factor causing electrical fires.
[0004] When a series arc fault occurs, the load in the circuit will limit the fault current, resulting in the fault current being similar in magnitude to the normal working current, making it difficult for traditional line protection methods to play a role and unable to detect and prevent such faults in a timely and effective manner. Traditional circuit protection devices are difficult to cope with the hidden series arc faults, and the combination of mature deep learning algorithms in the field of computer vision and fault arc detection has gradually become the main technical route, but the existing algorithms are not yet mature and have disadvantages such as poor detection performance, excessive computational complexity, and single function; therefore, those skilled in the art need a low-voltage AC series fault arc detection method that can reduce the training time required and improve the applicability of the model. Summary of the Invention
[0005] The purpose of the present invention is to solve the above problems and design a detection method for AC series arc faults.
[0006] To achieve the above purpose, the technical solution of the present invention is a detection method for AC series arc faults, and the method includes the following steps:
[0007] Step 1, construct an improved residual neural network (SAM-ResNet18) detection model, introduce a spatial attention mechanism based on the connection method of the residual neural network (ResNet18) to improve the accuracy of the residual neural network model, and obtain the improved residual neural network detection model;
[0008] Step 2: Construct a series arc fault detection model based on multi-task learning and improved residual neural network. Introduce multi-task learning into the improved residual neural network (SAM-ResNet18) detection model to obtain a series arc fault detection model based on multi-task learning and improved residual neural network. The series arc fault detection model based on multi-task learning and improved residual neural network can simultaneously process two related tasks of fault arc detection and fault load type identification to detect AC series arc faults;
[0009] Step 3: Optimize the series arc fault detection model based on multi-task learning and improved residual neural network. Introduce task uncertainty adaptive weights to dynamically balance the learning objectives between tasks and avoid performance degradation caused by task conflicts.
[0010] The connection method of the residual neural network (ResNet18) in Step 1 is as follows:
[0011] H(x) = F(x) + x (1)
[0012] In the formula, H(x) represents the output of the current layer, F(x) represents the transformation of the current layer, and x represents the input passed from the previous layer; by adding the transformation and the input, ResNet can retain the information of the previous layer and pass it to the subsequent layer, thus avoiding excessive loss of gradients.
[0013] The improved residual neural network detection model in Step 1 includes: an input layer, a convolutional layer, SAM-enhanced residual blocks, a pooling layer, a fully connected layer, and an output layer;
[0014] The data input by the input layer is used to extract basic features through the residual module, and then SAM is used to focus on key features, repeating this process to deepen feature learning; then the feature dimension is compressed through global pooling, the features are integrated through the fully connected layer, and finally the features are classified by Softmax and the results are output;
[0015] The improved residual neural network detection model can realize the complete process of "feature extraction → attention optimization → classification decision".
[0016] The series arc fault detection model based on multi-task learning and improved residual neural network in Step 2 includes: an input layer, a convolutional layer, SAM-enhanced residual blocks, and two task branch architectures; among them, each task branch architecture includes a residual block group, a pooling layer, a fully connected layer, and an output layer;
[0017] The data input by the input layer first enters the shared residual block to extract basic features, and then strengthens the key features through the SAM module; subsequently, it is divided into two task branches. The left task branch further extracts the load features through the residual block. After being optimized by SAM, the feature dimension is compressed through global pooling, and then the features are integrated through the fully connected layer. Finally, the Softmax is used for feature classification to output the recognition result of the fault load type; the right branch extracts the arc fault features through the residual block, and after being optimized by SAM, processed by global pooling and the fully connected layer, and finally the Softmax is used for feature classification to output the fault arc detection result;
[0018] The series arc fault detection model based on multi-task learning and improved residual neural network can realize the parallel processing of the two tasks of "fault load type recognition" and "fault arc detection".
[0019] The optimization process of the series arc fault detection model based on multi-task learning and improved residual neural network in step three is as follows:
[0020] Set the fault arc detection as task A and the fault load type recognition as task B;
[0021] The fault arc detection only needs to detect whether it is a normal or a fault arc, so task A is a binary classification problem. In the actual application scenario, the probability of generating a normal arc is more than that of generating a fault arc. Therefore, this application improves on the basis of the cross-entropy loss function and designs a weighted cross-entropy loss function (Weighted Cross-Entropy Loss) to alleviate the problem of class imbalance. Its mathematical expression is as follows:
[0022]
[0023] where, y i ∈{0, 1} is the sample label, which is 1 for a fault arc and 0 for a normal arc. p(y i |x i ) is the model prediction probability, is the class weight coefficient, which is used to balance the contributions of positive and negative samples, N 1 is the sample of the fault arc;
[0024] The fault load type recognition is a multi-classification problem, and the label-smoothing cross-entropy (Label-Smoothing Cross-Entropy) is adopted to enhance the robustness of the model to noisy labels:
[0025]
[0026] where, C is the number of load categories, and the true label distribution q(c|x i ) is processed by label smoothing:
[0027]
[0028] Wherein, t is the smoothing coefficient (usually taken as 0.1), which is used to alleviate the overfitting of the model to the training data;
[0029] Assuming that the loss noise of each task follows a Gaussian distribution, by maximizing the log-likelihood probability, the task weights can be associated with the noise variance; the multi-task joint loss function is defined as:
[0030]
[0031] Where and are the noise variances of tasks A and B respectively. The noise variance σ 2 reflects the learning difficulty of the task or the data noise level. The greater the noise, that is, the higher σ 2 is, the lower the corresponding task loss weight 1 / 2σ 2 is, reducing the interference of high noise to the model; the regularization term logσ A σ B prevents the weight from being overly biased towards a certain task, ensuring the stability of weight allocation; during the training process, σ A and σ B are automatically optimized through backpropagation; in the initial stage, the model assigns higher weights to the two tasks. As the training progresses, the weights of the tasks with greater noise gradually decrease, achieving dynamic balance.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] (1) The present invention has multi-task collaborative efficiency: by sharing the residual feature extraction module and the dual-task support structure, it synchronously realizes the detection of faulty arcs and the identification of types of faulty loads, breaking through the limitations of traditional single-task processing, improving the functional integration degree, reducing repeated calculations, and reducing resource consumption;
[0034] (2) The present invention has the advantage of deep feature learning: the residual block structure uses the skip connection mechanism to alleviate the problem of gradient disappearance in the training of deep networks, ensuring that the network can still effectively learn fault features when the network depth increases, and overcoming the defect that the performance of traditional neural networks degrades as the number of layers deepens;
[0035] (3) The present invention utilizes attention-driven precision: by embedding the SAM module, it focuses on key fault features through the spatial attention mechanism and suppresses interference information. Compared with the existing methods without introducing the attention mechanism, it significantly improves the accuracy of arc detection and the precision of load type identification, and enhances the discriminative ability of the model for complex fault scenarios. Description of the Drawings
[0036] Figure 1It is the flowchart of a detection method for AC series arc faults according to the present invention;
[0037] Figure 2 It is the connection diagram of the residual neural network according to the present invention;
[0038] Figure 3 It is the diagram of the spatial attention mechanism according to the present invention;
[0039] Figure 4 It is the structural block diagram of a series arc fault detection model based on multi-task learning and improved residual neural network according to the present invention;
[0040] Figure 5 It is the accuracy curve diagram of the original training set and validation set according to the present invention;
[0041] Figure 6 It is the accuracy curve diagram of the improved training set and validation set according to the present invention;
[0042] Figure 7 It is the label table corresponding to the load working types according to the present invention;
[0043] Figure 8 It is the detection data comparison table of ResNet18 and SAM-ResNet18 according to the present invention;
[0044] Figure 9 It is the detection result comparison table before and after the improvement of the residual neural network according to the present invention;
[0045] Figure 10 It is the experimental result comparison table before and after the optimization of a detection method for AC series arc faults according to the present invention. Detailed implementation manners
[0046] The present invention will be specifically described below in conjunction with the accompanying drawings, as Figures 1-10 shown;
[0047] The creative point of the present invention lies in constructing an improved residual neural network detection model by introducing a spatial attention mechanism based on the residual neural network; then introducing multi-task learning into the improved residual neural network detection model to obtain a series arc fault detection model based on multi-task learning and improved residual neural network, and optimizing the series arc fault detection model based on multi-task learning and improved residual neural network by introducing the task uncertainty adaptive weight to ensure the accuracy and effectiveness of the AC series arc fault detection result.
[0048] Among them, the Residual Network 18 (ResNet18) is a deep neural network model and a very influential neural network architecture in the field of deep learning. The main feature of this network lies in the use of residual blocks to construct the network.
[0049] The advantage of this design is that even if some layers do not perform meaningful transformations, they can still pass on the information from the previous layers without causing excessive loss of gradients. This connection method can be expressed by Equation 1:
[0050] H(x) = F(x) + x (1)
[0051] Among them, H(x) represents the output of the current layer, F(x) represents the transformation of the current layer, and x represents the input passed from the previous layer. By adding the transformation and the input, ResNet18 can retain the information from the previous layer and pass it on to the subsequent layers, thus avoiding excessive loss of gradients.
[0052] This design of skip connections enables ResNet18 to have a deeper network structure and can obtain better gradient flow during training. In this way, ResNet18 can learn complex feature representations more effectively, thereby improving the performance of the model.
[0053] The spatial attention mechanism is a type of attention mechanism in deep learning and is widely used in convolutional neural networks. Its core lies in enabling the network to automatically learn the important spatial regions in the input feature map. By performing pooling operations on the channels to extract spatial information, and then using convolutional layers and activation functions to calculate the attention weights for each spatial position, multiplying the weights with the original feature map to highlight the key regions and suppress the secondary regions. When implementing, it is necessary to define the spatial attention module class and the neural network class and construct the corresponding network layers. This mechanism can not only improve the performance of the residual neural network in tasks such as object detection and image segmentation, focus on key information, but also enhance the generalization ability of the model, reduce overfitting, and better capture spatial features and patterns.
[0054] The spatial information in the image is processed by the spatial attention mechanism. The spatial attention mechanism learns pixel-level attention weights, assigns higher weights to the pixels that have a key impact on the classification decision, and reduces the attention to irrelevant pixels. This enables the network to more accurately locate and utilize the image regions closely related to the classification task.
[0055] Under the combined action of this mechanism, the performance of the improved residual neural network detection model is greatly improved, and the improved residual neural network detection model focuses on key features, thus having better classification ability and generalization ability.
[0056] Based on this, ResNet18 was improved and the SAM-ResNet18 detection model was designed.
[0057] In the actual operation of the electrical system, the accurate detection of fault arcs is crucial, which is directly related to electrical safety. In industrial environments with high data labeling costs and complex working conditions, it is difficult for existing traditional single-task detection models to balance the requirements of detection accuracy and the efficiency of multi-dimensional task collaborative analysis. Therefore, this application proposes to introduce multi-task learning (MTL) into the field of fault arc detection, aiming to break through the limitations of traditional models through shared representation learning and knowledge transfer mechanisms between tasks. To fully explore and utilize the correlation between these two tasks and expand the application scenarios of the fault arc detection model, multi-task learning is introduced into the SAM-ResNet18 detection model. Through multi-task learning, the SAM-ResNet18 detection model can simultaneously process these two related tasks, achieve feature sharing, and is expected to better handle the complex problems brought by load diversity.
[0058] When designing the series arc fault detection model based on multi-task learning and improved residual neural network in this application, the parameters of some hidden layers are shared in a hard parameter sharing manner, while the remaining hidden layers and task output layers are retained. As Figure 4 shown, the two branches in the figure respectively complete the fault arc detection task and the fault load type identification task.
[0059] In the multi-task learning framework, the definition of the loss function directly affects the optimization direction and final performance of the model. Traditional multi-task losses are usually composed of the weighted sum of the losses of each sub-task, but static weight allocation is difficult to adapt to the learning dynamics of different tasks. For the two tasks of fault arc detection and fault load type identification in this application, their loss functions are designed respectively, and task uncertainty adaptive weights are introduced to dynamically balance the learning objectives between tasks and avoid performance degradation caused by task conflicts; the process is as follows:
[0060] Set the fault arc detection as task A and the fault load type identification as task B.
[0061] Fault arc detection only needs to detect whether it is a normal or fault arc, so task A is a binary classification problem. In actual application scenarios, the probability of generating a normal arc is more than that of generating a fault arc. Therefore, this application improves on the basis of the cross-entropy loss function and designs a weighted cross-entropy loss function to alleviate the class imbalance problem; its mathematical expression is as follows:
[0062]
[0063] Among them, yi ∈ {0, 1} is the sample label, which is 1 for faulty arcs and 0 for normal arcs. p(y i |x i ) is the model prediction probability, is the class weight coefficient, used to balance the contributions of positive and negative samples, N 1 is the sample of faulty arcs.
[0064] The identification of faulty load types is a multi-classification problem. The Label-Smoothing Cross-Entropy is adopted to enhance the robustness of the model to noisy labels:
[0065]
[0066] where C is the number of load classes, and the true label distribution q(c|x i ) is processed by label smoothing:
[0067]
[0068] t is the smoothing coefficient (usually taken as 0.1), used to alleviate the overfitting of the model to the training data.
[0069] Traditional multi-task loss functions usually use fixed weights for weighted summation:
[0070] L = λ A L A + λ B L B
[0071] However, the fixed weights λ A , λ B are difficult to adapt to the dynamic learning requirements of tasks. For example, the noise in task A's faulty arc detection may vary with the load type, and the fixed weights will cause the model to bias towards the task with lower noise, suppressing the learning of the other task. Therefore, this application proposes an adaptive weight design based on uncertainty.
[0072] Assuming that the loss noise of each task follows a Gaussian distribution, by maximizing the log-likelihood probability, the task weights can be associated with the noise variances. Specifically, the multi-task joint loss function is defined as:
[0073]
[0074] where, and are the noise variances of tasks A and B respectively. The noise variance σ 2 reflects the learning difficulty or data noise level of the task. The greater the noise, i.e., the higher σ 2 , the corresponding task loss weight is 1 / 2σ 2The lower it is, the more the interference of high noise to the model is reduced. The regularization term logσ A σ B Prevent the weights from being overly biased towards a certain task and ensure the stability of weight distribution. During training, σ A and σ B Are automatically optimized through backpropagation. In the initial stage, the model assigns higher weights to the two tasks. As training progresses, the weights of the noisier task gradually decrease to achieve dynamic balance.
[0075] Example 1
[0076] After experiments on the series arc fault experimental platform, a large amount of experimental data was obtained. The one-dimensional time-domain signals of each load were distinguished, and the normal waveforms were separated from the fault waveforms. There are eight different loads, and each load has two states: normal and faulty. Therefore, the final dataset can be divided into 16 categories. The selected sampling frequency is 20 kHz, that is, 400 sampling points are one cycle. Each category of data has 400,000 sampling points. One cycle is selected as one sample. Therefore, each category has 1,000 samples, and the total number of samples in the dataset is 16,000. The entire dataset is randomly divided into three sets: the training set, the validation set, and the test set, and the ratio used is 8:1:1. And each category of data is labeled, as Figure 7 shown.
[0077] For classification, the following results will occur, that is, ① the positive class is predicted as the positive class (True Positive, TP); ② the negative class is predicted as the negative class (True Negative, TN); ③ the positive class is often predicted as the negative class (False Negative, FN); ④ the negative class is predicted as the positive class (False Positive, FP). This application uses the following four criteria as evaluation indicators. The formula for representing accuracy is as shown in Equation 6, the formula for representing precision (P) is as shown in Equation 7, the formula for representing recall (R) is as shown in Equation 8, and the formula for representing the F 1 value is as shown in Equation 9:
[0078]
[0079]
[0080] Formula (6) The proportion of samples correctly classified by the model in the total samples. It reflects the overall prediction ability of the model but is not sensitive to scenarios with unbalanced positive and negative samples; among them, TP is the positive class predicted as the positive class, TN is the negative class predicted as the negative class, FP is the positive class predicted as the negative class, and FN is the negative class predicted as the positive class.
[0081] Formula (7) Among the samples predicted as the positive class by the model, the proportion that actually belongs to the positive class. It focuses on the accuracy of the model's prediction of the positive class and reduces the situation of misjudging as the positive class.
[0082] The proportion of actual positive samples correctly predicted as positive by the model in Formula (8). It measures the ability of the model to capture positive samples and avoids missing important positive classes.
[0083] Formula (9) is a comprehensive index that balances Precision and Recall, especially suitable for scenarios where the distribution of positive and negative samples is uneven or both need to be considered; where P is Precision and R is Recall.
[0084] To verify the optimization effect of SAM on the model, first compare the recognition effects of the model without SAM and the model after adding SAM. The input of the model is a multi-feature fusion image. According to the dataset divided during preprocessing, set the batch-size to 100. When the number of training times is too many, some noises in the data will also be memorized, showing an overfitting phenomenon, making the model stick to some small-scale features, which has an adverse effect on the generalization of the final result. And when the number of training times is too few, the best recognition effect cannot be achieved. Therefore, the number of training rounds is set to 500 rounds. The results without adding the attention mechanism are as Figure 5 :
[0085] From Figure 5 it can be seen that the recognition accuracy of the model on the validation set fluctuates greatly, and the accuracy of the validation set is less than that of the training set, indicating that the model is overfitting. The loss value of the validation set is also greater than that of the training set. In the case of adding SAM to improve the ResNet18 model, the results are as Figure 6 shown:
[0086] After 500 rounds of training, from Figure 6 it can be seen that the accuracy curve of the validation set fits well with the accuracy curve and loss value curve of the training set as the number of training rounds increases after the initial fluctuation, without overfitting or underfitting, and the recognition accuracy is very high.
[0087] Figure 8 The detection results comparison between ResNet18 and SAM-ResNet18 is given. In terms of training speed, the training speed of the improved model is also much better than that of the initial model. In the case of the SAM-ResNet18 detection model with a batch-size of 100, the time required for the model to train each round is greatly reduced, which means that the complexity of the detection model decreases and the amount of calculation is also much smaller, which is conducive to the large-scale application of the fault arc detection device.
[0088] Abbreviate the fault arc detection task as Task A and the fault load type recognition task as Task B, and conduct the following two groups of comparative experiments:
[0089] (1) Make the weight of the loss function of A and B equal, both being 0.5;
[0090] (2) Use an adaptive weight design based on uncertainty to automatically learn the weights of the loss functions for A and B;
[0091] The experimental results of the above four experiments on the test set are as Figure 10 shown. Combining Figure 8 and Figure 10 it can be seen that for task A, the detection effects of the multi-task learning detection model in both fixed weight and adaptive weight aspects are greater than Figure 8 the single-task learning of ResNet18 in Figure 10 When comparing different weight settings in
[0092] In summary, the SAM-ResNet18 adaptive weight multi-task joint learning detection model proposed in this application performs excellently in the detection of low-voltage AC series fault arcs, laying a foundation for the wide application of future fault arc devices.
[0093] The above technical solutions only reflect the preferred technical solutions of the technical solutions of the present invention. Some changes that those skilled in the art may make to some parts thereof all reflect the principles of the present invention and fall within the protection scope of the present invention.
Claims
1. A method for detecting an AC series arc fault, characterized in that: The method comprises the following steps: Step 1: construct an improved residual neural network detection model, introduce a spatial attention mechanism based on the connection mode of the residual neural network to improve the accuracy of the residual neural network model and obtain an improved residual neural network detection model; Step 2: construct a series arc fault detection model based on multi-task learning and improved residual neural network, introduce multi-task learning into the improved residual neural network detection model and obtain the series arc fault detection model based on multi-task learning and improved residual neural network, and then detect AC series arc faults based on the series arc fault detection model based on multi-task learning and improved residual neural network; Step three, optimize the series arc fault detection model based on multi-task learning and improved residual neural network, and introduce task uncertainty adaptive weights to dynamically balance the learning objectives between tasks to avoid performance degradation due to task conflicts.
2. The method for detecting an AC series arc fault according to claim 1, characterized in that: The connection mode of the residual neural network (ResNet18) in step 1 is: H(x)=F(x)+x (1) In the formula, H(x) represents the output of the current layer, F(x) represents the transformation of the current layer, and x represents the input passed from the previous layer; by adding the transformation and the input, ResNet can retain the information of the previous layer and pass it to the subsequent layer, thereby avoiding excessive loss of gradients.
3. The method for detecting an AC series arc fault according to claim 2, characterized in that: The improved residual neural network detection model in step 1 includes: an input layer, a convolutional layer, a SAM enhanced residual block, a pooling layer, a fully connected layer, and an output layer.
4. The method for detecting an AC series arc fault according to claim 1, characterized in that: The series arc fault detection model based on multi-task learning and improved residual neural network in step 2 includes: an input layer, a convolutional layer, a SAM-enhanced residual block and two task branch architectures; wherein each task branch architecture includes a residual block group, a pooling layer, a fully connected layer and an output layer.
5. The method for detecting an AC series arc fault according to claim 1, characterized in that: The optimization process of the series arc fault detection model based on multi-task learning and improved residual neural network in step 3 is: Set fault arc detection as task A and fault load type identification as task B; Task A is a binary classification problem. We construct a weighted cross entropy loss function, whose mathematical expression is as follows: Among them, y i ∈{0, 1} is the sample label, which is 1 for fault arc and 0 for normal arc. i |x i ) is the model prediction probability, is the category weight coefficient, which is used to balance the contribution of positive and negative samples, and N1 is the sample of fault arc; Fault load type identification is a multi-classification problem. A label-smoothing cross entropy loss function is constructed, and its mathematical expression is: Where C is the number of load categories, q(c|x i ) is the true label distribution after label smoothing, N is the total number of samples, p(c|x i ) is the true label distribution: In the formula, t is the smoothing coefficient (usually 0.1), which is used to alleviate the overfitting of the model to the training data; Assuming that the loss noise of each task follows a Gaussian distribution, the task weight is associated with the noise variance by maximizing the log-likelihood probability, and the multi-task joint loss function is: in, and are the noise variances of tasks A and B respectively.