Spectrogram feature enhancement method for arc fault detection and series AC arc fault detection method and system
Through spectral feature enhancement and deep learning technology, an arc fault detection model based on channel-space related attention mechanism is built, which solves the problem of failure feature information being masked in series faults and improves detection accuracy.
Patent Information
- Application Number
- CN202510077679.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-05-13
AI Technical Summary
When the existing arc fault detection method faces series faults, the fault characteristic information carried by the current is easily masked by the masked load, resulting in insufficient detection accuracy.
The spectrum graph feature enhancement method is used to obtain time-frequency information through short-time Fourier transform, and logarithmic operation is performed on the original spectrum graph to highlight high-frequency details and generate the enhanced spectrum graph. Combined with deep learning technology, an arc fault detection model based on channel-space-related attention mechanism is constructed.
Effectively highlight the fault characteristic information carried by the current, avoid being masked by the shielded load, and improve the detection accuracy of series AC arc faults.
Smart Images

Figure CN119986266A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of arc fault detection, and specifically relates to a method for enhancing the characteristics of a spectrogram for arc fault detection, and a method and system for detecting a series AC arc fault. Background Art
[0002] Long-term use of circuits will inevitably lead to aging or damage of cable insulation. This will easily cause arcs, leading to electrical fires and causing significant losses. Therefore, it is necessary to accurately detect arc faults in circuits to prevent accidents. However, when a series fault arc occurs, the fault characteristic information carried by the current can easily be 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 a complete 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 arc fault detection that the fault characteristic information carried by the current is easily covered by the so-called shielding load.
[0004] A method for enhancing spectrogram features for arc fault detection comprises the following steps:
[0005] For the time series data of the current signal under load conditions, short-time Fourier transform is performed to obtain the time-frequency information C of the current signal t,f The result is C t,f It is the time-frequency information at time t and frequency f, which is visualized to obtain the spectrogram of the original current signal;
[0006] Based on the spectrogram of the original current signal, it is converted into t,f =10×log 10 (C t,f ) is processed to obtain an enhanced spectrogram, which is used for arc fault detection.
[0007] Furthermore, the original time series data is short-time Fourier transformed to obtain the time-frequency information C of the current signal. t,f The process is as follows:
[0008] The time series data c[n] of the current signal is transformed into time-frequency information C by short-time Fourier transform according to the following formula t,f :
[0009]
[0010] Where c[n] represents the time series data of the current signal, n represents the length of the signal sequence; w[·] represents the window function, which is used to weight the current signal in each time period; R represents the step size of the window movement; N is the length of the window; T represents the sampling period; f represents the frequency of the input current signal; and t represents the start time of each time period.
[0011] A method for detecting a series AC arc fault comprises the following steps:
[0012] The time series data of the current signal under load conditions is collected and enhanced using the spectrogram feature enhancement method for arc fault detection to obtain an enhanced spectrogram, which is then input into an arc fault detection model built based on deep learning technology for fault detection. The arc fault detection model outputs an arc fault detection result.
[0013] Furthermore, the arc fault detection model constructed based on deep learning technology is a deep learning network model constructed based on a channel-space correlation attention mechanism, that is, a network model obtained by embedding the channel-space correlation attention mechanism into the deep learning network model;
[0014] The channel-space related attention mechanism is as follows:
[0015] First, the BAM architecture is used to calculate the channel attention M c (T) and spatial attention M s (T), and preliminarily fuse channel attention and spatial attention according to formula (3);
[0016]
[0017] Where T is the input tensor and σ is the sigmoid activation function;
[0018] Calculate the correlation between channel attention and spatial attention according to formula (4);
[0019]
[0020] Among them, M c (T)·M s (T) represents the correlation coefficient between channel attention and spatial attention, d is the number of channels, and softmax(·) represents the softmax function;
[0021] According to formula (5), the correlation between channel attention and spatial attention is weighted to the final output of the BAM architecture;
[0022]
[0023] Among them, T o′ utput Final output for CSCAM.
[0024] Furthermore, in the process of embedding the channel-space correlation attention mechanism into the network model obtained in the deep learning network model, the deep learning network model is ResNet18.
[0025] Furthermore, in the process of embedding the channel-space correlation attention mechanism into the network model obtained in the deep learning network model, the channel-space correlation attention mechanism is embedded after the first convolution unit of ResNet18.
[0026] A series AC arc fault detection system, comprising:
[0027] Current signal acquisition unit: used to collect current signal time series data under load conditions;
[0028] A spectrogram enhancement unit: enhancing the spectrogram feature by using the spectrogram feature enhancement method for arc fault detection to obtain an enhanced spectrogram;
[0029] Fault detection unit: The enhanced spectrogram is used as input, and the arc fault detection model built based on deep learning technology is used for fault detection. The arc fault detection model outputs the arc fault detection result.
[0030] Furthermore, the arc fault detection model constructed based on deep learning technology is a deep learning network model constructed based on a channel-space correlation attention mechanism, that is, a network model obtained by embedding the channel-space correlation attention mechanism into the deep learning network model;
[0031] The channel-space related attention mechanism is as follows:
[0032] First, the BAM architecture is used to calculate the channel attention M c (T) and spatial attention M s (T), and preliminarily fuse channel attention and spatial attention according to formula (3);
[0033]
[0034] Where T is the input tensor and σ is the sigmoid activation function;
[0035] Calculate the correlation between channel attention and spatial attention according to formula (4);
[0036]
[0037] Among them, M c (T)·M s(T) represents the correlation coefficient between channel attention and spatial attention, d is the number of channels, and softmax(·) represents the softmax function;
[0038] According to formula (5), the correlation between channel attention and spatial attention is weighted to the final output of the BAM architecture;
[0039]
[0040] Among them, T o ′ utput Final output for CSCAM.
[0041] Furthermore, in the process of embedding the channel-space correlation attention mechanism into the network model obtained in the deep learning network model, the deep learning network model is ResNet18.
[0042] Furthermore, in the process of embedding the channel-space correlation attention mechanism into the network model obtained in the deep learning network model, the channel-space correlation attention mechanism is embedded after the first convolution unit of ResNet18.
[0043] Beneficial effects:
[0044] The present invention can highlight the high-frequency details of the spectrogram by performing logarithmic operations on the original spectrogram in the feature enhancement stage, and can effectively highlight the fault feature information carried by the current, thereby effectively avoiding it from being masked by the shielding load, which helps to improve the detection effect. At the same time, the present invention also constructs a detection model that integrates the channel-space correlation attention mechanism in the spectrogram, which can effectively increase the weight of its key features and provide a guarantee for accurately detecting series arc faults and identifying load types. The present invention can effectively improve the detection effect of series AC arc faults. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is the overall architecture diagram of the series arc fault detection method;
[0046] Figure 2 It is the diagram of the experimental circuit and experimental equipment in the experimental platform;
[0047] Figure 3 It is the waveform diagram of the normal state and arc state of the resistive load in the time domain and frequency domain;
[0048] Figure 4 It is a spectrogram obtained based on a computing unit;
[0049] Figure 5 is the spectrogram after feature enhancement;
[0050] Figure 6It is the acoustic spectrum of the resistor and fluorescent lamp load when an arc fault occurs;
[0051] Figure 7 This is a schematic diagram of the channel-space related attention mechanism architecture;
[0052] Figure 8 It is a schematic diagram of the overall network structure;
[0053] Fig. 9 is a graph of model training loss and validation loss;
[0054] Fig.10 is the confusion matrix obtained from the instance test. DETAILED DESCRIPTION Specific implementation method one:
[0056] This embodiment is a method for enhancing the characteristics of a spectrogram for arc fault detection, comprising the following steps:
[0057] The time series data of the current signal under load conditions is recorded as the original time series data, and the original time series data is subjected to short-time Fourier transform (STFT) to obtain a spectrogram to obtain the time-frequency information of the current signal. On this basis, the high-frequency details of the spectrogram are feature enhanced to generate a new spectrogram; specifically, the following steps are included:
[0058] Step S11, collecting current signals under different loads through the experimental platform to construct an original current signal data set;
[0059] Step S12: Perform short-time Fourier transform (STFT) on the time series data c[n] of the current signal according to formula (1) to obtain the time-frequency information C t,f ;
[0060]
[0061] Where c[n] represents the input current signal, n represents the length of the signal sequence; w[·] represents the window function, which is used to weight the current signal in each time period; R represents the step size of the window movement; N is the length of the window; T represents the sampling period; f represents the frequency of the input current signal; and t represents the start time of each time period.
[0062] The result obtained is C t,f It is the time-frequency information at time t and frequency f, and its visualization is the spectrogram of the original current signal.
[0063] Step S13, based on the spectrogram obtained in step S12, calculating the details in the spectrogram according to formula (2) to obtain a spectrogram with enhanced high-frequency features;
[0064] S t,f=10×log 10 (C t,f ) (2)
[0065] Generate new spectrogram for arc fault detection. Specific implementation method 2:
[0067] This embodiment is a series AC arc fault detection method, comprising the following steps:
[0068] Step S1, collecting time series data of current signals under different load conditions, and enhancing them using a spectrogram feature enhancement method for arc fault detection described in the first specific implementation mode, that is, performing a short-time Fourier transform (STFT) on the original time series data of the current signal to obtain a spectrogram to obtain time-frequency information of the current signal; then enhancing the features of the high-frequency details of the spectrogram to generate a new spectrogram;
[0069] Step S2: for the key features in the spectrogram, a channel-space correlation attention mechanism (CSCAM) is constructed to weight them, and an arc fault detection model is constructed in combination with a recognition network based on deep learning technology; in this embodiment, the recognition network based on deep learning technology adopts ResNet18, and in other embodiments, the arc fault detection model can also be constructed based on other network models;
[0070] Step S3: Based on the arc fault model constructed in step S2, the model is trained and tested using the spectrogram dataset, and effectiveness and accuracy are evaluated based on the test results.
[0071] More specifically, the detection method is as follows:
[0072] Step S1, collecting the time series data of the current signal under different load conditions, performing short-time Fourier transform (STFT) on the original time series data to obtain a spectrogram to obtain the time-frequency information of the current signal. On this basis, the high-frequency details of the spectrogram are feature enhanced to generate a new spectrogram; specifically, the following steps are included:
[0073] Step S11, collecting current signals under different loads through the experimental platform to construct an original current signal data set;
[0074] Step S12: Perform short-time Fourier transform (STFT) on the time series data c[n] of the current signal according to the following formula to obtain the time-frequency information C t,f ;
[0075]
[0076] Where c[n] represents the input current signal, n represents the length of the signal sequence; w[·] represents the window function, which is used to weight the current signal in each time period; R represents the step size of the window movement; N is the length of the window; T represents the sampling period; f represents the frequency of the input current signal; and t represents the start time of each time period.
[0077] The result obtained is C t,f It is the time-frequency information at time t and frequency f, and its visualization is the spectrogram of the original current signal.
[0078] Step S13, based on the spectrogram obtained in step S12, calculating the details in the spectrogram according to the following formula to obtain a spectrogram with enhanced high-frequency features;
[0079] S t,f =10×log 10 (C t,f )
[0080] Step S14: construct a feature-enhanced spectrogram dataset based on step S12.
[0081] A new spectrogram is generated to serve as an input parameter for a subsequent arc detection model.
[0082] Step S2: Based on the BAM architecture, a channel-space correlation attention mechanism (CSCAM) is constructed to weight its features, and an arc fault detection model is constructed in combination with ResNet18:
[0083] Step S21: Calculate channel attention M using the BAM architecture c (T) and spatial attention M s (T), and preliminarily fuse channel attention and spatial attention according to formula (3);
[0084]
[0085] Among them, T is the input tensor and σ is the sigmoid activation function.
[0086] Step S22: Based on step S21, the correlation between channel attention and spatial attention is calculated according to formula (4);
[0087]
[0088] Among them, M c (T)·M s (T) represents the correlation coefficient between channel attention and spatial attention, d is the number of channels, and softmax(·) represents the softmax function.
[0089] Step S23: Based on the calculation results of steps S21 and S22, the correlation between channel attention and spatial attention is weighted to the final output of the BAM architecture according to formula (5);
[0090]
[0091] Among them, T o ′ utput Final output for CSCAM.
[0092] Step S24: Based on the CSCAM constructed in step S23, it is combined with the ResNet18 architecture to construct a complete arc fault detection model.
[0093] It should be noted that: in the process of combining CSCAM with the ResNet18 architecture in this embodiment, CSCAM is embedded in the ResNet18 architecture. In subsequent embodiments, after CSCAM is embedded in the first convolution unit of ResNet18, it can actually be embedded in other positions of ResNet18 according to actual effects.
[0094] In addition, the ResNet18 described in this embodiment may also be other network models. The arc fault detection model constructed by the present invention can target the key features of bright and dark color blocks in the spectrogram and their spatial positions, thereby improving the feature extraction capability of the enhanced spectrogram and further improving the final recognition effect.
[0095] Step S3: Based on the arc fault model constructed in step S2, the model is trained and tested using the spectrogram dataset, and the effectiveness and accuracy are evaluated based on the test results. The specific steps are as follows:
[0096] Step S31, setting labels for the spectrogram dataset according to the load type and health status. Then, the spectrogram dataset is divided into a training set, a validation set and a test set for subsequent training and testing;
[0097] Step S32, using the spectrogram datasets before and after enhancement to train and test some commonly used convolutional neural network models, respectively, to verify the effectiveness of the proposed data enhancement method for the spectrogram;
[0098] Step S33: Use the feature-enhanced spectrogram dataset to train and test the network model to verify the effectiveness of the detection model, and use multiple indicators to evaluate the detection results. Specific implementation method three:
[0100] This embodiment is a series AC arc fault detection system, comprising:
[0101] Current signal acquisition unit: used to collect current signal time series data under load conditions;
[0102] A spectrogram enhancement unit: enhancing the spectrogram features by using a spectrogram feature enhancement method for arc fault detection described in the first embodiment to obtain an enhanced spectrogram;
[0103] Fault detection unit: The enhanced spectrogram is used as input, and the arc fault detection model built based on deep learning technology is used for fault detection. The arc fault detection model outputs the arc fault detection result.
[0104] Furthermore, the arc fault detection model constructed based on deep learning technology is a deep learning network model constructed based on a channel-space correlation attention mechanism, that is, a network model obtained by embedding the channel-space correlation attention mechanism into the deep learning network model;
[0105] The channel-space related attention mechanism is as follows:
[0106] First, the BAM architecture is used to calculate the channel attention M c (T) and spatial attention M s (T), and preliminarily fuse channel attention and spatial attention according to the following formula;
[0107]
[0108] Where T is the input tensor and σ is the sigmoid activation function;
[0109] The correlation between channel attention and spatial attention is calculated according to the following formula;
[0110]
[0111] Among them, M c (T)·M s (T) represents the correlation coefficient between channel attention and spatial attention, d is the number of channels, and softmax(·) represents the softmax function;
[0112] The correlation between channel attention and spatial attention is weighted to the final output of the BAM architecture according to the following formula;
[0113]
[0114] Among them, T o ′ utput Final output for CSCAM.
[0115] Furthermore, the deep learning network model is ResNet18, and in the process of embedding the channel-space correlation attention mechanism into the network model obtained in the deep learning network model, the channel-space correlation attention mechanism is embedded after the first convolution unit of ResNet18.
[0116] Example:
[0117] The overall architecture of this embodiment is as follows Figure 1 As shown in the figure. In this architecture, a current signal is first converted into a spectrogram to obtain the time-frequency information of the current signal. The spectrogram is then feature enhanced to generate a new spectrogram. Then, a channel-space related attention mechanism is constructed and combined with ResNet18 to extract the key features in the new spectrogram. Finally, the load type corresponding to the current signal and the state of the current signal are output through the fully connected layer and the softmax function.
[0118] First, the original current signal is obtained using Figure 2 The experimental platform shown is implemented by simulating arc faults caused by line aging and damage. A large amount of current data when arcs are generated is collected to establish a current data sample library containing a variety of typical loads. The experimental circuit mainly includes a 220V / 50Hz AC power supply and a replaceable load in series with the cable sample. After the switch is closed, the cable sample will produce an arcing phenomenon, during which the current data can be continuously collected through the current transformer and the data acquisition card, and the current data is stored by communicating with the host computer LabVIEW. Among them, the model of the data acquisition card is NI / PCI6229, and the sampling frequency is set to 100kHz. The information of the load type used in this case is shown in Table 1.
[0119] Table 1 Load types and their working conditions
[0120]
[0121] The above experimental platform was used to collect current signals of different loads during normal operation and when an arc fault occurred. Taking the resistive load as an example, Figure 3 The time domain waveform and frequency domain waveform of the current signal in normal state and arc state are shown. Figure 3 It can be seen that when an arc is generated in the circuit, the amplitude of the current time domain signal will decrease, and some singular values will be generated in the signal. In addition, a "flat shoulder" feature will appear in the current time domain signal. This is because as the current decreases, the voltage across the discharge gap gradually decreases, causing the arc to gradually extinguish. From the frequency domain, when an arc is generated, the signal will produce more high-frequency components than in normal conditions. It is precisely the above-mentioned difference between normal current and arc current in the time and frequency domain that makes it easier to distinguish between the arc state and the normal state after the current signal is processed.
[0122] from Figure 3 It can be seen from the time domain waveform in that the normal current signal is relatively stable within a single power cycle. However, the current signal in the arc state has no obvious stability within a single power cycle. This is because the generation of arc is an extremely complex process and will be affected by load type, environmental noise, etc. Therefore, the detection time period needs to be no less than a single power cycle. Considering the time requirement for arc fault detection, this case uses a single power cycle (20ms) as a calculation unit of the detection model.
[0123] Subsequently, the obtained raw current data is converted into a spectrogram. The present invention uses a single power cycle (20ms) as a calculation unit of the detection model, and performs a short-time Fourier transform (STFT) on the input current signal c[n] at a sampling rate of 100kHz according to formula (1) to obtain the time-frequency information C at time t and frequency f. t,f , and visualize it to get Figure 4 The spectrogram shown is obtained according to a computing unit.
[0124]
[0125] Where c[n] represents the input current signal; w[·] represents the window function, which is used to weight the current signal in each time period; R represents the step size of the window movement; N is the length of the window; T represents the sampling period; f represents the frequency of the input current signal; and t represents the start time of each time period. The result C t,f is the time-frequency information at time t and frequency f. Combining the time-frequency information of all time periods into a matrix and visualizing it will give you a spectrogram.
[0126] Then, feature enhancement is performed on the generated spectrogram. Figure 4 It can be seen that there are a lot of black areas in the generated spectrogram, because there is almost no useful information in the current signal above 10kHz. After limiting the frequency range of the spectrogram during visualization, it can be seen that there is useful information in the frequency range of 0-2500Hz. However, due to the small amplitude of the current signal in the high-frequency stage, the above spectrogram will lose some information, which is not conducive to the analysis of high-frequency details in the current signal. Therefore, it is necessary to enhance the features of the spectrogram.
[0127] The present invention uses logarithmic operation to calculate the details in the spectrogram to enhance the detail information in the spectrogram. The original spectrogram is calculated according to formula (2) to obtain the current signal spectrogram after feature enhancement. Figure 5 shown.
[0128] S t,f=10×log 10 (C t,f ) (2)
[0129] and Figure 4 Compared with the spectrogram in , it can be seen that after feature enhancement, the spectrogram shows more useful information in the high-frequency stage. Figure 5 It can be seen that after feature enhancement, the low-amplitude signal in the low-frequency stage is also highlighted accordingly. This will help improve the accuracy of arc fault detection. Subsequently, all the current data sample libraries collected in the previous article are converted into spectrograms to form a spectrogram dataset.
[0130] Then, based on the characteristics of the spectrogram, a channel-space related attention mechanism architecture is constructed. Taking the resistor and fluorescent lamp load as an example, the arc current signal is converted into Figure 6 The spectrogram shown, Figure 6 The spectrograms of resistors and fluorescent lamps when arc faults occur, where (a) represents resistors and (b) represents fluorescent lamps. It can be seen from the figure that the image is composed of a large number of color blocks. Due to the different load types, the colors of these color blocks will change. In addition, the change process of each color block will cause the layout of the colors in the spectrogram to change. This means that the position of some key color features in the spectrogram has changed. In this process of change, there is obviously a certain correlation between color and position. Therefore, when extracting key features in the spectrogram, it is necessary to consider the correlation between channels and space for weighting.
[0131] Based on the BAM architecture, the present invention constructs a channel-space related attention mechanism, whose architecture is as follows: Figure 7 As shown. The correlation between channel and space is mainly described by calculating the dot product of channel attention and spatial attention. The correlation between channel and space is calculated according to formula (3), and then the correlation is multiplied by the input tensor according to formula (4) and added to the output to obtain the final output of CSCAM.
[0132]
[0133]
[0134] Among them, M c (T) is spatial attention, M s (T) is spatial attention, M c (T)·M s (T) represents the correlation coefficient between channel attention and spatial attention, d is the number of channels; T output is the original output of BAM, T is the input tensor, T o ′ utputFinal output for CSCAM.
[0135] Select a suitable basic network structure according to the characteristics of the spectrogram. Among the many network structures, ResNet has achieved outstanding results in image recognition tasks. This is because ResNet uses residual modules and residual connections to build the network, which can retain the original features, so that the gradient disappears during deep network training, thereby ensuring that the network learning is smoother and more stable. In addition, since ResNet can train very deep networks, the performance of the model is also improved. Among the many types of ResNet architectures, ResNet18 is a relatively shallow convolutional neural network, but it performs well in performance and accuracy. Taking into account the size and performance of the network model, ResNet18 is selected as the basic network framework of the present invention.
[0136] Subsequently, based on the ResNet18 architecture and CSCAM, we constructed Figure 8 The network model shown in Figure 1. After the spectrogram is input, it first passes through a convolutional layer for dimensionality reduction, and then batch normalization is performed. Subsequently, the tensor is input into CSCAM to weight its key features, thereby improving the ability of the subsequent residual module to understand the spectrogram, thereby improving the model's ability to identify arc faults.
[0137] Finally, a comprehensive evaluation of the proposed series arc fault detection method is conducted. In order to achieve accurate detection of series arc faults and identification of load types, the dataset is labeled according to load type and health status. The specific settings are shown in Table 2.
[0138] Table 2. The load type and size of each dataset
[0139]
[0140] After completing the label setting, the data set is divided into training set, validation set and test set. The training set accounts for 60%, the validation set accounts for 20%, and the test set accounts for 20%.
[0141] In order to compare the impact of the spectrogram before and after feature enhancement on the detection performance, two spectrogram datasets are constructed in this embodiment. Dataset 1 is a dataset constructed based on the original spectrogram. The original spectrogram is Figure 4 The reason for choosing the locally enlarged spectrogram to construct the dataset is that the spectrogram on the left has almost no useful information in the high-frequency stage, and a large amount of black areas are not conducive to the model to extract features from the image. The second spectrogram dataset, namely dataset 2, is based on the feature-enhanced spectrogram (such as Figure 5 shown) constructed.
[0142] Then, we selected the commonly used network models in deep learning and used them to train and test them using the two datasets mentioned above. The selected deep learning models include CNN, ResNet18 and ResNet50. The test results are shown in Table 3.
[0143] Table 3. The impact of data enhancement on model detection performance
[0144]
[0145] From the results shown in Table 4, it can be seen that after data enhancement, the performance of each model has been greatly improved. This verifies the effectiveness of the data enhancement method for spectrograms proposed in the present invention. In addition, it can be seen that the accuracy of the ResNet18 architecture is higher than that of the ResNet50 architecture. This is because the network of the ResNet50 architecture is deeper and overfitting occurs. This also shows that the recognition of spectrograms does not require an overly complex network, which can save a lot of computing resources.
[0146] Subsequently, the network model is trained using the feature-enhanced spectrogram dataset. In this case, the learning rate is set to 0.01, and the model parameters are optimized using stochastic gradient descent. In addition, the batch size is set to 16, and the loss function is the cross entropy function. The changes in the training loss and validation loss during the iteration process are shown in the figure below: Fig. 9 As shown. Fig. 9 As can be seen from the figure, as the number of iterations increases, both the training loss and the validation loss gradually decrease and eventually stabilize. In addition, after several iterations, the difference between the validation loss and the training loss is very small. This shows that the training process of the model is very efficient. Among them, the validation loss reaches the minimum value of 0.004761 at the 30th epoch. The model at the 30th epoch is saved for model testing.
[0147] Use the test set to test the saved model and plot the detection results into a confusion matrix. The results are as follows: Fig.10 As shown. Fig.10It can be seen that only a small number of samples were misidentified. Among them, a normal sample of an electronic light regulator was detected as a normal sample of a fluorescent lamp; 2 normal samples of switching power supplies were detected as normal samples of electronic light regulators; and 2 normal samples of handheld electric drills were detected as normal samples of switching power supplies. All samples of faults of each load were detected correctly. Further, according to the results of the confusion matrix, the accuracy, precision, recall rate, F1-score, specificity, sensitivity, and false positive rate of each type of label were calculated, and the results were statistically summarized in Table 4. From the results in Table 4, it can be seen that the proposed method has a high detection accuracy, and its detection accuracy for all samples reaches 99.85%. In addition, the detection accuracy of the proposed method for arc faults of various loads reaches 100%. This shows that the proposed method can effectively detect arc faults and accurately identify the type of load.
[0148] Table 4 Model detection accuracy and misjudgment rate
[0149]
[0150] In order to further verify the effectiveness of the proposed model, the performance is compared with other commonly used convolutional neural network models, and the results are shown in Table 5. From the results in Table 5, it can be seen that the accuracy of the model proposed in the present invention is better than other commonly used models. By comparing with the ResNet18 model, the effectiveness of the CSCAM proposed in the present invention can be proved. By comparing with the ResNet18+BAM model, it can be proved that it is necessary to consider the correlation between channels and space in the spectrogram, which can effectively improve the performance of the model.
[0151] Table 5 Comparison of detection performance between the proposed method and commonly used methods
[0152]
[0153]
[0154] 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 method for enhancing spectrogram features for arc fault detection, characterized in that: The following steps are involved: For the time series data of the current signal under load conditions, short-time Fourier transform is performed to obtain the time-frequency information C of the current signal t,f The result is C t,f It is the time-frequency information at time t and frequency f, which is visualized to obtain the spectrogram of the original current signal; Based on the spectrogram of the original current signal, it is converted into t,f =10×log 10 (C t,f ) is processed to obtain an enhanced spectrogram, which is used for arc fault detection.
2. The method for enhancing the acoustic spectrogram features for arc fault detection according to claim 1, characterized in that: Perform short-time Fourier transform on the original time series data to obtain the time-frequency information of the current signal C t,f The process is as follows: The time series data c[n] of the current signal is transformed into time-frequency information C by short-time Fourier transform according to the following formula t,f : Where c[n] represents the time series data of the current signal, n represents the length of the signal sequence; w[·] represents the window function, which is used to weight the current signal in each time period; R represents the step size of the window movement; N is the length of the window; T represents the sampling period; f represents the frequency of the input current signal; and t represents the start time of each time period.
3. A method for detecting series AC arc faults, characterized in that: The following steps are involved: The time series data of the current signal under load conditions is collected, and enhanced using the spectrogram feature enhancement method for arc fault detection described in claim 1 or 2 to obtain an enhanced spectrogram, which is then input into an arc fault detection model constructed based on deep learning technology for fault detection, and the arc fault detection model outputs an arc fault detection result.
4. A method for detecting series AC arc faults according to claim 3, characterized in that: The arc fault detection model constructed based on deep learning technology is a deep learning network model constructed based on a channel-space correlation attention mechanism, that is, a network model obtained by embedding the channel-space correlation attention mechanism into the deep learning network model; The channel-space related attention mechanism is as follows: First, the BAM architecture is used to calculate the channel attention M c (T) and spatial attention M s (F), and preliminarily fuse channel attention and spatial attention according to formula (3); Where T is the input tensor and σ is the sigmoid activation function; Calculate the correlation between channel attention and spatial attention according to formula (4); Among them, M c (T)·M s (T) represents the correlation coefficient between channel attention and spatial attention, d is the number of channels, and softmax(·) represents the softmax function; According to formula (5), the correlation between channel attention and spatial attention is weighted to the final output of the BAM architecture; Among them, T o ′ utput Final output for CSCAM.
5. A method for detecting series AC arc faults according to claim 4, characterized in that: In the process of embedding the channel-space correlation attention mechanism into the network model obtained by the deep learning network model, the deep learning network model is ResNet18.
6. A method for detecting series AC arc faults according to claim 5, characterized in that: In the process of embedding the channel-space correlation attention mechanism into the network model obtained by the deep learning network model, the channel-space correlation attention mechanism is embedded after the first convolution unit of ResNet18.
7. A series AC arc fault detection system, characterized in that: include: Current signal acquisition unit: used to collect current signal time series data under load conditions; A spectrogram enhancement unit: using the spectrogram feature enhancement method for arc fault detection according to claim 1 or 2 to perform enhancement to obtain an enhanced spectrogram; Fault detection unit: The enhanced spectrogram is used as input, and the arc fault detection model built based on deep learning technology is used for fault detection. The arc fault detection model outputs the arc fault detection result.
8. A series AC arc fault detection system according to claim 7, characterized in that: The arc fault detection model constructed based on deep learning technology is a deep learning network model constructed based on a channel-space correlation attention mechanism, that is, a network model obtained by embedding the channel-space correlation attention mechanism into the deep learning network model; The channel-space related attention mechanism is as follows: First, the BAM architecture is used to calculate the channel attention M c (T) and spatial attention M s (T), and preliminarily fuse channel attention and spatial attention according to formula (3); Where T is the input tensor and σ is the sigmoid activation function; Calculate the correlation between channel attention and spatial attention according to formula (4); Among them, M c (T)·M s (T) represents the correlation coefficient between channel attention and spatial attention, d is the number of channels, and softmax(·) represents the softmax function; According to formula (5), the correlation between channel attention and spatial attention is weighted to the final output of the BAM architecture; Among them, T o ′ utput Final output for CSCAM.
9. A series AC arc fault detection system according to claim 8, characterized in that: In the process of embedding the channel-space correlation attention mechanism into the network model obtained by the deep learning network model, the deep learning network model is ResNet18.
10. A series AC arc fault detection system according to claim 9, characterized in that: In the process of embedding the channel-space correlation attention mechanism into the network model obtained by the deep learning network model, the channel-space correlation attention mechanism is embedded after the first convolution unit of ResNet18.
Citation Information
Cited By
High-sensitivity arc fault detection method and solid state power controller
CN121164839A
A high sensitivity arc fault detection method and solid state power controller
CN121164839B
Series fault arc detection method for new energy automobile power battery based on neural network
CN121878502A
A neural network-based method for detecting series-type fault arcs in power batteries for new energy vehicles.
CN121878502B