Dual-layer collaborative optimization control method and system for pemfc cogeneration

CN122532292APending Publication Date: 2026-08-07SHANDONG ELECTRIC POWER ENG CONSULTING INST CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG ELECTRIC POWER ENG CONSULTING INST CORP
Filing Date
2026-04-23
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

这种做法容易导致部分模块长期高负荷运行,而另一些模块则频繁启停或长期闲置,造成热应力不均、电堆老化速度差异增大,整体系统寿命下降

Benefits of technology

本发明的一种面向PEMFC热电联供系统的双层协同优化控制方法及系统,基于当前系统状态及二维性能映射表,构建上层优化目标函数,在上层周期内形成上层决策的指令;在下层动态仿真执行中,将上层决策的指令转化为各模块的实际电流指令并作为下层动态仿真的输入,通过求解描述模块动态的常微分方程组,模拟系统在周期内的连续响应;将下层动态仿真得到的当前系统新状态反馈至上层,将优化变量序列平移作为下一轮优化的热启动初始解,重复上下层交互优化,实现了电热协同优化、模块均匀配载、指令平稳执行,显著提升了系统效率、响应速度与电堆寿命。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122532292A_ABST
    Figure CN122532292A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of combined heat and power, and provides a double-layer cooperative optimization control method and system for PEMFC combined heat and power, which comprises the following steps: at the beginning of each upper-layer period, based on a current system state and a two-dimensional performance mapping table, an upper-layer optimization objective function is constructed, optimization variables include start-stop state matrices and current density matrices of each module in future steps, and an instruction of the upper-layer decision is formed in the upper-layer period; in lower-layer dynamic simulation execution, the instruction of the upper-layer decision is converted into actual current instructions of each module and is taken as an input of the lower-layer dynamic simulation; a current system new state obtained through the lower-layer dynamic simulation is fed back to the upper layer, a sequence of the optimization variables is translated as a hot start initial solution of next round optimization, the upper-layer and the lower-layer are repeatedly interacted and optimized, and rolling horizon control is formed. The method can realize electric-thermal cooperative optimization, uniform loading of modules, smooth execution of instructions, and significantly improves system efficiency, response speed and stack life.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of combined heat and power (CHP) technology, and in particular to a two-layer collaborative optimization control method and system for PEMFC CHP. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] In the actual operation of a proton exchange membrane fuel cell combined heat and power (PEMFC-CHP) system, it is necessary to simultaneously track dynamically changing electrical and thermal loads. Especially when facing fluctuations in user-side load, the system needs to frequently adjust its output power, which places extremely high demands on the real-time performance and coordination of the control strategy. In addition, while the parallel operation structure of multiple stacks can improve system capacity and redundancy, it also introduces optimization problems such as the timing of stack switching and the output distribution of each stack. It is necessary to achieve optimal global hydrogen consumption while meeting safety constraints such as the number of stack start-ups and shutdowns, current ramp-up rate, and minimum operating power.

[0004] In traditional PEMFC-CHP control methods, electrical load tracking is usually the primary objective, while thermal load is compensated for through lower-level PID regulation or simple threshold logic. These two processes are scheduled independently, lacking coordinated optimization. Existing solutions often employ a unidirectional transmission model between upper-level scheduling and lower-level execution, resulting in fragmented information exchange and lag in safety constraints. This can easily lead to commands exceeding the stack ramp-up capability or start-stop frequency limits, threatening system reliability and lifespan. Current methods often employ greedy strategies, simply distributing current evenly across all modules based on total power demand, or prioritizing the activation of some modules until power is met. This approach can easily lead to some modules operating at high loads for extended periods, while others experience frequent start-stops or prolonged idleness, causing uneven thermal stress, increased differences in stack aging rates, and a decreased overall system lifespan. Furthermore, frequent module start-stops and drastic current fluctuations can impact pressure and flow, affecting system stability and safety.

[0005] In summary, existing technologies have significant shortcomings in areas such as electrothermal coordination, module balancing, and rolling optimization in multi-module PEMFC-CHP systems, resulting in low overall efficiency, slow response speed, and short service life of PEMFC-CHP systems. Summary of the Invention

[0006] To address the aforementioned technical problems, this invention provides a two-layer collaborative optimization control method and system for PEMFC combined heat and power, which can achieve electrothermal collaborative optimization, uniform module loading, and smooth command execution, significantly improving system efficiency, response speed, and fuel cell stack life.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of the present invention provides a two-layer collaborative optimization control method for PEMFC combined heat and power.

[0008] In one or more embodiments, a two-layer collaborative optimization control method for PEMFC combined heat and power is provided, including: A dynamic mechanism model of a PEMFC combined heat and power system was constructed, and a two-dimensional performance mapping table was generated through calibration. At the beginning of each upper-level cycle, an upper-level optimization objective function is constructed based on the current system state and the two-dimensional performance mapping table. The optimization variables include the start-stop state matrix and current density matrix of each module in the future step, and the upper-level decision instructions are formed within the upper-level cycle. In the lower-level dynamic simulation execution, the instructions of the upper-level decision are converted into the actual current instructions of each module and used as the input of the lower-level dynamic simulation. By solving the set of ordinary differential equations describing the dynamics of the modules, the continuous response of the system in the cycle is simulated. After the simulation ends, the state variables at the end of the cycle are extracted as the initial state of the next upper-level cycle. At the same time, the actual net power output and effective heat supply in the current cycle are calculated. The new state of the current system obtained from the lower-level dynamic simulation is fed back to the upper level. The optimized variable sequence is shifted as the initial solution for the hot start of the next round of optimization. The upper and lower levels interact and optimize repeatedly to form rolling time-domain control.

[0009] As one implementation, the two-dimensional performance mapping table describes the steady-state output power, hydrogen consumption rate, effective heat recovery power, and first-order time constant of power response of a single module under different combinations of water tank temperature and current density.

[0010] As one implementation method, an online model mismatch compensation mechanism is introduced to ensure that the upper-level optimization is consistent with the real system. The online model mismatch compensation mechanism is as follows: using an exponentially weighted moving average method, the predicted values ​​of the subsequent start-stop state matrix and current density matrix are corrected in real time based on the deviation between the historical actual output and the prediction made by looking up the two-dimensional performance mapping table.

[0011] As one implementation method, the dynamic mechanism model of the PEMFC combined heat and power system also integrates start-up and shutdown timing control logic, which is as follows: during startup, the gas supply conditions are first established and the fuel cell stack is preheated. After the temperature and pressure meet the interlocking requirements, the current is loaded to the target value with a controlled slope. During shutdown, the current is first unloaded with a controlled slope, then purging and cooling are performed, and finally, the system enters a low-power standby state.

[0012] As one implementation method, the dynamic mechanism model of the PEMFC combined heat and power system includes an electrochemical model of the fuel cell stack, a thermal dynamic model of the fuel cell stack, a cathode gas supply and compressor model, an intercooler model, a cathode pressure dynamic model, an anode hydrogen supply model, an auxiliary cooling circuit model, and a shared water tank thermal balance model.

[0013] As one implementation method, the upper-level optimization objective function consists of electrical load tracking error, power spike penalty, hydrogen consumption cost, thermal load coverage penalty, switching frequency penalty, current ramp-up penalty, load balancing penalty, degradation perception penalty, minimum start-stop time constraint, hard constraint soft penalty for current change rate, module fair use / rotation penalty, and machine shortage penalty.

[0014] As one implementation method, based on the upper-level optimization objective function, the particle swarm optimization algorithm is used to solve the optimization variables. The population initialization adopts a hybrid strategy: a% of the particles are randomly generated, and (1-a%) of the particles are generated by adding Gaussian noise based on the optimal solution of the previous time step.

[0015] A second aspect of the present invention provides a two-layer collaborative optimization control system for PEMFC combined heat and power.

[0016] In one or more embodiments, a two-layer collaborative optimization control system for PEMFC combined heat and power includes: The model building and mapping table generation module is used to build a dynamic mechanism model of the PEMFC combined heat and power system and generate a two-dimensional performance mapping table through calibration. The upper-level rolling optimization decision module is used to construct the upper-level optimization objective function at the beginning of each upper-level cycle based on the current system state and the two-dimensional performance mapping table. The optimization variables include the start-stop state matrix and current density matrix of each module in the future step, and form the upper-level decision instructions within the upper-level cycle. The lower-level dynamic simulation execution module is used to convert the upper-level decision instructions into actual current instructions for each module and use them as input for the lower-level dynamic simulation. By solving the set of ordinary differential equations describing the module dynamics, it simulates the continuous response of the system within a cycle. After the simulation ends, it extracts the state variables at the end of the cycle as the initial state of the next upper-level cycle, and calculates the actual net power output and effective heat supply in the current cycle. The state feedback and rolling advancement module is used to feed back the new state of the current system obtained from the lower-level dynamic simulation to the upper level, and to use the shifted sequence of optimization variables as the initial solution for the hot start of the next round of optimization. The upper and lower levels interact and optimize repeatedly to form rolling time-domain control.

[0017] A third aspect of the present invention provides a computer-readable storage medium.

[0018] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the two-layer collaborative optimization control method for PEMFC cogeneration as described above.

[0019] A fourth aspect of the present invention provides an electronic device.

[0020] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the two-layer collaborative optimization control method for PEMFC cogeneration as described above.

[0021] Compared with the prior art, the beneficial effects of the present invention are: This invention discloses a two-layer collaborative optimization control method and system for PEMFC combined heat and power systems. Based on the current system state and a two-dimensional performance mapping table, an upper-layer optimization objective function is constructed, generating upper-layer decision-making instructions within the upper-layer cycle. During the lower-layer dynamic simulation execution, the upper-layer decision-making instructions are transformed into actual current instructions for each module and used as input for the lower-layer dynamic simulation. By solving a set of ordinary differential equations describing the module dynamics, the continuous response of the system within the cycle is simulated. The new system state obtained from the lower-layer dynamic simulation is fed back to the upper layer, and the optimized variable sequence is shifted as the initial solution for the hot start of the next round of optimization. This process of repeated upper and lower-layer interactive optimization achieves electrothermal collaborative optimization, uniform module load distribution, and smooth instruction execution, significantly improving system efficiency, response speed, and fuel cell stack life. Attached Figure Description

[0022] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0023] Figure 1 This is a flowchart of a two-layer collaborative optimization control method for PEMFC combined heat and power according to an embodiment of the present invention; Figure 2 This is a graph showing the electrical load tracking performance of an embodiment of the present invention; Figure 3 This is a graph showing the heat load tracking performance of an embodiment of the present invention; Figure 4 This is a module current thermal map (including start-stop information) according to an embodiment of the present invention. Figure 5 This is a schematic diagram of the two-layer collaborative optimization control system structure for PEMFC combined heat and power according to an embodiment of the present invention; Figure 6 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0024] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0025] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0026] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0027] The decoupling control strategy in traditional PEMFC-CHP control methods suffers from the following problems in practical operation: First, there is a strong coupling relationship between electrical load and thermal load. While the fuel cell stack generates electricity, it produces a large amount of waste heat, which is recovered to the water tank through a heat exchanger to meet users' hot water needs. If scheduling is based solely on electrical load, the water tank temperature may drop too quickly, failing to cover subsequent thermal loads. Conversely, if scheduling is based solely on thermal load, it may result in excessive or insufficient electrical power, affecting power supply reliability. This electrical-thermal contradiction is particularly prominent in residential scenarios because users' hot water needs are often intermittent and random. Furthermore, most existing control methods lack the ability to predict future load changes. Traditional PID or logic control adjusts only based on the current error, failing to respond in advance to rising or falling load trends, leading to system response lag. This is especially problematic during rapid load fluctuations, easily resulting in power overshoot or insufficient heating. Although recent research has attempted to apply model predictive control to fuel cell systems, most studies are limited to a single module or only consider electrical power, failing to incorporate the thermal system state (such as water tank temperature) into the optimization model, thus failing to truly achieve electrical-thermal synergy.

[0028] Existing technical solutions often employ a unidirectional transmission model between upper-level scheduling and lower-level execution, resulting in the following technical bottlenecks: First, fragmented information exchange. Upper-level optimization allocates power based on an idealized model, but the lower-level execution layer, constrained by the large time delays of thermal management and the response latency of auxiliary equipment, often fails to accurately track upper-level commands, leading to "optimization results not being implemented." Second, lagging safety constraints. Due to the lack of a coordinated feedback mechanism between upper and lower levels, during periods of severe load fluctuations or multi-stall switching, the upper-level scheduler cannot perceive the health status and thermal balance boundaries of the fuel cells in real time, easily issuing commands exceeding the fuel cell ramp-up capability or start-stop frequency limits, threatening the reliability and lifespan of the system.

[0029] To address the issues of low overall efficiency, slow response speed, and short lifespan in existing PEMFC-CHP systems due to limitations in electrothermal coordination, module balancing, and rolling optimization, this invention provides a two-layer collaborative optimization control method and system for PEMFC combined heat and power. By explicitly incorporating the water tank temperature into the upper-level scheduling state, employing mixed integer particle swarm optimization to achieve unified decision-making between discrete start / stop and continuous current density, and introducing a dynamic load balancing mechanism, this invention achieves electrothermal collaborative optimization, uniform module load distribution, and smooth command execution, significantly improving system efficiency, response speed, and fuel cell stack lifespan.

[0030] Figure 1 A schematic diagram of a two-layer collaborative optimization control method for PEMFC combined heat and power (CHP) according to an embodiment of the present invention is provided. Figure 1 The two-layer collaborative optimization control method for PEMFC cogeneration in this embodiment may include the following steps S101 to S104.

[0031] The specific implementation process of steps S101 to S104 is as follows: Step S101: Construct a dynamic mechanism model of the PEMFC combined heat and power system and generate a two-dimensional performance mapping table through calibration.

[0032] For each fuel cell module, a system of differential equations describing the evolution of its key states is established. The state vector includes: stack temperature. Heat exchange capacity of stack-water tank Current Compressor speed Cathode pressure Intercooler heat exchange power Pressure control integral term Intercooler outlet temperature Anode injection valve opening Anode circulation pump opening Auxiliary cooling circuit temperature In addition, the temperature of the shared water tank. This represents the global state. The subscript m indicates the m-th fuel cell module, where m = 1, 2, …, M, and M is the total number of modules. In this embodiment, M = 10.

[0033] The dynamic mechanism model of the PEMFC combined heat and power system includes the stack electrochemical model, the stack thermal dynamic model, the cathode gas supply and compressor model, the intercooler model, the cathode pressure dynamic model, the anode hydrogen supply model, the auxiliary cooling circuit model, and the shared water tank thermal balance model.

[0034] (1) Electrochemical model of the fuel cell stack; The output voltage of a single cell is calculated using a semi-empirical voltage model. : ; in , These are the voltage divisions at the anode and cathode, respectively. The gas constant is... It is Faraday's constant; This refers to the stack temperature. The cathode oxygen partial pressure is determined by the cathode pressure. and water vapor saturation pressure calculate: ; Activation overpotential: ; in For current density, The cathode oxygen concentration. Ohmic overpotential. : ; The internal equivalent resistance of the fuel cell stack (Ω·cm²) includes film resistance, contact resistance, etc., and is a constant parameter.

[0035] Concentration overpotential : ; Where R: ideal gas constant, 8.314 J / (mol·K); : Pile temperature (K); F: Faraday constant, 96485 C / mol; l i: Current density (A / cm²) Limiting current density (A / cm²): When the current density approaches this value, the concentration overpotential approaches infinity.

[0036] single cell voltage : ; Total power of fuel cell stack (DC side): ; in, : The number of individual battery cells connected in series within a single module (a constant in this model); Single-cell voltage (V), calculated from an electrochemical model; Total current of fuel cell stack (A). Electrochemical heat generation : ; (2) Thermal dynamics model of the fuel cell stack; The temperature change of the fuel cell stack is caused by heat generation and heat exchange between the stack and the water tank. and heat dissipation Decide: ; in This refers to the heat capacity of the fuel cell stack. Heat dissipation power includes natural convection and forced fan cooling. ; in, : The heat dissipation power (W) of the m-th module; Natural convection heat dissipation coefficient (W / K); Forced fan cooling coefficient (W / K); : Pile temperature (K); Ambient temperature (K); The fan activation factor (0~1) is determined by the thermal management controller based on the heat dissipation requirements.

[0037] The dynamics of the stack-tank heat exchanger are described using first-order hysteresis: ; in These are commands for the thermal management controller, limited by the physical maximum heat transfer capacity: ; (3) Cathode gas supply and compressor model; Compressor speed dynamics: ; in Provided by the air supply controller. Compressor mass flow rate and power consumption are obtained through map interpolation. For a given speed N and target pressure ratio... First, obtain the equivalent mass flow rate under the corresponding rotational speed line from the map. and isentropic efficiency Then calculate the actual mass flow rate: ; Compressor outlet temperature: ; The compressor consumes electrical power: ; (4) Intercooler model; The intercooler recovers compression heat and transfers it to the water tank. The heat transfer potential is calculated using the ε-NTU method. ; ; ; Heat exchange efficiency: ; Maximum possible heat exchange: ; The actual amount of heat recovered is limited by the compressor power ratio: ; in This is a proportionality coefficient. Recovered heat is calculated based on the split coefficient. Distributed to water tank: ; The intercooler outlet temperature is determined by the thermal management controller based on the water tank temperature and heat dissipation requirements. ; The heat transfer dynamics of the intercooler are described using first-order hysteresis: ; (5) Dynamic model of cathode pressure; To simplify calculations and ensure numerical stability, a first-order follower model is used for the cathode pressure: ; in Provided by the air supply controller (set according to the operating mode). Let be the pressure response time constant. The rate of pressure change is limited by physical limits. ; And the pressure value is always kept within a safe range: ; (6) Anode hydrogen supply model; A simplified anode model is used, assuming constant anode pressure. Both the hydrogen injection valve and the circulation pump are described using first-order hysteresis.

[0038] ; ; in, : The actual opening degree (0~100%) of the anode injection valve of the m-th module.

[0039] : The injection valve opening command (0~100%) given by the controller.

[0040] Actuator time constant (s): reflects how fast the valve responds.

[0041] Maximum change rate limit of actuator (% / s) to prevent sudden changes in instructions.

[0042] Similarly, For the opening degree of the circulating pump, This is the opening command for the circulating pump.

[0043] The hydrogen injection flow rate and circulation flow rate are both proportional to the valve opening: ; in, Hydrogen injection mass flow rate (kg / s).

[0044] : Maximum mass flow rate (kg / s) when the injection valve is fully open.

[0045] Hydrogen circulation pump flow rate (kg / s).

[0046] : Maximum circulation flow rate (kg / s) when the circulation pump is fully open.

[0047] The total hydrogen consumption rate (injection rate) at the anode is: The power consumption of the circulating pump is approximately: ; (7) Auxiliary cooling circuit model; The auxiliary cooling circuit is used to cool equipment such as DC / DC converters, compressor inverters, etc. Its thermal dynamics are as follows: ; in: Heat production ; Heat recovery If the temperature is higher than the return water temperature, it will be recycled to the user side; Heat dissipation ; The fan duty cycle is determined by the temperature controller.

[0048] (8) Shared water tank heat balance model; The water tank receives heat from all modules' heat exchangers (stack heat exchanger) Heat exchange with intercooler It also supplies heat to users and may include auxiliary electric heating:

[0049] in For the heat capacity of the water tank, , , These are the heat loss coefficients of the piping from the heat exchanger and intercooler to the water tank, respectively. This is the electric heating power (activated when the water tank temperature is lower than the set value). For user-side water flow, , For supply and return water temperatures (usually) Set by the controller, (Measured value).

[0050] Specifically, the two-dimensional performance mapping table describes the steady-state output power, hydrogen consumption rate, effective heat recovery power, and first-order time constant of the power response of a single module under different combinations of water tank temperature and current density. The two-dimensional performance mapping table, describing the output power, hydrogen consumption rate, effective heat recovery power, and first-order time constant of the power response of a single module, can be generated through offline simulation or experimental calibration. With current density In combination, the steady-state output power of a single module Hydrogen consumption rate and effective heat recovery power and the first-order time constant of the power response This time constant reflects the dynamic characteristics of the module power transition from its current value to its steady-state value. It is obtained by recording the time it takes for the power response curve to reach 63.2% of its steady-state value at each operating point. These data form a two-dimensional performance mapping table, and an interpolation function (such as griddedInterpolant) is used to enable fast online lookup.

[0051] The two-dimensional performance mapping employs a two-dimensional interpolation function with water tank temperature and current density as independent variables, namely: ; The state of the thermal system is explicitly incorporated into the upper-level scheduling model.

[0052] In other embodiments, the dynamic mechanism model of the PEMFC cogeneration system also integrates start-up and shutdown timing control logic, which is as follows: during startup, gas supply conditions are first established and the fuel cell stack is preheated. After the temperature and pressure meet the interlocking requirements, the current is loaded to the target value with a controlled slope. During shutdown, the current is first unloaded with a controlled slope, then purging and cooling are performed, and finally, a low-power standby state is entered.

[0053] Step S102: At the beginning of each upper-level cycle, based on the current system state and the two-dimensional performance mapping table, construct the upper-level optimization objective function. The optimization variables include the start-stop state matrix and current density matrix of each module in the future steps, and form the upper-level decision instructions within the upper-level cycle.

[0054] In each upper-level cycle Initially, based on the current system state—including the water tank temperature Current start / stop status of each module With current density Cumulative equivalent usage (For example, by) Points), consecutive steps taken after booting up Steps to power off —and electricity load forecasts for the next N cycles and heat load forecast Construct a multi-objective optimization problem. The optimization variable is the start-stop state matrix of each module over the next N steps. and current density matrix .

[0055] The upper-level optimization objective function consists of the following: electrical load tracking error, power peak penalty, hydrogen consumption cost, thermal load coverage penalty, switching frequency penalty, current ramp penalty, load balancing penalty, degradation perception penalty, minimum start-stop time constraint, hard constraint and soft penalty for current change rate, module fair use / rotation penalty, and machine shortage penalty.

[0056] The objective function comprehensively considers multiple performance indicators and security constraints, and its general form is as follows: ; The specific meanings and calculation formulas for each item are as follows: Electrical load tracking error The weighted sum of squares is used, with the weight of undersupply being higher than that of oversupply, in order to prioritize ensuring power supply reliability.

[0057] ; in The weighting for undersupply is greater than the weighting for oversupply, that is... To prioritize ensuring the reliability of power supply.

[0058] Power spike penalty To avoid significant power overshoot and improve power supply quality.

[0059] ; The cost of hydrogen consumption : ; Heat load coverage penalty Both insufficient heating and excessive heating will be considered and penalties will be imposed accordingly.

[0060]

[0061] in .

[0062] Penalty for number of on / off cycles Suppress frequent start-stop of the module.

[0063] ; Current ramp penalty : Limit drastic changes in current density.

[0064] ; Load balancing penalty This ensures a uniform current distribution in the power-on module, reducing differences in thermal fatigue.

[0065] ; in , .

[0066] In other embodiments, the load balancing penalty is implemented by calculating the variance of the current density of the power-on module, i.e.: This item is zero when the number of powered-on modules is less than or equal to 1.

[0067] Degenerative perception penalty This suppresses the module from operating under high load for extended periods, thus extending its lifespan.

[0068] ; Minimum start-stop time constraints Penalize behaviors that violate the minimum uptime / downtime.

[0069] ; Hard constraint and soft penalty for rate of change of current Penalize the portion of the current change that exceeds the maximum allowable change in each step.

[0070] ; Module fair use / rotation penalty Based on the cumulative equivalent usage, prioritize the use of modules with low usage and promote a balance in usage among modules.

[0071] ; in For module Cumulative equivalent usage (e.g.) ), This represents the standard deviation of current usage. Additionally, a penalty is applied to the initial action of activating the high-usage module: .

[0072] Missing machine penalty A penalty is imposed when the number of powered-on modules deviates significantly from the required number.

[0073] ; in The required number of modules.

[0074] To accurately reflect the actual dynamic process, the upper-level optimization involves table lookup calculations. At that time, a time constant-based approach is introduced. A first-order dynamic prediction model to replace simple steady-state lookup: ; in For module The power at the end of the previous step, For steady-state lookup table power, This is the upper-level cycle. This dynamic prediction significantly improves the accuracy of the upper-level estimation of the power response process.

[0075] In this embodiment, considering the limited output during the cold reactor startup phase, a startup availability factor is introduced. This factor is based on the current reactor temperature. Calculate a value between Availability coefficient and the table lookup results Multiply by this coefficient to reflect the power reduction during the initial startup phase.

[0076] This embodiment introduces an online model mismatch compensation mechanism to ensure that the upper-level optimization is consistent with the real system. The online model mismatch compensation mechanism is as follows: using an exponentially weighted moving average method, the predicted values ​​of the subsequent start-stop state matrix and current density matrix are corrected in real time based on the deviation between the historical actual output and the prediction made by looking up the two-dimensional performance mapping table.

[0077] ; in, : Power prediction deviation correction value (kW) at the end of the kth slow layer cycle.

[0078] : The smoothing factor (0 < α < 1) of the exponentially weighted moving average controls the rate of bias updates.

[0079] : Actual net power (kW) obtained from the lower-level simulation.

[0080] Net power (kW) predicted by the upper layer based on the two-dimensional table.

[0081] Corrected bias The forecast value will be superimposed on the next period. and This is done to compensate for model errors, thereby effectively addressing performance drift caused by model errors and aging.

[0082] Based on the upper-level optimization objective function, the particle swarm optimization algorithm is used to solve the optimization variables. The population initialization adopts a hybrid strategy: a% (e.g., 70%) of the particles are randomly generated, and (1-a%) (e.g., 30%) of the particles are generated by adding Gaussian noise based on the optimal solution of the previous time step.

[0083] This optimization problem belongs to mixed-integer nonlinear programming and is solved using the particle swarm optimization algorithm. After optimization, only the first set of instructions is processed. Issue and execute the command to accelerate convergence and improve solution quality.

[0084] Preferably, the specific solution process of the particle swarm optimization algorithm includes the following sub-steps: Sub-step 2.1: Population initialization; Let the population size be P, and the decision variable dimension be ? (Where M is the number of modules and N is the prediction step size). To accelerate convergence and utilize historical information, a hybrid initialization strategy is adopted: 70% of the particles are randomly generated within the feasible region of the decision variables, and 30% of the particles are based on the optimal solution from the previous time step. Add Gaussian noise to generate, i.e. ; in The standard deviation of noise. This represents element-wise multiplication. This is the hot-start particle index set. After initialization, the positions of all particles are clamped to the feasible region. .

[0085] Sub-step 2.2: Speed ​​initialization and limiting; The initial velocity of all particles is set to Set maximum speed limit. minimum speed .

[0086] Sub-step 2.3: Iterative optimization; For each generation (G is the maximum number of iterations), perform the following operations: Calculate the fitness value of all current particles. .

[0087] Update the individual optimal position of each particle. and the globally optimal position gbest: ; Update particle velocity: ; Where w is the inertia weight, , As a learning factor, It is a random vector uniformly distributed in the interval [0,1].

[0088] Limit the speed: .

[0089] Update particle positions: .

[0090] Clamp the position to the feasible region: .

[0091] Sub-step 2.4: Output the optimal solution; After the iteration is complete, output the globally optimal position. As the optimal decision variable for the current upper-level cycle, the first set of instructions is extracted from it. , .

[0092] Step S103: In the execution of the lower-level dynamic simulation, the instructions of the upper-level decision are converted into the actual current instructions of each module and used as the input of the lower-level dynamic simulation. By solving the set of ordinary differential equations describing the dynamics of the modules, the continuous response of the system in the cycle is simulated. After the simulation ends, the state variables at the end of the cycle are extracted as the initial state of the next upper-level cycle. At the same time, the actual net power output and effective heat supply in the current cycle are calculated.

[0093] In the upper cycle Internally, the instructions from the upper-level decision-making are translated into actual current instructions for each module. This data serves as input for the lower-level dynamic simulation. The continuous response of the system within a period is simulated by solving a system of ordinary differential equations describing the module's dynamics. Key differential equations include: Cell stack temperature dynamics: ; in For electrochemical heat generation, This refers to heat dissipation power. Heat capacity of fuel cell stack (J / K) includes the heat capacity of solid components of the fuel cell stack and the coolant. : The stack temperature (K) of the m-th module. Electrochemical heat generation power (W). Heat power (W) transferred to the tank through the stack-tank heat exchanger. Heat power (W) lost to the environment through fans and natural convection.

[0094] Current response: ; in, : The actual current (A) of the m-th module. : Upper layer command current (A). : Equivalent time constant (s) of DC / DC converter and current loop. : Maximum permissible rate of change of current (A / s), physical limit.

[0095] Compressor speed: ; in, : The actual speed (rpm) of the air compressor in the m-th module. Target speed (rpm) output by the air supply controller. : Equivalent time constant (s) of motor and driver.

[0096] Satisfy boundary clamping: ; in, : Cathode pressure (Pa) of the m-th module. The lower limit of cathode pressure (Pa) is usually the ambient pressure. The upper limit of cathode pressure (Pa) is determined by the mechanical safety limit.

[0097] Intercooler heat exchange dynamics: ; in, : The actual heat power (W) recovered by the intercooler in the m-th module and transferred to the water tank. The commanded thermal power (W) calculated by the intercooler controller is obtained based on the ε-NTU method. : Time constant (s) for heat exchange in the intercooler.

[0098] Anode actuator dynamics: ; Similarly for .

[0099] Auxiliary cooling circuit temperature: ; in, The heat capacity (J / K) of the auxiliary cooling circuit, including the coolant and related components.

[0100] Temperature (K) of the auxiliary cooling circuit of the m-th module.

[0101] The heat output power (W) of the auxiliary circuit includes losses in the DC / DC converter, compressor inverter, and circulating pump.

[0102] The heat power (W) recovered by the auxiliary circuit to the user side occurs when the circuit temperature is higher than the return water temperature.

[0103] The heat power (W) lost to the environment by the auxiliary circuit through the fan.

[0104] The simulation employs a variable-step-size rigid solver (such as ode15s) for numerical integration to ensure accuracy and stability. After the simulation, the state variables at the end of each cycle are extracted. This serves as the initial state for the next upper-level cycle, while simultaneously calculating the actual net electrical power output and effective heat supply within that cycle.

[0105] Step S104: Feed back the new state of the current system obtained from the lower-level dynamic simulation to the upper level, and use the shifted sequence of optimization variables as the initial solution for the hot start of the next round of optimization. Repeat the interaction optimization between the upper and lower levels to form rolling time-domain control.

[0106] The new state obtained from the lower-level simulation is fed back to the upper-level optimization module, and the subsequent instruction sequence obtained from the optimization is also fed back. The translation serves as the initial deduplication for the hot start of the next round of optimization, repeating steps S102 to S104 to form rolling time-domain control.

[0107] The lower-level dynamic simulation uses a variable step size rigid solver (such as ode15s) for numerical integration to adapt to the numerical rigidity caused by the coexistence of fast and slow dynamics, and to ensure simulation accuracy and stability.

[0108] This invention achieves coordinated optimization of electricity and heat. By explicitly incorporating water tank temperature into the upper-level scheduling state and directly reflecting its impact on electrical power, hydrogen consumption, and heat recovery in a two-dimensional performance mapping, the optimization layer can anticipate thermal coupling effects and avoid electricity-heat conflicts from the source. Simulation results show that, under typical community load scenarios, the electrical load tracking error is less than 5%, and the heat load shortage time accounts for less than 5%, effectively ensuring user energy comfort.

[0109] Figure 2 This is a load tracking performance graph. The horizontal axis represents 24 hours in a day; the vertical axis represents electrical power (kW). The orange dashed line represents the actual electricity demand of community residents; the blue solid line represents the actual electricity generated by the micro-power station. Figure 2It can be seen that the upper-level scheduling algorithm of this invention is extremely sensitive and accurate. Since electricity cannot be stored in large quantities and at will, the system achieves "power generation on demand," with neither undersupply nor oversupply, avoiding situations of power resource shortage or waste.

[0110] Figure 3 This is a heat load tracking performance curve. The horizontal axis represents 24 hours in a day; the vertical axis represents heat output (kW). The pink dashed line (obscured below) represents the actual hot water / heating demand in the community; the green solid line represents the actual heat delivered to residents by the system. According to... Figure 3 It can be seen that the CHP (combined heat and power) system, together with the hot water storage tank, buffers the heat energy, stores excess heat, and releases it precisely when heat is needed, thus achieving heat load tracking.

[0111] Figure 4 This is a module current heatmap. The horizontal axis represents a 24-hour day; the vertical axis (1 to 10) represents the 10 independent small generators (modules) in the system. Color depth represents the generator's output (current density): Dark red: full load operation; Yellow / green: half load operation; Pure white: shutdown and rest. Figure 4 It can be seen that PSO (Particle Swarm Optimization) performs discrete-continuous hybrid optimization, shutting down some equipment under low load and rotating its operation, which greatly extends the lifespan of the fuel cell stack. When power is needed, the color distribution among the activated modules is relatively uniform, corresponding to the "uniform power distribution penalty," and the extreme situation of "one machine at full load while another machine is shut down" does not occur.

[0112] This invention solves the problem of multi-module hybrid decision-making. It employs a particle swarm optimization algorithm to uniformly handle discrete start-stop and continuous current density variables, and uses switching penalties and ramp-up penalties to suppress frequent start-stops and drastic fluctuations, ensuring smooth and executable scheduling commands. The solution time for a single upper-level cycle is less than 1 second, meeting the requirements of online applications and extending the stack life.

[0113] This invention introduces a dynamic load balancing mechanism. By adding a penalty for the variance of the current density of the power-on modules to the optimization objective, the current distribution of each module is forced to become more consistent, thus avoiding overload of some modules and idleness of others.

[0114] This invention improves system robustness through state feedback and rolling updates. Lower-level simulation results are fed back to the upper level in real time, ensuring that optimization is always based on the actual state. This allows for timely correction of model biases and load fluctuations, resulting in control precision superior to open-loop scheduling methods.

[0115] This invention comprehensively considers practical engineering constraints such as module lifespan balancing, start-stop timing constraints, and current change rate limits, significantly improving the system's safety and durability, and greatly reducing current surges.

[0116] This invention has good scalability. Its control architecture does not depend on a specific number or model of modules, and can be flexibly applied to multi-module fuel cell systems of different scales. It can also be extended to other multi-energy coupling scenarios, such as photovoltaic-hydrogen production and wind power-energy storage, and has broad industrial application prospects.

[0117] like Figure 5 As shown, the two-layer collaborative optimization control system for PEMFC cogeneration provided in this embodiment of the invention can be implemented in software. The two-layer collaborative optimization control system for PEMFC cogeneration includes the following software modules: The model building and mapping table generation module 501 is used to build a dynamic mechanism model of the PEMFC combined heat and power system and generate a two-dimensional performance mapping table through calibration. The upper-level rolling optimization decision module 502 is used to construct the upper-level optimization objective function at the beginning of each upper-level cycle based on the current system state and the two-dimensional performance mapping table. The optimization variables include the start-stop state matrix and current density matrix of each module in the future step, and form the upper-level decision instructions within the upper-level cycle. The lower-level dynamic simulation execution module 503 is used to convert the upper-level decision instructions into actual current instructions for each module and use them as input for the lower-level dynamic simulation. By solving the set of ordinary differential equations describing the module dynamics, it simulates the continuous response of the system within a cycle. After the simulation ends, it extracts the state variables at the end of the cycle as the initial state of the next upper-level cycle, and calculates the actual net power output and effective heat supply in the current cycle. The state feedback and rolling advancement module 504 is used to feed back the current new state of the system obtained from the lower dynamic simulation to the upper layer, and use the translation of the optimization variable sequence as the initial solution for the hot start of the next round of optimization. The upper and lower layers interact and optimize repeatedly to form rolling time domain control.

[0118] It should be noted that each module in the two-layer collaborative optimization control system for PEMFC cogeneration in this embodiment corresponds one-to-one with each step in the two-layer collaborative optimization control method for PEMFC cogeneration in the above embodiment, and their specific implementation processes are the same, so they will not be repeated here.

[0119] The structure of the electronic device according to an embodiment of the present invention will be described in detail below. Figure 6 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of the present invention. It can be understood that... Figure 6 The diagram shows only an exemplary structure of the electronic device, not the entire structure. Some or all of the structures shown may be implemented as needed.

[0120] The electronic device provided in this embodiment of the invention includes: at least one processor 601, a memory 602, a user interface 603, and at least one network interface 604. The various components in the two-layer collaborative optimization control system for PEMFC cogeneration are coupled together via a bus system 605. It can be understood that the bus system 605 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 605 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 6 The general designated all buses as Bus System 605.

[0121] The user interface 603 may include a monitor, keyboard, mouse, trackball, click wheel, buttons, touchpad, or touch screen.

[0122] It is understood that memory 602 can be volatile memory or non-volatile memory, or both. In this embodiment of the invention, memory 602 is capable of storing data to support the operation of the terminal. Examples of this data include any computer programs used to operate on the terminal, such as operating systems and applications. The operating system includes various system programs, such as framework layers, core library layers, driver layers, etc., used to implement various basic services and handle hardware-based tasks. Applications can include various applications.

[0123] In some embodiments, the two-layer collaborative optimization control system for PEMFC cogeneration provided in this invention can be implemented using a combination of hardware and software. For example, the two-layer collaborative optimization control system for PEMFC cogeneration provided in this invention can be a processor in the form of a hardware decoding processor, programmed to execute the two-layer collaborative optimization control method for PEMFC cogeneration provided in this invention. For instance, the processor in the form of a hardware decoding processor can employ one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0124] As an example, processor 601 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0125] As an example of the hardware implementation of the two-layer collaborative optimization control system for PEMFC cogeneration provided in this embodiment of the invention, the device provided in this embodiment of the invention can be directly executed by a processor 601 in the form of a hardware decoding processor. For example, it can be executed by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components to implement the two-layer collaborative optimization control method for PEMFC cogeneration provided in this embodiment of the invention.

[0126] The memory 602 in this embodiment of the invention is used to store various types of data to support the operation of a two-layer collaborative optimization control system for PEMFC cogeneration, or to store data for execution. Figure 1 The program code for the method shown. Examples of this data include: any executable instructions for operation on a two-layer collaborative optimization control system for PEMFC cogeneration, such as executable instructions that can be included in the executable instructions to implement the two-layer collaborative optimization control method for PEMFC cogeneration of the present invention.

[0127] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including functions for executing... Figure 1 The program code for the method shown. In such an embodiment, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by the central processing unit, it performs the various functions defined in the apparatus of this application.

[0128] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0129] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A two-layer collaborative optimization control method for PEMFC combined heat and power, characterized in that, include: A dynamic mechanism model of a PEMFC combined heat and power system was constructed, and a two-dimensional performance mapping table was generated through calibration. At the beginning of each upper-level cycle, an upper-level optimization objective function is constructed based on the current system state and the two-dimensional performance mapping table. The optimization variables include the start-stop state matrix and current density matrix of each module in the future step, and the upper-level decision instructions are formed within the upper-level cycle. In the lower-level dynamic simulation execution, the instructions of the upper-level decision are converted into the actual current instructions of each module and used as the input of the lower-level dynamic simulation. By solving the set of ordinary differential equations describing the dynamics of the modules, the continuous response of the system in the cycle is simulated. After the simulation ends, the state variables at the end of the cycle are extracted as the initial state of the next upper-level cycle. At the same time, the actual net power output and effective heat supply in the current cycle are calculated. The new state of the current system obtained from the lower-level dynamic simulation is fed back to the upper level. The optimized variable sequence is shifted as the initial solution for the hot start of the next round of optimization. The upper and lower levels interact and optimize repeatedly to form rolling time-domain control.

2. The two-layer collaborative optimization control method for PEMFC combined heat and power as described in claim 1, characterized in that, The two-dimensional performance mapping table describes the steady-state output power, hydrogen consumption rate, effective heat recovery power, and first-order time constant of power response of a single module under different combinations of water tank temperature and current density.

3. The two-layer collaborative optimization control method for PEMFC combined heat and power as described in claim 1, characterized in that, An online model mismatch compensation mechanism is introduced to ensure that the upper-level optimization is consistent with the real system. The online model mismatch compensation mechanism is as follows: using the exponential weighted moving average method, the predicted values ​​of the subsequent start-stop state matrix and current density matrix are corrected in real time based on the deviation between the historical actual output and the prediction made by looking up the two-dimensional performance mapping table.

4. The two-layer collaborative optimization control method for PEMFC combined heat and power as described in claim 1, characterized in that, The dynamic mechanism model of the PEMFC combined heat and power system also integrates start-up and shutdown timing control logic, which is as follows: during startup, gas supply conditions are first established and the fuel cell stack is preheated. After the temperature and pressure meet the interlocking requirements, the current is loaded to the target value with a controlled slope. During shutdown, the current is first unloaded with a controlled slope, then purging and cooling are performed, and finally, the system enters a low-power standby state.

5. The two-layer collaborative optimization control method for PEMFC combined heat and power as described in claim 1, characterized in that, The dynamic mechanism model of the PEMFC combined heat and power system includes the stack electrochemical model, the stack thermal dynamic model, the cathode gas supply and compressor model, the intercooler model, the cathode pressure dynamic model, the anode hydrogen supply model, the auxiliary cooling circuit model, and the shared water tank thermal balance model.

6. The two-layer collaborative optimization control method for PEMFC combined heat and power as described in claim 1, characterized in that, The upper-level optimization objective function consists of the following: electrical load tracking error, power peak penalty, hydrogen consumption cost, thermal load coverage penalty, switching frequency penalty, current ramp penalty, load balancing penalty, degradation perception penalty, minimum start-stop time constraint, hard constraint and soft penalty for current change rate, module fair use / rotation penalty, and machine shortage penalty.

7. The two-layer collaborative optimization control method for PEMFC combined heat and power as described in claim 1, characterized in that, Based on the upper-level optimization objective function, the particle swarm optimization algorithm is used to solve the optimization variables. The population initialization adopts a hybrid strategy: a% of the particles are randomly generated, and (1-a%) of the particles are generated by adding Gaussian noise based on the optimal solution of the previous time step.

8. A two-layer collaborative optimization control system for PEMFC combined heat and power, characterized in that, The two-layer collaborative optimization control method for PEMFC combined heat and power as described in any one of claims 1-7 includes: The model building and mapping table generation module is used to build a dynamic mechanism model of the PEMFC combined heat and power system and generate a two-dimensional performance mapping table through calibration. The upper-level rolling optimization decision module is used to construct the upper-level optimization objective function at the beginning of each upper-level cycle based on the current system state and the two-dimensional performance mapping table. The optimization variables include the start-stop state matrix and current density matrix of each module in the future step, and form the upper-level decision instructions within the upper-level cycle. The lower-level dynamic simulation execution module is used to convert the upper-level decision instructions into actual current instructions for each module and use them as input for the lower-level dynamic simulation. By solving the set of ordinary differential equations describing the module dynamics, it simulates the continuous response of the system within a cycle. After the simulation ends, it extracts the state variables at the end of the cycle as the initial state of the next upper-level cycle, and calculates the actual net power output and effective heat supply in the current cycle. The state feedback and rolling advancement module is used to feed back the new state of the current system obtained from the lower-level dynamic simulation to the upper level, and to use the shifted sequence of optimization variables as the initial solution for the hot start of the next round of optimization. The upper and lower levels interact and optimize repeatedly to form rolling time-domain control.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the two-layer collaborative optimization control method for PEMFC cogeneration as described in any one of claims 1-7.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the two-layer collaborative optimization control method for PEMFC cogeneration as described in any one of claims 1-7.