A method of estimating temperature within a fuel cell stack

By employing a two-stage stack temperature estimation method, combined with LSTM and UKF, the problem of difficulty in measuring stack temperature during fuel cell cold start-up is solved, achieving fast and accurate stack temperature estimation, which is applicable to commercial fuel cell systems.

CN117195670BActive Publication Date: 2026-06-26BEIJING INST OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING INST OF TECH
Filing Date
2023-09-11
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing fuel cell stack temperature measurement methods suffer from high costs, high space requirements, and inapplicability to commercial products during cold start-up. Furthermore, the embedded thermocouple method can affect stack performance and system integration, making it difficult to quickly and accurately estimate stack temperature.

Method used

A two-stage fuel cell stack temperature estimation method is adopted. In the first stage, the parameters of the fuel cell stack thermal model are identified by data such as the temperature and flow rate of the coolant entering and leaving the stack. In the second stage, the stack temperature is estimated by using the fusion method of LSTM and UKF. The fuel cell temperature model is established by combining the law of conservation of energy. The model is trained by generating input data sequences through LSTM and further reducing the estimation error by using UKF.

Benefits of technology

It enables rapid and accurate estimation of fuel cell stack temperature during cold start-up, improving the accuracy of temperature observation and system integration, reducing costs, and making it suitable for commercial products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117195670B_ABST
    Figure CN117195670B_ABST
Patent Text Reader

Abstract

The application provides a fuel cell stack temperature estimation method, comprising the following steps: S1. collecting fuel cell system cold start related data; S2. establishing a discretized temperature model of a fuel cell stack; S3. obtaining experimental data, and establishing a water pump and coolant model; S4. identifying model parameters by using an IPSO algorithm; S5. generating an input data sequence, training an LSTM model, and estimating the temperature of the stack; and S6. further reducing the estimation error by using an unscented Kalman filter. The application estimates the temperature of the stack without affecting the operation performance of the stack and the system integration, and has good robustness to environmental temperature changes and current load mutations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fuel cells, and in particular to a method for estimating the temperature inside a fuel cell stack. Background Technology

[0002] Proton exchange membrane fuel cells (PEMFCs) convert the chemical energy of reactants into electrical energy. They have advantages such as high specific energy density, high energy utilization rate, and low operating temperature. They are the main way to apply hydrogen energy in the field of vehicles and have broad prospects. However, they also face many challenges, such as adaptability to low-temperature environments.

[0003] The cold-start performance of a PEMFC stack is a key indicator of the low-temperature adaptability of a fuel cell system. Currently, cold-starting fuel cell systems faces numerous challenges, one of which is the difficulty in measuring the stack temperature during the cold start process. The temperature of the fuel cell stack directly affects its operating performance and is also a crucial indicator of cold start performance. Real-time acquisition of the stack temperature can be used for status assessment during the cold start process and is fundamental to further optimizing cold-start strategies.

[0004] Currently, there are two common methods for measuring the temperature of fuel cell stacks: the thermal imaging method and the embedded thermocouple method. The thermal imaging method uses a bracket to fix an infrared thermal imager at a certain distance above or to the side of the stack, obtaining the stack temperature through the infrared radiation energy of the stack. This method suffers from high cost, demanding requirements for fuel cell system space layout, and is not applicable to commercial products. The embedded thermocouple method places a thermocouple sensor at intervals between individual cells in the stack, measuring the temperature of each individual cell and taking the average as the stack temperature. Its problems include increasing the mass transfer resistance of the measured cells, thus reducing stack performance and affecting system integration. Therefore, during the cold start process of a fuel cell system, it is necessary to design a temperature observer that can quickly and accurately estimate the stack temperature using directly measurable parameters. Most existing temperature observers are designed for the operating temperature of the stack under different operating conditions, with little attention paid to the temperature during the cold start process. Furthermore, the stack temperature changes significantly during the cold start process, and is more complexly affected by factors such as coolant temperature. In summary, a two-stage stack temperature estimation method is proposed for the cold start strategy of PECFC systems with PTC-assisted heating. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a two-stage stack temperature estimation method for cold start strategies in PTC-assisted heating PEMFC systems. A simplified structural diagram of the PEMFC system addressed in this invention is shown below. Figure 1As shown, the system cold start is divided into two stages: In the first stage, the PTC heats the coolant in the small circulation loop, thereby heating the fuel cell stack, at which point the stack current is 0; in the second stage, after the coolant temperatures entering and leaving the stack reach the set temperature, the stack is charged with a small current to achieve self-heating and quickly reach the operating temperature. The PTC stops operating after the coolant temperatures entering and leaving the stack reach the calibrated values. In this stage, the coolant heats the stack in the early stage and cools the stack in the later stage. The estimation method of this invention identifies the thermal model parameters of the fuel cell stack in the first stage using data such as the temperature and flow rate of the coolant entering and leaving the stack; in the second stage, it estimates the stack temperature using measurable system data such as the temperature and flow rate of the coolant entering and leaving the stack, and the current and voltage of the stack, using a fusion method of LSTM and UKF.

[0006] The objective of this invention is achieved through the following technical solution: a method for estimating the temperature inside a fuel cell stack, comprising the following steps:

[0007] S1. Collect data related to the cold start of the fuel cell system.

[0008] S2. Establish a fuel cell temperature model based on the law of conservation of energy, and establish a discretized temperature model of the fuel cell stack;

[0009] Step S2 includes the following sub-steps:

[0010] S2.1. Establish a temperature model for the fuel cell stack based on the law of conservation of energy:

[0011]

[0012] Among them, C st M is the specific heat capacity of the fuel cell stack. st For the fuel cell stack mass, T st Q represents the stack temperature. tot P represents the chemical energy corresponding to the reactants. st Q represents the electrical power output of the fuel cell stack. cool Q is used to remove heat from the cooling water. rad This refers to the heat radiated by the fuel cell stack.

[0013] S2.2. Taking the discrete time interval Δt as 1s, the stack temperature model described in step S2.1 is discretized to obtain a discrete stack temperature model. In the first stage of identifying model parameters, since the stack temperature is an unknown quantity, the average value of the inlet and outlet coolant temperatures is used plus a small error ε. t This indicates the temperature of the fuel cell stack in the first stage.

[0014] The lumped-parameter temperature model for a fuel cell stack includes the following parameters: stack temperature rise, total chemical energy of the reactants, stack output electrical energy, heat entering the stack, and heat loss from the stack. Based on the data sampling time, the model is transformed into a discretized model concerning the outlet coolant temperature, using known temperatures plus the unknown quantity ε. t This indicates the temperature of the fuel cell stack; ε is determined after analysis. t The impact on model accuracy is 1%.

[0015] S3. Establish a water pump and coolant model based on experimental data, convert the measured water pump speed and pressure data into coolant flow data, and calculate the heat carried away / intake by the coolant.

[0016] Step S3 includes the following sub-steps:

[0017] S3.1. Measure the coolant flow rate of the water pump under different pressures and speeds through experiments;

[0018] S3.2. Fit the functional relationship between pump speed, pressure and flow rate based on the experimentally measured data points;

[0019] S3.3. Fit the data according to the density and specific heat capacity of the coolant at different temperatures;

[0020] S4. Based on the data from the first phase of system cold start, including the inlet and outlet coolant temperatures and flow rates, the IPSO algorithm with particle mutation was used to identify model parameters. A loss function was established by comparing the simulated outlet coolant temperature with the measured outlet temperature. Compared to PSO, IPSO increases the algorithm's global search capability, reducing the possibility of getting trapped in local optima; a forgetting factor related to time t was added to the objective function to reduce the error ε. t Impact on the accuracy of identification results.

[0021] S5. Generate the input data sequence, train the LSTM model, and estimate the stack temperature;

[0022] Step S5 includes the following sub-steps:

[0023] S5.1. Select input data using a fixed-length window that slides along the time axis, including reactor coolant temperature, current, voltage, and reactor coolant flow rate. Standardize the selected data to generate an input data sequence.

[0024] S5.2. Add a custom mechanistic model layer after the LSTM output layer. Input the data into the LSTM for training to obtain the stack temperature; then input the stack temperature into the mechanistic model layer, which outputs the coolant outlet temperature. Calculate the loss function by comparing this output temperature with the experimentally measured coolant outlet temperature.

[0025] S5.3. Configure LSTM model training parameters: number of iterations, learning rate, batch size, dropout ratio, etc., select MSE as the loss function, and use the Adam solver to update the model parameters in reverse.

[0026] S5.4. Validation model of coolant discharge temperature obtained only through forward transfer, with RMSE and MAE as validation metrics.

[0027] To maintain the time-series dependence of the data and ensure sufficient learning, a fixed-length window sliding along the time axis was used to select input data, including the infeed coolant temperature and flow rate, and the stack current and voltage. The selected data was standardized and then input into the LSTM model to train and obtain the stack temperature. The stack temperature was then input into the mechanism model layer, and the output was the outfeed coolant temperature. The loss function was calculated by comparing it with the experimentally measured outfeed coolant temperature, and the model parameters were updated in reverse. The learning rate was selected as 0.001, the dropout ratio as 0.2, the loss function as MSE, and the test metrics as RMSE and MAE.

[0028] S6. Use UKF to further reduce estimation error;

[0029] Step S6 includes the following sub-steps:

[0030] S6.1. Establish the state-space equation, use the stack temperature obtained by offline estimation of LSTM as the observation of the state equation, and estimate the stack temperature through UKF to further improve the accuracy of the estimation.

[0031] S6.2. Calculate the sampling points and weights, and predict the mean and observations of the state at the next time step.

[0032] S6.3. Calculate the Kalman gain, update the state variables and covariance matrix.

[0033] The stack temperature estimated by LSTM is input into the UKF observer as one of the observations.

[0034] This invention establishes a stack temperature model based on cold start experimental data of a targeted fuel cell engine system, identifies model parameters using first-stage data, estimates the stack temperature during the main start-up phase using LSTM, uses the LSTM estimation results as observations, and further improves the accuracy of the estimation results using UKF. Attached Figure Description

[0035] Figure 1 This is a simplified structural diagram of the fuel cell engine system targeted by the present invention;

[0036] Figure 2 A schematic diagram of a method for estimating temperature inside a fuel cell stack;

[0037] Figure 3This is a schematic diagram of the LSTM-UKF fusion estimation algorithm. Detailed Implementation

[0038] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings, but the scope of protection of the present invention is not limited to the following description.

[0039] like Figure 2 As shown, a method for estimating the temperature inside a fuel cell stack includes the following steps:

[0040] S1. Collect relevant data on the cold start of the fuel cell system; Figure 1 A -20℃ cold start experiment was conducted on the fuel cell system shown. Pressure and temperature sensors were placed at the locations shown in the figure to record the temperature and pressure of the coolant entering the stack, the temperature and pressure of the coolant exiting the stack, the stack current and voltage, and the water pump speed during the cold start process.

[0041] S2. Establish a discretized temperature model for the fuel cell stack;

[0042] Step S2 includes the following sub-steps:

[0043] S2.1. Establish a temperature model for the fuel cell stack based on the law of conservation of energy:

[0044]

[0045] The chemical energy Q of the reactants tot It can be calculated using the following formula:

[0046]

[0047] Where, N st I represents the number of individual cells in the fuel cell stack. st Let F be the fuel cell output current, F be the Faraday constant, and ΔH be the enthalpy of hydrogen. The fuel cell output power P is... st It can be calculated using the following formula:

[0048] P st =I st ·V st

[0049] Coolant removes heat Q cool It can be calculated using the following formula:

[0050]

[0051] Where, q cool ρ is the volumetric flow rate of the coolant. cool c is the density of the coolant. cool The specific heat capacity of the coolant. These are the temperatures of the coolant entering and exiting the reactor, respectively.

[0052] The heat radiated by the fuel cell stack to the outside is Q rad It can be calculated using the following formula:

[0053] Q rad =k rad ·(T st -T atm )

[0054] Where, k rad T is the thermal radiation coefficient of the fuel cell stack. atm The ambient temperature.

[0055] S2.2. Discretize the fuel cell temperature model described in step S2.1 to obtain a discrete fuel cell temperature model;

[0056] In the first stage of cold start, only the PTC preheats the fuel cell system by heating the coolant. During this stage, the stack current is zero, and the heat for the stack temperature rise comes from the coolant. Initially, the stack temperature is unknown and continuously changing, which can be represented by the following formula:

[0057]

[0058] Where, ε t The difference between the average temperature of the coolant entering and exiting the reactor and the actual temperature of the reactor stack is a relatively small variable. With the interval Δt set to 1 second, a discretized one-stage reactor stack temperature model is obtained:

[0059]

[0060] Among them, C st and k rad These are the parameters to be identified.

[0061] As can be seen from the discretized stack temperature model, the error ε t The impact on model accuracy is reflected in k. rad (1-ε t ) and ε t+1 -ε t For the first term, due to the thermal emissivity k... rad Smaller, 10 -3 The error is on the order of magnitude, therefore its impact on model accuracy is very low. Regarding the second term, due to the limited power of the PTC, the stack heats up slowly, with an average temperature rise rate of approximately 0.1℃ / s and a maximum temperature rise rate of approximately 0.5℃ / s. ε t The rate of change is low, therefore ε t+1 -ε t The impact on model accuracy is relatively low, with the average error during the rapid temperature rise phase calculated to be approximately 1%. In summary, the accuracy of the established discrete temperature model for the fuel cell stack can be maintained within a good range.

[0062] S3. By measuring the coolant flow rate of the water pump at different speeds and pressures, the relationship between the pump speed, pressure, and coolant flow rate is obtained through fitting:

[0063]

[0064] Where, n pump p is the pump speed (rpm). pump q represents the pump pressure (bar). cool denoted as , where is the volumetric flow rate (L / min) of the coolant pumped out by the water pump, and a1-a9 are the fitting parameters.

[0065] Because the coolant temperature varies significantly during system cold starts, coolant density and specific heat capacity cannot be considered constants but rather functions of temperature. Based on data fitting, the following results were obtained:

[0066] c cool =3.861×10 -3 T c +3.203

[0067] ρ cool = -2.483 × 10 -3 T c 2 -0.3373T c +1081

[0068] S4. Based on the experimental data from the first phase, the IPSO algorithm was used to identify the model parameters;

[0069] Data such as reactor coolant temperature and pump speed were obtained during the first stage, and an improved particle swarm optimization algorithm with added mutation factors was used to identify C. st and k rad Due to error ε t Given the characteristic that the rate of change is relatively large in the early stage and decreases in the later stage, in order to further reduce ε t The impact on model accuracy is shown by adding a forgetting factor to the objective function, as shown in the following equation:

[0070]

[0071] Where g is the forgetting factor, with a value of 0.98. Let t be the coolant outlet temperature calculated by the model at time t. The measured coolant outlet temperature at time t is denoted as t.

[0072] S5. Generate the input data sequence, train the LSTM model, and estimate the stack temperature;

[0073] LSTM (Long-Short Term Memory) networks are characterized by their ability to remember and forget, while avoiding the gradient explosion and vanishing problems of RNN networks. The experimentally obtained PEMFC stack data (current, voltage, etc.) and the temperature to be identified are both influenced by historical data and the current state, making LSTM algorithms suitable for estimation and prediction. The LSTM network combined with a mechanistic model used in this invention is as follows... Figure 3 As shown, it includes an input layer, a recurrent network layer, a fully connected layer, a mechanism model layer, and an output layer. Compared to a traditional LSTM, a mechanism model layer is added after the output layer. Its inputs are the infeed coolant temperature, current, voltage, and coolant flow rate, with the intermediate value being the stack temperature. The output is the coolant outlet temperature. Step S5 includes the following sub-steps:

[0074] S5.1. Obtain relevant data for the second stage of system cold start (injection coolant temperature, current, voltage, coolant flow rate), construct a window of fixed length L, slide the window along the time axis, combine data within the time step [k, k+L) into an input data sequence, and standardize the data. The standardization process is as follows:

[0075]

[0076] In the standardized processing corresponding to the fuel cell stack temperature, the minimum value is the minimum value of the coolant temperature, and the maximum value is the maximum value of the coolant temperature.

[0077] S5.2. Build an LSTM model using PyTorch, setting the model parameters as follows: number of iterations (epochs) = 150, base learning rate (lr) = 0.001, batch size (batch_size) = 64, and dropout rate (dropout_rate) = 0.2. Input the standardized input data sequence into the model to begin training. Calculate the mean-square error (MSE) between the model's output coolant discharge temperature and the experimentally measured value.

[0078]

[0079] in, T represents the coolant outlet temperature output by the LSTM. out The measured coolant outlet temperature is denoted as . During backpropagation, the Adam optimizer is used to update the weights and biases of the neural network based on the gradient of the loss function, minimizing the total loss.

[0080] S5.3. After model training is complete, evaluate model performance using test set data. Standardize the test set data using the same method and input it. Obtain the coolant outlet temperature only through forward propagation. Use root mean-squared error (RMSE) and mean absolute error (MAE) as evaluation metrics for model performance.

[0081]

[0082]

[0083] S6 utilizes an unscented Kalman filter to further reduce estimation errors. LSTM estimates the stack temperature using an open-loop forward pass method without feedback correction. When the battery current changes abruptly, the stack temperature estimation is prone to large errors, and the estimated value has high volatility. UKF is used to further improve the accuracy of temperature estimation, and the stack temperature estimated by LSTM is used as one of the observations in the state equation. Step S6 includes the following sub-steps:

[0084] S6.1. Establish the state-space equations

[0085] Discretize the thermal model of the fuel cell stack:

[0086] C st M st (T st,k+1 -T st,k )=Q tot (k)-P st (k)-Q cool (k)-Q rad (k)

[0087] Establish the state-observation equation:

[0088]

[0089] Wherein, state variable X = [T st ,T out ], control quantity u = [I st V st ,q cool ,T in ], observation w k ,v k These are process noise and observation noise, respectively.

[0090] Determine the UKF algorithm parameters: α = 0.01, β = 2, n = 2.

[0091] S6.2. Calculate the sampling points and weights, and predict the state mean, variance, and observations;

[0092] Calculate the sampling points at time k:

[0093]

[0094] Calculate the weights:

[0095]

[0096] Predict the mean and variance of the state at the next time step:

[0097]

[0098] Predicted observations:

[0099]

[0100] S6.3. Calculate the Kalman gain, update the state variables and covariance matrix;

[0101] Calculate the Kalman gain:

[0102]

[0103] Update the state estimate and covariance matrix:

[0104]

[0105] Based on the experimentally obtained data, the stack temperature was estimated using the aforementioned UKF algorithm.

[0106] The above description represents preferred embodiments of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in other combinations, modifications, and environments, and can be modified within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A method for estimating temperature within a fuel cell stack, characterized in that, Includes the following steps: S1. Collect data related to the cold start of the fuel cell system; The aforementioned data related to the cold start of the fuel cell system includes the temperature of the infeed coolant, the pressure of the infeed coolant, the temperature of the outfeed coolant, the stack current, the stack voltage, and the pump speed. S2. Establish a discretized temperature model for the fuel cell stack; The lumped-parameter temperature model for a fuel cell stack includes the following parameters: stack temperature rise, total chemical energy of the reactants, stack output electrical energy, heat entering the stack, and heat loss from the stack. Based on the data sampling time, the model is transformed into a discretized model concerning the outlet coolant temperature, using known temperatures plus unknowns. This indicates the temperature of the fuel cell stack, determined after analysis. The impact on model accuracy is 1%; S3. Obtain experimental data and establish models of the water pump and coolant; Includes the following sub-steps: S3.

1. Measure the coolant flow rate of the water pump at different speeds and pressures; S3.

2. Fit the functional relationship between water pump speed, pressure and coolant flow rate; S3.

3. Fit the relationship between coolant density, heat capacity and temperature respectively; A water pump model was established using experimental data, and the functional relationship between water pump pressure, speed and coolant flow rate was obtained by fitting. The water pump speed and pressure data in the experimental data were then converted into coolant flow rate. S4. Identify the parameters of the discretized stack temperature model using the IPSO algorithm: specific heat capacity of the stack. and thermal emissivity ; S5. Generate the input data sequence, train the LSTM model, and estimate the stack temperature; Input data, including in-reactor coolant temperature and flow rate, stack current and voltage, are selected using a fixed-length window that slides along the time axis. The selected data is then standardized and input into an LSTM model to train and obtain the stack temperature. The stack temperature is then input into the mechanism model layer, and the output is the out-of-reactor coolant temperature. The loss function is calculated by comparing the out-of-reactor coolant temperature with the experimentally measured out-of-reactor coolant temperature, and the model parameters are updated in reverse. S6. Further reduce the estimation error by using an unscented Kalman filter; use the LSTM-estimated stack temperature as one of the observations in the state equation and use the UKF algorithm to estimate the stack temperature.

2. The method for estimating the temperature inside a fuel cell stack according to claim 1, characterized in that, Step S2 includes the following sub-steps: S2.

1. Establish a temperature model for the fuel cell stack based on the law of conservation of energy; S2.

2. Discretize the temperature model.

3. The method for estimating the temperature inside a fuel cell stack according to claim 1, characterized in that, In step S4, the model parameters are identified using the IPSO algorithm with added particle mutation, and a forgetting factor related to time t is added to the objective function.

4. The method for estimating the temperature inside a fuel cell stack according to claim 1, characterized in that, Step S5 includes the following sub-steps: S5.

1. Construct a fixed-time-length window to select data, standardize the selected data, and generate an input data sequence; S5.

2. Establish an LSTM training model with an added physical model layer; S5.

3. Configure model training parameters, select loss function and solver; S5.

4. Select metrics to validate the trained model.

5. The method for estimating the temperature inside a fuel cell stack according to claim 4, characterized in that, The learning rate was set to 0.001, the dropout ratio to 0.2, the loss function to MSE, and the test metrics to RMSE and MAE.

6. The method for estimating the temperature inside a fuel cell stack according to claim 1, characterized in that, Step S6 includes the following sub-steps: S6.

1. Establish the state-space equations; S6.

2. Predict the state mean, variance, and observations; S6.

3. Update the state variables and covariance matrix.