Methods for creating, identifying, and using arc fault detection models

CN121637215BActive Publication Date: 2026-08-14SUZHOU FUTURE ELECTRICAL APP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

其中并联电弧与接地电弧因故障电流显著高于负载电流,可被常规过流保护装置有效切除;而串联电弧故障电流与正常负载电流幅值相当,其隐蔽性强、持续时间长,是引发电气火灾的主要诱因

Benefits of technology

[0015] The method, identification method, and apparatus for creating an arc fault detection model provided in this invention have the following advantages: This invention discloses a method, identification method, and apparatus for creating an arc fault detection model. The creation method includes the following steps: acquiring current data from several electrical appliances, extracting feature vectors corresponding to the first, second, and third current signal sequences from the current data; constructing an arc fault detection model based on a multi-head self-attention temporal convolutional network; training the arc fault detection model based on all feature vectors; during the training process, using an improved Bayesian optimization algorithm to adjust the parameters of the arc fault detection model, with the training objective being to maximize the Kappa coefficient. This arc fault detection model can detect arc faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121637215B_ABST
    Figure CN121637215B_ABST
Patent Text Reader

Abstract

This invention discloses a method for creating an arc fault detection model, an identification method, and an apparatus thereof. The creation method includes the following steps: acquiring current data from several electrical appliances; extracting feature vectors corresponding to the first, second, and third current signal sequences from the current data; constructing an arc fault detection model based on a multi-head self-attention temporal convolutional network; training the arc fault detection model based on all feature vectors; during training, using an improved Bayesian optimization algorithm to adjust the parameters of the arc fault detection model, with the training objective being to maximize the Kappa coefficient. This arc fault detection model can detect arc faults.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrical technology, and in particular to a method for creating an arc fault detection model, an identification method, and an apparatus thereof. Background Technology

[0002] An arc fault is a continuous discharge phenomenon caused by the breakdown of air dielectric due to insulation deterioration, loose connections, or physical damage in electrical circuits. When a fault occurs, it is accompanied by a strong photothermal effect; the temperature within the arc channel can instantaneously reach over 3000°C, and a fault current of 0.5A is sufficient to ignite common flammable materials. Based on the different fault paths, arc faults can be classified into three types: parallel, grounding, and series. Parallel and grounding arc faults, because their fault current is significantly higher than the load current, can be effectively isolated by conventional overcurrent protection devices. However, series arc faults, with fault currents comparable to the normal load current, are highly concealed and last for a long time, making them a major cause of electrical fires.

[0003] Therefore, how to detect series arc faults has become an urgent problem to be solved. Summary of the Invention

[0004] In view of this, the main objective of the present invention is to provide a method for creating an arc fault detection model, an identification method, and an apparatus thereof.

[0005] To achieve the above objectives, the technical solution of the present invention is implemented as follows: a method for creating an arc fault detection model, comprising the following steps: acquiring current data of several electrical appliances, wherein the current data of each electrical appliance includes: a first current signal sequence under normal conditions, a second current signal sequence under arcing conditions, and a third current signal sequence under gear switching conditions; the first, second, and third current signal sequences each contain multiple current signals arranged in chronological order; extracting a first feature vector corresponding to each first current signal sequence, a second feature vector corresponding to each second current signal sequence, and a third feature vector corresponding to each third current signal sequence; constructing an arc fault detection model based on a multi-head self-attention temporal convolutional network, training the arc fault detection model based on all the first, second, and third feature vectors, wherein during the training process, an improved Bayesian optimization algorithm is used to adjust the parameters of the arc fault detection model, and the training objective is to maximize the Kappa coefficient.

[0006] As an improvement to this embodiment of the invention, the extraction of the first feature vector corresponding to each first current signal sequence, the second feature vector corresponding to each second current signal sequence, and the third feature vector corresponding to each third current signal sequence specifically includes: generating a first-order difference sequence Diff1 and a first-order difference absolute value sequence Abs1 corresponding to the first current signal sequence, generating a first-order difference sequence Diff2 and a first-order difference absolute value sequence Abs2 corresponding to the second current signal sequence, and generating a first-order difference sequence Diff3 and a first-order difference absolute value sequence Abs3 corresponding to the third current signal sequence; then, performing the following processing on the first-order difference absolute value sequences Abs1, Abs2, and Abs3: firstly, dividing them into multiple full waves according to the power frequency period, with each full wave containing a preset number of sampling points; then, extracting the first feature vector corresponding to each first current signal sequence, the second feature vector corresponding to each second current signal sequence, and the third feature vector corresponding to each third current signal sequence.

[0007] As an improvement of the embodiment of the present invention, the first, second and third feature vectors each include: average current, amplitude symmetry factor, phase symmetry factor and number of current triangular changes.

[0008] As an improvement of this embodiment of the invention, the first, second, and third feature vectors each include: pulse amplitude distribution features, pulse interval statistical features, and energy features; the pulse amplitude features include: the maximum value, mean value, and pulse factor of the maximum pulse amplitude in the whole wave, and the maximum value, mean value, and pulse factor of the mean pulse amplitude in the whole wave; the pulse interval statistical features include: the maximum value, mean value, and pulse factor of the maximum pulse amplitude interval, and the maximum value, mean value, and pulse factor of the mean pulse amplitude in the whole wave; the energy features include the maximum value, mean value, and pulse factor of the mean energy in the whole wave, and the maximum value, mean value, and pulse factor of the pulse factor in the whole wave.

[0009] As an improvement to this embodiment of the invention, the processing further includes the following steps: dividing each full wave into multiple analysis windows, each analysis window containing WD sampling points, where WD is a natural number; then, calculating the average value of the signal maxima within all analysis windows, determining the extreme points that exceed a preset multiple of the average value as valid pulses, dividing the valid pulses into multiple intervals according to their amplitude, and calculating the sum of the corresponding pulse counts in all analysis windows for any interval.

[0010] As an improvement to this embodiment of the invention, in the arc fault detection model, the dual-stream temporal convolutional network architecture with multi-head self-attention mechanism consists of spatiotemporal features and current features. The spatiotemporal feature processing stream adopts a 4-layer dilated convolutional structure with dilation coefficients configured in [1,2,4,8]. Batch normalization and ReLU activation functions are added after each convolutional layer. The current characteristic analysis stream uses gated recurrent units combined with a channel attention mechanism to extract the temporal features of the current waveform. The feature fusion module achieves deep fusion of dual-stream features through a cross-attention mechanism, using fully connected layers and a softmax function to output classification probabilities.

[0011] This invention also provides an apparatus for creating an arc fault detection model, comprising the following modules: a data acquisition module for acquiring current data of several electrical appliances, wherein the current data of each electrical appliance includes: a first current signal sequence in normal state, a second current signal sequence in arcing state, and a third current signal sequence in gear switching state; the first, second, and third current signal sequences each contain multiple current signals arranged in chronological order; a feature vector extraction module for extracting a first feature vector corresponding to each first current signal sequence, a second feature vector corresponding to each second current signal sequence, and a third feature vector corresponding to each third current signal sequence; and a model creation module for constructing an arc fault detection model based on a multi-head self-attention temporal convolutional network, training the arc fault detection model based on all the first, second, and third feature vectors, and using an improved Bayesian optimization algorithm to adjust the parameters of the arc fault detection model during training, with the training objective being to maximize the Kappa coefficient.

[0012] As an improvement of this embodiment of the invention, the feature vector extraction module is further configured to: generate a first-order difference sequence Diff1 and a first-order difference absolute value sequence Abs1 corresponding to a first current signal sequence, generate a first-order difference sequence Diff2 and a first-order difference absolute value sequence Abs2 corresponding to a second current signal sequence, and generate a first-order difference sequence Diff3 and a first-order difference absolute value sequence Abs3 corresponding to a third current signal sequence; then, the first-order difference absolute value sequences Abs1, Abs2, and Abs3 are all processed as follows: first, they are divided into multiple full waves according to the power frequency period, each full wave containing a preset number of sampling points; then, a first feature vector corresponding to each first current signal sequence, a second feature vector corresponding to each second current signal sequence, and a third feature vector corresponding to each third current signal sequence are extracted.

[0013] This invention also provides a method for identifying arc faults, comprising the following steps: performing the above-described creation method to obtain an arc fault detection model; acquiring a current signal sequence of a target electrical appliance and extracting a feature vector corresponding to the current signal sequence; and inputting the feature vector into the arc fault detection model to detect arc faults in the target electrical appliance.

[0014] This invention also provides an arc fault identification device, comprising the following modules: an initialization module, comprising executing the above-described creation method to obtain an arc fault detection model; acquiring a current signal sequence of a target electrical appliance and extracting a feature vector corresponding to the current signal sequence; and a fault identification module, configured to input the feature vector into the arc fault detection model to detect arc faults in the target electrical appliance.

[0015] The method, identification method, and apparatus for creating an arc fault detection model provided in this invention have the following advantages: This invention discloses a method, identification method, and apparatus for creating an arc fault detection model. The creation method includes the following steps: acquiring current data from several electrical appliances, extracting feature vectors corresponding to the first, second, and third current signal sequences from the current data; constructing an arc fault detection model based on a multi-head self-attention temporal convolutional network; training the arc fault detection model based on all feature vectors; during the training process, using an improved Bayesian optimization algorithm to adjust the parameters of the arc fault detection model, with the training objective being to maximize the Kappa coefficient. This arc fault detection model can detect arc faults. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating the method for creating an arc fault detection model according to an embodiment of the present invention.

[0017] Figure 2 , Figure 3 , Figure 4 , Figure 5 , Figure 6 and Figure 7 This is an experimental result diagram of the arc fault detection model provided in the embodiment of the present invention. Detailed Implementation

[0018] The present invention will now be described in detail with reference to the embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the scope of protection of the present invention.

[0019] The following description and accompanying drawings fully illustrate specific embodiments described herein to enable those skilled in the art to practice them. Some embodiments may include or substitute parts and features of other embodiments. The scope of the embodiments herein encompasses the entire scope of the claims and all available equivalents thereof. Throughout this document, the terms “first,” “second,” etc., are used only to distinguish one element from another without requiring or implying any actual relationship or order between the elements. Indeed, a first element can also be referred to as a second element, and vice versa. Furthermore, the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a structure, apparatus, or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a structure, apparatus, or device. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the structure, apparatus, or device that includes said element. The various embodiments described herein are presented in a progressive manner, with each embodiment focusing on its differences from other embodiments; similar or identical parts between embodiments can be referred to interchangeably.

[0020] The terms "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer" used in this document to indicate orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings. They are used solely for the convenience of describing the document and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In the description herein, unless otherwise specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two elements; they can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0021] Embodiment 1 of the present invention provides a method for creating an arc fault detection model, such as... Figure 1 As shown, it includes the following steps: Step 101: Obtain current data of several electrical appliances. The current data of each electrical appliance includes: a first current signal sequence in normal state, a second current signal sequence in arcing state, and a third current signal sequence in gear switching state; the first, second and third current signal sequences each contain multiple current signals arranged in chronological order.

[0022] Here, the current data of electrical appliances can be collected by using the live wire and neutral wire cancellation method and the single-wire current acquisition method.

[0023] In a normal AC circuit, the live wire (phase wire) carries the current, and the neutral wire (neutral wire) carries the return current. Ideally, the current in the live wire and the current in the neutral wire are equal in magnitude and opposite in direction (because the current flows from the live wire into the appliance and then back to the power grid through the neutral wire, forming a closed loop). Using a cancellation approach, the opposite and equal magnitude characteristics of the live and neutral currents are utilized. Technical means (such as differential circuits or special windings of current transformers) are used to cancel out the current signals of the live and neutral wires. The purpose of this is usually to eliminate interference from normal loop currents and focus on the abnormal current that is actually being collected. After the live and neutral wires are canceled out, the original loop currents of the live and neutral wires are cancelled out. At this point, the current of a single wire (usually the live wire, but the neutral wire may be selected depending on the design) can be collected separately. The current collected in this step is no longer the current of a normal circuit, but a characteristic current signal that reflects the operating state of the appliance (e.g., normal or arcing). For example, during arcing, the circuit will experience abnormal discharge, and the current will exhibit sudden changes, high-frequency harmonics, and other special patterns. These patterns can be captured through single-wire acquisition. Logic live and neutral wire cancellation eliminates background interference (current in a normal circuit), while single-wire current acquisition extracts the target signal (the current characteristics of the appliance during operation / fault). Through this combination, current signals under different states can be acquired more accurately, providing a data foundation for subsequent needs such as determining whether arcing has occurred.

[0024] Here, the sampling frequency for canceling live and neutral wires can be 400,000 Hz, and the sampling length can be 80,000 points; the sampling frequency for single-wire current can be 20,000 Hz, and the sampling length can be 4,000 points of the signal.

[0025] Step 102: Extract the first feature vector corresponding to each first current signal sequence, the second feature vector corresponding to each second current signal sequence, and the third feature vector corresponding to each third current signal sequence.

[0026] Here, the first and second current signal sequences can be preprocessed. Then, three levels of feature dimensions—window-level, full-wave-level, and multi-full-wave-level—are constructed. Afterward, multi-dimensional feature parameters are extracted to form a structured feature space. The technical feature of "constructing three levels of feature dimensions—window-level, full-wave-level, and multi-full-wave-level"—is a hierarchical approach to feature extraction, gradually expanding the scope of features from local to global. Window-level: Imagine dividing the signal's time or data length into small windows, each containing a local segment of the signal. Extracting features within this small range captures the signal's local characteristics over a short time or within a small area. Full-wave-level: A full wave refers to a complete waveform cycle or a complete waveform signal. Building upon the window-level approach, the perspective is magnified to the complete waveform, extracting features possessed by the entire waveform. This yields more macroscopic information reflecting the overall waveform characteristics than the window-level approach. Multi-full-wave-level: Multiple full-wave signals are combined, and the features exhibited by these multiple full waves are extracted. This reflects the signal's patterns and characteristics over a longer time and more waveform cycles, representing a more macroscopic feature dimension. Through these three levels, from local to single complete waveform, and then to multiple waveforms, a rich feature dimension is gradually built up, just like from looking at a brick (window level), to looking at a wall (full-wave level), and then to looking at a building composed of several walls (multiple full-wave level), which can obtain information at different levels.

[0027] Subsequently, the first and second current signal sequences are divided into power frequency periods, low-frequency feature parameters are extracted, and a complete low-frequency feature vector is constructed (the frequency of the low-frequency feature vector is lower than a preset value). Thus, the first feature vector corresponding to each first current signal sequence and the second feature vector corresponding to each second current signal sequence are extracted.

[0028] In the power system, power frequency refers to the standard frequency of the power grid (50Hz in my country, corresponding to a period of time). Power frequency period division involves dividing a continuous current signal into independent periodic segments, using 50Hz periods as the unit. The purpose of this is to utilize the periodicity of the power frequency to make signal analysis more regular (the waveform of each period is repetitive under normal operating conditions); and to provide a unified time window for subsequent extraction of low-frequency features, allowing analysis once per period or in combination across multiple periods.

[0029] In a power system, the current signal, besides the fundamental component at the power frequency (50Hz), may also include: low-frequency components: signals with frequencies much lower than 50Hz (such as fluctuations at the level of a few Hz or even 0.1Hz), usually caused by load changes, equipment failures (such as motor stall, arcing), system oscillations, etc.; high-frequency harmonics: higher harmonics with frequencies that are integer multiples of 50Hz (such as 100Hz, 150Hz, etc.), mostly generated by nonlinear loads (such as frequency converters, rectifiers). Extracting low-frequency characteristic parameters involves focusing on and extracting key features with frequencies lower than the power frequency from the divided power frequency cycle signal. Common low-frequency features include: amplitude characteristics: the maximum / minimum amplitude and average amplitude of the low-frequency component; frequency characteristics: the dominant frequency of the low-frequency component (the most significant low-frequency frequency component); waveform characteristics: the waveform distortion rate and crest coefficient (the ratio of peak value to RMS value) of the low-frequency component; and timing characteristics: the changing trend of the low-frequency component over multiple power frequency cycles (such as the rate of increase / decrease of amplitude).

[0030] A feature vector is a multidimensional array that organizes multiple extracted low-frequency feature parameters according to certain rules (such as physical meaning or importance). For example, assuming that four features have been extracted: "maximum low-frequency amplitude A, dominant low-frequency frequency f, waveform distortion rate D, and amplitude change rate r", then the feature vector can be represented as: .

[0031] The purpose of constructing feature vectors is to integrate "scattered feature parameters" into a structured information carrier, which facilitates subsequent data analysis (such as fault diagnosis and load forecasting); and provides input features for algorithms such as machine learning and pattern recognition (algorithms distinguish different operating conditions or fault types through feature vectors).

[0032] The entire process starts with the power frequency current signal of the power system, first cutting the signal periodically, then filtering out the key low-frequency information, and finally organizing this information into a unified vector form to provide a foundation for subsequent power system monitoring, fault diagnosis and other applications.

[0033] Step 203: Construct an arc fault detection model based on a multi-head self-attention temporal convolutional network. Train the arc fault detection model based on all the first, second, and third feature vectors. During the training process, use an improved Bayesian optimization algorithm to adjust the parameters of the arc fault detection model, and the training objective is to maximize the Kappa coefficient.

[0034] Multi-head attention temporal convolutional networks (MTNs) are hybrid models combining multi-head self-attention mechanisms with convolutional neural networks, primarily used for processing time-series data (such as photovoltaic data and temperature prediction). Their core principle is to enhance the global dependency on sequential data through multi-head self-attention while simultaneously extracting local features using convolutional layers. Model Structure: This model typically comprises three core modules: Convolutional Layers: Extract local features from the input data through convolutional operations. Multi-head Self-attention Mechanism: Divide the input data into multiple subsequences, each focusing on key information at different time points, and integrates global dependencies through weighted averaging. Gate Recurrent Units (GRUs): Capture the contextual information of the time series through a bidirectional recurrent neural network.

[0035] An arc fault detection model was constructed, and the window length, pulse judgment threshold, number of analyzed full waves, and current difference threshold were optimized in a coordinated manner using an improved Bayesian optimization algorithm. The optimal parameter combination was obtained with the Kappa coefficient as the optimization objective.

[0036] Multi-head self-attention (MSA) allows models to focus on correlations at different locations in time-series data (such as the dependence of current signals at different times). Multi-head attention involves splitting the attention into multiple subspaces, learning correlations from different perspectives, and finally merging the results to more comprehensively capture the temporal features of current signals (such as abrupt changes and fluctuation patterns of current during arc faults). Temporal Convolutional Networks (TCNs) are convolutional networks specifically designed for processing time-series data. By dilating convolutions, they can expand the receptive field (i.e., the length of historical data the model can see) without increasing computational cost, effectively capturing long-term dependencies of current signals (such as the abnormal current accumulation in the seconds before an arc fault). This arc fault detection model combines the advantages of MSAs and TCNs to: use TCNs to extract local temporal patterns of current signals (such as short-duration pulses and waveform distortions), use MSAs to capture global temporal correlations (such as the connection between fault features at different times), and jointly identify arc faults (fault types characterized by abnormal current discharge, manifested as abrupt current changes, high-frequency pulses, etc.).

[0037] Bayesian optimization is an efficient hyperparameter search method. Its core is to use a probabilistic model (such as a Gaussian process) to model the relationship between parameters and performance, continuously select the most promising parameter combinations for testing, and reduce invalid attempts. Improved Bayesian optimization is an enhancement of classic algorithms (such as more efficient probabilistic models and better exploration-utilization balancing strategies) used to collaboratively optimize multiple key parameters, such as: 1. Window length: the length of the time window when dividing the current signal (e.g., taking a segment of the signal for analysis every 0.1 seconds), affecting the model's capture of short-term / long-term features; 2. Pulse detection threshold: the critical value for judging whether the current has a pulse (short-term large fluctuation), directly determining the accuracy of arc fault feature identification; 3. Number of full waves analyzed: the number of complete current waveforms (full waves) involved in the analysis, affecting the model's learning of multi-cycle fault patterns; 4. Current difference threshold: the critical value of the current change (difference), used to detect sudden changes in current (arc faults are often accompanied by sudden changes in current); 5. Collaborative optimization refers to the mutual influence of these parameters (e.g., window length and number of full waves jointly determine the amount of data, and threshold parameters jointly determine the fault detection sensitivity), requiring simultaneous optimization to obtain the optimal combination.

[0038] The Kappa coefficient is an evaluation metric for classification tasks, used to measure the consistency between the model's fault detection results and the actual situation. It is more robust than simple accuracy and can avoid the interference of data imbalance, such as when there are few fault samples but a high false detection rate.

[0039] The optimization objective is to enable the Bayesian optimization algorithm to maximize the Kappa coefficient when searching for parameters, and ultimately find a set of parameters (window length, pulse threshold, etc.) that maximizes the consistency between the model's arc fault detection results and the actual situation, i.e., the optimal parameter combination.

[0040] In this embodiment, the extraction of the first feature vector corresponding to each first current signal sequence, the second feature vector corresponding to each second current signal sequence, and the third feature vector corresponding to each third current signal sequence specifically includes: Generate the first-order difference sequence Diff1 and the first-order absolute difference sequence Abs1 corresponding to the first current signal sequence, generate the first-order difference sequence Diff2 and the first-order absolute difference sequence Abs2 corresponding to the second current signal sequence, and generate the first-order difference sequence Diff3 and the first-order absolute difference sequence Abs3 corresponding to the third current signal sequence.

[0041] Here, the first-order difference is the difference between two consecutive adjacent terms in a discrete function, and the absolute value of the first-order difference refers to the absolute value of the difference between two consecutive terms in a time series or dataset. The first-order difference sequence Diff1 is a sequence of the first-order differences corresponding to the first current signal sequence arranged in chronological order, and the first-order difference absolute value sequence Abs1 is a sequence of the absolute values ​​of the first-order differences corresponding to the first current signal sequence arranged in chronological order. Similarly, the first-order difference sequence Diff2 is a sequence of the first-order differences corresponding to the second current signal sequence arranged in chronological order, and the first-order difference absolute value sequence Abs2 is a sequence of the absolute values ​​of the first-order differences corresponding to the second current signal sequence arranged in chronological order. Likewise, the first-order difference sequence Diff3 is a sequence of the first-order differences corresponding to the third current signal sequence arranged in chronological order, and the first-order difference absolute value sequence Abs3 is a sequence of the absolute values ​​of the first-order differences corresponding to the third current signal sequence arranged in chronological order.

[0042] Assume the first current signal sequence, or the second current signal, or the third current signal sequence is... , ... First-order difference In practice, the inventor used a "semi-difference" method, that is... Where n and N are natural numbers, i = 1, 2, ..., N. The formula for the absolute value of the first-order difference is: .

[0043] Then, the first-order difference absolute value sequence Abs1, the first-order difference absolute value sequence Abs2, and the first-order difference absolute value sequence Abs3 are all processed as follows: first, they are divided into multiple full waves according to the power frequency period, and each full wave contains a preset number of sampling points. The full-wave signal partitioning method is as follows: the signal is divided into multiple full waves according to the power frequency cycle, and each full wave contains a preset number of sampling points. Here, the formula for calculating the preset number is: Where N is the total signal length. Indicates the sampling frequency. This indicates rounding down, where t is the corresponding time for one full-wave interval, which is optional; t=0.02.

[0044] Then, the first feature vector corresponding to each first current signal sequence, the second feature vector corresponding to each second current signal sequence, and the third feature vector corresponding to each third current signal sequence are extracted.

[0045] In this embodiment, the first, second and third feature vectors each contain: average current, amplitude symmetry factor, phase symmetry factor and number of current triangular changes.

[0046] Average current refers to the average value of the current over a certain period of time (such as one cycle of an appliance's operation or a period of stable operation). It reflects the overall magnitude of the current. Under normal operating conditions and under arcing conditions, the average current of an appliance will be significantly different (for example, the current may suddenly increase or decrease during arcing).

[0047] The amplitude symmetry factor is a parameter that measures whether the amplitude of alternating current is symmetrical in the positive and negative half-cycles (the positive and negative directions of the alternating current). In an ideal AC circuit, the amplitudes of the positive and negative half-cycles of the current are basically the same, and the symmetry factor is close to 1. Arcing will disrupt this symmetry, and the symmetry factor will deviate from the normal range.

[0048] The phase symmetry factor can focus on whether the phases of the positive and negative half-cycles of the alternating current are symmetrical. Under normal operation, the phase changes of the positive and negative half-cycles of the current follow the same pattern; arcing can cause sudden changes in the current, disrupting the phase balance and causing abnormal fluctuations in this parameter.

[0049] The number of triangular current changes refers to the number of times the current signal exhibits triangular wave-like changes within a set time period. The triangular changes in current are usually related to the linear rise / fall of the current. During arcing, the current exhibits frequent, abrupt, linear fluctuations, and this number increases significantly, making it one of the key characteristics distinguishing normal operation from arcing.

[0050] The formula for calculating average current is: Where LF(e,q) represents the q sampling points of the e-th full-wave, and this formula is used to calculate the average current of the e-th full-wave. It is obtained by averaging the sum of squares of the low-frequency signal amplitudes at Q sampling points. The meaning is: This is the low-frequency signal amplitude at the q-th sampling point of the e-th full-wave. The formula obtains the average current of a single full-wave by summing the squares of the amplitudes at the Q sampling points and taking the average. .

[0051] The formula for calculating the peak factor of the E full-wave average currents is as follows: This formula is used to calculate the peak factor of the E full-wave average currents. The maximum value of the average current The mean of the average current Divide to get. The meaning is: the peak factor is an indicator that measures the relative level of the maximum value of the average current with respect to its mean. This formula quantifies the dispersion or relative intensity of the average current in E full waves by the ratio of the maximum value to the mean. The larger the ratio, the stronger the extreme nature of the average current.

[0052] The formula for calculating the amplitude symmetry factor is as follows: Where DC is the DC component of the current signal. This formula is used to calculate the amplitude symmetry factor of the e-th full-wave. It is obtained by the absolute value of the ratio of the maximum positive deviation to the maximum negative deviation of the current signal relative to the DC component.

[0053] Formula for calculating the mean of E full-wave amplitude symmetry factors This formula is used to calculate the mean of the E amplitude symmetry factors in the full wave. It is obtained by averaging the amplitude symmetry factors of the E full waves.

[0054] It is the low-frequency signal amplitude at the q-th sampling point of the e-th full wave. It is the DC component of the current signal. The numerator is the maximum positive deviation of the signal relative to the DC component, and the denominator is the absolute value of the maximum negative deviation of the signal relative to the DC component (converted to positive). The absolute value of the ratio of the two is the amplitude symmetry factor, which is used to quantify the degree of symmetry of the signal relative to the DC component.

[0055] The meaning is: by averaging the amplitude symmetry factors of E full waves, the overall mean of the amplitude symmetry factors in all full waves is obtained, which is used to measure the average level of the amplitude symmetry characteristics of signals under multiple full waves.

[0056] Formula for calculating the maximum value of E full-wave amplitude symmetry factors .

[0057] The formula for calculating the phase symmetry factor is as follows: Where MaxLoc_LF(e,q) and MinLoc_LF(e,q) are the positions of the maximum and minimum values ​​in the e-th full wave, respectively. This formula is used to calculate the phase symmetry factor of the e-th full wave. It is obtained by the absolute value of the ratio of the position difference between the maximum and minimum values ​​of the signal to the half-cycle length.

[0058] The formula for calculating the pulse factor of E full-wave amplitude symmetry factors is as follows: This formula is used to calculate the pulse factor of E amplitude symmetry factors in a full-wave spectrum. The mean of the amplitude symmetry factor The maximum value of the amplitude symmetry factor Divide to get.

[0059] Phase symmetry factor , and These are the positions of the maximum and minimum values ​​of the signal in the e-th full wave, respectively, and Q is the number of sampling points in the full wave. The formula quantifies the symmetry of the signal in phase by dividing the difference between the positions of the maximum and minimum values ​​by the half-cycle length (Q / 2) and taking the absolute value. Meaning: Here, "pulse factor" is an index that measures the relative level of the mean of the amplitude symmetry factor with respect to its maximum value. This formula quantifies the dispersion or relative uniformity of the amplitude symmetry factors in the E full-wave by the ratio of the mean to the maximum value. The smaller the ratio, the stronger the extremity of the amplitude symmetry factor (i.e., the more significant the difference between the maximum value and the mean).

[0060] Formula for calculating the mean of the phase symmetry factors in E full waves Formula for calculating the maximum value of the phase symmetry factor in E full waves. Formula for calculating the mean of the phase symmetry factor in E full waves. .

[0061] The formula for calculating the quantity of current triangular changes is as follows: if or Where TrianglePulseNum is initially set to 0. CodeI(·) is the encoding of the current change trend, defined as follows: ,in, The threshold value for the difference between adjacent full-wave currents is obtained through optimized training.

[0062] In this embodiment, the first, second, and third feature vectors each include: pulse amplitude distribution features, pulse interval statistical features, and energy features; the pulse amplitude features include: the maximum value, mean value, and pulse factor of the maximum pulse amplitude in the whole wave, and the maximum value, mean value, and pulse factor of the mean pulse amplitude in the whole wave; the pulse interval statistical features include: the maximum value, mean value, and pulse factor of the maximum pulse amplitude interval, and the maximum value, mean value, and pulse factor of the mean pulse amplitude in the whole wave; the energy features include the maximum value, mean value, and pulse factor of the mean energy in the whole wave, and the maximum value, mean value, and pulse factor of the pulse factor in the whole wave.

[0063] Here, pulse amplitude distribution characteristics are used to describe the distribution law of pulse intensity, pulse interval statistical characteristics are used to describe the statistical law of pulse occurrence time interval, and energy characteristics are used to describe the statistical law of signal energy.

[0064] Pulse amplitude characteristics include: the maximum value, mean value, and pulse factor of the maximum pulse amplitude in the whole wave; and the maximum value, mean value, and pulse factor of the mean pulse amplitude in the whole wave. These are key indicators used to statistically analyze the pulse amplitude in the whole wave. Each indicator is extracted from the whole wave level (i.e., calculated based on the previously segmented whole wave signal), among which: The maximum value of the pulse amplitude in a full-wave test is the largest value among the maximum pulse amplitude values ​​of each full-wave test (reflecting the ultimate intensity of the strongest pulse). The formula for calculating the maximum value of the pulse amplitude values ​​in E full-wave tests is as follows: Where E is the number of waves and L is the number of dimensions. This represents the number of pulses in the l-th dimension; this formula is used to calculate the maximum value of the pulse amplitude among E full waves. It is obtained by performing a triple maximum value operation, that is, first taking the maximum value for each pulse k, then taking the maximum value for each dimension l, and finally taking the maximum value for each full wave e.

[0065] The mean of the maximum pulse amplitudes across all full waves is the arithmetic mean of the maximum pulse amplitudes across all full waves (reflecting the average level of the strongest pulses across all full waves). The formula for calculating the mean of the maximum pulse amplitudes across E full waves is... ,in, Let represent the amplitude of the e-th full wave, the l-th dimension, and the k-th pulse. The formula first takes the maximum amplitude of all pulses k within each dimension l, then averages the maximum amplitudes across L dimensions to obtain the average maximum amplitude of pulses within a single full wave. Finally, it averages these averages across E full waves to obtain the overall average maximum amplitude of pulses across all full waves. .

[0066] The pulse factor of the maximum pulse amplitude in a full-wave dataset is calculated for all full-wave pulse amplitudes, and then statistically analyzed (pulse factor = peak value / effective value, reflecting the concentration of amplitude). The formula for calculating the pulse factor of the maximum pulse amplitude in E full-wave datasets is as follows: This formula is used to calculate the pulse factor of the maximum pulse amplitude in E full waves. The maximum value of the pulse amplitude The average of the maximum pulse amplitude The result is obtained by dividing the two. The pulse factor is an index that measures the relative level of the maximum amplitude of a pulse signal with respect to its mean. This formula quantifies the dispersion or relative intensity of the maximum pulse amplitude in E full waves by the ratio of the maximum value to the mean. The larger the ratio, the stronger the extreme nature of the maximum pulse amplitude.

[0067] The maximum value of the average pulse amplitude across all waves is the largest value among the average pulse amplitudes of each full wave (reflecting the peak value of the overall intensity of a given full wave pulse). The formula for calculating the maximum value of the average pulse amplitude across E full waves is as follows: This formula is used to calculate the maximum value of the average pulse amplitude in E full waves. This is obtained by first averaging the pulse amplitude in each dimension, and then maximizing the average of all full waves. Let represent the amplitude of the e-th full wave, the l-th dimension, and the k-th pulse. The formula first averages the amplitudes of the K_l pulses within each dimension l, then averages the averages across the L dimensions to obtain the average pulse amplitude within a single full wave. Finally, it takes the maximum value of this average among the E full waves to obtain the final amplitude. .

[0068] The mean of the pulse amplitude across all full waves is calculated as the arithmetic mean of the pulse amplitudes across all full waves (reflecting the average level of the overall intensity of all full-wave pulses). The formula for calculating the mean of the pulse amplitudes across E full waves is as follows: This formula is used to calculate the mean of the pulse amplitude values ​​in E full waves. The average value is obtained by first averaging the pulse amplitude in each dimension, then averaging across all dimensions, and finally averaging across all full waves. Let represent the amplitude of the e-th full wave, the l-th dimension, and the k-th pulse. The formula first takes the average amplitude of the K_l pulses within each dimension l, then averages the average amplitudes across L dimensions to obtain the average pulse amplitude within a single full wave, and finally averages this average across E full waves to obtain the overall average pulse amplitude across all full waves. .

[0069] The pulse factor of the average pulse amplitude across all waves is calculated by taking the average pulse amplitude of each wave and then statistically analyzing the results (reflecting the concentration of the overall pulse intensity across all waves). The formula for calculating the pulse factor of the average pulse amplitude across E waves is as follows: This formula is used to calculate the pulse factor of the average pulse amplitude in E full waves. The maximum value of the average pulse amplitude The mean of the pulse amplitude The result is obtained by division. The pulse factor is an index that measures the relative level of the maximum value of the average amplitude of a pulse signal relative to its mean. This formula quantifies the dispersion or relative intensity of the average pulse amplitude in E full waves by using the ratio of the maximum value to the mean. The larger the ratio, the stronger the extreme nature of the average pulse amplitude.

[0070] Pulse interval statistical characteristics include the maximum value, mean value, and pulse factor of the maximum pulse amplitude interval, and the maximum value, mean value, and pulse factor of the pulse amplitude across the entire wave. These are key indicators used to statistically determine the time interval between pulses, and are also calculated based on the entire wave level. The maximum value of the pulse interval in a full-wave sequence is specifically determined by taking the largest value among the maximum pulse interval values ​​for each full-wave sequence (reflecting the longest pulse interval limit). The formula for calculating the maximum value of the pulse intervals in E full-wave sequences is:

[0071] , This formula is used to calculate the maximum value of the pulse interval in E full waves. It is obtained through triple maximum value operation (first take the maximum value for each pulse interval k, then take the maximum value for each dimension l, and finally take the maximum value for each full wave e). This represents the duration of the e-th full-wavelength, the l-th dimension, and the k-th pulse interval. The formula obtains the maximum pulse interval value within each dimension by taking the maximum value layer by layer, then the maximum value within each full-wavelength, and finally the global maximum value of all pulse intervals by taking the maximum value among E full-wavelengths. .

[0072] The mean of the maximum pulse intervals across all waves is specifically calculated as the arithmetic mean of the maximum pulse intervals across all waves (reflecting the average level of the longest pulse intervals across all waves). The formula for calculating the mean of the maximum pulse intervals across E waves is as follows: This formula is used to calculate the mean of the maximum pulse interval values ​​in E full waves. The value is obtained by first taking the maximum value of the pulse interval in each dimension, then taking the average value of all dimensions, and finally taking the average value of all full waves. Let represent the duration of the e-th full-wave, the l-th dimension, and the k-th pulse interval. The formula first takes the maximum duration of all pulse intervals k within each dimension l, then averages the maximum durations across L dimensions to obtain the average maximum pulse interval value within a single full-wave. Finally, it averages these average values ​​across E full-waves to obtain the overall average maximum pulse interval value across all full-waves. .

[0073] The pulse factor of the maximum pulse interval in the entire wave is specifically calculated as follows: the pulse factor of the maximum pulse interval of all waves is calculated separately and then statistically analyzed (reflecting the concentration of the maximum pulse interval values). The formula for calculating the pulse factor of the maximum pulse interval in E waves is as follows: This formula is used to calculate the pulse factor of the maximum pulse interval in E full waves. The maximum value of the pulse interval The average of the maximum pulse interval The result is obtained by division. The pulse factor is an index that measures the relative level of the maximum pulse interval value with respect to its mean. This formula quantifies the dispersion or relative sparsity of the maximum pulse interval values ​​in E full waves by the ratio of the maximum value to the mean. The larger the ratio, the stronger the extreme nature of the maximum pulse interval value (i.e., the more prominent the sparse extreme values ​​of the pulse distribution).

[0074] The maximum value of the average pulse interval across all waves is specifically determined by taking the largest value among the average pulse intervals of each full wave (reflecting the overall maximum level of pulse intervals for a given full wave). The formula for calculating the maximum value of the average pulse intervals across E full waves is as follows: This formula is used to calculate the maximum value of the average pulse interval in E full waves. It is obtained by first averaging the pulse intervals in each dimension, and then maximizing the average of all full waves. This represents the duration of the e-th full wave, the l-th dimension, and the k-th pulse interval. The formula first averages the durations of the K_l-1 pulse intervals within each dimension l, then averages the averages across the L dimensions to obtain the average pulse interval within a single full wave. Finally, it takes the maximum value of this average across E full waves to obtain the final value. .

[0075] The mean of the pulse intervals across all waves is specifically calculated as the arithmetic mean of the pulse intervals across all waves (reflecting the overall average level of pulse intervals across all waves). The formula for calculating the mean of the pulse intervals across E waves is: , This formula is used to calculate the mean of the pulse intervals in E full waves. The average value is obtained by first averaging the pulse intervals in each dimension, then averaging across all dimensions, and finally averaging across all full waves. This represents the duration of the e-th full-wave interval, the l-th dimension, and the k-th pulse interval. The formula first calculates the duration within each dimension l. The average pulse interval is calculated by taking the duration of -1 pulse intervals, then averaging the averages across L dimensions to obtain the average pulse interval within a single full-wavelength. Finally, the average of this average across E full-wavelengths is obtained to obtain the overall average pulse interval across all full-wavelengths. .

[0076] The pulse factor of the average pulse interval in the entire wave is specifically calculated as follows: the pulse factor of the average pulse interval of all waves is calculated separately and then statistically analyzed (reflecting the overall concentration of pulse intervals across all waves). The formula for calculating the pulse factor of the average pulse interval in E waves is as follows: This formula is used to calculate the pulse factor of the mean pulse interval in E full waves. The maximum value of the average pulse interval The mean of the pulse interval The result is obtained by division. The pulse factor is an index that measures the relative level of the maximum value of the pulse interval mean relative to its mean. This formula quantifies the dispersion or relative sparsity of the pulse interval mean in E full waves by the ratio of the maximum value to the mean. The larger the ratio, the stronger the extreme of the pulse interval mean (i.e., the more prominent the extreme value of the average sparsity of the pulse distribution).

[0077] Energy characteristics include the maximum value, mean, and impulse factor of the energy across the entire wave, as well as the maximum value, mean, and impulse factor of the impulse factor across the entire wave. These are key indicators used to statistically analyze the signal energy across the entire wave, and are calculated based on the energy at the entire wave level.

[0078] The maximum value of the energy mean across all waves is specifically determined by taking the largest value among the energy mean values ​​of each of the entire waves (reflecting the peak value of the overall energy of a given wave). The formula for calculating the maximum value of the energy mean across E waves is as follows: This formula is used to calculate the maximum energy mean E_Max across E full waves. It is obtained by summing the energy means of L dimensions within each full wave and then taking the maximum value among the E full waves. EN(e,l) is the energy mean of the e-th full wave and the l-th dimension. The formula first sums the energy means of L dimensions within each full wave to obtain the total energy mean of a single full wave, and then takes the maximum value of this total mean across E full waves to obtain E_Max.

[0079] The mean of the energy across all waves is specifically calculated as the arithmetic mean of the energy mean of all waves (reflecting the overall average level of energy across all waves). The formula for calculating the mean of the energy mean across E waves is as follows: In the formula, the mean energy of the l-th full wave in the e-th full wave is... This formula is used to calculate the mean E_Mean of the energy mean across E full waves. It is obtained by first averaging the energy within each full wave, and then averaging across all full waves. Next, the mean energy EN(e,l) of the l-th dimension in the e-th full wave is calculated by averaging the sum of squares of WD high-frequency differences. Here, EN(e,l) is the mean energy of the e-th full wave and the l-th dimension. The formula first averages the mean energy of L dimensions within each full wave, and then averages this mean across E full waves to obtain the overall mean E_Mean of the energy mean across all full waves. AbsDiffHF(n) is the absolute difference of the high-frequency signal (reflecting high-frequency energy fluctuations). It is obtained by summing the squares of WD differences and averaging them to obtain the mean energy EN(e,l) for a single full wave dimension.

[0080] The pulse factor of the energy mean in the whole wave is specifically calculated as follows: the pulse factor of the energy mean of all whole waves is calculated separately and then statistically analyzed (reflecting the concentration of energy in each whole wave). The formula for calculating the pulse factor of the energy mean of E whole waves is as follows: This formula is used to calculate the impulse factor E_Index of the energy mean across E full waves. It is obtained by dividing the maximum energy mean E_Max by the mean energy mean E_Mean. The impulse factor is an indicator that measures the relative level of the maximum energy mean compared to its mean. This formula quantifies the dispersion or relative intensity of the energy mean across E full waves by the ratio of the maximum to the mean. The larger the ratio, the stronger the extremity of the energy mean (i.e., the more significant the difference between the extreme values ​​and the average level of the energy distribution).

[0081] The maximum value of the pulse factor in a full-wave sequence is specifically determined by taking the largest value among the pulse factors of each full-wave sequence (reflecting the limiting level of the pulse factor for a given full-wave sequence). The formula for calculating the maximum value of the pulse factor in E full-wave sequences is as follows: This formula is used to calculate the maximum value of the impulse factor in E full waves. The total pulse factor is obtained by summing the L-dimensional pulse factors within each full wave and then taking the maximum value among E full waves. pIndex(e,l) is the pulse factor of the e-th full wave and the l-th dimension. The formula first sums the L-dimensional pulse factors within each full wave to obtain the total pulse factor of a single full wave, and then takes the maximum value of this total factor among E full waves to obtain the total pulse factor. .

[0082] The mean of the pulse factor in the entire wave is specifically calculated as the arithmetic mean of the pulse factors of all waves (reflecting the average level of the pulse factors of all waves). The formula for calculating the mean of the pulse factors in E waves is as follows: pIndex(l) is the impulse factor of the sample in the l-th WD window: This formula is used to calculate the mean of the impulse factor in E full waves. The value is obtained by first averaging the pulse factors within each full-wave, and then averaging them across all full-waves. pIndex(e,l) represents the pulse factor of the e-th full-wave and the l-th dimension. The formula first averages the pulse factors of the L dimensions within each full-wave (by dividing by N and averaging), then averages these averages across the E full-waves to obtain the overall average of the pulse factors across all full-waves. This formula is used to calculate the impulse factor pIndex(e,l) for the e-th full-wave and l-th dimension. It is obtained by dividing the maximum value of the high-frequency absolute differences by the mean of the high-frequency absolute differences. AbsDiffHF(i) is the absolute difference of the high-frequency signal (reflecting high-frequency energy fluctuations). In the formula, the numerator is the maximum value of WD high-frequency absolute differences, and the denominator is the mean of WD high-frequency absolute differences. The ratio of the two is the impulse factor pIndex(e,l) for that full-wave dimension, used to quantify the relative level of the maximum value of the high-frequency differences with respect to their mean.

[0083] The pulse factor in the full-wave pulse factor is specifically defined as: the pulse factor of all full-wave pulse factors, calculated separately and then statistically analyzed (reflecting the concentration of pulse factors in each full-wave pulse factor). The formula for calculating the pulse factor in E full-wave pulse factors is as follows: This formula is used to calculate the pulse factor of E full-wave pulse factors. Through the maximum value of the pulse factor With the mean of the impulse factor The result is obtained by division. Meaning: Here, "pulse factor of pulse factor" is an indicator that measures the relative level of the maximum value of the pulse factor with respect to its mean. This formula quantifies the dispersion or relative extremes of the pulse factor in E full waves by the ratio of the maximum value to the mean. The larger the ratio, the stronger the extremes of the pulse factor (i.e., the more significant the difference between the maximum value and the average value of the pulse factor).

[0084] In summary, the essence of the feature design approach is "dimensional classification + full-wave statistics + triple statistics": first, the signal is divided into three dimensions: amplitude, interval, and energy; then, indicators are extracted for each dimension at the "full-wave level"; finally, the signal is further quantified using "maximum value, mean value, and pulse factor", ultimately forming a multi-dimensional feature that can comprehensively characterize the fault pulse signal, providing sufficient basis for subsequent model detection.

[0085] In this embodiment, the processing further includes the following steps: dividing each full wave into multiple analysis windows, each analysis window containing WD sampling points, where WD is a natural number; then, calculating the average value of the signal maxima within all analysis windows, determining the extreme points that exceed a preset multiple of the average value as valid pulses, dividing the valid pulses into multiple intervals according to their amplitude, and calculating the sum of the corresponding pulse counts in all analysis windows for any interval.

[0086] The window segmentation method is as follows: each full-wavelength sample is divided into multiple analysis windows, each containing WD sampling points, where WD is a natural number, and WD < WD. , The sampling point length corresponds to a full-wavelength (e.g., a time length of 20ms).

[0087] The precise pulse definition process is as follows: calculate the average value of the signal maxima within all analysis windows as a benchmark, determine the extreme points that exceed the benchmark by a preset multiple as valid pulses, and obtain the sum of the number of pulses in all analysis windows.

[0088] The formula for calculating the mean is: ,in, Let J be the maximum value of the signal in the l-th WD window of the e-th full-wave waveform, and J be the number of maxima.

[0089] The pulse count includes dividing the pulses into multiple intervals based on amplitude and counting them separately. For example, if there are three intervals, they include pulses with amplitudes less than 600, pulses between 600 and 2000, and pulses greater than 2000. The formula for calculating the sum of the pulse counts in each interval is as follows: In the formula, e is the full-wave index, l is the window index, and K(e,l) is the number of pulses with the required amplitude in each interval.

[0090] In this embodiment, the arc fault detection model employs a multi-head self-attention mechanism-based dual-stream temporal convolutional network architecture composed of spatiotemporal features and current features. The spatiotemporal feature processing stream uses a 4-layer dilated convolutional structure with dilation coefficients configured in the order [1, 2, 4, 8]. Batch normalization and ReLU activation functions are added after each convolutional layer. The current characteristic analysis stream uses a gated recurrent unit combined with a channel attention mechanism to extract the temporal features of the current waveform. The feature fusion module achieves deep fusion of the dual-stream features through a cross-attention mechanism, using fully connected layers and a softmax function to output classification probabilities.

[0091] The core idea of ​​this arc fault identification model is to "divide the flow to extract features, then perform deep fusion for classification". Specifically, it is divided into two branches: spatiotemporal feature processing flow and current characteristic analysis flow. Finally, the features are fused through cross-attention and then the fault identification result is output through a fully connected layer.

[0092] The spatiotemporal feature processing flow includes dilated convolution + normalization + activation. Traditional convolution has a limited receptive field, while dilated convolution expands the receptive field through interval sampling (for example, when the dilation coefficient is 2, the convolution kernel will skip one element sampling). Here, four layers of dilated convolution are used, with dilation coefficients of [1, 2, 4, 8], which can progressively expand the perception range of spatiotemporal patterns of arc faults (looking at both local details and long-range patterns). Batch normalization is used because the data distribution after convolution may be unstable; batch normalization can accelerate training, improve stability, and make the input distribution of each layer more consistent. The ReLU activation function introduces nonlinearity into the network, allowing the model to learn more complex arc fault features (such as nonlinear patterns like current abrupt changes and waveform distortion).

[0093] Gated Recurrent Units (GRUs) are a variant of Recurrent Neural Networks (RNNs) that excel at capturing long dependencies in time-series data. For example, arc fault current is a waveform that changes over time, and GRUs can remember the current characteristics of past moments and relate them to the current moment. Channel attention mechanisms are used because current data has multiple channels (e.g., current signals from different phases or different sensors). Channel attention assigns higher weights to more critical channels (e.g., if the current distortion is more pronounced in a certain phase during a fault, that channel will receive more attention), thereby accurately extracting the time-series fault features of the current waveform.

[0094] The core of the feature fusion module is to enable the features of the two flows to "perceive each other and complement each other." The spatial-temporal patterns of the spatiotemporal flow (such as the location and duration of the arc) and the temporal waveform features of the current flow (such as current abrupt changes and oscillation patterns) are dynamically adjusted by cross-attention (for example, if the spatiotemporal features of a certain type of fault are more critical, the weight of the spatiotemporal flow is increased; conversely, the weight of the current flow is increased), ultimately fusing a more comprehensive set of fault features.

[0095] Fully connected layers can compress the fused high-dimensional features into a vector with the number of categories (for example, binary classification outputs a 2-dimensional vector).

[0096] The Softmax function can convert a vector into probabilities belonging to each category (for example, outputting [0.9, 0.1], indicating a 90% probability of a fault and a 10% probability of normal), thereby completing the identification / classification of arc faults.

[0097] To improve the model's performance on real arc data, four key parameters need to be optimized: window length (how many time points to analyze), pulse determination threshold (how strong a pulse is considered a fault signal), number of complete waveforms analyzed (how many complete current waveforms to use), and current difference threshold (how much current change is considered a sudden change).

[0098] The optimization objective is to select the Kappa coefficient (a metric for classifying accuracy and correcting for random errors) to make the model more reliable in "fault vs. normal" classification. The optimization method is an improved Bayesian optimization, which can intelligently guess parameter combinations and efficiently find the optimal solution, much faster than brute-force enumeration of all parameters.

[0099] The optimization objective is defined as: , ,in, . This represents the average accuracy of the machine learning algorithm for arc identification. The expression lb≤θ≤ub represents the upper and lower boundary conditions of the parameters. Parameter optimization employs a boundary constraint mechanism, and the ranges of each parameter are as follows: , , , .

[0100] Embodiment 2 of the present invention provides a device for creating an arc fault detection model, comprising the following modules: The data acquisition module is used to acquire current data of several electrical appliances. The current data of each electrical appliance includes: a first current signal sequence in the normal state, a second current signal sequence in the arcing state, and a third current signal sequence in the gear switching state. The first, second and third current signal sequences each contain multiple current signals arranged in chronological order.

[0101] The feature vector extraction module is used to extract the first feature vector corresponding to each first current signal sequence, the second feature vector corresponding to each second current signal sequence, and the third feature vector corresponding to each third current signal sequence.

[0102] The model creation module is used to construct an arc fault detection model based on a multi-head self-attention temporal convolutional network. The arc fault detection model is trained based on all the first, second, and third feature vectors. During the training process, an improved Bayesian optimization algorithm is used to adjust the parameters of the arc fault detection model, and the training objective is to maximize the Kappa coefficient.

[0103] In this embodiment, the feature vector extraction module is further used for: Generate the first-order difference sequence Diff1 and the first-order absolute difference sequence Abs1 corresponding to the first current signal sequence, generate the first-order difference sequence Diff2 and the first-order absolute difference sequence Abs2 corresponding to the second current signal sequence, and generate the first-order difference sequence Diff3 and the first-order absolute difference sequence Abs3 corresponding to the third current signal sequence.

[0104] Then, the first-order difference absolute value sequence Abs1, the first-order difference absolute value sequence Abs2, and the first-order difference absolute value sequence Abs3 are all processed as follows: first, they are divided into multiple full waves according to the power frequency period, and each full wave contains a preset number of sampling points. Then, the first feature vector corresponding to each first current signal sequence, the second feature vector corresponding to each second current signal sequence, and the third feature vector corresponding to each third current signal sequence are extracted.

[0105] Embodiment 3 of the present invention provides a method for identifying arc faults, comprising the following steps: Step 1: Execute the creation method in Example 1 to obtain the arc fault detection model; obtain the current signal sequence of the target electrical appliance and extract the feature vector corresponding to the current signal sequence.

[0106] Step 2: Input the feature vector into the arc fault detection model to detect arc faults in the target electrical appliance.

[0107] Embodiment 4 of the present invention provides an arc fault identification device, comprising the following modules: The initialization module includes executing the creation method in Embodiment 1 to obtain an arc fault detection model; acquiring the current signal sequence of the target electrical appliance; and extracting the feature vector corresponding to the current signal sequence.

[0108] The fault identification module is used to input the feature vector into the arc fault detection model, thereby detecting arc faults in the target electrical appliance.

[0109] In practice, the inventors deployed the arc fault detection model on a computer. Specifically, on an embedded platform, an STM32H7 series microprocessor running the FreeRTOS real-time operating system can be used; in industrial settings, an x86-based industrial control computer running Linux can be used; and on mobile terminals, it can be adapted to Android and iOS platforms, achieving efficient inference through model quantization technology. All deployment schemes utilize a unified API interface for model invocation and data interaction, ensuring the consistency and reliability of the detection algorithm.

[0110] In the actual experiment, the inventors constructed an arc fault detection database using a multi-scale signal acquisition system. This database collected single-load and mixed-load current signals from different electrical appliances under normal operating conditions, gear switching conditions, and arcing conditions. The sampling system employed a dual-channel synchronous acquisition scheme: the sampling frequency for the live / neutral cancellation channel was set to 400kHz, and the sampling frequency for the single-wire current channel was set to 20kHz, with data lengths of 80,000 and 4,000 points respectively. Twenty-three typical loads, including resistive, inductive, inductive power supply, and switching power supply types, were selected as test objects. During the experiment, the system acquired current signals from each load under normal operating conditions, simulated transient interference signals generated during various normal operations, and arcing fault signals simulated using an arc generator. A total of 1200 sets of valid current signals were acquired.

[0111] Experimental equipment configuration: Intel(R) UHD Graphics / NVIDIA GeForce RTX 2060, Windows 10 64-bit system, base frequency 2.5GHz, 16 GB memory. Simulation software: Matlab2020a.

[0112] Figure 2 , Figure 3 , Figure 4 , Figure 5 , Figure 6 and Figure 7 The current signal waveforms of the acquired load under normal operating conditions, gear switching, and arcing conditions are displayed. Figure 2 This is the waveform of an electric fan operating normally. Figure 3 This is a waveform for switching fan speeds. Figure 4 The arc waveform of the electric fan. Figure 5 This is the normal waveform for a Jinbao electric screwdriver. Figure 6 The waveform for the power setting switch of the Kinpo electric screwdriver. Figure 7The analysis revealed that electrical appliances like electric fans, which involve plugging and unplugging devices or have mechanical switches, generate transient pulse waveforms similar to arcing during speed changes or plugging / unplugging. These interference signals are short in duration but their amplitude characteristics are highly similar to those of a real electric arc. In contrast, appliances with poor electromagnetic properties, such as the Jinbao electric screwdriver, generate longer-lasting and more complex interference signals during mode switching. These signals exhibit a high degree of overlap with real electric arc waveforms in both the time and frequency domains.

[0113] Furthermore, for a 16-bit ADC with an input of 0V~5V, the DC component of the high-frequency current signal is 2.500V. Therefore, the value of b is 32768, corresponding to a voltage amplitude of 2.500V. The window length WD, pulse judgment value Amp, number of full-wave analyses E, and current differential threshold I are set. TH These four parameters are initialized as follows: WD takes the value of any integer from 2 to 512, Amp takes the value of any integer from 1 to 128, E takes the value of any integer from 3 to 10, and I... TH The value of is any real number between 0 and 0.1.

[0114] Furthermore, the dataset was randomly divided into training, validation, and test sets, and the model was trained using cross-validation. To reduce the impact of the input sample order on the results, the training and test set samples were randomly changed. The model was trained 50 times to obtain the mean of the model parameters, i.e., K=50, which was used as the final classification model.

[0115] The multi-scale feature parameter vector is 5000x45 in size. 3000x45 feature vectors were randomly selected as the training set, 1000x45 feature vectors as the validation set, and 1000x45 feature vectors as the test set.

[0116] The features of the training dataset were randomly changed 50 times to reduce the impact of input data differences. The program was run 50 times to verify the classification accuracy of the multi-head self-attention temporal convolutional network. The arcing state was labeled as 1, and the normal working state and gear shifting state were labeled as 0. Table 1 summarizes the average performance metrics of each classification method after 50 independent experiments. The results show that the multi-head self-attention temporal convolutional network proposed in this invention outperforms traditional machine learning methods in key metrics such as precision, recall, F1 score, and Kappa coefficient.

[0117] Table 1. Classification Results (Mean ± Standard Deviation)

[0118] The performance of the trained arc fault detection model was evaluated. Table 2 shows the optimization results of the Bayesian optimization algorithm, where WD represents the window length, Amp represents the pulse determination threshold, E represents the number of full waves analyzed, and I represents the number of full waves analyzed. TH This represents the current difference value. The optimal parameter combination obtained through the Bayesian optimization algorithm is WD=64, Amp=4, E=8, I... TH =0.04. Under this parameter configuration, the designed low-voltage AC series arc fault detection model based on multi-head self-attention temporal convolutional network achieves the highest Kappa coefficient of 99.92% on the test set, which is significantly better than other parameter combinations.

[0119] Table 2. Optimization results (mean) of the Bayesian optimization algorithm

[0120] It should be noted that although the steps are described in a specific order above, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently, or even in a different order, as long as the required function can be achieved.

[0121] This invention can be a system, method, and / or computer program product. A computer program product may include a readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the invention.

[0122] A readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. Readable storage media can include, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof.

[0123] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for creating an arc fault detection model, characterized in that, Includes the following steps: Acquire current data of several electrical appliances. The current data of each electrical appliance includes: a first current signal sequence under normal conditions, a second current signal sequence under arcing conditions, and a third current signal sequence under gear switching conditions; the first, second, and third current signal sequences each contain multiple current signals arranged in chronological order. First, generate a first-order difference sequence Diff1 and a first-order absolute difference sequence Abs1 corresponding to a first current signal sequence; generate a first-order difference sequence Diff2 and a first-order absolute difference sequence Abs2 corresponding to a second current signal sequence; and generate a first-order difference sequence Diff3 and a first-order absolute difference sequence Abs3 corresponding to a third current signal sequence. Then, perform the following processing on each of the first-order absolute difference sequences Abs1, Abs2, and Abs3: first, divide them into multiple full waves according to the power frequency period, with each full wave containing a preset number of sampling points; then, extract the first feature vector corresponding to each first current signal sequence, the second feature vector corresponding to each second current signal sequence, and the third feature vector corresponding to each third current signal sequence. An arc fault detection model is constructed based on a multi-head self-attention temporal convolutional network. The arc fault detection model is trained based on all the first, second, and third feature vectors. During the training process, an improved Bayesian optimization algorithm is used to adjust the parameters of the arc fault detection model, and the training objective is to maximize the Kappa coefficient. Each full wave is divided into multiple analysis windows, and each analysis window contains WD sampling points, where WD is a natural number. Then, the average value of the signal maxima in all analysis windows is calculated. Extreme points that exceed a preset multiple of the average value are determined as valid pulses. Valid pulses are divided into multiple intervals according to amplitude, and the sum of the corresponding pulse counts in all analysis windows for any interval is calculated.

2. The creation method according to claim 1, characterized in that, The first, second, and third eigenvectors all contain: average current, amplitude symmetry factor, phase symmetry factor, and the number of current triangular changes.

3. The creation method according to claim 1, characterized in that, The first, second, and third feature vectors all contain: pulse amplitude distribution features, pulse interval statistical features, and energy features; The pulse amplitude characteristics include: the maximum value, mean value, and pulse factor of the maximum pulse amplitude in the whole wave, and the maximum value, mean value, and pulse factor of the mean pulse amplitude in the whole wave; The pulse interval statistical characteristics include: the maximum value, mean value, and pulse factor of the maximum pulse amplitude interval, and the maximum value, mean value, and pulse factor of the mean pulse amplitude in the whole wave; The energy characteristics include the maximum value, mean, and pulse factor of the energy mean in the whole wave, as well as the maximum value, mean, and pulse factor of the pulse factor in the whole wave.

4. The creation method according to claim 1, characterized in that, In the arc fault detection model, the dual-stream temporal convolutional network architecture with multi-head self-attention mechanism consists of spatiotemporal features and current features; the spatiotemporal feature processing stream adopts a 4-layer dilated convolutional structure with dilation coefficients configured according to [1,2,4,8], and batch normalization and ReLU activation function are added after each convolutional layer; the current characteristic analysis stream adopts a gated recurrent unit combined with a channel attention mechanism to extract the temporal features of the current waveform. The feature fusion module achieves deep fusion of dual-stream features through a cross-attention mechanism and uses a fully connected layer and a softmax function to output classification probabilities.

5. A device for creating an arc fault detection model, characterized in that, Includes the following modules: The data acquisition module is used to acquire the current data of several electrical appliances. The current data of each electrical appliance includes: a first current signal sequence in the normal state, a second current signal sequence in the arcing state, and a third current signal sequence in the gear switching state; the first, second and third current signal sequences each contain multiple current signals arranged in chronological order. The feature vector extraction module is used to generate the first-order difference sequence Diff1 and the first-order absolute difference sequence Abs1 corresponding to the first current signal sequence, the first-order difference sequence Diff2 and the first-order absolute difference sequence Abs2 corresponding to the second current signal sequence, and the first-order difference sequence Diff3 and the first-order absolute difference sequence Abs3 corresponding to the third current signal sequence. Then, the first-order absolute difference sequences Abs1, Abs2, and Abs3 are all processed as follows: first, they are divided into multiple full waves according to the power frequency period, and each full wave contains a preset number of sampling points; then, the first feature vector corresponding to each first current signal sequence, the second feature vector corresponding to each second current signal sequence, and the third feature vector corresponding to each third current signal sequence are extracted. The model creation module is used to construct an arc fault detection model based on a multi-head self-attention temporal convolutional network. The model is trained using all first, second, and third feature vectors. During training, an improved Bayesian optimization algorithm is used to adjust the parameters of the arc fault detection model, with the training objective being to maximize the Kappa coefficient. Each full wave is divided into multiple analysis windows, each containing WD sampling points, where WD is a natural number. Then, the average of the signal maxima within all analysis windows is calculated. Extreme points exceeding a preset multiple of the average are determined as valid pulses. Valid pulses are divided into multiple intervals based on amplitude, and the sum of the corresponding pulse counts in all analysis windows for any given interval is calculated.

6. A method for identifying arc faults, characterized in that, Includes the following steps: By performing the creation method according to any one of claims 1-4, an arc fault detection model is obtained; the current signal sequence of the target electrical appliance is acquired, and the feature vector corresponding to the current signal sequence is extracted; The feature vector is input into the arc fault detection model to detect arc faults in the target electrical appliance.

7. A device for identifying arc faults, characterized in that, Includes the following modules: An initialization module includes executing the creation method according to any one of claims 1-4 to obtain an arc fault detection model; acquiring the current signal sequence of the target electrical appliance; and extracting the feature vector corresponding to the current signal sequence. The fault identification module is used to input the feature vector into the arc fault detection model, thereby detecting arc faults in the target electrical appliance.

Citation Information

Patent Citations

  • Diabetic retinopathy detection algorithm based on diffusion model

    CN120088534A

  • Illumination state detection method, device and equipment for matrix layout

    CN120949106A