Circuit fault diagnosis method and electronic equipment

By extracting and splicing the multi-dimensional feature of the analog circuit fault signal, combining the particle swarm optimization algorithm and the tanh activation function, the problem of low fault diagnosis accuracy of analog circuits is solved, and high-precision fault type recognition is achieved.

CN118962418APending Publication Date: 2024-11-15HEBEI UNIV OF SCI & TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411160362.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the prior art, the accuracy of analog circuit fault diagnosis is easily affected by expert experience and fault simulation accuracy, making it difficult to achieve high-precision fault diagnosis.

Method used

By obtaining the fault signal of the circuit to be tested, the fault features are extracted from different dimensions, and after the feature is spliced, the pre-trained fault diagnosis model is input, the improved particle swarm optimization algorithm is used to determine the model parameters, and the inertial weight factor is adjusted in combination with the tanh activation function to improve the Output accuracy of the fault diagnosis model.

Benefits of technology

It realizes high-precision diagnosis of analog circuit faults, avoids the limitations of expert experience and fault simulation accuracy, and improves the accuracy of fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118962418A_ABST
    Figure CN118962418A_ABST
Patent Text Reader

Abstract

The invention provides a circuit fault diagnosis method and electronic equipment. The method comprises the following steps: acquiring a fault signal of a circuit to be detected, and performing feature extraction on the fault signal from different dimensions to correspondingly obtain fault features under different dimensions; splicing the fault features under different dimensions to obtain fusion features, and inputting the fusion features into a pre-trained fault diagnosis model to obtain a fault type of the to-be-detected circuit output by the fault diagnosis model; wherein the fault diagnosis model is used for determining the fault type of the circuit according to the fault characteristics of the circuit; model parameters in the fault diagnosis model are determined by an improved particle swarm optimization algorithm, and an inertia weight factor in the improved particle swarm optimization algorithm is determined according to a fitness value of a particle swarm and a hyperbolic tangent activation function. According to the invention, high fault diagnosis precision can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a circuit fault diagnosis method, device and electronic equipment. Background Art

[0002] With the rapid development of electronic technology, analog circuits are widely used in various electronic devices and instruments. In the process of design, manufacturing, and packaging, analog circuits will inevitably have loopholes that are difficult to find manually, resulting in failures in the use of the circuit, affecting the normal operation of electronic equipment and instruments, and causing serious losses. However, due to the tolerance of the components such as resistors and capacitors inside the analog circuit, it is difficult to diagnose faults in analog circuits. Therefore, it is necessary to find a method that can quickly and accurately diagnose faults in analog circuits to improve the application safety of instruments and equipment and the quality of integrated circuits.

[0003] In the related art, when performing fault diagnosis on analog circuits, fault simulation is usually performed on the analog circuits in advance, and a fault dictionary is established based on expert experience. In the actual fault diagnosis process, the specific data features of the circuit under test are extracted, and a method similar to "looking up a dictionary" is used to determine the fault point of the analog circuit. However, this diagnostic method is too dependent on expert experience, and its fault diagnosis accuracy is limited by the fault simulation accuracy, which makes it impossible to achieve a high fault diagnosis accuracy. Summary of the invention

[0004] The embodiments of the present invention provide a circuit fault diagnosis method and electronic equipment to solve the problem that the fault diagnosis accuracy of analog circuits is easily affected by expert experience and fault simulation accuracy, and a high fault diagnosis accuracy cannot be achieved.

[0005] In a first aspect, an embodiment of the present invention provides a circuit fault diagnosis method, comprising:

[0006] Acquire a fault signal of the circuit to be tested, and extract features of the fault signal from different dimensions to obtain fault features in different dimensions;

[0007] The fault features under different dimensions are spliced ​​to obtain fused features, and the fused features are input into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model;

[0008] The fault diagnosis model is used to determine the fault type of the circuit according to the fault characteristics of the circuit; the model parameters in the fault diagnosis model are determined by an improved particle swarm optimization algorithm, and the inertia weight factor in the improved particle swarm optimization algorithm is determined according to the fitness value of the particle swarm and the hyperbolic tangent (Hyperbolic Tangent Activation Function, tanh) activation function.

[0009] In a possible implementation, before inputting the fusion feature into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model, the method further includes:

[0010] Initializing particle swarm parameters; wherein the particle swarm parameters include the speed and position of each particle, the current number of iterations and the maximum number of iterations; the particles in the particle swarm are used to characterize the model parameters in the fault diagnosis model;

[0011] Determine the fitness value of each particle in the current particle swarm based on the speed and position of each particle in the current particle swarm, and determine the global optimal particle in the current particle swarm based on the fitness value;

[0012] Based on the fitness value of each particle in the current particle swarm, the fitness value of each particle in the previous generation particle swarm, and the tanh activation function, determine the inertia weight factor corresponding to the current particle swarm;

[0013] Based on the inertia weight factor corresponding to the current particle swarm, the speed and position of each particle in the current particle swarm are updated to obtain the next generation particle swarm, the next generation particle swarm is determined as the new current particle swarm, and the current number of iterations is updated;

[0014] If the updated number of iterations is less than the maximum number of iterations, jump to the step of determining the fitness value of each particle in the current particle swarm based on the speed and position of each particle in the current particle swarm and continue to execute until the updated number of iterations reaches the maximum number of iterations, and determine the global optimal particle in the current particle swarm as the optimal solution;

[0015] Based on the model parameters corresponding to the optimal solution, the model parameters of the fault diagnosis model are determined, and the fault diagnosis model is trained to obtain a trained fault training model.

[0016] In a possible implementation, determining the inertia weight factor corresponding to the current particle swarm based on the fitness value of each particle in the current particle swarm, the fitness value of each particle in the previous generation particle swarm, and the tanh activation function includes:

[0017] Based on the fitness value of each particle in the current particle swarm and the fitness value of each particle in the previous generation particle swarm, the evolutionary discreteness of the current particle swarm is determined;

[0018] The current number of iterations, the preset maximum number of iterations, and the evolutionary discreteness of the current particle swarm are brought into the tanh activation function to determine the inertia weight factor corresponding to the current particle swarm.

[0019] In a possible implementation, the evolutionary discreteness of the current particle swarm is determined based on the fitness value of each particle in the current particle swarm and the fitness value of each particle in the previous generation particle swarm, including:

[0020] Based on the fitness value of each particle in the current particle swarm, determine the fitness value variance corresponding to the current particle swarm;

[0021] Based on the fitness value of each particle in the previous generation of particle swarm, determine the variance of the fitness value corresponding to the previous generation of particle swarm;

[0022] The ratio between the variance of the fitness value corresponding to the current particle swarm and the variance of the fitness value corresponding to the previous generation of particle swarm is determined as the evolutionary discreteness of the current particle swarm.

[0023] In a possible implementation, before updating the speed and position of each particle in the current particle swarm based on the inertia weight factor corresponding to the current particle swarm, the method further includes:

[0024] According to the current number of iterations, determine the learning factor corresponding to the current particle swarm;

[0025] The updating of the speed and position of each particle in the current particle swarm based on the inertia weight factor corresponding to the current particle swarm includes:

[0026] Based on the inertia weight factor corresponding to the current particle swarm and the learning factor corresponding to the current particle swarm, the speed and position of each particle in the current particle swarm are updated.

[0027] In a possible implementation, determining the learning factor corresponding to the current particle swarm according to the current number of iterations includes:

[0028] Get the initial setting value and the final setting value of the learning factor;

[0029] Determine a learning factor change value corresponding to a current number of iterations based on a difference between the initial setting value and the end setting value and a ratio between a current number of iterations and a preset maximum number of iterations;

[0030] On the basis of the initial setting value, the learning factor change value corresponding to the current iteration number is superimposed to obtain the learning factor corresponding to the current particle swarm.

[0031] In a possible implementation, the current number of iterations, the preset maximum number of iterations, and the evolutionary discreteness of the current particle swarm are brought into the tanh activation function to determine the inertia weight factor corresponding to the current particle swarm, including:

[0032] according to Determine the inertia weight factor corresponding to the current particle swarm;

[0033] Among them, w(t) represents the inertia weight factor corresponding to the current particle swarm at the tth iteration, w max represents the maximum inertia weight factor, w min represents the minimum inertia weight factor, represents the tanh activation function, b' represents the damping coefficient, t represents the current number of iterations, and T represents the preset maximum number of iterations.

[0034] In a possible implementation, before inputting the fusion feature into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model, the method further includes:

[0035] Performing dimension reduction processing on the fusion feature to obtain a fusion feature after dimension reduction;

[0036] Inputting the fusion feature into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model includes:

[0037] The fusion features after dimension reduction are input into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model.

[0038] In a possible implementation, feature extraction is performed on the fault signal from different dimensions to obtain corresponding fault features in different dimensions, including:

[0039] The fault signal is subjected to time domain feature extraction, wavelet packet decomposition and empirical mode decomposition respectively to obtain fault features in different dimensions.

[0040] In a second aspect, an embodiment of the present invention provides a circuit fault diagnosis device, comprising:

[0041] An acquisition module is used to acquire a fault signal of the circuit to be tested, and extract features of the fault signal from different dimensions to obtain fault features in different dimensions;

[0042] A diagnosis module, used to combine fault features under different dimensions to obtain fused features, and input the fused features into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model;

[0043] The fault diagnosis model is used to determine the fault type of the circuit according to the fault characteristics of the circuit; the model parameters in the fault diagnosis model are determined by an improved particle swarm optimization algorithm, and the inertia weight factor in the improved particle swarm optimization algorithm is determined according to the fitness value of the particle swarm and the tanh activation function.

[0044] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the processor implements the steps of the method described in the first aspect or any possible implementation manner of the first aspect.

[0045] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect or any possible implementation method of the first aspect are implemented.

[0046] The embodiment of the present invention provides a circuit diagnosis method and an electronic device. By splicing fault features under different dimensions to obtain fusion features, the details and features of the fault signal at different scales and dimensions can be captured. Subsequently, the fusion features are input into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model; wherein, by using the idea of ​​model diagnosis, a method for fault diagnosis of the circuit is provided, which can avoid being limited by expert experience and fault simulation accuracy, and achieve higher fault diagnosis accuracy. wherein, the model parameters in the fault diagnosis model are determined by an improved particle swarm optimization algorithm, and the inertia weight factor in the improved particle swarm optimization algorithm is determined according to the fitness value of the particle swarm optimization algorithm and the tanh activation function. here, the change trend of the tanh activation function is consistent with the ideal optimization trend of the particle swarm optimization algorithm in the early stage of global large-scale optimization and in the later stage of local small-scale optimization. at the same time, the fitness value of the particle swarm can reflect the optimization degree of the particle. the inertia weight factor determined by the fitness value of the particle swarm and the tanh activation function can effectively improve the global search capability of the particle swarm optimization algorithm in the early stage and the local search capability in the later stage, so as to determine the optimal model parameters, thereby further improving the output accuracy of the fault diagnosis model. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0048] Figure 1 is a flow chart of an implementation of a circuit fault diagnosis method provided by an embodiment of the present invention;

[0049] Figure 2 It is a schematic diagram of splicing fault features in different dimensions provided by an embodiment of the present invention;

[0050] Figure 3 It is a flowchart of determining model parameters of a fault diagnosis model and performing model training provided by an embodiment of the present invention;

[0051] Figure 4 is a fault signal distribution diagram of a Sallen-Key bandpass filter circuit provided by an embodiment of the present invention;

[0052] Figure 5 is a fusion feature distribution diagram of a Sallen-Key bandpass filter circuit provided by an embodiment of the present invention;

[0053] Figure 6 Schematic diagram of the diagnostic accuracy of the Sallen-Key bandpass filter circuit provided by an embodiment of the present invention;

[0054] Figure 7 is a schematic diagram of the structure of a circuit fault diagnosis device provided by an embodiment of the present invention;

[0055] Figure 8 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0057] Traditional analog circuit fault diagnosis methods mainly include two categories: the first method is to simulate the analog circuit in advance and establish a fault dictionary based on expert experience, and then extract the specific data features of the measured circuit during measurement, using a method similar to "looking up a dictionary" to find the fault point of the analog circuit; the second method is based on the measured data information, using fault verification technology and parameter identification technology to analyze the circuit fault, which belongs to post-test simulation. However, both of the above methods are too dependent on expert experience, and their fault diagnosis accuracy is limited by the fault simulation accuracy, which leads to the problem of not being able to achieve high fault diagnosis accuracy.

[0058] For the purpose of improving the fault diagnosis accuracy of analog circuits, in the implementation of the present application, the fusion features after the fault features of the fault signal of the circuit to be tested in different dimensions are spliced ​​are input into the fault diagnosis model to determine the fault type of the circuit to be tested. Among them, using the idea of ​​model diagnosis, a method for fault diagnosis of the circuit is provided, which can avoid being limited by expert experience and fault simulation accuracy, and achieve higher fault diagnosis accuracy. In addition, the model parameters of the fault diagnosis model are determined by optimizing the improved particle swarm optimization algorithm. The improved particle swarm optimization algorithm is determined by the fitness value of the particle swarm and the tanh activation function. Here, the fitness value of the particle swarm can reflect the optimization degree of the particle. At the same time, the change trend of the tanh activation function is consistent with the ideal optimization trend of the particle swarm. The inertia weight factor determined by the fitness value of the particle swarm and the tanh activation function can effectively improve the global search ability of the particle swarm optimization algorithm in the early stage, and the local search ability in the later stage, thereby determining the optimal model parameters and further improving the output accuracy of the fault diagnosis model.

[0059] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0060] Figure 1 The implementation flow chart of the circuit fault diagnosis method provided by the embodiment of the present invention is detailed as follows:

[0061] Step 101 , obtaining a fault signal of the circuit to be tested, and extracting features of the fault signal from different dimensions, thereby obtaining corresponding fault features in different dimensions.

[0062] Here, the fault signal of the circuit to be tested may be an output voltage waveform signal of the circuit to be tested. This embodiment takes into account that the fault feature of a single dimension cannot fully characterize the essential information of the fault signal, which in turn makes it impossible to distinguish various types of faults. Therefore, feature extraction of the fault signal can be performed from different dimensions to capture the details and features of the fault signal in different dimensions, thereby helping the fault diagnosis model to better understand the fault signal of the circuit to be tested and improve the diagnostic accuracy of the fault diagnosis model.

[0063] In some embodiments, time domain feature extraction, wavelet packet decomposition, and empirical mode decomposition may be performed on the fault signal respectively, so as to obtain fault features in different dimensions.

[0064] Here, time domain characteristics such as maximum value, minimum value, root mean square, variance, peak-to-peak value, kurtosis, skewness, peak factor, waveform factor, pulse factor and margin factor can be extracted from the fault signal of the circuit to be tested as fault characteristics in the first dimension.

[0065] The embodiment of the present invention can determine the node energy of each node after the wavelet packet decomposition by performing wavelet packet decomposition on the fault signal of the circuit to be tested, and use the proportion of each node energy as the fault feature of the second dimension. Among them, the proportion of each node energy refers to the ratio between each node energy and the total node energy. The total node energy is the sum of the energies of each node.

[0066] The wavelet basis function, the number of decomposition layers and the number of nodes in the wavelet packet decomposition process can be determined according to actual conditions. For example, the db3 wavelet basis function can be used to perform 3-layer wavelet packet decomposition on the fault signal to extract the energy of each node in the third layer.

[0067] The calculation formula of each node energy after three-layer wavelet packet decomposition can be expressed as:

[0068]

[0069] Among them, E 3j represents the node energy of node j after three-layer wavelet packet decomposition, d 3j (k) represents the energy corresponding to the kth coefficient on node j after three-layer wavelet packet decomposition. In the embodiment of the present invention, 8 nodes can be taken as an example, and j=0, 1, ..., 7 can be set.

[0070] The calculation formula of total node energy can be expressed as: Where E represents the total node energy

[0071] The calculation formula for the proportion of energy of each node can be expressed as: Among them, P 3j Represents the proportion of node energy of node j after three-layer wavelet packet decomposition.

[0072] Here, the energy proportions of the above nodes can be constructed into a matrix form to characterize the fault characteristics in the second dimension. The fault characteristics in the second dimension can be expressed as P = [P 30 , P 31 ,…,P 37 ].

[0073] Among them, P represents the fault characteristics in the second dimension, P 30 It represents the proportion of node energy of node 0 after three-layer wavelet packet decomposition. 31 shows the proportion of node energy of node 1 after three-layer wavelet packet decomposition, P 37 It represents the proportion of node energy of node 7 after three-layer wavelet packet decomposition.

[0074] The embodiment of the present invention can also use the empirical mode decomposition algorithm to decompose the fault signal to obtain multiple local characteristic signals containing the fault signal at different time scales, that is, the intrinsic mode function signal. By extracting the first q intrinsic mode function signals and calculating the multi-scale entropy of the first q intrinsic mode function signals respectively, the multi-scale entropy is determined as the fault feature in the third dimension. Here, q is an integer greater than or equal to 1.

[0075] The closer the intrinsic mode function signal is to the front, the greater the amount of information contained in the intrinsic mode function signal. The value of q can be determined according to actual conditions. For example, the value of q can be 3, that is, the first three intrinsic mode function signals are extracted.

[0076] The specific calculation method of the multi-scale entropy of the intrinsic mode function signal is as follows:

[0077] Step 1: Based on the intrinsic mode function signal, a coarse-grained vector is constructed. The construction formula is:

[0078]

[0079] Among them, y i represents the coarse-grained vector corresponding to the i-th component in the intrinsic mode function signal, τ represents the scale factor, n represents the scale factor coefficient, x i represents the i-th component in the intrinsic mode function signal, and N represents the length of the discrete signal sequence. Here, the intrinsic mode function signal can be expressed as X = {x1, x2, ..., x I}. Where X represents the intrinsic mode function signal, x1 represents the first component of the intrinsic mode function signal, x2 represents the second component of the intrinsic mode function signal, and x I represents the Ith component in the intrinsic mode function signal. Here, I is an integer greater than or equal to 1.

[0080] Here, each coarse-grained vector constitutes a coarse-grained time series. The coarse-grained time series can be expressed as Y = {y1, y2, ..., y I}. Where Y represents the coarse-grained time series, y1 represents the coarse-grained vector corresponding to the first component of the intrinsic mode function signal, y2 represents the coarse-grained vector corresponding to the second component of the intrinsic mode function signal, and y I Represents the coarse-grained vector corresponding to the Ith component in the intrinsic mode function signal.

[0081] Step 2: Decompose the coarse-grained time series under the scale factor τ into multiple subsequences in the form of m-dimensional vectors, that is, Y(i) = {y i ,y i+1 ,…,y i+m+1}.

[0082] Y(i) represents the i-th subsequence in the form of an m-dimensional vector, and y i represents the coarse-grained vector corresponding to the i-th component in the intrinsic mode function signal, and y i+1 represents the coarse-grained vector corresponding to the (i + 1)-th component in the intrinsic mode function signal, and y i+m-1 represents the coarse-grained vector corresponding to the (i + m - 1)-th component in the intrinsic mode function signal. Here, m is an integer greater than or equal to 1, and i = 1, 2, …, I - m.

[0083] Step 3, for each subsequence, calculate the maximum distance between this subsequence and other subsequences. The calculation formula can be expressed as:

[0084] D(i, p) = max{y(i + k) - y(p + k)}, 0 ≤ k ≤ m - 1

[0085] where D(i, p) represents the maximum distance between the i-th subsequence and the p-th subsequence, and y i+k represents the coarse-grained vector corresponding to the (i + k)-th component in the intrinsic mode function signal, and y p+k represents the coarse-grained vector corresponding to the (p + k)-th component in the intrinsic mode function signal.

[0086] Step 4, for each subsequence, calculate the maximum distance between this subsequence and other subsequences, count the number of its maximum distances less than the similarity tolerance r, denoted as num(D(i, p) < r), and calculate the ratio of this number to the total number of distances N - m - 1, denoted as Denote the average value of

[0087] Step 5, repeat the above Steps 1 to 4 to calculate B m+1 (r), and based on B m (r) and B m+1 (r), calculate the sample entropy of the intrinsic mode function signal:

[0088]

[0089] where SampEn(m, r) represents the sample entropy of the intrinsic mode function signal.

[0090] When the length of the coarse-grained time series is a finite value, at this time, the sample entropy of the intrinsic mode function signal can be expressed as:

[0091] Step 6, based on the above sample entropy, the multi-scale entropy of the intrinsic mode function signal can be expressed as: Here, MSE(τ|SampEn(m,r,N)) represents the multi-scale entropy of the intrinsic mode function signal.

[0092] Here, the similarity tolerance r, the dimension m of the subsequence and the value of the scale factor τ can be determined according to the actual situation. For example, r=0.2std (std is the standard deviation of the intrinsic mode function signal) and m=2 can be selected. The scale factor τ can be selected as 5, 10 or 15.

[0093] Step 102, concatenate the fault features under different dimensions to obtain fused features, and input the fused features into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model.

[0094] The model parameters in the fault diagnosis model are determined by an improved particle swarm optimization algorithm, and the inertia weight factor in the improved particle swarm optimization algorithm is determined according to the fitness value of the particle swarm and the tanh activation function.

[0095] In an embodiment of the present invention, the fault features in the first dimension, the fault features in the second dimension, and the fault features in the third dimension can all be expressed in matrix form. By splicing the elements in the above three matrices, a complete matrix containing the fault features of each dimension can be formed, that is, a fusion feature.

[0096] See also Figure 2 When performing fault feature splicing, the embodiment of the present invention can splice the row elements in each matrix correspondingly to obtain a fusion feature.

[0097] Here, the fault diagnosis model may be a machine learning model, which is used to learn the mapping relationship between the fault characteristics of the circuit and the fault type of the circuit, thereby determining the fault type of the circuit according to the fault characteristics of the circuit.

[0098] In the embodiment of the present invention, the support vector machine model is considered to be outstanding in processing small samples, nonlinear and high-dimensional recognition and classification, and the support vector machine model can be used as a fault diagnosis model. The output accuracy of the support vector machine model is affected by the parameter kernel function and the penalty factor. In the embodiment of the present invention, the particle swarm optimization algorithm can be used to determine the parameter kernel function and the penalty factor in the support vector machine model.

[0099] The applicant has found that the inertia weight factor in the particle swarm optimization algorithm is usually a set value, which cannot achieve the effect of large-scale search in the early stage and small-scale high-precision search in the later stage. It is easy to fall into local extreme values, which is not conducive to determining the global optimal solution. Therefore, the embodiment of the present invention improves the particle swarm optimization algorithm, and the improved particle swarm optimization algorithm determines the inertia weight factor according to the fitness value of the particle swarm and the tanh activation function.

[0100] The embodiment of the present invention determines the inertia weight factor based on the fitness value of the particle swarm and the tanh activation function, which can improve the early global search capability and the late local search capability of the particle swarm optimization algorithm, thereby enabling a global large-scale search to be performed in the early stage of the algorithm iteration to reach a better area as quickly as possible, and a small-scale local search to be performed on the better area in the late stage of the algorithm iteration to determine the optimal solution as soon as possible.

[0101] The change trend of the tanh activation function is first a surge and then a slowdown, which is consistent with the ideal optimization trend of the particle swarm optimization algorithm, which is global large-scale optimization in the early stage and local small-scale optimization in the later stage. In addition, the fitness value of the particle swarm can characterize the degree of optimization of the particle swarm, and can distinguish the early stage and the late stage of the particle swarm optimization algorithm. Therefore, the embodiment of the present invention determines the inertia weight factor according to the fitness value of the particle swarm and the tanh activation function, thereby improving the early global search capability and the late local search capability of the particle swarm optimization algorithm, and finally determines the optimal solution, that is, the optimal parameter-sensitive kernel function and the optimal penalty factor of the support vector machine model.

[0102] In addition, the embodiments of the present invention take into account that the fused features contain fault features in multiple dimensions, and there may be problems of information redundancy and dimensionality disaster. To avoid the above problems, in some embodiments, before the fused features are input into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model, the fused features can be pre-processed for dimensionality reduction to obtain the fused features after dimensionality reduction; then, the fused features after dimensionality reduction are input into the pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model.

[0103] In the embodiment of the present invention, a data dimension reduction algorithm may be used to perform dimension reduction processing on the fusion features, for example, a principal component analysis algorithm.

[0104] Here, when the principal component analysis algorithm is used to reduce the dimension of the fusion features, the following steps can be followed:

[0105] Step 1: Standardize the fusion features to obtain a standardized sample matrix. The standardized sample matrix can be expressed as:

[0106]

[0107] Among them, R ab represents the element in the ath row and bth column of the standardized sample matrix R, K ab represents the element in the ath row and bth column in the fused feature K, and A represents the total number of rows in the fused feature.

[0108] Step 2: Calculate the correlation coefficient matrix corresponding to the standardized sample matrix. The correlation coefficient matrix can be expressed as:

[0109]

[0110] Among them, B represents the correlation coefficient matrix, T represents the transposition factor, and R represents the standardized sample matrix.

[0111] Step 3: Calculate the characteristic equation of the correlation coefficient matrix B, determine multiple eigenvalues ​​of the correlation coefficient matrix B, and correspondingly determine multiple unit eigenvectors. From the multiple eigenvalues, determine the first c eigenvalues, and use the unit eigenvectors corresponding to the c eigenvalues ​​as the fusion features after dimensionality reduction.

[0112] Here, you can follow Determine the value of c. Among them, λ a represents the ath eigenvalue, the number of eigenvalues ​​corresponds to the number of rows of the matrix, L represents a preset value, 0≤L≤1, and illustratively, L may be 0.95.

[0113] It can represent the cumulative contribution rate of the principal components of the first c eigenvalues. For example, when the cumulative contribution rate of the principal components of the first c eigenvalues ​​is greater than or equal to 95%, the unit eigenvectors corresponding to the first c eigenvalues ​​are used as the fusion features after dimensionality reduction.

[0114] The embodiment of the present invention reduces the dimensionality of fused features, thereby reducing information redundancy and dimensionality disaster caused by fault feature splicing and fusion while retaining complete fault features, which is beneficial to improving the diagnostic accuracy of the fault diagnosis model.

[0115] The embodiment of the present invention splices fault features under different dimensions to obtain fusion features, which can capture the details and features of fault signals at different scales and dimensions. Subsequently, the fusion features are input into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model; wherein, by adopting the idea of ​​machine learning for fault diagnosis, it is possible to avoid being limited by expert experience and fault simulation accuracy, and achieve higher fault diagnosis accuracy. wherein, the model parameters in the fault diagnosis model are determined by an improved particle swarm optimization algorithm, and the inertia weight factor in the improved particle swarm optimization algorithm is determined according to the fitness value of the particle swarm and the tanh activation function. here, the change trend of the tanh activation function is consistent with the ideal optimization trend of the particle swarm optimization algorithm in the early stage of global large-scale optimization and in the later stage of local small-scale optimization. at the same time, the fitness value of the particle swarm can reflect the optimization degree of the particle. the inertia weight factor determined by the fitness value of the particle swarm and the tanh activation function can effectively improve the global search capability of the particle swarm optimization algorithm in the early stage, and the local search capability in the later stage, so as to determine the optimal model parameters, thereby further improving the output accuracy of the fault diagnosis model.

[0116] In some embodiments, before the fusion features are input into a pre-trained fault diagnosis model to obtain the fault type of the circuit under test output by the fault diagnosis model, the improved particle swarm optimization algorithm can be used to optimize and determine the model parameters in the fault diagnosis model, that is, the parameter kernel function and the penalty factor. And on the basis of determining the parameter kernel function and the penalty factor, the fault diagnosis model is trained to obtain a trained fault diagnosis model. Figure 3 , the specific optimization training steps are as follows:

[0117] Step 301, initializing the particle swarm parameters; wherein the particle swarm parameters include the speed and position of each particle, the current iteration number and the maximum iteration number; the particles in the particle swarm are used to characterize the model parameters in the fault diagnosis model.

[0118] Here, a particle swarm can be generated by random generation to initialize the speed and position of each particle. However, considering that the random generation method will make the particle distribution in the particle swarm uneven, and the Tent chaotic mapping has the characteristics of randomness, ergodicity and regularity. Compared with other chaotic mapping methods, the Tent chaotic mapping distribution is more uniform and stable. Therefore, the embodiment of the present invention can also use the Tent chaotic mapping to initialize the speed and position of each particle in the particle swarm. The initialization formula of the Tent chaotic mapping can be expressed as:

[0119]

[0120] Wherein, Z(d+1) represents the particle swarm at the next moment, Z(d) represents the particle swarm at the current moment, β represents the chaos parameter, β∈[0,1], and β=0.5 by way of example.

[0121] Here, the current number of iterations and the maximum number of iterations may be determined according to actual conditions. For example, the maximum number of iterations may be 200. When initializing the current number of iterations, the current number of iterations may be set to 1.

[0122] Step 302, based on the speed and position of each particle in the current particle swarm, determine the fitness value of each particle in the current particle swarm, and determine the global optimal particle in the current particle swarm based on the fitness value.

[0123] Here, the fitness value of a particle can be used to characterize the degree of optimization of the particle. It is understandable that the higher the fitness value of a particle, the higher the degree of optimization of the particle. According to the fitness value of each particle, the global optimal particle in the current particle swarm can be determined, that is, the particle with the highest degree of optimization.

[0124] Step 303, based on the fitness value of each particle in the current particle swarm, the fitness value of each particle in the previous generation particle swarm and the tanh activation function, determine the inertia weight factor corresponding to the current particle swarm.

[0125] In conventional particle swarm optimization algorithms, the inertia weight factor is usually set to a fixed value, and the optimization ability of the particle swarm can be adjusted by the inertia weight factor.

[0126] Ideally, the particle swarm optimization algorithm can increase the global optimization ability in the early stage of algorithm iteration and conduct a global large-scale search to reach the optimal area as soon as possible. In the later stage of algorithm iteration, it can increase the local optimization ability and conduct a small-scale local search on the optimal area to determine the optimal solution as soon as possible.

[0127] It can be seen that the fixed value of the inertia weight factor cannot meet the requirements of increasing the global optimization capability in the early stage and increasing the local optimization capability in the later stage. Therefore, the embodiment of the present invention determines the inertia weight factor corresponding to the current particle swarm based on the fitness value of each particle in the current particle swarm, the fitness value of each particle in the previous generation particle swarm, and the tanh activation function, thereby adaptively adjusting the inertia weight factor according to the fitness value of the particle and the tanh activation function, thereby achieving the purpose of increasing the global optimization capability in the early stage and increasing the local optimization capability in the later stage.

[0128] When determining the inertia weight factor, the embodiment of the present invention can first determine the evolutionary discreteness of the current particle swarm based on the fitness value of each particle in the current particle swarm and the fitness value of each particle in the previous generation particle swarm; then, the current number of iterations, the preset maximum number of iterations, and the evolutionary discreteness of the current particle swarm are brought into the tanh activation function to determine the inertia weight factor corresponding to the current particle swarm.

[0129] In some embodiments, when determining the evolutionary discreteness of the current particle swarm, the fitness value variance corresponding to the current particle swarm can be determined based on the fitness value of each particle in the current particle swarm; at the same time, the fitness value variance corresponding to the previous generation of particle swarm can be determined based on the fitness value of each particle in the previous generation of particle swarm; finally, the ratio between the fitness value variance corresponding to the current particle swarm and the fitness value variance corresponding to the previous generation of particle swarm is determined as the evolutionary discreteness of the current particle swarm.

[0130] Here, the evolutionary discreteness can be expressed as:

[0131] Among them, s(t) represents the evolutionary discreteness of the current particle swarm at the t-th iteration, var[f(t)] represents the variance of the fitness value corresponding to the current particle swarm at the t-th iteration, that is, the variance of the fitness value of each particle in the particle swarm at the t-th iteration, var[f(t-1)] represents the variance of the fitness value corresponding to the previous generation of particle swarm, that is, the variance of the fitness value of each particle in the particle swarm at the t-1-th iteration.

[0132] As the number of iterations increases, particles will search for optimization from the global to the local, and the more concentrated the particles are, the smaller the variance is. When all particles reach the optimal value, the particle cluster is concentrated at one point, that is, the global optimal point, and the evolutionary discreteness s(t) is 0. In other words, the evolutionary discreteness is a function that decreases from 1 to 0.

[0133] When s(t) is large, the particles are more dispersed. Although it is not easy to fall into the local optimum, it is not conducive to the rapid convergence of the algorithm. As s(t) decreases, it means that the particles are optimizing from the global to the local. Although this is conducive to the rapid convergence of the algorithm, it is also easy to fall into the local optimum. In order to facilitate the rapid convergence of the algorithm and avoid falling into the local extreme value, the embodiment of the present invention can increase the inertia weight factor very quickly when s(t) is large at the beginning of the algorithm, thereby expanding the global search and optimization ability to facilitate the rapid convergence of the algorithm. When s(t) is small, the inertia weight factor should be slowly reduced. On the one hand, the local search and optimization ability can be enhanced by reducing the inertia weight factor. On the other hand, in order to avoid the local search and optimization ability being too large, which causes the algorithm to fall into the local optimum, the inertia weight factor can be slowly reduced to avoid the algorithm from falling into the local optimum.

[0134] The tanh activation function has a trend of first surging and then flattening, which meets the requirement of rapidly increasing the inertia weight factor in the early stage of the algorithm and slowly reducing the inertia weight factor in the later stage of the algorithm. Therefore, the embodiment of the present invention brings the current number of iterations, the preset maximum number of iterations, and the evolutionary discreteness of the current particle swarm into the tanh activation function to determine the inertia weight factor corresponding to the current particle swarm.

[0135] In some embodiments, the

[0136] Determine the inertia weight factor corresponding to the current particle swarm;

[0137] Among them, w(t) represents the inertia weight factor corresponding to the current particle swarm at the tth iteration, w max represents the maximum inertia weight factor, w min represents the minimum inertia weight factor, represents the tanh activation function, b' represents the damping coefficient, t represents the current number of iterations, and T represents the preset maximum number of iterations.

[0138] When determining the inertia weight factor based on the evolutionary discreteness and the tanh activation function, the embodiment of the present invention can rapidly increase the inertia weight factor when s(t) is large at the initial stage of the algorithm, thereby expanding the global search optimization capability to facilitate rapid convergence of the algorithm. When s(t) is small, the inertia weight factor should be slowly reduced. On the one hand, the local search optimization capability can be enhanced by reducing the inertia weight factor. On the other hand, in order to avoid the local search optimization capability being too large and causing the algorithm to fall into the local optimum, the inertia weight factor can be slowly reduced to avoid the algorithm from falling into the local optimum, thereby ultimately achieving the purpose of balancing its global search capability and local search capability, thereby ensuring rapid convergence of the algorithm and avoiding the algorithm from falling into the local optimum.

[0139] Step 304, based on the inertia weight factor corresponding to the current particle swarm, the speed and position of each particle in the current particle swarm are updated to obtain the next generation particle swarm, the next generation particle swarm is determined as the new current particle swarm, and the current iteration number is updated.

[0140] Based on the inertia weight factor, the speed and position of each particle in the current particle swarm can be updated accordingly, thereby realizing the update and iteration of the particle swarm and obtaining the next generation of particle swarm.

[0141] Step 305, if the updated number of iterations is less than the maximum number of iterations, jump to the step of determining the fitness value of each particle in the current particle swarm based on the speed and position of each particle in the current particle swarm and continue to execute until the updated number of iterations reaches the maximum number of iterations, and the global optimal particle in the current particle swarm is determined as the optimal solution.

[0142] Repeat the iterative update until the updated number of iterations reaches the maximum number of iterations, and then determine the current global optimal particle as the optimal solution of the particle swarm optimization algorithm.

[0143] Step 306 , based on the model parameters corresponding to the optimal solution, determine the model parameters of the fault diagnosis model, and perform model training on the fault diagnosis model to obtain a trained fault training model.

[0144] Taking the fault diagnosis model as the support vector machine model as an example, the model parameters corresponding to the optimal solution are the optimal parameter kernel function and penalty factor. The optimal parameter kernel function and penalty factor are applied to the support vector machine model, and the support vector machine model is trained until the output accuracy of the support vector machine model reaches the preset output accuracy, and a trained fault training model is obtained.

[0145] In the particle swarm optimization algorithm, when updating the speed and position of the particles based on the inertia weight, the learning factor is also combined. The learning factors here include individual learning factors and global learning factors. Among them, the individual learning factor affects the local search ability, the global learning factor affects the global search ability, and determines the influence of individual experience information and other particle experience information on finding the optimal point. A larger individual learning factor will cause particles to search more locally, and a larger global learning factor will cause particles to fall into the local optimum. Therefore, a larger global learning factor and a smaller individual learning factor should be used in the early stage. As the number of iterations increases, the global learning factor decreases and the individual learning factor increases, thereby increasing the ability of particles to converge to the global optimal point. However, the individual learning factor and the global learning factor in the traditional particle swarm optimization algorithm are usually fixed values, which cannot meet the requirements of large global search ability in the early stage and small search ability in the later stage. Therefore, the embodiment of the present invention further improves the individual learning factor and the global learning factor in the particle swarm algorithm.

[0146] In some embodiments, before updating the speed and position of each particle in the current particle swarm based on the inertia weight factor corresponding to the current particle swarm, a learning factor corresponding to the current particle swarm may be determined according to the current number of iterations.

[0147] Accordingly, the above step of updating the speed and position of each particle in the current particle swarm based on the inertia weight factor corresponding to the current particle swarm can be expressed as updating the speed and position of each particle in the current particle swarm based on the inertia weight factor corresponding to the current particle swarm and the learning factor corresponding to the current particle swarm.

[0148] The specific update formula can be expressed as:

[0149]

[0150] Among them, x' k (t+1) represents the position of the kth particle at the t+1th iteration, x' k (t) represents the position of the kth particle at the tth iteration, v k (t+1) represents the velocity of the kth particle at the t+1th iteration, w(t+1) represents the inertia weight factor corresponding to the current particle group at the t+1th iteration, and v k (t) represents the velocity of the kth particle at the tth iteration, c1 represents the individual learning factor, r1 represents a random number in the interval [0, 1], p kbest represents the individual optimal particle, c2 represents the global learning factor, r2 represents a random number in the interval [0, 1], p gbest represents the global optimal particle.

[0151] Among them, when determining the learning factor corresponding to the current particle swarm according to the current number of iterations, the initial setting value and the end setting value of the learning factor can be obtained first, and then, based on the difference between the initial setting value and the end setting value, and the ratio between the current number of iterations and the preset maximum number of iterations, the change value of the learning factor corresponding to the current number of iterations is determined; then, on the basis of the initial setting value, the change value of the learning factor corresponding to the current number of iterations is superimposed to obtain the learning factor corresponding to the current particle swarm.

[0152] The expression of the learning factor can be expressed as:

[0153] Among them, c1 represents the individual learning factor, c 1,start represents the initial setting value of the individual learning factor, c 1,end represents the end setting value of the individual learning factor, t represents the current number of iterations, T represents the maximum number of iterations, c1 represents the global learning factor, c 1,start represents the initial setting value of the global learning factor, c 1,end Indicates the end setting value of the global learning factor.

[0154] Here, c 1,start >c 1,end , and c 2,start <c 2,end .c 1,start 、c 1,end 、c 2,start and c 2,end The value of can be determined according to the actual situation. 1,start and c 2,end The value of can be 2.5. 1,end and c 2,start The value can be 0.5.

[0155] The embodiment of the present invention adopts a larger global learning factor and a smaller individual learning factor in the early stage, so that the particles diverge as much as possible to the integrated search space to increase the diversity of particles. As the number of iterations increases, the global learning factor decreases and the individual learning factor increases, thereby increasing the ability of particles to converge to the global optimal point and strengthening the ability of particles to converge to the global optimal point.

[0156] In order to verify the effectiveness of the circuit fault diagnosis method provided by the embodiment of the present invention, the embodiment of the present invention uses the Sallen-Key bandpass filter circuit and the four-op-amp second-order high-pass filter circuit as verification objects and performs simulation verification.

[0157] The schematic diagrams of the Sallen-Key bandpass filter circuit and the quad-op-amp second-order high-pass filter circuit are drawn on the Pspice simulation software. In the two circuits, the resistance tolerance is set to 5%, and the capacitance tolerance is set to 10%. The component parameter value is considered to be fault-free within the tolerance range, and 50% deviation from the standard value is considered to be a fault state. The output end of the circuit is selected as the test point, and a voltage pen is placed at the test point. The output voltage waveforms under various fault states are collected as fault signals to form a test set sample for verifying the above circuit fault diagnosis method.

[0158] Taking the Sallen-Key bandpass filter circuit as an example, the original fault signal of the Sallen-Key bandpass filter circuit without feature extraction is in the form of two-dimensional data, and its distribution is as follows: Figure 4 Correspondingly, the fusion feature corresponding to the fault signal of the Sallen-Key bandpass filter circuit is also in the form of two-dimensional data, and its distribution is shown as follows Figure 5 Here, Figure 4 and Figure 5 The X-axis and Y-axis represent different dimensions. Figure 4 and Figure 5 F1-F9 in the figure refer to different types of fault states. According to the comparison between the original fault information distribution diagram and the fusion feature visualization diagram, the fault signals are scattered and chaotic. After extracting the fusion features, the faults are clearly distinguished from each other, which greatly improves the clustering ability of the fault feature information. This shows that the feature fusion method can comprehensively extract effective information about circuit faults and has good generalization and robustness.

[0159] The extracted fusion features are input into the fault diagnosis model respectively, and the diagnosis results are as follows: Figure 6 As shown in the figure, the improved particle swarm optimization algorithm has fast convergence and strong global search capabilities, which helps the support vector machine model find the optimal parameters and improve the diagnostic accuracy.

[0160] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0161] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.

[0162] Figure 7 The schematic diagram of the structure of the circuit fault diagnosis device provided by the embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:

[0163] like Figure 7 As shown, the circuit fault diagnosis device 7 includes: an acquisition module 71 and a diagnosis module 72 .

[0164] An acquisition module 71 is used to acquire a fault signal of the circuit to be tested, and extract features of the fault signal from different dimensions to obtain fault features in different dimensions;

[0165] The diagnosis module 72 is used to combine the fault features under different dimensions to obtain fused features, and input the fused features into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model;

[0166] Among them, the fault diagnosis model is used to determine the fault type of the circuit according to the fault characteristics of the circuit; the model parameters in the fault diagnosis model are determined by the improved particle swarm optimization algorithm, and the inertia weight factor in the improved particle swarm optimization algorithm is determined according to the fitness value of the particle swarm and the tanh activation function.

[0167] In a possible implementation, the diagnosis module 72 is further configured to:

[0168] Initialize the particle swarm parameters; the particle swarm parameters include the speed and position of each particle, the current number of iterations and the maximum number of iterations; the particles in the particle swarm are used to characterize the model parameters in the fault diagnosis model;

[0169] Based on the speed and position of each particle in the current particle swarm, determine the fitness value of each particle in the current particle swarm, and determine the global optimal particle in the current particle swarm based on the fitness value;

[0170] Based on the fitness value of each particle in the current particle swarm, the fitness value of each particle in the previous generation particle swarm, and the tanh activation function, determine the inertia weight factor corresponding to the current particle swarm;

[0171] Based on the inertia weight factor corresponding to the current particle swarm, the speed and position of each particle in the current particle swarm are updated to obtain the next generation particle swarm, the next generation particle swarm is determined as the new current particle swarm, and the current number of iterations is updated;

[0172] If the updated number of iterations is less than the maximum number of iterations, the process jumps to the step of determining the fitness value of each particle in the current particle swarm based on the speed and position of each particle in the current particle swarm, and continues to execute until the updated number of iterations reaches the maximum number of iterations, and the global optimal particle in the current particle swarm is determined as the optimal solution;

[0173] Based on the model parameters corresponding to the optimal solution, the model parameters of the fault diagnosis model are determined, and the fault diagnosis model is trained to obtain a trained fault training model.

[0174] In a possible implementation, the diagnosis module 72 is specifically configured to:

[0175] Based on the fitness value of each particle in the current particle swarm and the fitness value of each particle in the previous generation particle swarm, the evolutionary discreteness of the current particle swarm is determined;

[0176] The current number of iterations, the preset maximum number of iterations, and the evolutionary discreteness of the current particle swarm are brought into the tanh activation function to determine the inertia weight factor corresponding to the current particle swarm.

[0177] In a possible implementation, the diagnosis module 72 is specifically configured to:

[0178] Based on the fitness value of each particle in the current particle swarm, determine the fitness value variance corresponding to the current particle swarm;

[0179] Based on the fitness value of each particle in the previous generation of particle swarm, determine the variance of the fitness value corresponding to the previous generation of particle swarm;

[0180] The ratio between the variance of the fitness value corresponding to the current particle swarm and the variance of the fitness value corresponding to the previous generation of particle swarm is determined as the evolutionary discreteness of the current particle swarm.

[0181] In a possible implementation, the diagnosis module 72 is further configured to:

[0182] According to the current number of iterations, determine the learning factor corresponding to the current particle swarm;

[0183] The diagnosis module 72 is specifically used for:

[0184] Based on the inertia weight factor corresponding to the current particle swarm and the learning factor corresponding to the current particle swarm, the speed and position of each particle in the current particle swarm are updated.

[0185] In a possible implementation, the diagnosis module 72 is specifically configured to:

[0186] Get the initial setting value and the final setting value of the learning factor;

[0187] Determine the learning factor change value corresponding to the current number of iterations based on the difference between the initial setting value and the end setting value, and the ratio between the current number of iterations and the preset maximum number of iterations;

[0188] On the basis of the initial setting value, the learning factor change value corresponding to the current number of iterations is superimposed to obtain the learning factor corresponding to the current particle swarm.

[0189] In a possible implementation, the diagnosis module 72 is specifically configured to:

[0190] according to Determine the inertia weight factor corresponding to the current particle swarm;

[0191] Among them, w(t) represents the inertia weight factor corresponding to the current particle swarm at the tth iteration, w max represents the maximum inertia weight factor, w min represents the minimum inertia weight factor, represents the tanh activation function, b' represents the damping coefficient, t represents the current number of iterations, and T represents the preset maximum number of iterations.

[0192] In a possible implementation, the diagnosis module 72 is further configured to:

[0193] Perform dimension reduction processing on the fusion features to obtain the fusion features after dimension reduction;

[0194] The diagnosis module 72 is specifically used for:

[0195] The fusion features after dimension reduction are input into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model.

[0196] In a possible implementation, the diagnosis module 72 is specifically configured to:

[0197] The fault signal is subjected to time domain feature extraction, wavelet packet decomposition and empirical mode decomposition to obtain fault features in different dimensions.

[0198] Figure 8 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 8 As shown, the electronic device 8 of this embodiment includes: an input device (not shown in the figure), a processor 80, a memory 81, a computer program 82 stored in the memory 81 and executable on the processor 80, and a display device (not shown in the figure). The input device is used to receive a fault signal of the circuit to be tested input by a user. The display device is used to display the fault type of the circuit to be tested. When the processor 80 executes the computer program 82, the steps in the above-mentioned circuit fault diagnosis method embodiments are implemented, for example Figure 1 Alternatively, when the processor 80 executes the computer program 82, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 7 The functions of modules 71 to 72 are shown.

[0199] Exemplarily, the computer program 82 may be divided into one or more modules / units, which are stored in the memory 81 and executed by the processor 80 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 82 in the electronic device 8. For example, the computer program 82 may be divided into Figure 8 Modules 81 to 81 are shown.

[0200] The electronic device 8 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 8 may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will appreciate that Figure 8 It is only an example of the electronic device 8 and does not constitute a limitation of the electronic device 8. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0201] The processor 80 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0202] The memory 81 may be an internal storage unit of the electronic device 8, such as a hard disk or memory of the electronic device 8. The memory 81 may also be an external storage device of the electronic device 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the electronic device 8. The memory 81 is used to store the computer program and other programs and data required by the electronic device. The memory 81 may also be used to temporarily store data that has been output or is to be output.

[0203] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0204] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0205] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0206] In the embodiments provided by the present invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0207] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0208] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0209] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned circuit fault diagnosis method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A circuit fault diagnosis method, characterized in that: include: Acquire a fault signal of the circuit to be tested, and extract features of the fault signal from different dimensions to obtain fault features in different dimensions; The fault features under different dimensions are spliced ​​to obtain fused features, and the fused features are input into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model; Wherein, the fault diagnosis model is used to output the corresponding fault type according to the input fault characteristics; The model parameters in the fault diagnosis model are determined by an improved particle swarm optimization algorithm, and the inertia weight factor in the improved particle swarm optimization algorithm is determined according to the fitness value of the particle swarm and the hyperbolic tangent activation function.

2. The circuit fault diagnosis method according to claim 1, characterized in that: Before inputting the fusion feature into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model, the method further includes: Initializing particle swarm parameters; wherein the particle swarm parameters include the speed and position of each particle, the current number of iterations and the maximum number of iterations; the particles in the particle swarm are used to characterize the model parameters in the fault diagnosis model; Determine the fitness value of each particle in the current particle swarm based on the speed and position of each particle in the current particle swarm, and determine the global optimal particle in the current particle swarm based on the fitness value; Based on the fitness value of each particle in the current particle swarm, the fitness value of each particle in the previous generation particle swarm and the hyperbolic tangent activation function, the inertia weight factor corresponding to the current particle swarm is determined; Based on the inertia weight factor corresponding to the current particle swarm, the speed and position of each particle in the current particle swarm are updated to obtain the next generation particle swarm, the next generation particle swarm is determined as the new current particle swarm, and the current number of iterations is updated; If the updated number of iterations is less than the maximum number of iterations, jump to the step of determining the fitness value of each particle in the current particle swarm based on the speed and position of each particle in the current particle swarm and continue to execute until the updated number of iterations reaches the maximum number of iterations, and determine the global optimal particle in the current particle swarm as the optimal solution; Based on the model parameters corresponding to the optimal solution, the model parameters of the fault diagnosis model are determined, and model training is performed on the fault diagnosis model to obtain a trained fault training model.

3. The circuit fault diagnosis method according to claim 2, characterized in that: The inertia weight factor corresponding to the current particle swarm is determined based on the fitness value of each particle in the current particle swarm, the fitness value of each particle in the previous generation particle swarm, and the hyperbolic tangent activation function, including: Based on the fitness value of each particle in the current particle swarm and the fitness value of each particle in the previous generation particle swarm, the evolutionary discreteness of the current particle swarm is determined; The current number of iterations, the preset maximum number of iterations, and the evolutionary discreteness of the current particle swarm are brought into the hyperbolic tangent activation function to determine the inertia weight factor corresponding to the current particle swarm.

4. The circuit fault diagnosis method according to claim 3, characterized in that: Based on the fitness value of each particle in the current particle swarm and the fitness value of each particle in the previous generation particle swarm, the evolutionary discreteness of the current particle swarm is determined, including: Based on the fitness value of each particle in the current particle swarm, determine the fitness value variance corresponding to the current particle swarm; Based on the fitness value of each particle in the previous generation of particle swarm, determine the variance of the fitness value corresponding to the previous generation of particle swarm; The ratio between the variance of the fitness value corresponding to the current particle swarm and the variance of the fitness value corresponding to the previous generation of particle swarm is determined as the evolutionary discreteness of the current particle swarm.

5. The circuit fault diagnosis method according to any one of claims 2 to 4, characterized in that: Before updating the speed and position of each particle in the current particle swarm based on the inertia weight factor corresponding to the current particle swarm, the method further includes: According to the current number of iterations, determine the learning factor corresponding to the current particle swarm; The updating of the speed and position of each particle in the current particle swarm based on the inertia weight factor corresponding to the current particle swarm includes: Based on the inertia weight factor corresponding to the current particle swarm and the learning factor corresponding to the current particle swarm, the speed and position of each particle in the current particle swarm are updated.

6. The circuit fault diagnosis method according to claim 5, characterized in that: Determining the learning factor corresponding to the current particle swarm according to the current number of iterations includes: Get the initial setting value and the final setting value of the learning factor; Determine a learning factor change value corresponding to a current number of iterations based on a difference between the initial setting value and the end setting value and a ratio between a current number of iterations and a preset maximum number of iterations; On the basis of the initial setting value, the learning factor change value corresponding to the current iteration number is superimposed to obtain the learning factor corresponding to the current particle swarm.

7. The circuit fault diagnosis method according to claim 3 or 4, characterized in that: The method of bringing the current number of iterations, the preset maximum number of iterations, and the evolutionary discreteness of the current particle swarm into the hyperbolic tangent activation function to determine the inertia weight factor corresponding to the current particle swarm includes: according to Determine the inertia weight factor corresponding to the current particle swarm; Among them, w(t) represents the inertia weight factor corresponding to the current particle swarm at the tth iteration, w max represents the maximum inertia weight factor, w min represents the minimum inertia weight factor, represents the hyperbolic tangent activation function, b' represents the damping coefficient, t represents the current number of iterations, and T represents the preset maximum number of iterations.

8. The circuit fault diagnosis method according to any one of claims 1 to 4, characterized in that: Before inputting the fusion feature into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model, the method further includes: Performing dimension reduction processing on the fusion feature to obtain a fusion feature after dimension reduction; Inputting the fusion feature into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model includes: The fusion features after dimension reduction are input into a pre-trained fault diagnosis model to obtain the fault type of the circuit to be tested output by the fault diagnosis model.

9. The circuit fault diagnosis method according to any one of claims 1 to 4, characterized in that: Feature extraction is performed on the fault signal from different dimensions to obtain fault features in different dimensions, including: The fault signal is subjected to time domain feature extraction, wavelet packet decomposition and empirical mode decomposition respectively to obtain fault features in different dimensions.

10. An electronic device, characterized in that: comprising an input device, a memory, a processor, a computer program stored in the memory and executable on the processor, and a display device; The input device is used to receive a fault signal of the circuit to be tested input by a user; When the processor executes the computer program, the steps of the circuit fault diagnosis method according to any one of claims 1 to 9 are implemented to obtain the fault type of the circuit to be tested; The display device is used to display the fault type of the circuit to be tested.

Citation Information

Cited By

  • Substation fault detection method and system

    CN121561687A