A fuel cell and control method
By independently controlling and prioritizing the subsystems of the fuel cell system, the program redundancy problem of the fuel cell controller during the execution cycle is solved, and efficient and stable task execution and memory optimization are achieved.
Patent Information
- Application Number
- CN202210627697.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-06
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-06-06
AI Technical Summary
The program execution redundancy and memory waste in the existing fuel cell controller during the execution cycle result in insufficient program execution accuracy and stability. Especially when the code volume increases, some tasks may not be executed or skipped.
The fuel cell's air decoupling system, hydrogen injection system, cooling system, and electrical system are classified and independently controlled, and priority sorting is set. Program execution is optimized through modular processing and task scheduling strategies.
The efficient and stable operation of the fuel cell system is achieved, task loss is avoided, and the accuracy of program execution and FCU memory utilization are improved.
Smart Images

Figure CN117239180B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fuel cells, and in particular to a fuel cell and a control method thereof. Background Art
[0002] Fuel cell systems use hydrogen and air as energy sources, achieving varying current densities across the membrane electrode by controlling the flow and pressure of the electrochemical reaction. Therefore, electronic control requires extremely stringent control of the hydrogen and air pressures. Gas pressure is a highly sensitive physical quantity, so current fuel cell controller programs are designed to operate within a short, specified cycle to ensure operational accuracy. Within this cycle, the FCU sequentially executes the application layer, algorithm layer, driver layer, and hardwire and bus signal processing.
[0003] Existing technologies primarily focus on system accuracy, treating the fuel cell as a single system from an electronic control perspective. However, when considering the fuel cell within a control system, the air decoupling system, hydrogen injection system, cooling system, and electrical system are four relatively independent systems with distinct control characteristics. Executing the fuel cell control system as a whole within a specified execution cycle results in a certain amount of FCU memory waste and program execution redundancy. As fuel cell control system strategies grow to a certain scale, the excessive code content can lead to code not being executed or skipping a 10ms execution cycle if a single task exceeds the specified execution cycle. This compromises program execution accuracy and stability. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a fuel cell and control method that classifies the air decoupling system, hydrogen injection system, cooling system and electrical system independently, characterizes the control programs of each component and prioritizes them to meet needs.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] A fuel cell comprises a hydrogen injection system, an air decoupling system, a cooling system, an electrical system and a controller;
[0007] The hydrogen injection system includes a hydrogen pressure signal and a hydrogen injection signal, and transmits the hydrogen pressure signal and the hydrogen injection signal to the controller;
[0008] The air decoupling system includes an air pressure signal and transmits the air pressure signal to the controller;
[0009] The cooling system includes a temperature change signal and transmits the temperature signal to the controller;
[0010] The electrical system includes a DC module, and the DC signal generated by the DC module is transmitted to the controller;
[0011] The controller sets the hydrogen pressure signal and the hydrogen injection signal as the first priority, the air pressure signal as the second priority, the temperature signal as the third priority, and the DC signal as the fourth priority, and executes the corresponding program in order of priority.
[0012] Preferably, the hydrogen injection system includes a hydrogen injector and a hydrogen pressure sensor, the hydrogen injector includes a solenoid valve, the working cycle of the solenoid valve is 20Hz-90Hz, and the signal generated by the solenoid valve is a hydrogen injection signal;
[0013] The signal generated by the hydrogen pressure sensor is a hydrogen pressure signal.
[0014] Preferably, the air decoupling system includes an air pressure sensor, and the signal generated by the air pressure sensor is an air pressure signal.
[0015] Preferably, the cooling system comprises a temperature sensor, and the signal generated by the temperature sensor is a temperature change signal.
[0016] Preferably, the fuel cell further includes an independent timer, and the controller is electrically connected to the timer.
[0017] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0018] A fuel cell control method comprising:
[0019] Modularize the fuel cell control program, convert the input and output of each component control model into global variables, and transmit information through global variables;
[0020] Each system and corresponding components of the fuel cell are formed into independent control modules. After each independent control module is extracted independently, the fuel cell is divided into the hydrogen injection system, air decoupling system, cooling system, and electrical system.
[0021] The hydrogen pressure signal and hydrogen injection signal generated by the hydrogen injection system are processed with the first priority; the air pressure signal generated by the air decoupling system is processed with the second priority; the temperature change signal generated by the cooling system is processed with the third priority; the DC signal generated by the electrical system is processed with the fourth priority.
[0022] Preferably, the modularizing the control program of the fuel cell further comprises: modularizing the control program of the fuel cell using Simulink.
[0023] Preferably, the Simulink uses two models, Data Store Read and Data Store Write, to perform modular processing on the control program of the fuel cell.
[0024] Preferably, the method further comprises an independent timing program, which is implemented by a timer, and the timer automatically increases by 1 every 500us. When the timer reaches a multiple of 20, Eventflag_10ms is set to 1; when the timer reaches a multiple of 40, Eventflag_20ms is set to 1; when the timer reaches a multiple of 100, Eventflag_50ms is set to 1;
[0025] The program that calculates the flag at the beginning of each operation cycle node will be executed first in a very short time. The flag of the program that needs to be executed in this cycle will be set to 1, and it will be executed in sequence from short to long execution cycle.
[0026] Preferably, the electrical module further comprises a state machine strategy layer; the method further comprises communication between the application layer and the CAN communication module;
[0027] The hydrogen injection control program and pressure sensor driver for the hydrogen pressure signal and hydrogen injection signal pair are placed in a task with a 10ms cycle; the air supply algorithm corresponding to the air pressure signal is placed in a task with a 20ms cycle; the program corresponding to the temperature change signal of the cooling system, the DC model and state machine strategy of the electrical system are placed in a task with a 50ms cycle, and the application layer and CAN communication module are placed in a task with a 50ms cycle.
[0028] The beneficial effects of the present invention are as follows: the hydrogen injection system, air decoupling system, cooling system, and electrical system are independently formed into four independent modules, and the generated signals are independently transmitted to the controller for processing. By sorting the priorities, the programs that the FCU needs to execute are divided into four priorities for calculation to meet the response rate requirements of different programs. Then, in conjunction with the task scheduling strategy, the purpose of optimizing the FCU operation can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A block diagram of a fuel cell system according to a specific embodiment of the present invention;
[0030] Figure 2 Schematic diagram of an execution cycle of a fuel cell control method according to a specific embodiment of the present invention. DETAILED DESCRIPTION
[0031] To illustrate the technical content, achieved objectives and effects of the present invention in detail, the following description is given in conjunction with the embodiments and accompanying drawings.
[0032] Please refer to Figure 1 as well as Figure 2 , a fuel cell comprising a hydrogen injection system, an air decoupling system, a cooling system, an electrical system and a controller;
[0033] The hydrogen injection system includes a hydrogen pressure signal and a hydrogen injection signal, and transmits the hydrogen pressure signal and the hydrogen injection signal to the controller;
[0034] The air decoupling system includes an air pressure signal and transmits the air pressure signal to the controller;
[0035] The cooling system includes a temperature change signal and transmits the temperature signal to the controller;
[0036] The electrical system includes a DC module, and the DC signal generated by the DC module is transmitted to the controller;
[0037] The controller sets the hydrogen pressure signal and the hydrogen injection signal as the first priority, the air pressure signal as the second priority, the temperature signal as the third priority, and the DC signal as the fourth priority, and executes the corresponding program in order of priority.
[0038] From the above description, it can be seen that the hydrogen injection system, air decoupling system, cooling system, and electrical system are independently formed into four independent modules. The generated signals are independently transmitted to the controller for processing. Through priority sorting, the programs that need to be executed by the FCU are divided into four priority levels for calculation to meet the response rate requirements of different programs. Then, combined with the task scheduling strategy, the purpose of optimizing the operation of the FCU can be achieved.
[0039] Furthermore, the hydrogen injection system includes a hydrogen injector and a hydrogen pressure sensor, the hydrogen injector includes a solenoid valve, the working cycle of the solenoid valve is 20Hz-90Hz, and the signal generated by the solenoid valve is a hydrogen injection signal;
[0040] The signal generated by the hydrogen pressure sensor is a hydrogen pressure signal.
[0041] Furthermore, the air decoupling system includes an air pressure sensor, and the air pressure sensor generates an air pressure signal.
[0042] Furthermore, the cooling system includes a temperature sensor, and the signal generated by the temperature sensor is a temperature change signal.
[0043] Furthermore, the fuel cell further includes an independent timer, and the controller is electrically connected to the timer.
[0044] A fuel cell control method comprising:
[0045] Modularize the fuel cell control program, convert the input and output of each component control model into global variables, and transmit information through global variables;
[0046] Each system and corresponding components of the fuel cell are formed into independent control modules. After each independent control module is extracted independently, the fuel cell is divided into the hydrogen injection system, air decoupling system, cooling system, and electrical system.
[0047] The hydrogen pressure signal and hydrogen injection signal generated by the hydrogen injection system are processed with the first priority; the air pressure signal generated by the air decoupling system is processed with the second priority; the temperature change signal generated by the cooling system is processed with the third priority; the DC signal generated by the electrical system is processed with the fourth priority.
[0048] From the above description, it can be seen that the system architecture and execution timing method after the modularization of the fuel cell classifies and modularizes the physical characteristics of a set of different components of the fuel cell, and places different modules into different execution timings according to the sensitivity of the physical characteristics, thereby achieving a method and evaluation for optimizing program execution efficiency and FCU memory operation speed.
[0049] Furthermore, the modularizing the control program of the fuel cell further includes: modularizing the control program of the fuel cell using Simulink.
[0050] Furthermore, the Simulink uses two models, Data Store Read and Data Store Write, to modularize the control program of the fuel cell.
[0051] Furthermore, the method further includes an independent timing program, which is implemented by a timer. The timer automatically increases by 1 every 500us. When the timer reaches a multiple of 20, Eventflag_10ms is set to 1. When the timer reaches a multiple of 40, Eventflag_20ms is set to 1. When the timer reaches a multiple of 100, Eventflag_50ms is set to 1.
[0052] The program that calculates the flag at the beginning of each operation cycle node will be executed first in a very short time. The flag of the program that needs to be executed in this cycle will be set to 1, and it will be executed in sequence from short to long execution cycle.
[0053] Furthermore, the electrical module further comprises a state machine strategy layer; the method further comprises communication between the application layer and the CAN communication module;
[0054] The hydrogen injection control program and pressure sensor driver for the hydrogen pressure signal and hydrogen injection signal pair are placed in a task with a 10ms cycle; the air supply algorithm corresponding to the air pressure signal is placed in a task with a 20ms cycle; the program corresponding to the temperature change signal of the cooling system, the DC model and state machine strategy of the electrical system are placed in a task with a 50ms cycle, and the application layer and CAN communication module are placed in a task with a 50ms cycle.
[0055] From the above description, it can be seen that this task scheduling method not only ensures the calculation accuracy of the hydrogen injection algorithm and pressure sensor, but also ensures the timing coordination of the three subsystems of hydrogen, air, and cooling, avoiding the problem of partial task loss due to the excessive length of a single task code. Example
[0056] Reference Figure 1 (Part of the content corresponds to Example 1, i.e. Figure 1 is a reference), a fuel cell comprising a hydrogen injection system, an air decoupling system, a cooling system, an electrical system, and a controller;
[0057] The hydrogen injection system includes a hydrogen pressure signal and a hydrogen injection signal, and transmits the hydrogen pressure signal and the hydrogen injection signal to the controller;
[0058] The air decoupling system includes an air pressure signal and transmits the air pressure signal to the controller;
[0059] The cooling system includes a temperature change signal and transmits the temperature signal to the controller;
[0060] The electrical system includes a DC module, and the DC signal generated by the DC module is transmitted to the controller;
[0061] The controller sets the hydrogen pressure signal and the hydrogen injection signal as the first priority, the air pressure signal as the second priority, the temperature signal as the third priority, and the DC signal as the fourth priority, and executes the corresponding program in order of priority.
[0062] The hydrogen injection system includes a hydrogen injector and a hydrogen pressure sensor. The hydrogen injector includes a solenoid valve. The working cycle of the solenoid valve is 20Hz-90Hz. The signal generated by the solenoid valve is a hydrogen injection signal.
[0063] The signal generated by the hydrogen pressure sensor is a hydrogen pressure signal.
[0064] The air decoupling system includes an air pressure sensor, and the air pressure sensor generates an air pressure signal.
[0065] The cooling system includes a temperature sensor, and the signal generated by the temperature sensor is a temperature change signal.
[0066] The fuel cell further includes an independent timer, and the controller is electrically connected to the timer. Example
[0067] A fuel cell control method comprising:
[0068] Before scheduling fuel cell tasks, we must first modularize the fuel cell control program. This process is completed in Simulink. To modularize the Simulink program, the input and output of each component control model must be changed to global variables, so that each module can be independent and information can be transmitted through global variables. The specific method can be to use Simulink's Data Store Read and Data Store Write models; after modularizing the fuel cell control system, we can divide the control system program into Figure 1 The architecture is decomposed.
[0069] Each system and corresponding components of the fuel cell are formed into independent control modules. After each independent control module is extracted independently, the fuel cell is divided into the hydrogen injection system, air decoupling system, cooling system, and electrical system.
[0070] The hydrogen pressure signal and hydrogen injection signal generated by the hydrogen injection system are processed with the first priority; the air pressure signal generated by the air decoupling system is processed with the second priority; the temperature change signal generated by the cooling system is processed with the third priority; the DC signal generated by the electrical system is processed with the fourth priority.
[0071] For fuel cells, due to the high pressure of the hydrogen supply system, the hydrogen injection pressure is very sensitive, and the working cycle of the hydrogen injection solenoid valve is between 20Hz and 90Hz. Therefore, the acquisition of the hydrogen pressure signal and the calculation of the hydrogen injection should be placed at the highest program execution priority. In the air supply system, affected by the response speed of the air compressor and throttle itself, the execution priority of the air pressure algorithm-related modules can be placed at the second priority, and the air pressure sensor acquisition can be placed at the second priority of program execution. In the cooling system, since the temperature response and change rate are much lower than the change in gas pressure, the entire cooling system can be placed at the third priority. Since the DC and application layers involve the interaction process with the entire vehicle, they do not require extremely high millisecond-level accuracy and can be placed at the fourth priority of program execution.
[0072] In this way, the programs that the FCU needs to execute are divided into 4 priority levels for calculation, and then combined with the task scheduling strategy, the goal of optimizing the FCU operation can be achieved.
[0073] Fuel cell controller program task scheduling strategy:
[0074] First of all, a concept that needs to be put forward is that the underlying program of the fuel cell controller has a most basic program execution cycle when it is executed. This execution cycle is the minimum execution cycle that the FCU chip can support.
[0075] Assumption: The controller described in this article has a minimum execution cycle of 10ms. Most current fuel cell control programs run within this cycle. As control strategies increase, the amount of program code also increases. A single 10ms cycle is no longer sufficient for fuel cell control systems.
[0076] For fuel cell systems, control engineers can implement program execution in different cycles, such as 10ms, 20ms, 50ms, etc. by writing program execution code. Modularizing the fuel cell subsystem and running it in different execution cycles can effectively improve efficiency. There is a basic timer Counter in the system. The program of this timer is independent of the user's execution program. The specific implementation method of the execution cycle is as follows: Figure 2 ;
[0077] During program execution, the timer counter automatically increments by 1 every 500us. When the program counter reaches a multiple of 20, Eventflag_10ms is set to 1 (10ms cycle). When the counter reaches a multiple of 40, Eventflag_20ms is set to 1 (20ms cycle). When the counter reaches a multiple of 100, Eventflag_50ms is set to 1 (50ms cycle). Programs that calculate flags at the beginning of each execution cycle are prioritized for execution in the shortest possible time. Programs that need to be executed within this cycle have their flags set to 1, and then are executed in order of execution cycle length, from shortest to longest.
[0078] In this sequential execution system, we place the fuel cell's hydrogen injection control program and pressure sensor driver into a 10ms period task, the air supply algorithm into a 20ms period task, the cooling system, DC, and state machine strategy into a 50ms period task, and the application layer and CAN communication module into a 50ms period task.
[0079] This task scheduling method not only ensures the calculation accuracy of the hydrogen injection algorithm and pressure sensor, but also ensures the timing coordination of the three subsystems of hydrogen, air, and cooling, avoiding the problem of partial task loss due to the excessive length of a single task code.
[0080] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A fuel cell, characterized in that: Including hydrogen injection system, air decoupling system, cooling system, electrical system and controller; The hydrogen injection system includes a hydrogen pressure signal and a hydrogen injection signal, and transmits the hydrogen pressure signal and the hydrogen injection signal to the controller; The air decoupling system includes an air pressure signal and transmits the air pressure signal to the controller; The cooling system includes a temperature change signal and transmits the temperature signal to the controller; The electrical system includes a DC module, and the DC signal generated by the DC module is transmitted to the controller; The controller sets the hydrogen pressure signal and the hydrogen injection signal to the first priority, the air pressure signal to the second priority, the temperature signal to the third priority, and the DC signal to the fourth priority, and executes the corresponding program in order of priority; The hydrogen injection system includes a hydrogen injector and a hydrogen pressure sensor. The hydrogen injector includes a solenoid valve. The working cycle of the solenoid valve is 20Hz-90Hz. The signal generated by the solenoid valve is a hydrogen injection signal. The signal generated by the hydrogen pressure sensor is a hydrogen pressure signal; The fuel cell further includes an independent timer, and the controller is electrically connected to the timer.
2. The fuel cell according to claim 1, wherein The air decoupling system includes an air pressure sensor, and the air pressure sensor generates an air pressure signal.
3. The fuel cell according to claim 1, wherein The cooling system includes a temperature sensor, and the signal generated by the temperature sensor is a temperature change signal.
4. A fuel cell control method, characterized in that: include Modularize the fuel cell control program, convert the input and output of each component control model into global variables, and transmit information through global variables; Each system and corresponding components of the fuel cell are formed into independent control modules. After each independent control module is extracted independently, the fuel cell is divided into the hydrogen injection system, air decoupling system, cooling system, and electrical system. The hydrogen pressure signal and hydrogen injection signal generated by the hydrogen injection system are processed with the first priority; the air pressure signal generated by the air decoupling system is processed with the second priority; the temperature change signal generated by the cooling system is processed with the third priority; and the DC signal generated by the electrical system is processed with the fourth priority; The modularizing the control program of the fuel cell further comprises: modularizing the control program of the fuel cell using Simulink; The method further includes an independent timing program, which is implemented by a timer. The timer automatically increases by 1 every 500us. When the timer reaches a multiple of 20, Eventflag_10ms is set to 1. When the timer reaches a multiple of 40, Eventflag_20ms is set to 1. When the timer reaches a multiple of 100, Eventflag_50ms is set to 1. The program that calculates the flag at the beginning of each operation cycle node will be executed first in the shortest time. The flag of the program that needs to be executed in this cycle will be set to 1, and it will be executed in order from the shortest execution cycle to the longest execution cycle. The electrical module also includes a state machine strategy layer; the method also includes communication between the application layer and the CAN communication module; The hydrogen injection control program and pressure sensor driver for the hydrogen pressure signal and hydrogen injection signal pair are placed in a task with a 10ms cycle; the air supply algorithm corresponding to the air pressure signal is placed in a task with a 20ms cycle; the program corresponding to the temperature change signal of the cooling system, the DC model and state machine strategy of the electrical system are placed in a task with a 50ms cycle, and the application layer and CAN communication module are placed in a task with a 50ms cycle.
5. The fuel cell control method according to claim 4, characterized in that: The Simulink uses two models, DataStore Read and Data Store Write, to modularize the control program of the fuel cell.
Citation Information
Patent Citations
Fuel cell
CN217955918U
Method and apparatus for monitoring a fuel cell
US20210063493A1