A fuel vehicle controller testing method and system
Through the hardware in-loop simulation system, the closed-loop follow-up control and signal monitoring of the entire fuel vehicle controller is solved, and safety improvement and cost savings are achieved.
Patent Information
- Application Number
- CN202210898551.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-28
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-07-28
AI Technical Summary
The existing new energy vehicle vehicle controller in-ring simulation testing system cannot be directly used for fuel vehicle vehicle controller testing, resulting in incomplete test of fuel vehicle vehicle controllers and poses functional safety hazards.
The hardware in-loop simulation system is used to generate electrical signals through the feedback signal of the upper computer. The vehicle controller performs internal logic operation and closed-loop follow-up control, collects and monitors the transmission signals, and uses the simulation model to conduct comprehensive functional testing.
The comprehensive functional test of the complete vehicle controller of the fuel vehicle has been realized, which improves safety, reduces after-sales problem points and safety hazards, and saves manpower and material costs.
Smart Images

Figure CN115309137B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of controller testing, and in particular to a method and system for testing a whole vehicle controller of a fuel vehicle. Background Art
[0002] Some research on vehicle controller-in-the-loop (VCL) simulation systems is currently underway in China, primarily targeting VCL test systems for new energy vehicles. VCLs are currently being developed for commercial fuel-powered vehicles, primarily for coordinated vehicle function control and fuel efficiency. These systems utilize software simulation testing of both the vehicle physical model and the vehicle control strategy model. These simulated models are then flashed into the VCL, and HIL testing is performed on the VCL to verify the control strategy.
[0003] Existing hardware-in-the-loop (HIL) simulation test systems for new energy vehicle controllers cannot be directly used to test fuel vehicle controllers. Currently, fuel vehicle controllers can only be tested for specific functions on the actual vehicle. Due to safety concerns, some testing of hazardous operating conditions, extreme operating conditions, fault conditions, and precise signal control cannot be performed. This results in incomplete testing of the vehicle controller and poses significant functional safety risks. Therefore, there is an urgent need to develop a hardware-in-the-loop (HIL) system suitable for fuel vehicle controllers to conduct comprehensive functional testing of fuel vehicle controllers and various hazardous and extreme operating conditions. Summary of the Invention
[0004] The present invention provides a fuel vehicle controller testing method and system, which realizes comprehensive functional testing of the fuel vehicle controller and improves the safety of the fuel vehicle controller.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a method for testing a vehicle controller of a fuel vehicle, comprising:
[0006] Generate a first electrical signal according to the vehicle controller control signal fed back by the host computer;
[0007] Sending the first electrical signal to the vehicle controller, so that the vehicle controller performs internal logic operation according to the first electrical signal and feeds back the second electrical signal;
[0008] Obtaining a first simulation model variable according to the simulation device, the simulation model, and the second electrical signal, and operating according to the simulation model working logic based on the first simulation model variable, and sending an operating result signal to a vehicle controller to enable the vehicle controller to perform closed-loop follow-up control;
[0009] Collect all transmission signals of the vehicle controller during internal logic operation and closed-loop follow-up control, and send all transmission signals to the host computer so that the host computer can monitor the signals in real time, observe and compare the operation result signals with the expected result signals of the vehicle controller, and judge whether the vehicle controller is designed according to the functional logic.
[0010] In the implementation of the embodiment of the present invention, a control request signal is input to the vehicle controller of the fuel vehicle under test, and the vehicle controller operates according to its internal logic and outputs a torque request signal. The simulation model and the simulation model work according to the output torque request signal, and the operation result signal is sent to the vehicle controller, so that the vehicle controller operates according to the internal logic to form a closed-loop follow-up control. The upper computer monitors the transmission signal of the vehicle controller in real time during operation. All inputs of the vehicle controller are simulated electrical signals, and all output signals are observed. The expected results of the vehicle controller can be judged by observing the output results of the simulation model, thereby judging whether the software design of the vehicle controller is designed according to the functional logic. In this way, the vehicle controller is functionally tested and different control signals are monitored. Different functions of the vehicle controller under test can be tested. At the same time, various dangerous working conditions, extreme working conditions and other tests can be performed to achieve comprehensive functional testing of the vehicle controller, improve the safety of the vehicle controller of the fuel vehicle, and reduce after-sales problems and safety hazards of the vehicle controller.
[0011] As a preferred solution, according to the simulation device, the simulation model and the second electrical signal, a first simulation model variable is obtained, and according to the first simulation model variable, the simulation model working logic is operated, and the operation result signal is sent to the vehicle controller to enable the vehicle controller to perform closed-loop follow-up control, specifically:
[0012] converting the second electrical signal into a first mathematical value through a simulation device;
[0013] Obtaining a first simulation model variable according to the first mathematical value and the simulation model;
[0014] According to the virtual controller model and the first simulation model variables, the engine model is controlled to operate, the output torque of the engine model drives the vehicle dynamics model to operate, and the operation result signal is sent to the vehicle controller to enable the vehicle controller to perform closed-loop follow-up control.
[0015] By implementing the embodiment of the present invention, the operation of the engine model is controlled through the virtual controller model and the first simulation model variable, and the output torque drives the vehicle dynamics model to run. The operation of the vehicle dynamics model (simulated vehicle) is virtually controlled by the simulation model, and there is no need to carry out corresponding functional tests on the actual vehicle, thereby reducing manpower and material resources and saving costs.
[0016] As a preferred solution, the engine model is controlled to operate according to the virtual controller model and the first simulation model variables, the output torque of the engine model drives the vehicle dynamics model to operate, and the operation result signal is sent to the vehicle controller to enable the vehicle controller to perform closed-loop follow-up control, specifically:
[0017] Obtaining a throttle valve opening according to the virtual controller model and the first simulation model variable, controlling the engine model to operate according to the throttle valve opening, and calculating the engine output torque;
[0018] Obtain driving torque according to engine output torque and transmission model;
[0019] The vehicle dynamics model is driven according to the driving torque to calculate the total force of the vehicle;
[0020] Calculate the vehicle speed based on the total force of the vehicle;
[0021] The operation result signal is sent to the vehicle controller so that the vehicle controller performs closed-loop follow-up control; wherein the operation result signal includes vehicle speed, engine speed, engine control mode and ABS status.
[0022] In the implementation of the embodiment of the present invention, each module of the simulation model is operated, and operation result signals such as vehicle speed, engine speed, engine control mode and ABS status are sent to the vehicle controller. A large amount of data of the simulated vehicle is obtained through the simulation process, so as to obtain comprehensive signals to the vehicle controller and monitor different signals of the vehicle controller.
[0023] As a preferred solution, the second electrical signal is converted into the first mathematical value by a simulation device, wherein the simulation device includes an I / O module, a bus simulation module, a programmable power supply module, and a real-time processing module;
[0024] The I / O module sends and receives electrical signals from the vehicle controller and converts the electrical signals from the vehicle controller into mathematical values through the board;
[0025] The bus simulation module provides a physical interface between the vehicle controller's communication bus and the simulation model, converts mathematical values into pressure difference signals for the vehicle controller to identify, and converts the pressure difference signals output by the vehicle controller into mathematical values;
[0026] The programmable power supply module provides power source for the electrical signal conversion of the I / O module;
[0027] The real-time processing module coordinates and controls the various modules of the simulation device.
[0028] In implementing the embodiment of the present invention, coordinated control is performed through the various modules of the simulation equipment, and the electrical signals of the vehicle controller are converted into simulation model variables, providing the simulation model with variables or data that can be recognized by the model, and providing the required electrical signals to the controller under test, so that the simulation model uses the simulation model variables to perform normal virtual simulation work, and the vehicle controller operates normally.
[0029] As a preferred solution, according to the first mathematical value and the simulation model, a first simulation model variable is obtained, specifically:
[0030] Obtaining a first simulation model variable based on the first mathematical value, an I / O model of the simulation model, and a driver model of the simulation model;
[0031] The I / O model of the simulation model is associated with and controlled by the physical electrical interface of the I / O module of the simulation device, and performs signal interaction with the simulation device;
[0032] The driver model of the simulation model processes the signals of the driver's manual operation and the signals following the preset working conditions.
[0033] In implementing the embodiment of the present invention, the driver model processes the driver's manual operation signal and the signal of following the preset working condition, which can be used not only to realize manual operation, but also to realize automatic driving following the given working condition.
[0034] As a preferred solution, the engine model is controlled to operate according to the virtual controller model and the first simulation model variable, the output torque of the engine model drives the vehicle dynamics model to operate, and the operation result signal is sent to the vehicle controller to enable the vehicle controller to perform closed-loop follow-up control, wherein the virtual controller model includes a virtual engine management controller model, a virtual transmission electronic control model, a virtual instrument electronic control model, and a virtual ABS electronic control model;
[0035] The virtual engine management controller model receives the operating mode demand signal and controls the engine model;
[0036] Virtual gearbox electronic control model, controlling the simulated clutch on and off and simulated gearbox shifting;
[0037] The virtual instrument electronic control model and the virtual ABS electronic control model combine the required message signals with the simulation model calculation to form a closed-loop association.
[0038] By implementing the embodiment of the present invention, the functions of the vehicle controller are simulated through a virtual controller model, and the message signals required for vehicle control are closely integrated with the model calculation to form a closed-loop association, so as to comprehensively test the functions of the vehicle controller.
[0039] As a preferred solution, the first electrical signal is generated according to the vehicle controller control signal fed back by the host computer, specifically:
[0040] According to the vehicle controller control signal fed back by the host computer, a second simulation model variable is obtained, a second mathematical value is obtained according to the simulation model and the second simulation model variable, and a first electrical signal is generated according to the second mathematical value, the simulation model and the simulation device.
[0041] As a preferred solution, in order to solve the same technical problem, an embodiment of the present invention further provides a fuel vehicle controller test system, comprising: a host computer, a hardware-in-the-loop simulation device, and a vehicle controller; wherein the hardware-in-the-loop simulation device executes a fuel vehicle controller test method;
[0042] Among them, the host computer is connected to the hardware-in-the-loop simulation device, and the vehicle controller is connected to the hardware-in-the-loop simulation device.
[0043] As a preferred solution, the host computer is used to feedback the control signals of the vehicle controller, receive all transmission signals, monitor the signals in real time, observe and compare the operation result signals with the expected result signals of the vehicle controller, and judge whether the vehicle controller is designed according to the functional logic;
[0044] The hardware-in-the-loop simulation device is used to generate a first electrical signal based on the vehicle controller control signal fed back by the host computer; send the first electrical signal to the vehicle controller; obtain a first simulation model variable based on the simulation device, the simulation model, and the second electrical signal, and operate according to the simulation model working logic based on the first simulation model variable, and send the operation result signal to the vehicle controller; collect all transmission signals of the vehicle controller during internal logic operation and closed-loop follow-up control, and send all transmission signals to the host computer;
[0045] The vehicle controller is used to perform internal logic operations according to the first electrical signal and to feed back the second electrical signal to perform closed-loop follow-up control.
[0046] As a preferred solution, the hardware-in-the-loop simulation device includes a simulation device and a simulation model;
[0047] Among them, the simulation equipment includes I / O module, bus simulation module, programmable power supply module, and real-time processing module;
[0048] The I / O module is used to send and receive electrical signals from the vehicle controller and convert the electrical signals from the vehicle controller into simulation model variables through the board;
[0049] The bus simulation module is used to provide a physical interface between the vehicle controller's communication bus and the simulation model, convert the simulation model variables into pressure difference signals for the vehicle controller to identify, and convert the pressure difference signals output by the vehicle controller into simulation model variables;
[0050] The programmable power supply module is used to provide power source for the electrical signal conversion of the I / O module;
[0051] The real-time processing module is used to coordinate and control various modules of the simulation device;
[0052] The simulation model includes I / O model, driver model, virtual controller model, engine model, transmission model, dynamics model and vehicle speed calculation model;
[0053] The I / O model is used to associate and control the I / O physical electrical interface of the simulation device and perform signal interaction with the simulation device;
[0054] The driver model is used to process the driver's manual operation signals and the signals following the preset working conditions;
[0055] The virtual controller model is used to obtain the throttle opening according to the virtual controller model and the first simulation model variable, and control the operation of the engine model according to the throttle opening;
[0056] The engine model is used to respond to the throttle opening output by the virtual controller model and calculate the engine output torque;
[0057] The transmission model is used to obtain the driving torque according to the engine output torque and the transmission model;
[0058] The dynamics model is used to drive the vehicle dynamics model according to the driving torque and calculate the total force of the vehicle;
[0059] The vehicle speed calculation model is used to calculate the vehicle speed based on the total force of the entire vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 : A flow chart of an embodiment of a method for testing a vehicle controller of a fuel vehicle provided by the present invention;
[0061] Figure 2 : A flowchart of the operation of a hardware-in-the-loop device according to an embodiment of a method for testing a vehicle controller of a fuel vehicle provided by the present invention;
[0062] Figure 3 : A simulation model control flow of an embodiment of a fuel vehicle controller testing method provided by the present invention;
[0063] Figure 4 : A connection structure diagram of a fuel vehicle controller test system provided by the present invention;
[0064] Figure 5 : A connection diagram of the HIL system of a fuel vehicle controller test system provided by the present invention. DETAILED DESCRIPTION
[0065] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0066] Example 1
[0067] Please refer to Figure 1 , which is a flow chart of a method for testing a fuel vehicle controller according to an embodiment of the present invention. The testing method of this embodiment is applicable to a fuel vehicle controller. This embodiment implements closed-loop follow-up control by transmitting signals between the vehicle controller, simulation model, and simulation device, determines the functional logic of the vehicle controller, and performs comprehensive functional testing of the fuel vehicle controller, thereby improving the safety of the fuel vehicle controller. The testing method includes steps 101 to 104, each of which is as follows:
[0068] Step 101: Generate a first electrical signal according to the vehicle controller control signal fed back by the host computer.
[0069] Specifically, according to the vehicle controller control signal fed back by the host computer, a second simulation model variable is obtained, according to the simulation model and the second simulation model variable, a second mathematical value is obtained, and according to the second mathematical value, the simulation model and the simulation device, a first electrical signal is generated.
[0070] In this embodiment, the signal required for the HIL host computer to operate the vehicle controller, that is, the vehicle controller control signal (such as the accelerator pedal opening signal), is converted into a first electrical signal based on the vehicle controller control signal fed back by the host computer and input into the vehicle controller. The specific conversion method is: after the development and debugging of the HIL test project is completed, it will compile and generate a format that can be recognized by the host computer software. At the same time, the host computer software will also develop corresponding controls and associate them with model variables to control model parameters. Taking the conversion and transmission of the vehicle controller control signal to the accelerator pedal opening signal as an example, if the mathematical value of the throttle opening control of the throttle pedal opening signal controlled by the upper computer software is adjusted from 50% to 100%, the model variable associated with the control, the throttle opening variable (second simulation model variable) Accpedal% in the simulation model will also change from 50% to 100%; the mathematical change Accpedal% (mathematical value) is converted into the corresponding opening voltage value (mathematical value) through a mathematical formula in the simulation model, and is sent to the I / O board (I / O module) through the interface module between the simulation model and the I / O board of the simulation device; then the I / O board converts the given opening voltage value (mathematical value) into an opening voltage value (electrical physical value), and the generated first electrical signal is the opening voltage value.
[0071] Step 102: Send the first electrical signal to the vehicle controller, so that the vehicle controller performs internal logic operations according to the first electrical signal and feeds back the second electrical signal.
[0072] In this embodiment, when the vehicle controller control signal is used as the accelerator pedal opening signal, the first electrical signal generated by step 101 is the opening voltage value of the accelerator pedal, and the opening voltage value is sent to the vehicle controller. After the vehicle controller receives the opening voltage value (electrical physical value), it can calculate the current accelerator pedal opening. The internal logic of the vehicle controller means that after the vehicle controller receives the accelerator pedal opening, it outputs the corresponding torque request signal (second electrical signal) according to the internal logic of the vehicle controller, makes feedback, and sends the torque request signal to the virtual engine management controller (virtual engine EMS ECU) through the simulation device and the simulation model.
[0073] Step 103: Obtain a first simulation model variable according to the simulation device, the simulation model, and the second electrical signal, and operate according to the simulation model working logic based on the first simulation model variable, and send the operation result signal to the vehicle controller to enable the vehicle controller to perform closed-loop follow-up control.
[0074] Specific as Figure 2 The hardware-in-the-loop device operation flow chart shown includes steps 201 to 204, and each step is specifically as follows:
[0075] Step 201: Convert the second electrical signal into a first mathematical value through a simulation device;
[0076] Among them, the simulation equipment includes I / O module, bus simulation module, programmable power supply module, and real-time processing module;
[0077] The I / O module sends and receives electrical signals from the vehicle controller and converts the electrical signals from the vehicle controller into mathematical values through the board;
[0078] The bus simulation module provides a physical interface between the vehicle controller's communication bus and the simulation model, converts mathematical values into pressure difference signals for the vehicle controller to identify, and converts the pressure difference signals output by the vehicle controller into mathematical values;
[0079] The programmable power supply module provides power source for the electrical signal conversion of the I / O module;
[0080] The real-time processing module coordinates and controls the various modules of the simulation device.
[0081] In this embodiment, the second electrical signal can be converted into a first mathematical value by a simulation device. The I / O module converts the electrical physical value (torque request signal, second electrical signal) of the signal voltage value received from the simulation model into a mathematical value (first mathematical value) of the signal voltage value. The simulation device primarily includes an I / O module (I / O board), a bus simulation module (such as a bus simulation board), a programmable power supply module (such as a programmable power supply), a real-time processing module (such as a real-time processor), and the like. As an example of an embodiment, the main function of the I / O board is to output the electrical signals required by the tested vehicle controller for the simulation model, such as high / low level signals, resistance signals, voltage analog signals, etc., and at the same time receive the output electrical signals of the tested vehicle controller and convert them into mathematical values (variables or data) that can be recognized by the simulation model through the board; the bus simulation board mainly provides a physical interface between the communication bus (such as CAN) of the tested controller and the simulation model, converts the mathematical values (variables or data) of the simulation model into CAN pressure difference signals (electrical signals) for the tested controller to recognize, and converts the CAN pressure difference signals emitted by the tested controller into mathematical values (variables or data) that can be recognized by the model; the programmable power supply mainly provides a power source for the electrical signal conversion of the I / O board; the real-time processor is the core control unit of the simulation equipment, and coordinates and controls the various modules.
[0082] Step 202: Obtain a first simulation model variable according to the first mathematical value and the simulation model;
[0083] Specifically, the first simulation model variable is obtained according to the first mathematical value, the I / O model of the simulation model, and the driver model of the simulation model;
[0084] The I / O model of the simulation model is associated with and controlled by the physical electrical interface of the I / O module of the simulation device, and performs signal interaction with the simulation device;
[0085] The driver model of the simulation model processes the signals of the driver's manual operation and the signals following the preset working conditions.
[0086] In this embodiment, the first mathematical value is converted into a corresponding first simulation model variable (voltage value) through a mathematical formula in the simulation model. The I / O model of the simulation model is associated with and controlled by the physical electrical interface of the I / O module of the simulation device, and signals are exchanged with the simulation device. The driver model of the simulation model is used to process signals of manual operation by the driver, such as keys, accelerator pedals, brake pedals, transmission gears, etc.; it can also be used to follow the signals of preset working conditions to achieve automatic driving.
[0087] Step 203: Controlling the operation of the engine model based on the virtual controller model and the first simulation model variables, using the output torque of the engine model to drive the vehicle dynamics model to operate, and sending an operation result signal to the vehicle controller so that the vehicle controller performs closed-loop follow-up control;
[0088] In this embodiment, if Figure 3 The simulation model control flow chart shown also takes the throttle pedal opening signal as the vehicle controller control signal as an example. The second electrical signal (the torque request signal of the throttle opening) fed back by the vehicle controller is obtained through the simulation device, the I / O model and the driver model (steps 201 to 202) to obtain the first simulation model variable (the simulation model variable of the throttle opening). According to the virtual controller model and the throttle opening, the engine model is controlled to operate, and the output torque of the engine model drives the vehicle dynamics model to operate. The engine model relies on the transmission model to drive the vehicle dynamics model to operate, and the operation result signal is sent to the vehicle controller to enable the vehicle controller to perform closed-loop follow-up control.
[0089] Optionally, step 203 specifically includes steps 2031 to 2035, each of which is as follows:
[0090] Step 2031: Obtaining a throttle opening according to the virtual controller model and the first simulation model variables, controlling the engine model to operate according to the throttle opening, and calculating the engine output torque;
[0091] Optionally, the virtual controller model includes a virtual engine management controller model, a virtual transmission electronic control model, a virtual instrument electronic control model, and a virtual ABS electronic control model;
[0092] The virtual engine management controller model receives the operating mode demand signal and controls the engine model;
[0093] Virtual gearbox electronic control model, controlling the simulated clutch on and off and simulated gearbox shifting;
[0094] The virtual instrument electronic control model and the virtual ABS electronic control model combine the required message signals with the simulation model calculation to form a closed-loop association.
[0095] In this embodiment, the throttle opening is obtained based on the virtual controller model and the first simulation model variable (the simulation model variable of the throttle opening), and the engine model is controlled to operate according to the throttle opening to calculate the engine output torque. Among them, the virtual controller model includes a virtual engine management controller model, a virtual transmission electronic control model, a virtual instrument electronic control model and a virtual ABS electronic control model. Among them, the virtual engine management controller model (virtual EMS ECU) receives simulation model variables of signals such as mode control signals, speed or torque request signals sent by the vehicle controller, and controls the engine model to output the corresponding torque based on the current engine model speed and torque. The virtual transmission electronic control model (virtual transmission ECU model) is mainly used to control the simulated clutch on and off and simulated transmission shifting. The role of the virtual instrument ECU is to send the required vehicle speed, ABS activation, ABS torque request and other signals to the vehicle controller to ensure that the input of related functions of the vehicle controller is normal and functional testing can be carried out; the virtual instrument electronic control model (virtual IC instrument) and the virtual ABS electronic control model (ABS ECU) combine the message signals required by the vehicle controller (such as vehicle speed) with the model calculation in a closed loop, and finally return them to the vehicle controller through the I / O model.
[0096] Step 2032: Obtain driving torque according to the engine output torque and the transmission model;
[0097] In this embodiment, the engine model relies on the transmission model to drive the vehicle dynamics model. The transmission model includes a crankshaft model, a clutch model, a gearbox model, and a final reducer model. The engine output torque acts on the crankshaft, is amplified by the crankshaft, clutch, gearbox, and final reducer, and then acts on the vehicle dynamics model. The engine model responds to the throttle opening output by the virtual engine management controller model (virtual EMS ECU) and calculates the driving torque (engine torque) by looking up the map.
[0098] Step 2033: driving the vehicle dynamics model according to the driving torque to calculate the vehicle resultant force;
[0099] In this embodiment, the vehicle dynamics model calculates the vehicle force based on the input driving torque and the driving force, climbing resistance, rolling resistance, wind resistance and braking force. The vehicle force F in the vehicle dynamics model is 合 =F 驱动 -F 阻 , F 合 is the total force of the vehicle, F 驱动 is the driving force, F 阻 F is resistance; 驱动 =T 扭矩 / r,T 扭矩 is the driving torque output after passing through the transmission model, r is the tire radius; F 阻 =F坡阻 +F 滚阻 +F 风阻 +F 制动 , F 坡阻 is the climbing resistance, F 滚阻 is the rolling resistance of the vehicle, F 风阻 is the vehicle wind resistance, F 制动 is the braking force; F 坡阻 =mgsina, m is the vehicle weight, g is the weight acceleration, a is the slope angle; F 滚阻 = mgcosa.n.f1.f2, where m is the vehicle weight, g is the weight acceleration, a is the slope angle, n is the rolling resistance coefficient, f1 is factor 1 (equal to 0 when the vehicle speed is less than 0.1 km / h and equal to 1 when it is greater than 0.1 km / h), and f2 is factor 2 (equal to 1 when the vehicle speed is greater than 2 km / h and takes a value in the range [0, 1) when the vehicle speed is less than 2 km / h, calculated using the tanh formula); F 风阻 =1 / 2.cpsvv, c is the drag coefficient, p is the air density, s is the vehicle's frontal area, and v is the vehicle's speed.
[0100] Step 2034: Calculate the vehicle speed based on the total force of the vehicle;
[0101] In this embodiment, the vehicle force F 合 Divide by the vehicle mass to get the acceleration, then integrate the acceleration with time to calculate the vehicle speed.
[0102] Step 2035: Send the operation result signal to the vehicle controller so that the vehicle controller performs closed-loop follow-up control, wherein the operation result signal includes vehicle speed, engine speed, engine control mode and ABS status.
[0103] In this embodiment, after the final simulation model runs, the result signal is output and returned to the vehicle controller. The result signal includes signals such as vehicle speed, engine speed, engine control mode, and ABS status. This enables the vehicle controller to perform follow-up control, receive the result signal, perform internal logic operations based on the result signal, and feedback the corresponding electrical signal to the hardware-in-the-loop device to achieve closed-loop control. Some functional tests of the vehicle controller, such as cruise control and stable operating mode torque control, must be conducted within the model's closed loop. The stable operating mode function means that when the throttle is manually set, the vehicle detects signals such as engine speed, vehicle speed, ABS status, and engine control mode to determine whether it meets the requirements for entering stable operating mode. Once in stable operating mode, the vehicle controller outputs a stable torque to the engine EMS ECU without rapid throttle changes. At the same time, the vehicle controller must constantly monitor the above signals returned after the model runs, and exit the control mode if any abnormality is detected.
[0104] Step 104: Collect all transmission signals of the vehicle controller during internal logic operation and closed-loop servo control, and send all transmission signals to the host computer so that the host computer can monitor the signals in real time, observe and compare the operation result signals with the expected result signals of the vehicle controller, and determine whether the vehicle controller is designed according to the functional logic.
[0105] In this embodiment, during the entire process of testing the vehicle controller, starting from the time the vehicle controller control signal is fed back by the host computer, all transmission signals of the vehicle controller during internal logic operation and closed-loop follow-up control are collected. The host computer receives all input and output signals during the transmission process and monitors the signals in real time. The status of each signal (including all input and output signals of the vehicle controller, all input and output signals of the I / O board and bus simulation board, external interface signals of the programmable power supply (such as voltage and current values, enable control signals, etc.), and all variables in the simulation model) can be monitored at all times during the test operation to confirm whether the entire test system is operating according to the established logic. The established logic includes the internal logic of the vehicle controller and the operating logic of the simulation model. For example, in the example of the accelerator pedal signal, the internal logic of the vehicle controller refers to the vehicle controller's internal logic outputting a corresponding torque request to the simulation model's virtual engine EMS ECU after receiving the accelerator pedal opening. The simulation model's operating logic refers to whether the simulation model outputs an opening voltage value (an electrical physical value) to the vehicle controller according to the accelerator pedal sensor's electrical characteristic curve when the accelerator opening (a mathematical value) is set. Furthermore, after the simulation model receives a torque request from the vehicle controller, whether the virtual engine EMS ECU controls the engine model according to the torque request, outputs torque to the dynamic model, and ultimately drives the simulated vehicle (dynamic model) to operate, outputting signals such as vehicle speed. The primary function of the vehicle controller for fuel vehicles is to control the engine EMS ECU. The model has built a simulated EMS ECU, engine model, and dynamic model. The expected results of the VCU can be judged by observing the model output results, thereby determining whether the VCU software design conforms to the functional logic. All inputs to the vehicle controller are simulated, and all output signals are observed, allowing for comprehensive testing of the vehicle controller.
[0106] In the implementation of the embodiment of the present invention, a control request signal is input to the vehicle controller of the fuel vehicle under test, and the vehicle controller operates according to its internal logic and outputs a torque request signal. The simulation model and the simulation model work according to the output torque request signal, and the operation result signal is sent to the vehicle controller, so that the vehicle controller operates according to the internal logic to form a closed-loop follow-up control. The upper computer monitors the transmission signal of the vehicle controller in real time during operation. All inputs of the vehicle controller are simulated electrical signals, and all output signals are observed. The expected results of the vehicle controller can be judged by observing the output results of the simulation model, thereby judging whether the software design of the vehicle controller is designed according to the functional logic. In this way, the vehicle controller is functionally tested and different control signals are monitored. Different functions of the vehicle controller under test can be tested. At the same time, various dangerous working conditions, extreme working conditions and other tests can be performed to achieve comprehensive functional testing of the vehicle controller, improve the safety of the vehicle controller of the fuel vehicle, and reduce after-sales problems and safety hazards of the vehicle controller.
[0107] Example 2
[0108] Accordingly, see Figure 4 , Figure 4 This is a connection structure diagram of the second embodiment of a fuel vehicle controller test system provided by the present invention. Figure 4 As shown, the fuel vehicle whole vehicle controller test system includes a host computer 401, a hardware-in-the-loop simulation device 402 and a vehicle controller 403; wherein, the hardware-in-the-loop simulation device 402 executes the fuel vehicle whole vehicle controller test method; wherein, the host computer 401 is connected to the hardware-in-the-loop simulation device 402, and the vehicle controller 403 is connected to the hardware-in-the-loop simulation device 402.
[0109] In this embodiment, if Figure 5As shown in the connection diagram of the HIL system, the fuel vehicle controller test system includes a host computer 401 (hardware-in-the-loop HIL host computer), a hardware-in-the-loop simulation device 402 (hardware-in-the-loop HIL cabinet) and a vehicle controller 403, wherein the HIL cabinet includes a simulation model and a simulation device, the vehicle controller is connected to the HIL cabinet through a wiring harness, and the HIL host computer is connected to the HIL cabinet through Ethernet. The signal required by the HIL host computer to operate the vehicle controller (such as the accelerator pedal opening signal) is converted into the electrical signal required by the vehicle controller 403 through the simulation model and simulation equipment, and then sent to the vehicle controller; after receiving the signal, the vehicle controller 403 operates according to the internal logic and outputs a response signal; the output signal of the vehicle controller 403 is then converted by the simulation equipment and input into the simulation model, and the simulation model starts to operate according to the model working logic, and then outputs the operation result back to the vehicle controller 403 for subsequent closed-loop follow-up control; at the same time, the HIL host computer can also monitor the status of each signal during the operation of the system at all times. Each signal includes all input and output signals of the vehicle controller 403, all input and output signals of the I / O board and bus simulation board, external interface signals of the programmable power supply (such as voltage and current values, enable control signals, etc.), and all variables in the simulation model to confirm whether the entire test system works according to the established logic.
[0110] Optionally, the host computer 401 of the fuel vehicle whole vehicle controller test system is used to feedback the whole vehicle controller control signal, receive all transmission signals, monitor the signal in real time, observe and compare the operation result signal and the expected result signal of the whole vehicle controller, and determine whether the whole vehicle controller 403 is designed according to the functional logic; the whole vehicle controller 403 is used to perform internal logic operation according to the first electrical signal, and feedback the second electrical signal to perform closed-loop follow-up control; the hardware-in-the-loop simulation device 402 is used to generate a first electrical signal according to the whole vehicle controller control signal fed back by the host computer 401; send the first electrical signal to the whole vehicle controller 403; obtain the first simulation model variable according to the simulation device, simulation model and the second electrical signal, and operate according to the simulation model working logic according to the first simulation model variable, and send the operation result signal to the whole vehicle controller 403; collect all transmission signals of the whole vehicle controller 403 during internal logic operation and closed-loop follow-up control, and send all transmission signals to the host computer 401.
[0111] Optionally, the hardware-in-the-loop simulation device 402 includes a simulation device and a simulation model; wherein the simulation device includes an I / O module, a bus simulation module, a programmable power supply module, and a real-time processing module; and the simulation model includes an I / O model, a driver model, a virtual controller model, an engine model, a transmission model, a dynamics model, and a vehicle speed calculation model.
[0112] The I / O module is used to send and receive electrical signals from the vehicle controller and convert the electrical signals from the vehicle controller into simulation model variables through the board;
[0113] The bus simulation module is used to provide a physical interface between the vehicle controller's communication bus and the simulation model, convert the simulation model variables into pressure difference signals for the vehicle controller to identify, and convert the pressure difference signals output by the vehicle controller into simulation model variables;
[0114] The programmable power supply module is used to provide power source for the electrical signal conversion of the I / O module;
[0115] The real-time processing module is used to coordinate and control various modules of the simulation device;
[0116] The I / O model is used to associate and control the I / O physical electrical interface of the simulation device and perform signal interaction with the simulation device;
[0117] The driver model is used to process the driver's manual operation signals and the signals following the preset working conditions;
[0118] The virtual controller model is used to obtain the throttle opening according to the virtual controller model and the first simulation model variable, and control the operation of the engine model according to the throttle opening;
[0119] The engine model is used to respond to the throttle opening output by the virtual controller model and calculate the engine output torque;
[0120] The transmission model is used to obtain the driving torque according to the engine output torque and the transmission model;
[0121] The dynamics model is used to drive the vehicle dynamics model according to the driving torque and calculate the total force of the vehicle;
[0122] The vehicle speed calculation model is used to calculate the vehicle speed based on the total force of the entire vehicle.
[0123] By implementing the embodiments of the present invention, comprehensive functional testing of the vehicle controller of a fuel vehicle and testing of various dangerous operating conditions and extreme operating conditions can be achieved; based on the hardware-in-the-loop test system, an automated test sequence for the vehicle controller can be developed to achieve automated testing of the vehicle controller of a fuel vehicle; the test system of the present invention is applied to vehicle controller testing, which can reduce after-sales problems and safety hazards of the vehicle controller.
[0124] The specific embodiments described above further illustrate the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A fuel vehicle controller testing method, characterized in that: include: According to the vehicle controller control signal fed back by the host computer, a first electrical signal is generated, specifically: Obtaining a second simulation model variable according to a vehicle controller control signal fed back by a host computer, obtaining a second mathematical value according to the simulation model and the second simulation model variable, and generating the first electrical signal according to the second mathematical value, the simulation model, and the simulation device; Sending the first electrical signal to a vehicle controller, so that the vehicle controller performs internal logic operations according to the first electrical signal and feeds back a second electrical signal; Obtaining a first simulation model variable according to the simulation device, the simulation model, and the second electrical signal, and operating according to the simulation model working logic based on the first simulation model variable, and sending an operating result signal to the vehicle controller so that the vehicle controller performs closed-loop follow-up control, specifically: converting the second electrical signal into a first mathematical value through the simulation device; Obtaining the first simulation model variable according to the first mathematical value and the simulation model; controlling the operation of the engine model according to the virtual controller model and the first simulation model variables, driving the vehicle dynamics model to operate with the output torque of the engine model, and sending the operation result signal to the vehicle controller so that the vehicle controller performs closed-loop follow-up control; Wherein, the simulation device includes an I / O module, a bus simulation module, a programmable power supply module, and a real-time processing module; The I / O module sends and receives the electrical signals from the vehicle controller, and converts the electrical signals from the vehicle controller into mathematical values through the board; The bus simulation module provides a physical interface between the communication bus of the vehicle controller and the simulation model, converts the mathematical value into a pressure difference signal for identification by the vehicle controller, and converts the pressure difference signal output by the vehicle controller into a mathematical value; The programmable power supply module provides a power source for the electrical signal conversion of the I / O module; The real-time processing module coordinates and controls the various modules of the simulation device; Collect all transmission signals of the vehicle controller during the internal logic operation and the closed-loop servo control, and send all transmission signals to the host computer so that the host computer can monitor the signals in real time, observe and compare the operation result signals with the expected result signals of the vehicle controller, and determine whether the vehicle controller is designed according to the functional logic.
2. The fuel vehicle controller testing method according to claim 1, characterized in that: The operation of the engine model is controlled according to the virtual controller model and the first simulation model variable, the output torque of the engine model drives the vehicle dynamics model to operate, and the operation result signal is sent to the vehicle controller so that the vehicle controller performs closed-loop follow-up control, specifically: Obtaining a throttle opening according to the virtual controller model and the first simulation model variable, controlling the engine model to operate according to the throttle opening, and calculating the engine output torque; Obtaining driving torque according to the engine output torque and a transmission model; The vehicle dynamics model is driven to run according to the driving torque to calculate the vehicle resultant force; Calculate the vehicle speed based on the vehicle's combined force; The operation result signal is sent to the vehicle controller so that the vehicle controller performs closed-loop follow-up control; wherein the operation result signal includes the vehicle speed, engine speed, engine control mode and ABS status.
3. The fuel vehicle controller testing method according to claim 1, characterized in that: The step of obtaining the first simulation model variable according to the first mathematical value and the simulation model is specifically as follows: obtaining the first simulation model variable according to the first mathematical value, the I / O model of the simulation model, and the driver model of the simulation model; The I / O model of the simulation model is associated with and controlled by the physical electrical interface of the I / O module of the simulation device, and performs signal interaction with the simulation device; The driver model of the simulation model processes signals of manual operation by the driver and signals following preset working conditions.
4. The fuel vehicle controller testing method according to claim 1, characterized in that: The engine model is controlled to operate according to the virtual controller model and the first simulation model variables, the output torque of the engine model drives the vehicle dynamics model to operate, and the operation result signal is sent to the vehicle controller to enable the vehicle controller to perform closed-loop follow-up control, wherein the virtual controller model includes a virtual engine management controller model, a virtual transmission electronic control model, a virtual instrument electronic control model, and a virtual ABS electronic control model; Wherein, the virtual engine management controller model receives the operating mode demand signal and controls the engine model; The virtual gearbox electronic control model controls the simulated clutch on and off and the simulated gearbox shifting; The virtual instrument electronic control model and the virtual ABS electronic control model combine the required message signals with the simulation model calculation to form a closed-loop association.
5. A fuel vehicle controller test system, characterized in that: include: A host computer, a hardware-in-the-loop simulation device, and a vehicle controller; wherein the hardware-in-the-loop simulation device executes the fuel vehicle controller testing method according to any one of claims 1 to 4; Among them, the host computer is connected to the hardware-in-the-loop simulation device, and the vehicle controller is connected to the hardware-in-the-loop simulation device.
6. The fuel vehicle controller test system according to claim 5, characterized in that: The host computer is used to feed back the vehicle controller control signal, receive all transmission signals, monitor the signal in real time, observe and compare the operation result signal with the expected result signal of the vehicle controller, and determine whether the vehicle controller is designed according to the functional logic; The hardware-in-the-loop simulation device is used to generate a first electrical signal according to the vehicle controller control signal fed back by the host computer; Sending the first electrical signal to a vehicle controller; obtaining a first simulation model variable based on the simulation device, the simulation model, and the second electrical signal, and operating according to the simulation model working logic based on the first simulation model variable, and sending an operating result signal to the vehicle controller; collecting all transmission signals of the vehicle controller during the internal logic operation and the closed-loop servo control, and sending all transmission signals to the host computer; The vehicle controller is used to perform internal logic operation according to the first electrical signal and feed back the second electrical signal to perform closed-loop follow-up control.
7. The fuel vehicle controller test system according to claim 5, characterized in that: The hardware-in-the-loop simulation device includes a simulation device and a simulation model; Wherein, the simulation device includes an I / O module, a bus simulation module, a programmable power supply module, and a real-time processing module; The I / O module is used to send and receive the electrical signals from the vehicle controller, and convert the electrical signals from the vehicle controller into simulation model variables through the board; The bus simulation module is used to provide a physical interface between the communication bus of the vehicle controller and the simulation model, convert the simulation model variables into pressure difference signals for recognition by the vehicle controller, and convert the pressure difference signals output by the vehicle controller into simulation model variables; The programmable power supply module is used to provide a power source for the electrical signal conversion of the I / O module; The real-time processing module is used to coordinate and control the various modules of the simulation device; The simulation model includes an I / O model, a driver model, a virtual controller model, an engine model, a transmission model, a dynamics model and a vehicle speed calculation model; The I / O model is used to associate and control the I / O physical electrical interface of the simulation device and perform signal interaction with the simulation device; The driver model is used to process the driver's manual operation signal and the signal following the preset working condition; The virtual controller model is used to obtain a throttle opening according to the virtual controller model and the first simulation model variable, and control the operation of the engine model according to the throttle opening; The engine model is used to calculate the engine output torque in response to the throttle opening output by the virtual controller model; The transmission model is used to obtain the driving torque according to the engine output torque and the transmission model; The dynamic model is used to drive the vehicle dynamic model to run according to the driving torque and calculate the vehicle resultant force; The vehicle speed calculation model is used to calculate the vehicle speed based on the vehicle resultant force.
Citation Information
Patent Citations
Device and method of simulation and testing of finished car controller of hybrid power car
CN103197667A
Portable hardware-in-the-loop simulation system of vehicle control unit
CN112130470A