Fuel cell hydrogen leakage fault diagnosis method based on VAE model and SVM model

By expanding data using a VAE model and optimizing parameters using an SVM model, combined with frequency and time domain feature processing, the data imbalance problem in fuel cell hydrogen leakage fault diagnosis was solved, achieving high-precision and high-efficiency fault identification.

CN120408337BActive Publication Date: 2026-06-23JIANGSU JINGCI INTELLIGENT SENSING TECH RES INST CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGSU JINGCI INTELLIGENT SENSING TECH RES INST CO LTD
Filing Date
2025-03-27
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing methods for diagnosing hydrogen leaks in fuel cells rely on human experience and suffer from data imbalance, resulting in low diagnostic accuracy. In particular, they are prone to high misdiagnosis or missed diagnosis rates in scenarios with multiple fault types, and may lead to serious safety accidents.

Method used

A method for diagnosing hydrogen leakage faults in fuel cells was constructed by using a VAE-based data augmentation model, combining an SVM model and an improved BKA algorithm to optimize parameters, and extracting frequency and time domain features and performing singular value decomposition.

Benefits of technology

It significantly improves the accuracy and efficiency of hydrogen leak fault diagnosis, reduces diagnosis time, enhances the model's classification accuracy and generalization performance, and reduces the misdiagnosis rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408337B_ABST
    Figure CN120408337B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of fuel cell fault diagnosis, and particularly relates to a fuel cell hydrogen leakage fault diagnosis method based on a VAE model and an SVM model, comprising the following steps: collecting original data of fuel cell operation, and dividing into a normal data set and a fault data set; pre-processing the normal data set and the fault data set to obtain normal data samples and fault data samples; constructing and training a VAE model, using the trained VAE model to expand to obtain synthesized fault data samples; merging the data samples to form an expanded data set; performing normalization processing, and extracting frequency domain features and time domain features of each data sample, and then performing singular value decomposition processing to obtain a key feature vector set; constructing and training an SVM model, using an improved BKA algorithm to optimize parameters of the SVM model, and using the trained SVM model to perform fault diagnosis; the present application eliminates the imbalance between hydrogen leakage data and normal data, and quickly and accurately identifies hydrogen leakage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fuel cell fault diagnosis technology, and in particular to a method for diagnosing hydrogen leakage faults in fuel cells based on VAE and SVM models. Background Technology

[0002] As a highly efficient clean energy conversion technology, the monitoring and fault diagnosis of fuel cell systems are crucial for ensuring system stability and extending service life. Traditional methods for diagnosing hydrogen leaks in fuel cell systems rely primarily on hydrogen sensors to collect hydrogen concentration data, which is then analyzed using human experience. This approach not only fails to meet the demands of intelligent and automated development but also limits the accuracy of fault diagnosis due to over-reliance on manual judgment and limited data, while simultaneously increasing labor and time costs.

[0003] Currently, machine learning algorithms are also used for fault diagnosis in fuel cells. However, these algorithms rely on large amounts of training data, while actual faults in fuel cell systems are typically low-probability events. Furthermore, incomplete data recording results in a very limited number of fault samples, leading to a severe imbalance between normal operation and fault data. This results in insufficient diagnostic capabilities of machine learning algorithms for fault samples. Especially in scenarios with multiple fault types, high false positive or false negative rates are very likely, and fault identification is often untimely. In fuel cell systems, missed fault signals can directly lead to system performance degradation or even failure, with consequences far more severe than misdiagnosis of normal equipment. Particularly in critical fault scenarios such as hydrogen leaks, missed diagnoses can not only cause serious safety accidents but also damage the entire system.

[0004] Therefore, in the case of uneven data distribution in fuel cell systems, it is essential to develop a diagnostic method that can quickly and accurately identify hydrogen leaks. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a fuel cell hydrogen leakage fault diagnosis method based on VAE model and SVM model that can eliminate the imbalance between hydrogen leakage data and normal data and can quickly and accurately identify hydrogen leakage.

[0006] The technical solution adopted by this invention to solve its technical problem is: a method for diagnosing hydrogen leakage faults in fuel cells based on VAE and SVM models, comprising the following steps:

[0007] S1. Collect raw data from the operation of the fuel cell and divide the raw data into normal datasets and fault datasets;

[0008] S2. Preprocess the normal dataset and the fault dataset to obtain normal data samples and fault data samples;

[0009] S3. Construct a VAE model, train the VAE model using fault data samples, and use the trained VAE model to augment the data to obtain a synthetic fault data sample.

[0010] S4. Merge the synthesized fault data samples, fault data samples and normal data samples to form an expanded dataset, and divide the expanded dataset into a training set and a test set;

[0011] S5. Normalize the training set and test set, extract the frequency domain features and time domain features of each data sample in the training set and test set, and then perform singular value decomposition on the frequency domain features and time domain features to obtain the key feature vector set of the training set and test set.

[0012] S6. Construct an SVM model. Train the SVM model using the key feature vector set of the training set. At the same time, use the improved BKA algorithm to optimize the parameters of the SVM model. Use the trained SVM model for fault diagnosis.

[0013] Furthermore, in step S3, the VAE model includes an encoder, a decoder, and an optimizer. The encoder maps the input data to the latent space, the decoder maps the low-dimensional representation of the latent space back to the data space, and the optimizer optimizes the VAE model based on the reconstruction loss and KL divergence in the encoder and decoder.

[0014] Furthermore, the training process of the VAE model in step S3 is as follows:

[0015] S31. The encoder receives fault data samples and calculates the potential spatial condition distribution Q. φ The mean of (z / x) u φ (x) and variance Conditional distribution Q φ (z / x) is as follows:

[0016]

[0017] In the formula, z is the low-dimensional representation of the latent space by which the encoder maps the input data; x is the input data of the encoder; φ is a parameter;

[0018] S32. Introduce the reparameterization technique to sample random noise ε from the standard normal distribution N(0,I) and combine it with the mean u. φ (x) and variance The low-dimensional representation z of the latent space is obtained as follows:

[0019]

[0020] In the formula, ⊙ represents element-wise multiplication;

[0021] S33. The decoder maps the low-dimensional representation z of the latent space back to the data space, generating reconstructed data. probability distribution P θ (x / z), probability distribution P θ (x / z) is as follows:

[0022]

[0023] In the formula, σ is the output of the decoder; σ is the reconstructed data. The standard deviation of the distribution; I represents the reconstructed data. The covariance matrix.

[0024] Furthermore, the loss function L in the VAE model VAE as follows:

[0025] L VAE =E Qφ(z / x) [logP θ (x / z)]-D KL [Q φ (z / x)||p(z)]

[0026] In the formula, E Qφ(z / x) [] represents the reconstruction loss, used to measure the reconstructed data. The difference from the input data x; D KL [] represents the KL divergence, used to measure the conditional distribution Q. φ The difference between (z / x) and the prior distribution p(z), where p(z) is a standard normal distribution N(0,I).

[0027] Furthermore, the calculation process of the SVM model in step S6 is as follows:

[0028] Define the hyperplane function f(x) = ω T Given x+b, find the optimal classification plane using the following formula:

[0029]

[0030] sty i (ω T x i +b)≥1

[0031] In the formula, ω is the weight vector; x i The key feature vector; y i ...

[0032] Introducing a penalty coefficient c to control the tolerance for classification errors, the solution formula is transformed into the following formula:

[0033]

[0034] sty i (ω T x i +b)≥1-Δ i

[0035] In the formula, c≥0; Δ i Δ is a slack variable used to tolerate outlier data. i ≥0;

[0036] The Lagrangian function is used to solve the problem. Based on the KKT conditions, the optimal plane problem is transformed into a quadratic optimization problem. The formula for the quadratic optimization problem is as follows:

[0037]

[0038] In the formula, α i and α j For Lagrange multipliers, 0 ≤ α i ≤c, 0≤α j ≤c;

[0039] Solving the quadratic optimization problem yields the optimal classification plane function as follows:

[0040]

[0041] In the formula, sgn{} is the sign function, α i · For optimal Lagrange multipliers, b · This is the optimal bias vector;

[0042] Introducing the Gaussian kernel function k(x) i ,x j Mapping low-dimensional data to a high-dimensional space to achieve linear separability, the optimal classification plane function is transformed into:

[0043]

[0044] Where, k(x) i ,x j )=exp(-g||x i -x j || 2 ),

[0045] In the formula, g is the parameter of the Gaussian kernel function, which determines the number of support vectors in the high-dimensional space and affects the training speed; ρ is the bandwidth parameter of the Gaussian kernel function; ||x i-x j || 2 For x i With x j The distance between them.

[0046] Furthermore, the steps in step S6 where the improved BKA algorithm optimizes the SVM model parameters are as follows:

[0047] S61. Initialize the parameters of the BKA algorithm, set the search range of the penalty coefficient c and the Gaussian kernel function parameter g, encode them as individual positions, and randomly generate the initial population;

[0048] S62. Use the test set to evaluate the fault diagnosis accuracy of the SVM model corresponding to each individual as the fitness value, and set the position of the individual with the highest fitness value in the initial population as the global optimal position.

[0049] S63. Individual positions are iteratively adjusted according to the update formula, which is as follows:

[0050]

[0051] in,

[0052] In the formula, L(λ) is the sampling step size in the Lévy distribution; λ is the exponential parameter of the Lévy distribution, λ∈(1,2); W1 and W2 are parent individuals; cd1 and cd2 are offspring individuals; β is a random vector, β∈[0,1]; u and v are random numbers sampled from the standard normal distribution;

[0053] S64. Record the individual optimal position and the global optimal position in each iteration to guide the optimization direction. If the iteration meets the termination condition, output the optimal parameter combination of the penalty coefficient c and the Gaussian kernel function parameter g.

[0054] Furthermore, in step S2, the preprocessing of the normal dataset and the fault dataset employs the differential evolution algorithm.

[0055] Furthermore, in step S5, a Fourier transform is performed on each data sample in the training set and the test set to extract frequency domain features, while basic statistics are used to extract time domain features.

[0056] Furthermore, in step S4, the expanded dataset is divided into a 70% training set and a 30% test set.

[0057] The beneficial effects of this invention are:

[0058] (1) This invention expands the fault data sample by using the VAE model, which effectively solves the problem of data imbalance caused by the large number of normal data samples and the small number of hydrogen leakage fault data samples in fuel cell operation data. This ensures that the SVM model can be trained sufficiently and effectively, and significantly improves the accuracy of the SVM model in identifying hydrogen leakage faults. In combination with the use of the improved BKA algorithm to optimize the parameters of the SVM model (i.e., the penalty coefficient c and the Gaussian kernel function parameter g), the accuracy of the SVM model in identifying hydrogen leakage faults is further improved, and the diagnosis time is greatly reduced.

[0059] (2) This invention extracts frequency domain features and time domain features, removes some redundant and irrelevant features in the training set and test set, enhances the richness of the input information of the SVM model, improves the classification accuracy and generalization performance of the SVM model, and then uses singular value decomposition to process the extracted frequency domain features and time domain features, reduces the number of features and eliminates the interference of redundant features. Finally, hydrogen leakage fault diagnosis is performed through key features, which improves the diagnosis efficiency and further reduces the diagnosis time.

[0060] (3) The improved BKA algorithm of this invention introduces Levy flight. Since Levy flight has the characteristic of long-distance jump, it can significantly enhance the global search capability of the algorithm, thereby helping the algorithm to effectively jump out of local optima. Attached Figure Description

[0061] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0062] Figure 1 This is a flowchart of the steps of the present invention;

[0063] Figure 2 This is a diagnostic effect diagram of the present invention. Detailed Implementation

[0064] The present invention will now be further described in conjunction with the accompanying drawings and preferred embodiments. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention in a schematic manner, and therefore only show the components relevant to the invention.

[0065] like Figure 1 As shown, a method for diagnosing hydrogen leakage faults in fuel cells based on VAE and SVM models includes the following steps:

[0066] S1. Collect raw data from fuel cell operation, dividing the raw data into normal datasets and fault datasets. Specifically, the raw data includes operating parameters such as stack current, voltage, temperature, and ambient hydrogen concentration.

[0067] S2. Preprocess the normal dataset and the faulty dataset to obtain normal data samples and faulty data samples. Specifically, the preprocessing of the normal dataset and the faulty dataset uses the differential evolution algorithm.

[0068] S3. Construct a VAE model, train the VAE model using fault data samples, and use the trained VAE model to expand the data to obtain a synthetic fault data sample.

[0069] S4. Merge the synthesized fault data samples, fault data samples, and normal data samples to form an expanded dataset. Divide the expanded dataset into a training set and a test set. Specifically, the expanded dataset is divided into a 70% training set and a 30% test set.

[0070] S5. Normalize the training and test sets, and extract the frequency domain and time domain features of each data sample in the training and test sets. Then, perform singular value decomposition on the frequency and time domain features to obtain the key feature vector sets of the training and test sets. Specifically, perform Fourier transform on each data sample in the training and test sets to extract frequency domain features; use basic statistics to extract time domain features.

[0071] By extracting frequency and time domain features, some redundant and irrelevant features in the training and test sets are removed, which enhances the richness of the input information of the SVM model and improves the classification accuracy and generalization performance of the SVM model. Then, singular value decomposition is used to process the extracted frequency and time domain features to reduce the number of features and eliminate the interference of redundant features. Finally, hydrogen leak fault diagnosis is performed through key features, which improves the diagnostic efficiency and further reduces the diagnostic time.

[0072] S6. Construct an SVM model. Train the SVM model using the key feature vector set of the training set. At the same time, use the improved BKA algorithm to optimize the parameters of the SVM model. Use the trained SVM model for fault diagnosis.

[0073] By expanding the fault data samples using the VAE (Variational Autoencoder) model, the data imbalance problem caused by the large number of normal data samples and the small number of hydrogen leak fault data samples in fuel cell operation data is effectively solved. This ensures that the SVM (Support Vector Machine) model can be trained sufficiently and effectively, significantly improving the accuracy of the SVM model in identifying hydrogen leak faults. In addition, by using an improved BKA (Blackwing) algorithm to optimize the parameters of the SVM model (i.e., the penalty coefficient c and the Gaussian kernel function parameter g), the accuracy of the SVM model in identifying hydrogen leak faults is further improved, and the diagnosis time is greatly reduced.

[0074] In step S3, the VAE model includes an encoder, a decoder, and an optimizer. The encoder maps the input data to the latent space, the decoder maps the low-dimensional representation of the latent space back to the data space, and the optimizer optimizes the VAE model based on the reconstruction loss and KL divergence in the encoder and decoder.

[0075] The training process of the VAE model in step S3 is as follows:

[0076] S31. The encoder receives fault data samples and calculates the potential spatial condition distribution Q. φ The mean of (z / x) u φ (x) and variance Conditional distribution Q φ (z / x) is as follows:

[0077]

[0078] In the formula, z is the low-dimensional representation of the latent space by which the encoder maps the input data; x is the input data of the encoder; φ is a parameter;

[0079] S32. Introduce the reparameterization technique to sample random noise ε from the standard normal distribution N(0,I) and combine it with the mean u. φ (x) and variance The low-dimensional representation z of the latent space is obtained as follows:

[0080]

[0081] In the formula, ⊙ represents element-wise multiplication;

[0082] S33. The decoder maps the low-dimensional representation z of the latent space back to the data space, generating reconstructed data. probability distribution P θ (x / z), probability distribution P θ (x / z) is as follows:

[0083]

[0084] In the formula, σ is the output of the decoder; σ is the reconstructed data. The standard deviation of the probability distribution; I represents the reconstructed data. The covariance matrix of I. Specifically, I is the identity matrix.

[0085] The training of VAE models is achieved by maximizing the lower bound of evidence. By maximizing the lower bound of evidence, VAE models can learn the complex underlying structure of data and generate new data samples.

[0086] Loss function L in VAE model VAE as follows:

[0087] L VAE =E Qφ(z / x) [logP θ (x / z)]-D KL [Q φ (z / x)||p(z)]

[0088] In the formula, The reconstruction loss is used to measure the reconstructed data. The difference from the input data x; D KL [] represents the KL divergence, used to measure the conditional distribution Q. φ The difference between (z / x) and the prior distribution p(z), where p(z) is a standard normal distribution N(0,I).

[0089] The calculation process of the SVM model in step S6 is as follows:

[0090] Define the hyperplane function f(x) = ω T Given x+b, find the optimal classification plane using the following formula:

[0091]

[0092] sty i (ω T x i +b)≥1

[0093] In the formula, ω is the weight vector; x i The key feature vector; y i ...

[0094] By solving for the optimal classification plane, the training data can be correctly partitioned and the data margin can be maximized.

[0095] Introducing a penalty coefficient c to control the tolerance for classification errors, the solution formula is transformed into the following formula:

[0096]

[0097] sty i (ω T x i +b)≥1-Δ i

[0098] In the formula, c≥0; Δ i Δ is a slack variable used to tolerate outlier data. i ≥0.

[0099] Because fuel cell systems have nonlinear dynamic characteristics and complex parameter variations, they are difficult to describe with simple linear relationships. Therefore, to cope with this complexity, this application introduces a penalty coefficient c in the SVM model to control the tolerance for classification errors and balance the complexity and accuracy of the model.

[0100] The Lagrangian function is used for solving the problem. Based on the KKT conditions (Carlow-Kun-Tucker conditions), the optimal plane problem is transformed into a quadratic optimization problem. The formula for the quadratic optimization problem is as follows:

[0101]

[0102]

[0103] In the formula, α i and α j For Lagrange multipliers, 0 ≤ α i ≤c, 0≤α j ≤c;

[0104] Solving the quadratic optimization problem yields the optimal classification plane function as follows:

[0105]

[0106] In the formula, sgn{} is the sign function. For optimal Lagrange multipliers, b · This is the optimal bias vector.

[0107] Introducing the Gaussian kernel function k(x) i ,x j Mapping low-dimensional data to a high-dimensional space to achieve linear separability, the optimal classification plane function is transformed into:

[0108]

[0109] Where, k(x) i ,x j )=exp(-g||x i -x j || 2 ),

[0110] In the formula, g is the parameter of the Gaussian kernel function, which determines the number of support vectors in the high-dimensional space and affects the training speed; ρ is the bandwidth parameter of the Gaussian kernel function; ||x i -x j || 2 For x i With x j The distance between them.

[0111] The steps in step S6 of the improved BKA algorithm to optimize the SVM model parameters are as follows:

[0112] S61. Initialize the parameters of the BKA algorithm, set the search range of the penalty coefficient c and the Gaussian kernel function parameter g, encode them as individual positions, and randomly generate the initial population.

[0113] S62. Use the test set to evaluate the fault diagnosis accuracy of the SVM model corresponding to each individual as the fitness value, and set the position of the individual with the highest fitness value in the initial population as the global optimal position.

[0114] S63. Individual positions are iteratively adjusted according to the update formula, which is as follows:

[0115]

[0116] in,

[0117] In the formula, L(λ) is the sampling step size in the Lévy distribution; λ is the exponential parameter of the Lévy distribution, λ∈(1,2); W1 and W2 are parent individuals; cd1 and cd2 are offspring individuals; β is a random vector, β∈[0,1]; u and v are random numbers sampled from the standard normal distribution.

[0118] By introducing the sampling step size of the Lévy distribution, the location of offspring individuals is no longer limited to a linear combination range of parent individuals, thereby increasing the diversity and exploratory ability of the population.

[0119] S64. Record the individual optimal position and the global optimal position in each iteration to guide the optimization direction. If the iteration meets the termination condition, output the optimal parameter combination of the penalty coefficient c and the Gaussian kernel function parameter g.

[0120] The improved BKA algorithm introduces Lévy flight, which, due to its long-distance jump capability, significantly enhances the algorithm's global search ability, thereby helping the algorithm effectively escape local optima.

[0121] from Figure 2 As can be observed, the labels predicted by the fault diagnosis method proposed in this application are basically consistent with the actual labels, where 1 indicates a correct diagnosis and 0 indicates an incorrect diagnosis.

[0122] The above embodiments are only for illustrating the technical concept and features of the present invention. Their purpose is to enable those skilled in the art to understand the content of the present invention and implement it. They should not be used to limit the scope of protection of the present invention. All equivalent changes or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for diagnosing hydrogen leakage faults in fuel cells based on VAE and SVM models, characterized in that, Includes the following steps: S1. Collect raw data from the operation of the fuel cell and divide the raw data into normal datasets and fault datasets; S2. Preprocess the normal dataset and the fault dataset to obtain normal data samples and fault data samples; S3. Construct a VAE model, train the VAE model using fault data samples, and use the trained VAE model to augment the data to obtain a synthetic fault data sample. S4. Merge the synthesized fault data samples, fault data samples and normal data samples to form an expanded dataset, and divide the expanded dataset into a training set and a test set; S5. Normalize the training set and test set, extract the frequency domain features and time domain features of each data sample in the training set and test set, and then perform singular value decomposition on the frequency domain features and time domain features to obtain the key feature vector set of the training set and test set. S6. Construct an SVM model. Train the SVM model using the key feature vector set of the training set. At the same time, use the improved BKA algorithm to optimize the parameters of the SVM model. Use the trained SVM model for fault diagnosis. In step S3, the VAE model includes an encoder, a decoder, and an optimizer. The encoder maps the input data to the latent space, the decoder maps the low-dimensional representation of the latent space back to the data space, and the optimizer optimizes the VAE model based on the reconstruction loss and KL divergence in the encoder and decoder. The training process of the VAE model is as follows: S31. The encoder receives fault data samples and calculates the potential spatial condition distribution. mean and variance Conditional distribution as follows: In the formula, The encoder maps the input data to a low-dimensional representation of the latent space; This is the input data for the encoder; For parameters; S32. Introducing reparameterization techniques, from the standard normal distribution... Medium-sampled random noise Combined with the mean and variance This yields a low-dimensional representation of the latent space. The formula is as follows: In the formula, ⊙ represents element-wise multiplication; S33. The decoder represents the latent space in low dimension. Map back to the data space to generate reconstructed data. probability distribution probability distribution as follows: In the formula, This is the output of the decoder; To reconstruct data The standard deviation of the probability distribution; To reconstruct data The covariance matrix; The steps in step S6 for optimizing the SVM model parameters using the improved BKA algorithm are as follows: S61. Initialize the parameters of the BKA algorithm and set the penalty coefficient. and Gaussian kernel function parameters The search range is defined and encoded as individual locations, and an initial population is randomly generated. S62. Use the test set to evaluate the fault diagnosis accuracy of the SVM model corresponding to each individual as the fitness value, and set the position of the individual with the highest fitness value in the initial population as the global optimal position. S63. Individual positions are iteratively adjusted according to the update formula, which is as follows: in, ; In the formula, Let Lévy's step size be the sampling step size in the Lévy distribution. Let be the exponential parameter of the Lévy distribution. ; and For the parent generation; and For offspring individuals; It is a random vector. ; and These are random numbers sampled from a standard normal distribution; S64. Record the individual optimal position and the global optimal position in each iteration to guide the optimization direction. If the iteration meets the termination condition, output the penalty coefficient. and Gaussian kernel function parameters The optimal combination of parameters.

2. The fuel cell hydrogen leakage fault diagnosis method based on VAE model and SVM model according to claim 1, characterized in that, Loss function in VAE model as follows: In the formula, The reconstruction loss is used to measure the reconstructed data. With input data Differences; KL divergence is used to measure the conditional distribution. With prior distribution differences It follows a standard normal distribution. .

3. The fuel cell hydrogen leakage fault diagnosis method based on VAE model and SVM model according to claim 1, characterized in that, The calculation process of the SVM model in step S6 is as follows: Define the hyperplane function The optimal classification plane is determined using the following formula: In the formula, This is the weight vector; Key feature vectors; Labels for different state types; It is the bias vector; ; Introducing a penalty coefficient To control the tolerance for classification errors, the formula is transformed into the following formula: In the formula, ; These are slack variables used to tolerate outlier data. ; The Lagrangian function is used to solve the problem. Based on the KKT conditions, the optimal plane problem is transformed into a quadratic optimization problem. The formula for the quadratic optimization problem is as follows: In the formula, and For Lagrange multipliers, , ; Solving the quadratic optimization problem yields the optimal classification plane function as follows: In the formula, For symbolic functions, For optimal Lagrange multipliers, This is the optimal bias vector; Introducing the Gaussian kernel function Mapping low-dimensional data to a high-dimensional space to achieve linear separability, the optimal classification plane function is transformed into: in, , ; In the formula, The parameters of the Gaussian kernel function determine the number of support vectors in the high-dimensional space and affect the training speed; This is the bandwidth parameter of the Gaussian kernel function; for and The distance between them.

4. The fuel cell hydrogen leakage fault diagnosis method based on VAE model and SVM model according to claim 1, characterized in that, In step S2, the differential evolution algorithm is used to preprocess the normal dataset and the fault dataset.

5. The fuel cell hydrogen leakage fault diagnosis method based on VAE model and SVM model according to claim 1, characterized in that, In step S5, Fourier transform is performed on each data sample in the training set and the test set to extract frequency domain features, while basic statistics are used to extract time domain features.

6. The fuel cell hydrogen leakage fault diagnosis method based on VAE model and SVM model according to claim 1, characterized in that, In step S4, the expanded dataset is divided into a 70% training set and a 30% test set.