Svm-based ac arc fault detection method and device, computer equipment, medium and product
By combining wavelet decomposition with the sparrow search algorithm, the problems of mode mixing and local convergence in traditional AC arc fault detection are solved, achieving high-precision and high-accuracy arc fault detection.
Patent Information
- Application Number
- CN202611530208.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-03
AI Technical Summary
In traditional AC arc fault detection methods, mode aliasing is prone to occur during the processing of non-stationary fault current signals, resulting in blurred boundaries of feature components after signal decomposition. The optimization process of key parameters of the classifier is subject to local convergence risk, making it difficult to guarantee global optimality and affecting the accuracy of fault identification.
A method combining wavelet decomposition and sparrow search algorithm is adopted to perform multi-level decomposition on the raw current data of the power system, construct multi-dimensional feature vectors, optimize the weight parameters of support vector machine through sparrow search algorithm, construct fault classification model, and use Gaussian radial basis kernel function for training and identification.
It improves the feature extraction accuracy and model generalization ability of arc fault detection, enhances the ability to identify weak arc features, and improves detection accuracy.
Smart Images

Figure CN123029317A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system fault detection technology, and in particular to an AC arc fault detection method, device, computer equipment, medium and product based on support vector machine. Background Technology
[0002] In civil low-voltage AC line systems, series arc faults, due to their high impedance characteristics, produce very weak current distortion characteristics. These characteristics are easily masked by the load current, thus exhibiting strong concealment. This concealment makes it difficult for traditional overcurrent protection devices to effectively identify and detect arc faults.
[0003] In traditional AC arc fault detection methods, mode aliasing is prone to occur during the processing of non-stationary fault current signals, leading to blurred boundaries of feature components after signal decomposition and directly affecting the accuracy of constructing multidimensional feature vectors. Simultaneously, the optimization process of key classifier parameters carries the risk of local convergence, making it difficult to guarantee the global optimality of parameter combinations. This limits the generalization ability of the classification model and impacts fault identification accuracy. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, device, computer equipment, medium, and product for AC arc fault detection based on support vector machine, which can improve the accuracy of arc fault detection, in response to the above-mentioned technical problems.
[0005] Firstly, this application provides an AC arc fault detection method based on support vector machines, including:
[0006] Wavelet decomposition is performed on the raw current data of the power system to obtain multi-level current components, and a multi-dimensional feature vector is constructed based on the multi-level current components; the raw current data includes AC series current data and arc fault current data of the power system.
[0007] The sparrow search algorithm is used to optimize the weight parameters of the support vector machine to obtain an optimized support vector machine. The optimized support vector machine is then trained based on multi-dimensional feature vectors to obtain a fault classification model.
[0008] By processing the current data to be detected using a fault classification model, the results of arc fault identification are obtained.
[0009] In one embodiment, the step of performing wavelet decomposition on the raw current data of the power system to obtain multi-level current components includes:
[0010] The raw current data of the power system is preprocessed to obtain standardized current data;
[0011] The standardized current data is decomposed into three levels using the db4 wavelet basis function to obtain multi-level current components. The multi-level current components include three levels of detail coefficients and one level of approximation coefficients. The detail coefficients are used to characterize the first frequency band component in the signal, and the approximation coefficients are used to characterize the second frequency band component in the signal.
[0012] In one embodiment, the step of constructing a multidimensional feature vector based on multi-level current components includes:
[0013] For each layer of detail coefficients, obtain the feature values of the detail coefficients; the feature values include energy entropy, fuzzy entropy, and approximate entropy;
[0014] Following the order of decomposition levels, the feature values corresponding to all levels are combined to obtain a multidimensional feature vector.
[0015] In one embodiment, the step of optimizing the weight parameters of the support vector machine using a sparrow search algorithm to obtain an optimized support vector machine includes:
[0016] Initialize the sparrow population; each individual sparrow in the population represents a set of weight parameters for a support vector machine;
[0017] The sparrows were sorted according to their fitness values, and the sparrow population was divided into discoverer individuals and follower individuals based on the sorting results.
[0018] Update the search position of the discoverer individual, and update the search position of the follower individual based on the search position of the discoverer individual, until the iteration stops when the stopping condition is met, and obtain the optimized support vector machine.
[0019] In one embodiment, the step of training an optimized support vector machine based on multidimensional feature vectors to obtain a fault classification model includes:
[0020] Using the Gaussian radial basis function as the kernel function of the optimized support vector machine, a grid search is performed on the kernel function within a preset search range to obtain multiple candidate parameter combinations;
[0021] The target parameter combination is determined from the candidate parameter combinations based on the multidimensional feature vector, and the fault classification model is obtained based on the target parameter combination.
[0022] In one embodiment, the step of processing the current data to be detected using a fault classification model to obtain the arc fault identification result includes:
[0023] The detection feature vector of the current data to be detected is obtained, and the detection feature vector is processed by the fault classification model to obtain the reference distance between the current data to be detected and the classification hyperplane.
[0024] If the reference distance is not less than the preset threshold, the arc fault identification result is determined to be no fault.
[0025] If the reference distance is less than a preset threshold, the arc fault identification result is determined to be an arc fault state.
[0026] Secondly, this application also provides an AC arc fault detection device based on support vector machine, comprising:
[0027] The data decomposition module is used to perform wavelet decomposition on the raw current data of the power system to obtain multi-level current components, and to construct multi-dimensional feature vectors based on the multi-level current components; the raw current data includes AC series current data and arc fault current data of the power system.
[0028] The model training module is used to optimize the weight parameters of the support vector machine using the sparrow search algorithm to obtain the optimized support vector machine. The optimized support vector machine is then trained based on multi-dimensional feature vectors to obtain a fault classification model.
[0029] The fault identification module is used to process the current data to be detected through a fault classification model to obtain the arc fault identification result.
[0030] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method steps of any one of the first aspects.
[0031] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method steps of any one of the first aspects.
[0032] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method steps of any one of the first aspects.
[0033] The aforementioned AC arc fault detection method, device, computer equipment, medium, and product based on support vector machine (SVM) obtains multi-level current components by performing wavelet decomposition on the raw current data of the power system. Based on these multi-level current components, a multi-dimensional feature vector is constructed. The weight parameters of the SVM are optimized using a sparrow search algorithm to obtain an optimized SVM. The optimized SVM is then trained based on the multi-dimensional feature vector to obtain a fault classification model. This model is then used to process the current data to be detected, yielding arc fault identification results. This approach improves feature extraction accuracy, enhances the ability to identify weak arc features, and improves the model's generalization ability, thereby increasing the detection accuracy of AC arc faults. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is an application environment diagram of an AC arc fault detection method based on support vector machine in one embodiment;
[0036] Figure 2 This is a flowchart illustrating an AC arc fault detection method based on support vector machines in one embodiment.
[0037] Figure 3 This is a flowchart illustrating an AC arc fault detection method based on support vector machines in another embodiment.
[0038] Figure 4 This is a structural block diagram of an AC arc fault detection device based on support vector machine in one embodiment;
[0039] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0041] In traditional AC arc fault detection methods, mode aliasing is prone to occur during the processing of non-stationary fault current signals, leading to blurred boundaries of feature components after signal decomposition and directly affecting the accuracy of constructing multidimensional feature vectors. Simultaneously, the optimization process of key classifier parameters carries the risk of local convergence, making it difficult to guarantee the global optimality of parameter combinations. This limits the generalization ability of the classification model, preventing the fault identification accuracy from exceeding the bottleneck threshold.
[0042] For example, in civil low-voltage AC line systems, when using empirical mode decomposition to process three-phase current signals, the high-frequency arc feature component and the low-frequency load component overlap in the time-frequency domain, leading to energy leakage in the decomposed intrinsic mode function. If time-frequency features are directly extracted to train a support vector machine, the kernel function parameters and penalty factor are not globally optimized, causing the classification hyperplane to deviate from the optimal solution in the feature space. This results in weak arc features and normal current fluctuations overlapping near the decision boundary.
[0043] If the above problems are not addressed, the subtle characteristics of arc faults can easily be misjudged as load fluctuations, leading to a persistently high rate of missed detections. Meanwhile, transient current distortions under normal operating conditions may trigger false alarms, increasing the risk of system malfunctions. Over long-term operation, the cumulative effect of fault feature extraction errors and classification model deviations will significantly reduce the reliability of protection devices, jeopardize the insulation performance of the power distribution system, and even trigger a chain reaction of electrical fires.
[0044] Based on this, this application provides an AC arc fault detection method based on support vector machine, which combines wavelet decomposition with sparrow search algorithm. By pre-setting the number of decomposition layers to control the frequency band division accuracy, wavelet decomposition ensures the stability of feature extraction, and sparrow search algorithm realizes global parameter optimization. The two work together to improve the recognition accuracy of weak arc features.
[0045] The AC arc fault detection method based on support vector machine provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on the cloud or other network servers. Terminal 102 performs wavelet decomposition processing on the raw current data of the power system to obtain multi-level current components. Based on these multi-level current components, it constructs a multi-dimensional feature vector. A sparrow search algorithm is used to optimize the weight parameters of the support vector machine (SVM), resulting in an optimized SVM. The optimized SVM is then trained based on the multi-dimensional feature vector to obtain a fault classification model. This fault classification model is then used to process the current data to be detected, obtaining the arc fault identification result. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Headset devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0046] In one exemplary embodiment, such as Figure 2 As shown, an AC arc fault detection method based on support vector machine is provided, which is then applied to... Figure 1Taking terminal 102 as an example, the explanation includes the following steps 202 to 206.
[0047] S202: Perform wavelet decomposition on the raw current data of the power system to obtain multi-level current components, and construct a multi-dimensional feature vector based on the multi-level current components; the raw current data includes AC series current data and arc fault current data of the power system.
[0048] Wavelet decomposition refers to the process of decomposing a current signal into sub-signals of different frequencies. This can be achieved by using discrete wavelet transform to perform multi-scale decomposition of the signal. By extracting components at different scales, noise interference can be eliminated while retaining effective features. Multidimensional feature vectors refer to a set of statistical indicators reflecting the complexity of a signal. These can be achieved by calculating entropy values such as energy entropy, fuzzy entropy, and approximate entropy. They are used to quantify the disorder and nonlinear characteristics of the signal to improve classification accuracy.
[0049] Optionally, AC series normal current data and arc fault current data of a three-phase circuit system are collected using an arc test platform to establish a raw dataset. The arc test platform includes a three-phase adjustable AC power supply, a contactor control system, a high-precision current sensor, and carbon rod electrodes. The collected current data includes current waveforms under normal and fault conditions. Subsequently, the acquired raw current data undergoes wavelet decomposition processing. Discrete wavelet transform is used to decompose the data into multi-scale current components. Wavelet decomposition effectively decomposes the signal into different frequency components, accurately extracting the characteristics of the arc fault. From the perspective of signal disorder, energy entropy, fuzzy entropy, and approximate entropy are calculated for each obtained current component to construct a multi-dimensional feature vector. These entropy values reflect the complexity and uncertainty of the signal, distinguishing between normal current and fault current.
[0050] For example, the three-phase adjustable AC power supply achieves continuous output from 0-380V through a voltage regulation module, simulating the line status under different power supply environments. The timer module of the contactor control system controls the on / off cycle of the arc generator with a minimum adjustment unit of 0.1 seconds, generating transient signals that conform to the actual fault occurrence pattern. The high-precision current sensor adopts the Hall effect principle, and records the rising edge and oscillation details of the current waveform completely at a sampling rate of 10kHz. The carbon rod electrodes adjust the spacing through a precision guide rail. When the spacing is less than 1mm, a short circuit is likely to occur. When it is greater than 5mm, the arc is difficult to maintain. The spacing range of 1-5mm has been experimentally verified to generate a continuous and measurable arc current.
[0051] The three-phase adjustable AC power supply simulates line conditions under different loads by adjusting the output voltage, with a voltage adjustment step size of 5V and a total harmonic distortion (THD) of less than 1% in the output current waveform. The contactor control system, programmed by a PLC, controls the arc triggering sequence, ensuring an arc duration error of no more than ±2ms and generating fault current signals with 99% repeatability. The high-precision current sensor utilizes the Hall effect principle, with a bandwidth of 0-50kHz and a linearity error of less than 0.5%, achieving 10kHz sampling in conjunction with a 16-bit ADC. The carbon rod electrodes are made of tungsten-copper alloy, with adjustable spacing via precision guide rails and a stepper motor controlling the movement with an accuracy of 0.01mm, ensuring that the arc impedance variation is controlled within ±5%.
[0052] S204: The sparrow search algorithm is used to optimize the weight parameters of the support vector machine to obtain an optimized support vector machine. The optimized support vector machine is then trained based on multi-dimensional feature vectors to obtain a fault classification model.
[0053] Among them, the sparrow search algorithm is an optimization algorithm that simulates the foraging behavior of sparrows in a flock. It can be implemented by iteratively searching for the optimal parameter combination through a discoverer-follower mechanism, and is used to globally optimize the weight parameters of the support vector machine to avoid local optima. The classification model refers to a binary classifier based on the support vector machine, which can be implemented by training an optimized hyperplane decision function, and is used to determine whether the current state is an arc fault based on the feature vector.
[0054] Optionally, a sparrow search algorithm is used to globally optimize the weight parameters of the support vector machine (SVM). The optimal weight combination is obtained through iterative search. The sparrow search algorithm has good global search capabilities and can effectively optimize the parameters of the SVM. A classification model is then constructed using the optimized SVM, and the model is trained using feature vectors. The SVM is an effective classifier capable of finding the optimal classification hyperplane in a high-dimensional feature space.
[0055] S206: The current data to be detected is processed by a fault classification model to obtain the arc fault identification result.
[0056] Optionally, the current data to be detected is input into the trained fault classification model, the distance from the sample to the classification hyperplane is calculated through the decision function, the classification threshold is set to 0, and the binary classification result is output to determine the arc state.
[0057] In the aforementioned AC arc fault detection method based on support vector machines, wavelet decomposition is performed on the raw current data of the power system to obtain multi-level current components. Based on these components, a multi-dimensional feature vector is constructed. The weight parameters of the support vector machine are optimized using a sparrow search algorithm to obtain an optimized support vector machine. The optimized support vector machine is then trained based on the multi-dimensional feature vector to obtain a fault classification model. This model is used to process the current data to be detected to obtain arc fault identification results. This method improves feature extraction accuracy, enhances the ability to identify weak arc features, and improves the model's generalization ability, thereby increasing the detection accuracy of AC arc faults.
[0058] In an exemplary embodiment, the step of performing wavelet decomposition on the raw current data of a power system to obtain multi-level current components includes: preprocessing the raw current data of the power system to obtain standardized current data; performing three-level wavelet decomposition on the standardized current data using the db4 wavelet basis function to obtain multi-level current components; the multi-level current components include three levels of detail coefficients and one level of approximation coefficients; the detail coefficients are used to characterize the first frequency band component in the signal, and the approximation coefficients are used to characterize the second frequency band component in the signal.
[0059] Optionally, wavelet decomposition uses the db4 wavelet basis function, with a decomposition level of 3. The decomposed signal at each level contains approximation coefficients and detail coefficients, with the detail coefficients of the 3rd level retained for subsequent processing. The db4 wavelet basis function has a fourth-order vanishing moment, effectively matching the local abrupt changes in the current signal. Setting the decomposition level to 3 levels reduces computational redundancy while preserving the main signal components. Only the detail coefficients of the 3rd level are retained because this level corresponds to the high-frequency noise band; discarding lower-level detail coefficients suppresses random interference. When using the db4 wavelet basis function, its filter bank length is moderate, capturing the transient characteristics of the current signal during decomposition while avoiding excessive redundant components. Fixing the decomposition level to 3 levels, experiments verify that this level achieves the optimal balance of signal energy concentration. For example, when the sampling frequency is 10kHz, the detail coefficients of the 3rd level correspond to the 625-1250Hz frequency band, which contains the main energy distribution of the arc characteristics.
[0060] Specifically, the acquired current data is first preprocessed, including denoising and normalization. Then, the preprocessed signal is decomposed into three levels using the db4 wavelet basis function. In each level, the signal is divided into approximation coefficients and detail coefficients. The approximation coefficients represent the low-frequency components of the signal, while the detail coefficients represent the high-frequency components. After the three-level decomposition, three levels of detail coefficients and one level of approximation coefficients are obtained. Only the detail coefficients from the third level are retained for subsequent feature extraction.
[0061] In this embodiment, the raw current data of the power system is preprocessed to obtain standardized current data. The standardized current data is then decomposed into three levels of wavelet using the db4 wavelet basis function to obtain multi-level current components. This allows for the accurate extraction of effective features from the current data and precise identification of arc fault current, thereby improving the detection accuracy of AC arc faults.
[0062] In an exemplary embodiment, the step of constructing a multidimensional feature vector based on multi-level current components includes: obtaining feature values of detail coefficients for each level; the feature values include energy entropy, fuzzy entropy, and approximate entropy; and combining the feature values corresponding to all levels according to the decomposition level order to obtain a multidimensional feature vector.
[0063] Energy entropy is used to quantify the dispersion of energy distribution in the detail coefficients of each level after wavelet decomposition. When an arc fault occurs, the energy distribution of the current signal changes in different frequency bands, and the energy entropy value changes accordingly. The energy of normal current is concentrated in the power frequency and its harmonic frequency bands, resulting in a lower energy entropy value. However, the energy distribution of arc fault current is more dispersed across frequency bands, leading to a higher energy entropy value. Fuzzy entropy measures the pattern self-similarity of the detail coefficient sequence after wavelet decomposition. Fuzzy entropy uses an exponential function as the fuzzy measure, exhibiting continuity and smoothness, and is insensitive to parameter changes. When an arc fault occurs, the regularity of the current waveform is disrupted, reducing pattern self-similarity and increasing the fuzzy entropy value. Approximate entropy characterizes the complexity and irregularity of the detail coefficient sequence after wavelet decomposition. Approximate entropy characterizes signal complexity by measuring the probability of generating new patterns in the sequence. Normal current waveforms have periodicity, resulting in a low probability of generating new patterns and a small approximate entropy value. Arc fault current contains a large amount of random transient distortion, increasing the probability of generating new patterns and thus increasing the approximate entropy value.
[0064] Optionally, the energy entropy calculation uses a preset entropy formula to normalize the energy distribution of the detail coefficients, eliminating the influence of energy amplitude differences between different samples. During fuzzy entropy calculation, the similarity tolerance *r* is dynamically adjusted based on the signal standard deviation to avoid insufficient adaptability under different operating conditions due to a fixed threshold. The window length of the approximate entropy is set to 2, effectively capturing the local fluctuation characteristics of the current signal while ensuring computational efficiency. The three entropy values extract signal features from three dimensions: energy distribution, pattern similarity, and complexity. They are vertically combined according to the number of decomposition levels to form a 9-dimensional feature vector with clear physical meaning. This feature vector improves the representational ability of the features through multi-dimensional information fusion and enhances the robustness of the algorithm through a dynamic parameter adjustment mechanism, providing highly discriminative input data for subsequent classification models.
[0065] In this embodiment, by obtaining the feature values of the detail coefficients for each layer, and combining the feature values corresponding to all layers according to the decomposition hierarchy, a multi-dimensional feature vector is obtained. This can accurately extract the effective features of the current data, precisely identify the arc fault current, and thus improve the detection accuracy of AC arc faults.
[0066] In an exemplary embodiment, the steps of optimizing the weight parameters of a support vector machine using a sparrow search algorithm to obtain an optimized support vector machine include: initializing a sparrow population; each sparrow in the population representing a set of support vector machine weight parameters; sorting the sparrows according to their fitness values, and dividing the sparrow population into discoverer individuals and follower individuals based on the sorting results; updating the search positions of the discoverer individuals, and updating the search positions of the follower individuals based on the search positions of the discoverer individuals, until the iteration stops when the stopping condition is met, thus obtaining the optimized support vector machine.
[0067] Optionally, the sparrow search algorithm is used to optimize the weight parameters of the support vector machine. The optimization objective is set to minimize the cross-validation error of the support vector machine. A position update formula is established, and the weight space is searched through a discoverer-follower mechanism. Preferably, in the feature extraction stage, the original 9-dimensional feature vector can be reduced to a 6-dimensional combination containing energy entropy and fuzzy entropy by selecting the most discriminative feature components among energy entropy, fuzzy entropy, and approximate entropy. During model training, a dynamically adjusted search step size mechanism is adopted, allowing the sparrow search algorithm to gradually narrow the search range in the later stages of iteration, thereby improving the parameter convergence speed.
[0068] For example, the algorithm parameters are set to 200 iterations, 30 sparrows, and a discoverer ratio of 20%. At the start of the iteration, the sparrow population is initialized by randomly generating 30 sparrows, each representing a set of support vector machine (SVM) weights. The fitness value of each sparrow is calculated, which is the cross-validation error of the SVM under the corresponding weights. The sparrows are then sorted according to their fitness values, and the top 20% are selected as discoverers, with the remaining individuals as followers. The discoverer positions are then updated: for discoverers with good fitness, a small-scale local search is performed; for discoverers with poor fitness, a large-scale random search is performed. The follower positions are then updated, moving closer to or further away from the optimal discoverer based on their distance from the discoverer. This iterative process is repeated for 200 iterations until the maximum number of iterations is reached or the convergence condition is met.
[0069] In this embodiment, the weight parameters of the support vector machine are optimized by using the sparrow search algorithm to obtain an optimized support vector machine, which can improve the convergence speed of the algorithm and improve the classification performance and generalization ability of the support vector machine model.
[0070] In an exemplary embodiment, the step of training an optimized support vector machine based on multidimensional feature vectors to obtain a fault classification model includes: using a Gaussian radial basis kernel function as the kernel function of the optimized support vector machine, performing a grid search on the kernel function within a preset search range to obtain multiple candidate parameter combinations; determining a target parameter combination from the candidate parameter combinations based on the multidimensional feature vectors; and obtaining a fault classification model based on the target parameter combination.
[0071] Optionally, a Gaussian radial basis function (RBF) kernel is used as the kernel function for the support vector machine. The RBF kernel has good nonlinear mapping capabilities, enabling it to map low-dimensional feature spaces to high-dimensional spaces, thereby improving classification performance. The search range for the RBF kernel parameters is limited to 0.1 to 10. The kernel parameters control the shape of the Gaussian kernel and have a significant impact on model performance. By setting an appropriate search range, the optimal value can be found within a large parameter space. The penalty factor is set to a search range of 0.1 to 100. The penalty factor is used to balance model complexity and classification accuracy; a smaller value makes the model simpler but may lead to underfitting, while a larger value makes the model more complex but may lead to overfitting.
[0072] Furthermore, the optimal hyperparameter combination is determined through grid search combined with 5-fold cross-validation. Grid search traverses all possible parameter combinations, while 5-fold cross-validation divides the dataset into five parts, using four parts alternately as the training set and one part as the validation set to evaluate model performance. Grid search uses a proportional step size to partition the parameter space, ensuring that each parameter combination is systematically traversed. 5-fold cross-validation divides the training set into five mutually exclusive subsets, selecting four subsets for training at a time, and using the remaining subset to validate the model's generalization ability. During parameter optimization, grid nodes consisting of kernel parameters and penalty factors are first generated in the two-dimensional parameter space. The parameter combination corresponding to each node is input into a support vector machine for training, and cross-validation is performed using five randomly divided data subsets. The performance of each parameter combination is evaluated by the average accuracy of the five validation results, and the parameter combination with the highest average accuracy is selected as the optimal solution.
[0073] Furthermore, after the model evaluation is completed, the model's recognition performance can be verified. The ratio of correctly classified samples to the total number of test samples is calculated. A confusion matrix is set up to count the number of true positives, false positives, true negatives, and false negatives. The accuracy of the arc fault identification results is verified by calculating three performance indicators: accuracy, recall, and F1 score. Accuracy reflects the overall correctness of the model, recall reflects the sensitivity to arc faults, and the F1 score balances accuracy and recall. The confusion matrix further refines the identification of various sample types, providing a basis for further model optimization.
[0074] Specifically, by comparing the model's prediction results with the real label data collected on the experimental platform, the number of matching samples is counted, and the accuracy is obtained by dividing the number of correct samples by the total number of test samples. When setting the confusion matrix, samples are divided into four types: true positive samples that are actually faulty and correctly identified, false positive samples that are actually normal but misclassified as faulty, true negative samples that are actually normal and correctly identified, and false negative samples that are actually faulty but not detected. When calculating performance metrics, accuracy is obtained by dividing the sum of true positive and true negative samples by the total number of samples; recall is calculated by dividing the number of true positive samples by the sum of true positive and false negative samples; and the F1-score is obtained by the harmonic mean of accuracy and recall.
[0075] After training, the model was validated using an independent test set. First, the number of correctly predicted samples was counted, and accuracy was calculated to reflect the overall classification performance. Further analysis of the model's performance across different categories was conducted using a confusion matrix. True positives reflect fault detection capability, false positives reflect false alarms, and true negatives and false negatives reflect normal state recognition capability and missed detection risk, respectively. Finally, accuracy, recall, and F1-score were calculated based on the confusion matrix data. Accuracy measures overall correctness, recall assesses fault detection capability, and the F1-score comprehensively balances accuracy and recall. These three metrics jointly validate model performance. For example, with a total sample size of 1000, if there are 950 true positives, 10 false positives, 30 true negatives, and 10 false negatives, the accuracy is 98%, the recall is 99%, and the F1-score is 98.5%, quantitatively demonstrating that the model meets reliability requirements.
[0076] In this embodiment, by using the Gaussian radial basis function as the kernel function of the optimized support vector machine, a grid search is performed on the kernel function within a preset search range to obtain multiple candidate parameter combinations. Based on the multidimensional feature vector, the target parameter combination is determined from the candidate parameter combinations, and the fault classification model is obtained according to the target parameter combination. This can improve the accuracy of the target parameter combination, thereby improving the accuracy and reliability of arc fault detection.
[0077] In an exemplary embodiment, the step of processing the current data to be detected using a fault classification model to obtain an arc fault identification result includes: obtaining the feature vector to be detected from the current data to be detected; processing the feature vector to be detected using a fault classification model to obtain a reference distance between the current data to be detected and the classification hyperplane; determining that the arc fault identification result is no fault if the reference distance is not less than a preset threshold; and determining that the arc fault identification result is an arc fault state if the reference distance is less than the preset threshold.
[0078] Optionally, the feature vector to be detected from the current data is input into a trained classification model. The distance from the sample to the classification hyperplane is calculated using a decision function. The classification threshold is set to 0, and a binary classification result is output to determine the arc state. The data format of the feature vector to be detected remains consistent with that of the training phase to ensure data dimensionality matching. The decision function uses a linear kernel mapping. It calculates the relative position of the sample to the hyperplane through inner product operations, and the output value is the signed distance from the sample to the hyperplane. The sign of the distance value directly reflects the sample's class affiliation. When the classification threshold is fixed at 0, the boundary between positive and negative samples is located at the geometric center of the hyperplane.
[0079] Specifically, for the current data to be detected, wavelet decomposition is first performed to obtain multi-scale current components. Then, the energy entropy, fuzzy entropy, and approximate entropy of each component are calculated to construct a 9-dimensional feature vector. This feature vector is used as a test sample and input into a pre-trained support vector machine classification model. The distance from the sample to the classification hyperplane is calculated through a decision function. A classification threshold of 0 is set, and a binary classification result is output to determine the arc state. Thus, if the reference distance is greater than 0, it is determined to be a normal state; if the reference distance is less than 0, it is determined to be an arc fault state. In this way, continuous distance values can be transformed into discrete binary classification results, enabling automatic detection and identification of arc faults.
[0080] In this embodiment, the current data to be detected is processed by a fault classification model to obtain the arc fault identification result, which can accurately identify the ground fault, reduce the probability of missed detection, and improve the safety and reliability of the power system.
[0081] In one exemplary embodiment, such as Figure 3 As shown, an AC arc fault detection method based on support vector machine is provided. The method includes the following steps:
[0082] (1) Multi-level wavelet decomposition: The raw current data of the power system is preprocessed to obtain standardized current data; the standardized current data is decomposed into three levels using the db4 wavelet basis function to obtain multi-level current components; the multi-level current components include three levels of detail coefficients and one level of approximation coefficients; the detail coefficients are used to characterize the first frequency band component in the signal, and the approximation coefficients are used to characterize the second frequency band component in the signal. Among them, the raw current data includes AC series current data and arc fault current data of the power system.
[0083] (2) Construction of multidimensional feature vectors: For the detail coefficients of each layer, obtain the feature values of the detail coefficients; the feature values include energy entropy, fuzzy entropy and approximate entropy; according to the decomposition level order, combine the feature values corresponding to all levels to obtain multidimensional feature vectors.
[0084] (3) Sparrow search algorithm optimization: The sparrow search algorithm is used to optimize the weight parameters of the support vector machine to obtain the optimized support vector machine. The Gaussian radial basis kernel function is used as the kernel function of the optimized support vector machine. The kernel function is searched in a grid within a preset search range to obtain multiple candidate parameter combinations. The target parameter combination is determined from the candidate parameter combinations based on the multidimensional feature vector, and the fault classification model is obtained according to the target parameter combination.
[0085] (4) Arc fault detection: Obtain the feature vector of the current data to be detected, process the feature vector of the current data to be detected through the fault classification model, and obtain the reference distance between the current data to be detected and the classification hyperplane; if the reference distance is not less than the preset threshold, determine that the arc fault identification result is no fault; if the reference distance is less than the preset threshold, determine that the arc fault identification result is an arc fault state.
[0086] In this embodiment, wavelet decomposition is performed on the raw current data of the power system to obtain multi-level current components. Based on these components, a multi-dimensional feature vector is constructed. The weight parameters of the support vector machine are optimized using a sparrow search algorithm to obtain an optimized support vector machine. The optimized support vector machine is then trained based on the multi-dimensional feature vector to obtain a fault classification model. This model is used to process the current data to be detected to obtain arc fault identification results. This approach improves feature extraction accuracy, enhances the ability to identify weak arc features, and improves the model's generalization ability, thereby increasing the detection accuracy of AC arc faults.
[0087] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0088] Based on the same inventive concept, this application also provides a support vector machine-based AC arc fault detection device for implementing the aforementioned support vector machine-based AC arc fault detection method. The solution provided by this device is similar to the implementation described in the above method. Therefore, the specific limitations of the one or more support vector machine-based AC arc fault detection device embodiments provided below can be found in the limitations of the support vector machine-based AC arc fault detection method described above, and will not be repeated here.
[0089] In one exemplary embodiment, such as Figure 4 As shown, an AC arc fault detection device based on support vector machine is provided, including: a data decomposition module 10, a model training module 20, and a fault identification module 30, wherein:
[0090] The data decomposition module 10 is used to perform wavelet decomposition processing on the raw current data of the power system to obtain multi-level current components, and to construct a multi-dimensional feature vector based on the multi-level current components; the raw current data includes AC series current data and arc fault current data of the power system.
[0091] The model training module 20 is used to optimize the weight parameters of the support vector machine using the sparrow search algorithm to obtain the optimized support vector machine. The optimized support vector machine is then trained based on the multi-dimensional feature vector to obtain the fault classification model.
[0092] The fault identification module 30 is used to process the current data to be detected through a fault classification model to obtain the arc fault identification result.
[0093] In an exemplary embodiment, the data decomposition module 10 is further configured to preprocess the raw current data of the power system to obtain standardized current data; perform three-level wavelet decomposition on the standardized current data using the db4 wavelet basis function to obtain multi-level current components; the multi-level current components include three levels of detail coefficients and one level of approximation coefficients; the detail coefficients are used to characterize the first frequency band component in the signal, and the approximation coefficients are used to characterize the second frequency band component in the signal.
[0094] In an exemplary embodiment, the data decomposition module 10 is further configured to obtain feature values of the detail coefficients for each layer; the feature values include energy entropy, fuzzy entropy, and approximate entropy; and combine the feature values corresponding to all layers according to the decomposition hierarchy to obtain a multidimensional feature vector.
[0095] In an exemplary embodiment, the model training module 20 is used to initialize a sparrow population; each sparrow in the sparrow population represents a set of weight parameters for a support vector machine; the sparrows are sorted according to their fitness values, and the sparrow population is divided into discoverer individuals and follower individuals according to the sorting results; the search positions of the discoverer individuals are updated, and the search positions of the follower individuals are updated according to the search positions of the discoverer individuals, until the iteration stops when the stopping condition is met, and the optimized support vector machine is obtained.
[0096] In an exemplary embodiment, the model training module 20 is further configured to use the Gaussian radial basis kernel function as the kernel function of the optimized support vector machine, perform a grid search on the kernel function within a preset search range to obtain multiple candidate parameter combinations; determine the target parameter combination from the candidate parameter combinations based on the multidimensional feature vector, and obtain a fault classification model based on the target parameter combination.
[0097] In an exemplary embodiment, the fault identification module 30 is further configured to acquire the feature vector to be detected of the current data to be detected, process the feature vector to be detected through a fault classification model to obtain the reference distance between the current data to be detected and the classification hyperplane; if the reference distance is not less than a preset threshold, the arc fault identification result is determined to be no fault; if the reference distance is less than the preset threshold, the arc fault identification result is determined to be an arc fault state.
[0098] The modules in the aforementioned AC arc fault detection device based on support vector machines can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0099] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an AC arc fault detection method based on support vector machines. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0100] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0101] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: performing wavelet decomposition on the raw current data of a power system to obtain multi-level current components, and constructing a multi-dimensional feature vector based on the multi-level current components; the raw current data includes AC series current data and arc fault current data of the power system; optimizing the weight parameters of a support vector machine using a sparrow search algorithm to obtain an optimized support vector machine; training the optimized support vector machine based on the multi-dimensional feature vector to obtain a fault classification model; and processing the current data to be detected using the fault classification model to obtain an arc fault identification result.
[0102] In one embodiment, when the processor executes the computer program, it preprocesses the raw current data of the power system to obtain standardized current data; it then performs three-level wavelet decomposition on the standardized current data using the db4 wavelet basis function to obtain multi-level current components; the multi-level current components include three levels of detail coefficients and one level of approximation coefficients; the detail coefficients are used to characterize the first frequency band component in the signal, and the approximation coefficients are used to characterize the second frequency band component in the signal.
[0103] In one embodiment, the process of a processor executing a computer program to construct a multidimensional feature vector based on multiple levels of current components includes: obtaining feature values of detail coefficients for each level; the feature values include energy entropy, fuzzy entropy, and approximate entropy; and combining the feature values corresponding to all levels in the order of decomposition hierarchy to obtain a multidimensional feature vector.
[0104] In one embodiment, when the processor executes a computer program, it optimizes the weight parameters of a support vector machine using a sparrow search algorithm to obtain an optimized support vector machine. This includes: initializing a sparrow population; each sparrow in the population representing a set of support vector machine weight parameters; sorting the sparrows according to their fitness values; dividing the sparrow population into discoverer individuals and follower individuals based on the sorting results; updating the search positions of the discoverer individuals and updating the search positions of the follower individuals based on the search positions of the discoverer individuals, until the iteration stops when the stopping condition is met, thus obtaining the optimized support vector machine.
[0105] In one embodiment, when a processor executes a computer program, it trains an optimized support vector machine based on multidimensional feature vectors to obtain a fault classification model. This includes: using a Gaussian radial basis function kernel as the kernel function of the optimized support vector machine, performing a grid search on the kernel function within a preset search range to obtain multiple candidate parameter combinations; determining a target parameter combination from the candidate parameter combinations based on multidimensional feature vectors; and obtaining a fault classification model based on the target parameter combination.
[0106] In one embodiment, when the processor executes a computer program, it processes the current data to be detected using a fault classification model to obtain an arc fault identification result. This process includes: acquiring the feature vector to be detected from the current data to be detected; processing the feature vector to be detected using the fault classification model to obtain a reference distance between the current data to be detected and the classification hyperplane; determining that the arc fault identification result is fault-free if the reference distance is not less than a preset threshold; and determining that the arc fault identification result is an arc fault state if the reference distance is less than the preset threshold.
[0107] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0108] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0109] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0110] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0111] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for detecting AC arc faults based on support vector machines, characterized in that, The method includes: The raw current data of the power system is preprocessed to obtain standardized current data; the raw current data includes AC series current data and arc fault current data of the power system. The standardized current data is decomposed into three levels of wavelet using the db4 wavelet basis function to obtain multi-level current components. The multi-level current components include three levels of detail coefficients and one level of approximation coefficients. The detail coefficients are used to characterize the first frequency band component in the signal, and the approximation coefficients are used to characterize the second frequency band component in the signal. For each level of detail coefficients, the feature values of the detail coefficients are obtained; the feature values include energy entropy, fuzzy entropy, and approximate entropy. Following the order of decomposition hierarchy, the feature values corresponding to all levels are combined to obtain a multidimensional feature vector; The weight parameters of the support vector machine are optimized using the sparrow search algorithm to obtain an optimized support vector machine. The optimized support vector machine is then trained based on the multidimensional feature vectors to obtain a fault classification model. The fault classification model is used to process the current data to be detected to obtain the arc fault identification result.
2. The method according to claim 1, characterized in that, The optimization of the weight parameters of the support vector machine using the sparrow search algorithm to obtain the optimized support vector machine includes: Initialize a sparrow population; each individual sparrow in the population represents a set of weight parameters for a support vector machine; The sparrows are sorted according to their fitness values, and the sparrow population is divided into discoverer individuals and follower individuals based on the sorting results. The search position of the discoverer individual is updated, and the search position of the follower individual is updated according to the search position of the discoverer individual, until the iteration stops when the stopping condition is met, and the optimized support vector machine is obtained.
3. The method according to claim 1, characterized in that, The process of training the optimized support vector machine based on the multidimensional feature vectors to obtain a fault classification model includes: Using the Gaussian radial basis function as the kernel function of the optimized support vector machine, a grid search is performed on the kernel function within a preset search range to obtain multiple candidate parameter combinations; Based on the multidimensional feature vector, a target parameter combination is determined from the candidate parameter combinations, and a fault classification model is obtained based on the target parameter combination.
4. The method according to claim 1, characterized in that, The process of processing the current data to be detected using the fault classification model to obtain the arc fault identification result includes: The detection feature vector of the current data to be detected is obtained, and the detection feature vector is processed by the fault classification model to obtain the reference distance between the current data to be detected and the classification hyperplane. If the reference distance is not less than a preset threshold, the arc fault identification result is determined to be fault-free; If the reference distance is less than the preset threshold, the arc fault identification result is determined to be an arc fault state.
5. An AC arc fault detection device based on support vector machine, characterized in that, The device includes: The data decomposition module is used to perform wavelet decomposition processing on the raw current data of the power system to obtain multi-level current components, and to construct a multi-dimensional feature vector based on the multi-level current components; the raw current data includes the AC series current data and arc fault current data of the power system. The model training module is used to optimize the weight parameters of the support vector machine using the sparrow search algorithm to obtain an optimized support vector machine. The optimized support vector machine is then trained based on the multidimensional feature vector to obtain a fault classification model. The fault identification module is used to process the current data to be detected through the fault classification model to obtain the arc fault identification result.
6. The apparatus according to claim 5, characterized in that, The model training module is also used to initialize a sparrow population; each sparrow in the population represents a set of support vector machine weight parameters; the sparrows are sorted according to their fitness values, and the population is divided into discoverer individuals and follower individuals based on the sorting results. The search position of the discoverer individual is updated, and the search position of the follower individual is updated according to the search position of the discoverer individual, until the iteration stops when the stopping condition is met, and the optimized support vector machine is obtained.
7. The apparatus according to claim 5, characterized in that, The model training module is further configured to use the Gaussian radial basis function as the kernel function of the optimized support vector machine, perform a grid search on the kernel function within a preset search range to obtain multiple candidate parameter combinations; determine the target parameter combination from the candidate parameter combinations based on the multidimensional feature vector, and obtain a fault classification model based on the target parameter combination.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
