Establishment method of hydrogen fuel cell vehicle control unit hardware-in-the-loop simulation test system
By constructing a fuel cell vehicle simulation model, the problem of the existing technology that hydrogen fuel cells and batteries cannot be simulated and tested as power sources is solved. Efficient and safe hardware-in-the-loop simulation testing of hydrogen fuel cell vehicle controllers is achieved, and the controllability and repeatability of the test are improved.
Patent Information
- Application Number
- CN202511176609.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-10-17
AI Technical Summary
The existing technology is unable to conduct simulation tests of hydrogen fuel vehicles powered by hydrogen fuel cells and batteries, resulting in problems in actual vehicle testing such as poor economy, high resource consumption, low efficiency, high safety risks, insufficient test controllability and coverage, and poor repeatability.
Build a fuel cell vehicle simulation model, including the fuel cell controller model, automatic transmission system model, drive motor model and hydrogen supply system model, and realize the control of the drive motor and hydrogen fuel cell through the communication connection between the vehicle controller and these models, and complete the construction of the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system.
The simulation test of hydrogen fuel vehicles with hydrogen fuel cells and batteries as power sources has been realized, which has reduced testing costs, improved testing efficiency and safety, enhanced test controllability and coverage, and ensured the repeatability and consistency of test results.
Smart Images

Figure CN120802918A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of new energy vehicle control technology, and particularly to a method for building a hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system. BACKGROUND
[0002] With the increasing demand for energy, hydrogen fuel cell vehicles have become an important choice to replace traditional internal combustion engine vehicles. Hydrogen fuel cell vehicles (FCEV) have the characteristics of zero emission, long endurance, fast charging, etc. The fuel cell vehicle control unit (VCU) plays an absolutely core and "brain" role in FCEV.
[0003] The current VCU development process relies heavily on real vehicle test for testing, verification and calibration, but real vehicle testing has many drawbacks, such as poor economy, large resource consumption, low efficiency, long test cycle, high safety risk, limited boundary testing, insufficient test controllability and coverage, and poor repeatability, etc.
[0004] In order to solve the above problems, the prior art uses virtual simulation technology for pre-test verification. However, the existing technology only has a vehicle model powered by a battery, an engine and a battery-engine, which cannot simulate a hydrogen fuel vehicle powered by a hydrogen fuel cell-battery, so it cannot realize simulation testing of a hydrogen fuel vehicle powered by a hydrogen fuel cell-battery. SUMMARY
[0005] The present application proposes a method for building a hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system to solve the problem that the prior art cannot perform simulation testing of a hydrogen fuel vehicle powered by a hydrogen fuel cell-battery, and to realize the building of a hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system to complete the simulation testing of a hydrogen fuel vehicle powered by a hydrogen fuel cell-battery.
[0006] The present application provides a method for building a hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system, which comprises:
[0007] A fuel cell vehicle simulation model is constructed, wherein the fuel cell vehicle simulation model comprises a fuel cell controller model, an automatic transmission system model, a drive motor model and a hydrogen supply system model, and the fuel cell vehicle simulation model is in communication connection with the vehicle controller;
[0008] In a case where the vehicle controller determines that the automatic transmission system model is successfully engaged, the vehicle controller calculates a transmission demand output torque, and sends the transmission demand torque to the drive motor model to obtain a drive motor demand torque, thereby realizing control of the drive motor;
[0009] In a case where the vehicle controller determines that the fuel cell needs to be started, a fuel cell starting success state is obtained, and a fuel cell target power is calculated, which is sent to the fuel cell controller model, and the fuel cell controller model sends an actual fuel cell power to the vehicle controller, thereby realizing control of the hydrogen fuel cell and completing the construction of the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system.
[0010] According to the construction method of the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided in the embodiments of the present application, the case where the vehicle controller determines that the fuel cell needs to be started includes that a current value of a battery state of charge is less than a preset value.
[0011] The calculation formula of the battery state of charge includes:
[0012]
[0013] SOC represents the battery state of charge, SOC ini represents an initial value of the battery state of charge, C represents a battery capacity, and I bat represents a bus current.
[0014] According to the construction method of the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided in the embodiments of the present application, the bus current is obtained based on a drive motor current, an accessory current, a fuel cell current, and a current calculation formula.
[0015] The current calculation formula includes:
[0016] I bat =I motor +I aux -I FB ;
[0017] I bat represents the bus current, and is negative during charging and positive during discharging, I motor represents the drive motor current, I aux represents the accessory current, and I FB represents the fuel cell current.
[0018] According to the construction method of the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided in the embodiments of the present application, the fuel cell vehicle simulation model further includes an electric accessory system model and a fuel cell model.
[0019] The drive motor model determines the drive motor demand torque calculated by the drive motor controller model as the drive motor actual torque output, calculates the product of the drive motor actual torque and the motor speed to obtain the motor actual power, and calculates the quotient of the motor actual power and the vehicle DC high-voltage bus voltage to obtain the drive motor current value;
[0020] The electric accessory system model calculates the quotient of the accessory power and the vehicle DC high-voltage bus voltage to obtain the accessory current value.
[0021] The fuel cell model calculates the quotient of the fuel cell actual power and the vehicle DC high-voltage bus voltage to obtain the fuel cell current value.
[0022] According to the method for building the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided in the embodiments of the present application, the vehicle DC high-voltage bus voltage is obtained based on a battery state of charge and a bus voltage calculation formula.
[0023] The bus voltage calculation formula includes:
[0024] U bat = U OC -I bat ·R;
[0025] Wherein, U bat represents the vehicle DC high-voltage bus voltage, U OC represents the open-circuit voltage, which is obtained based on the battery state of charge, I bat represents the bus current, and R represents the battery internal resistance value.
[0026] According to the method for building the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided in the embodiments of the present application, the fuel cell vehicle simulation model further includes a driver model.
[0027] Before the vehicle controller determines that the automatic transmission system model successfully engages the gear, the method further includes:
[0028] In a case where it is determined that the vehicle controller determines that the fuel cell vehicle enters a ready state and judges a gear request instruction sent by the driver model, the gear request instruction is sent to the automatic transmission controller model, wherein the gear request instruction includes a pedal opening degree and a target gear.
[0029] The automatic transmission controller model performs table lookup processing based on the pedal opening degree and the target gear to obtain a target speed of the transmission output shaft corresponding to the target gear, and completes successful gear engagement based on an actual speed of the transmission output shaft and the target speed, wherein the target speed includes a first target speed of a gear-up transmission output shaft and a second target speed of a gear-down transmission output shaft.
[0030] According to the method for building the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided in the embodiment, the first target rotating speed is greater than the second target rotating speed;
[0031] The successful gear engagement is completed based on the actual rotating speed of the gearbox output shaft and the target rotating speed, and includes:
[0032] The actual rotating speed is compared with the target rotating speed;
[0033] In a case where it is determined that the actual rotating speed is greater than the first target rotating speed, the automatic gearbox controller model is shifted to a target gear position to complete the upshift gear engagement;
[0034] In a case where it is determined that the actual rotating speed is less than the second target rotating speed, the automatic gearbox controller model is shifted to a target gear position to complete the downshift gear engagement;
[0035] In a case where it is determined that the actual rotating speed is less than or equal to the first target rotating speed and greater than or equal to the second target rotating speed, the automatic gearbox controller model keeps the current gear position unchanged.
[0036] According to the method for building the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided in the embodiment, the fuel cell vehicle simulation model further includes a multi-in-one controller model, a battery system and an electric accessory system;
[0037] Before the vehicle controller determines that the automatic gearbox system model successfully engages the gear, the method further includes:
[0038] In a case where it is determined that the vehicle controller receives a high-voltage closed state corresponding to the battery in the battery system, the high-voltage line in the electric accessory system model is controlled to be closed with the vehicle high-voltage line, and an accessory high-voltage control instruction is sent to the multi-in-one controller model;
[0039] The multi-in-one controller model feeds back an accessory high-voltage closed state to the vehicle controller based on the accessory high-voltage control instruction;
[0040] The vehicle controller sends a main drive high-voltage control instruction to the multi-in-one controller model;
[0041] The multi-in-one controller model feeds back a main drive high-voltage closed state to the vehicle controller based on the main drive high-voltage control instruction, and determines that the fuel cell vehicle enters a ready state.
[0042] According to the method for building the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided in the embodiment, the fuel cell vehicle simulation model further includes a driver model and a battery system;
[0043] In a case where it is determined that the vehicle controller receives the KL15 signal sent by the driver model, the control closes the high-voltage line in the battery system model and the high-voltage line of the vehicle, and the vehicle controller sends a high-voltage control instruction on the battery;
[0044] The battery controller model feeds back the high-voltage closing state of the battery to the vehicle controller based on the high-voltage control instruction on the battery.
[0045] According to the method for building the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided in the embodiments of the present application, the fuel cell vehicle simulation model further comprises a vehicle dynamics model.
[0046] The vehicle dynamics model is used to calculate the vehicle driving speed.
[0047] The method for building the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided in the embodiments of the present application builds a fuel cell vehicle simulation model, wherein the fuel cell vehicle simulation model comprises a fuel cell controller model, an automatic transmission system model, a drive motor model and a hydrogen supply system model, the fuel cell vehicle simulation model is in communication connection with the vehicle controller, the simulation model of the hydrogen fuel cell vehicle is built in advance, and the connection between the simulation model and the vehicle controller is established; then, in a case where it is determined that the vehicle controller determines that the automatic transmission system model is successfully engaged, the vehicle controller is used to calculate the transmission demand output torque, the transmission demand torque is sent to the drive motor model to obtain the drive motor demand torque, and the control of the drive motor is realized; and in a case where it is determined by the vehicle controller that the fuel cell needs to be started, the starting success state of the fuel cell is obtained, the hydrogen storage bottle electromagnetic valve control instruction is sent to the hydrogen supply system model to obtain the hydrogen storage bottle electromagnetic valve state, the fuel cell target power is calculated, the fuel cell target power is sent to the fuel cell controller model, the fuel cell controller model sends the actual power of the fuel cell to the vehicle controller, the control of the hydrogen fuel cell is realized, the building of the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system is completed, and it can be seen that the connection between the vehicle controller and the automatic transmission system model and the drive motor model is built to realize the control of the drive motor, the connection between the vehicle controller and the hydrogen supply system model is built to realize the control of the hydrogen fuel cell, the building of the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system is finally completed, and the simulation test of the hydrogen fuel vehicle with the hydrogen fuel cell-battery as the power source is realized. BRIEF DESCRIPTION OF DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings described below are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0049] Figure 1 is one of the flowcharts of the method for building the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided by the embodiments of the present application;
[0050] Figure 2 is the second flowchart of the method for building the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided by the embodiments of the present application;
[0051] Figure 3 is the third flowchart of the method for building the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided by the embodiments of the present application;
[0052] Figure 4 is the structural schematic diagram of the hydrogen fuel cell vehicle power system provided by the embodiments of the present application;
[0053] Figure 5 is the structural schematic diagram of the vehicle controller provided by the embodiments of the present application;
[0054] Figure 6 is the interaction schematic diagram of the fuel cell vehicle simulation model provided by the embodiments of the present application;
[0055] Figure 7 is the structural schematic diagram of the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided by the embodiments of the present application;
[0056] Figure 8 is the fourth flowchart of the method for building the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided by the embodiments of the present application;
[0057] Figure 9 is the structural schematic diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be described clearly and completely below with the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0059] In order to clearly explain this application, the following further explains a series of problems existing in hydrogen fuel cell vehicles and existing technologies:
[0060] Key aspects of vehicle controller:
[0061] 1. Multi-system Optimization: The FCEV is a complex system, encompassing the fuel cell system (fuel cell stack, air supply, hydrogen supply, thermal management), power battery system, drive motor system, DC / DC converter, transmission system, and auxiliary systems. The vehicle controller (VCU) receives driver commands (accelerator pedal, brake pedal, gear position, etc.), sensor signals, and subsystem status information. Based on this information, the VCU performs complex real-time calculations and decisions, coordinating the operating states and objectives of each subsystem to ensure the entire powertrain operates with maximum efficiency, optimal performance, and safety.
[0062] 2. Power allocation strategy: This is one of the core functions of the VCU. It needs to dynamically allocate power flow between the fuel cell system and the power battery system in real time based on factors such as vehicle power demand, battery SOC (state of charge), fuel cell efficiency characteristics, and system efficiency.
[0063] 3. Driving Performance Adjustment: Based on the driver's intent (accelerator pedal position and its rate of change), the system coordinates the output of the fuel cell and battery to provide a smooth, rapid, and predictable power response. This system enables different driving modes (e.g., Eco, Hybrid, and Pure Electric) and adjusts the vehicle's dynamic characteristics and energy efficiency by adjusting the energy management strategy.
[0064] 4. Safety operation monitoring: The VCU continuously monitors the hydrogen concentration sensor and immediately initiates safety measures (such as closing the hydrogen supply valve) if a leak or anomaly (such as a sudden pressure drop or excessive concentration) is detected. The VCU monitors the insulation status of the high-voltage system, voltage and current anomalies, and short-circuit risks to ensure high-voltage electrical safety. The VCU diagnoses faults in each subsystem (including the fuel cell stack itself) in real time and adopts a corresponding degraded operating mode or safe parking measures based on the fault level to ensure the safety of passengers and the vehicle.
[0065] 5. Communication hub: Conducts high-speed and reliable data exchange with all relevant nodes such as the fuel cell controller, battery management system, motor controller, transmission controller, instrument panel, and body controller via the CAN bus; supports communication with diagnostic equipment, remote monitoring platforms, etc., to implement functions such as fault diagnosis, software updates, and data monitoring.
[0066] Disadvantages of real vehicle testing:
[0067] 1. Poor economy, high resource consumption: The test process consumes a large amount of expensive hydrogen fuel, and the depreciation and maintenance costs of the whole vehicle (including fuel cell system, high-pressure hydrogen storage system, power battery, drive motor, gearbox, etc.) are high, resulting in high development and verification costs.
[0068] 2. Low efficiency, long cycle: The test is subject to external constraints such as environmental conditions (temperature and humidity, altitude), road resources, and traffic regulations, making it difficult to efficiently and repeatedly reproduce complex and variable working conditions (such as extremely low temperature cold start, high power step response, and multi-system coupling fault). Single test covers limited scenarios, and preparation and coordination takes a long time, which seriously restricts the development iteration speed.
[0069] 3. High safety risk, limited boundary testing: Testing extreme conditions or critical faults (such as hydrogen system leakage, severe overloading of the battery, and high-voltage short circuit) in real vehicles poses a great risk and is likely to cause safety accidents or irreversible damage to expensive components, forcing many necessary boundary safety tests to be insufficient.
[0070] 4. Insufficient test controllability and coverage: It is difficult to accurately and independently control all input variables (such as subtle differences in the internal state of the battery and the performance boundaries of auxiliary components), and it is difficult to stably trigger and safely execute all pre-set fault combinations and transient extreme conditions, resulting in insufficient robustness verification of the controller under complex boundary conditions and full fault modes.
[0071] 5. Repeatability and consistency challenges: Test results are easily disturbed by uncontrollable factors such as driver operation, road conditions, environmental fluctuations, and vehicle state degradation, making it difficult to compare different tests and accurately evaluate performance and optimize parameters.
[0072] Embodiments of the present application provide a method for building a hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system. The method can be applied to a smart terminal and can also be applied to a server. The present application takes the application of the method in the server as an example for illustration, and some other explanations in the embodiments are for illustration only and do not limit the protection scope of the present application. The specific implementation of the method is as shown in Figure 1
[0073] Step 101, build a fuel cell vehicle simulation model.
[0074] The fuel cell vehicle simulation model includes a fuel cell controller model, an automatic transmission system model, a drive motor model, and a hydrogen supply system model. The fuel cell vehicle simulation model and the vehicle controller are in communication connection.
[0075] Step 102, in the case of determining that the vehicle controller determines that the automatic transmission system model is successfully engaged, the torque control module in the vehicle controller is used to calculate the transmission demand output torque, and the transmission demand torque is sent to the drive motor model to obtain the drive motor demand torque, and the control of the drive motor is realized.
[0076] Step 103, and in the case of determining that the fuel start-stop control module in the vehicle controller needs to start the fuel cell, the fuel cell start success state is obtained, the hydrogen storage bottle electromagnetic valve control instruction is sent to the hydrogen supply system model to obtain the hydrogen storage bottle electromagnetic valve state, and the energy distribution management control module in the vehicle controller is used to calculate the fuel cell target power, the fuel cell target power is sent to the fuel cell controller model, the fuel cell controller model sends the actual power of the fuel cell to the vehicle controller, the control of the hydrogen fuel cell is realized, and the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system is built.
[0077] The method for building the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided by the embodiment of the application builds a fuel cell vehicle simulation model, wherein the fuel cell vehicle simulation model includes a fuel cell controller model, an automatic transmission system model, a drive motor model and a hydrogen supply system model, the fuel cell vehicle simulation model is in communication connection with the vehicle controller, the simulation model of the hydrogen fuel cell vehicle is pre-built, and the connection between the simulation model and the vehicle controller is established; then, in the case of determining that the vehicle controller determines that the automatic transmission system model is successfully engaged, the torque control module in the vehicle controller is used to calculate the transmission demand output torque, and the transmission demand torque is sent to the drive motor model to obtain the drive motor demand torque, and the control of the drive motor is realized; and in the case of determining that the fuel start-stop control module in the vehicle controller needs to start the fuel cell, the fuel cell start success state is obtained, the hydrogen storage bottle electromagnetic valve control instruction is sent to the hydrogen supply system model to obtain the hydrogen storage bottle electromagnetic valve state, and the energy distribution management control module in the vehicle controller is used to calculate the fuel cell target power, the fuel cell target power is sent to the fuel cell controller model, the fuel cell controller model sends the actual power of the fuel cell to the vehicle controller, the control of the hydrogen fuel cell is realized, and the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system is built. It can be seen that the connection between the vehicle controller, the automatic transmission system model and the drive motor model is built to realize the control of the drive motor, the connection between the vehicle controller and the hydrogen supply system model is built to realize the control of the hydrogen fuel cell, and finally the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system is built, and the simulation test of the hydrogen fuel vehicle with the hydrogen fuel cell-battery as the power source is realized.
[0078] In a specific embodiment, the fuel start-stop control module determines that the fuel cell needs to be started when: a current value of the battery state of charge is less than a preset value.
[0079] The calculation formula of the battery state of charge is shown in formula (1):
[0080]
[0081] Among them, SOC represents the state of charge of the battery. ini Indicates the initial value of the battery state of charge, C indicates the battery capacity, I bat Indicates the bus current.
[0082] In a specific embodiment, the bus current is obtained based on the drive motor current, the accessory current, the fuel cell current, and a current calculation formula.
[0083] The current calculation formula is shown in formula (2):
[0084] I bat =I motor +I aux -I FB ..............(2)
[0085] Among them, I bat Indicates bus current, and is negative when charging and positive when discharging. motor Indicates the driving motor current, I aux Indicates the accessory current, I FB represents the fuel cell current.
[0086] In a specific embodiment, the vehicle DC high-voltage bus voltage is obtained based on the battery state of charge and the bus voltage calculation formula.
[0087] The bus voltage calculation formula is shown in formula (3):
[0088] U bat =U OC -I bat ·R......................(3)
[0089] Among them, U bat Indicates the vehicle DC high-voltage bus voltage, U OC Represents the open circuit voltage, which is obtained based on the battery state of charge, I bat represents the bus current, and R represents the internal resistance of the battery.
[0090] In a specific embodiment, before the vehicle controller determines that the automatic transmission system model has successfully engaged a gear, the gear engagement needs to be completed successfully, such as Figure 2 As shown:
[0091] Step 201, in the case of determining that the whole vehicle controller determines that the fuel cell whole vehicle enters a ready state and judges the gear request instruction sent in response to the driver model, the gear request instruction is sent to the automatic transmission controller model.
[0092] The gear request instruction includes: pedal opening and target gear.
[0093] Step 202, the automatic transmission controller model performs table lookup processing based on the pedal opening and the target gear to obtain the target speed of the transmission output shaft corresponding to the target gear; and completes successful gear shifting based on the actual speed of the transmission output shaft and the target speed.
[0094] The target speed includes a first target speed of the upshift transmission output shaft and a second target speed of the downshift transmission output shaft.
[0095] In one embodiment, the specific implementation of completing successful gear shifting based on the actual speed of the transmission output shaft and the target speed includes:
[0096] Comparing the actual speed and the target speed; in the case of determining that the actual speed is greater than the first target speed, the automatic transmission controller model upshifts to the target gear to complete upshift gear shifting; in the case of determining that the actual speed is less than the second target speed, the automatic transmission controller model downshifts to the target gear to complete downshift gear shifting; in the case of determining that the actual speed is less than or equal to the first target speed and greater than or equal to the second target speed, the automatic transmission controller model keeps the current gear unchanged.
[0097] In one embodiment, before the whole vehicle controller determines that the automatic transmission system model completes gear shifting successfully, the whole vehicle needs to enter a ready state, such as Figure 3 As shown:
[0098] Step 301, in the case of determining that the whole vehicle controller receives the high-voltage closed state of the storage battery corresponding to the storage battery system, the high-voltage line in the electrical accessory system model is closed with the whole vehicle high-voltage line, and the accessory high-voltage control instruction is sent to the multi-in-one controller model.
[0099] Step 302, the multi-in-one controller model feeds back the accessory high-voltage closed state to the whole vehicle controller based on the accessory high-voltage control instruction.
[0100] Step 303, the whole vehicle controller sends the main drive high-voltage control instruction to the multi-in-one controller model.
[0101] Step 304, the multi-in-one controller model feeds back the main drive high-voltage closed state to the whole vehicle controller based on the main drive high-voltage control instruction, and determines that the fuel cell whole vehicle enters a ready state.
[0102] In one embodiment, in the case where the vehicle controller determines that the KL15 signal sent by the driver model is received, the high-voltage line in the battery system model is controlled to be closed with the high-voltage line of the vehicle, the vehicle controller sends a high-voltage control instruction on the battery, and the battery controller model feeds back the high-voltage closing state of the battery to the vehicle controller based on the high-voltage control instruction on the battery.
[0103] Specifically, the hydrogen fuel cell vehicle power system structure is as shown in Figure 4 , which includes a fuel cell system, a fuel cell DC-DC converter, a battery system, a drive motor system, and a gearbox system.
[0104] The fuel cell system includes a hydrogen supply system controller, a hydrogen supply system, a fuel cell controller, and a fuel cell.
[0105] The battery system includes a battery and a battery controller.
[0106] The drive motor system includes a drive motor and a drive motor controller.
[0107] The gearbox system includes a gearbox and a gearbox controller.
[0108] The fuel cell system converts the hydrogen energy in the on-board hydrogen storage system into electrical energy, and the electrical energy output by the fuel cell is connected to the high-voltage line through the conversion of the fuel cell DC-DC converter. The battery is also connected to the high-voltage line of the vehicle. The drive motor converts electrical energy into mechanical energy (or mechanical energy into electrical energy during energy recovery), and the torque output by the drive motor is transmitted to the wheels through the gearbox to drive the vehicle.
[0109] In the power system, each component has an independent controller, and its main functions include receiving control instructions from the vehicle controller, controlling the operation of the component, and returning state information of the component to the vehicle controller.
[0110] Specifically, the vehicle controller is the core of vehicle control, as shown in Figure 5 , its main functions include high-voltage on-off control, torque control, energy distribution management, fuel cell start-up control, target gear control, accessory control, and fault diagnosis management. As an upper control unit, it is responsible for coordinating the operation of the components in the power system, collecting the input information of the driver and the information sent by the component controllers, performing comprehensive analysis and judgment, realizing the power distribution of the entire system and the coordinated control of the components, and sending control instructions to the component controllers.
[0111] The fuel cell vehicle simulation model is as shown in Figure 6The vehicle simulation model is shown to include: a fuel cell system model, a hydrogen fuel system model, a battery system model, a drive motor system model, an automatic transmission system model, an electrical accessory system model (e.g., electronic fan, water pump, and electric air conditioner, etc.), a virtual controller module for each system, and a vehicle dynamics model, etc.
[0112] The specific construction process of the fuel cell vehicle simulation model includes:
[0113] (1) Driver model:
[0114] The driver model mainly sends KL15 signal, KL50 signal, accelerator pedal signal, brake pedal signal, and gear signal light driving instructions to the vehicle controller.
[0115] (2) Battery controller model:
[0116] In the case that the vehicle controller receives the KL15 signal sent by the driver model, the high-voltage line in the battery system model is controlled to be closed with the vehicle high-voltage line, and the vehicle controller sends the high-voltage control instruction on the battery. The battery controller model receives the high-voltage control instruction on the battery and feeds back the high-voltage closing state of the battery to the vehicle controller.
[0117] (3) Multi-in-one controller model:
[0118] In the case that the vehicle controller receives the high-voltage closing state corresponding to the battery, the high-voltage line in the electrical accessory system model is controlled to be closed with the vehicle high-voltage line, and the vehicle controller sends the high-voltage control instruction on the accessory. The multi-in-one controller model receives the high-voltage control instruction on the accessory and feeds back the high-voltage closing state of the accessory to the vehicle controller. At this time, in the case that the vehicle controller receives the KL50 signal and brake pedal signal sent by the driver model, the vehicle controller sends the high-voltage control instruction on the main drive. The multi-in-one controller model receives the high-voltage control instruction on the main drive and feeds back the high-voltage closing state of the main drive to the vehicle controller, and the vehicle enters the Ready state.
[0119] Among them, the Ready state indicates that the vehicle has completed self-checking of key components such as power battery, motor control system, and electronic equipment, and all systems are in normal working state, indicating that the vehicle can be driven at any time.
[0120] (4) Automatic transmission controller model:
[0121] After the whole vehicle enters the Ready state, the driver model sends a gear request instruction (D: forward gear, N: neutral gear, R: reverse gear), the whole vehicle controller receives the gear request instruction, and judges whether the current vehicle responds to the gear request instruction. In the case of responding to the gear request instruction, the gear request instruction is sent to the automatic transmission controller model. After the automatic transmission controller model receives the gear request instruction, the first target speed of the upshift transmission output shaft and the second target speed of the downshift transmission output shaft corresponding to the target gear are obtained by querying the map according to the pedal opening and the target gear.
[0122] Then, the actual speed of the transmission output shaft is compared with the first target speed, in the case of the actual speed being greater than the first target speed, the automatic transmission controller model upshifts to the target gear; in the case of the actual speed being less than the second target speed, the automatic transmission controller model downshifts to the target gear; in the case of the actual speed being between the first target speed and the second target speed, the current gear is kept unchanged.
[0123] Finally, successful gear engagement is achieved.
[0124] Wherein, the first target speed and the second target speed constitute a speed interval corresponding to the gear.
[0125] (5) Drive motor controller model:
[0126] After successful gear engagement based on the automatic transmission system model, the torque control module in the whole vehicle controller calculates the transmission demand output torque and sends it to the drive motor controller model. The drive motor controller model calculates the ratio of the transmission demand output torque to the transmission ratio corresponding to the current gear to obtain the drive motor demand torque.
[0127] (6) Fuel cell controller model:
[0128] After successful gear engagement based on the automatic transmission system model, the energy distribution management control module in the whole vehicle controller calculates the fuel cell target power, and the fuel start-stop control module in the whole vehicle controller judges whether the fuel cell needs to be started based on the whole vehicle state. In the case of determining that the fuel cell needs to be started, the fuel cell start instruction is sent. After the fuel cell controller model receives the fuel cell start instruction, it feeds back the fuel cell start success state to the whole vehicle controller, and calculates the product of the fuel cell target power and the power achievement rate to obtain the fuel cell actual power.
[0129] Wherein, the start condition of whether the fuel cell needs to be started is that the battery charge is less than a preset value, or a battery charge warning information occurs.
[0130] (7) Hydrogen supply system controller model:
[0131] The fuel start-stop control module in the vehicle controller judges whether the fuel cell needs to be started and sends the hydrogen storage bottle electromagnetic valve control instruction at the same time. The hydrogen supply system controller model feeds back the hydrogen storage bottle electromagnetic valve state to the vehicle controller after receiving the hydrogen storage bottle electromagnetic valve control instruction.
[0132] (8) Fuel cell model:
[0133] The fuel cell model calculates the quotient of the actual power of the fuel cell and the voltage of the direct current high voltage bus of the vehicle to obtain the current value of the fuel cell.
[0134] (9) Electric accessory system model:
[0135] The electric accessory system model receives the accessory control instruction of the vehicle controller, feeds back the accessory state to the vehicle controller, and calculates the quotient of the accessory power and the voltage of the direct current high voltage bus of the vehicle to obtain the current value of the accessory.
[0136] (10) Drive motor model:
[0137] The drive motor model determines the drive motor demand torque calculated by the drive motor controller model as the actual torque output of the drive motor, calculates the product of the actual torque of the drive motor and the motor speed to obtain the actual power of the motor, and calculates the quotient of the actual power of the motor and the voltage of the direct current high voltage bus of the vehicle to obtain the current value of the drive motor.
[0138] (11) Automatic transmission model:
[0139] The automatic transmission model calculates the product of the actual torque of the drive motor and the transmission ratio corresponding to the current gear to obtain the output torque of the transmission, and calculates the transmission ratio corresponding to the current gear and the current vehicle speed to obtain the drive motor speed.
[0140] (12) Vehicle dynamics model:
[0141] The vehicle dynamics model calculates the vehicle driving speed according to the vehicle driving equation.
[0142] (13) Battery model:
[0143] The battery model is used to calculate the state of charge of the battery, the battery current, and the bus voltage.
[0144] The calculation of the battery current is based on the bus current balance principle, as shown in formula (2).
[0145] The bus voltage is mainly calculated according to the first-order model of the battery, wherein the first-order model assumes the battery as an equivalent circuit of an ideal voltage source and an internal resistance in series, as shown in formula (3).
[0146] The open circuit voltage and the state of charge calculation formula are created in advance, as shown in formula (1).
[0147] Specifically, as shown in Figure 7 The hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system mainly includes a real fuel cell vehicle controller, a fuel cell vehicle simulation model, a real-time simulation machine, a hardware IO board card, a fault injection board card, and HIL test host computer software.
[0148] The vehicle controller is connected with the fault injection unit through a wire harness, the fault injection unit is connected with the hardware IO board card, the hardware IO board card is connected with the fuel cell vehicle simulation model running on the real-time simulation machine through a real-time interface, and the HIL simulation machine cabinet is connected with the HIL test host computer through an Ethernet cable.
[0149] The real-time simulation machine mainly runs the fuel cell vehicle simulation model, sends various operating parameters calculated by the vehicle simulation model to the vehicle controller through the hardware IO board card, determines the vehicle operating condition according to the operating parameters of the vehicle simulation model, and generates control signals by executing the control algorithm, and the hardware IO board card collects the control signals and sends them to the vehicle simulation model through the interactive interface to control the vehicle operation.
[0150] Specifically, the construction of the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system is specifically implemented as shown in Figure 8
[0151] Step 801, according to the fuel cell vehicle controller IO pin resources and the HIL simulation machine cabinet IO pin resources, a signal mapping list is made and a wire harness is made.
[0152] Step 802, according to the signal mapping list and using the HIL test host computer software, the HIL related hardware IO channels are configured and the interactive interface for interacting with the vehicle simulation model signals is generated in the Matlab / Simulink software.
[0153] Step 803, using the Matlab / Simulink software to build a hydrogen fuel cell vehicle simulation model, the signals input and output by the controller are associated with the vehicle simulation model through the generated interactive interface, and the vehicle simulation model is parameterized using vehicle parameters.
[0154] Step 804, using the HIL test host computer software to compile the hardware IO channel configuration project, the interactive interface and the vehicle simulation model, and downloading the compilation result to the real-time simulation machine.
[0155] Step 805, connect the vehicle controller with the HIL machine cabinet through the wire harness for HIL engineering debugging test, first test the configured hardware IO channel, verify whether the HIL machine cabinet can correctly collect the signals output by the controller and simulate the input signals of the controller, and then perform vehicle controller control function simulation test.
[0156] The application uses Matlab / Simulink software to build a hydrogen fuel cell vehicle simulation model; then, combined with the HIL simulation bench of dspace and the host computer software of the HIL simulation bench, a hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system is built, so as to realize a fuel cell vehicle controller test and verification system with low cost, high efficiency, high safety, high coverage, good controllability and repeatability.
[0157] Figure 9 An example of an electronic device entity structure diagram is shown as Figure 9 The electronic device can include a processor 901, a communications interface 902, a memory 903 and a communications bus 904, wherein the processor 901, the communications interface 902 and the memory 903 complete mutual communication through the communications bus 904. The processor 901 can call the logical instructions in the memory 903 to execute the building method of the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system.
[0158] In addition, the logical instructions in the memory 903 described above can be implemented in the form of a software function unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.
[0159] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer readable storage medium, and the computer program includes program instructions, when the program instructions are executed by a computer, the computer can execute the building method of the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system provided by the above-mentioned methods.
[0160] In yet another aspect, the present application also provides a non-transitory computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the method for building a hardware-in-the-loop simulation test system of a hydrogen fuel cell vehicle controller provided by each of the above embodiments.
[0161] The apparatus embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0162] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software plus necessary universal hardware platforms, and of course can also be realized by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0163] Finally, it should be noted that: the above description is only the preferred embodiment of the present application, and the present application is not limited to the above embodiments. It can be understood that other improvements and changes directly derived or thought by those skilled in the art without departing from the spirit and concept of the present application should be considered to be included in the protection scope of the present application.
Claims
1. A method for building a hardware-in-the-loop simulation test system for a hydrogen fuel cell vehicle controller, characterized in that: The method comprises: Constructing a fuel cell vehicle simulation model, wherein the fuel cell vehicle simulation model includes: a fuel cell controller model, an automatic transmission system model, a drive motor model, and a hydrogen supply system model, and the fuel cell vehicle simulation model is communicatively connected to the vehicle controller; When it is determined that the vehicle controller determines that the automatic transmission system model has successfully engaged a gear, the vehicle controller is used to calculate the transmission required output torque, and the transmission required torque is sent to the drive motor model to obtain the drive motor required torque, thereby realizing control of the drive motor; When the vehicle controller determines that the fuel cell needs to be started, the successful startup status of the fuel cell is obtained, and the hydrogen storage bottle solenoid valve control instruction is sent to the hydrogen supply system model to obtain the status of the hydrogen storage bottle solenoid valve, and the fuel cell target power is calculated, and the fuel cell target power is sent to the fuel cell controller model. The fuel cell controller model sends the actual power of the fuel cell to the vehicle controller to realize the control of the hydrogen fuel cell and complete the construction of the hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system.
2. The method for constructing a hardware-in-the-loop simulation test system for a hydrogen fuel cell vehicle controller according to claim 1, characterized in that: The vehicle controller determines that the fuel cell needs to be started in the following situations: the current value of the battery state of charge is less than the preset value; The calculation formula for the battery state of charge includes: Among them, SOC represents the state of charge of the battery. ini Indicates the initial value of the battery state of charge, C indicates the battery capacity, I bat Indicates the bus current.
3. The method for constructing a hardware-in-the-loop simulation test system for a hydrogen fuel cell vehicle controller according to claim 2, characterized in that: The bus current is obtained based on the drive motor current, accessory current and fuel cell current and the current calculation formula; The current calculation formula includes: I bat =I motor +I aux -I FB ; Among them, I bat Indicates bus current, and is negative when charging and positive when discharging. motor Indicates the driving motor current, I aux Indicates the accessory current, I FB represents the fuel cell current.
4. The method for constructing a hardware-in-the-loop simulation test system for a hydrogen fuel cell vehicle controller according to claim 3, characterized in that: The fuel cell vehicle simulation model also includes: an electric accessory system model and a fuel cell model; The drive motor model determines the drive motor demand torque calculated by the drive motor controller model as the actual torque output of the drive motor, and simultaneously calculates the product of the actual torque of the drive motor and the motor speed to obtain the actual power of the motor, and calculates the quotient of the actual power of the motor and the DC high-voltage bus voltage of the vehicle to obtain the current value of the drive motor; The electric accessory system model calculates the quotient of the accessory power and the vehicle DC high-voltage bus voltage to obtain the accessory current value; The fuel cell model calculates the quotient of the actual power of the fuel cell and the DC high-voltage bus voltage of the vehicle to obtain the fuel cell current value.
5. The method for constructing a hydrogen fuel cell vehicle controller hardware-in-the-loop simulation test system according to claim 4, characterized in that: The vehicle DC high-voltage bus voltage is obtained based on the battery state of charge and the bus voltage calculation formula; The bus voltage calculation formula includes: U bat =U OC -I bat ·R; Among them, U bai Indicates the vehicle DC high-voltage bus voltage, U OC Represents the open circuit voltage, which is obtained based on the battery state of charge, I bat represents the bus current, and R represents the internal resistance of the battery.
6. The method for constructing a hardware-in-the-loop simulation test system for a hydrogen fuel cell vehicle controller according to any one of claims 1 to 5, characterized in that: The fuel cell vehicle simulation model further includes: a driver model; Before the vehicle controller determines that the automatic transmission system model is successfully engaged, the following steps are also included: When it is determined that the vehicle controller determines that the fuel cell vehicle has entered a ready state and determines to respond to a gear request instruction sent by the driver model, the gear request instruction is sent to the automatic transmission controller model, wherein the gear request instruction includes: a pedal opening and a target gear; The automatic transmission controller model performs a table lookup based on the pedal opening and the target gear position to obtain a target speed of the transmission output shaft corresponding to the target gear position; and successfully completes the gear shifting based on the actual speed of the transmission output shaft and the target speed, wherein the target speed includes a first target speed of the transmission output shaft for upshifting and a second target speed of the transmission output shaft for downshifting.
7. The method for constructing a hardware-in-the-loop simulation test system for a hydrogen fuel cell vehicle controller according to claim 6, characterized in that: The first target speed is greater than the second target speed; Successfully engaging a gear based on the actual speed of the transmission output shaft and the target speed includes: comparing the actual speed with the target speed; When it is determined that the actual speed is greater than the first target speed, the automatic transmission controller model shifts up to the target gear position to complete the upshift; When it is determined that the actual speed is less than the second target speed, the automatic transmission controller model downshifts to the target gear position to complete the downshift and gear engagement; When it is determined that the actual speed is less than or equal to the first target speed and greater than or equal to the second target speed, the automatic transmission controller model keeps the current gear position unchanged.
8. The method for constructing a hardware-in-the-loop simulation test system for a hydrogen fuel cell vehicle controller according to any one of claims 1 to 5, characterized in that: The fuel cell vehicle simulation model also includes: an all-in-one controller model, a battery system and an electrical accessory system; Before the vehicle controller determines that the automatic transmission system model is successfully engaged, the following steps are also included: When it is determined that the vehicle controller receives the high voltage closure status corresponding to the battery in the battery system, it controls the high voltage circuit in the electric accessory system model to close the high voltage circuit of the vehicle, and sends the high voltage control instruction on the accessory to the all-in-one controller model; The all-in-one controller model feeds back the accessory high-voltage closing state to the vehicle controller based on the high-voltage control instruction on the accessory; The vehicle controller sends a main drive high voltage control instruction to the all-in-one controller model; The all-in-one controller model feeds back the main drive high-voltage closed state to the vehicle controller based on the main drive high-voltage control instruction, and determines that the fuel cell vehicle enters a ready state.
9. The method for constructing a hardware-in-the-loop simulation test system for a hydrogen fuel cell vehicle controller according to any one of claims 1 to 5, characterized in that: The fuel cell vehicle simulation model also includes: a driver model and a battery system; When it is determined that the vehicle controller has received the KL15 signal sent by the driver model, the high-voltage circuit in the battery system model is controlled to be closed with the high-voltage circuit of the vehicle, and the vehicle controller sends a high-voltage control instruction to the battery; The battery controller model feeds back the battery high voltage closing state to the vehicle controller based on the high voltage control instruction on the battery.
10. The method for constructing a hardware-in-the-loop simulation test system for a hydrogen fuel cell vehicle controller according to any one of claims 1 to 5, characterized in that: The fuel cell vehicle simulation model also includes: a vehicle dynamics model; The vehicle dynamics model is used to calculate the vehicle speed.
Citation Information
Patent Citations
Hardware-in-loop experimental system for an entire electric vehicle controller
CN102880171A
Hardware-in-the-loop simulation testing system of complete vehicle controller
CN103186101A
Hydrogen storage coordination control method and device considering durability of multi-stack fuel cell system
CN118783392A