CN117909818A - Arc fault identification method and system based on multicycle features and multiscale convolution - Google Patents
Arc fault identification method and system based on multicycle features and multiscale convolution Download PDFInfo
- Publication number
- CN117909818A CN117909818A CN202410025431.7A CN202410025431A CN117909818A CN 117909818 A CN117909818 A CN 117909818A CN 202410025431 A CN202410025431 A CN 202410025431A CN 117909818 A CN117909818 A CN 117909818A
- Authority
- CN
- China
- Prior art keywords
- feature
- data
- convolution
- attention
- scale
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 230000000737 periodic effect Effects 0.000 claims abstract description 20
- 238000000605 extraction Methods 0.000 claims abstract description 8
- 238000013461 design Methods 0.000 claims abstract description 5
- 230000007246 mechanism Effects 0.000 claims abstract description 5
- 230000004927 fusion Effects 0.000 claims description 26
- 230000006870 function Effects 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 13
- 239000013598 vector Substances 0.000 claims description 13
- 230000004913 activation Effects 0.000 claims description 12
- 238000011176 pooling Methods 0.000 claims description 12
- 239000011159 matrix material Substances 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 8
- 238000010891 electric arc Methods 0.000 claims description 7
- 238000012935 Averaging Methods 0.000 claims description 5
- 238000010606 normalization Methods 0.000 claims description 5
- 238000007781 pre-processing Methods 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 3
- 125000004122 cyclic group Chemical group 0.000 claims description 3
- 238000013507 mapping Methods 0.000 claims description 3
- 108010076504 Protein Sorting Signals Proteins 0.000 claims description 2
- 239000004744 fabric Substances 0.000 claims description 2
- 230000009466 transformation Effects 0.000 claims description 2
- 238000002474 experimental method Methods 0.000 abstract description 4
- 238000013527 convolutional neural network Methods 0.000 abstract description 3
- 238000004458 analytical method Methods 0.000 abstract description 2
- 238000005070 sampling Methods 0.000 abstract description 2
- 230000008447 perception Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 8
- 238000001514 detection method Methods 0.000 description 5
- 238000012549 training Methods 0.000 description 5
- 238000013528 artificial neural network Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000011160 research Methods 0.000 description 3
- 238000002679 ablation Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000013136 deep learning model Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000010339 dilation Effects 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000010200 validation analysis Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 206010000369 Accident Diseases 0.000 description 1
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013145 classification model Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000005684 electric field Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000009413 insulation Methods 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000005065 mining Methods 0.000 description 1
- 238000012821 model calculation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001681 protective effect Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/245—Classification techniques relating to the decision surface
- G06F18/2451—Classification techniques relating to the decision surface linear, e.g. hyperplane
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/253—Fusion techniques of extracted features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Molecular Biology (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Health & Medical Sciences (AREA)
- Complex Calculations (AREA)
Abstract
The invention discloses an arc fault identification method and system based on multicycle characteristics and multiscale convolution. The invention uses FFT to obtain frequency and corresponding amplitude, to realize the selection of periodic characteristics and the two-dimensional representation of one-dimensional time sequence data. Expanding the common time sequence data into data which can be interpreted in two dimensions, designing a convolution block to expand based on an attention mechanism and multi-scale analysis, and obtaining an improved fault arc identification model; and performing a comparison experiment in fault arc data sets covering a plurality of load type samples and different sampling resolutions. The invention has reasonable design, performs periodic selection by utilizing the features on the frequency domain under the condition of not performing manual feature extraction in advance, then completes feature extraction by utilizing local perception, weight sharing and multi-layer abstraction of the convolutional neural network, reduces model parameters as far as possible to optimize network architecture on the premise of meeting the fault identification accuracy, and can be widely applied to the field of household equipment safety.
Description
Technical Field
The invention belongs to the technical field of arc fault identification, and relates to an arc fault identification method and an arc fault identification system based on multi-cycle characteristics and multi-scale convolution.
Background
With the continuous development of society, the electrification degree is higher and higher, so that electric fires frequently occur in recent years. Many serious fire accidents are caused only by fault arcs in the line below rated current or expected short-circuit current. These dangerous arcs can occur in the insulation of power supply lines, appliance plugs, and power supply lines, internal wiring harnesses or components of household appliances that are not properly designed or that are aged. And the fault arc can not be detected rapidly by protective devices such as leakage, overcurrent and short circuit on the circuit, and the power supply is difficult to cut off in time, so that fire disaster is extremely easy to cause. Therefore, as one of the direct causes of the electrical fire, real-time and accurate identification of the fault arc is very important for various safety electricity utilization scenes.
Household loads are various in types, and different types of electrical characteristics are extremely different, so that the arc fault identification is very challenging. Research on electric arcs has never been stopped, physical changes such as arc light, heat and electromagnetism are generally used for electric arc identification in a limited space, and the identification accuracy of a single detection sensor is not as good as that of a combination of multiple sensors. However, such acquisition has high requirements for the sensor, the installation and the environment, and therefore, the practical application is very limited. Based on the above, the arc fault detection method proposed by the time-frequency domain characteristics of the arc voltage and the current is gradually developed, but the manual extraction is affected by priori knowledge, and still has to be improved in adaptability and generalization capability, but the optimization is difficult and complicated. Meanwhile, nonlinear loads are continuously increased, and the condition that multiple loads operate simultaneously exists, so that detection omission or false detection frequently occurs on a difficult sample similar to the characteristics extracted manually, and recognition accuracy is difficult to guarantee.
In recent years, there are two main categories of research into arc fault identification: 1. the method for extracting the arc characteristics comprises the following steps: the method mainly analyzes the time-frequency domain characteristics of the arc and extracts effective characteristics by utilizing mathematical morphology. And combining a machine learning classifier or an artificial neural network to obtain a final output. 2. Study of deep learning models and algorithms: most of the methods are used for feature extraction by designing different convolution networks, and some methods are used for preprocessing time series data into images and inputting the images into a subsequent classification model for processing. These methods make decisions by analyzing the impact of the fault arc on the current-voltage, the impact of different loads on the fault arc characteristics, and applying heuristic methods or machine learning, wherein deep learning models are proven to have significant advantages in various performance indexes in arc fault identification many times.
Due to the advantages that deep learning presents over manual feature extraction, deep learning uses still present some challenges in arc fault identification. Firstly, there is no good balance between the size and performance of the model, a deeper network and many convolution kernels with different scales are usually used for better fitting the fault arc scene, but such models usually have larger parameters, and do not well meet the light weight requirements of practical applications. Secondly, with the continuous development of convolutional neural networks, most of the convolutional neural networks are still applicable to two-dimensional data, and although research of partial fault arcs preprocesses one-dimensional time sequence data into images so as to facilitate model migration, such processing generally leads to exponential increase of the size of input data, thereby influencing subsequent processing and increasing the calculation amount.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides an arc fault identification method and an arc fault identification system based on multi-period characteristics and multi-scale convolution, which are used for performing two-dimensional interpretation and expansion on time-series data, and ensuring that the increase of the multi-period data size compared with original data is linear instead of exponential while facilitating the subsequent data input. The method combines multi-scale convolution and multi-period self-adaptive characteristics and is matched with a convolution attention module to extract effective arc characteristics. For the purpose of simplifying the size of the model, the size of the convolution kernel is limited in terms of guaranteeing the identification precision, the maximum size of the convolution kernel is limited to be 3, the depth of the neural network is controlled to be within 3 layers, and finally the identification of the arc fault is realized by utilizing the full connection layer.
In a first aspect, the present invention provides a method of arc fault identification based on multi-periodic features and multi-scale convolution, the method comprising the steps of:
step (1), collecting current and voltage data of an electric arc, and carrying out sliding division on the current and voltage data in a fixed time window;
step (2), two-dimensional interpretation expansion:
Firstly, embedding characteristics of current and voltage data processed in the step (1); secondly, selecting the first k different frequency corresponding periods with the highest channel amplitude mean value through fast Fourier transformation; finally, converting the current and voltage data processed in the step (1) into two-dimensional data with k different frequencies corresponding to periods, wherein k is more than or equal to 1, and obtaining two-dimensional data with periodic characteristics;
step (3), multiscale convolution based on an attention mechanism:
Circularly inputting the two-dimensional data with the periodic characteristics obtained in the step (2) into a multi-scale convolution module to obtain a plurality of output data with the multi-scale characteristics of attention expression; wherein the multi-scale convolution module comprises two multi-scale convolution operations and a convolution attention module which are arranged in parallel, and a GELU activation function is applied after each multi-scale convolution operation is finished; each output corresponds to a selected period;
Step (4), feature fusion based on self-adaptive weight: based on the amplitude mean value of the corresponding period of the frequency, carrying out multi-period feature fusion on a plurality of multi-scale features with attention expression;
Step (5), linear classification:
and (3) sequentially carrying out layer normalization and GELU activation on the fusion result of the multicycle features in the step (4), and finally flattening and inputting the fusion result into a full-connection layer to obtain a classification result.
Preferably, the step (2) specifically comprises:
2-1, carrying out position embedding on the data processed in the step (1);
2-2, carrying out mark embedding on the data processed in the step (1);
2-3, adding the position embedding result obtained in the step 2-1 and the mark embedding result obtained in the step 2-2;
2-4 performing fast Fourier transform on the addition result in the step 2-3, further comparing the amplitude averages of the signals on all channels under different frequencies, selecting the frequencies corresponding to the k highest amplitude averages, forming a frequency list, and simultaneously storing the corresponding channel amplitude averages in a weight matrix W;
2-5, sequentially performing two-dimensional interpretation on the original signals subjected to the feature embedding processing according to the frequency list returned in the step 2-4, and rearranging the original signals by taking T k=1/fk as a period length; if N is not divisible by T k, the signal is required to be subjected to tail zero padding so that the signal length is changed into N 'k, N' k is ensured to be divisible by T k, and k two-dimensional data with periodic characteristics are obtained Wherein each column represents a time point with the same phase among N'/T k periods divided in step 2-4, each row/>Representing data within a T k size period.
Preferably, the position embedding in step 2-1 adopts a sine-cosine position coding method, and generates a continuous vector for each time point in the current and voltage data, wherein the vector can capture the relative relation between the positions;
where pos represents the position of the data, d represents the dimension of the position code, and i represents the index of the dimension.
Preferably, the label embedding in step 2-2 is convolved with a cyclic filling scheme, which allows discrete acquisition values to be represented using a continuous set of vectors.
Preferably, the steps 2-4 specifically include:
First, the kth element on the complex sequence X i on the original signal path i is calculated by fast Fourier transform, resulting in complex amplitude X [ k ] i:
Wherein N represents the length of the signal, k represents the index of the converted frequency, x i [ N ] represents the nth element of the original signal sequence after feature embedding processing on the ith signal channel, and j represents the imaginary unit;
Next, the amplitude corresponding to the frequency f k is calculated using the complex amplitude X [ k ] i And calculates the amplitude mean AMP k over all channels:
Wherein Re (-) represents the real part and Im (-) represents the imaginary part;
Finally, channel amplitude mean values AMP k corresponding to different frequencies f k are compared, frequencies corresponding to the highest k channel amplitude mean values are selected and returned in a list mode, and meanwhile, the corresponding channel amplitude mean values are stored in a weight matrix W= { AMP 1,AMP2,...,AMPk }.
Preferably, the step (3) specifically comprises:
3-1, the two-dimensional data with periodic characteristics obtained in the step (2) is subjected to a multi-scale convolution module to obtain a plurality of scale Feature vectors { Feature 1,Feature2,...,Featuren };
The multi-scale convolution module comprises 1X 3 convolution blocks, 3X 1 convolution blocks and 1X 1 convolution blocks which are arranged in parallel; wherein the 1 x 3 convolution blocks, the 3 x 1 convolution blocks differ in expansion rate;
3-2 stacking the plurality of scale Feature vectors { Feature 1,Feature2,...,Featuren } obtained in the step 3-1 to generate a new dimension, then averaging the new dimension to obtain an output result of the multi-scale convolution, and obtaining a final result by using a GELU activation function on the output result:
x H*W*C=GELU(Avg(Stack(Feature1,Feature2,...,Featuren)) type (6)
Where Stack (·) represents a stacking operation, avg (·) represents an averaging; H. w, C denotes the length, width and height dimensions of the X H*W*C feature map;
3-3 performing channel attention and spatial attention calculations on the final result X H*W*C of step 3-2, respectively;
The method for calculating the channel attention comprises the steps of firstly carrying out average pooling AvgPooling and maximum pooling MaxPooling on a final result X H*W*C in the step 3-2 along a channel to obtain two channel weights A c and M c, then obtaining new attention weights A 'c and M' c respectively through a shared MLP, and then obtaining a final channel attention ChannelAttention (X H*W*C) through addition and sigmoid function mapping;
ChannelAttention (X H*W*C)=Sigmoid(A'c+M'c) A piece of cloth (7)
The calculation method of the spatial attention comprises the steps of carrying out average pooling and maximum pooling on a spatial feature map along a channel through a final result X H*W*C in the step 3-2, then stacking two feature outputs, and then carrying out point convolution on the stacked data and carrying out sigmoid to obtain the final spatial attention;
3-4 multiplying the final result X H*W*C obtained in step 3-2 by the channel attention ChannelAttention (X H*W*C) calculated in step 3-3 to obtain feature X1; then the feature X1 is multiplied by the spatial attention SpatialAttention (X H*W*C) calculated in step 3-3 to obtain the final attention-based feature output X2;
x1=x H*W*C×ChannelAttention(XH*W*C) (8)
X2=x1× SpatialAttention (X H*W*C) formula (9)
3-5 Taking the attention-based characteristic output X2 of the step 3-4 as the input of the multi-scale convolution module, repeating the operations of the steps 3-1 to 3-2 to obtain the final output
Preferably, the step (4) specifically comprises:
4-1 outputting the two-dimensional data corresponding to T k obtained in step (3) Restoring to one-dimensional data X k, then cutting the length of the one-dimensional data X k to the window length of the step (1), namely discarding the corresponding data at the time point exceeding the original signal length;
4-2, stacking the one-dimensional data corresponding to each T k along one dimension, and multiplying the one-dimensional data by the weight matrix W obtained in the step 2-4 to finally form a characteristic output based on multi-period fusion;
4-3 based on the idea of a residual design block, adding the output obtained in the step 4-2 with k two-dimensional data with periodic characteristics obtained in the step 2-5 to obtain a fusion result of the multicycle characteristics.
In a second aspect, the present invention provides an arc fault identification system for implementing the above method, comprising:
The data acquisition module is used for acquiring current and voltage data of the electric arc;
the data preprocessing module is used for carrying out sliding division on current and voltage data of the electric arc in a fixed time window;
the two-dimensional interpretation expansion module is used for performing characteristic embedding on the current and voltage data processed by the data preprocessing module, and then converting the current and voltage data into two-dimensional data under k periods corresponding to different frequencies to obtain two-dimensional data with periodic characteristics;
The feature extraction module circularly inputs the two-dimensional data with periodic features output by the two-dimensional interpretation and expansion module into the multi-scale convolution module to obtain a plurality of multi-scale features with attention expression;
the characteristic fusion module based on the self-adaptive weight fuses a plurality of multi-scale characteristics with attention expression into multi-period characteristics based on the frequency corresponding period;
And the linear classifier sequentially performs layer normalization and GELU activation on the fusion result of the multicycle characteristics, and finally flattens and inputs the fusion result to the full-connection layer to obtain a classification result.
In a third aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method.
In a fourth aspect, the present invention provides a computing device comprising a memory having executable code stored therein and a processor, which when executing the executable code, implements the method.
The beneficial effects of the invention are as follows:
1. According to the invention, the original signal data is subjected to position embedding and mark embedding, so that partial phase information of a time point relative to a whole time sample is prevented from being lost in the subsequent two-dimensional interpretation expansion, and the robustness of current and voltage data with respect to periodic variation in the two-dimensional interpretation expansion is improved, thereby realizing the precision of fault identification.
2. The invention provides a method for analyzing frequency domain data of current and voltage through FFT, and extracting a period corresponding to the frequency domain to serve as two-dimensional explanatory expansion of time sequence data. This is a feature in the frequency domain in the electrical field that is generally considered to be effective, but feature engineering is cumbersome. The invention introduces abstract frequency domain features from the two-dimensional interpretation perspective while avoiding feature engineering, and is embodied in the period selection and the final fusion based on the period features.
3. The invention selects convolution kernels with fixed sizes, namely 1 multiplied by 3 convolution blocks and 3 multiplied by 1 convolution blocks in the design of parallel convolution blocks, and ensures the acquisition of multi-scale characteristics by using a dilation convolution mode. The model can understand signals with larger time spans through the multi-scale features, and larger local and deeper detail features are obtained. In order to further reduce the parameters of the model, the spatial separable convolution is utilized, so that the calculation amount of the parameters is greatly reduced. Meanwhile, a convolution attention module is added in the multi-scale convolution module, attention calculation is carried out on the space and the channels respectively, so that the model can be more focused on sampling information of time points on a suspicious fault occurrence period, and the sensitivity of effective arc characteristics is enhanced.
Drawings
FIG. 1 is a schematic diagram of the system of the present invention.
Fig. 2 is a spatially separable dilation convolution method (for example r=2);
FIG. 3 is a schematic diagram of a channel attention module;
FIG. 4 is a schematic diagram of a spatial attention module;
FIG. 5 is a graph showing the loss variation of the training process on a validation set of high resolution acquisition data in accordance with the present invention;
FIG. 6 is a plot of the accuracy of the training process of the present invention on a validation set of high resolution acquired data;
fig. 7 an ROC curve drawn after an ablation experiment of the invention on the period selection part of the model and the attention convolution module.
Detailed Description
Further analysis is made below in connection with the specific examples and the accompanying drawings.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms "comprising" and "having" and any variations thereof, as used in the embodiments of the present application, are intended to cover non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed but may optionally include other steps or elements not listed or inherent to such process, method, article, or apparatus.
In the arc fault detection process, the feature extraction of voltage and current is difficult to ensure the identification precision due to the continuous increase of nonlinear loads and the simultaneous operation of multiple loads. Therefore, in order to better improve the arc fault recognition accuracy, the problems to be solved are: how to avoid losing the data period change in the process of extracting the characteristics, and mining the data characteristics as far as possible is not affected by nonlinearity and multiple loads.
Based on the method, the embodiment of the application provides an arc fault identification method based on multi-period characteristics and multi-scale convolution. The application carries out two-dimensional interpretation expansion on time-series data, facilitates subsequent data input and ensures that the increase of the multi-period data size compared with the original data is linear instead of exponential. By means of self-adaptive feature fusion based on multi-scale convolution and multi-period, effective arc features are extracted by matching with multi-scale convolution based on an attention mechanism. For the purpose of simplifying the size of the model, the size of the convolution kernel is limited in terms of guaranteeing the identification precision, the maximum convolution kernel size is 3, meanwhile, the depth of the neural network is controlled within 3 layers, and finally, the full-connection layer is utilized to realize the identification of the arc faults.
An arc fault identification method based on multi-cycle characteristics and multi-scale convolution, as shown in fig. 1, comprises the following steps:
Step (1), two-dimensional interpretation expansion: the data originally collected are input in a window form, some characteristic embedding is carried out, then different frequency periods are selected through FFT, the corresponding amplitude average value is reserved, and the input is converted into two-dimensional data under different frequency periods so as to be respectively input into a subsequent multi-scale convolution layer. The specific steps are as follows:
step 1, sliding and dividing current and voltage data acquired by a sensor according to a certain time window size, setting the window size of the data acquired by high resolution (10 KHz) to 1000, namely 0.1s, identifying whether faults exist, and setting the window size of the data acquired by low resolution (6400 Hz) to 1024, namely 0.16s, identifying whether faults exist.
Step 2. Step 1 data is position embedded because part of the global phase information in the original waveform is lost during the two-dimensional interpretation. The position embedding adopts a sine-cosine position coding method, and generates a continuous vector for each time point in the sequence, wherein the vector can capture the relative relation between the positions.
Where pos represents the position of the data, d represents the dimension of the position code, and i represents the index of the dimension.
Step 3. The mark embedding is also carried out on Step 1 data, because important information may be lost during window division, and data on edges may not be completely covered by convolution kernels, so that convolution is carried out by using a cyclic filling mode. While discrete acquisition values may be represented using a set of continuous vectors.
Step4, adding the position embedded result obtained in Step 2 and the mark embedded result obtained in Step 3, and outputting the result for subsequent cycle selection.
Step 5, performing Fast Fourier Transform (FFT) on the output result of Step 4, comparing the average amplitude values of the signals on all channels under different frequencies, selecting the highest three frequencies and forming a frequency list. And storing the corresponding magnitude mean in a weight matrix. The method specifically comprises the following steps:
First, the kth element on complex sequence X i on original signal path i is calculated by FFT:
Where N represents the length of the signal, k represents the index of the converted frequency, x i [ N ] represents the nth element of the original sequence on the ith signal path after Step 2 and Step 3 processing, j represents the imaginary unit (j 2 = -1);
second, the complex amplitude X [ k ] i is used to calculate the amplitude corresponding to f k and calculate the mean of the absolute values of the amplitudes over all channels:
Finally, channel amplitude mean values AMP k corresponding to different f k are compared, frequencies corresponding to the highest k mean values are selected and returned in a list mode, and corresponding amplitudes are stored in a weight matrix W= { AMP 1,AMP2,...,AMPk }.
Step 6, sequentially performing two-dimensional interpretation on the original signals subjected to the feature embedding processing according to the frequency list returned in Step 4, and rearranging the original signals by taking T k=1/fk as a period length; if N is not divisible by T k, the signal is required to be subjected to tail zero padding so that the signal length is changed into N 'k, N' k is ensured to be divisible by T k, and three two-dimensional data with periodic characteristics are obtained
Step (2), multiscale convolution based on an attention mechanism:
Three two-dimensional data with periodic characteristics are circularly input into a multi-scale convolution module. Each multi-scale convolution module comprises two multi-scale convolution operations and one convolution attention module, and a GELU activation function is applied after each multi-scale convolution operation is finished. Output data of a plurality of multi-scale features having attentiveness manifestations is finally obtained, each output corresponding to a selected period. The specific steps are as follows (taking a convolution block as an example):
Step 1, inputting three two-dimensional data with periodic characteristics of the current cycle, and obtaining three scale characteristics Feature 1,Feature2,Feature3 through a multi-scale convolution module; the multi-scale convolution module shown in fig. 2 includes convolution kernels of 1×3,3×1, and 1×1, and the conventional convolution kernels of 3×3 are split into convolution kernels of 1×3 and convolution kernels of 3×1 in order to reduce the model calculation amount. At the same time, to capture multi-scale features, different expansion rates r= {1,2,3}, are introduced. In this block a total of 2×3+1=7 convolution operations are performed in parallel. Meanwhile, in order to ensure that the shapes of the parallel convolution outputs are identical, corresponding filling needs to be designed during convolution.
Step 2, after the parallel convolution in Step 1 is completed, stacking the obtained multiple outputs along a new dimension to generate a new dimension, then averaging the new dimension to obtain an output result of the multi-scale convolution, and using GELU activation functions to obtain a final result X H*W*C; this dimension represents the number of convolution kernels designed in the multi-scale convolution module.
XH*W*C=GELU(Avg(Stack(Feature1,Feature2,Feature3))
Step 3, after the multi-scale convolution modules of Step 1 and Step2 and the activation function, the output is respectively calculated into spatial attention and channel attention.
The calculation method of channel attention as shown in fig. 3 is that the final result X H*W*C from step 3-2 is subjected to average pooling AvgPooling and maximum pooling MaxPooling along the channel to obtain two channel weights a c and M c, then the two channel weights are subjected to a shared MLP to obtain new attention weights a 'c and M' c, and then added and sigmoid function mapping is performed to obtain the final channel attention ChannelAttention (X H*W*C);
ChannelAttention(XH*W*C)=Sigmoid(A'c+M'c)
The method for calculating the spatial attention of fig. 4 is that X H*W*C performs average pooling and maximum pooling on the spatial feature map along the channel, then stacks the two feature outputs along a new dimension, convolves the stacked data with a point, and finally obtains the final spatial attention with sigmoid.
Step 4 the final output X H*W*C from Step 2 is multiplied by the channel attention ChannelAttention calculated in Step 3 (X H*W*C), and then by the spatial attention SpatialAttention calculated in Step 3 (X H*W*C) to obtain the final attention-based feature output X2.
X1=XH*W*C×ChannelAttention(XH*W*C)
X2=X1×SpatialAttention(XH*W*C)
Step 5, taking the result X2 of Step 4 as the input of the multi-scale convolution module, repeating the operations of Step 1 and Step 2 to obtain the final output
Step (3), feature fusion based on self-adaptive weight: and realizing the fusion of multi-period characteristics based on the amplitude of the corresponding period returned by the FFT in the two-dimensional interpretation expansion module.
Step 1, period-based two-dimensional data corresponding to each selection period T k The one-dimensional data X k is restored and clipped to the original window size, and the corresponding value at the point beyond the window is discarded.
Step 2, stacking the one-dimensional feature graphs X k corresponding to each selection period T k along one dimension, and multiplying the one-dimensional feature graphs by the weight matrix W reserved in the previous work to finally form a feature output based on multi-period fusion.
Step 3, adding the output obtained by Step 2 to Step 4 in the most original two-dimensional expansion module to obtain a fusion result of multi-period characteristics, and taking the fusion result as output. Here the idea of using a residual design block is adopted.
Step (4), linear classification: and carrying out layer normalization and GELU activation on the fusion result of the multicycle features in sequence. Setting the dropout parameter to 0.2 prevents the model from being over fitted, and finally flattening the model to be input to the full-connection layer, wherein the output dimension of the full-connection layer is 2, and the score of two states correspondingly occurs, and the state is whether fault arc exists in the sample.
The model is trained, the loss function used by the invention is a cross entropy loss function, the designed optimization method is an Adam optimizer, the batch size is 128, the initial size of the learning rate is 0.001, and meanwhile, a learning rate scheduler is designed, the learning rate is updated by step_size=5, and the learning rate is reduced by setting gamma=0.2. The early-stop method is used for monitoring the training process, and the training is stopped when the loss value of the verification set in the 5 epochs is not reduced by a certain threshold value, and the best three model output results are reserved. The data set adopted in the experiment is collected at the resolution of 10kHZ and then divided into two data sets of HR-single and HR-mix, wherein the HR-single data set contains independent collected data of six different electric appliances, namely an electric kettle, a dish washer, a refrigerator, a microwave oven, an electric cooker and an electromagnetic oven, and the HR-mix is nine different combination conditions of the electric appliances. Loss rate and accuracy rate change curves of training process on verification set of high-resolution acquired data are shown in fig. 5 and 6. To demonstrate the effectiveness of the module, ablation experiments were performed separately on the cycle select portion of the model and also on the attention convolution module and an ROC curve was plotted, see fig. 7, where w/a represents the attention-removing convolution portion, w/p represents the cycle select portion, and w/a+p represents both removed.
The embodiment of the invention provides electronic equipment, in particular to the electronic equipment, which comprises a memory and a processor, wherein executable codes are stored in the memory, and the processor realizes the method of any one of the embodiments when executing the executable codes.
The memory may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system network element and the at least one other network element is implemented through at least one communication interface (which may be wired or wireless), and the internet, wide area network, local network, metropolitan area network, etc. may be used.
The bus may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc.
The memory is configured to store a program, and the processor executes the program after receiving an execution instruction, where the method executed by the apparatus for flow defining disclosed in any of the foregoing embodiments of the present invention may be applied to or implemented by a processor.
The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATEARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The computer program product of the readable storage medium provided by the embodiment of the present invention includes a computer readable storage medium storing a program code, where the program code includes instructions for executing the method described in the foregoing method embodiment, and the specific implementation may refer to the foregoing method embodiment and will not be described herein.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. Arc fault identification method based on multicycle features and multiscale convolution, characterized in that the method comprises the following steps:
step (1), collecting current and voltage data of an electric arc, and carrying out sliding division on the current and voltage data in a fixed time window;
step (2), two-dimensional interpretation expansion:
Firstly, embedding characteristics of current and voltage data processed in the step (1); secondly, selecting the first k different frequency corresponding periods with the highest channel amplitude mean value through fast Fourier transformation, wherein k is more than or equal to 1; finally, converting the current and voltage data processed in the step (1) into two-dimensional data under the corresponding periods of k different frequencies to obtain two-dimensional data with periodic characteristics;
step (3), multiscale convolution based on an attention mechanism:
Circularly inputting the two-dimensional data with the periodic characteristics obtained in the step (2) into a multi-scale convolution module to obtain a plurality of multi-scale characteristics with attention expression; wherein the multi-scale convolution module comprises two multi-scale convolution operations and a convolution attention module which are arranged in parallel, and a GELU activation function is applied after each multi-scale convolution operation is finished;
step (4), feature fusion based on self-adaptive weight:
based on the amplitude mean value of the corresponding period of the frequency, carrying out multi-period feature fusion on a plurality of multi-scale features with attention expression;
Step (5), linear classification:
and (3) sequentially carrying out layer normalization and GELU activation on the fusion result of the multicycle features in the step (4), and finally flattening and inputting the fusion result into a full-connection layer to obtain a classification result.
2. The method according to claim 1, wherein step (2) is specifically:
2-1, carrying out position embedding on the data processed in the step (1);
2-2, carrying out mark embedding on the data processed in the step (1);
2-3, adding the position embedding result obtained in the step 2-1 and the mark embedding result obtained in the step 2-2;
2-4 performing fast Fourier transform on the addition result in the step 2-3, further comparing the amplitude averages of the signals on all channels under different frequencies, selecting the frequencies corresponding to the k highest amplitude averages, forming a frequency list, and simultaneously storing the corresponding channel amplitude averages in a weight matrix W;
2-5, sequentially performing two-dimensional interpretation on the original signals subjected to the feature embedding processing according to the frequency list returned in the step 2-4, and rearranging the original signals by taking T k=1/fk as a period length; if N is not divisible by T k, the signal is required to be subjected to tail zero padding so that the signal length is changed into N 'k, N' k is ensured to be divisible by T k, and k two-dimensional data with periodic characteristics are obtained Wherein each column represents a time point with the same phase among N'/T k periods divided in step 2-4, each row/>Representing data within a T k size period.
3. The method of claim 2, wherein the embedding of the positions in step 2-1 uses a sine-cosine position coding method to generate a continuous vector for each time point in the current and voltage data, the vector capturing the relative relationship between the positions;
where pos represents the position of the data, d represents the dimension of the position code, and i represents the index of the dimension.
4. The method of claim 2, wherein the label embedding in step 2-2 is convolved with a cyclic filling scheme to achieve a representation of discrete acquisition values using a set of continuous vectors.
5. The method according to claim 2, wherein in step 2-4 is specifically:
First, the kth element on the complex sequence X i on the original signal path i is calculated by fast Fourier transform, resulting in complex amplitude X [ k ] i:
Wherein N represents the length of the signal, k represents the index of the converted frequency, x i [ N ] represents the nth element of the original signal sequence after feature embedding processing on the ith signal channel, and j represents the imaginary unit;
Next, the amplitude corresponding to the frequency f k is calculated using the complex amplitude X [ k ] i And calculates the amplitude mean AMP k over all channels:
Wherein Re (-) represents the real part and Im (-) represents the imaginary part;
Finally, channel amplitude mean values AMP k corresponding to different frequencies f k are compared, frequencies corresponding to the highest k channel amplitude mean values are selected and returned in a list mode, and meanwhile, the corresponding channel amplitude mean values are stored in a weight matrix W= { AMP 1,AMP2,...,AMPk }.
6. The method of claim 5, wherein step (3) is specifically:
3-1, the two-dimensional data with periodic characteristics obtained in the step (2) is subjected to a multi-scale convolution module to obtain a plurality of scale Feature vectors { Feature 1,Feature2,...,Featuren };
The multi-scale convolution module comprises 1X 3 convolution blocks, 3X 1 convolution blocks and 1X 1 convolution blocks which are arranged in parallel; wherein the 1 x 3 convolution blocks, the 3 x 1 convolution blocks differ in expansion rate;
3-2 stacking the plurality of scale Feature vectors { Feature 1,Feature2,...,Featuren } obtained in the step 3-1 to generate a new dimension, then averaging the new dimension to obtain an output result of the multi-scale convolution, and obtaining a final result by using a GELU activation function on the output result:
x H*W*C=GELU(Avg(Stack(Feature1,Feature2,...,Featuren)) type (6)
Where Stack (·) represents a stacking operation, avg (·) represents an averaging; H. w, C denotes the length, width and height dimensions of the X H*W*C feature map;
3-3 performing channel attention and spatial attention calculations on the final result X H*W*C of step 3-2, respectively;
the method for calculating the channel attention comprises the steps of firstly carrying out average pooling AvgPooling and maximum pooling MaxPooling on a final result X H*W*C in the step 3-2 along a channel to obtain two channel weights A c and M c, then obtaining new attention weights A 'c and M' c respectively through a shared MLP, and then obtaining a final channel attention ChannelAttention (X H*W*C) through addition and sigmoid function mapping;
ChannelAttention (X H*W*C)=Sigmoid(A′c+M′c) A piece of cloth (7)
The calculation method of the spatial attention comprises the steps of carrying out average pooling and maximum pooling on a spatial feature map along a channel through a final result X H*W*C in the step 3-2, then stacking two feature outputs, and then carrying out point convolution on the stacked data and carrying out sigmoid to obtain the final spatial attention;
3-4 multiplying the final result X H*W*C obtained in step 3-2 by the channel attention ChannelAttention (X H*W*C) calculated in step 3-3 to obtain feature X1; then the feature X1 is multiplied by the spatial attention SpatialAttention (X H*W*C) calculated in step 3-3 to obtain the final attention-based feature output X2;
x1=x H*W*C×ChannelAttention(XH*W*C) (8)
X2=x1× SpatialAttention (X H*W*C) formula (9)
3-5 Taking the attention-based characteristic output X2 of the step 3-4 as the input of the multi-scale convolution module, repeating the operations of the steps 3-1 to 3-2 to obtain the final output
7. The method of claim 6, wherein step (4) is specifically:
4-1 outputting the two-dimensional data corresponding to T k obtained in step (3) Restoring to one-dimensional data X k, then cutting the length of the one-dimensional data X k to the window length of the step (1), namely discarding the corresponding data at the time point exceeding the original signal length;
4-2, stacking the one-dimensional data corresponding to each T k along one dimension, and multiplying the one-dimensional data by the weight matrix W obtained in the step 2-4 to finally form a characteristic output based on multi-period fusion;
4-3 based on the idea of a residual design block, adding the output obtained in the step 4-2 with k two-dimensional data with periodic characteristics obtained in the step 2-5 to obtain a fusion result of the multicycle characteristics.
8. An arc fault identification system implementing the method of any one of claims 1-7, comprising:
The data acquisition module is used for acquiring current and voltage data of the electric arc;
the data preprocessing module is used for carrying out sliding division on current and voltage data of the electric arc in a fixed time window;
the two-dimensional interpretation expansion module is used for performing characteristic embedding on the current and voltage data processed by the data preprocessing module, and then converting the current and voltage data into two-dimensional data under k periods corresponding to different frequencies to obtain two-dimensional data with periodic characteristics;
The feature extraction module circularly inputs the two-dimensional data with periodic features output by the two-dimensional interpretation and expansion module into the multi-scale convolution module to obtain a plurality of multi-scale features with attention expression;
the characteristic fusion module based on the self-adaptive weight fuses a plurality of multi-scale characteristics with attention expression into multi-period characteristics based on the frequency corresponding period;
And the linear classifier sequentially performs layer normalization and GELU activation on the fusion result of the multicycle characteristics, and finally flattens and inputs the fusion result to the full-connection layer to obtain a classification result.
9. A computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any of claims 1-7.
10. A computing device comprising a memory having executable code stored therein and a processor, which when executing the executable code, implements the method of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410025431.7A CN117909818A (en) | 2024-01-08 | 2024-01-08 | Arc fault identification method and system based on multicycle features and multiscale convolution |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410025431.7A CN117909818A (en) | 2024-01-08 | 2024-01-08 | Arc fault identification method and system based on multicycle features and multiscale convolution |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117909818A true CN117909818A (en) | 2024-04-19 |
Family
ID=90684919
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410025431.7A Pending CN117909818A (en) | 2024-01-08 | 2024-01-08 | Arc fault identification method and system based on multicycle features and multiscale convolution |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117909818A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118707253A (en) * | 2024-08-28 | 2024-09-27 | 深圳市航天泰瑞捷电子有限公司 | Arc detection method and device, electronic equipment and storage medium |
-
2024
- 2024-01-08 CN CN202410025431.7A patent/CN117909818A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118707253A (en) * | 2024-08-28 | 2024-09-27 | 深圳市航天泰瑞捷电子有限公司 | Arc detection method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107564025B (en) | Electric power equipment infrared image semantic segmentation method based on deep neural network | |
Qin et al. | Effective infrared small target detection utilizing a novel local contrast method | |
CN110048827B (en) | Class template attack method based on deep learning convolutional neural network | |
Biswal et al. | Detection and characterization of multiple power quality disturbances with a fast S-transform and decision tree based classifier | |
Wang et al. | A machine learning approach to detection of geomagnetically induced currents in power grids | |
CN114825257B (en) | Leakage protection device for LED lamp detection and leakage protection method thereof | |
CN103310236A (en) | Mosaic image detection method and system based on local two-dimensional characteristics | |
CN111695620A (en) | Method and system for detecting and correcting abnormal data of time sequence of power system | |
CN117909818A (en) | Arc fault identification method and system based on multicycle features and multiscale convolution | |
CN116679161B (en) | Power grid line fault diagnosis method, equipment and medium | |
Bayrak et al. | Deep learning-based multi-model ensemble method for classification of PQDs in a hydrogen energy-based microgrid using modified weighted majority algorithm | |
Yang et al. | Fault Classification in Distribution Systems Using Deep Learning With Data Preprocessing Methods Based on Fast Dynamic Time Warping and Short-Time Fourier Transform | |
CN108764541B (en) | Wind energy prediction method combining space characteristic and error processing | |
CN111931707A (en) | Face image prediction method, device, equipment and medium based on countercheck patch | |
CN113627294A (en) | Transformer substation abnormity intelligent identification method and system based on deep learning | |
CN112883385B (en) | Side channel leakage position positioning method and device, storage medium and terminal | |
CN114325072B (en) | Ferromagnetic resonance overvoltage identification method and device based on gram angular field coding | |
CN114448661B (en) | Method for detecting slow denial of service attack and related equipment | |
CN116298725A (en) | Fault arc detection method, system and storage medium | |
CN115327325A (en) | Charging pile series arc fault detection method and device and electronic equipment | |
Upadhyay et al. | Comparative analysis of tabular generative adversarial network (GAN) models for generation and validation of power grid synthetic datasets | |
CN116975742A (en) | Partial discharge pattern recognition method, apparatus, device, and storage medium | |
CN114142605A (en) | Pilot protection method, device and storage medium | |
Sun et al. | Substation high-voltage switchgear detection based on improved EfficientNet-YOLOv5s model | |
Jettanasen et al. | A novel probabilistic neural network‐based algorithm for classifying internal fault in transformer windings |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |