Method, device and equipment for simultaneously identifying fault arc and load and storage medium
Through the pre-trained fault identification model and GradNorm algorithm optimization, the series fault arc and load type in low-voltage AC power circuit are identified, which solves the problem of low detection accuracy in the prior art and achieves more efficient fire risk management.
Patent Information
- Application Number
- CN202411190551.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-01-03
AI Technical Summary
The prior art has low accuracy when detecting series fault arcs, making it difficult to identify fault arcs and their load types simultaneously, increasing fire risk.
The pre-trained fault identification model is adopted to obtain the current signal of the low-voltage AC power circuit, and the data processing is performed using sliding windows and convolutional condition batch standardization layer. Combined with the GradNorm algorithm to optimize the loss function to identify whether there is an AC series fault arc and its load. type.
Improves the accuracy of simultaneous identification of fault arcs and loads, reduces fire risks, and improves the speed and accuracy of detection.
Smart Images

Figure CN119249218A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of arc fault detection, and in particular to a method, device, equipment and storage medium for simultaneously identifying an arc fault and a load. Background Art
[0002] With the continuous development of society, the number of power facilities in industrial and residential areas has continued to increase, making the electrical equipment in buildings increasingly large and the wiring layout of the power supply and distribution network increasingly complex. This has made life more and more convenient while also increasing the potential safety hazards of building electrical equipment and may even cause fires.
[0003] Fault arcs are one of the important factors that cause electrical fires. Arcs are free gases that are often accompanied by high temperatures and high conductivity, and molten metal splashes when they occur. Fires are very likely to occur when arcs occur. To ensure electrical safety, common practices include installing fuses, overcurrent switches, and intelligent circuit breakers.
[0004] However, electrical fires caused by series fault arcs are different from conventional electrical fires caused by abnormally high current values. The current in the line is small, lower than the set value of the current protector widely installed in the power system, especially in the low-voltage power distribution field. It is not easy to detect and is more prone to fire. Although there are currently detections for series fault arcs, the detection accuracy is poor. How to accurately identify series fault arcs has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present invention provide a method, device, equipment and storage medium for simultaneously identifying a fault arc and a load, so as to solve the problem of low detection accuracy of current detection methods.
[0006] In a first aspect, an embodiment of the present invention provides a method for simultaneously identifying a fault arc and a load, comprising:
[0007] Acquiring a current signal of a low-voltage AC power circuit to be identified;
[0008] Input the current signal into the pre-trained fault identification model to determine whether the current signal to be identified is an AC series fault arc and its load type;
[0009] The fault identification model includes an input layer, a shared layer and an output layer connected in sequence, wherein the input layer performs window processing on the input data based on a sliding window, and the shared layer and the output layer each include at least one convolutional conditional batch normalization layer, which is a convolutional layer formed by fusing a convolutional layer and a conditional batch normalization layer.
[0010] In one possible implementation, the shared layer includes a first convolutional conditional batch normalization layer, a first maximum pooling layer, a second convolutional conditional batch normalization layer, a second maximum pooling layer, a third convolutional conditional batch normalization layer, and a fourth convolutional conditional batch normalization layer, which are connected sequentially.
[0011] In a possible implementation, the output layer includes a fault arc identification convolutional model and a fault load identification convolutional model;
[0012] The fault arc recognition convolutional model includes a fifth convolutional conditional batch normalization layer, a third maximum pooling layer, and a first fully connected layer connected in sequence. The loss function of the fault arc recognition convolutional model is loss1.
[0013] The fault load recognition convolutional model includes a sixth convolutional conditional batch normalization layer, a fourth maximum pooling layer, and a second fully connected layer connected in sequence. The loss function of the fault load recognition convolutional model is loss2.
[0014] The loss function of the output layer is: loss = w1loss1 + w2loss2
[0015] Among them, w1 is the weighted coefficient of the loss function loss1, and w2 is the weighted coefficient of the loss function loss2.
[0016] In a possible implementation, the weighting coefficient in the output layer loss function in the fault identification model is determined by optimizing the loss function of each model based on the training sample and the optimized GradNorm algorithm; wherein each model is a fault arc identification convolution model or a fault load identification convolution model;
[0017] The loss function of each model in the optimized GradNorm algorithm i for:
[0018]
[0019] Among them, l b (t) is the loss function value of the input data of the bth batch in the training sample in model i, j is the current batch number, r is the size of the sliding window, j and b are both positive integers, i is 1 or 2, the training samples are divided into multiple batches to train the fault recognition model, and the bth batch is the training sample of any batch.
[0020] In one possible implementation, the output of the convolutional conditional batch normalization layer is:
[0021]
[0022] Among them, γ and β are the scaling parameters and translation parameters of the conditional batch normalization layer, μ is the mean of the input data of the convolutional layer, and σ2 is the variance of the convolutional layer input data, ε = 10 -8 , w is the weight of the convolutional layer, and b is the bias of the convolutional layer.
[0023] In a possible implementation, a set of corresponding parameters is set for each category of features in the conditional batch normalization layer; wherein the corresponding parameters include scaling parameters and translation parameters of the conditional batch normalization layer.
[0024] In a possible implementation, the current signal is input into a pre-trained fault identification model to determine whether the current signal to be identified is an AC series fault arc and its load type, including:
[0025] Input the current signal into the pre-trained fault recognition model and output the label type;
[0026] Based on the output tag type, it is determined whether the current signal to be identified is an AC series fault arc and its load type.
[0027] In a second aspect, an embodiment of the present invention provides a device for simultaneously identifying a fault arc and a load, comprising:
[0028] An acquisition module, used to acquire a current signal of a low-voltage AC power circuit to be identified;
[0029] An identification module is used to input the current signal into a pre-trained fault identification model to determine whether the current signal to be identified is an AC series fault arc and its load type;
[0030] The fault identification model includes an input layer, a shared layer and an output layer connected in sequence, wherein the input layer performs window processing on the input data based on a sliding window, and the shared layer and the output layer each include at least one convolutional conditional batch normalization layer, which is a convolutional layer formed by fusing a convolutional layer and a conditional batch normalization layer.
[0031] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the processor implements the steps of the method described in the first aspect or any possible implementation manner of the first aspect.
[0032] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect or any possible implementation method of the first aspect are implemented.
[0033] The embodiment of the present invention provides a method, device, equipment and storage medium for simultaneously identifying a fault arc and a load. Since a fault arc can cause a change in the current in a circuit, first, a current signal is directly obtained from a low-voltage AC power circuit to be identified, and then the obtained current signal is input into a pre-trained fault identification model to determine whether the current signal to be identified is an AC series fault arc and its load type. The fault identification model includes an input layer, a shared layer and an output layer connected in sequence, wherein, in order to improve the accuracy of identification, the input layer uses a sliding window method to perform window processing on the input data, so that the data is automatically divided into multiple batches of data. Secondly, the shared layer and the output layer each include at least one convolution conditional batch normalization layer, which is a new convolution layer formed by fusing a convolution layer and a conditional batch normalization layer, thereby eliminating the intermediate variable storage convolution layer output, and removing the memory read and write time required to transfer the intermediate variable to the batch normalization layer, thereby accelerating the processing time. In addition, the convolution conditional batch normalization layer can also improve the accuracy of the fault identification model processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0035] Figure 1 is a flow chart of the method for simultaneously identifying a fault arc and a load provided by an embodiment of the present invention;
[0036] Figure 2 is a block diagram of a fault identification model provided by an embodiment of the present invention;
[0037] Figure 3 is a schematic diagram of a sliding window provided by an embodiment of the present invention;
[0038] Figure 4 is a schematic diagram of the structure of a shared layer provided by an embodiment of the present invention;
[0039] Figure 5 is a block diagram of another fault identification model provided by an embodiment of the present invention;
[0040] Figure 6 It is a schematic diagram of the structure of a device for simultaneously identifying a fault arc and a load provided by an embodiment of the present invention;
[0041] Figure 7 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0043] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0044] At present, most of them only detect series arc faults or only detect the type of load that generates arc faults. However, in actual applications, it is necessary to detect series arc faults and identify the type of load that generates the arc faults at the same time in order to quickly and accurately eliminate the risk of fire. For example, if the arc fault detection device installed in the air conditioner can identify the device that generates the arc fault in the air conditioner when the arc fault occurs, it can provide reference suggestions for subsequent maintenance and design improvements.
[0045] In order to solve the problems in the prior art, the embodiments of the present invention provide a method, device, equipment and storage medium for simultaneously identifying a fault arc and a load. The method for simultaneously identifying a fault arc and a load provided by the embodiments of the present invention is first introduced below.
[0046] See also Figure 1 , which shows a flowchart of the method for simultaneously identifying a fault arc and a load provided by an embodiment of the present invention, which is described in detail as follows:
[0047] S110, obtaining a current signal of the low-voltage AC power circuit to be identified.
[0048] When a fault arc occurs in a series low-voltage AC power circuit, the current in the circuit will change. Therefore, it is possible to determine whether a fault arc has occurred in the circuit through the current signal.
[0049] For example, the current signal of the low-voltage AC power circuit to be identified can be collected through the chip AD7606.
[0050] S120, inputting the current signal into a pre-trained fault identification model to determine whether the current signal to be identified is an AC series fault arc and its load type.
[0051] In some embodiments, the current signal may first be input into a pre-trained fault identification model to output a label type.
[0052] Then, based on the output tag type, it is determined whether the current signal to be identified is an AC series fault arc and its load type.
[0053] In order to facilitate understanding of the present invention, before introducing the method for simultaneously identifying a fault arc and a load, it is necessary to first introduce a fault identification model and a training process of the model.
[0054] like Figure 2 As shown, the fault identification model includes an input layer, a shared layer and an output layer connected in sequence, where Figure 3 As shown, the input layer processes the input data in windows based on the sliding window. The input data includes a lot, and the input layer processes the data in the sliding window each time through the sliding window.
[0055] The shared layer and the output layer each include at least one convolutional conditional batch normalization layer, which is a convolutional layer formed by fusing a convolutional layer and a conditional batch normalization layer. The shared layer is used to extract a shallow shared feature map of the input data, and the output layer is used to identify whether an AC series fault arc occurs and to identify the type of load.
[0056] In some embodiments, Figure 4 As shown, the shared layer includes a first convolution conditional batch normalization layer, a first maximum pooling layer, a second convolution conditional batch normalization layer, a second maximum pooling layer, a third convolution conditional batch normalization layer, and a fourth convolution conditional batch normalization layer connected sequentially.
[0057] In this embodiment, the convolution kernel size of the first convolution conditional batch normalization layer is 10*1, the number is 96, the step size is 4, and the Relu activation function is used. The pooling window size of the first maximum pooling layer is 2*1, and the step size is 2. The convolution kernel size of the second convolution conditional batch normalization layer is 3*1, the number is 256, the step size is 2, and the Relu activation function is used. The pooling window size of the second maximum pooling layer is 3*1, and the step size is 2. The convolution kernel size of the third convolution conditional batch normalization layer is 3*1, the number is 384, and the Relu activation function is used. The convolution kernel size of the fourth convolution conditional batch normalization layer is 3*1, the number is 384, and the Relu activation function is used.
[0058] In some embodiments, Figure 5 As shown, the output layer includes a fault arc identification convolutional model and a fault load identification convolutional model.
[0059] Among them, the fault arc recognition convolution model includes the fifth convolution conditional batch normalization layer, the third maximum pooling layer and the first fully connected layer connected in sequence. The convolution kernel size of the fifth convolution conditional batch normalization layer is 3*1, the number is 256, and the Relu activation function is used. The pooling window size of the third maximum pooling layer is 3*1, and the step size is 2. The first fully connected layer is used to synthesize the extracted features, using the Softmax activation function, and the output is a 2*1 matrix vector representing the probability of a fault arc and a non-fault arc, judging whether it is a fault arc or a non-fault arc.
[0060] The fault load identification convolution model includes a sixth convolution conditional batch normalization layer, a fourth maximum pooling layer, and a second fully connected layer connected in sequence. The convolution kernel size of the sixth convolution conditional batch normalization layer is 3*1, the number is 256, and the Relu activation function is used. The pooling window size of the fourth maximum pooling layer is 3*1, and the step size is 2. The second fully connected layer uses the Softmax activation function, and the output is an N*1 matrix vector representing the probability of various types of fault loads.
[0061] In this embodiment, the loss function loss1 of the fault arc identification convolution model is represented by a cross entropy function, and the specific calculation formula is:
[0062] loss1=-y1log2f(u1)-y2log2f(u2);
[0063] Where y1 and y2 are 0 or 1, and the two together indicate whether the training sample data is a fault arc sample; when the input training sample data is a sample data with a fault arc, y1 = 0, y2 = 1; when the input training sample data is a sample data without a fault arc, y1 = 1, y2 = 0; f(u i ) is the Softmax activation function of the fully connected layer, u i is the i-th output of the first fully connected layer, and the calculation formula of the Softmax activation function is:
[0064]
[0065] In the formula, u i is the i-th output of the first fully connected layer, and N is the number of recognition results of the first fully connected layer.
[0066] The loss function of the fault load identification convolutional model is loss2, which is also expressed by the cross entropy function. The specific calculation formula is:
[0067]
[0068] Where N is the total number of loads set in the low-voltage AC power circuit to be identified. N can be set according to the total number of loads. For example, there are 5 types of loads in the low-voltage AC power circuit to be identified, namely, hair dryer, induction cooker, electric fan, electric hot pot and small sun. Then the cross entropy function of loss2 is:
[0069]
[0070] In the formula, v1, v2, v3, v4, and v5 are 0-1, which together represent the load type of the training sample data. When the input training sample data is the sample data of a hair dryer, v1=1, v i =0(i≠1); when the input training sample data is the sample data of the induction cooker, v2=1, v i =0(i≠2); when the input training sample data is the sample data of the electric fan, v3=1, v i =0(i≠3); when the input training sample data is the sample data of the electric hot pot, v4=1, v i =0(i≠4); when the input training sample data is the sample data of Little Sun, v5=1, v i =0(i≠5).
[0071] f(u i ) is the Softmax activation function of the fully connected layer, u i is the i-th output of the fully connected layer, and the calculation formula of the Softmax activation function is:
[0072]
[0073] In the formula, z i is the i-th output of the fully connected layer, and M is the number of recognition results of the fully connected layer.
[0074] Therefore, the loss function Loss of the output layer is:
[0075] Loss = w1loss1 + w2loss2
[0076] Among them, w1 is the weighted coefficient of the loss function loss1, and w2 is the weighted coefficient of the loss function loss2.
[0077] In some embodiments, the convolutional conditional batch normalization layer fuses the convolutional layer and the conditional batch normalization layer into a new convolutional layer. After the fusion, the convolutional layer and the conditional batch normalization layer become one layer, eliminating the use of intermediate variables to store the output of the convolutional layer and the memory reading and writing process required to pass the output to the batch normalization layer, thereby accelerating iterative training.
[0078] The specific steps to achieve fusion are:
[0079] First, calculate the output of the convolutional layer: y = w x + b;
[0080] Among them, w is the weight of the convolutional layer and b is the bias.
[0081] Next, calculate the output of the conditional batch normalization layer:
[0082]
[0083] Where γ and β are the scaling parameters and translation parameters of the batch normalization layer, μ is the mean of the input data of the convolutional layer, and σ 2 is the variance of the convolutional layer input data, ε = 10 -8 Prevent the denominator from being 0.
[0084] The output of the convolutional layer is then fed into a conditional batch normalization layer:
[0085]
[0086] Right now
[0087] The resulting convolutional conditional batch normalization layer updates the convolutional computation with the new weights and biases.
[0088] In addition, the conditional batch normalization layer is similar to the traditional batch normalization layer in that both layers can perform normalization on the input data of each layer, that is, standardize the mean and variance of each feature. However, the traditional batch normalization layer only uses one γ and one β in the entire batch, which will lead to problems such as statistical instability and limited model generalization ability. The conditional batch normalization layer has one γ for each category of features. i and a β i , which will better capture the diversity of input data and have stronger adaptability.
[0089] After the fault identification model is built, it is necessary to train the model to determine the optimal settings for each parameter in the model. The specific steps are as follows:
[0090] S210: It is necessary to obtain training samples.
[0091] Collect data when there is no fault arc. Connect the fault arc generator in series to the circuit, set the fault arc generator to normal working state, that is, when there is no fault arc in the circuit, collect the current signal flowing through the circuit when different loads are connected.
[0092] Collect data when there is a fault arc. Connect the fault arc generator in series to the circuit and set the fault arc generator to a series fault arc state, that is, when there is a fault arc in the circuit, collect the current signal flowing through the circuit when different loads are connected.
[0093] Next, the collected circuit current signals are marked for each current signal sample according to whether a series fault arc occurs and the load type, a current signal database is established, and the database is divided into a training set and a test set.
[0094] For ease of understanding, a specific embodiment is given:
[0095] The acquisition circuit is as follows Figure 6 As shown, the fault arc generator is connected in series to the circuit, and the fault arc generator is set to a normal working state, that is, when there is no fault arc in the circuit, the current signal flowing through the circuit when different loads are connected is collected, and the sampling frequency is set to 20.48kHz, and each collection is 0.2 seconds (4096 data points). A hair dryer is used as the first type of fault load, an induction cooker is used as the second type of fault load, an electric fan is used as the third type of fault load, an electric hot pot is used as the fourth type of fault load, and a small sun is used as the fifth type of fault load. The hair dryer, induction cooker, electric fan, electric hot pot, and small sun load are collected 100 times respectively.
[0096] Connect the fault arc generator in series to the circuit, and set the fault arc generator to the state of series fault arc occurrence, that is, when there is a fault arc in the circuit, collect the current signal flowing through the circuit when different loads are connected, set the sampling frequency to 20kHz, and collect 0.2 seconds (4000 data points) each time. Use a hair dryer as the first type of fault load, an induction cooker as the second type of fault load, an electric fan as the third type of fault load, an electric hot pot as the fourth type of fault load, and a small sun as the fifth type of fault load. Collect 100 times for the hair dryer, induction cooker, electric fan, electric hot pot, and small sun loads respectively.
[0097] Among them, GB14287.4-2014 stipulates that when the number of half-cycles of the fault arc generated in the detection line within 1s is greater than or equal to 14, the detector should respond within 30s. The response time stipulated in GB / T31143-2014 is also in half-cycles. Therefore, this paper selects the half-cycle current signal as an arc data sample, so one sample contains 200 current sampling values, and 20 samples can be obtained in one acquisition. In specific operations, the data extraction method of the time window is adopted. The time window is generally divided into two types: sliding window and rolling window, and the window width and step length are both 200. When the fault arc generator is in the fault working state, 10,000 samples are obtained from the hair dryer, induction cooker, electric fan, electric hot pot, and small sun load respectively. When the fault arc generator is in the normal working state, 10,000 samples are obtained from the hair dryer, induction cooker, electric fan, electric hot pot, and small sun load respectively.
[0098] Finally, the collected circuit current signals are marked according to whether a series fault arc occurs and the load type. The current data without a series fault arc is marked as 0, and the current data with a series fault arc is marked as 1. The hair dryer load is marked as 0, the induction cooker load is marked as 1, the electric fan load is marked as 2, the electric hot pot load is marked as 3, and the small sun load is marked as 4. A current signal database is established and divided into training and test sets in a ratio of 7:3.
[0099] S220: training the constructed fault identification model.
[0100] Although there are related models for simultaneous identification of fault arcs and loads, the traditional Adam method is used to update the loss coefficient. If the initial learning rate is not properly adjusted or the weights are improperly initialized, this method may cause the model to stop training prematurely or oscillate, affecting the final result. In addition, this method relies too much on the second-order moment estimation of the historical gradient, resulting in poor network performance.
[0101] In order to improve the recognition accuracy of the fault recognition model, the present invention adopts the optimized GradNorm algorithm to minimize the loss, just like updating the neural network weights, by calculating w i The updated gradient can be used to dynamically update w using the gradient update formula i .
[0102] Among them, w i The update formula is as follows:
[0103] w i (t+1)=w i (t)+λβ(t);
[0104] Using GradLoss, we can use GradLoss to i Derivatively obtain the β(t) required in the gradient update formula above.
[0105] The training samples include a lot of data. In order to better train the model, the training samples are divided into multiple batches, each of which includes multiple training samples. The number of training samples in each batch is the window size of the sliding window.
[0106] The implementation steps for each batch of batch based on optimized Gradnorm are:
[0107] 1) Initialize w i (0) = 1;
[0108] 2) Initialize the network weights, where the weights are the weights of the last shared layer of the two models;
[0109] 3) Calculate the total loss of forward propagation Loss = ∑ i w i Loss i ; Where i is 1 or 2, Loss1 is the loss function of the convolutional model for fault arc identification, and Loss2 is the loss function of the convolutional model for fault load identification.
[0110] 4) Calculation r i (t)
[0111]
[0112] represents the weighted loss w of task i i (t)Loss i (t) The L2 norm of the gradient of the neural network parameter W to be updated; where w i Loss is the loss function i The weight coefficient of , W is the parameter of the neural network.
[0113] The loss function of each model is loss i for:
[0114]
[0115] Among them, l b (t) is the loss function value of the input data of the bth batch in the training sample in model i, j is the current batch number, r is the size of the sliding window, j and b are both positive integers, i is 1 or 2, the training samples are divided into multiple batches to train the fault recognition model, and the bth batch is the training sample of any batch.
[0116] The loss function of each model in the traditional GradNorm algorithm is directly the loss value of the current batch of training samples. However, the inventors found in experiments that the relative convergence amplitude calculated by the GradNorm algorithm using a single batch of training samples is not reliable enough, making the accuracy of the model not very high. Therefore, the loss function of each model in the optimized GradNorm algorithm of the present invention is i Instead of directly using the loss of the current batch, that is, the loss of the training samples in the current sliding window, the loss functions of multiple batches of training samples are averaged, and the sliding window averaging method is used to replace the loss of a single batch of training samples, thereby improving the accuracy of the model.
[0117] For example, through multiple tests, the accuracy obtained when the average loss of 10 or more batches replaces the loss of the current batch is fluctuating below 85%. When testing the accuracy obtained by the average loss of less than 10 batches, it is found that the highest precision and accuracy of the model is obtained when the average loss of 7 batches replaces the loss of the current batch. Therefore, the average loss of 7 batches is used to replace the loss of the current batch.
[0118] The loss function of each model at this time is loss i Updated to:
[0119]
[0120] in, represents the reverse training speed of task i, The larger the value, the slower the training of task i. i (t) is the relative reverse training speed of task i; L i (0) is the loss of the i-th task at time 0; represents the mean of reverse training for each task;
[0121]
[0122] It is required for all tasks Average.
[0123] 5) Calculate GradLoss
[0124]
[0125] Among them, ɑ is a hyperparameter. The larger ɑ is, the stronger the balance restriction on training speed will be. ɑ is usually set to 0.12.
[0126] 6) Calculate GradLoss for w i The derivative of , we get β(t) required in the above gradient update formula. In order to prevent w i (t) becomes 0, it is usually considered is a constant, even if there is w i (t).
[0127] 7) Use the loss calculated in step 3 i Back propagation updates the neural network parameters;
[0128] 8) Update w using the derivative from step 6 i , after the update, it will take effect in the next batch step;
[0129] 9) For w iRenormalize, that is, the next batch step uses the renormalized w i .
[0130] Through the above steps, the weighting coefficients of the fault arc identification convolution model and the fault load identification convolution model can be determined by the optimized Gradnorm algorithm, thereby obtaining the optimal loss function.
[0131] The above training can complete the training of the fault identification model, and the model can be used to simultaneously identify the fault arc and the load.
[0132] The method provided by the present invention, since the fault arc will cause the change of the current in the circuit, first, directly obtain the current signal from the low-voltage AC power circuit to be identified, and then, input the obtained current signal into the pre-trained fault identification model, so as to determine whether the current signal to be identified is an AC series fault arc and its load type. The fault identification model includes an input layer, a shared layer and an output layer connected in sequence, wherein, in order to improve the accuracy of identification, the input layer uses a sliding window method to perform window processing on the input data, so that the data is automatically divided into multiple batches of data. Secondly, the shared layer and the output layer each include at least one convolution conditional batch normalization layer, and the convolution conditional batch normalization layer is a new convolution layer formed by fusing the convolution layer and the conditional batch normalization layer, thereby eliminating the intermediate variable storage convolution layer output, and removing the memory read and write time required to transfer the intermediate variable to the batch normalization layer, thereby accelerating the processing time. In addition, the convolution conditional batch normalization layer can also improve the accuracy of the fault identification model processing.
[0133] In addition, the present invention adopts an optimized Gradnorm algorithm to minimize the Loss, thereby further improving the accuracy of model recognition.
[0134] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0135] Based on the method for simultaneously identifying a fault arc and a load provided in the above embodiment, the present invention also provides a specific implementation of a device for simultaneously identifying a fault arc and a load applied to the method for simultaneously identifying a fault arc and a load. Please refer to the following embodiment.
[0136] like Figure 6 As shown, a device 600 for simultaneously identifying a fault arc and a load is provided, the device comprising:
[0137] An acquisition module 610 is used to acquire a current signal of a low-voltage AC power circuit to be identified;
[0138] The identification module 620 is used to input the current signal into the pre-trained fault identification model to determine whether the current signal to be identified is an AC series fault arc and its load type;
[0139] The fault identification model includes an input layer, a shared layer and an output layer connected in sequence, wherein the input layer performs window processing on the input data based on a sliding window, and the shared layer and the output layer each include at least one convolutional conditional batch normalization layer, which is a convolutional layer formed by fusing a convolutional layer and a conditional batch normalization layer.
[0140] In one possible implementation, the shared layer includes a first convolutional conditional batch normalization layer, a first maximum pooling layer, a second convolutional conditional batch normalization layer, a second maximum pooling layer, a third convolutional conditional batch normalization layer, and a fourth convolutional conditional batch normalization layer, which are connected sequentially.
[0141] In a possible implementation, the output layer includes a fault arc identification convolutional model and a fault load identification convolutional model;
[0142] The fault arc recognition convolutional model includes a fifth convolutional conditional batch normalization layer, a third maximum pooling layer, and a first fully connected layer connected in sequence. The loss function of the fault arc recognition convolutional model is loss1.
[0143] The fault load recognition convolutional model includes a sixth convolutional conditional batch normalization layer, a fourth maximum pooling layer, and a second fully connected layer connected in sequence. The loss function of the fault load recognition convolutional model is loss2.
[0144] The loss function Loss of the output layer is:
[0145] Loss = w1Loss1 + w2loss2;
[0146] Among them, w1 is the weighted coefficient of the loss function loss1, and w2 is the weighted coefficient of the loss function loss2.
[0147] In a possible implementation, the weighting coefficient in the output layer loss function in the fault identification model is determined by optimizing the loss function of each model based on the training sample and the optimized GradNorm algorithm; wherein each model is a fault arc identification convolution model or a fault load identification convolution model;
[0148] The loss function of each model in the optimized GradNorm algorithm i for:
[0149]
[0150] Among them, l b (t) is the loss function value of the input data of the bth batch in the training sample in model i, j is the current batch number, r is the size of the sliding window, j and b are both positive integers, i is 1 or 2, the training samples are divided into multiple batches to train the fault recognition model, and the bth batch is the training sample of any batch.
[0151] In one possible implementation, the output of the convolutional conditional batch normalization layer is:
[0152]
[0153] Among them, γ and β are the scaling parameters and translation parameters of the conditional batch normalization layer, μ is the mean of the input data of the convolutional layer, and σ 2 is the variance of the convolutional layer input data, ε = 10 -8 , w is the weight of the convolutional layer, and b is the bias of the convolutional layer.
[0154] In a possible implementation, a set of corresponding parameters is set for each category of features in the conditional batch normalization layer; wherein the corresponding parameters include scaling parameters and translation parameters of the conditional batch normalization layer.
[0155] In a possible implementation, the identification module 620 is used to input the current signal into a pre-trained fault identification model and output a label type;
[0156] Based on the output tag type, it is determined whether the current signal to be identified is an AC series fault arc and its load type.
[0157] Figure 7 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 7 As shown, the electronic device 7 of this embodiment includes: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70. When the processor 70 executes the computer program 72, the steps in the above-mentioned method for simultaneously identifying the arc fault and the load are implemented, for example Figure 1 Alternatively, when the processor 70 executes the computer program 72, the functions of each module in the above-mentioned device embodiments are realized, for example, Figure 6 Functions of modules 610 to 620 are shown.
[0158] Exemplarily, the computer program 72 may be divided into one or more modules, which are stored in the memory 71 and executed by the processor 70 to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 72 in the electronic device 7. For example, the computer program 72 may be divided into Figure 6 Modules 610 to 620 are shown.
[0159] The electronic device 7 may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art will appreciate that Figure 7 It is only an example of the electronic device 7 and does not constitute a limitation of the electronic device 7. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0160] The processor 70 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0161] The memory 71 may be an internal storage unit of the electronic device 7, such as a hard disk or memory of the electronic device 7. The memory 71 may also be an external storage device of the electronic device 7, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the electronic device 7. The memory 71 is used to store the computer program and other programs and data required by the electronic device. The memory 71 may also be used to temporarily store data that has been output or is to be output.
[0162] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0163] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0164] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0165] In the embodiments provided by the present invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0168] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiments for simultaneously identifying the fault arc and the load can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium.
[0169] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for simultaneously identifying arc faults and loads, characterized in that: include: Acquiring a current signal of a low-voltage AC power circuit to be identified; Inputting the current signal into a pre-trained fault identification model to determine whether the current signal to be identified is an AC series fault arc and its load type; The fault identification model includes an input layer, a shared layer and an output layer connected in sequence, wherein the input layer performs window processing on input data based on a sliding window, and the shared layer and the output layer each include at least one convolutional conditional batch normalization layer, and the convolutional conditional batch normalization layer is a convolutional layer formed by fusing a convolutional layer and a conditional batch normalization layer.
2. The identification method according to claim 1, characterized in that: The shared layer includes a first convolution conditional batch normalization layer, a first maximum pooling layer, a second convolution conditional batch normalization layer, a second maximum pooling layer, a third convolution conditional batch normalization layer and a fourth convolution conditional batch normalization layer, which are connected in sequence.
3. The identification method according to claim 1, characterized in that: The output layer includes a fault arc identification convolution model and a fault load identification convolution model; The fault arc recognition convolutional model comprises a fifth convolutional conditional batch normalization layer, a third maximum pooling layer and a first fully connected layer connected in sequence, and the loss function of the fault arc recognition convolutional model is loss1; The fault load recognition convolutional model includes a sixth convolutional conditional batch normalization layer, a fourth maximum pooling layer, and a second fully connected layer connected in sequence, and the loss function of the fault load recognition convolutional model is loss2; The loss function Loss of the output layer is: Loss = w1loss1 + w2loss2; Among them, w1 is the weighted coefficient of the loss function loss1, and w2 is the weighted coefficient of the loss function loss2.
4. The identification method according to claim 3, characterized in that: The weighted coefficients in the output layer loss function in the fault identification model are determined by optimizing the loss function of each model based on the training samples and the optimized GradNorm algorithm; wherein each model is a fault arc identification convolution model or a fault load identification convolution model; The loss function of each model in the optimized GradNorm algorithm is loss i for: Among them, l b (t) is the loss function value of the input data of the bth batch in the training sample in model i, j is the current batch number, r is the size of the sliding window, j and b are both positive integers, i is 1 or 2, the training samples are divided into multiple batches to train the fault recognition model, and the bth batch is the training sample of any batch.
5. The identification method according to any one of claims 1 to 4, characterized in that: The output of the convolutional conditional batch normalization layer is: Among them, γ and β are the scaling parameters and translation parameters of the conditional batch normalization layer, μ is the mean of the input data of the convolutional layer, and σ 2 is the variance of the convolutional layer input data, ε = 10 -8 , w is the weight of the convolutional layer, and b is the bias of the convolutional layer.
6. The identification method according to any one of claims 1 to 4, characterized in that: A set of corresponding parameters is set corresponding to each category of features in the conditional batch normalization layer; wherein the corresponding parameters include scaling parameters and translation parameters of the conditional batch normalization layer.
7. The identification method according to any one of claims 1 to 4, characterized in that: The step of inputting the current signal into a pre-trained fault identification model to determine whether the current signal to be identified is an AC series fault arc and its load type includes: Inputting the current signal into a pre-trained fault recognition model and outputting a label type; Based on the output tag type, it is determined whether the current signal to be identified is an AC series fault arc and its load type.
8. A device for simultaneously identifying arc faults and loads, characterized in that: include: An acquisition module, used to acquire a current signal of a low-voltage AC power circuit to be identified; An identification module, used for inputting the current signal into a pre-trained fault identification model to determine whether the current signal to be identified is an AC series fault arc and its load type; The fault identification model includes an input layer, a shared layer and an output layer connected in sequence, wherein the input layer performs window processing on input data based on a sliding window, and the shared layer and the output layer each include at least one convolutional conditional batch normalization layer, and the convolutional conditional batch normalization layer is a convolutional layer formed by fusing a convolutional layer and a conditional batch normalization layer.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
