Building electrical fault diagnosis method for optimizing support vector machine based on vector weighted average algorithm
By using the support vector machine optimized by the vector weighted average algorithm in building electrical fault diagnosis, combined with CEEMDAN and MSE for signal preprocessing and feature extraction, the problem of nonlinear and non-stationary signal processing in building electrical faults is solved, and high accuracy is achieved High-level fault classification provides a new detection method and improves the industry's identification and prevention capabilities.
Patent Information
- Application Number
- CN202411315513.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art is difficult to effectively deal with the nonlinear and non-stationary signals common in building electrical faults, resulting in difficulty in classification of faults. Traditional manual detection methods cannot meet the needs of complex electrical systems.
Using support vector machine (SVM) based on the weighted average algorithm weighted by vector, combined with the adaptive noise complete collection experience modal decomposition (CEEMDAN) and multi -scale sample entropy (MSE) for signal pre -processing and feature extraction, rich signal characteristic data set, Improve the accuracy of failure classification.
It achieves rapid and accurate identification of different fault types under different conditions, improves the accuracy of fault classification, can effectively handle nonlinear and non-stationary signals, provides a new means of building electrical fault diagnosis, and improves the accuracy of industry practitioners. Ability to identify and prevent.
Smart Images

Figure CN119337219A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of building electrical fault diagnosis, and in particular to a building electrical fault diagnosis method based on a vector weighted average algorithm to optimize a support vector machine. Background Art
[0002] With the development of science and technology, more electrical equipment has been invented and put into use in daily production and life. The electrical system has become more and more complex, and the types of faults have increased. Among them, as people use electrical equipment more and more frequently, the probability of electrical failures has gradually increased. The building electrical system is a system for managing building electricity and is one of the most important components of the electrical system. It mainly includes five parts: substation and distribution system, power equipment system, lighting system, lightning protection and grounding device system, and weak current system. Failure of one or more of them will have a large-scale impact on industrial production and residents' lives.
[0003] It is crucial to ensure the safety of electrical systems and to quickly detect and resolve electrical faults after they occur. However, in the face of increasingly complex electrical systems and increasingly frequent electrical faults, traditional manual detection and troubleshooting methods can no longer meet the needs of social production and development in terms of speed and accuracy. Although artificial intelligence methods have made unprecedented progress in the field of building electrical fault diagnosis in recent years, a complete scientific system has not yet been formed. Therefore, the research on new technologies and methods for building electrical fault diagnosis is particularly important.
[0004] Since the data obtained in the electrical system under fault conditions will contain a lot of noise and many transient signals, and most of the fault signals are nonlinear and non-stationary signals, it is very difficult to classify the fault signals. Therefore, it is urgent to explore and study new building electrical fault diagnosis methods. Summary of the invention
[0005] The purpose of the present invention is to provide a building electrical fault diagnosis method based on a vector weighted average algorithm to optimize a support vector machine, so as to solve the problems raised in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solution: a building electrical fault diagnosis method based on vector weighted average algorithm to optimize support vector machine, characterized in that it includes the following steps;
[0007] Signal preprocessing: Use adaptive noise complete set empirical mode decomposition to decompose the original fault signal in the time and frequency domain, decompose it into efficient modal functions, and obtain multiple intrinsic modal components for further feature extraction;
[0008] Feature extraction: Use multi-scale sample entropy to extract features on multiple time scales from the decomposed modal function;
[0009] Enriching feature signals: adding the time-frequency domain features of the original signal calculated based on the data statistical algorithm to enrich the signal feature data set;
[0010] Fault classification: The optimal solution of the penalty factor C and the kernel function coefficient gumma of the support vector machine is calculated using vector weighted average, so that the classification ability of the support vector machine reaches the best state, and the support vector machine is used to classify the faults.
[0011] Furthermore, the adaptive noise complete set empirical mode decomposition is to add white noise to the original fault signal, and then obtain a set of intrinsic mode components and a residual through empirical mode decomposition; then add white noise to the residual value, and then obtain a set of intrinsic mode components and a residual through empirical mode decomposition, and repeat this step until the convergence condition is met. The adaptive noise complete set empirical mode decomposition performs time-frequency domain decomposition on the original fault signal to obtain the intrinsic mode component signal, and uses multi-scale sample entropy to extract features to obtain a sample feature set.
[0012] Furthermore, the enriched characteristic signal is a signal feature calculated by a data statistical algorithm on the original fault signal, including three dimensionless features calculated on the original signal: peak factor, pulse factor and margin factor, and four frequency features calculated on the original signal: center of gravity frequency, mean square frequency, frequency variance, and relative power frequency; the above seven features are added to the sample feature set.
[0013] Furthermore, the steps of calculating the support vector machine by vector weighted average are as follows:
[0014] a) Input the penalty factor C and the kernel function coefficient gumma, initialize the INFO parameter, set the maximum number of iterations Maxg and the population size Np, and randomly generate an initial population of Np solution vectors;
[0015] b) Solve each solution vector using the fitness function and obtain the optimal solution vector;
[0016] c) Randomly select three solutions from the population and calculate new solution vectors: z1 and z2;
[0017] d) Calculate the new vector u through z1 and z2, update the vector u, and calculate the fitness function of each individual;
[0018] e) If the fitness function becomes smaller, update the optimal vector u and continue iterating until the maximum number of iterations, then the optimal C and gumma values can be output.
[0019] Furthermore, the adaptive noise complete set empirical mode decomposition sets the amplitude of the added white noise to be 10, the number of EMD decompositions to be 8, the sampling frequency to be 50, and the maximum number of iterations to be 1000.
[0020] Furthermore, the maximum number of iterations of the vector weighted average optimization algorithm is set to 10, the population size is set to 50, the number of cross-validations is set to 3, and the vector weighted average optimization algorithm updates the position of each generation of vector u through three stages: updating rules, vector merging, and local search.
[0021] Compared with the prior art, the present invention has the following beneficial effects:
[0022] (1) Provide a method for processing nonlinear and non-stationary fault signals, which has the characteristics of rapid and accurate identification of different fault types under different conditions, and has excellent performance such as effectiveness and superiority.
[0023] The vector weighted average algorithm is used to optimize the hyperparameters of the support vector machine. Compared with the traditional support vector machine, the optimized support vector machine has higher classification accuracy.
[0024] (2) In the field of building electrical fault diagnosis, the complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN) and multi-scale sample entropy (MSE) are combined to construct a new fault signal preprocessing and feature extraction method. Compared with traditional signal preprocessing and feature extraction methods, this method can effectively process nonlinear and non-stationary fault signals, and the extracted fault features have higher recognition accuracy.
[0025] (3) The present application can provide a new means of fault detection for the building electrical industry, improve the ability of building electrical industry practitioners to identify and prevent accidents that occur during the daily operation of building electrical equipment or industrial production, avoid major accidents caused by building electrical faults, ensure the safety of building electrical industry practitioners, and ensure the normal operation of the building electrical industry and industrial production. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a schematic diagram of the processing flow of the present invention;
[0027] Figure 2 This is a flow chart of CEEMDAN signal preprocessing of the present invention;
[0028] Figure 3 It is a flow chart of MSE feature extraction of the present invention;
[0029] Figure 4 Flowchart of the support vector machine (INFO-SVM) optimized using the vector weighted average algorithm for the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] Example:
[0032] See also Figure 1-4 ,The present invention provides a technical solution: a building electrical fault diagnosis method based on vector weighted average algorithm to optimize support vector machine;
[0033] like Figure 1 As shown, the method includes original fault signal input 1, data preprocessing 2, feature extraction 3, enriching feature data set 4, optimizing support vector machine using vector weighted average algorithm 5 and performing fault diagnosis using the optimized support vector machine 6, a total of six parts.
[0034] In this embodiment, the sampling frequency of the original fault data set is 50Hz, and the capacitance signal of the building electrical fault is obtained through the Eurotest 61557 data collector. 1500 data points are collected for each fault, and each group of 50 data points is a group, with a total of six fault types. The original fault data is processed by CEEMDAN and converted into multiple intrinsic mode components (IMFs).
[0035] The CEEMDAN preprocessing process is as follows Figure 2 As shown. The first step is to perform an EMD decomposition on the original fault signal to obtain a set of IMFs and a residual value; the second step is to perform adaptive noise estimation on each IMF, and obtain the noise level of each IMF by estimating the noise of the IMF; the third step is to correct the IMFs according to the noise level, remove the noise component, and obtain the corrected IMFs; repeat the first step to the third step, guide the residual value to be lower than the preset threshold or reach the maximum number of iterations; the fourth step is to use the corrected IMF and residual as a new signal, and perform EMD decomposition again to obtain a new set of IMFs and residuals; repeat the first step to the fourth step until the signal cannot be decomposed.
[0036] In the process of setting CEEMDAN, there are four important hyperparameters: sampling frequency, amplitude of added white noise, number of times of signal decomposition and maximum number of iterations. In this embodiment, the sampling frequency is set to 50, the amplitude of added white noise is set to 10, the number of times of signal decomposition is set to 8 and the maximum number of iterations is set to 100.
[0037] In this embodiment, multi-scale sample entropy (MSE) is used to extract features from the IMFs decomposed by CEEMDAN.
[0038] MSE feature extraction Figure 3 As shown. Entropy is an indicator of the degree of disorder of a system and can be used to describe the complexity of data. Scaling is a key step in the multi-scale sample entropy algorithm, which means decomposing the data and obtaining multiple features of the data through decomposition at different scales. For the data after decomposition at each scale, the corresponding sample entropy can be calculated to describe the complexity of the data at that scale. By calculating the local sample entropy of each scale, the multi-scale sample entropy of the data can be obtained. The multi-scale sample entropy reflects the complexity at different scales and can be used as an important feature of the data for the analysis and prediction of the original fault data.
[0039] The intrinsic modal components decomposed by CEEMDAN may have noise and the same signal scale. When multi-scale entropy is used to extract features from fault signals, it has high requirements for signal quality. If the signal quality is poor, the quality of the features extracted by multi-scale entropy will also be poor.
[0040] In order to solve the above problems, signal features calculated based on mathematical statistics algorithms can be added to the feature data set. This embodiment uses three dimensionless features of the original fault signal: peak factor, pulse factor, margin factor, and four frequency features of the original signal: center of gravity frequency, mean square frequency, frequency variance, and relative power frequency.
[0041] In this embodiment, the features extracted by MSE from IMFs and the features calculated by mathematical statistics algorithm from the original signal are combined into a total fault sample data set. The final classification accuracy is obtained by diagnosis and classification of the support vector machine (INFO-SVM) optimized by the vector weighted average algorithm.
[0042] Vector Weighted Average Optimization (INFO) is a population-based optimization algorithm. It is used to calculate the weighted average of a set of vectors in the search space. INFO updates the position of each generation of vectors through three stages: update rules, vector merging, and local search. The algorithm has the characteristics of strong optimization ability and fast convergence speed.
[0043] In the update rule phase, INFO updates the position of the vector using a mean-based rule (MeanRule), which is extracted from the weighted mean of a set of random vectors. In addition, in order to improve the global search capability, a convergence acceleration part (CA) is added to the update rule operator. The main formula of the update rule is defined as follows:
[0044]
[0045] in, and is the new position vector for the g-th iteration; σ is the vector scaling factor, calculated using equation (2); a1≠a2≠a3≠l is a different integer randomly selected from [1, NP]; randn is a standard normal distribution random value. α is updated according to the exponential function defined in equation (10.1).
[0046] σ=2α×rand-α (2)
[0047]
[0048] MeanRule is defined as follows:
[0049]
[0050] Where r is a random number between [0,0.5], l = 1, 2, 3, ..., NP; and The definition is as follows:
[0051]
[0052] in:
[0053]
[0054] ω=max(f(x a1 ),f(x a2 ),f(x a3 )) (7)
[0055]
[0056] in:
[0057]
[0058] w=f(x ws ) (10)
[0059] δ=2β×rand-β (11)
[0060]
[0061] Among them, w1, w2, and w3 are three weighted functions used to calculate the weighted average of the vector, which is beneficial for the algorithm to search globally in the solution space; x bs ,x bt ,x ws are the best, second-best, and worst solution vectors in the g-th generation population, respectively. These solution vectors are determined after sorting the population vectors at each iteration.
[0062] In the vector merging stage, according to formula (21), INFO combines the two vectors calculated in the previous stage Vector with condition rand < 0.5 Combined to generate a new vector. This operator is used to improve the local search capability to provide a new vector.
[0063]
[0064] in, It is the new vector obtained by merging the vectors in the g-th generation; μ = 0.05×randn.
[0065] In the local search phase. INFO uses the local search phase to prevent falling into the local optimal solution. According to this operator, if rand < 0.5, a new vector is generated, where is a random value in [0,1].
[0066]
[0067] in:
[0068] x rnd =φ×x avg +(1-φ)×(φ×x bt +(1-φ)×x bs ) (15)
[0069]
[0070] Among them, φ represents a random number (0,1); x rng By x avg , x bt and x bs Composition, increasing the randomness of the proposed algorithm and better searching in the solution space; v1 and v2 are two random numbers.
[0071] The steps of optimizing support vector machine by vector weighted average algorithm are as follows: Figure 4 The optimization steps are as follows:
[0072] a) Input C and gumma, and initialize the INFO parameters (set the maximum number of iterations Maxg and the population size Np), and randomly generate an initial population of Np solution vectors.
[0073] b) Use the fitness function to solve each solution vector and obtain the optimal solution vector.
[0074] c) Randomly select three solutions from the population and calculate the new solution vectors: z1 and z2 using formula (1).
[0075] d) Calculate the new vector u through z1 and z2 using formula (13), then update the vector u using formula (14) and calculate the fitness function of each individual.
[0076] e) If the fitness function becomes smaller, update the optimal vector u and continue iterating until the maximum number of iterations, then the optimal C and gumma values can be output.
[0077] In this embodiment, the maximum number of iterations of the vector weighted average optimization algorithm is set to 10, the population number is set to 50, and the number of cross validations is set to 3. The kernel function of the support vector machine used in this embodiment is a Gaussian kernel.
[0078] As an optional implementation, the building electrical fault diagnosis method based on the vector weighted average algorithm to optimize the support vector machine has the ability to accurately and quickly detect building electrical faults. In the signals of various faults, CEEMDAN is used to effectively decompose the signals into IMFs. Each IMF can be decomposed to describe the characteristics of the original signal, and there is no modal aliasing problem, which overcomes the problem that the traditional EMD has different degrees of aliasing in the feature space, resulting in uncertain diagnosis results. Moreover, the MSE extracts features of IMFs at multiple scales, and the fault sample data set composed of the time-frequency domain features of the original fault signal calculated by the mathematical statistics algorithm based on the original fault signal already contains the multi-scale and multi-faceted features of the original fault signal. Therefore, this embodiment can extract the feature data of building electrical faults in an all-round way.
[0079] In terms of fault classifier, since the penalty factor C and kernel function coefficient gumma of the support vector machine have a great influence on the classification effect of the support vector machine, the traditional support vector machine needs to manually debug the two hyperparameters, which is time-consuming and labor-intensive and difficult to debug to the optimal value. This paper uses the vector weighted average algorithm to automatically calculate the two hyperparameters of the support vector machine, which can quickly obtain the optimal value under the corresponding sample data set, and the running time is less than 1 second. And the classification accuracy is also greatly improved.
[0080] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A building electrical fault diagnosis method based on vector weighted average algorithm to optimize support vector machine, characterized in that: The steps include: Signal preprocessing: Use adaptive noise complete set empirical mode decomposition to decompose the original fault signal in the time and frequency domain, decompose it into efficient modal functions, and obtain multiple intrinsic modal components for further feature extraction; Feature extraction: Use multi-scale sample entropy to extract features on multiple time scales from the decomposed modal function; Enriching feature signals: adding the time-frequency domain features of the original signal calculated based on the data statistical algorithm to enrich the signal feature data set; Fault classification: The optimal solution of the penalty factor C and the kernel function coefficient gumma of the support vector machine is calculated using vector weighted average, so that the classification ability of the support vector machine reaches the best state, and the support vector machine is used to classify the faults.
2. The building electrical fault diagnosis method based on vector weighted average algorithm optimized support vector machine according to claim 1 is characterized in that: The adaptive noise complete set empirical mode decomposition is to add white noise to the original fault signal, and then obtain a set of intrinsic mode components and a residual through empirical mode decomposition; then add white noise to the residual value, and then obtain a set of intrinsic mode components and a residual through empirical mode decomposition, and repeat this step until the convergence condition is met.
3. The building electrical fault diagnosis method based on vector weighted average algorithm optimized support vector machine according to claim 2 is characterized in that: The adaptive noise complete set empirical mode decomposition performs time-frequency domain decomposition on the original fault signal, obtains an intrinsic mode component signal, and uses multi-scale sample entropy to extract features to obtain a sample feature set.
4. The building electrical fault diagnosis method based on vector weighted average algorithm optimized support vector machine according to claim 1 is characterized in that: The enriched characteristic signal is a signal characteristic calculated by a data statistical algorithm on the original fault signal, including three dimensionless characteristics calculated on the original signal: peak factor, pulse factor and margin factor, and four frequency characteristics calculated on the original signal: center of gravity frequency, mean square frequency, frequency variance and relative power frequency; the above seven characteristics are added to the sample feature set.
5. The building electrical fault diagnosis method based on vector weighted average algorithm optimized support vector machine according to claim 1, characterized in that: The steps of calculating the support vector machine by vector weighted average are as follows: a) Input the penalty factor C and the kernel function coefficient gumma, initialize the INFO parameter, set the maximum number of iterations Maxg and the population size Np, and randomly generate an initial population of Np solution vectors; b) Solve each solution vector using the fitness function and obtain the optimal solution vector; c) Randomly select three solutions from the population and calculate new solution vectors: z1 and z2; d) Calculate the new vector u through z1 and z2, update the vector u, and calculate the fitness function of each individual; e) If the fitness function becomes smaller, update the optimal vector u and continue iterating until the maximum number of iterations, then the optimal C and gumma values can be output.
6. The building electrical fault diagnosis method based on vector weighted average algorithm optimized support vector machine according to claim 2 is characterized in that: The adaptive noise complete set empirical mode decomposition sets the amplitude of the added white noise to 10, the number of EMD decompositions to 8, the sampling frequency to 50, and the maximum number of iterations to 1000.
7. The building electrical fault diagnosis method based on vector weighted average algorithm optimized support vector machine according to claim 5 is characterized in that: The maximum number of iterations of the vector weighted average optimization algorithm is set to 10, the population size is set to 50, and the number of cross-validation times is set to 3.
8. The building electrical fault diagnosis method based on vector weighted average algorithm optimized support vector machine according to claim 5 is characterized in that: The vector weighted average optimization algorithm updates the position of each generation of vector u through three stages: updating rules, vector merging and local search.