A Proton Exchange Membrane Fuel Cell Fault Diagnosis Method Based on Transfer Learning
Through a transfer learning method, the UMAP algorithm is used to reduce the dimensionality and build a TimesNet model to troubleshoot the labelless data, solving the problem of low diagnostic efficiency caused by incomplete data labels and lack of fault data in the existing technology, and achieving efficient and accurate fuel cell fault diagnosis.
Patent Information
- Application Number
- CN202410942557.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-07-15
AI Technical Summary
In the case of incomplete data labels and a large number of PEMFC fault data, it is difficult to accurately diagnose proton exchange membrane fuel cell failure.
Using a transfer learning method, the source domain high-dimensional PEMFC dataset and the target domain labeled dataset are constructed, the UMAP algorithm is used to reduce the dimensions, the TimesNet model is built, and the model parameters are fine-tuned through transfer learning to achieve fault diagnosis of labelless data.
It improves the efficiency and applicability of PEMFC fault diagnosis, and can accurately diagnose fuel cell failures in the absence of a large amount of fault data and labeled data.
Smart Images

Figure CN118919778B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of fuel cells, and in particular relates to a proton exchange membrane fuel cell fault diagnosis method based on transfer learning. Background Art
[0002] In recent years, fuel cell technology has experienced rapid development as energy crises and environmental pollution become increasingly severe. Proton exchange membrane fuel cells (PEMFCs) offer broad application prospects due to their high energy conversion efficiency, environmental friendliness, low noise levels, and excellent compatibility and integration with other vehicle subsystems. Therefore, the ability to accurately and quickly detect PEMFC faults during operation is crucial.
[0003] Currently, the main fault diagnosis methods at home and abroad fall into two categories: model-based and data-driven. These methods leverage key sensor-monitored parameter data and historically stored data, incorporating artificial intelligence and other technologies to mine fault signature information for accurate diagnosis of system faults. Traditional diagnostic methods include RF, ELM, and SVM. However, these methods rely heavily on the completeness of data labels and the consistency of data distribution, requiring large fault datasets to train the fault diagnosis models. In most practical application scenarios, the use of a large number of sensors can lead to biased data due to the difficulty or prohibitive cost of obtaining data labels, and the complex and diverse operating conditions of PEMFC fuel cells under different loads. These issues result in suboptimal and inaccurate fault diagnosis results from traditional data-driven methods. Therefore, a method is urgently needed to accurately diagnose proton exchange membrane fuel cell faults even in the presence of incomplete data labels and a lack of extensive PEMFC fault data. Summary of the Invention
[0004] Purpose of the invention: The present invention proposes a proton exchange membrane fuel cell fault diagnosis method based on transfer learning, which solves the problem of poor performance of the fault diagnosis model caused by the difficulty in obtaining data labels and the lack of fault data sets, and improves the PEMFC diagnosis efficiency and applicability.
[0005] Technical solution: The present invention provides a method for fault diagnosis of a proton exchange membrane fuel cell based on transfer learning, comprising the following steps:
[0006] (1) Construct a high-dimensional PEMFC dataset in the source domain and a labeled PEMFC dataset in the current target domain, corresponding to different fault states of PEMFC;
[0007] (2) The source domain high-dimensional PEMFC data and the current target domain PEMFC data are used as the input of the uniform manifold approximation and projection algorithm UMAP, respectively, to reduce the dimensionality of the high-dimensional data set and remove the influence of redundant information;
[0008] (3) Divide the dataset and build a TimesNet model diagnostic framework;
[0009] (4) The high-dimensional PEMFC data after dimensionality reduction is used as the source domain of the TimesNet model for pre-training;
[0010] (5) Using a small amount of labeled data from the current target domain PEMFC, the parameters of the TimesNet model are fine-tuned through transfer learning to obtain the final diagnostic model;
[0011] (6) For the unlabeled data of the fuel cell to be diagnosed, the same sensor working signal acquisition method as the labeled data set is used to input the PEMFC data set collected by the current sensor into the TimesNet diagnostic model for classification to obtain different working states of the PEMFC.
[0012] Furthermore, the source domain high-dimensional PEMFC data in step (1) includes voltage, current, temperature, and concentration of the cathode and anode of the proton exchange membrane fuel cell.
[0013] Furthermore, the source domain high-dimensional PEMFC dataset in step (1) is S s :
[0014] S s ={(x n,i ,y n,i ),x n,i ∈A n ,y n,i ∈B n} (1)
[0015] Among them, A n Represents a labeled dataset S s The working signal data sample set of the fuel cell, x n,i Represents the working signal data sample set A n The i-th working signal data sample in B n Represents a labeled dataset S s The health status label set of the fuel cell in y n,i Represents the working signal data sample x n,i The corresponding health status label.
[0016] Furthermore, the implementation process of step (2) is as follows:
[0017] For the input dataset {x1,…,x1,…,xn} for each x i ,γ is a given hyperparameter, define θ i and δ i :
[0018]
[0019] Among them, θ i The choice should ensure that there is at least one data point with an edge weight of 1 and x i Connected, δ i is the length scale parameter, x n Indicates the number of samples in the data set, d(x i ,x j ) represents the sample point x i and its neighboring point x j the distance between them;
[0020] Define a directed weighted graph use The symmetric property of defines an undirected weighted graph Z; let B be the weighted adjacency matrix of Z, and we get a symmetric matrix D:
[0021]
[0022] Among them, the undirected weighted neighborhood graph Z is defined using the adjacency matrix D. is the Hadamard product;
[0023] UMAP applies attraction and repulsion along the boundaries and vertices respectively to evolve a point set {f i The cross entropy metric is used to calculate the difference between the weighted neighborhood graphs Z and H, so that the topological structure of the source data captured by H and Z matches, thereby obtaining a low-dimensional representation of the overall topology of the data.
[0024] Furthermore, the implementation process of step (3) is as follows:
[0025] The dataset is divided into training set and test set, the first 80% is the training set and the last 20% is the test set; TimesNet consists of stacked TimesBlocks, and the input sequence is embedded in the layer to obtain deep features. For the time block of the lth layer, the input is Then, 2D convolution is used to extract the two-dimensional temporal changes:
[0026]
[0027] The original one-dimensional time series data X is converted into 1D Fold according to the following formula:
[0028]
[0029] Where, is the two-dimensional tensor after the i-th transformation, Padding(X 1D ) Pad the end of the sequence with zeros to align it so that the sequence length can be i divisible by Indicates that the one-dimensional sequence data after zero filling is reshaped and deformed, f i Indicates the corresponding X 1D The frequency, P i For the corresponding X 1D cycle.
[0030] Furthermore, the specific process of the time block is as follows: Convert one dimension into two dimensions: First, the input one-dimensional time series feature Extract the period and convert it into a two-dimensional tensor to represent the two-dimensional time series changes;
[0031] Extracting 2D temporal change representation: For 2D tensors, due to their 2D locality, the Inception model is used to extract information, namely:
[0032]
[0033] Convert two-dimensional to one-dimensional: For the extracted temporal features, convert them back to one-dimensional space for information aggregation:
[0034]
[0035] Where, Indicates that Padding(X 1D ) The 0 added by the operation is removed;
[0036] Adaptive fusion: One-dimensional representation The final output is obtained by weighted summation according to the corresponding frequency:
[0037]
[0038] in, Indicates the corresponding X 1D The amplitude of , Softmax() represents the Softmax classifier, Represents the output after the Softmax classifier.
[0039] Furthermore, the implementation process of step (4) is as follows:
[0040] The TimesNet model is used to perform Fourier transform on PEMFC data, extending the analysis of time series signals to two-dimensional space and reconstructing one-dimensional data into a two-dimensional tensor to obtain two-dimensional changes in time. Before selection, the harmonic information in the input data, including amplitude, frequency and period length, is obtained through Fourier transform.
[0041] According to the selected frequency and cycle length, the Padding layer is used to zero-extend the time series signal along the time dimension, and reconstruct the one-dimensional time series signal into multiple two-dimensional tensors;
[0042] TimesBlock, based on TimesNet, captures the various time changes of k different reconstructed tensors and performs adaptive aggregation to effectively extract signal features and reconstruct one-dimensional time series signals. It also uses an adaptive fusion learning model for state recognition and fault classification.
[0043] For fault classification, a cross entropy loss function is defined. By training the fault diagnosis source domain model based on TimesNet, the optimal parameters of the network are obtained to minimize the error of the loss function. The lower the p1 in the loss function, the better the diagnosis effect:
[0044]
[0045] Among them, ρ(x) represents the output result of Softmax in TimesNet, and its target value is σ(x).
[0046] Furthermore, the implementation process of step (5) is as follows:
[0047] When the target domain PEMFC data is input into the deep transfer learning model, the TimesNet model first trains the shallow structure based on the source domain data to extract shallow features. At this time, the shallow structure of the target domain will be frozen;
[0048] At the same time, the parameters of the trained TimesNet model are shared with the deep structure of the target domain to extract deep features for initialization. At this time, the deep structure parameters will be adjusted to achieve the final classification and recognition of the input PEMFC data;
[0049] After extracting the deep features of the target domain data, the convolutional layer of the deep transfer model operates on its features to obtain signal classification and recognition results;
[0050] The results are input into the fully connected layer Dense layer of the TimesNet model, and the loss function is set in the fully connected layer of the transfer learning model to obtain a model with high accuracy in fault identification.
[0051] Furthermore, the loss function is the joint maximum mean difference (JMMD) to measure the distribution difference between the source domain and the target domain, and to measure the error between the recognition result and the expected result to control the result accuracy. The JMMD loss function is:
[0052]
[0053] Among them, E P and E Q are the expectations of the source domain P and the target domain Q, respectively. Represents the feature map of the source domain data in the Hilbert space, is the feature map of the target domain data in the Hilbert space, |L| represents the number of layers, h1 and h2 represent the activations generated by the source and target domains, and H l Representing the reproducing kernel Hilbert space of the lth layer of the model, embedding the loss function into the transfer learning model, the model loss function is obtained as:
[0054] p0=p1+λp JMMD (12)
[0055] Among them, p0 represents the loss function of the entire transfer learning network model, p1 represents the classification loss function of the fault data source domain, and λ represents the trade-off parameter of the JMMD function.
[0056] Furthermore, the different working states of the PEMFC in step (6) are PEMFC normal, membrane dry and water flooded.
[0057] Beneficial effects: Compared with the prior art, the present invention has the following beneficial effects:
[0058] 1. To address the scarcity of labeled PEMFC fault sample datasets, this paper learns the TimesNet model on a source domain dataset, then fine-tunes and migrates the model to the target domain dataset under the working conditions to be diagnosed for fault diagnosis. This method efficiently and accurately processes unlabeled signal data, solving the problems of scarce PEMFC fault datasets and difficulty in obtaining labeled fault data.
[0059] 2. The present invention first defines a cross-entropy loss function for the results of source domain fault diagnosis to better train the model. At the same time, a joint maximum mean difference function is set in the transfer learning model to measure the distribution difference between the source domain and the target domain. In the final model loss function, the cross-entropy loss function defined in the source domain and the JMMD function used in transfer learning are combined to obtain a model with high accuracy and strong applicability for fault identification.
[0060] 3. In view of the large amount of data and high complexity of the collected 26-dimensional fault data set, the present invention uses the UMAP method to reduce the dimensionality of the labeled high-dimensional data in the source domain and the target domain, eliminating the influence of invalid signals on the model accuracy and effectively reducing the input dimension and complexity. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 is a flow chart of the present invention;
[0062] Figure 2 This is a structural diagram of the TimesNet diagnostic model provided by the present invention. DETAILED DESCRIPTION
[0063] The present invention will be described in further detail below with reference to the accompanying drawings.
[0064] like Figure 1 As shown, the present invention proposes a proton exchange membrane fuel cell fault diagnosis method based on transfer learning, and the specific steps are as follows:
[0065] Step 1: Construct a high-dimensional dataset in the source domain and a small number of labeled datasets collected by the current target domain PEMFC, including a 26-dimensional dataset of voltage, current, temperature, concentration, etc. collected by sensors at the cathode and anode, corresponding to different fault states of PEMFC.
[0066] The obtained labeled high-dimensional dataset is denoted as S s :
[0067] S s ={(x n,i ,y n,i ),x n,i ∈A n ,y n,i ∈B n}(1)
[0068] Among them, A n Represents a labeled dataset S s The working signal data sample set of the fuel cell, x n,i Represents the working signal data sample set A n The i-th working signal data sample in B n Represents a labeled dataset S s The health status label set of the fuel cell in y n,i Represents the working signal data sample x n,i The corresponding health status label.
[0069] Step 2: The large amount of high-dimensional PEMFC data and the small amount of labeled data collected from the current target domain PEMFC are used as input to the Uniform Manifold Approximation and Projection algorithm (UMAP) to reduce the dimensionality of the high-dimensional data set and remove the influence of redundant information.
[0070] The dimensionality reduction of the PEMFC high-dimensional dataset was performed using UMAP. UMAP is based on the theoretical framework of Riemannian geometry and algebraic topology and can retain the characteristics of the original data to the greatest extent while reducing the feature dimension. The UMAP steps are as follows:
[0071] For the input dataset {x1,…,x1,…,x n} for each x i ,γ is a given hyperparameter, define θ i and δ i :
[0072]
[0073] Among them, θ i The choice should ensure that there is at least one data point with an edge weight of 1 and x i Connected, δ i is the length scale parameter, x n Indicates the number of samples in the data set, d(x i ,x j ) represents the sample point x i and its neighboring point x j The distance between them.
[0074] Define a directed weighted graph use The symmetric properties of define an undirected weighted graph Z. Let C be the weighted adjacency matrix of Z, and we can get a symmetric matrix D:
[0075]
[0076] Among them, the undirected weighted neighborhood graph Z is defined using the adjacency matrix D. is the Hadamard product.
[0077] UMAP applies attraction and repulsion along the boundaries and vertices respectively to evolve a point set {f i The cross entropy metric is used to calculate the difference between the weighted neighborhood graphs Z and H, so that the topological structure of the source data captured by H and Z can be matched, thereby obtaining a low-dimensional representation of the overall topology of the data.
[0078] Step 3: Divide the dataset and build the TimesNet diagnostic framework, a basic time series model.
[0079] The dataset is divided into training and test sets, with the first 80% being the training set and the last 20% being the test set. TimesNet consists of stacked time blocks called TimesBlocks. The input sequence is passed through an embedding layer to obtain deep features. The construction steps include:
[0080] For the time block of layer l, the input is Then, 2D convolution is used to extract the two-dimensional temporal changes:
[0081]
[0082] The original one-dimensional time series data X is converted into 1D Fold according to the following formula:
[0083]
[0084] in, is the two-dimensional tensor after the i-th transformation, Padding(X 1D ) Pad the end of the sequence with zeros to align it so that the sequence length can be i divisible, Indicates that the one-dimensional sequence data after zero filling is reshaped and deformed, f i Indicates the corresponding X 1D The frequency, P i For the corresponding X 1D cycle.
[0085] The specific process of the time block is as follows:
[0086] Convert one dimension into two dimensions: First, the one-dimensional time series features of the input Extract the period and convert it into a two-dimensional tensor to represent the two-dimensional temporal changes.
[0087] Extracting two-dimensional temporal change representation: For two-dimensional tensors, due to their two-dimensional locality, this study used the Inception model to extract information, namely:
[0088]
[0089] Convert two-dimensional to one-dimensional: For the extracted temporal features, convert them back to one-dimensional space for information aggregation:
[0090]
[0091] Where, Indicates that Padding(X 1D) operation to remove the added 0.
[0092] Adaptive fusion: One-dimensional representation The final output is obtained by weighted summation according to the corresponding frequency:
[0093]
[0094] in, Indicates the corresponding X 1D The amplitude of , Softmax() represents the Softmax classifier, Represents the output after the Softmax classifier.
[0095] Step 4: Use the reduced high-dimensional PEMFC data as the TimesNet model source domain and pre-train it to obtain a trained TimesNet pre-diagnosis model, including:
[0096] The TimesNet model is used to perform Fourier transform on PEMFC data, extending the analysis of time series signals to two-dimensional space and reconstructing one-dimensional data into a two-dimensional tensor to obtain two-dimensional changes in time. Before selection, the harmonic information in the input data is obtained through Fourier transform, including amplitude, frequency and period length.
[0097] According to the selected frequency and cycle length, the Padding layer is used to zero-extend the time series signal along the time dimension and reconstruct the one-dimensional time series signal into multiple two-dimensional tensors.
[0098] TimesBlock, based on TimesNet, captures the various temporal variations of k different reconstructed tensors and performs adaptive aggregation to effectively extract signal features and reconstruct a one-dimensional time series signal. An adaptive fusion learning model is used for state recognition and fault classification.
[0099] For fault classification, a cross entropy loss function is defined. A TimesNet-based fault diagnosis source domain model is established for training. The optimal parameters of the network are obtained by testing the diagnosis model, minimizing the loss function error and obtaining a pre-diagnosis model. The lower the p1 in the loss function, the better the diagnosis effect. The p1 formula is:
[0100]
[0101] Among them, ρ(x) represents the output result of Softmax in TimesNet, and its target value is σ(x).
[0102] Step 5: Use the small amount of labeled data of the target domain collected by the current PEMFC to extract features through UMAP. Then divide the labeled data of the target domain into the training set and the test set. Then fine-tune the parameters of the TimesNet model through transfer learning. The constructed transfer learning mainly includes the input layer, convolutional layer, fully connected layer and output layer. The migration process includes the following steps:
[0103] When the target domain PEMFC data is input into the deep transfer learning model, the TimesNet model first trains the shallow structure based on the source domain data to extract shallow features. At this time, the shallow structure Dropout layer and Norm Layer of the target domain will be frozen.
[0104] At the same time, the parameters of the trained TimesNet model are shared with the deep structure of the target domain to extract deep features for initialization. At this time, the deep structure parameters will be adjusted to achieve the final classification and recognition of the input PEMFC data.
[0105] After extracting the deep features of the target domain data, the convolutional layer of the deep transfer model operates on its features to obtain signal classification and recognition results.
[0106] The result is input into the fully connected layer Dense layer of the TimesNet model, and the loss function is set in the fully connected layer of the transfer learning model. Specifically, JMMD is used to measure the distribution difference between the source domain and the target domain, and the error between the recognition result and the expected result is measured to control the result accuracy. The JMMD loss function is:
[0107]
[0108] Among them, E P and E Q are the expectations of the source domain P and the target domain Q, respectively. Represents the feature map of the source domain data in the Hilbert space, is the feature map of the target domain data in the Hilbert space, |L| represents the number of layers, h1 and h2 represent the activations generated by the source and target domains, and H l Denotes the reproducing kernel Hilbert space of the lth layer of the model. The loss function of the above formula is embedded into the transfer learning model. Combined with the loss function of the source domain diagnosis model, the model loss function can be finally obtained as:
[0109] p0=p1+λp JMMD (12)
[0110] Among them, p0 represents the loss function of the entire transfer learning network model, p1 represents the classification loss function of the fault data source domain, and λ represents the trade-off parameter of the JMMD function.
[0111] By setting the loss function and fine-tuning the diagnostic network model, we can finally obtain a model that can identify faults with high accuracy.
[0112] Step 6: For the unlabeled data of the fuel cell to be diagnosed, the same sensor working signal acquisition method as the labeled data set is used. The PEMFC data set collected by the current sensor is input into the trained TimesNet diagnostic model for classification. The three working states of PEMFC can be obtained: normal, membrane dry, and flooded.
[0113] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. They are not intended to limit the scope of protection of the present invention. Any equivalent changes or modifications made in accordance with the spirit of the present invention are intended to be covered by the scope of protection of the present invention.
Claims
1. A proton exchange membrane fuel cell fault diagnosis method based on transfer learning, characterized in that: The following steps are involved: (1) Construct a high-dimensional PEMFC dataset in the source domain and a labeled PEMFC dataset in the current target domain, corresponding to different fault states of PEMFC; (2) The source domain high-dimensional PEMFC data and the current target domain PEMFC data are used as the input of the uniform manifold approximation and projection algorithm UMAP to reduce the dimensionality of the high-dimensional data set and remove the influence of redundant information; (3) Divide the data set and build a TimesNet model diagnostic framework; (4) The high-dimensional PEMFC data after dimensionality reduction is used as the source domain of the TimesNet model for pre-training; (5) Using a small amount of labeled data from the current target domain PEMFC, the parameters of the TimesNet model are fine-tuned through transfer learning to obtain the final diagnostic model; (6) For the unlabeled data of the fuel cell to be diagnosed, the same sensor working signal acquisition method as the labeled data set is used to input the PEMFC data set collected by the current sensor into the TimesNet diagnosis model for classification, and the different working states of the PEMFC are obtained; The implementation process of step (3) is as follows: The dataset is divided into training set and test set, the first 80% is the training set and the last 20% is the test set; TimesNet consists of stacked TimesBlocks, and the input sequence is embedded in the layer to obtain deep features. For the time block of the lth layer, the input is Then, 2D convolution is used to extract the two-dimensional temporal changes: The original one-dimensional time series data X is converted into 1D Fold according to the following formula: In the formula, is the 2D tensor after the i-th transformation, Padding(X 1D ) pads the end of the sequence with zeros to align it so that the sequence length can be i Divisible by Reshape the one-dimensional sequence data after zero padding. i Indicates the corresponding X 1D The frequency, P i For the corresponding X 1D cycle; The specific process of the time block is as follows: Convert one dimension into two dimensions: First, the input one-dimensional time series feature Extract the period and convert it into a two-dimensional tensor to represent the two-dimensional time series changes; Extracting two-dimensional temporal change representation: For two-dimensional tensors, due to their two-dimensional locality, the Inception model is used to extract information, namely: Transform two dimensions to one dimension: For the extracted temporal features, transform them back to one-dimensional space for information aggregation: In the formula, Indicates that Padding(X 1D ) The 0 added by the operation is removed; Adaptive Fusion: Representing One Dimension The final output is obtained by weighted summing according to the corresponding frequency: in, Indicates the corresponding X 1D The magnitude of , Softmax() represents the Softmax classifier, Represents the output after the Softmax classifier.
2. According to the method for proton exchange membrane fuel cell fault diagnosis based on transfer learning described in claim 1, it is characterized in that: The source domain high-dimensional PEMFC data in step (1) includes the voltage, current, temperature, and concentration of the cathode and anode of the proton exchange membrane fuel cell.
3. According to the method for proton exchange membrane fuel cell fault diagnosis based on transfer learning described in claim 1, it is characterized in that: The source domain high-dimensional PEMFC dataset in step (1) is S s : S s ={(x n,i ,and n,i ),x n,i ∈A n ,and n,i ∈B n }(1) Among them, A n represents the working signal data sample set of the fuel cell in the labeled data set, x n,i Represents the working signal data sample set A n The i-th working signal data sample in B n Represents the health status label set of the fuel cell in the labeled dataset, y n,i Represents the working signal data sample x n,i The corresponding health status label.
4. According to the method for proton exchange membrane fuel cell fault diagnosis based on transfer learning described in claim 1, it is characterized in that: The implementation process of step (2) is as follows: For the input data set {x1,…,x1,…,x n } for each x i , γ is a given hyperparameter, define θ i and δ i : Among them, θ i The choice of must ensure that there is at least one data point with an edge weight of 1 with x i Connected, δ i is the length scale parameter, x n represents the number of samples in the data set, d(x i ,x j ) represents the sample point x i and its neighboring point x j The distance between Defining a directed weighted graph use The symmetric property of defines an undirected weighted graph Z; let B be the weighted adjacency matrix of Z, and we get a symmetric matrix D: Among them, the undirected weighted graph Z is defined using the symmetric matrix D. is the Hadamard product; UMAP applies gravitational and repulsive forces along the boundaries and vertices to evolve a point set {f i The cross entropy metric is used to calculate the difference between the undirected weighted graphs Z and H, so that the topological structure of the source data captured by H and Z matches, thereby obtaining a low-dimensional representation of the overall topology of the data.
5. According to the method for proton exchange membrane fuel cell fault diagnosis based on transfer learning described in claim 1, it is characterized in that: The implementation process of step (4) is as follows: The TimesNet model is used to perform Fourier transform on PEMFC data, expand the analysis of time series signals to two-dimensional space, reconstruct one-dimensional data into two-dimensional tensors, and thus obtain two-dimensional changes in time. Before selection, the harmonic information in the input data is obtained by Fourier transform, including amplitude, frequency and cycle length; According to the selected frequency and cycle length, the Padding layer is used to zero-expand the time series signal along the time dimension, and the one-dimensional time series signal is reconstructed into multiple two-dimensional tensors; TimesBlock based on TimesNet captures various time changes of k different reconstruction tensors and performs adaptive aggregation to effectively extract signal features and reconstruct one-dimensional time series signals; an adaptive fusion learning model is used for state recognition and fault classification; For fault classification, a cross entropy loss function is defined. By training the fault diagnosis source domain model based on TimesNet, the optimal parameters of the network are obtained to minimize the classification loss function error. The lower the p1 in the classification loss function, the better the diagnosis effect: Among them, ρ(x) represents the output result of Softmax in TimesNet, and its target value is σ(x).
6. According to the method for proton exchange membrane fuel cell fault diagnosis based on transfer learning as described in claim 1, it is characterized in that: The implementation process of step (5) is as follows: When the target domain PEMFC data is input into the deep transfer learning model, the TimesNet model first trains the shallow structure based on the source domain data to extract shallow features. At this time, the shallow structure of the target domain will be frozen; At the same time, the parameters of the trained TimesNet model are shared with the deep structure of the target domain to extract deep features for initialization. At this time, the deep structure parameters will be adjusted to achieve the final classification and recognition of the input PEMFC data; After extracting the deep features of the target domain data, the convolutional layer of the deep transfer model operates on its features to obtain signal classification and recognition results; The results are input into the fully connected layer Dense layer of the TimesNet model, and the JMMD loss function is set in the fully connected layer of the transfer learning model to obtain a model with higher accuracy in fault identification.
7. A proton exchange membrane fuel cell fault diagnosis method based on transfer learning according to claim 6, characterized in that: The JMMD loss function is the joint maximum mean difference (JMMD) to measure the distribution difference between the source domain and the target domain, and to measure the error between the recognition result and the expected result to control the result accuracy; the JMMD loss function is: Among them, E P and E Q are the expectations of the source domain P and the target domain Q, respectively. Represents the feature map of the source domain data in the Hilbert space, is the feature map of the target domain data in the Hilbert space, |L| represents the number of layers, h1 and h2 represent the activations generated by the source and target domains, and H l Represents the reproducing kernel Hilbert space of the lth layer of the model, embeds the JMMD loss function into the transfer learning model, and obtains the model loss function as follows: p0=p1+λp JMMD (12) Where p0 represents the loss function of the entire transfer learning network model, p1 represents the classification loss function of the fault data source domain, and λ represents the trade-off parameter of the JMMD loss function.
8. According to the method for proton exchange membrane fuel cell fault diagnosis based on transfer learning as described in claim 1, it is characterized in that: The different working states of the PEMFC in step (6) are normal PEMFC, membrane dry and water flooded.
Citation Information
Patent Citations
Fault diagnosis method and system for proton exchange membrane fuel cell integrated system
CN116187195A
KR20230036778A