Fault diagnosis method and device for charging module of direct-current power supply system and storage medium
By improving the sparrow search algorithm to optimize the hyperparameters of the CNN-LSTM network, combined with the variational modal decomposition and extracting features, the problem of difficulty in superparameter optimization in the charging module fault diagnosis of DC power system is solved, and the accuracy and efficiency of fault diagnosis are improved.
Patent Information
- Application Number
- CN202411409126.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-14
AI Technical Summary
In the fault diagnosis of charging module of DC power system, CNN is difficult to optimize hyperparameters, resulting in poor classification results, and optimization algorithms are prone to fall into local optimal solutions, with long calculation time and insufficient accuracy.
Using Circle chaotic mapping and Levi flight strategy to improve the sparrow search algorithm, optimize the hyperparameters of the CNN-LSTM network, including learning rate, dropout rate and batch number, extract features through variational modal decomposition and build CNN-LSTM network for fault diagnosis .
It improves the global search capability of the sparrow search algorithm, avoids local optimal solutions, and improves the accuracy and efficiency of fault diagnosis.
Smart Images

Figure CN119312188A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of fault diagnosis of a charging module of a direct current power supply system, and relates to a method, a device and a storage medium for fault diagnosis of a charging module of a direct current power supply system. Background Art
[0002] DC power supply systems play an important role in key application scenarios such as power systems, energy storage systems, communication networks, industrial control, rail transit, and data centers. Timely fault diagnosis is an important means to ensure the high reliability and strong safety of DC power supply systems. Among the many components of the DC power supply system, the charging module is the most critical and has the highest probability of failure. At present, the type of fault with the highest failure rate in the charging module is the open circuit fault of the power switch tube.
[0003] The fault diagnosis methods for open circuit faults of power switch tubes can generally be divided into analytical model-based and data-driven methods. The analytical model-based method requires accurate system modeling and real-time data acquisition. If the circuit is slightly changed, it needs to be remodeled. The principle of the data-driven method is to obtain a large amount of online and offline data through data mining, analyze and train it, and obtain diagnostic results. This method does not rely on accurate physical models.
[0004] The local feature extraction capability of convolutional neural network (CNN) is very powerful, but its accuracy is not enough in processing time series data, and the classification effect of long short-term memory network (LSTM) depends on the prominence of input features. Therefore, before inputting the data into the deep learning model, variational mode decomposition (VMD) is used to decompose the original signal into several simpler sub-signals to extract more representative features, thereby improving the performance of the model.
[0005] Due to the complex structure of CNN and its large number of hyperparameters, the optimization of hyperparameters becomes a key issue. It is difficult to find the best combination of hyperparameters for specific problems. Relying on past experience or repeated trials is not only time-consuming and labor-intensive, but may not lead to the optimal solution. Therefore, how to effectively optimize the hyperparameters of CNN to ensure the best classification effect is a problem that needs to be solved urgently. Although optimization algorithms can help solve parameter optimization problems, many optimization algorithms are prone to fall into local optimal solutions during the solution process, and have shortcomings such as long calculation time and low precision. Therefore, it is very necessary to improve the optimization algorithm. Summary of the invention
[0006] The technical solution of the present invention is used to solve the problem of how to improve the fault diagnosis accuracy of a charging module of a DC power supply system.
[0007] The present invention solves the above technical problems through the following technical solutions:
[0008] A method for diagnosing faults of a charging module of a DC power supply system comprises the following steps:
[0009] Step 1: Establish a simulation model of the charging module, collect diagnostic signal samples under the fault of the internal device of the charging module, and use the VMD algorithm to decompose the diagnostic signal samples into several intrinsic mode functions containing fault information as a sample set;
[0010] Step 2: Use Circle chaos map and Levy flight strategy to improve the sparrow search algorithm;
[0011] Step 3: Perform data normalization, divide the normalized sample set into training set, validation set and test set according to a certain ratio, build a CNN-LSTM network and initialize the network parameters;
[0012] Step 4: Use the improved sparrow search algorithm to optimize the hyperparameters of the CNN-LSTM network, including learning rate, dropout rate, and batch size;
[0013] Step 5: Under the optimal hyperparameter setting, the CNN-LSTM network fault diagnosis model is trained using the training set, the CNN-LSTM network fault diagnosis model is tested using the validation set, and the trained CNN-LSTM network fault diagnosis model is tested using the test set;
[0014] Step 6: Input the newly acquired samples to be diagnosed into the trained fault diagnosis model to output the classification results, so as to realize the fault diagnosis of the charging module.
[0015] Furthermore, the simulation model of the charging module described in step 1 is composed of a front-stage PFC circuit and a rear-stage LLC resonant converter, and the output voltage and output current of the rear-stage DC-DC circuit are selected as diagnostic signals; the PWM signal disconnection failure is simulated by removing the pulse signal of the corresponding power switch tube, and the open circuit failure of the switch tube is simulated by setting the disconnect state of the ideal switch.
[0016] Furthermore, the method of using the VMD algorithm described in step 1 to decompose the diagnostic signal sample into several intrinsic modal functions containing fault information as a sample set is as follows: the variational modal decomposition feature extraction function is constructed using the vmdpy library through the Pycharm framework, and the established variational modal decomposition feature extraction function is VMD (data, alpha, tau, K, DC, tol), wherein data is the input data, alpha is the bandwidth limit, tau is the noise tolerance, K is the number of decomposed modes, DC is whether the synthetic signal has a constant, and tol is the error accuracy.
[0017] Furthermore, the initial parameters of the variational mode decomposition feature extraction function are set as follows: alpha=2000, tau=0, K=5, DC=0, tol=1e-7.
[0018] Furthermore, the method of improving the sparrow search algorithm using the Circle chaos map and the Levy flight strategy described in step 2 is as follows:
[0019] Use Circle chaos map to initialize the population. The formula of Circle chaos map is:
[0020]
[0021] Among them, mod() is the remainder function, m and n are coefficients, x n+1 represents the initial position of the n+1th sparrow, x n Indicates the initial position of the nth sparrow.
[0022] When the sparrow search algorithm is improved by using the Levy flight strategy, the Levy flight strategy improves the position update formula of the follower, and the position update formula is:
[0023]
[0024] Where Levy(d) is a random distribution, indicating the direction and step length of flight; Q is a random number that obeys a normal distribution; t is the current number of iterations; i = 1, 2, ..., n, where n is the number of sparrows; j = 1, 2, ..., d, where d is the dimension of the variable; represents the global worst position; represents the position of the i-th sparrow in the j-th dimension at the t+1-th iteration, represents the position of the i-th sparrow in the j-th dimension at the t-th iteration, It indicates that the optimal position is found in the t+1th iteration, and iter indicates the maximum number of iterations.
[0025] Furthermore, the CNN-LSTM network described in step 3 includes two convolutional layers, two pooling layers, two LSTM layers, two fully connected layers and one Softmax layer; batch normalization is added after each convolution operation, and Dropout is used for random discarding after the second pooling operation.
[0026] Furthermore, the sample set described in step 3 is divided into a training set, a validation set, and a test set in a ratio of 8:1:1.
[0027] Furthermore, the method for optimizing the hyperparameters of the CNN-LSTM network using the improved sparrow search algorithm described in step 4 is as follows:
[0028] 1) Initialize the parameters of the improved sparrow search algorithm, set the learning rate, dropout rate and batch size as the optimization variables of the improved sparrow search algorithm. The algorithm seeks the minimum value, so the negative value of the accuracy calculated by the CNN-LSTM model is set as the fitness function of the sparrow population. According to the fitness function, find the best global position and the global best fitness value. The best global position is the best hyperparameter combination searched by the improved sparrow search algorithm;
[0029] 2) Set the ratio of discoverers, followers, and scouts in the population, randomly initialize the population, and then calculate the current global best position and best fitness value. Then start iterative update, update the positions of discoverers, followers, and scouts in turn, and calculate the current best position and best fitness value according to their positions for update;
[0030] 3) Repeat this process until the required number of iterations is reached, output the global best position and the best fitness value, and use the learning rate, dropout rate and batch size determined by the global best position as the optimal set of hyperparameters.
[0031] A device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above-mentioned DC power supply system charging module fault diagnosis method, and the processor is configured to execute the program stored in the memory.
[0032] A storage medium stores a computer program, which executes the steps of the above-mentioned DC power supply system charging module fault diagnosis method when the computer program is executed by a processor.
[0033] The advantages of the present invention are:
[0034] The present invention uses Circle chaos mapping and Levy flight strategy to improve the sparrow search algorithm, uses the improved sparrow search algorithm to find the optimal values of hyperparameters of the CNN-LSTM network, including the learning rate, the dropout rate, and the batch size, and obtains the best set of hyperparameters; trains the CNN-LSTM network optimized by the improved sparrow search algorithm, tests the trained fault diagnosis model, and outputs the result of the charging module fault diagnosis; by improving the sparrow search algorithm, the global search ability of the sparrow search algorithm is improved to avoid falling into the local optimum, and the fault diagnosis accuracy is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a flow chart of a method for diagnosing a fault in a charging module of a DC power supply system according to a first embodiment of the present invention;
[0036] Figure 2 is a simulation topology diagram of a charging module according to the first embodiment of the present invention;
[0037] Figure 3 It is a training curve diagram of the DC power supply system charging module fault diagnosis method according to the first embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and specific embodiments:
[0040] Embodiment 1
[0041] like Figure 1 As shown, a DC power supply system charging module fault diagnosis method of this embodiment includes the following steps:
[0042] Step 1: Establish a simulation model of the charging module. The charging module in the embodiment of the present invention is mainly composed of a front-stage PFC circuit and a rear-stage LLC resonant converter. The circuit topology is shown in FIG. Figure 2 As shown. The output voltage and output current of the rear-stage DC-DC circuit are selected as diagnostic signals, and the fault types are numbered according to the open-circuit fault states of different power switch devices in the charging module. The PWM signal disconnection fault is simulated by removing the pulse signal of the corresponding power switch tube, and the open-circuit fault of the switch tube is simulated by setting the disconnection state of the ideal switch, and the diagnostic signal samples under different power switch tube faults of the charging module are collected. The common fault points of the charging module are damage to the switch tube and damage to the driver chip, and the rear-stage LLC resonant converter has a symmetrical structure. The characteristics of the open-circuit faults of the four MOS tubes are consistent, so the charging module is set to have four fault states, namely normal state, open-circuit fault state of the front-stage switch tube, open-circuit fault state of the rear-stage switch tube, and disconnection fault state of the front-stage PWM signal; the fault states and categories are shown in Table 1.
[0043] Table 1 Fault status and categories
[0044] Fault Status Fault category Normal state F0 The front-stage switch tube is open circuit fault state F1 The next-stage switch tube is open circuit fault state F2 The previous PWM signal is disconnected. F3
[0045] Use the VMD (Variational Mode Decomposition) algorithm to decompose the diagnostic signal samples into several intrinsic mode functions containing fault information as the sample set. Utilize the vmdpy library through the Pycharm framework to construct a variational mode decomposition feature extraction function. The established variational mode decomposition feature extraction function is VMD(data, alpha, tau, K, DC, tol), where data is the input data, alpha is the bandwidth limit, tau is the noise tolerance, K is the number of decomposition modes, DC is whether there is a constant in the synthesized signal, and tol is the error precision. Set the initial parameters as alpha = 2000, tau = 0, K = 5, DC = 0, tol = 1e-7.
[0046] Step 2: Improve the sparrow search algorithm using the Circle chaotic map and Levy flight strategy
[0047] The population of the sparrow search algorithm can be represented as X, and the formula for initializing the population position is:
[0048] X = lb + rand(ub - lb)
[0049] where ub and lb represent the upper and lower boundaries of the population position respectively.
[0050] The formula for updating the position of the discoverer in the sparrow search algorithm is:
[0051]
[0052] where i = 1, 2,..., n, n is the number of sparrows; t represents the current iteration number; j = 1, 2,..., d, d is the dimension of the variable; α is a random number between (0, 1]; T max is the total number of iterations; Q is a random number obeying the normal distribution; R2 is the warning value, taking a random number between [0, 1], and ST is the safety value. When R2 < ST, it indicates that there are no predators around; when R2 ≥ ST, it indicates the appearance of predators.
[0053] The formula for updating the position of the follower is:
[0054]
[0055] where represents the global worst position, A represents a 1×d matrix, and each element in the matrix is randomly assigned 1 or -1, where A + =(AA T ) -1 .
[0056] When the sparrow realizes the danger after the appearance of the predator, the formula for updating the position is:
[0057]
[0058] Among them, X best represents the global optimal position, β is the step size control parameter, which is a normally distributed random number with a mean of 0 and a variance of 1, and a uniform random number in the range of k∈[-1,1]. i is the current sparrow’s fitness value. g and f w are the current global best and worst fitness values, respectively, and ε is the minimum constant. The next iteration is then performed based on the calculated best fitness value and best global position.
[0059] Use Circle chaos map to initialize the population. The formula of Circle chaos map is:
[0060]
[0061] Among them, mod() is the remainder function, m and n are coefficients, which are 0.2 and 0.5 respectively, and x n+1 represents the initial position of the n+1th sparrow, x n Indicates the initial position of the nth sparrow.
[0062] When using the Levy flight strategy to improve the sparrow search algorithm, the Levy flight strategy is used to improve the follower's position update formula. The improved calculation formula is:
[0063]
[0064] Among them, Levy(d) is a random distribution, indicating the direction and step length of flight; represents the position of the i-th sparrow in the j-th dimension at the t+1-th iteration, represents the position of the i-th sparrow in the j-th dimension at the t-th iteration, It indicates that the optimal position is found in the t+1th iteration, and iter indicates the maximum number of iterations.
[0065] The improved sparrow search algorithm and the sparrow search algorithm before improvement are compared using the standard test function. The minimum value of the test function and the comparison results are shown in Table 2:
[0066] Table 2 Comparison of test function optimization results
[0067]
[0068]
[0069] According to Table 2, the optimization result of the improved sparrow search algorithm is closer to 0, which shows that the present invention uses Circle chaotic mapping and Levy flight strategy to improve the sparrow search algorithm and improve the global search ability of the sparrow search algorithm.
[0070] Step 3: Perform data normalization, divide the normalized sample set into training set, validation set and test set according to a certain ratio, build a CNN-LSTM network and initialize the network parameters; the specific method is as follows:
[0071] The sample set is divided into a training set, a validation set and a test set in a ratio of 8:1:1. The CNN-LSTM network includes two convolutional layers, two pooling layers, two LSTM layers, two fully connected layers and one Softmax layer; batch normalization is added after each convolution operation, and Dropout is used for random discarding after the second pooling operation.
[0072] Step 4: Use the improved sparrow search algorithm to optimize the hyperparameters of the CNN-LSTM network. The specific method is as follows:
[0073] 1) Initialize the parameters of the improved sparrow search algorithm, set the learning rate, dropout rate and batch size as the optimization variables of the improved sparrow search algorithm. The algorithm seeks the minimum value, so the negative value of the accuracy calculated by the CNN-LSTM model is set as the fitness function of the sparrow population. According to the fitness function, find the best global position and the global best fitness value. The best global position is the best hyperparameter combination searched by the improved sparrow search algorithm;
[0074] 2) Set the ratio of discoverers, followers, and scouts in the population, randomly initialize the population, and then calculate the current global best position and best fitness value. Then start iterative update, update the positions of discoverers, followers, and scouts in turn, and calculate the current best position and best fitness value according to their positions for update;
[0075] 3) Repeat this process until the required number of iterations is reached, output the global best position and the best fitness value, and use the learning rate, dropout rate and batch size determined by the global best position as the optimal set of hyperparameters.
[0076] Step 5: Under the optimal hyperparameter setting, the CNN-LSTM network fault diagnosis model is trained using the training set, the CNN-LSTM network fault diagnosis model is tested using the validation set, and the trained CNN-LSTM network fault diagnosis model is tested using the test set;
[0077] Step 6: Input the newly acquired samples to be diagnosed into the trained fault diagnosis model to output the classification results, so as to realize the fault diagnosis of the charging module.
[0078] Simulation test verification
[0079] The parameters of the CNN-LSTM network are set using the best hyperparameters obtained by the improved sparrow search algorithm for training. The training rounds are set to 80 rounds, and the training curve is as follows: Figure 3 As shown. The training effect of the DC power supply system charging module fault diagnosis algorithm of the present invention is good. The fault classification results of the present invention are shown in Table 3. Compared with the fault classification results of traditional variational mode decomposition-convolutional neural network (VMD-CNN) and other classical methods, it is shown that the DC power supply system charging module fault diagnosis algorithm of the present invention has certain advancement.
[0080] Table 3 Comparison of fault classification results of charging module in DC power system
[0081] Fault category VMD-CNN Proposed method Normal state 100.00% 100.00% The front stage switch tube is open circuit fault 89.00% 95.00% The next stage switch tube is open circuit fault 100.00% 100.00% Front stage PWM signal disconnection fault 92.50% 97.50%
[0082] The DC power supply system charging module fault diagnosis method of the present invention utilizes Circle chaos mapping and Levy flight strategy to improve the global search capability of the sparrow search algorithm, and utilizes the improved sparrow search algorithm to optimize the hyperparameters of the CNN-LSTM network including the learning rate, the dropout rate, and the batch size, thereby effectively solving the problem that the CNN-LSTM network hyperparameter optimization and the optimization algorithm are prone to fall into the local optimum, and improving the fault diagnosis accuracy of the DC power supply system charging module.
[0083] Embodiment 2
[0084] A device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the DC power supply system charging module fault diagnosis method in Example 1, and the processor is configured to execute the program stored in the memory.
[0085] Embodiment 3
[0086] A storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for diagnosing faults of a charging module of a DC power supply system in embodiment 1 are executed.
[0087] The above embodiments 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. However, these 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.
Claims
1. A DC power supply system charging module fault diagnosis method, characterized in that: The following steps are involved: Step 1: Establish a simulation model of the charging module, collect diagnostic signal samples under the fault of the internal device of the charging module, and use the VMD algorithm to decompose the diagnostic signal samples into several intrinsic mode functions containing fault information as a sample set; Step 2: Improve the sparrow search algorithm using Circle chaos map and Levy flight strategy; Step 3: Perform data normalization, divide the normalized sample set into training set, validation set and test set according to a certain ratio, build a CNN-LSTM network and initialize the network parameters; Step 4: Use the improved sparrow search algorithm to optimize the hyperparameters of the CNN-LSTM network, including learning rate, dropout rate, and batch size; Step 5: Under the optimal hyperparameter setting, the CNN-LSTM network fault diagnosis model is trained using the training set, the CNN-LSTM network fault diagnosis model is tested using the validation set, and the trained CNN-LSTM network fault diagnosis model is tested using the test set; Step 6: Input the newly acquired samples to be diagnosed into the trained fault diagnosis model to output the classification results, so as to realize the fault diagnosis of the charging module.
2. A novel DC power supply system charging module fault diagnosis algorithm according to claim 1, characterized in that: The simulation model of the charging module described in step 1 is composed of a front-stage PFC circuit and a rear-stage LLC resonant converter. The output voltage and output current of the rear-stage DC-DC circuit are selected as diagnostic signals. The PWM signal disconnection failure is simulated by removing the pulse signal of the corresponding power switch tube, and the open circuit failure of the switch tube is simulated by setting the disconnect state of the ideal switch.
3. A novel DC power supply system charging module fault diagnosis algorithm according to claim 1, characterized in that: The method described in step 1 of using the VMD algorithm to decompose the diagnostic signal sample into several intrinsic modal functions containing fault information as a sample set is as follows: the variational modal decomposition feature extraction function is constructed using the vmdpy library through the Pycharm framework. The established variational modal decomposition feature extraction function is VMD (data, alpha, tau, K, DC, tol), wherein data is the input data, alpha is the bandwidth limit, tau is the noise tolerance, K is the number of decomposed modes, DC is whether the synthetic signal has a constant, and tol is the error accuracy.
4. The DC power supply system charging module fault diagnosis method according to claim 3, characterized in that: The initial parameters of the variational mode decomposition feature extraction function are set as follows: alpha=2000, tau=0, K=5, DC=0, tol=1e-7.
5. The DC power supply system charging module fault diagnosis method according to claim 1, characterized in that: The method described in step 2 for improving the sparrow search algorithm using the Circle chaos map and the Levy flight strategy is as follows: Use Circle chaos map to initialize the population. The formula of Circle chaos map is: Among them, mod() is the remainder function, m and n are coefficients, x n+1 represents the initial position of the n+1th sparrow, x n Indicates the initial position of the nth sparrow. When the sparrow search algorithm is improved by using the Levy flight strategy, the Levy flight strategy improves the position update formula of the follower, and the position update formula is: Where Levy(d) is a random distribution, indicating the direction and step length of flight; Q is a random number that obeys a normal distribution; t is the current number of iterations; i = 1, 2, ..., n, where n is the number of sparrows; j = 1, 2, ..., d, where d is the dimension of the variable; represents the global worst position; represents the position of the i-th sparrow in the j-th dimension at the t+1-th iteration, represents the position of the i-th sparrow in the j-th dimension at the t-th iteration, It indicates that the optimal position is found in the t+1th iteration, and iter indicates the maximum number of iterations.
6. The DC power supply system charging module fault diagnosis method according to claim 1, characterized in that: The CNN-LSTM network described in step 3 includes two convolutional layers, two pooling layers, two LSTM layers, two fully connected layers, and one Softmax layer; batch normalization is added after each convolution operation, and Dropout is used for random discarding after the second pooling operation.
7. The DC power supply system charging module fault diagnosis method according to claim 1, characterized in that: The sample set described in step 3 is divided into a training set, a validation set, and a test set in a ratio of 8:1:
1.
8. The DC power supply system charging module fault diagnosis method according to claim 1, characterized in that: The method described in step 4 to optimize the hyperparameters of the CNN-LSTM network using the improved sparrow search algorithm is as follows: 1) Initialize the parameters of the improved sparrow search algorithm, set the learning rate, dropout rate and batch size as the optimization variables of the improved sparrow search algorithm. The algorithm seeks the minimum value, so the negative value of the accuracy calculated by the CNN-LSTM model is set as the fitness function of the sparrow population. According to the fitness function, find the best global position and the global best fitness value. The best global position is the best hyperparameter combination searched by the improved sparrow search algorithm; 2) Set the ratio of discoverers, followers, and scouts in the population, randomly initialize the population, and then calculate the current global best position and best fitness value. Then start iterative update, update the positions of discoverers, followers, and scouts in turn, and calculate the current best position and best fitness value according to their positions for update; 3) Repeat this process until the required number of iterations is reached, output the global best position and the best fitness value, and use the learning rate, dropout rate and batch size determined by the global best position as the optimal set of hyperparameters.
9. A device comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the DC power supply system charging module fault diagnosis method according to any one of claims 1 to 8, and the processor is configured to execute the program stored in the memory.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the DC power supply system charging module fault diagnosis method according to any one of claims 1 to 8 are executed.
Citation Information
Cited By
High-voltage isolation switch cabinet fault diagnosis method and system based on digital twinning
CN121090968A
PFC-LLC global collaborative optimization control method, system and device based on symbiotic neural network
CN121193057A