Proton exchange membrane fuel cell fault diagnosis method based on deep learning
By combining deep learning and transfer learning methods and using the ResNet50 network for feature extraction and fault classification, the problems of strong model dependence and insufficient feature extraction capability in PEMFC fault diagnosis are solved, achieving efficient and accurate fault identification, which is applicable to the diagnosis of various operating states of proton exchange membrane fuel cells.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-10
AI Technical Summary
Existing fault diagnosis methods for proton exchange membrane fuel cells (PEMFCs) suffer from problems such as strong model dependence, insufficient feature extraction capability, low training efficiency, and poor generalization performance, especially with unsatisfactory diagnostic accuracy under small sample conditions.
By combining deep learning and transfer learning, a semi-mechanistic, semi-empirical model is constructed. A pre-trained ResNet50 convolutional neural network is used in conjunction with transfer learning for feature extraction and fault classification, transforming sensor time-series data into fault images for diagnosis.
It achieves high-precision and robust fault diagnosis under small sample conditions, improves diagnosis speed and accuracy, is more adaptable, and is suitable for identifying various operating states of proton exchange membrane fuel cells.
Smart Images

Figure CN121642032A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of fuel cell fault diagnosis and health management technology, specifically relating to a fault diagnosis method for proton exchange membrane fuel cells (PEMFC) based on deep convolutional neural networks and transfer learning. Background Technology
[0002] Proton exchange membrane fuel cells (PEMFCs) are widely considered an important component of future clean energy power systems due to their advantages such as high energy density, zero emissions, and rapid start-up at low temperatures, with broad application prospects, especially in transportation, aerospace, and portable power sources. However, PEMFCs are susceptible to various faults during actual operation, such as abnormal gas supply, temperature fluctuations, membrane drying, or flooding. These faults not only reduce system efficiency but may also cause permanent damage, severely affecting their service life and reliability.
[0003] Currently, fault diagnosis methods for PEMFCs can be mainly divided into two categories: model-based methods and data-driven methods. Model-based methods rely on an accurate mathematical model of the system and perform fault detection and isolation through residual analysis or state estimation. For example, fault diagnosis of water management in PEMFCs is achieved based on an equivalent circuit model and particle swarm optimization support vector machine (PSO-SVM). A fault isolation matrix is constructed using relative residual sensitivity analysis. However, these methods are highly dependent on model accuracy and face significant modeling difficulties and poor adaptability when dealing with complex nonlinear systems.
[0004] In contrast, data-driven methods do not rely on system mechanism models but instead achieve fault classification through feature extraction and pattern recognition of historical operational data. Common methods include traditional machine learning methods such as Principal Component Analysis (PCA) and Support Vector Machines (SVM), as well as deep learning methods that have emerged in recent years. For example, multi-scale convolutional neural networks (MCNNs) are used for multi-fault diagnosis in PEMFCs, or segmented battery technology is combined with dual-input CNNs to identify water management faults. Although these methods have achieved some success, they still suffer from problems such as reliance on manual feature extraction, insufficient model generalization ability, and high requirements for large datasets.
[0005] While deep learning has demonstrated powerful capabilities in fields such as image recognition and speech processing, existing methods based on traditional network structures have limited ability to extract spatiotemporal features when processing time-series data in proton exchange membrane fuel cell (PEMFC) fault diagnosis applications. Furthermore, the scarcity of actual fault samples makes deep learning models prone to overfitting when trained from scratch, resulting in slow convergence and ultimately unsatisfactory diagnostic accuracy. Therefore, constructing an intelligent diagnostic model capable of efficiently and accurately identifying various operating states of PEMFCs has significant theoretical and engineering application value. Summary of the Invention
[0006] To address the limitations of existing PEMFC fault diagnosis methods, such as strong model dependence, insufficient feature extraction capabilities, low training efficiency, and poor generalization performance, this invention proposes a fault diagnosis method for proton exchange membrane fuel cells that integrates deep learning and transfer learning. By converting sensor time-series data into fault images, a pre-trained ResNet50 network combined with a transfer learning mechanism is used for feature learning and fault classification. This method achieves high accuracy and robustness in diagnosis even under small sample conditions. This is of great significance for ensuring the safe, efficient, and long-life operation of PEMFC systems.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A deep learning-based fault diagnosis method for proton exchange membrane fuel cells includes the following steps: S1: Construct a semi-mechanistic, semi-empirical model of the proton exchange membrane fuel cell system, simulate various operating states through simulation, and collect time-series data from multiple sensors; S2: Preprocess the time series data, including data cleaning and standardization, and use Grammy angle field technology to convert the one-dimensional time series data into a two-dimensional image; S3: Using the two-dimensional image as input, feature extraction and fault classification are performed by combining a pre-trained ResNet50 convolutional neural network with transfer learning, wherein the transfer learning includes loading pre-trained weights and fine-tuning network parameters. S4: Train, validate, and test the neural network, and output fault classification results to achieve fault diagnosis of proton exchange membrane fuel cells.
[0008] Preferably, in step S1, the multiple operating states include at least one of the following: normal state, compressor inlet air pressure too low, cathode inlet temperature too high, fuel cell stack temperature too high, and anode gas supply pipe blockage.
[0009] Preferably, in step S1, the sensor data collected includes multiple signals such as fuel cell current, output voltage, hydrogen pressure, air pressure, temperature, proton exchange membrane water mass flow rate, relative humidity, and output power.
[0010] Preferably, in step S1, the semi-mechanistic semi-empirical model includes: Fuel cell modeling a) Single-cell voltage output of hydrogen-oxygen fuel cells for:
[0011] In the formula: This represents the actual voltage of a single cell in a hydrogen-oxygen fuel cell. It is the thermodynamic electromotive force; This is to reduce the activation polarization voltage loss; This is the ohmic polarization voltage loss.
[0012] b) Hydrogen supply system
[0013]
[0014]
[0015] In the formula This represents the mass of hydrogen in the supply pipeline; This represents the mass of water vapor in the supply pipeline; This represents the flow rate of hydrogen at the outlet of the pressure regulating valve; This represents the flow rate of hydrogen at the outlet of the hydrogen circulation pump; This represents the flow rate of hydrogen at the outlet of the supply pipeline; This represents the flow rate of water vapor at the outlet of the pressure regulating valve; This represents the flow rate of water vapor at the outlet of the supply pipeline; Represents the gas pressure in the supply pipeline; Represents the volume of the supply pipeline; The gas constant representing hydrogen; The gas constant representing water vapor.
[0016] c) Hydrogen supply system
[0017]
[0018] In the formula Represents the quality of air in the supply pipeline; This represents the airflow rate at the air compressor outlet. Represents the gas constant of air; This represents the airflow rate supplied to the cathode cavity; Represents the air heat ratio coefficient; This represents the outlet temperature of the air compressor; This represents the temperature of the supply pipeline.
[0019] d) Thermal balance analysis
[0020] Represents the specific heat capacity of the fuel cell stack; Represents the mass of the fuel cell stack; Represents the operating temperature of the fuel cell stack; The chemical energy stored in the reacting gases that participate in the electrochemical reaction per unit time; Represents the output power of the fuel cell stack; This represents the heat carried away by gases that did not participate in the reaction per unit time. This represents the heat carried away by the cooling water per unit time; This represents the amount of heat radiated from the fuel cell stack to the environment per unit time.
[0021] Preferably, in step (2), the data cleaning includes: cleaning the collected time series data to remove invalid or missing values, and then using Grammy angle field technology to convert the one-dimensional time series data into a two-dimensional image. The specific steps are as follows: Data standardization: Z-score standardization is performed on the time-series data of each sensor; Angle mapping: Maps the standardized data to the polar coordinate angle range [-π, π]. GAF matrix construction: Constructing the Grammy angle matrix by calculating the cosine values between different time points; Image generation and stitching: The GAF images generated by each sensor are normalized and converted into grayscale images. The images from the nine sensors are then stitched together into a single 288×288 pixel RGB image, which serves as the input for the subsequent neural network.
[0022] Preferably, in step (3), the specific operations of transfer learning include: loading the ResNet50 weights pre-trained on the ImageNet dataset, freezing the parameters of the front layers of the network, fine-tuning only the parameters of the back layers, and setting the learning rate to 0.0001.
[0023] Preferably, in step (4), the training process uses the cross-entropy loss function and the Adam optimizer, the dataset is divided into training set, validation set and test set according to the proportion, and the diagnostic performance is evaluated by the confusion matrix.
[0024] Compared with existing technologies, the beneficial effects and advancements of this invention are as follows: (1) This paper constructs a semi-mechanistic, semi-empirical model of a fuel cell system and preliminarily verifies its accuracy. ResNet50 and related knowledge of transfer learning are applied to PEMFC fault diagnosis. The time-series data from the sensors are preprocessed and converted into fault images using GAF technology as the fault dataset. This results in higher fault diagnosis accuracy, faster speed, and better performance.
[0025] (2) After training on 4000 sets of image data, with the loss function and activation function fixed, the algorithm improved the classification accuracy to 100%. This shows that deep learning is better at processing image data than ordinary data. Attached Figure Description
[0026] Figure 1 The application object of this invention is a simulation model of a proton exchange membrane fuel cell. Figure 2 Relationship between polarization voltage, power density and current density of fuel cells; Figure 3 This is a schematic diagram of the residual structure; Figure 4 This is a partial structure diagram of ResNet50; Figure 5 This is a GAF image under a certain fault condition; Figure 6 This refers to the neural network training process. Figure 7 The accuracy rates for the four methods; Figure 8 This is the confusion matrix for the test set corresponding to Method 3. Detailed Implementation
[0027] The present invention will be further described and illustrated below with reference to specific embodiments. The embodiments described are merely examples of the content of this disclosure and do not limit the scope of the invention. The technical features of each embodiment in the present invention can be combined accordingly, provided that there is no mutual conflict.
[0028] This invention discloses a fault diagnosis method for proton exchange membrane fuel cells based on deep learning and transfer learning, comprising the following steps: 1) Fuel cell system modeling and data generation 1.1) Introduction to the principle of fuel cells Inside a fuel cell, platinum acts as a catalyst, catalyzing the reaction. Typically, oxygen or air is used as fuel to provide the energy for the reaction, while hydrogen or hydrogen-containing compounds serve as the oxidant. The basic working principle of a PEMFC is to convert the chemical energy of the fuel into electrical energy, making it a clean and efficient power generation device. Its overall reaction equation is:
[0029] Mathematical models can quantitatively and accurately express the relationships between various physical quantities, which is of great significance for system design and optimization. By establishing a semi-mechanistic, semi-empirical model of the fuel cell system, the cumbersome calculation process of mechanistic models is reduced, while providing sufficient information about the electrochemical reactions occurring within the PEMFC.
[0030] 1.2) Fuel Cell Modeling a) Single-cell voltage output of hydrogen-oxygen fuel cells for:
[0031] In the formula: This represents the actual voltage of a single cell in a hydrogen-oxygen fuel cell. It is the thermodynamic electromotive force; This is to reduce the activation polarization voltage loss; This is the ohmic polarization voltage loss.
[0032] b) Hydrogen supply system
[0033]
[0034]
[0035] In the formula This represents the mass of hydrogen in the supply pipeline; This represents the mass of water vapor in the supply pipeline; This represents the flow rate of hydrogen at the outlet of the pressure regulating valve; This represents the flow rate of hydrogen at the outlet of the hydrogen circulation pump; This represents the flow rate of hydrogen at the outlet of the supply pipeline; This represents the flow rate of water vapor at the outlet of the pressure regulating valve; This represents the flow rate of water vapor at the outlet of the supply pipeline; Represents the gas pressure in the supply pipeline; Represents the volume of the supply pipeline; The gas constant representing hydrogen; The gas constant representing water vapor.
[0036] c) Hydrogen supply system
[0037]
[0038] In the formula Represents the quality of air in the supply pipeline; This represents the airflow rate at the air compressor outlet. The gas constant representing water vapor. This represents the airflow rate supplied to the cathode cavity; Represents the air heat ratio coefficient; This represents the outlet temperature of the air compressor; This represents the temperature of the supply pipeline.
[0039] d) Thermal balance analysis
[0040] Represents the specific heat capacity of the fuel cell stack; Represents the mass of the fuel cell stack; Represents the operating temperature of the fuel cell stack; The chemical energy stored in the reacting gases that participate in the electrochemical reaction per unit time; Represents the output power of the fuel cell stack; This represents the heat carried away by gases that did not participate in the reaction per unit time. This represents the heat carried away by the cooling water per unit time; This represents the amount of heat radiated from the fuel cell stack to the environment per unit time.
[0041] Appendix Figure 1 It is a simulation model of a proton exchange membrane fuel cell built based on a mathematical model.
[0042] 1.3) Model Validation Based on simulation and experimental data of fuel cells, the relationship between polarization voltage, power density, and current density was compared. Within an acceptable error range, the PEMFC model can accurately reflect the actual operating state of the system and the changing trends of its key parameters, verifying its effective modeling capability for fuel cell performance under different operating conditions. (Appendix) Figure 2 The relationship between polarization voltage, power density, and current density of fuel cells is shown.
[0043] 1.4) Data Generation First, based on the electrochemical reaction mechanism and empirical formulas of PEMFC, a semi-mechanistic, semi-empirical model including the stack, thermal management, air supply, and hydrogen supply subsystems was constructed in the Matlab / Simulink environment. By adjusting the model parameters, the operating data of PEMFC under five typical operating conditions were simulated, including: normal state, compressor inlet air pressure too low, cathode inlet temperature too high, stack temperature too high, and anode gas supply pipeline blockage.
[0044] Each operating state was simulated 800 times, with each simulation lasting 30 seconds. Time-series data from nine key sensors were collected, including stack current, output voltage, stack inlet hydrogen pressure, stack outlet hydrogen pressure, stack inlet oxygen pressure, stack outlet oxygen pressure, mass flow rate of proton exchange membrane water, anode outlet relative humidity, and stack output power.
[0045] 2) Data preprocessing and fault image generation The collected time-series data is cleaned to remove invalid or missing values, and then the Grammy Corner Field (GAF) technique is used to convert the one-dimensional time-series data into a two-dimensional image. The specific steps are as follows: Data standardization: Z-score standardization is performed on the time-series data of each sensor; Angle mapping: Maps the standardized data to the polar coordinate angle range [-π, π]. GAF matrix construction: Constructing the Grammy angle matrix by calculating the cosine values between different time points; Image generation and stitching: The GAF images generated by each sensor are normalized and converted into grayscale images. The images from the nine sensors are then stitched together into a single 288×288 pixel RGB image, which serves as the input for the subsequent neural network.
[0046] 2) Fault Diagnosis Algorithm Design 2.1) Conventional CNN CNNs are powerful at processing non-linear data. Their principle is to use convolutional layers to extract features from the input, and then use pooling layers to sparsify the feature maps, reducing computational load. Weight updates require the loss gradient to point in the direction of the current batch optimum; the update formula is as follows:
[0047] In the formula, Let be the weight at time t. For learning rate, Parameters at time t The loss gradient.
[0048] 2.2) Transfer Learning Deep convolutional neural network (DCNN) models have achieved significant breakthroughs in image classification. Compared to traditional machine learning methods, these models, trained extensively and deeply on the massive ImageNet image dataset, have successfully extracted rich image classification and recognition features. While DCNN models offer higher accuracy, their network layers and parameter counts are relatively large. Therefore, training with randomly initialized weights easily leads to the vanishing gradient problem, resulting in very slow parameter updates and hindering the achievement of ideal recognition results. Furthermore, DCNNs often require substantial training data to learn model parameters. However, this need for large amounts of data may impede their use in certain domains, particularly in environments lacking labeled datasets. Transfer learning can successfully apply image classification skills learned from ImageNet to new object classification tasks. Based on existing optimal network architectures, fine-tuning the network layer structure can be used to build models suitable for the research problem in new object classification tasks, which is much faster and easier than retraining a completely new network. Simultaneously, because the pre-trained network already possesses a rich variety of features, it does not require excessive data for retraining, thus significantly reducing training time.
[0049] 2.3) ResNet50 Convolutional Neural Network The key feature of the ResNet50 convolutional neural network is the introduction of residual structures. This allows for increased classification accuracy without sacrificing accuracy as the number of layers increases, while significantly enhancing the model's learning ability. (Appendix) Figure 3 The residual structure is shown, with appendix Figure 4 A partial structural diagram of ResNet50 is shown.
[0050] 2.4) Introduction to Fault Diagnosis Methods This invention uses a ResNet50 CNN model to diagnose faults in proton exchange membrane fuel cells. The principle involves using convolutional layers to extract features from GAF images generated from time-series data recorded by sensors. Then, pooling layers are used to sparsify the feature maps, reducing computational load. Finally, fully connected layers reduce the feature dimensionality and perform classification. The Softmax function after the fully connected layers transforms the output into a probability distribution using one-hot encoding, which is then used to classify the image category. A key feature of the ResNet50 convolutional neural network is the introduction of residual structures. This ensures that increasing the number of layers does not decrease classification accuracy, but significantly enhances the model's learning ability.
[0051] 2.5) Neural Network Training To ensure the effectiveness of model training and the objectivity of evaluation, the dataset was divided into a training set, a validation set, and a test set in an 8:1:1 ratio, used for model parameter optimization, hyperparameter tuning, and generalization capability verification, respectively. During training, network weights were updated using the backpropagation algorithm; the validation set was used to dynamically monitor loss changes, identify overfitting, and determine the optimal model checkpoint; finally, the test set independently evaluated the model's classification performance on unseen data to ensure the fairness, reliability, and practical application value of the evaluation results.
[0052] To accurately identify the fault type of a proton exchange membrane fuel cell (PEMFC) system under continuously varying operating current, this paper establishes a PEMFC system model and proposes a fault diagnosis method based on ResNet50 convolutional neural network (CNN) and transfer learning (TL). First, using Matlab / Simulink software, a PEMFC model is constructed based on the electrochemical reaction mechanism and empirical formulas during fuel cell operation. This model mainly includes a stack model and various auxiliary system models, such as the thermal management system, air supply system, and hydrogen supply system. Then, by changing the model parameters, sensor data of the fuel cell under five operating states are obtained. After data preprocessing, Gramian Angular Field (GAF) technology is used to convert the time-series data of each sensor into fault data images, which are then used as input to the ResNet50 convolutional neural network. Finally, through transfer learning, the pre-trained weights of the ResNet50 model are applied to the training of this model to improve the convergence speed and generalization ability of the classification model.
[0053] The implementation process of this fuel cell fault diagnosis method is as follows: 1) The first step is to model the PEMFC system. This invention establishes a simulation model of a PEMFC system, encompassing physical processes from multiple fields including fluid dynamics, thermodynamics, mass transfer, and electrochemistry, based on simulation software and an actual PEMFC platform. By comparing the simulation data output by the model with experimental data from the PEMFC platform under the same operating conditions, the effectiveness of the simulation model in terms of dynamic response and steady-state characteristics is verified, providing a reliable foundation for its application in fault diagnosis research.
[0054] 2) Fault injection experiment and data acquisition Data from nine sensors in the PEMFC model were collected, including stack current, output voltage, stack inlet hydrogen pressure, stack outlet hydrogen pressure, stack inlet oxygen pressure, stack outlet oxygen pressure, proton exchange membrane water mass flow rate, anode outlet relative humidity, and stack output power. The collected data were stored and processed further. The sensor signal types are shown in Table 1.
[0055] Five PEMFC operating states were simulated by injecting faults into the model. Each operating state was simulated for 30 seconds, with data recorded between 0 and 30 seconds. Time-series data from nine sensors were used in 800 simulations, resulting in 800 time-series images. These images were then divided into training, validation, and test sets in an 8:1:1 ratio. The model was simulated from 0 to 30 seconds, with changes to relevant parameters simulated, for a total of 4000 simulations to generate the fault diagnosis dataset. The operating states and corresponding image data volumes are shown in Table 2. Table 1 Sensor Signal Acquisition Table
[0056] Table 2 Image data volume for each operating state
[0057] 3) Data processing First, each set of time-series data was cleaned, using MATLAB to remove invalid data segments containing NaN values. Then, Z-score normalization was performed on the data from each sensor to eliminate dimensional differences. Next, the normalized sequences were mapped using polar coordinates to construct a Grammy angle field (GAF) matrix, achieving the conversion from time series to two-dimensional images. Finally, the GAF images generated by the nine sensors were stitched together into a single 288×288 RGB image, which served as the input for subsequent deep learning models. (Appendix) Figure 5 The image shows a GAF image under a certain fault condition.
[0058] 4) Fault diagnosis algorithm design Feature extraction is performed on GAF images generated from time-series data recorded by sensors using convolutional layers. Pooling layers then sparsify the feature maps to reduce computational load. Finally, fully connected layers reduce feature dimensionality and perform classification. The Softmax function following the fully connected layers transforms the output into a probability distribution using one-hot encoding, which is then used to classify the image category. A key feature of the ResNet50 convolutional neural network is the introduction of residual structures. This ensures that increasing the number of layers does not decrease classification accuracy, but significantly enhances the model's learning ability.
[0059] 5) Model training and testing A neural network fault diagnosis model was trained, validated, and tested using PEMFC fault sample data. To ensure model convergence and accuracy, the preprocessing method for the training dataset was the same as that for the original model dataset. ReLU was used as the activation function, and the sample size for each batch was set to 16. Four methods were used to train the CNN: Method 1 directly trained the ResNet50 network; Method 2 loaded the pre-weights of the ResNet50 network without fixing other structures and parameters, and trained using transfer learning; Method 3 loaded the pre-weights of the ResNet50 network, fixed the learning rate to 0.0001, and trained using transfer learning without fixing other structures and parameters; Method 4 directly trained the ResNet34 network. (Appendix) Figure 6 The neural network training process is demonstrated.
[0060] To better evaluate the generalization ability of the model, this paper presents confusion matrices for four methods and calculates precision, recall, F1-score, and accuracy from them. A comprehensive evaluation of the model is achieved by comparing these calculated metrics. The confusion matrix is the result of using the final model to predict on a test set containing 400 images. The x-axis of the confusion matrix represents the true class, and the y-axis represents the predicted class.
[0061] After training each model for 30 epochs, the diagnostic results and evaluation metrics accuracy of the four methods are as follows: Figure 7 Training loss such as Figure 8 Analysis shows that the model trained using Method 1 converges very slowly, only starting to converge after 22 epochs, with a training loss of 0.3. After 30 epochs, the loss decreases to 0.23, achieving an accuracy of 97.5%. The model trained using Method 2 converges faster than Method 1, starting after 22 epochs with a training loss of 0.31. After 30 epochs, the loss decreases to 0.25, with a final accuracy of 99.0%, a slight improvement over Method 1. The model trained using Method 3 converges exceptionally quickly, with a particularly significant decrease in training loss. It begins to converge after 5 epochs with a training loss of 0.15 and an accuracy of 99.5%. After 10 epochs, the training loss stabilizes at 0.1, and the accuracy stabilizes at 100%. Method 4 began to converge after 14 epochs of training, at which point the accuracy was 97% and the training loss was 0.28. After 30 epochs, the loss decreased to 0.25, and the accuracy reached 98.3%. (Appendix) Figure 7 The accuracy rates for the four methods are shown, with appendices. Figure 8 The test set confusion matrix for Method 3 is shown.
[0062] The diagnostic results and evaluation metrics are shown in Table 3. By comprehensively comparing Precision, Recall, F1-score, and Accuracy, we found that the training performance of the Method 3 model is better than the other three methods. It can be seen that the introduction of transfer learning has a very significant effect on the fault image classification process in this paper. The CNN model has a faster convergence speed when training on the image feature dataset, and requires fewer iterations to reach the ideal diagnostic accuracy. Under the same training loss requirements, the number of iterations required is greatly reduced, which means that the overall computation time of the model will also be further reduced.
[0063] Table 3 Diagnostic Results and Evaluation Indicators
[0064] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A deep learning-based method for diagnosing a failure of a proton exchange membrane fuel cell, characterized by, The method comprises the following steps: S1: Constructing a semi-mechanical semi-empirical model of a proton exchange membrane fuel cell system, simulating multiple operating states through simulation, and collecting time series data of multiple sensors; S2: Preprocessing the time series data, including data cleaning and standardization, and converting one-dimensional time series data into two-dimensional images using the Gramian angular field technique; S3: Using a pre-trained ResNet50 convolutional neural network combined with transfer learning to extract features and classify faults, where transfer learning includes loading pre-trained weights and fine-tuning network parameters; S4: Training, validating, and testing the neural network to output fault classification results to achieve fault diagnosis of the proton exchange membrane fuel cell.
2. The method according to claim 1, wherein, In step S1, the multiple operating states include at least one of normal state, compressor inlet air pressure too low, cathode inlet temperature too high, stack temperature too high, and anode gas supply pipeline blockage. 3.The method of claim 1, wherein, In step S1, the collected sensor data includes stack current, output voltage, hydrogen pressure, air pressure, temperature, proton exchange membrane water mass flow, relative humidity, and output power. 4.The method of claim 1, wherein, In step S1, the semi-mechanical semi-empirical model includes: Fuel cell modeling; a) single cell voltage output of a hydrogen-oxygen fuel cell is: ; wherein: is the actual voltage of a single cell of a hydrogen-oxygen fuel cell; is the thermodynamic electromotive force; is the activation polarization voltage loss; is the ohmic polarization voltage loss; b) hydrogen supply system; ; ; ; wherein represents the mass of hydrogen in the supply line; represents the mass of water vapor in the supply line; represents the flow rate of hydrogen at the outlet of the pressure regulating valve; represents the flow rate of hydrogen at the outlet of the hydrogen circulation pump; represents the flow rate of hydrogen at the outlet of the supply line; represents the flow rate of water vapor at the outlet of the pressure regulating valve; represents the flow rate of water vapor at the outlet of the supply line; represents the pressure of the gas in the supply line; represents the volume of the supply line; represents the gas constant of hydrogen; represents the gas constant of water vapor; c) hydrogen supply system; ; ; wherein represents the mass of air in the supply line; represents the air flow at the outlet of the air compressor; represents the air gas constant; represents the air flow supplied to the cathode chamber; represents the air thermal proportionality coefficient; represents the outlet temperature of the air compressor; represents the temperature of the supply line; d) heat balance analysis; ; represents the specific heat capacity of the stack; represents the specific mass of the stack; represents the operating temperature of the stack; represents the chemical energy stored in the reaction gas participating in the electrochemical reaction per unit time; represents the output power of the stack; represents the heat carried away by the gas not participating in the reaction per unit time; represents the heat carried away by the cooling water per unit time; represents the heat radiated by the stack to the environment per unit time.
5. The method of claim 1, wherein the method is based on deep learning. In step S2, the data cleaning includes cleaning the collected time series data to remove invalid or missing values, and then converting one-dimensional time series data into two-dimensional images using the Gramian angular field technique, with the following specific steps: Data standardization: Z-score standardization of each sensor time series data; Angle mapping: mapping the standardized data to the polar coordinate angle range [-π, π]; GAF matrix construction: constructing the Gramian angular matrix by calculating the cosine values between different time points; Image generation and splicing: converting the normalized GAF images generated by each sensor into grayscale images, and splicing the images of the nine sensors into a 288x288 pixel RGB image as the input of the subsequent neural network.
6. The method of claim 1, wherein the method is based on deep learning. In step S3, the specific operation of transfer learning includes loading the pre-trained ResNet50 weights on the ImageNet dataset, freezing the parameters of the front layers of the network, fine-tuning only the parameters of the back layers, and setting the learning rate to 0.0001.
7. The method according to claim 1, wherein the method is characterized by, In step S4, the training process uses a cross-entropy loss function and an Adam optimizer, the data set is divided into training set, validation set and test set in proportion, and the diagnostic performance is evaluated through the confusion matrix.