Fuel cell control method and system based on model predictive control
20220045343 · 2022-02-10
Inventors
Cpc classification
H01M8/04992
ELECTRICITY
H01M8/04395
ELECTRICITY
H01M8/04313
ELECTRICITY
H01M8/04365
ELECTRICITY
H01M2250/20
ELECTRICITY
H01M8/04776
ELECTRICITY
Y02E60/50
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
H01M8/04425
ELECTRICITY
Y02T90/40
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
International classification
H01M8/04992
ELECTRICITY
Abstract
A fuel cell control method and system based on model prediction control are provided. The method includes: (1) obtaining data required for control; (2) determining whether the data required for control are received completely; (3) estimating an internal state of a fuel cell based on outlet pressure of an air compressor and a voltage of the fuel cell to obtain a state estimation result; (4) calculating a target outlet flow of the air compressor and a target current of the fuel cell with a model prediction control algorithm based on the state estimation result; (5) calculating a control voltage of the air compressor, and a target outlet flow of the air compressor; and (6) tracking power of the fuel cell based on the target current of the fuel cell, and controlling air supply of the fuel cell based on the control voltage of the air compressor.
Claims
1. A fuel cell control method based on model prediction control, comprising the following steps: S1: obtaining data required for control, wherein the data required for control comprise required power for a fuel cell system, a rotational speed of an air compressor, outlet pressure of the air compressor, temperature of a fuel cell, gas pressure of a cathode inlet of the fuel cell, gas pressure of a cathode outlet of the fuel cell, a voltage of the fuel cell, and a current of the fuel cell; S2: determining whether the data required for control are received completely, and under a condition that the data required for control are received completely, proceeding to step S3, otherwise proceeding to step S1; S3: estimating an internal state of the fuel cell based on the outlet pressure of the air compressor and the voltage of the fuel cell to obtain a state estimation result, wherein the internal state comprises pressure and partial pressure of oxygen of the cathode of the fuel cell; S4: calculating a target outlet flow of the air compressor and a target current of the fuel cell with a model prediction control algorithm based on the state estimation result; S5: calculating a control voltage of the air compressor based on the rotational speed of the air compressor, the outlet pressure of the air compressor, and the target outlet flow of the air compressor; and S6: tracking the power of the fuel cell based on the target current of the fuel cell, and controlling air supply of the fuel cell based on the control voltage of the air compressor.
2. The fuel cell control method based on the model prediction control according to claim 1, wherein the model prediction control algorithm performs calculation based on a pre-established prediction model, wherein the prediction model comprises a three-order linear state space model of an air supply system for the fuel cell, an input/output model of the fuel cell system and a performance index of the fuel cell system; and an expression of the three-order linear state space model of the air supply system for the fuel cell is as follows:
3. The fuel cell control method based on the model prediction control according to claim 2, wherein the input/output model of the fuel cell system takes the current of the fuel cell and an assumed outlet flow of the air compressor as an input, and a voltage of the fuel cell stack as an output, and an expression of the input/output model of the fuel cell system is as follows:
4. The fuel cell control method based on the model prediction control according to claim 2, wherein a calculation expression of a performance index Z.sub.P of the fuel cell system is as follows:
5. The fuel cell control method based on the model prediction control according to claim 2, wherein an optimal control law of the prediction model is solved by adopting a particle swarm algorithm, and the optimal control law is applied to the fuel cell system.
6. The fuel cell control method based on the model prediction control according to claim 1, wherein in step S3, the internal state of the fuel cell is estimated by adopting an unscented Kalman filter.
7. The fuel cell control method based on the model prediction control according to claim 1, wherein in step S5, a calculation expression of the control voltage of the air compressor is as follows:
8. The fuel cell control method based on the model prediction control according to claim 7, wherein a calculation expression of the target angular speed ω*.sub.cp(k) of the
9. The fuel cell control method based on the model prediction control according to claim 8, wherein a calculation expression of the predicted load moment τ.sub.cp of the air compressor is as follows:
10. A fuel cell control system based on model prediction control, comprising a fuel cell control unit, a CAN bus, a data collection module, an air compressor controller, and a DC/DC controller, wherein the fuel cell control unit is separately connected to the data collection module, the air compressor controller, and the DC/DC controller through the CAN bus, and the fuel cell control unit executes a fuel cell control method based on model prediction control, wherein the method comprises: S1: obtaining data required for control, wherein the data required for control comprise required power for a fuel cell system, a rotational speed of an air compressor, outlet pressure of the air compressor, temperature of a fuel cell, gas pressure of a cathode inlet of the fuel cell, gas pressure of a cathode outlet of the fuel cell, a voltage of the fuel cell, and a current of the fuel cell; S2: determining whether the data required for control are received completely, and under a condition that the data required for control are received completely, proceeding to step S3, otherwise proceeding to step S1; S3: estimating an internal state of the fuel cell based on the outlet pressure of the air compressor and the voltage of the fuel cell to obtain a state estimation result, wherein the internal state comprises pressure and partial pressure of oxygen of the cathode of the fuel cell; S4: calculating a target outlet flow of the air compressor and a target current of the fuel cell with a model prediction control algorithm based on the state estimation result; S5: calculating a control voltage of the air compressor based on the rotational speed of the air compressor, the outlet pressure of the air compressor, and the target outlet flow of the air compressor; and S6: tracking the power of the fuel cell based on the target current of the fuel cell, and controlling air supply of the fuel cell based on the control voltage of the air compressor.
11. The fuel cell control system based on the model prediction control according to claim 10, wherein the model prediction control algorithm performs calculation based on a pre-established prediction model, wherein the prediction model comprises a three-order linear state space model of an air supply system for the fuel cell, an input/output model of the fuel cell system and a performance index of the fuel cell system; and an expression of the three-order linear state space model of the air supply system for the fuel cell is as follows:
12. The fuel cell control system based on the model prediction control according to claim 11, wherein the input/output model of the fuel cell system takes the current of the fuel cell and an assumed outlet flow of the air compressor as an input, and a voltage of the fuel cell stack as an output, and an expression of the input/output model of the fuel cell system is as follows:
13. The fuel cell control system based on the model prediction control according to claim 11, wherein a calculation expression of a performance index Z.sub.P of the fuel cell system is as follows:
14. The fuel cell control system based on the model prediction control according to claim 11, wherein an optimal control law of the prediction model is solved by adopting a particle swarm algorithm, and the optimal control law is applied to the fuel cell system.
15. The fuel cell control system based on the model prediction control according to claim 10, wherein in step S3, the internal state of the fuel cell is estimated by adopting an unscented Kalman filtering algorithm.
16. The fuel cell control system based on the model prediction control according to claim 10, wherein in step S5, a calculation expression of the control voltage of the air compressor is as follows:
17. The fuel cell control system based on the model prediction control according to claim 16, wherein a calculation expression of the target angular speed ω*.sub.cp(k) of the air compressor is as follows:
18. The fuel cell control system based on the model prediction control according to claim 17, wherein a calculation expression of the predicted load moment τ.sub.cp of the air compressor is as follows:
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0039]
[0040]
[0041]
[0042] In the figures, MPC represents model prediction control, and UKF represents unscented Kalman filter.
DETAILED DESCRIPTION OF THE EMBODIMENTS
[0043] The present disclosure is now described in detail in conjunction with the accompanying drawings and specific embodiments. The embodiments are implemented on the premise of the technical solutions of the present disclosure. The following presents the detailed implementations and specific operation processes. The protection scope of the present disclosure, however, is not limited to the following embodiments.
Embodiment 1
[0044] As shown in
[0045] In this embodiment, the fuel cell control method based on the model prediction control is applied to a fuel cell control system.
[0046] As shown in
[0047] Specifically, the fuel cell control method includes following steps:
[0048] S1: The fuel cell control unit (FCU) sends an access signal to the vehicle control unit (VCU) and the data collection module through the CAN bus, to obtain data required for control, where the data required for control include required power for the fuel cell system, a rotational speed of the air compressor, outlet pressure of the air compressor, temperature of the fuel cell, gas pressure of a cathode inlet of the fuel cell, gas pressure of a cathode outlet of the fuel cell, a voltage of the fuel cell, and a current of the fuel cell.
[0049] S2: The fuel cell control unit determines whether the data required for control are received completely; and under a condition that the data required for control are received completely, proceed to step S3, otherwise proceed to step S1.
[0050] S3: The fuel cell control unit estimates an internal state of the fuel cell based on the outlet pressure of the air compressor and the voltage of the fuel cell to obtain a state estimation result, where the internal state includes pressure and partial pressure of oxygen of the cathode of the fuel cell.
[0051] S4: The fuel cell control unit calculates a target outlet flow of the air compressor and a target current of the fuel cell with a model prediction control algorithm based on the state estimation result.
[0052] S5: The fuel cell control unit calculates a control voltage of the air compressor based on the rotational speed of the air compressor, the outlet pressure of the air compressor, and the target outlet flow of the air compressor.
[0053] S6: The fuel cell control unit tracks the power of the fuel cell based on the target current of the fuel cell, and controls air supply of the fuel cell based on the control voltage of the air compressor.
[0054] Each step is described in detail below.
1. Step S3
[0055] Step S3 specifically includes: the fuel cell control unit estimates the internal state of the fuel cell by using the unscented Kalman filter based on the data required for control, including the outlet pressure P.sub.sm of the air compressor and the voltage V.sub.st of the fuel cell, where the internal state includes the pressure and partial pressure of oxygen of the cathode of the fuel cell x=[P.sub.ca,P.sub.O.sub.
[0056] Specific steps of the unscented Kalman filter are as follows:
[0057] A state variable x is an n-dimensional random variable, an average
[0058] S301: Multiple Sigma points, namely sampling points, are calculated by using the following equations:
x.sup.(0)=
x.sup.(i)=
x.sup.(n+i)=
[0059] where x(.sup.i) is 2n+1 sigma points obtained through distributed sampling, (√{square root over (n+λ)P)}) is a square root of a matrix of (n+λ)P, (√{square root over (n+λ)P)}).sup.T(√{square root over (n+λ)P)})=n+λ)P, and (√{square root over (n+λ)P)}).sub.i represents the i.sup.th row of (√{square root over (n+λ)P)}).
[0060] Weight coefficient w corresponding to each Sigma point is selected based on the following equations:
[0061] where m represents an average, c represents covariance; parameter λ=α.sup.2(n+κ)−n; a selection of α controls a distribution state of the sampling points; κ is a parameter to be determined, and usually is 0, and β is a state distribution parameter, and is optimal for the Gaussian distribution β=2.
[0062] S302: At time k, a set of Sigma points are obtained by using the foregoing equation:
x.sub.i(k|k)=[{circumflex over (x)}(k|k), {circumflex over (x)}(k|k)+√{square root over ((n+λ)P(k|k))},{circumflex over (x)}(k|k)−√{square root over ((n+λ)P(k|k))}]
[0063] where x.sub.i(k|k) is a Sigma point obtained at the time k, {circumflex over (x)}(k|k) is an average of state variables at the time k, and P(k|k) is a variance of the state variables at the time k.
[0064] S303: The sampling points are updated based on a state equation of the system by using the following equation:
x.sub.i(k+1|k)=f(k,x.sub.i(k|k),u(k))+W(k)
[0065] where u(k) is an input of the system at the time k, the input of the system includes the current of the fuel cell and the outlet flow of the air compressor u=[I.sub.st,W.sub.cp].sup.T, f(k,x.sub.i(k|k), u(k)) is a state equation of the system at the time k, and W(k) is white noise in a process.
[0066] Linear continuous state equations of the system are as follows:
[0067] where k.sub.ca,in is an inlet flow coefficient of a cathode flow channel, R is a gas constant, T.sub.atm is ambient temperature, P.sub.sm is outlet pressure of the air compressor, .sup.AI a.sup.,atm is a molar mass of air, V.sub.sm is a volume of an air supply pipe, P.sub.ca is pressure of the cathode flow channel of the fuel cell, W.sub.cp is an assumed outlet flow of the air compressor, T.sub.st is the temperature of the fuel cell, V.sub.ca is a volume of the cathode flow channel of the fuel cell, M.sub.O.sub.
[0068] S304: One-step estimation of the system state at time k+1 is as follow:
[0069] A covariance matrix of the system at the time k+1 is as follow:
[0070] where Q is a variance matrix of the white noise W(k) in the process.
[0071] S305: A one-step estimated value of an observed value is calculated based on an output equation of the system:
y.sub.i(k+1|k)=g(x.sub.i(k+1|k),u(k))+V(k)
[0072] where y.sub.i(k+1|k) is the observed value of the system at the time k, g(x.sub.i(k+1|k)u(k)) is an observation equation of the system at the time k, and V(k) is observed white noise.
[0073] Measurable output of the system is the voltage of the fuel cell and intake manifold pressure y=[V.sub.st,P.sub.sm].sup.T, where
[0074] where i=I.sub.st/A.sub.fc is current density of the fuel cell, A.sub.fc is an effective activation area, V.sub.cell is a voltage of a monolithic fuel cell, n is the number of stacks, λ.sub.1, λ.sub.2, λ.sub.3, λ.sub.4 parameters to be fitted, and T.sub.st is the temperature of the fuel cell.
[0075] S306: An average and covariance of the observed values of the system are calculated by using the following equations:
[0076] where R is a variance matrix of the observed white noise V(k), P.sub.y.sub.
[0077] S307: A Kalman gain matrix is calculated by using the following equation:
K(k+1)=P.sub.x.sub.
[0078] S308: Optimal state estimation {circumflex over (x)}(k+1)and covariance matrix P(k+1) of the system are calculated at the time k+1 by using the following equations:
{circumflex over (x)}(k+1)={circumflex over (x)}(k+1|k)+K(k+1)[y(k+1)−{circumflex over (y)}(k+1|k)],
and
P(k+1)=P(k+1|k)−K(k+1)P.sub.y.sub.
[0079] S309: State estimation at the time k is completed, and steps S301 to S308 are repeated at the time k+1.
2. Step S4
[0080] The fuel cell control unit calculates the target outlet flow of the air compressor and the current of the fuel cell with the model prediction control algorithm based on the received data and estimated data.
[0081] The model prediction control algorithm performs calculation based on a pre-established prediction model, where the prediction model includes a three-order linear state-space model of the air supply system for the fuel cell, an input/output model of the fuel cell system and a performance index of the fuel cell system.
[0082] The method specifically includes following steps:
[0083] S401: Off-line calculation: An optimal oxygen excess ratio corresponding to the net output power of the fuel cell system is determined. The optimal oxygen excess ratio is an oxygen excess ratio corresponding to the minimum operating current when the net output power of the fuel cell system is constant.
[0084] S402: The three-order linear state space model of the air supply system of the fuel cell is obtained based on a lumped parameter model of the air supply system of the fuel cell and reasonable assumptions without considering the air compressor:
[0085] where P.sub.sm is the outlet pressure of the air compressor, P.sub.ca is the pressure of the cathode flow channel of the fuel cell, P.sub.O.sub.
[0086] The foregoing model is used as a prediction model to predict a future state and output of the fuel cell system based on the current state of the fuel cell system and the assumed input. The state of the fuel cell system includes the outlet pressure of the air compressor of the fuel cell, and the pressure and the partial pressure of oxygen of the cathode flow channel of the fuel cell.
[0087] The input of the system is the current of the fuel cell and the flow of the air compressor:
[0088] The output of the fuel cell system is a voltage V.sub.st of the fuel cell stack:
V.sub.st=nV.sub.cell=n[λ.sub.1+λ.sub.2ln(P.sub.O.sub.
[0089] where i=I.sub.st/A.sub.fc is the current density of the fuel cell, A.sub.fc is the effective activation area, V.sub.cell is the voltage of the single fuel cell, u is input in the input/output model of the fuel cell system, I.sub.st is the current of the fuel cell, W.sub.cp the assumed outlet flow of the air compressor, V.sub.st is the voltage of the fuel cell stack, n is the number of fuel cells, P.sub.O.sub.
[0090] The performance indexes of the fuel cell system are the net output power and the oxygen excess ratio of the fuel cell system:
[0091] where P.sub.Net is the net output power of the fuel cell system, λ.sub.O.sub.
[0092] S403: Rolling optimization: An optimal control law is solved by using the particle swarm algorithm. The optimal control law refers to optimization of a performance function of the fuel cell system in N.sub.P time domain under actions of N.sub.c control signals in the future. The optimized performance function is as follows:
[0093] where N.sub.P is a prediction step, N.sub.c is a control step, and N.sub.P≥N.sub.c. z.sub.r is a reference trajectory, and Q.sub.z, R.sub.z are weighting matrixes with a corresponding dimension.
[0094] After the optimal control law is calculated, the first element of the control law is applied to the system.
[0095] S404: Feedback correction: A difference between the output predicted by the prediction model and actual output of the fuel cell system is used as an error correction prediction model in a next control cycle.
3. Step S5
[0096] The fuel cell control unit calculates the control voltage of the air compressor based on the current rotational speed, the outlet pressure, and the target outlet flow of the air compressor of the fuel cell system.
[0097] A specific calculation process is as follows:
[0098] S501: The target rotational speed n*.sub.cp(k+1) and a target angular speed ω*.sub.cp(k+1) of the air compressor are calculated based on the target outlet flow of the air compressor, the outlet pressure of the air compressor predicted by the prediction model, and a static map of the air compressor, where
[0099] S502: A predicted load moment of the air compressor is calculated by:
[0100] where C.sub.p is the specific heat at the constant pressure of the air, T.sub.atm is the ambient temperature, P.sub.atm is the ambient pressure, η.sub.cp is the efficiency of the air compressor, W*.sub.cp(k) is the target outlet flow of the air compressor, and τ.sub.cp is the load moment of the air compressor.
[0101] S503: An average angular acceleration of the air compressor is calculated by:
[0102] where T is a control period, and ω.sub.cp(k) is a current rotational speed of the air compressor.
[0103] S504: The control voltage of the air compressor is calculated by:
[0104] where R.sub.cm is armature resistance of a drive motor of the air compressor, η.sub.cm is a mechanical efficiency of the drive motor, k.sub.t and k.sub.v are motor constants, and J is rotational inertia of the air compressor.
4. Step S6
[0105] The fuel cell control unit sends the current of the fuel cell and the control voltage of the air compressor to the DC/DC controller and an air compressor controller through the CAN bus to complete the track of the power of the fuel cell system and control of air supply.
5. Fuel Cell Control System
[0106] The fuel cell system includes the vehicle control unit, the fuel cell control unit, the CAN bus, the data collection module, the air compressor, the air compressor controller, the DC/DC converter, and the DC/DC controller. The DC/DC converter is connected to the DC/DC controller, the air compressor is connected to the air compressor controller, the data collection module is connected to the fuel cell system, and the fuel cell control unit is connected to the vehicle control unit, the data collection module, the DC/DC controller, and the air compressor controller. Data interaction among components is completed through the CAN bus. The FCU obtains the required power of the system and the data required for calculating by a control policy from the CAN bus, calculates the current of the fuel cell and the target flow of the air compressor through the model prediction control algorithm, calculates the control voltage of the air compressor based on the target flow, and sends the current of the fuel cell and the voltage of the air compressor to the DC/DC controller and the air compressor controller respectively through the CAN bus, to complete the control of the fuel cell system.
[0107] The preferred specific embodiments of the present disclose are described in detail above. It should be understood that, a person of ordinary skill in the art can make various modifications and variations according to the concept of the present disclosure without creative efforts. Therefore, all technical solutions that those skilled in the art can arrive at based on the conventional art through logical analysis, reasoning, or finite experiments according to the concept of the present disclosure shall fall within the protection scope defined by the appended claims.