A temperature control method and system for fuel cell cogeneration

By introducing a single-neuron adaptive PID controller and power feedforward compensation into the fuel cell cogeneration system, the response lag problem of traditional PID control when power changes is solved, and a fast and adaptive temperature control effect is achieved.

CN122455846APending Publication Date: 2026-07-24QINGDAO SOMIER ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO SOMIER ENERGY TECH CO LTD
Filing Date
2026-05-29
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Traditional PID control struggles to maintain excellent temperature control performance in fuel cell combined heat and power systems when the stack output power changes, especially with significant response lag during power surges.

Method used

A single-neuron adaptive PID controller is used in conjunction with supervised Hebb learning rules to adjust the PID parameter weights online. The output power of the fuel cell stack is introduced as a feedforward signal. By establishing a mapping relationship between power → heat exchange demand → secondary pump speed, the synergistic effect of feedforward control and feedback control is achieved.

Benefits of technology

It improves the temperature control accuracy and robustness of the fuel cell system under varying operating conditions, quickly responds to fluctuations in the coolant temperature at the stack inlet, enhances anti-interference capabilities, simplifies control logic, and rapidly suppresses disturbances by relying on feedforward.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122455846A_ABST
    Figure CN122455846A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of temperature control of fuel cell combined heat and power system, and discloses a temperature control method and system of fuel cell combined heat and power, which comprises generating proportional, integral and differential state quantities, adjusting the weight of each state quantity on line based on learning rules, and determining a feedback control quantity; based on power steady-state mapping relationship and dynamic change characteristics, respectively calculating steady-state feedforward component and dynamic feedforward component, and determining feedforward control quantity according to the steady-state feedforward component and the dynamic feedforward component; according to the feedback control quantity and the feedforward control quantity, superimposing to obtain the secondary side water pump speed, generating the control instruction of the secondary side water pump speed based on the secondary side water pump speed, and completing the temperature control of the stack inlet according to the control instruction. The present application constructs a composite control structure composed of power feedforward compensation and single neuron PID feedback control in parallel, and has the characteristics of fast dynamic response, strong adaptive ability, simple implementation and strong robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of temperature control technology for fuel cell cogeneration systems, and particularly to a temperature control method and system for fuel cell cogeneration systems. Background Technology

[0002] In a fuel cell combined heat and power (CHP) system, the fuel cell stack supplies electricity through an electrochemical reaction, while simultaneously generating a certain amount of heat. To ensure the stack operates within a suitable temperature range, a cooling system is needed to regulate its temperature and remove the generated heat. This heat is then recovered through a heat exchanger and used for domestic hot water or heating, achieving the synergistic utilization of electrical and thermal energy.

[0003] Fuel cell combined heat and power system topology as follows Figure 1 As shown, the fuel cell stack, as the core power generation component of the system, undergoes an electrochemical reaction inside, converting the chemical energy of the fuel into DC electrical energy and thermal energy. The DC power output from the fuel cell stack is converted into voltage levels and current types that meet the load requirements by power conversion devices such as DC / DC converters or DC / AC inverters, and then supplied to external electrical loads.

[0004] On the thermal management side, the combined heat and power system includes two cooling loops that are thermally coupled through heat exchangers.

[0005] The primary cooling loop consists of the fuel cell stack, a primary water pump, a primary channel of the heat exchanger, a radiator fan, and connecting pipes. Coolant enters the fuel cell stack driven by the pump, flows through the bipolar plates and cooling channels inside the stack, absorbs the heat released by the electrochemical reaction, and flows out of the stack after its temperature rises. This high-temperature coolant then enters the primary channel of the heat exchanger, transferring heat to the secondary side tap water, and after cooling, flows out of the heat exchanger and is pumped back into the fuel cell stack, forming a closed loop. The primary loop is equipped with an independent temperature difference PID controller, which adjusts the speed of the primary water pump to control the flow rate of coolant through the fuel cell stack, thereby maintaining the temperature difference between the stack inlet and outlet within a preset safe range. When waste heat recovery is not required, the radiator fan controls the temperature difference between the stack inlet and outlet.

[0006] The secondary waste heat recovery loop consists of a secondary channel of the heat exchanger, a secondary water pump, a hot water storage tank, and connecting pipelines. At-temperature tap water enters the secondary channel of the heat exchanger driven by the pump, absorbs heat released by the primary coolant, and its temperature rises before flowing out of the heat exchanger and into the hot water storage tank. In the storage tank, the high-temperature tap water stores heat for user use. After its temperature decreases, it flows out of the storage tank and is pumped back into the secondary channel of the heat exchanger, forming another closed loop. The secondary loop is equipped with a temperature controller, whose goal is to maintain the coolant temperature at the fuel cell inlet at the primary outlet of the heat exchanger at a set value to ensure stable internal fuel cell temperature. When heat exchange is insufficient, the tap water flowing out of the insulated water tank can be heated by electric auxiliary heating to meet user heating needs.

[0007] While outputting electrical power, the system also recovers the waste heat generated during the operation of the fuel cell stack for heating, thus achieving cascaded utilization of energy.

[0008] Currently, secondary side temperature control mostly adopts traditional PID control. However, when the output power of the fuel cell stack changes, the heat generation power changes accordingly, and the primary side inlet temperature of the heat exchanger fluctuates accordingly. Traditional fixed-parameter PID control is difficult to maintain good control performance under all operating conditions, and the response lag is obvious when the power changes abruptly.

[0009] No effective solutions have yet been proposed to address the problems in the relevant technologies. Summary of the Invention

[0010] This invention provides a temperature control method and system for fuel cell combined heat and power to solve the problems mentioned above in the prior art.

[0011] According to a first aspect of the present invention, a temperature control method for fuel cell combined heat and power is provided.

[0012] In one embodiment, the temperature control method for the fuel cell combined heat and power includes: Based on the comparison between the actual temperature of the fuel cell inlet coolant and the target temperature, proportional, integral, and derivative state variables are generated. The weights of each state variable are adjusted online based on the learning rules, and the feedback control quantity is determined by weighted summation. Based on the power signal output by the fuel cell stack, and combining the steady-state mapping relationship and dynamic change characteristics, the steady-state feedforward component and the dynamic feedforward component are calculated respectively, and the feedforward control quantity is determined according to the steady-state feedforward component and the dynamic feedforward component. The secondary pump speed is obtained by superimposing the feedback control quantity and the feedforward control quantity. Based on the secondary pump speed, a control command for the secondary pump speed is generated, and the temperature control of the fuel cell inlet is completed according to the control command.

[0013] In one embodiment, the step of generating proportional, integral, and derivative state variables based on the comparison between the actual temperature and the target temperature of the fuel cell inlet coolant, adjusting the weights of each state variable online based on learning rules, and determining the feedback control variable by weighted summation includes: The actual temperature of the coolant at the fuel cell inlet is collected in real time using a temperature sensor, and the actual temperature is compared with the preset target temperature to generate a temperature error signal. The temperature error signal is converted into proportional, integral, and derivative state variables by a state converter. The weights of each state variable are normalized, and the weights of each state variable are adjusted online using the learning rules of supervised Hebb. Based on the weighted summation method, the control increment is calculated by combining the weights and gain coefficients of each state variable, the adjusted state variable, and the feedback control quantity is determined according to the control increment.

[0014] In one embodiment, the online adjustment of the weights of each state variable using supervised Hebb's learning rules includes: The learning rate for the proportional, integral, and differential parameters is determined based on the error-driven learning rate adjustment coefficient and decay coefficient, combined with the learning rate update formula. Based on the learning rate and state variables of proportional, integral, and derivative parameters, the weights of each state variable are adjusted online in conjunction with the temperature error signal and the current control variable.

[0015] In one embodiment, the expression for the learning rate update formula is: ; In the formula, Let be the learning rate of the state variables at time t+1. Let be the learning rate of the state variable at time t. k 1 represents the error-driven learning rate adjustment coefficient. k 2 represents the decay factor of the learning rate. Let t be the temperature error signal at time t.

[0016] In one embodiment, the expression for the weights of each state variable after online adjustment is: ; In the formula, , , These are the weights of the proportional, integral, and differential state variables at time t+1, respectively. , , These are the weights of the proportional, integral, and differential state variables at time t, respectively. η P , η I , ηD The learning rates are the proportional, integral, and derivative parameters, respectively. n (t) represents the rotational speed of the water pump at time t. T 1(t), T 2(t), T 3(t) represent the proportional, integral, and differential state variables, respectively.

[0017] In one embodiment, the expression for the feedback control variable is: ; In the formula, u fb (t) represents the feedback control quantity at time t. u fb (t-1) is the feedback control quantity at time t-1, Δ u (t) represents the control increment at time t.

[0018] In one embodiment, based on the power signal output from the fuel cell stack, and combining the steady-state power mapping relationship and dynamic change characteristics, the steady-state feedforward component and the dynamic feedforward component are calculated respectively, and the feedforward control quantity is determined based on the steady-state feedforward component and the dynamic feedforward component, including: The output power signal of the fuel cell stack is acquired in real time, and the output power signal of the fuel cell stack is differentiated to obtain the power change rate. The steady-state feedforward component is calculated by using the steady-state power feedforward mapping relationship, combined with the stack output power signal and static feedforward gain; Calculate the dynamic feedforward component based on the power change rate and dynamic feedforward gain; The feedforward control quantity of the secondary water pump is obtained by superimposing the steady-state feedforward component and the dynamic feedforward component.

[0019] In one embodiment, the expression for the steady-state power feedforward mapping relationship is: ; The expression for the dynamic feedforward component is: ; In the formula, n ff,s (t) represents the steady-state feedforward component at time t. K s For static feedforward gain, P elec (t) represents the output power of the fuel cell stack at time t. n ff,d (t) represents the dynamic feedforward component at time t. K d The dynamic feedforward gain is given by τ, which is the filtering time constant. s For the Laplace operator.

[0020] In one embodiment, the feedforward control quantity of the secondary side water pump is the sum of the steady-state feedforward component and the dynamic feedforward component, and the expression for the feedforward control quantity of the secondary side water pump is: ; In the formula, u ff (t) represents the feedforward control quantity of the secondary side water pump at time t.

[0021] According to a second aspect of the present invention, a temperature control system for fuel cell combined heat and power is provided.

[0022] In one embodiment, the temperature control system for the fuel cell combined heat and power includes: The single-neuron PID control module is used to generate proportional, integral, and derivative state variables based on the comparison between the actual temperature of the fuel cell inlet coolant and the target temperature. It adjusts the weights of each state variable online based on the learning rules and determines the feedback control variable by combining the weighted summation. The power feedforward compensation module is used to calculate the steady-state feedforward component and the dynamic feedforward component based on the power signal output by the fuel cell stack, combined with the power steady-state mapping relationship and dynamic change characteristics, and to determine the feedforward control quantity based on the steady-state feedforward component and the dynamic feedforward component. The fuel cell stack temperature control module is used to obtain the secondary side water pump speed by superimposing the feedback control quantity and the feedforward control quantity, generate a control command for the secondary side water pump speed based on the secondary side water pump speed, and complete the temperature control of the fuel cell stack inlet according to the control command.

[0023] According to a third aspect of the present invention, a computer device is provided.

[0024] In some embodiments, the computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described above.

[0025] According to a fourth aspect of the present invention, a computer-readable storage medium is provided.

[0026] In one embodiment, a computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the above method.

[0027] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: 1) This invention employs a single-neuron adaptive PID controller on the secondary side, which adjusts the PID parameter weights online through supervised Hebb learning rules, enabling the controller to adapt to the nonlinear and time-varying characteristics of the system and improve steady-state control accuracy and robustness.

[0028] 2) This invention introduces the fuel cell stack output power as a feedforward signal based on single-neuron PID feedback. This signal can characterize the heat generation change trend of the system and can be equivalent to a measurable disturbance signal acting on the controlled object in control modeling. By establishing a mapping relationship of "electric power → heat exchange demand → secondary side water pump speed", the secondary side water pump speed is adjusted in advance when the power changes, compensating for the feedback control response lag and suppressing the fluctuation of fuel cell stack inlet coolant temperature under varying operating conditions.

[0029] 3) This invention features fast dynamic response and strong adaptability. It can not only effectively reduce the fluctuation of the inlet coolant temperature of the fuel cell stack under varying operating conditions through power feedforward advance action, but also adapt to the nonlinear and time-varying characteristics of the fuel cell system by online tuning parameters through a single neuron PID.

[0030] 4) This invention is simple to implement and has excellent robustness. It only requires adding power acquisition and feedforward calculation to the secondary controller without changing the primary control logic. Moreover, this invention relies on the feedforward effect to quickly suppress fast-changing disturbances and effectively compensates for slow-changing drift and residual errors through the feedback mechanism. The two types of control methods have clear division of labor, which greatly improves the overall anti-interference capability.

[0031] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0032] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0033] Figure 1 This is a topology diagram of a fuel cell combined heat and power system; Figure 2 This is a flowchart illustrating a temperature control method for fuel cell combined heat and power according to an exemplary embodiment; Figure 3 This is a structural block diagram of a temperature control system for a fuel cell combined heat and power system, according to an exemplary embodiment. Figure 4 This is a schematic diagram illustrating a temperature control method for fuel cell combined heat and power according to an exemplary embodiment; Figure 5 This is a schematic diagram of the basic form of traditional PID control; Figure 6 This is a structural diagram of a single-neuron PID controller in a temperature control method for fuel cell cogeneration according to an exemplary embodiment; Figure 7This is a schematic diagram of feedforward control logic in a temperature control method for fuel cell cogeneration according to an exemplary embodiment; Figure 8 This is a schematic diagram of the structure of a computer device according to an exemplary embodiment. Detailed Implementation

[0034] The following description and accompanying drawings fully illustrate specific embodiments described herein to enable those skilled in the art to practice them. Some portions and features of certain embodiments may be included in or replace portions and features of other embodiments. The scope of the embodiments herein includes the entire scope of the claims and all available equivalents thereof. The various embodiments described herein are presented in a progressive manner, with each embodiment focusing on its differences from other embodiments; similar or identical parts between embodiments can be referred to interchangeably.

[0035] The modules in the apparatus or system of this application can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0036] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0037] Figure 2 An embodiment of a temperature control method for fuel cell cogeneration according to the present invention is shown.

[0038] In this optional embodiment, the temperature control method for the fuel cell combined heat and power includes: Step S101: Based on the comparison between the actual temperature of the fuel cell inlet coolant and the target temperature, generate proportional, integral, and derivative state variables, adjust the weights of each state variable online based on the learning rules, and determine the feedback control quantity by combining the weighted summation. Step S102: Based on the power signal output by the fuel cell stack, and combining the steady-state mapping relationship and dynamic change characteristics of the power, calculate the steady-state feedforward component and the dynamic feedforward component respectively, and determine the feedforward control quantity according to the steady-state feedforward component and the dynamic feedforward component. Step S103: The secondary side water pump speed is obtained by superimposing the feedback control quantity and the feedforward control quantity. Based on the secondary side water pump speed, a control command for the secondary side water pump speed is generated, and the temperature control of the fuel cell inlet is completed according to the control command.

[0039] In this optional embodiment, the step of generating proportional, integral, and derivative state variables based on the comparison between the actual temperature and the target temperature of the fuel cell inlet coolant, adjusting the weights of each state variable online based on learning rules, and determining the feedback control variable by weighted summation includes: The actual temperature of the coolant at the fuel cell inlet is collected in real time using a temperature sensor, and the actual temperature is compared with the preset target temperature to generate a temperature error signal. The temperature error signal is converted into proportional, integral, and derivative state variables by a state converter. The weights of each state variable are normalized, and the weights of each state variable are adjusted online using the learning rules of supervised Hebb. Based on the weighted summation method, the control increment is calculated by combining the weights and gain coefficients of each state variable, the adjusted state variable, and the feedback control quantity is determined according to the control increment.

[0040] In this optional embodiment, the step of adjusting the weights of each state variable online using supervised Hebb's learning rules includes: The learning rate for the proportional, integral, and differential parameters is determined based on the error-driven learning rate adjustment coefficient and decay coefficient, combined with the learning rate update formula. Based on the learning rate and state variables of proportional, integral, and derivative parameters, the weights of each state variable are adjusted online in conjunction with the temperature error signal and the current control variable.

[0041] In this optional embodiment, the expression for the learning rate update formula is: ; In the formula, Let be the learning rate of the state variables at time t+1. Let be the learning rate of the state variable at time t. k 1 represents the error-driven learning rate adjustment coefficient. k 2 represents the decay factor of the learning rate. Let t be the temperature error signal at time t.

[0042] In this optional embodiment, the expression for the weights of each state variable after online adjustment is: ; In the formula, , , These are the weights of the proportional, integral, and differential state variables at time t+1, respectively. , , These are the weights of the proportional, integral, and differential state variables at time t, respectively. η P , η I , ηD The learning rates are the proportional, integral, and derivative parameters, respectively. n (t) represents the rotational speed of the water pump at time t. T 1(t), T 2(t), T 3(t) represent the proportional, integral, and differential state variables, respectively.

[0043] In this optional embodiment, the expression for the feedback control quantity is: ; In the formula, u fb (t) represents the feedback control quantity at time t. u fb (t-1) is the feedback control quantity at time t-1, Δ u (t) represents the control increment at time t.

[0044] In this optional embodiment, the power signal output by the fuel cell stack (including real-time power value and power change rate), combined with the power steady-state mapping relationship and dynamic change characteristics, is used to calculate the steady-state feedforward component and the dynamic feedforward component, respectively. Based on the steady-state feedforward component and the dynamic feedforward component, the feedforward control quantity is determined, including: The output power signal of the fuel cell stack is acquired in real time, and the output power signal of the fuel cell stack is differentiated to obtain the power change rate. The steady-state feedforward component is calculated by using the steady-state power feedforward mapping relationship, combined with the stack output power signal and static feedforward gain; Calculate the dynamic feedforward component based on the power change rate and dynamic feedforward gain; The feedforward control quantity of the secondary water pump is obtained by superimposing the steady-state feedforward component and the dynamic feedforward component.

[0045] In this optional embodiment, the expression for the steady-state power feedforward mapping relationship is: ; The expression for the dynamic feedforward component is: ; In the formula, n ff,s (t) represents the steady-state feedforward component at time t. K s For static feedforward gain, P elec (t) represents the output power of the fuel cell stack at time t. n ff,d (t) represents the dynamic feedforward component at time t. K d The dynamic feedforward gain is given by τ, which is the filtering time constant. sFor the Laplace operator.

[0046] In this optional embodiment, the feedforward control quantity of the secondary side water pump is the sum of the steady-state feedforward component and the dynamic feedforward component, and the expression for the feedforward control quantity of the secondary side water pump is: ; In the formula, u ff (t) represents the feedforward control quantity of the secondary side water pump at time t.

[0047] Figure 3 An embodiment of a temperature control system for fuel cell cogeneration according to the present invention is shown.

[0048] In this optional embodiment, the temperature control system for the fuel cell cogeneration includes: The single-neuron PID control module 201 is used to generate proportional, integral, and derivative state variables based on the comparison between the actual temperature of the fuel cell inlet coolant and the target temperature. It adjusts the weights of each state variable online based on the learning rules and determines the feedback control quantity by combining the weighted summation. The power feedforward compensation module 202 is used to calculate the steady-state feedforward component and the dynamic feedforward component based on the power signal output by the fuel cell stack, combined with the power steady-state mapping relationship and dynamic change characteristics, and to determine the feedforward control quantity based on the steady-state feedforward component and the dynamic feedforward component. The fuel cell stack temperature control module 203 is used to obtain the secondary side water pump speed by superimposing the feedback control quantity and the feedforward control quantity, generate a control command for the secondary side water pump speed based on the secondary side water pump speed, and complete the temperature control of the fuel cell stack inlet according to the control command.

[0049] To facilitate understanding of the above technical solutions of the present invention, the following further explains the above technical solutions of the present invention from the perspective of architecture and principle, as follows: I. Overall Control Logic This invention addresses the speed control of the secondary water pump by constructing a composite control structure consisting of parallel power feedforward compensation and single-neuron PID feedback control, such as... Figure 4 As shown, its overall control logic is as follows: A temperature sensor collects the inlet coolant temperature of the fuel cell stack in real time and compares it with the set temperature to obtain a temperature deviation signal. This deviation signal serves only as the input signal for a single-neuron PID feedback controller, used for calculating the feedback control quantity. After completing state mapping, online weight learning, and weighted summation, the single-neuron PID feedback controller outputs the feedback control quantity.

[0050] Meanwhile, the system independently acquires the output power signal of the fuel cell stack and performs differentiation processing on the power signal to obtain the power change rate. This signal is used only as the input to the power feedforward compensation model. The power feedforward compensation model is based on the steady-state mapping relationship and dynamic change characteristics of the power, calculates the steady-state feedforward component and the dynamic feedforward component respectively, and superimposes them to obtain the feedforward control quantity.

[0051] It is important to clarify that the feedback control channel and the feedforward compensation channel are independent of each other in terms of input signals, calculation processes, and parameter update mechanisms. The output control quantity of the single-neuron PID feedback controller does not participate in any calculation process of the power feedforward compensation model, nor is it used as its input or correction basis; similarly, the output of the power feedforward compensation model does not participate in the weight adjustment or error calculation process of the single-neuron PID controller. The two are completely decoupled at the algorithm level.

[0052] At the output level, the feedback control quantity and the feedforward control quantity are directly superimposed to form the final speed command of the secondary pump, which is used to drive the pump actuator. The reason for adopting the direct superposition method is that: feedforward control is an open-loop compensation based on disturbance quantity, and its function is to perform pre-compensation before the disturbance affects the controlled object, in order to suppress the forward influence of power changes on temperature; while feedback control is a closed-loop adjustment based on temperature deviation, and its function is to eliminate feedforward compensation residuals and unmodeled disturbances in the system.

[0053] Therefore, the two functions act on two different control objectives, "disturbance prediction compensation" and "error correction and recovery," respectively. They are complementary in function, sequential in time scale, and independent in mechanism of action. Direct superposition can achieve a natural combination of control variables without introducing additional weight allocation, thereby avoiding the problems of weakened dynamic response or mutual interference caused by weight coupling.

[0054] In summary, this invention achieves coordinated control of disturbance pre-compensation and error closed-loop correction through a feedforward-feedback parallel structure, thereby improving the speed and stability of fuel cell stack inlet temperature control.

[0055] II. Single-Neuron PID Feedback Controller The basic form of traditional PID control is as follows: Figure 5 As shown, closed-loop regulation is achieved based on the proportional, integral, and derivative actions of the temperature deviation signal. This method has a simple structure and high reliability, but fixed parameters are difficult to adapt to the nonlinear and time-varying characteristics of fuel cells.

[0056] As the basic unit of neural networks, single neurons possess advantages such as strong adaptability, simple structure, and low computational cost. Single-neuron PID combines the simplicity and reliability of traditional PID with the self-learning and adaptive capabilities of neurons, enabling online self-tuning of PID parameters and improving system robustness. It is particularly suitable for complex control systems with time-varying and highly nonlinear parameters, such as fuel cell systems.

[0057] A controller structure combining single neurons and PID controllers is as follows: Figure 6 As shown. Its overall control logic is: temperature reference value... T ref The actual temperature T(t) fed back from the temperature sensor is input to the converter to generate the proportional, integral, and derivative state variables of the PID controller. x i ; ω i The weights of the state variables can be adjusted online using a learning algorithm; the control variables are weighted summed and then multiplied by a gain coefficient. K This leads to the output of control increment Δ u The control increment is added to the control quantity from the previous moment after a 1 / z unit delay to obtain the current control quantity. u This drives the water pump to change its speed, which in turn affects the control of the fuel cell stack temperature, thus completing the closed-loop temperature regulation.

[0058] The specific control process is as follows: In a single-neuron PID controller, the actual temperature of the coolant at the fuel cell inlet is acquired in real time via a temperature sensor; an error signal is generated by comparing the actual value with the target value. The error signal is converted into three state quantities by a state converter. T 1(t), T 2(t), T 3(t), the state variables at time t can be expressed as: (1); Let ω1, ω2, and ω3 be the weights for the proportional, integral, and differential state variables. To ensure the stability of the weight updates, the weights can be normalized. Normalization not only constrains the range of the weights and ensures numerical stability, but also allows the weights to adapt to the learning rate more quickly, thus accelerating convergence. The expression for the normalization of the weights is: (2); In the formula, The weights are normalized values ​​at time t. Let be the weights of the state variables at time t. i When the values ​​are 1, 2, and 3, they represent the proportional, integral, and differential state variables, respectively. The adaptive weight adjustment adopts a supervised Hebb learning rule, and its algorithm is as follows: (3); In the formula, , , These are the weights of the proportional, integral, and differential state variables at time t+1, respectively. , , These are the weights of the proportional, integral, and differential state variables at time t, respectively. n (t) represents the rotational speed of the water pump at time t. T 1(t), T 2(t), T 3(t) represents the proportional, integral, and differential state variables at time t, respectively. η P , η I , η D The learning rates are the proportional, integral, and derivative parameters, respectively. The learning rate determines the magnitude of weight adjustment in each iteration. The initial value is determined based on the critical oscillation method. The larger the value, the more drastic the single adjustment and the faster the weight changes.

[0059] The weights of the state variables are not fixed constants, but are adaptively adjusted online through supervised Hebb learning rules, without the need for pre-setting fixed values. In this embodiment, the three weights can be assigned the same small positive number as initial values, or the weights can be initialized using weights calculated from traditional PID parameters based on experience. The specific magnitude of the initial weights does not affect the final convergence performance of the system, but only the initial adjustment speed. During operation, the specific values ​​of the weights need to be fine-tuned experimentally based on the actual system response. A larger learning rate results in faster weight adjustment, but may cause oscillations; a smaller learning rate results in smoother convergence but a slower response.

[0060] In a single-neuron PID control algorithm, updating the weights and normalizing the weights are two sequential steps with different functions: Weight update, i.e., formula (3): Supervised Hebb learning rules are used to modify the original weights using the error, control variables, and state variables at the current time step, to obtain the original weights for the next time step. The purpose of this step is to allow the weights to adaptively adjust in the direction of reducing the error. Therefore, the weights involved in the calculation and update in formula (3) must be the original weights, not the normalized weights. If the normalized weights are then learned and updated, the normalization ratio will be destroyed, causing the weights to fail to converge correctly. The purpose of normalization is to constrain the range of weights, ensure numerical stability, and accelerate the convergence speed.

[0061] Weight normalization, i.e., formula (2): In each control cycle, before using the weights to calculate the control output, the original weights of the current cycle are normalized to obtain normalized weights. The normalized weights are only used to calculate the control increment in the subsequent formula (5) and do not participate in the iterative update process of the weights.

[0062] The learning rate can be adaptively adjusted according to the magnitude of the error, and the adjustment formula is as follows: (4); In the formula, Let be the learning rate of the state variables at time t+1. Let be the learning rate of the state variable at time t. k 1 represents the error-driven learning rate adjustment coefficient, used to enhance the system's adaptive capability under large error conditions. k 2 represents the learning rate decay coefficient, used to suppress excessive growth of the learning rate, thereby improving the stability and convergence performance of the combined heat and power system. To avoid control oscillations caused by online learning, boundary constraints, dead zone thresholds, and rate-of-change limits can be set for weight updates.

[0063] By weighted summation and multiplying by a certain gain coefficient, the output increment Δ of the controller at time t can be obtained. u (t), the output increment of the controller at time t is: (5); In the formula, K The system gain coefficient; The controller can accumulate the control quantity through a unit delay element, and the feedback control quantity can be expressed as: (6); In the formula, u fb (t) represents the feedback control quantity at time t. u fb (t-1) is the feedback control quantity at time t-1, Δ u (t) represents the control increment at time t.

[0064] III. Power Feedforward Compensation Model Single-neuron PID has good adaptive capabilities, but its essence is still "deviation first, adjustment later" feedback control. When the power of the fuel cell stack changes rapidly, the primary side inlet temperature of the heat exchanger fluctuates rapidly in sync. The feedback control has a lag, which can easily cause transient overshoot of the fuel cell stack inlet coolant temperature.

[0065] The thermal balance of a fuel cell system is a complex coupled process. Changes in stack power have the most significant impact on the system's thermal balance, while other disturbances, such as changes in ambient temperature and water tank temperature, are relatively slow and can be compensated for by feedback control.

[0066] Based on the above analysis, this invention introduces feedforward compensation based on fuel cell power. The feedforward model does not need to be completely accurate; it only needs to provide compensation with the correct direction and reasonable magnitude. The remaining errors are corrected by the feedback controller.

[0067] 1. Feedforward Logic Feedforward control logic such as Figure 7 As shown, the increase in fuel cell power leads to increased heat generation, which in turn leads to an increase in the temperature of the coolant at the fuel cell outlet, which in turn leads to an increase in the temperature of the coolant at the fuel cell inlet of the heat exchanger. This process is then accelerated by increasing the speed of the secondary water pump to enhance heat exchange and suppress the upward trend in temperature.

[0068] The decrease in fuel cell power leads to a reduction in heat generation, which in turn leads to a decrease in the temperature of the coolant at the fuel cell outlet, which in turn leads to a decrease in the temperature of the coolant at the fuel cell inlet of the heat exchanger. This process reduces the speed of the secondary water pump in advance, weakening heat exchange and suppressing the temperature drop trend.

[0069] 2. Steady-state feedforward mapping During fuel cell operation, the input chemical energy is converted into electrical energy and heat energy. According to the law of conservation of energy, the heat output power of the fuel cell stack can be expressed as: (7); In the formula, Q gen For the heat generation power of the fuel cell stack, P elec For the output power of the fuel cell stack, η The fuel cell stack efficiency can be obtained through experimental calibration. Considering that the fuel cell stack efficiency changes relatively smoothly within a certain operating range, the relationship between heat generation and output power can be approximated as a linear or piecewise linear relationship within a certain operating range: (8); In the formula, k It is a proportionality coefficient used to characterize the heat generation capacity corresponding to a unit output power, and can be corrected online according to changes in stack temperature, pressure and load.

[0070] In the primary cooling circuit, the heat carried away by the coolant flowing through the fuel cell stack is the primary side heat dissipation power. Q pri satisfy: (9); In the formula, G pri The primary side coolant volume flow rate is independently regulated by the primary side temperature difference PID controller to maintain the temperature difference Δ between the inlet and outlet of the fuel cell stack. T stack Within the preset range, Let be the density of the primary-side coolant in the fuel cell waste heat recovery system, and c be the specific heat capacity of the primary-side coolant in the fuel cell waste heat recovery system. Tout The temperature of the coolant flowing out from the primary side of the heat exchanger. T in The temperature of the coolant flowing into the primary side of the heat exchanger.

[0071] The secondary waste heat recovery loop absorbs heat from the primary side through a heat exchanger, and the absorbed heat power... Q sec It can be represented as: (10); In the formula, G sec This refers to the volumetric flow rate of the secondary cooling medium. T sec,in This refers to the secondary inlet temperature from the hot water storage tank. T sec,out The secondary side outlet temperature, Δ T sec The temperature difference between the inlet and outlet of the secondary heat exchanger. c represents the density of the secondary-side coolant in the fuel cell waste heat recovery system. sec For the specific heat capacity of the secondary side coolant in the fuel cell waste heat recovery system, T sec,out The temperature of the coolant flowing out from the secondary side of the heat exchanger. T sec,in This refers to the temperature of the coolant flowing into the secondary side of the heat exchanger.

[0072] Neglecting heat exchanger heat losses and other minor effects, the steady-state thermal equilibrium under engineering approximation can be expressed as: (11); By combining equations (8), (10), and (11), we can obtain: (12); In the actual system, the temperature difference between the inlet and outlet of the secondary heat exchanger is jointly affected by the primary side temperature level (determined by the fuel cell power), the secondary side inlet temperature (which rises slowly with the water temperature in the storage tank), and the secondary side flow rate. Under the combined effect of primary side temperature difference control and secondary side temperature control, near the steady-state operating point, the temperature difference between the inlet and outlet of the secondary heat exchanger changes relatively slowly relative to the power surge. Linearizing the system's thermal balance relationship under small disturbance conditions yields an approximately linear mapping relationship between the secondary side flow rate and the fuel cell output power: (13); In the formula, The relationship is directly proportional, meaning that the volumetric flow rate of the secondary cooling medium is approximately linearly proportional to the output power of the fuel cell near the steady-state operating point. The water pump is the actuator, and its rotational speed determines the circulation flow rate of the waste heat recovery system. In engineering applications, the pump speed and volumetric flow rate within the rated range exhibit an approximately linear relationship, which can be obtained through experimental calibration of the pump characteristic curve, and can be expressed as: (14); In the formula, n sec This refers to the speed of the secondary water pump. k b The speed-flow coefficient is specifically obtained by performing characteristic tests on an actual water pump. The specific steps are as follows: Based on the data provided by the actual water pump manufacturer or within the rated operating range, change the water pump speed and measure the corresponding volumetric flow rate with a flow meter; record multiple sets of (speed, flow) data points; use linear fitting to obtain the speed-flow coefficient by measuring the slope of the fitted straight line.

[0073] By combining equations (13) and (14), we obtain the steady-state power feedforward mapping relationship: (15); In the formula, n ff,s (t) represents the steady-state feedforward component at time t, which is the reference value of the secondary pump speed obtained from the power steady-state mapping. K s The static feedforward gain is determined by both the system's thermodynamic parameters and the pump's characteristics, and can be determined through experimental calibration. P elec (t) represents the output power of the fuel cell stack at time t; In actual operation, the slow rise in the water temperature of the hot water storage tank will cause the heat transfer efficiency of the heat exchanger to drift, resulting in a small steady-state error in the ideal mapping relationship in equation (15). However, this drift is a slow change process on the order of hours, while the feedforward control is designed for power mutations on the order of seconds. Therefore, the feedforward model only needs to provide the reference adjustment amount, and the small error caused by the water temperature drift in the tank is automatically corrected by the single-neuron PID feedback controller.

[0074] 3. Dynamic feedforward compensation Steady-state feedforward mapping is used to determine the steady-state target value of the pump speed after a power change. However, the adjustment rate of the speed transition process is not specified.

[0075] The fuel cell stack, piping, and heat exchanger all exhibit thermal inertia, resulting in a lag in temperature response after power changes. If the water pump speed only transitions from the original steady state to the new steady state, the rate of heat exchange adjustment will lag behind the rate of heat generation change, and the fuel cell stack inlet coolant temperature will still experience significant transient fluctuations.

[0076] The dynamic feedforward applies advance compensation to the pump speed based on the power change rate. The specific control logic is as follows: 1) When the power increases rapidly, the heat generation increases rapidly. Dynamic feedforward applies positive compensation to increase the pump speed and rapidly enhance the heat exchange capacity.

[0077] 2) When the power drops rapidly, the heat generation decreases rapidly. The dynamic feedforward applies negative compensation to reduce the pump speed and avoid overcooling.

[0078] 3) When the power is stable, the dynamic feedforward output returns to zero, and the pump speed is determined by the steady-state mapping.

[0079] The theory of dynamic feedforward compensation is based on the principle of control invariance: for a measurable disturbance, before it affects the controlled object, the influence of the disturbance on the output can be offset by applying a control action of equal magnitude and opposite direction through the compensation channel.

[0080] Let the transfer function of the disturbance channel (power → temperature) be G. D The transfer function of the control channel (pump speed → temperature) is G. p (s), the ideal feedforward controller is: (16); In the formula, G ff (s) is the transfer function of the ideal feedforward controller, representing the compensation effect of the feedforward compensation channel on the disturbance signal; In engineering applications, both the disturbance channel and the control channel can be equivalent to a first-order inertial element, represented as follows: (17); In the formula, τ D θ is the time constant of the perturbation channel. D The pure delay time of the perturbation channel. K p To control the static gain of the channel, To control the pure delay time of the channel, K D is the static gain of the disturbance channel, and is the steady-state influence coefficient of the disturbance signal on the controlled variable; Substituting into the ideal feedforward formula, we get: (18); This formula includes an equivalent differential dynamic term, which is used to compensate for the difference in time constants between the control channel and the disturbance channel, so that the control action responds to the disturbance trend ahead of time.

[0081] Considering the difficulty of accurate modeling and noise sensitivity, in engineering, the ideal feedforward is simplified to a practical form of proportional + derivative: (19); In the formula, K s For static feedforward gain, Kd This is a dynamic feedforward gain used to adjust the intensity of the differential action, which can be determined through experimental calibration; The corresponding time-domain expression is: (20); In the formula, n ff,d (t) is the dynamic feedforward component at time t, which is the advance compensation amount applied based on the power change rate. Direct differentiation amplifies measurement noise. In actual controllers, discrete differential is used to perform differentiation, combined with low-pass filtering to suppress noise. In actual implementation, the power signal is first low-pass filtered, or an incomplete differentiation form is used, as shown in equation (21): (twenty one); In the formula, n ff,d (t) represents the dynamic feedforward component at time t, and τ is the filtering time constant.

[0082] 4. Overall feedforward compensation amount The total feedforward control of the secondary pump at time t is the sum of steady-state mapping and dynamic compensation, and can be expressed as: (twenty two); The project implementation version is as follows: (twenty three); In the formula, u ff (t) represents the feedforward control quantity of the secondary side water pump at time t.

[0083] IV. Feedforward and Feedback Coordinated Control The final secondary pump speed command is the superposition of the feedback control quantity and the feedforward compensation quantity. The pump speed control quantity at time t can be expressed as: (twenty four); According to the above formula, feedforward compensation is used to suppress temperature disturbances caused by rapid changes in the power of the fuel cell stack, so that the system can quickly approach the target operating state; the single-neuron PID controller is used to correct the feedforward model error and external slow-changing disturbances, thereby ensuring the steady-state accuracy and stability of the system.

[0084] Furthermore, since the feedforward compensation channel does not participate in error closed-loop regulation, its effect does not change the closed-loop structure of the system, and the system stability is still guaranteed by the single-neuron PID feedback controller. To avoid excessive feedforward compensation from impacting the system, in practical applications, the feedforward output can be limited or smoothed, thereby further improving the stability and robustness of the system operation.

[0085] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores static and dynamic information data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the above method embodiments.

[0086] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0087] In addition, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0088] In addition, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0089] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0090] This invention is not limited to the structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this invention is limited only by the appended claims.

Claims

1. A temperature control method for fuel cell combined heat and power, characterized in that, include: Based on the comparison between the actual temperature of the fuel cell inlet coolant and the target temperature, proportional, integral, and derivative state variables are generated. The weights of each state variable are adjusted online based on the learning rules, and the feedback control quantity is determined by combining the weighted summation. Based on the power signal output by the fuel cell stack, and combining the steady-state mapping relationship and dynamic change characteristics, the steady-state feedforward component and the dynamic feedforward component are calculated respectively, and the feedforward control quantity is determined according to the steady-state feedforward component and the dynamic feedforward component. The secondary pump speed is obtained by superimposing the feedback control quantity and the feedforward control quantity. Based on the secondary pump speed, a control command for the secondary pump speed is generated, and the temperature control of the fuel cell inlet is completed according to the control command.

2. The temperature control method for fuel cell cogeneration according to claim 1, characterized in that, The process involves generating proportional, integral, and derivative state variables based on a comparison between the actual temperature of the fuel cell inlet coolant and the target temperature. The weights of each state variable are then adjusted online based on learning rules, and a weighted summation is used to determine the feedback control quantity. This includes: The actual temperature of the coolant at the fuel cell inlet is collected in real time using a temperature sensor, and the actual temperature is compared with the preset target temperature to generate a temperature error signal. The temperature error signal is converted into proportional, integral, and derivative state variables by a state converter. The weights of each state variable are normalized, and the weights of each state variable are adjusted online using the learning rules of supervised Hebb. Based on the weighted summation method, the control increment is calculated by combining the weights and gain coefficients of each state variable, the adjusted state variable, and the feedback control quantity is determined according to the control increment.

3. The temperature control method for fuel cell cogeneration according to claim 2, characterized in that, The method of adjusting the weights of each state variable online using supervised Hebb learning rules includes: The learning rate for the proportional, integral, and differential parameters is determined based on the error-driven learning rate adjustment coefficient and decay coefficient, combined with the learning rate update formula. Based on the learning rate and state variables of proportional, integral, and derivative parameters, the weights of each state variable are adjusted online in conjunction with the temperature error signal and the current control variable.

4. The temperature control method for fuel cell cogeneration according to claim 3, characterized in that, The expression for the learning rate update formula is: ; In the formula, Let be the learning rate of the state variables at time t+1. Let be the learning rate of the state variable at time t. k 1 represents the error-driven learning rate adjustment coefficient. k 2 represents the decay factor of the learning rate. The temperature error signal at time t.

5. The temperature control method for fuel cell cogeneration according to claim 4, characterized in that, The expressions for the weights of each state variable after online adjustment are as follows: ; In the formula, , , These are the weights of the proportional, integral, and differential state variables at time t+1, respectively. , , These are the weights of the proportional, integral, and differential state variables at time t, respectively. η P , η I , η D The learning rates are the proportional, integral, and derivative parameters, respectively. n (t) represents the rotational speed of the water pump at time t. T 1(t), T 2(t), T 3(t) represent the proportional, integral, and differential state variables, respectively.

6. The temperature control method for fuel cell cogeneration according to claim 1, characterized in that, The expression for the feedback control variable is: ; In the formula, u fb (t) represents the feedback control quantity at time t. u fb (t-1) is the feedback control quantity at time t-1, Δ u (t) represents the control increment at time t.

7. The temperature control method for fuel cell cogeneration according to claim 1, characterized in that, Based on the power signal output from the fuel cell stack, and combining the steady-state mapping relationship and dynamic change characteristics, the steady-state feedforward component and the dynamic feedforward component are calculated respectively. Based on the steady-state feedforward component and the dynamic feedforward component, the feedforward control quantity is determined, including: The output power signal of the fuel cell stack is acquired in real time, and the output power signal of the fuel cell stack is differentiated to obtain the power change rate. The steady-state feedforward component is calculated by using the steady-state power feedforward mapping relationship, combined with the stack output power signal and static feedforward gain; Calculate the dynamic feedforward component based on the power change rate and dynamic feedforward gain; The feedforward control quantity of the secondary water pump is obtained by superimposing the steady-state feedforward component and the dynamic feedforward component.

8. The temperature control method for fuel cell cogeneration according to claim 7, characterized in that, The expression for the steady-state power feedforward mapping relationship is: ; The expression for the dynamic feedforward component is: ; In the formula, n ff,s (t) represents the steady-state feedforward component at time t. K s For static feedforward gain, P elec (t) represents the output power of the fuel cell stack at time t. n ff,d (t) represents the dynamic feedforward component at time t. K d The dynamic feedforward gain is given by τ, which is the filtering time constant. s For the Laplace operator.

9. The temperature control method for fuel cell cogeneration according to claim 8, characterized in that, The feedforward control quantity of the secondary side water pump is the sum of the steady-state feedforward component and the dynamic feedforward component, and the expression for the feedforward control quantity of the secondary side water pump is: ; In the formula, u ff (t) represents the feedforward control quantity of the secondary side water pump at time t.

10. A temperature control system for fuel cell combined heat and power, characterized in that, include: The single-neuron PID control module is used to generate proportional, integral, and derivative state variables based on the comparison between the actual temperature of the fuel cell inlet coolant and the target temperature. It adjusts the weights of each state variable online based on the learning rules and determines the feedback control variable by combining the weighted summation. The power feedforward compensation module is used to calculate the steady-state feedforward component and the dynamic feedforward component based on the power signal output by the fuel cell stack, combined with the power steady-state mapping relationship and dynamic change characteristics, and to determine the feedforward control quantity based on the steady-state feedforward component and the dynamic feedforward component. The fuel cell stack temperature control module is used to obtain the secondary side water pump speed by superimposing the feedback control quantity and the feedforward control quantity, generate a control command for the secondary side water pump speed based on the secondary side water pump speed, and complete the temperature control of the fuel cell stack inlet according to the control command.