Joint simulation design method for modeling and control of fuel cell system
By establishing a dynamic model of a high-precision SOFC system and designing a model prediction controller based on Kalman filtering, the dynamic response problems of the SOFC system in terms of load changes and temperature control are solved, and the rapid and accurate control effect is achieved, which extends the material life and improves the system stability.
Patent Information
- Application Number
- CN202411519071.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art is difficult to effectively solve the dynamic response problems of solid oxide fuel cell (SOFC) systems in terms of load changes and temperature control, resulting in reduced performance and shortened lifetime.
Using the joint simulation design method, a dynamic model of a high-precision SOFC system is established in a multi-field unified high-precision SOFC system and a Kalman filter-based model prediction controller (KF-MPC) is designed to achieve efficient control of the SOFC system.
It realizes the rapid and accurate response of the SOFC system in terms of load changes and temperature control, extends the material life and improves the system operation stability and reliability.
Smart Images

Figure CN119598699A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of solid oxide fuel cells, and in particular relates to a joint simulation design method for fuel cell system modeling and control. Background Art
[0002] Solid oxide fuel cell (SOFC) is a power generation device that converts the chemical energy of reactants directly into electrical energy. Compared with other types of fuel cells, SOFC has the advantages of reliable all-solid-state component structure, high energy conversion efficiency, flexible fuel use, and low material cost. It is generally considered to be the most promising fuel cell technology. Based on these advantages, SOFC has been applied to various practical engineering fields, such as portable devices, transportation, and stationary power plants.
[0003] Since the SOFC system is a typical thermoelectric strongly coupled nonlinear system, it involves complex processes such as fluid flow, heat transfer, electrochemical reaction, and reforming reaction. This leads to the significant dynamic characteristics of SOFC operation: the power response speed is much faster than the thermal response speed and the gas supply response speed. When the external load changes, if the dynamic response of thermal management and gas supply lags behind the power response, it will cause SOFC fuel shortage and thermal runaway, resulting in SOFC performance degradation, life reduction, and even failure. Therefore, in actual operation, the SOFC system needs to respond quickly to external load changes on the basis of thermal safety. This means that the safe and stable application of the SOFC system not only needs to rely on a high-precision, easy-to-expand and transplant fuel cell system numerical simulation model, but also needs to design a set of efficient and economical control methods.
[0004] For the SOFC system, a strongly coupled thermoelectric system, the common shortcomings of traditional modeling methods when dealing with strongly coupled systems include high model complexity, difficulty in accurately capturing coupling effects, difficulty in interdisciplinary integration, low simulation efficiency, and difficulty in applying efficient control methods. Summary of the invention
[0005] Purpose of the invention: The purpose of the present invention is to overcome the shortcomings of the prior art and provide a joint simulation design method for modeling and control of a solid oxide fuel cell system. By establishing a unified high-precision SOFC system in multiple fields and designing an efficient system intelligent control method, the joint simulation method is used to control the SOFC stack inlet temperature, stack net output power, stack maximum temperature and stack maximum temperature gradient. Ensure that when the system responds to external load changes and operating conditions, while achieving fast and accurate load tracking and temperature control, the system maintains safe operation.
[0006] Technical solution: A joint simulation design method for fuel cell system modeling and control of the present invention comprises the following steps: S1: Based on the electrochemical and heat transfer mechanisms, the distributed parameter method is used to divide the stack into several nodes along the flow direction of the reaction gas, and the multi-domain unified modeling language Modelica is used to establish a one-dimensional solid oxide fuel cell dynamic model; S2: Establish a dynamic model of each auxiliary component of the solid oxide fuel cell system; the auxiliary components include a methane reforming reactor, a heat exchanger, a water pump, a blower, a mixer, a separator and a combustion chamber; connect each component according to a unified interface to form an overall dynamic model of the system, and perform dynamic simulation to obtain dynamic simulation data; S3: Using the dynamic simulation data of the solid oxide fuel cell system, the multi-output and multi-input state space model identification is performed in the control simulation software SIMULINK; S4: Apply the identified state space model as a prediction model and develop a Kalman filter-based model predictive controller KF-MPC in SIMULINK; S5: Establish a SIMULINK / Modelica joint simulation platform to perform model predictive control on solid oxide fuel cell systems.
[0007] Furthermore, step S1 specifically includes the following steps: S11: The solid oxide fuel cell SOFC is divided into four parts along the height direction of the cell: an interconnector, an anode flow channel, an anode-electrolyte-cathode layer, i.e., a PEN layer, and a cathode flow channel. At the same time, it is divided into n nodes along the gas flow direction; S12: Based on electrochemical principles, construct the electrochemical dynamic response equations of each node of the high-temperature solid oxide fuel cell; The electrochemical reaction of SOFC occurs in the PEN layer of SOFC, and the battery voltage is obtained by the following formula: ; in, V el is the battery voltage, E is the reversible voltage, V act is the activation loss, V conc is the concentration loss, V ohm is the ohmic loss, T is temperature; Activation loss V act is the energy barrier that the reactants need to overcome, calculated as follows: ; in i0 is the exchange current density, whose value depends on the material and microscopic properties of the electrode, the type of gas, the operating temperature and pressure, the subscript an represents the anode fluid, the subscript ca represents the cathode fluid, R represents the universal gas constant, which is 8.314 J / (mol*K), and F is the Faraday constant, which is 96485 C / mol. i Indicates the actual current density; Ohmic loss V ohm It can be calculated by the following formula: ; in s an , and s ca are the anode and cathode conductivities, s ele is the electrolyte ionic conductivity, t an , t ca , t ele are the thickness of anode, cathode and electrolyte layers respectively; Concentration loss V conc Caused by resistance to gas transport near the reaction interface and to product departure from the reaction interface; ; The gas in the channel i The partial pressure, p i is the gas at the reaction interface i The partial pressures of, the subscripts H2, H2O and O2 are hydrogen, water vapor and oxygen respectively; S13: Based on the fuel cell model structure, a heat transfer dynamic response model of each node of the high-temperature solid oxide fuel cell is constructed; The electrochemical reaction of SOFC generates a large amount of heat, part of which is transferred to the anode and cathode channels by thermal convection, and the other part is transferred to the interconnect by thermal radiation. At the same time, the anode and cathode channels and the interconnect also transfer heat by thermal convection. The above heat transfer is connected using a thermal interface. The energy conservation equation of each layer of SOFC is as follows: ; ; ; In the formula, t Represents thickness, r is the density, c p is the specific heat capacity at constant pressure, T is the temperature, l is the thermal conductivity, k is the convective heat transfer coefficient, I is the current, V is the voltage, σ is the Stefan constant, e is the emissivity, and the subscripts PEN, an, ca, and I represent the fuel cell electrode electrolyte layer, anode fluid, cathode fluid, and interconnect, respectively. h an and h ca denote the heights of the anode flow channel and the cathode flow channel, respectively. Represents partial differential.
[0008] Furthermore, step S2 specifically includes the following steps: S21: The transfer of fluid, heat, and current of each device in the system is all through the corresponding interface; first, liquid water from the environment is connected to the water pump through the fluid interface, and then enters the heat exchanger to evaporate and generate water vapor; then it is mixed with methane in the mixer and heated by the heat exchanger; the mixed gas enters the reforming reactor, and the heat required for the reforming reaction is provided by the high-temperature tail gas of the system and transferred through the thermal interface between the reactor and the heat exchanger; the reaction generates hydrogen, carbon monoxide, and carbon dioxide; S22: The reforming reaction gas is mixed with part of the SOFC anode tail gas, further heated, and enters the SOFC anode flow channel through the SOFC anode fluid interface; air is sent in by the blower, and after multi-stage heat exchange, it is mixed with part of the SOFC cathode tail gas, and enters the SOFC cathode flow channel through the SOFC cathode fluid interface; in the SOFC, the fuel gas further undergoes a reforming reaction, and hydrogen and oxygen undergo an electrochemical reaction; except for the circulating part of the anode and cathode tail gas, the rest is sent to the combustion chamber to increase the tail gas temperature and provide heat for gas preheating and reforming reaction; S23: System water-carbon ratio STCR , calculate the system import fuel utilization FU .
[0009] The joint simulation design method for fuel cell system modeling and control according to claim 3 is characterized in that in step S23, the system inlet fuel utilization rate is calculated FU By the following formula: ; ; In the formula, and are the molar flow rates of water and methane at the system inlet, I Indicates the output current.
[0010] Furthermore, step S3 specifically includes the following steps: S31: selection of control variables and controlled variables; According to the application requirements and safety constraints of the system, the control goal of the fuel cell system is to achieve accurate and rapid tracking of external loads on the basis of meeting the thermal safety of the system; therefore, the controlled variable is the net electric power of the system P net , SOFC cathode inlet temperature T in , SOFC PEN layer maximum temperature gradient max|Δ T PEN |, SOFC PEN layer maximum temperature max T PEN , calculated by the following formula: ; ; In the formula, is the gas flow rate, P SOFC is the power generated by SOFC, P b and P p is the power consumption of the blower and water pump, is the distance between each node of SOFC; To achieve the control target, the system control variable is the battery current I , air flow , anode gas circulation rate ACR , cathode gas circulation rate CCR ,in, ACR and CCR Calculated by the following formula: ; ; In the formula, is the gas flow rate, the subscripts out and cir are the SOFC outlet gas flow rate and the circulating gas flow rate, respectively; S32: Identification model design; According to the above characteristics of the controlled variables and control variables, a four-input and four-output state space model is used to simulate the input and output characteristics of the system. The model is expressed as follows: ; In the formula, x m is the state variable, A m , B m , C m and Dm To identify the model coefficient matrix, enter u Contains I , , ACR and CCR, Output y Contains P net , T in , max|Δ T PEN |with max T PEN .
[0011] Furthermore, step S4 specifically includes the following steps: S41: Change the prediction model to an incremental one, that is, use the difference form to represent each variable and augment it; ; in, ; According to the augmented state space equation, the output of the system in the future time domain is predicted: ; in, , , N p For the prediction time domain, N c To control the time domain; S42: The rolling optimization of MPC solves the cost function within the scope of model constraints to obtain the optimal control sequence of the system. Based on the optimization goal of this study, the cost function and related constraints of MPC are as follows: ; in, Y r ( k ) is the preset value of the system, Φ y , Φ u , Φ w is the weight matrix of tracking index, control index and electrical efficiency, , , and They are the maximum and minimum values of each control quantity, control quantity increment and output; S43: In actual operation of MPC, the influence of external disturbance and model mismatch is eliminated through feedback correction. Based on the error between the output result of the controlled mechanism model and the predicted value of the prediction model, the Kalman filter KF calculates the Kalman gain to update the system state variables.
[0012] Furthermore, in step S43, the Kalman filter KF calculates the Kalman gain in the following specific steps: S431. Prior estimation based on prediction model ; ; in, is the posterior estimate matrix of the state variables at the previous moment, A m , B m is the identification model coefficient matrix, is the control variable matrix of the previous moment; S432, calculate Kalman gain K t ; in, for t The covariance matrix of the prior estimate of time, H is the conversion matrix from state variables to measurement variables, R is the covariance matrix of the measurement noise; S433, based on measured values z t and K t , to correct the state variables ; S434, Calculation t The covariance matrix of the posterior estimate at time P t ; S435, Update t The covariance matrix of the prior error at time +1 ; ; Where Q is the system noise covariance matrix; Finally, the basic parameters of the controller are set, including sampling period, modeling time domain N, prediction time domain P, and control time domain M.
[0013] Furthermore, step S5 specifically includes the following steps: S51, export the dynamic mechanism model established based on Modelica as a Functional Mock-up Unit file FMU that complies with the Functional Mock-upInterface standard FMI; S52, importing the above FMU file into SIMULINK, connecting the control quantity of the FMU file with the optimal control instruction of the MPC controller; connecting the controlled quantity of the FMU file with the KF observer to form a joint simulation system; S53, after the simulation starts, the FMU file calls the built-in solver of the FMU to obtain the controlled quantity of the system and pass it to the KF observer; S54, KF observer according to the current control command and the system controlled quantity, the state variables of the prediction model Update and correct, and pass to MPC; S55, MPC uses rolling optimization to solve the current optimal control instruction based on the control target and explicit constraints, and transmits it to the FMU to complete a control process; S56. The above steps are repeatedly executed until the control process ends.
[0014] The present invention also discloses a computer device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method of the present invention.
[0015] The present invention also discloses a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the method of the present invention are implemented.
[0016] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: (1) The present invention provides a joint simulation design method for modeling and control of a solid oxide fuel cell system. A dynamic model of a high-temperature solid oxide fuel cell system is established, and model identification and controller design are performed to make up for the problem of untimely load tracking and poor temperature control of the fuel cell system when the load fluctuates. The joint simulation method is applied to achieve efficient control of the dynamic system, achieve fast and accurate load tracking and temperature control, extend the material life, and improve the system operation stability.
[0017] (2) Kalman filter KF has obvious advantages in correcting system dynamic error interference and improving system reliability, so it can be well applied in predictive control. Based on the error between the output result of the controlled mechanism model and the predicted value of the prediction model, the Kalman filter KF calculates the Kalman gain to update the system state variables.
[0018] Model Predictive Control Method Based on Kalman Filter (KF-MPC). The proposed model predictive control method predicts the behavior of the system in the future based on the simplified and reduced state space model of the system, and solves the optimal control input through optimization method. The controller periodically performs prediction, optimization and execution of control actions to achieve real-time and precise control of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a schematic diagram of the structure of the device of the present invention; Among them, 1 is a methane tank, 2 is a water pump, 3 is a blower, 4 is a mixer 1, 5 is a steam generator, 6 is a fuel heat exchanger, 7 is an air heat exchanger, 8 is a methane reformer, 9 is a mixer 2, 10 is a mixer 3, 11 is a solid oxide fuel cell, 12 is an anode circulation fan, 13 is a cathode circulation fan, 14 is an anode separator, 15 is a cathode separator, 16 is a burner, 17 is an anode flow channel, 18 is an electrode-electrolyte layer, and 19 is a cathode flow channel.
[0020] Figure 2 The figure shows the comparison between the identification results and the simulation results, where (a) shows the comparison between the identification results and the simulation results of the SOFC system net output power Pnet; (b) shows the comparison between the identification results and the simulation results of the SOFC air inlet temperature Tin; (c) shows the comparison between the identification results and the simulation results of the SOFCPEN layer maximum temperature maxTPEN; (d) shows the maximum temperature gradient max|Δ T PEN |Comparison chart between identification results and simulation results; Figure 3 It is the Modelica / SIMULINK joint simulation flow chart; Figure 4 It is the design diagram of the control system of the present invention (dashed line represents control information flow; solid line represents material flow); Figure 5 The control effect diagram of SOFC with different controllers; (a) is the net output power of SOFC system with different controllers P net (b) is the control effect diagram of SOFC air inlet temperature under different controllers T in (c) is the maximum temperature max of SOFC PEN layer under different controllers T PEN Changes over time; (d) Maximum temperature gradient max|Δ of the SOFC PEN layer under different controllers T PEN |Graph of changes over time; DETAILED DESCRIPTION
[0021] The solid oxide fuel cell system modeling and control joint simulation design method disclosed in the present invention is further introduced below in conjunction with the accompanying drawings and specific embodiments, which specifically includes the following steps: S1: Based on the electrochemical and heat transfer mechanisms, the distributed parameter method is used to divide the stack into n nodes along the flow direction of the reaction gas, and the multi-domain unified modeling language Modelica is used to establish a one-dimensional solid oxide fuel cell dynamic model; S2: Establish the dynamic model of each auxiliary component of the solid oxide fuel cell system. The auxiliary components include methane reforming reactor, heat exchanger, water pump, blower, mixer, separator, and combustion chamber. Connect each component according to the unified interface to form the overall dynamic model of the system and perform dynamic simulation; S3: Apply the dynamic simulation data of the solid oxide fuel cell system to perform multi-output and multi-input state space model identification in SIMULINK; S4: Apply the identified state space model as a prediction model and develop a Kalman filter-based model predictive controller (KF-MPC) in SIMULINK; S5: Establish a SIMULINK / Modelica joint simulation platform to perform model predictive control on solid oxide fuel cell systems.
[0022] Furthermore, step 1 specifically includes: S11: The SOFC is divided into four parts along the height direction of the battery: the interconnect, the anode channel, the anode-electrolyte-cathode layer (PEN layer) and the cathode channel. At the same time, it is divided into n nodes along the gas flow direction.
[0023] S12: Based on electrochemical principles, construct the electrochemical dynamic response equations of each node of the high-temperature solid oxide fuel cell.
[0024] The electrochemical reaction of SOFC mainly occurs in the PEN layer of SOFC. The battery voltage is obtained by the following formula: in, V el is the battery voltage, E is the reversible voltage, V act is the activation loss, V conc is the concentration loss, V ohm is the ohm loss; Activation loss V act is the energy barrier that the reactants must overcome and is calculated as:
[0025] in i0 is the exchange current density, and its value depends largely on the material and microscopic properties of the electrodes, the type of gas, and the operating temperature and pressure.
[0026] Ohmic loss V ohm It can be calculated by the following formula: in s an , and s ca are the anode and cathode conductivities, s ele is the electrolyte ionic conductivity.
[0027] Concentration loss V conc It is caused by the resistance to gas transport near the reaction interface and the resistance to products leaving the reaction interface.
[0028] The gas in the channel i The partial pressure, p i is the gas at the reaction interface i The partial pressure.
[0029] S13: Based on the fuel cell model structure, a heat transfer dynamic response model of each node of the high-temperature solid oxide fuel cell is constructed.
[0030] The electrochemical reaction of SOFC generates a large amount of heat, part of which is transferred to the anode and cathode channels through thermal convection, and the other part is transferred to the interconnection through thermal radiation. At the same time, the anode and cathode channels and the interconnection also transfer heat through thermal convection. The above heat transfer is connected using a thermal interface. The energy conservation equations of each layer of SOFC are as follows:
[0031]
[0032]
[0033] In the formula, t Represents thickness, r is the density, c p is the specific heat capacity at constant pressure, T is the temperature, l is the thermal conductivity, k is the convective heat transfer coefficient. I is the current, V is the voltage, σ is the Stefan constant, eis the emissivity, and the subscripts PEN, an, ca, and I represent the fuel cell electrode electrolyte layer, anode fluid, cathode fluid, and interconnect, respectively.
[0034] Furthermore, step 2 specifically includes: The transfer of fluid, heat and current of each device in the system is through the corresponding interface. Figure 1 As shown. The solid oxide fuel cell system device implemented by the present invention includes SOFC 11 and auxiliary equipment; the auxiliary equipment includes a methane tank, a water pump, a blower, a mixer, a steam generator, an anode heat exchanger, 7 is a cathode heat exchanger, a methane reformer, a burner and other equipment. The system operation process is: liquid water is supplied by a water pump 2, heated and evaporated in an evaporator 5 to generate water vapor. Then it is mixed with methane from a methane tank 1, heated by a heat exchanger 6, and the temperature rises. After that, the mixed gas enters the reforming reactor 8 to undergo a methane reforming reaction, and the heat required for the reaction is provided by the high-temperature tail gas of the system. The reaction generates hydrogen, carbon monoxide and carbon dioxide. The reforming reaction gas is mixed with the SOFC anode part tail gas in the mixer 2 and sent to the anode flow channel 17. Air is sent in by a blower 3, heated by an air heat exchanger 7, mixed with the SOFC cathode part tail gas in the mixer 3, and sent to the SOFC cathode flow channel 18. In the SOFC electrode-electrolyte layer 18, the fuel gas further undergoes a reforming reaction, and hydrogen and oxygen undergo an electrochemical reaction to generate electricity. Except for the circulating part of the anode and cathode tail gas, the rest is sent to the combustion chamber to increase the tail gas temperature and provide heat for gas preheating and reforming reaction. This system heats the reaction gas and provides heat for the reforming reaction by burning unreacted fuel, and increases the reaction gas temperature by circulating the anode and cathode tail gas of the fuel cell, thereby improving the system efficiency.
[0035] System water-carbon ratio STCR , system import fuel utilization FU Calculated by the following formula: In the formula, and are the molar flow rates of water and methane at the system inlet, respectively Furthermore, step 3 specifically includes: S31: Selection of control variables and controlled variables.
[0036] According to the application requirements and safety constraints of the system, the control goal of the fuel cell system is to achieve accurate and rapid tracking of external loads on the basis of meeting the thermal safety of the system. Therefore, the controlled variable is the net power of the system. P net , SOFC cathode inlet temperature T in, SOFC PEN layer maximum temperature gradient max|Δ T PEN |, SOFC PEN layer maximum temperature max T PEN . Calculated by the following formula: In the formula, is the gas flow rate, P SOFC is the power generated by SOFC, P b and P p is the power consumption of the blower and water pump, is the distance between each node of SOFC.
[0037] To achieve the control target, the system control variable is the battery current I , air flow , anode gas circulation rate ACR , cathode gas circulation rate CCR .in, ACR and CCR Calculated by the following formula: In the formula, is the gas flow rate, the subscripts out and cir are the SOFC outlet gas flow rate and circulating gas flow rate, respectively.
[0038] S32: Identification Model Design According to the above characteristics of the controlled variables and control variables, a four-input and four-output state space model is used to simulate the input and output characteristics of the system. The model is expressed as follows: In the formula, x m is the state variable, A m , B m , C m and D m is the identification model coefficient matrix. Input u Contains I , , ACR and CCR. Output y Contains P net ,T in , max|Δ T PEN |With max T PEN .
[0039] The corresponding comparison between the identification model and the actual system output is as follows: Figure 2 As shown in Figure 2, it can be seen that the system has strong nonlinearity. For the control variable P net , T in 、max T PEN , the prediction model fits the actual system well. T PEN |, due to its strong nonlinear characteristics, the fitting effect is general in some step response periods. Considering max|Δ T PEN |As a security object, it is not accurately tracked, which has little impact on the final control effect.
[0040] Furthermore, the control method of step 4 is a model predictive control method based on Kalman filtering (KF-MPC). First, the proposed model predictive control method predicts the behavior of the system in the future based on the simplified and reduced state space model of the system, and solves the optimal control input through the optimization method. The controller periodically performs prediction, optimization and execution of control actions to achieve real-time and precise control of the system. The specific steps include: S41: Change the prediction model to an incremental one, that is, use differential form to represent each variable and augment it.
[0041] in, According to the augmented state space equation, the output of the system in the future can be predicted: in, , , N p For the prediction time domain, N c To control the time domain.
[0042] S42: The rolling optimization of MPC is to continuously solve the cost function within the scope of model constraints to obtain the optimal control sequence of the system. Based on the optimization goal of this study, the cost function and related constraints of MPC are as follows: in, Yr ( k ) is the preset value of the system, Φ y , Φ u , Φ w It is the weight matrix of tracking index, control quantity index and electrical efficiency. , , and are the control quantities, control quantity increments, and the maximum and minimum output values, as shown in Table 1.
[0043] S43: In actual operation of MPC, feedback correction is used to eliminate the influence of external interference and model mismatch. Kalman filter (KF) has obvious advantages in correcting system dynamic error interference and improving system reliability, so it can be well applied in predictive control. Based on the error between the output result of the controlled mechanism model and the predicted value of the prediction model, KF calculates the Kalman gain to update the system state variables. The main steps of KF are as follows: 1. Prior estimates based on prediction models
[0044] 2. Calculate Kalman gain K t 3. Based on measured values z t and K t , to correct the state variables 4. Calculation t The covariance matrix of the prior error at time P t 5. Update t The covariance matrix of the prior error at time +1
[0045]
[0046] Finally, in the specific implementation, some basic parameters of the controller need to be set, including: sampling period, modeling time domain N, prediction time domain P, and control time domain M.
[0047] Furthermore, the dynamic model and intelligent control algorithm of the SOFC system are designed in Modelica language and SIMULINK respectively, so it is necessary to establish a SIMULINK / Modelica joint simulation platform to perform model predictive control on the solid oxide fuel cell system, such as Figure 3 Step 5 specifically includes: 1. Export the dynamic mechanism model built based on Modelica as a FunctionalMock-up Unit (FMU) file that complies with the FunctionalMock-upInterface (FMI) standard.
[0048] 2. Import the above FMU file into SIMULINK, connect the control quantity of the FMU file with the optimal control instruction of the MPC controller; connect the controlled quantity of the FMU file with the KF observer to form a joint simulation system. Steps 1 and 2 are both offline setting processes.
[0049] 3. After the simulation starts, the FMU file calls the built-in solver of the FMU to obtain the system controlled quantity and pass it to the KF observer.
[0050] 4. The KF observer predicts the state variables of the model according to the current control command and the system controlled quantity. Update corrections are made and passed to MPC.
[0051] 5. Based on the control objectives and explicit constraints, MPC uses rolling optimization to solve the current optimal control instructions and transmits them to the FMU to complete a control process.
[0052] 6. The above steps are repeated until the control process ends. Steps 3-6 are the online joint simulation process.
[0053] Further, the specific steps of step 6 include: The solid oxide fuel cell system dynamic model is used as the controlled object, and the designed KF-MPC controller is used for control simulation. The control system structure is as follows: Figure 4 As shown in the figure. The sampling interval of the controller is 5 s, the prediction time domain is 20, and the control time domain is 10. Before the control starts, the control quantity I , , ACR , CCR The initial values of are 50 A, 0.06 kg / s, 0.25, and 0.30. P net Setpoint step up and down, T in The system simulation results are ascent and descent at a rate of 2 K / min. Pnet , T in , max|Δ T PEN |, max T PEN Pass it to KF, KF integrates the internal prediction model results with the simulation results, updates the state variables of the state equation, and passes it to MPC, which solves the internal cost function in a rolling manner until it outputs the optimal control quantity. I , , ACR , CCR , passing it to the system model.
[0054] Two proportional-integral-differential (PID) controllers were designed for comparison. One controller I To control P net , by adjusting To control T in , called PID1. The other is to adjust I To control P net , by adjusting the system CCR To control T in , called PID2. The control effect is as follows Figure 5 shown.
[0055] In general, each controller responds to changes in load demand with a small overshoot. A local zoom shows that the KF-MPC has the fastest control speed, followed by PID2 and finally PID1, regardless of whether the load is rising or falling. When the load changes in steps, the control time of KF-MPC is within 50, and the control time of the PID control system is above 100. The load tracking ability of KF-MPC is significantly better than that of the PID controller.
[0056] when T in When the setpoint ramp changes, KF-MPC responds accurately. T in Remain stable without overshooting at the end of the change ( t = 1000s and t = 2800s). PID1 controls the system by adjusting the air flow rate. T in Before the air reaches the cathode, it needs to pass through the heat exchanger. There is a certain delay in the control process, which will cause a large overshoot after 1000 s and 2800 s. In particular, after 1000 s, there is a small oscillation with an overshoot of 0.66 K.T in The change is stable and slightly higher than the set value. P net When there is a step change, KF-MPC can maintain T in In contrast, PID1 and PID2 control T in exhibits large overshoot, especially when P net When the step rises, T in The overshoots are 2.99 K and 2.39 K, respectively. The temperature control performance of KF-MPC is significantly better than that of PID controller.
[0057] Figure 5 (c) and (d) show the effects of various controllers on the maximum temperature of the SOFC PEN layer max. T PEN and the maximum temperature gradient max|Δ T PEN |Response. KF-MPC max in the whole process T PEN The change of PID2 is the smallest, followed by PID1. After 1500s, the maximum value in the PID2 control system T PEN It increases sharply and reaches a maximum value of 1154.83 K. When the load increases, PID2 reduces the cathode exhaust gas circulation rate and the air flow rate to the cathode to maintain Tin stability, causing the PEN layer temperature to rise sharply. Therefore, the PID2 control system has max|Δ T PEN | is also the largest in the controller, exceeding the constraint value. Similarly, as the load increases in KF-MPC, max|Δ T PEN | also increases rapidly. Based on its clear output constraints and predictive capabilities, by quickly adjusting each input variable, max|Δ T PEN The peak value of | is 14.93 K / cm, which meets the constraints.
[0058] Through example analysis, it can be seen that the KF-MPC controller involved can achieve fast load tracking of SOFC while meeting the temperature safety constraints, which is a significant improvement compared to the traditional PID controller.
[0059] Table 1
Claims
1. A joint simulation design method for fuel cell system modeling and control, characterized in that: The steps include: S1: Based on the electrochemical and heat transfer mechanisms, the distributed parameter method is used to divide the stack into several nodes along the flow direction of the reaction gas, and the multi-domain unified modeling language Modelica is used to establish a one-dimensional solid oxide fuel cell dynamic model; S2: Establish a dynamic model of each auxiliary component of the solid oxide fuel cell system; the auxiliary components include a methane reforming reactor, a heat exchanger, a water pump, a blower, a mixer, a separator and a combustion chamber; connect each component according to a unified interface to form an overall dynamic model of the system, and perform dynamic simulation to obtain dynamic simulation data; S3: Using the dynamic simulation data of the solid oxide fuel cell system, the multi-output and multi-input state space model identification is performed in the control simulation software SIMULINK; S4: Apply the identified state space model as a prediction model and develop a Kalman filter-based model predictive controller KF-MPC in SIMULINK; S5: Establish a SIMULINK / Modelica joint simulation platform to perform model predictive control on solid oxide fuel cell systems.
2. A joint simulation design method for fuel cell system modeling and control according to claim 1, characterized in that: Step S1 specifically includes the following steps: S11: The solid oxide fuel cell SOFC is divided into four parts along the height direction of the cell: an interconnector, an anode flow channel, an anode-electrolyte-cathode layer, i.e., a PEN layer, and a cathode flow channel. At the same time, it is divided into n nodes along the gas flow direction; S12: Based on electrochemical principles, construct the electrochemical dynamic response equations of each node of the high-temperature solid oxide fuel cell; The electrochemical reaction of SOFC occurs in the PEN layer of SOFC, and the battery voltage is obtained by the following formula: ; in, V el is the battery voltage, E is the reversible voltage, V act is the activation loss, V conc is the concentration loss, V ohm is the ohmic loss, T is temperature; Activation loss V act is the energy barrier that the reactants need to overcome, calculated as follows: ; in i 0 is the exchange current density, whose value depends on the material and microscopic properties of the electrode, the type of gas, the operating temperature and pressure, the subscript an represents the anode fluid, the subscript ca represents the cathode fluid, R represents the universal gas constant, which is 8.314 J / (mol*K), and F is the Faraday constant, which is 96485 C / mol. i Indicates the actual current density; Ohmic loss V ohm It can be calculated by the following formula: ; in σ an , and σ ca are the anode and cathode conductivities, σ ele is the electrolyte ionic conductivity, τ an , τ ca , τ ele are the thicknesses of anode, cathode and electrolyte layers, respectively; Concentration loss V conc Caused by resistance to gas transport near the reaction interface and to product departure from the reaction interface; ; The gas in the channel i The partial pressure, p i is the gas at the reaction interface i The partial pressures of, the subscripts H2, H2O and O2 are hydrogen, water vapor and oxygen respectively; S13: Based on the fuel cell model structure, a heat transfer dynamic response model of each node of the high-temperature solid oxide fuel cell is constructed; The electrochemical reaction of SOFC generates a large amount of heat, part of which is transferred to the anode and cathode channels by thermal convection, and the other part is transferred to the interconnect by thermal radiation. At the same time, the anode and cathode channels and the interconnect also transfer heat by thermal convection. The above heat transfer is connected using a thermal interface. The energy conservation equation of each layer of SOFC is as follows: ; ; ; In the formula, τ Represents thickness, ρ is the density, c p is the specific heat capacity at constant pressure, T is the temperature, λ is the thermal conductivity, k is the convective heat transfer coefficient, I is the current, V is the voltage, σ is the Stefan constant, ε is the emissivity, and the subscripts PEN, an, ca, and I represent the fuel cell electrode electrolyte layer, anode fluid, cathode fluid, and interconnect, respectively. h an and h ca denote the heights of the anode flow channel and the cathode flow channel, respectively. Represents partial differential.
3. A joint simulation design method for fuel cell system modeling and control according to claim 1, characterized in that: Step S2 specifically includes the following steps: S21: The transfer of fluid, heat, and current of each device in the system is all through the corresponding interface; first, liquid water from the environment is connected to the water pump through the fluid interface, and then enters the heat exchanger to evaporate and generate water vapor; then it is mixed with methane in the mixer and heated by the heat exchanger; the mixed gas enters the reforming reactor, and the heat required for the reforming reaction is provided by the high-temperature tail gas of the system and transferred through the thermal interface between the reactor and the heat exchanger; the reaction generates hydrogen, carbon monoxide, and carbon dioxide; S22: The reforming reaction gas is mixed with part of the SOFC anode tail gas, further heated, and enters the SOFC anode flow channel through the SOFC anode fluid interface; air is sent in by the blower, and after multi-stage heat exchange, it is mixed with part of the SOFC cathode tail gas, and enters the SOFC cathode flow channel through the SOFC cathode fluid interface; in the SOFC, the fuel gas further undergoes a reforming reaction, and hydrogen and oxygen undergo an electrochemical reaction; except for the circulating part of the anode and cathode tail gas, the rest is sent to the combustion chamber to increase the tail gas temperature and provide heat for gas preheating and reforming reaction; S23: System water-carbon ratio STCR , calculate the system import fuel utilization FU .
4. A joint simulation design method for fuel cell system modeling and control according to claim 3, characterized in that: In step S23, the system import fuel utilization rate is calculated FU By the following formula: ; ; In the formula, and are the molar flow rates of water and methane at the system inlet, I Indicates the output current.
5. The joint simulation design method for fuel cell system modeling and control according to claim 1, characterized in that: Step S3 specifically includes the following steps: S31: selection of control variables and controlled variables; According to the application requirements and safety constraints of the system, the control goal of the fuel cell system is to achieve accurate and rapid tracking of external loads on the basis of meeting the thermal safety of the system; therefore, the controlled variable is the net electric power of the system P net , SOFC cathode inlet temperature T in , SOFC PEN layer maximum temperature gradient max|Δ T PEN |, SOFC PEN layer maximum temperature max T PEN , calculated by the following formula: ; ; In the formula, P SOFC is the power generated by SOFC, P b and P p is the power consumption of the blower and water pump, is the distance between each node of SOFC; To achieve the control target, the system control variable is the battery current I , air flow , anode gas circulation rate ACR , cathode gas circulation rate CCR ,in, ACR and CCR Calculated by the following formula: ; ; In the formula, is the gas flow rate, the subscripts out and cir are the SOFC outlet gas flow rate and the circulating gas flow rate, respectively; S32: Identification model design; According to the above characteristics of the controlled variables and control variables, a four-input and four-output state space model is used to simulate the input and output characteristics of the system. The model is expressed as follows: ; In the formula, x m is the state variable, A m , B m , C m and D m To identify the model coefficient matrix, enter u Contains I , , ACR and CCR, Output y Contains P net , T in , max|Δ T PEN |With max T PEN .
6. A joint simulation design method for fuel cell system modeling and control according to claim 1, characterized in that: Step S4 specifically includes the following steps: S41: Change the prediction model to an incremental one, that is, use the difference form to represent each variable and augment it; ; in, ; According to the augmented state space equation, the output of the system in the future time domain is predicted: ; in, , , N p For the prediction time domain, N c To control the time domain; S42: The rolling optimization of MPC solves the cost function within the scope of model constraints to obtain the optimal control sequence of the system. Based on the optimization goal of this study, the cost function and related constraints of MPC are as follows: ; in, Y r ( k ) is the preset value of the system, Φ y , Φ u , Φ w is the weight matrix of tracking index, control index and electrical efficiency, , , and They are the maximum and minimum values of each control quantity, control quantity increment and output; S43: In actual operation of MPC, the influence of external disturbance and model mismatch is eliminated through feedback correction. Based on the error between the output result of the controlled mechanism model and the predicted value of the prediction model, the Kalman filter KF calculates the Kalman gain to update the system state variables.
7. A joint simulation design method for fuel cell system modeling and control according to claim 6, characterized in that: In step S43, the Kalman filter KF calculates the Kalman gain in the following specific steps: S431. Prior estimation based on prediction model ; ; in, is the posterior estimate matrix of the state variables at the previous moment, A m , B m is the identification model coefficient matrix, is the control variable matrix of the previous moment; S432, calculate Kalman gain K t ; in, for t The covariance matrix of the prior estimate of time, H is the conversion matrix from state variables to measurement variables, R is the covariance matrix of the measurement noise; S433, based on measured values z t and K t , to correct the state variables ; S434, Calculation t The covariance matrix of the posterior estimate at time P t ; S435, Update t The covariance matrix of the prior error at time +1 ; ; Where Q is the system noise covariance matrix; Finally, the basic parameters of the controller are set, including sampling period, modeling time domain N, prediction time domain P, and control time domain M.
8. The joint simulation design method for fuel cell system modeling and control according to claim 1, characterized in that: Step S5 specifically includes the following steps: S51, export the dynamic mechanism model established based on Modelica as a Functional Mock-up Unit file FMU that complies with the Functional Mock-upInterface standard FMI; S52, importing the above FMU file into SIMULINK, connecting the control quantity of the FMU file with the optimal control instruction of the MPC controller; connecting the controlled quantity of the FMU file with the KF observer to form a joint simulation system; S53, after the simulation starts, the FMU file calls the built-in solver of the FMU to obtain the controlled quantity of the system and pass it to the KF observer; S54, KF observer according to the current control command and the system controlled quantity, the state variables of the prediction model Update and correct, and pass to MPC; S55, MPC uses rolling optimization to solve the current optimal control instruction based on the control target and explicit constraints, and transmits it to the FMU to complete a control process; S56. The above steps are repeatedly executed until the control process ends.
9. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method of claim 1.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to claim 1 are implemented.
Citation Information
Cited By
Method for optimizing power generation of solid oxide fuel cell by using petroleum associated gas
CN120749186A
An Optimization Method for Power Generation from Solid Oxide Fuel Cells Utilizing Associated Petroleum Gas
CN120749186B
Modelica-based hydrogen fuel power generation system modeling method
CN121435449A
Solid oxide stack system model prediction control method, storage medium and equipment
CN121507004A
Carbon deposit constraint double-input model predictive control method for solid oxide fuel cell
CN122091650A