Analog circuit fault diagnosis method, electronic device and storage medium based on BV-CNN
Through the BV-CNN-based analog circuit fault diagnosis method, PSpice simulation and VMD algorithm decomposition, combined with CNN network for fault type classification, the problem of insufficient fault diagnosis accuracy in the existing technology is solved, and more efficient and accurate fault identification and classification is achieved.
Patent Information
- Application Number
- CN202411256447.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing analog circuit fault diagnosis methods have problems such as insufficient accuracy, dependence on feature selection, and difficulty in parameter selection, making it difficult to effectively identify and classify faults in analog circuits.
Using BV-CNN-based analog circuit fault diagnosis method, signal data is collected through PSpice software simulation experiment, preprocessing and VMD algorithm decomposition, CNN network is built for training and testing, and fault type classification is realized.
It improves the accuracy and robustness of fault diagnosis, reduces the workload of parameter selection, improves the efficiency and generalization ability of model training, and can more accurately identify and classify faults in analog circuits.
Smart Images

Figure CN118981693B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of analog circuit fault diagnosis, and in particular relates to an analog circuit fault diagnosis method, electronic equipment and storage medium based on BV-CNN. Background Art
[0002] At present, electronic systems are increasingly used in various fields, from consumer electronics, automotive electronics to industrial control and communication equipment, and electronic systems have become an important part of modern society. Electronic systems are usually composed of digital circuits and analog circuits, and these two parts work together to achieve the full functionality of the system. However, statistics show that up to 80% of electronic system failures are caused by analog circuits. This is because analog circuits play a key role in signal processing, power management, and interface circuits, and are susceptible to factors such as noise, temperature changes, and aging. Therefore, fault diagnosis of analog circuits is particularly important, which can effectively improve the reliability and stability of electronic systems.
[0003] Analog circuit fault diagnosis methods include statistical feature analysis, time-frequency analysis, and machine learning methods. These methods have their own characteristics, but there are some problems. Statistical feature analysis has weak processing capabilities for nonlinear and non-stationary signals, and feature selection relies on experience, resulting in inaccurate diagnostic results; time-frequency analysis methods such as wavelet transform rely on parameter selection, and improper parameter selection will lead to poor time-frequency resolution and affect diagnostic results; machine learning methods such as support vector machines, although they have powerful feature extraction capabilities, are complex to train, difficult to select parameters, and have limited generalization capabilities. Summary of the invention
[0004] The problem to be solved by the present invention is to efficiently perform analog circuit fault diagnosis based on BV-CNN, and propose an analog circuit fault diagnosis method, electronic device and storage medium based on BV-CNN.
[0005] To achieve the above object, the present invention is implemented through the following technical solutions:
[0006] A method for diagnosing analog circuit faults based on BV-CNN includes the following steps:
[0007] S1. Use PSpice software to set up the simulation environment, conduct simulation experiments on the Sallen-Key bandpass filter circuit, collect signal data under no fault and 10 types of device faults, and obtain signal data of 11 states;
[0008] S2. Preprocess the signal data of 11 states collected in step S1 to construct a single fault data set under 11 states;
[0009] S3. Perform Bayesian optimization parameter search: define the optimization objective function, set the mode number K and the penalty parameter α as the Bayesian optimization parameter search space, use the Bayesian optimization method to search for the optimal combination of the mode number K and the penalty parameter α of the VMD algorithm, and obtain the optimized parameters of the VMD algorithm;
[0010] S4. Based on the optimized VMD algorithm parameters obtained in step S3, the signal data in the single fault data set obtained in step S2 is decomposed by the VMD algorithm to obtain a single fault data set processed by the VMD algorithm, which is divided into a training set and a test set;
[0011] S5. Build CNN network;
[0012] S6. Use the training set obtained in step S4 to train the CNN network constructed in step S5, and then use the test set obtained in step S4 to test the trained CNN network to obtain a trained CNN network;
[0013] S7. Apply the trained CNN model to the actual analog circuit fault diagnosis task, use the VMD algorithm to decompose the actual analog circuit fault signal, and then input it into the CNN model trained in step S6 for classification to obtain the analog circuit fault type.
[0014] Furthermore, the specific implementation method of step S1 includes the following steps:
[0015] S1.1. Use PSpice software to perform detailed simulation experiments on the Sallen-Key bandpass filter circuit, setting the simulation environment, including the temperature range of -40℃ to 85℃ and the power supply voltage varying from 3.3V to 5V;
[0016] S1.2. Set no fault and 10 device fault types including taking the component deviation of 20% of the nominal value as a fault, including no fault NF, C1 exceeds the nominal value, C1 is lower than the nominal value, C2 exceeds the nominal value, C2 is lower than the nominal value, R2 exceeds the nominal value, R2 is lower than the nominal value, R3 exceeds the nominal value, R3 is lower than the nominal value, R4 exceeds the nominal value, and R4 is lower than the nominal value;
[0017] S1.3. Collect signal data for each fault type. Collect 100 samples in each state. Each sample contains 2048 sampling points. The sampling frequency is 1 MHz.
[0018] Furthermore, step S2 pre-processes the collected signal data, including band-pass filtering to remove high-frequency noise and normalization to eliminate dimensional effects.
[0019] Furthermore, the specific implementation method of step S3 includes the following steps:
[0020] S3.1. Define the optimization objective function and select the signal reconstruction error f(K,α) as the objective function. The expression is:
[0021]
[0022] Among them, x is the non-fault type data in the single fault data set, u i is the i-th modal component S3.2 obtained by VMD decomposition. Set the parameter space and select the number of modes K and the penalty parameter α as the parameter search space for Bayesian optimization:
[0023] Set the number of modes in the range of [1,10] and the penalty parameter in the range of [10 -3 ,10 3 ]Select within the range;
[0024] S3.3. Through the Latin hypercube sampling method, the number of modules and the penalty parameter are sampled simultaneously to obtain N initial sample points And calculate each sample point in the objective function f(K i ,α i ) value;
[0025] S3.4. Construct a Gaussian process model as a proxy model for Bayesian optimization. First, define the kernel function as k((K,α),(K′,α′)), expressed as:
[0026]
[0027] Among them, σ 2 is the variance parameter of the kernel function, which controls the scale of the output value, l K is the length scale parameter in the K direction, l α is the length scale parameter in the α direction, (K,α), (K′,α′) are any two initial sample points;
[0028] Then define the mean function m((K,α)), and then combine the kernel function and the mean function to construct the Gaussian process model g(K,α), which is expressed as:
[0029]
[0030] in, represents a Gaussian process;
[0031] S3.5. Fit the Gaussian process model obtained in step S3.4, use the initial sample points and the corresponding objective function values obtained in step S1 as training data, and estimate the hyperparameter σ by the maximum likelihood estimation method. 2 , l K and l α , fitting the Gaussian process model;
[0032] S3.6. Define the optimization acquisition function and select the expected improvement EI(K,α) as the acquisition function. The expression is:
[0033]
[0034] Where φ is the probability density function of the standard normal distribution, Φ is the cumulative distribution function, and f best is the current optimal objective function value, μ(K,α) is the mean of the objective function at the parameter point (K,α) predicted by the Gaussian process model, and σ(K,α) is the standard deviation of the objective function value at the parameter point (K,α) predicted by the Gaussian process model, indicating the uncertainty of the prediction;
[0035] EI(K,α) means that the objective function exceeds the current optimal value f at the parameter point (K,α) best The expected improvement; search the entire parameter space to find the point that maximizes the expected improvement (K new ,α new ), the expression is:
[0036] (K new ,α new ) = argmax (K,α) EI(K,α)
[0037] Then calculate the point (K new ,α new ) on the objective function value f(K new ,α new );
[0038] S3.7. Update the Gaussian process model and change (K new ,α new ) The sampling points and their objective function values are added to the training data, and the Gaussian process model is refitted to update the predicted mean and standard deviation;
[0039] S3.8. Repeat steps S3.6 and S3.7, and stop iterating when the maximum number of iterations is reached or the expected improvement is lower than a certain threshold. Finally, the optimal parameter combination of the number of modes K and the penalty parameter α is obtained, and the parameters of the optimized VMD algorithm are obtained.
[0040] Furthermore, in step S4, each fault signal x(t) in the single fault data set is decomposed into K modal components u by VMD algorithm. k (t), where each modal component corresponds to a different frequency component. After the decomposition process is completed, the single fault data set processed by the VMD algorithm is obtained and divided into a training set and a test set according to the ratio of 70% training set and 30% test set.
[0041] Furthermore, the CNN network of step S5 includes 1 input layer, the input layer is connected to 2 convolutional layers, the input layer has 64 filters, the convolutional layer has 128 filters, the kernel size is 3, the activation function is ReLU, each convolutional layer is connected to 1 pooling layer, the pool size is 2, after the last pooling layer, the flattening layer is connected to flatten the output of the pooling layer into a one-dimensional vector, and then connected to 1 fully connected layer with 128 neurons. In order to prevent overfitting, the model includes a Dropout layer with a dropout rate of 0.5. The Dropout layer is connected after the fully connected layer. After the Dropout layer, the Softmax activation function is used for classification fault diagnosis.
[0042] Furthermore, the specific implementation method of step S6 includes the following steps:
[0043] S6.1. Use the training set obtained in step S4 to train the CNN model. Use the Adam optimization algorithm to train the CNN model. Set the initial learning rate to 0.001 and adjust the learning rate every 10 epochs. During the training process, monitor the loss function and accuracy to obtain a trained CNN network.
[0044] S6.2. Use the test set obtained in step S4 to evaluate the performance of the trained CNN network, record the accuracy, and use the confusion matrix to visualize the diagnostic performance of the model.
[0045] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of a BV-CNN-based analog circuit fault diagnosis method when executing the computer program.
[0046] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements a BV-CNN-based analog circuit fault diagnosis method.
[0047] Beneficial effects of the present invention:
[0048] The analog circuit fault diagnosis method based on BV-CNN described in the present invention improves the accuracy of fault diagnosis.
[0049] The analog circuit fault diagnosis method based on BV-CNN described in the present invention uses Bayesian optimization to automatically select VMD parameters, thereby improving the accuracy of signal decomposition, thereby providing higher quality input data for subsequent fault feature extraction. Combined with the powerful feature extraction and classification capabilities of CNN, the fault diagnosis method of the present invention can more accurately identify and classify faults in analog circuits.
[0050] The analog circuit fault diagnosis method based on BV-CNN described in the present invention has better adaptability to influencing factors such as noise, temperature change and aging through the combination of Bayesian optimization and CNN, and improves the robustness under complex signals and multiple working conditions.
[0051] The analog circuit fault diagnosis method based on BV-CNN described in the present invention achieves high efficiency of parameter optimization and model training. The use of Bayesian optimization reduces the workload of parameter selection, and the automated parameter optimization process improves the efficiency of model training. The fast-converging optimization algorithm reduces the training time, making model training more efficient.
[0052] The analog circuit fault diagnosis method based on BV-CNN described in the present invention achieves improved generalization ability. Through the combination of Bayesian optimization and CNN, the method of the present invention shows good generalization ability on different circuits and fault types, and is not limited to specific circuits or fault types. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is a flow chart of an analog circuit fault diagnosis method based on BV-CNN according to the present invention;
[0054] Figure 2 The schematic diagram of the Sallen-Key bandpass filter circuit of the present invention;
[0055] Figure 3 It is the confusion matrix diagram of the present invention;
[0056] Figure 4 It is an accuracy curve of the analog circuit fault diagnosis method based on BV-CNN described in the present invention;
[0057] Figure 5 This is a loss value curve of the analog circuit fault diagnosis method based on BV-CNN described in the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention, that is, the specific embodiments described are only part of the embodiments of the present invention, rather than all of the specific embodiments. The components of the specific embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations, and the present invention can also have other embodiments.
[0059] Therefore, the following detailed description of the specific embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected specific embodiments of the present invention. Based on the specific embodiments of the present invention, all other specific embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0060] In order to further understand the content, features and effects of the present invention, the following specific implementation methods are given as examples, and the attached Figure 1 -Attached Figure 5 The detailed instructions are as follows:
[0061] Embodiment 1:
[0062] A method for diagnosing analog circuit faults based on BV-CNN includes the following steps:
[0063] S1. Use PSpice software to set up the simulation environment, conduct simulation experiments on the Sallen-Key bandpass filter circuit, collect signal data under no fault and 10 types of device faults, and obtain signal data of 11 states;
[0064] Furthermore, the specific implementation method of step S1 includes the following steps:
[0065] S1.1. Use PSpice software to perform detailed simulation experiments on the Sallen-Key bandpass filter circuit, setting the simulation environment, including the temperature range of -40℃ to 85℃ and the power supply voltage varying from 3.3V to 5V;
[0066] S1.2. Set no fault and 10 device fault types including taking the component deviation of 20% of the nominal value as a fault, including no fault NF, C1 exceeds the nominal value, C1 is lower than the nominal value, C2 exceeds the nominal value, C2 is lower than the nominal value, R2 exceeds the nominal value, R2 is lower than the nominal value, R3 exceeds the nominal value, R3 is lower than the nominal value, R4 exceeds the nominal value, and R4 is lower than the nominal value;
[0067] S1.3. Collect signal data under each fault type, collect 100 samples under each state, each sample contains 2048 sampling points, and the sampling frequency is 1MHz;
[0068] S2. Preprocess the signal data of 11 states collected in step S1 to construct a single fault data set under 11 states;
[0069] Furthermore, step S2 pre-processes the collected signal data, including band-pass filtering to remove high-frequency noise and normalization to eliminate dimensional effects;
[0070] S3. Perform Bayesian optimization parameter search: define the optimization objective function, set the mode number K and the penalty parameter α as the Bayesian optimization parameter search space, use the Bayesian optimization method to search for the optimal combination of the mode number K and the penalty parameter α of the VMD algorithm, and obtain the optimized parameters of the VMD algorithm;
[0071] Furthermore, the specific implementation method of step S3 includes the following steps:
[0072] S3.1. Define the optimization objective function and select the signal reconstruction error f(K,α) as the objective function. The expression is:
[0073]
[0074] Among them, x is the non-fault type data in the single fault data set, u i is the i-th modal component S3.2 obtained by VMD decomposition. Set the parameter space and select the number of modes K and the penalty parameter α as the parameter search space for Bayesian optimization:
[0075] Set the number of modes in the range of [1,10] and the penalty parameter in the range of [10 -3 ,10 3 ]Select within the range;
[0076] Furthermore, when the number of modes K varies in the range of [1,10], the reconstruction error of the signal is inversely proportional to the number of modes, and when K is greater than 10, the magnitude of the error reduction is significantly reduced. In addition, the penalty parameter α has a significant impact on the stability of signal decomposition in the range of [10^-3,10^3]. Smaller α values may lead to mode aliasing, while larger α values may lead to over-decomposition of the signal. Therefore, we selected these parameter ranges to balance the decomposition effect and computational efficiency.
[0077] S3.3. Through the Latin hypercube sampling method, the number of modules and the penalty parameter are sampled simultaneously to obtain N initial sample points And calculate each sample point in the objective function f(K i ,α i ) value;
[0078] S3.4. Construct a Gaussian process model as a proxy model for Bayesian optimization. First, define the kernel function as k((K,α),(K′,α′)), expressed as:
[0079]
[0080] Among them, σ 2 is the variance parameter of the kernel function, which controls the scale of the output value, l K is the length scale parameter in the K direction, l αis the length scale parameter in the α direction, (K,α), (K′,α′) are any two initial sample points;
[0081] Then define the mean function m((K,α)), and then combine the kernel function and the mean function to construct the Gaussian process model g(K,α), which is expressed as:
[0082]
[0083] in, represents a Gaussian process;
[0084] Furthermore, since the Gaussian process is mainly used to model the fluctuation of data and is less affected by the mean function, the mean function is assumed to be 0;
[0085] S3.5. Fit the Gaussian process model obtained in step S3.4, use the initial sample points and the corresponding objective function values obtained in step S1 as training data, and estimate the hyperparameter σ by the maximum likelihood estimation method. 2 , l K and l α , fitting the Gaussian process model;
[0086] S3.6. Define the optimization acquisition function and select the expected improvement EI(K,α) as the acquisition function. The expression is:
[0087]
[0088] Where φ is the probability density function of the standard normal distribution, Φ is the cumulative distribution function, and f best is the current optimal objective function value, μ(K,α) is the mean of the objective function at the parameter point (K,α) predicted by the Gaussian process model, and σ(K,α) is the standard deviation of the objective function value at the parameter point (K,α) predicted by the Gaussian process model, indicating the uncertainty of the prediction;
[0089] EI(K,α) means that the objective function exceeds the current optimal value f at the parameter point (K,α) best The expected improvement, f best is the maximum value of the objective function among all evaluated sample points; search the entire parameter space to find the point that maximizes the expected improvement (K new ,α new ), the expression is:
[0090] (K new ,α new ) = argmax (K,α) EI(K,α)
[0091] Then calculate the point (K new ,αnew ) on the objective function value f(K new ,α new );
[0092] S3.7. Update the Gaussian process model and change (K new ,α new ) The sampling points and their objective function values are added to the training data, and the Gaussian process model is refitted to update the predicted mean and standard deviation;
[0093] S3.8. Repeat steps S3.6 and S3.7, and stop iterating when the maximum number of iterations is reached or the expected improvement is lower than a certain threshold. Finally, the optimal parameter combination of the number of modes K and the penalty parameter α is obtained, and the parameters of the optimized VMD algorithm are obtained.
[0094] S4. Based on the optimized VMD algorithm parameters obtained in step S3, the signal data in the single fault data set obtained in step S2 is decomposed by the VMD algorithm to obtain a single fault data set processed by the VMD algorithm, which is divided into a training set and a test set;
[0095] Furthermore, in step S4, each fault signal x(t) in the single fault data set is decomposed into K modal components u by VMD algorithm. k (t), where each modal component corresponds to a different frequency component. After the decomposition process is completed, the single fault data set processed by the VMD algorithm is obtained and divided into a training set and a test set according to the ratio of 70% training set and 30% test set.
[0096] S5. Build CNN network;
[0097] Furthermore, the CNN network of step S5 includes 1 input layer, the input layer is connected to 2 convolutional layers, the input layer has 64 filters, the convolutional layer has 128 filters, the kernel size is 3, the activation function is ReLU, each convolutional layer is connected to 1 pooling layer, the pool size is 2, the last pooling layer is connected to the flattening layer, the output of the pooling layer is flattened into a one-dimensional vector, and then connected to 1 fully connected layer with 128 neurons. In order to prevent overfitting, the model includes a Dropout layer with a dropout rate of 0.5, and the Dropout layer is connected after the fully connected layer. After the Dropout layer, the Softmax activation function is used for classification fault diagnosis.
[0098] S6. Use the training set obtained in step S4 to train the CNN network constructed in step S5, and then use the test set obtained in step S4 to test the trained CNN network to obtain a trained CNN network;
[0099] Furthermore, the specific implementation method of step S6 includes the following steps:
[0100] S6.1. Use the training set obtained in step S4 to train the CNN model. Use the Adam optimization algorithm to train the CNN model. Set the initial learning rate to 0.001 and adjust the learning rate every 10 epochs. During the training process, monitor the loss function and accuracy to obtain a trained CNN network.
[0101] S6.2. Use the test set obtained in step S4 to evaluate the performance of the trained CNN network, record the accuracy, and use the confusion matrix to visualize the diagnostic performance of the model; analyze the diagnostic performance of the model under different fault conditions, and discuss the generalization ability and limitations of the model. Provide the loss function curve, accuracy curve, and confusion matrix on the test set during the training process to intuitively display the results of model training and evaluation;
[0102] S7. Apply the trained CNN model to the actual analog circuit fault diagnosis task, use the VMD algorithm to decompose the actual analog circuit fault signal, and then input it into the CNN model trained in step S6 for classification to obtain the analog circuit fault type. According to the results of the fault diagnosis, analyze the diagnostic effect of the model. If the diagnostic accuracy does not meet the requirements, further adjust the CNN network structure or parameters, or collect more data for retraining to improve the diagnostic performance of the model.
[0103] Figure 1 This is a flow chart of an analog circuit fault diagnosis method based on BV-CNN. First, the Sallen-Key bandpass filter circuit is simulated using PSpice software to collect signal data under 10 fault types and 1 normal state. These data are then preprocessed to construct a single fault data set. Next, the Bayesian optimization algorithm is used to search for the optimal number of modes and penalty parameters in VMD (variational mode decomposition), decompose the signal data, extract fault features, and divide the data set into a training set and a test set. On this basis, a CNN network is constructed, the training set is used for model training, and the test set is used for verification. Finally, the trained CNN model is applied to the actual analog circuit fault diagnosis. First, the fault signal is decomposed by the VMD algorithm, and then the decomposed signal is input into the CNN model for classification, and finally the fault type of the circuit is obtained.
[0104] Figure 2 This is the schematic diagram of the Sallen-Key bandpass filter circuit, which is an active filter circuit;
[0105] Figure 3 This is a confusion matrix diagram of the training results of the model of the present invention, in which one picture of each of the three types of faults is not diagnosed, and the diagnosis accuracy of the remaining faults is 100%;
[0106] Figure 4 This is the accuracy curve of the analog circuit fault diagnosis method based on BV-CNN described in the present invention. The accuracy of the model reaches 98% at 150 rounds;
[0107] Figure 5 This is a loss value curve of the analog circuit fault diagnosis method based on BV-CNN described in the present invention. The loss value of the model is close to 0 at 150 rounds.
[0108] Embodiment 2:
[0109] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of an analog circuit fault diagnosis method based on BV-CNN described in Example 1 are implemented.
[0110] The computer device of the present invention may be a device including a processor and a memory, such as a single chip microcomputer including a central processing unit, etc. Furthermore, the processor is used to implement the steps of the above-mentioned BV-CNN-based analog circuit fault diagnosis method when executing the computer program stored in the memory.
[0111] The processor may be a central processing unit (CPU), 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.
[0112] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0113] Embodiment 3:
[0114] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the analog circuit fault diagnosis method based on BV-CNN described in Example 1 is implemented.
[0115] The computer-readable storage medium of the present invention can be any form of storage medium that can be read by a processor of a computer device, including but not limited to non-volatile memory, volatile memory, ferroelectric memory, etc. A computer program is stored on the computer-readable storage medium. When the processor of the computer device reads and executes the computer program stored in the memory, the steps of the above-mentioned BV-CNN-based analog circuit fault diagnosis method can be implemented.
[0116] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer readable media do not include electric carrier signals and telecommunication signals.
[0117] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0118] Although the present application has been described above with reference to specific embodiments, various modifications may be made thereto and parts thereof may be replaced with equivalents without departing from the scope of the present application. In particular, as long as there is no structural conflict, the various features in the specific embodiments disclosed in the present application may be used in combination with each other in any manner, and the fact that these combinations are not exhaustively described in this specification is only for the sake of omitting space and saving resources. Therefore, the present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A method for fault diagnosis of analog circuits based on BV-CNN, characterized in that: The steps include: S1. Use PSpice software to set up the simulation environment, conduct simulation experiments on the Sallen-Key bandpass filter circuit, collect signal data under no fault and 10 types of device faults, and obtain signal data of 11 states; S2. Preprocess the signal data of 11 states collected in step S1 to construct a single fault data set under 11 states; S3. Perform Bayesian optimization parameter search: define the optimization objective function, set the mode number K and the penalty parameter α as the Bayesian optimization parameter search space, use the Bayesian optimization method to search for the optimal combination of the mode number K and the penalty parameter α of the VMD algorithm, and obtain the optimized parameters of the VMD algorithm; The specific implementation method of step S3 includes the following steps: S3.
1. Define the optimization objective function and select the signal reconstruction error f(K,α) as the objective function. The expression is: Among them, x is the non-fault type data in the single fault data set, u i is the i-th modal component obtained by VMD decomposition S3.
2. Set the parameter space and select the number of modes K and the penalty parameter α as the parameter search space for Bayesian optimization: Set the number of modes in the range of [1,10] and the penalty parameter in the range of [10 -3 ,10 3 ]Select within the range; S3.
3. Through the Latin hypercube sampling method, the number of modules and the penalty parameter are sampled simultaneously to obtain N initial sample points And calculate each sample point in the objective function f(K i ,α i ) value; S3.
4. Construct a Gaussian process model as a proxy model for Bayesian optimization. First, define the kernel function as k((K,α),(K′,α′)), expressed as: Among them, σ 2 is the variance parameter of the kernel function, which controls the scale of the output value, l K is the length scale parameter in the K direction, l α is the length scale parameter in the α direction, (K,α), (K′,α′) are any two initial sample points; Then define the mean function m((K,α)), and then combine the kernel function and the mean function to construct the Gaussian process model g(K,α), which is expressed as: in, represents a Gaussian process; S3.
5. Fit the Gaussian process model obtained in step S3.4, use the initial sample points and the corresponding objective function values obtained in step S1 as training data, and estimate the hyperparameter σ by the maximum likelihood estimation method. 2 , l K and l α , fitting the Gaussian process model; S3.
6. Define the optimization acquisition function and select the expected improvement EI(K,α) as the acquisition function. The expression is: Where φ is the probability density function of the standard normal distribution, Φ is the cumulative distribution function, and f best is the current optimal objective function value, μ(K,α) is the mean of the objective function at the parameter point (K,α) predicted by the Gaussian process model, and σ(K,α) is the standard deviation of the objective function value at the parameter point (K,α) predicted by the Gaussian process model, indicating the uncertainty of the prediction; EI(K,α) means that the objective function exceeds the current optimal value f at the parameter point (K,α) best The expected improvement; search the entire parameter space to find the point that maximizes the expected improvement (K new ,α new ), the expression is: (K new ,α new )=argmax (K,α) EI(K,α) Then calculate the point (K new ,α new ) on the objective function value f(K new ,α new ); S3.
7. Update the Gaussian process model and change (K new ,α new ) The sampling points and their objective function values are added to the training data, and the Gaussian process model is refitted to update the predicted mean and standard deviation; S3.
8. Repeat steps S3.6 and S3.7, and stop the iteration when the maximum number of iterations is reached or the expected improvement is lower than a certain threshold, and finally obtain the optimal parameter combination of the number of modes K and the penalty parameter α, and obtain the parameters of the optimized VMD algorithm; S4. Based on the optimized VMD algorithm parameters obtained in step S3, the signal data in the single fault data set obtained in step S2 is decomposed by the VMD algorithm to obtain a single fault data set processed by the VMD algorithm, which is divided into a training set and a test set; S5. Build CNN network; S6. Use the training set obtained in step S4 to train the CNN network constructed in step S5, and then use the test set obtained in step S4 to test the trained CNN network to obtain a trained CNN network; S7. Apply the trained CNN model to the actual analog circuit fault diagnosis task, use the VMD algorithm to decompose the actual analog circuit fault signal, and then input it into the CNN model trained in step S6 for classification to obtain the analog circuit fault type.
2. The analog circuit fault diagnosis method based on BV-CNN according to claim 1, characterized in that: The specific implementation method of step S1 includes the following steps: S1.
1. Use PSpice software to perform detailed simulation experiments on the Sallen-Key bandpass filter circuit, setting the simulation environment, including the temperature range of -40℃ to 85℃ and the power supply voltage varying from 3.3V to 5V; S1.
2. Set no fault and 10 device fault types including taking the component deviation of 20% of the nominal value as a fault, including no fault NF, C1 exceeds the nominal value, C1 is lower than the nominal value, C2 exceeds the nominal value, C2 is lower than the nominal value, R2 exceeds the nominal value, R2 is lower than the nominal value, R3 exceeds the nominal value, R3 is lower than the nominal value, R4 exceeds the nominal value, and R4 is lower than the nominal value; S1.
3. Collect signal data under each fault type. Collect 100 samples under each state. Each sample contains 2048 sampling points. The sampling frequency is 1 MHz.
3. The analog circuit fault diagnosis method based on BV-CNN according to claim 2 is characterized in that: Step S2 preprocesses the collected signal data, including bandpass filtering to remove high-frequency noise and normalization to eliminate dimensional effects.
4. The analog circuit fault diagnosis method based on BV-CNN according to claim 3 is characterized in that: Step S4 uses the VMD algorithm to decompose each fault signal x(t) in the single fault data set into K modal components u k (t), where each modal component corresponds to a different frequency component. After the decomposition process is completed, the single fault data set processed by the VMD algorithm is obtained and divided into a training set and a test set according to the ratio of 70% training set and 30% test set.
5. The analog circuit fault diagnosis method based on BV-CNN according to claim 4 is characterized in that: The CNN network of step S5 includes 1 input layer, which is connected to 2 convolutional layers. The input layer has 64 filters, the convolutional layer has 128 filters, the kernel size is 3, and the activation function is ReLU. Each convolutional layer is connected to a pooling layer with a pool size of 2. The last pooling layer is connected to a flattening layer, the output of the pooling layer is flattened into a one-dimensional vector, and then connected to a fully connected layer with 128 neurons. In order to prevent overfitting, the model includes a Dropout layer with a dropout rate of 0.
5. The Dropout layer is connected after the fully connected layer. After the Dropout layer, the Softmax activation function is used for classification fault diagnosis.
6. The analog circuit fault diagnosis method based on BV-CNN according to claim 5 is characterized in that: The specific implementation method of step S6 includes the following steps: S6.
1. Use the training set obtained in step S4 to train the CNN model. Use the Adam optimization algorithm to train the CNN model. Set the initial learning rate to 0.001 and adjust the learning rate every 10 epochs. During the training process, monitor the loss function and accuracy to obtain a trained CNN network. S6.
2. Use the test set obtained in step S4 to evaluate the performance of the trained CNN network, record the accuracy, and use the confusion matrix to visualize the diagnostic performance of the model.
7. An electronic device, characterized in that: It comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of a BV-CNN-based analog circuit fault diagnosis method as described in any one of claims 1 to 6 when executing the computer program.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the analog circuit fault diagnosis method based on BV-CNN described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Equipment fault diagnosis method based on Bayesian hyper-parameter selection and digital twinning
CN118535915A