Reconfigurable HIL Simulator for Vehicle-Dynamics-Based ECU Development and Testing with NI VeriStand and NI TestStand

"We based the second part of the simulator on an NI PXI real-time system, which offers modular I/O. We can extend the system using NI PXI and CompactRIO modules, such as CAN, FlexRay, and digital and analog I/O."

- Dr. Dénes Fodor, University of Pannonia, Faculty of Engineering, Institute of Mechanical Engineering

The Challenge:

Creating a hardware-in-the-loop (HIL) simulation environment to accelerate software development time and functional verification tests for automotive engine control units (ECUs).

The Solution:

Using PXI Express hardware and NI TestStand and NI VeriStand software to create a real-time vehicle dynamic model execution system with instrumentation that includes different automotive communication protocol interfaces and an NI R Series multifunction reconfigurable I/O (RIO) module for easy ECU adaptation. NI TestStand was used to automate the process, while NI VeriStand was used to execute the real-time test application.

Author(s):

Dr. Dénes Fodor - University of Pannonia, Faculty of Engineering, Institute of Mechanical Engineering
Krisztián Enisz - University of Pannonia, Faculty of Engineering, Institute of Mechanical Engineering, Automotive System Engineering Department

 

Because of increasing safety and environmental issues, modern vehicle ECUs are becoming more complex1,2. Cost-efficient ECU testing is important in the automotive industry. We must develop new algorithms and new ECUs to meet ever-increasing safety requirements. Testing new methods with a real vehicle on a test track is critical, but very expensive and time-intensive.

 

For proof-of-concept development, we needed a test and simulation environment to create and validate new algorithms for different vehicles and ECUs. We wanted to create an easily reconfigurable software and hardware ECU HIL test environment with a relatively short training time for new users. We introduced system functions by integrating hardware and software for an antilock braking system (ABS) ECU.

 

Simulation Environment Architecture

The simulator is modular (see Figures 1 and 2), so it is easily reconfigurable. The first component is a standard high-performance PC with Windows 7. We can use it as a stand-alone system to test new algorithms without vehicle ECUs. The system core is vehicle-dynamics-based simulation software, Tesis veDYNA 3.10.4. This software is based on MathWorks, Inc. Simulink® software and MathWorks, Inc. MATLAB® software. We can implement the new algorithms in Simulink to create new maneuvers and parameterize different vehicle models and environment features, such as road surface.

We used NI VeriStand software as the interface to the real-time hardware. It works with the veDYNA models and connects model and hardware device I/O. One of the most important NI VeriStand features is signal modification and override. It can modify the signals to prepare them for model or device inputs using simple mathematical algorithms or more complex NI LabVIEW software models. NI TestStand and NI VeriStand software helped us create new maneuvers, parameterize different vehicle models, and simulate environmental features for executing real test sequences on real ABS ECUs.

 

We based the second part of the simulator on an NI PXI real-time system, which offers modular I/O. We can extend the system using NI PXI and CompactRIO modules, such as CAN, FlexRay, and digital and analog I/O. The PXI system works with external interfaces, such as Vector MOST and TTech FlexRay, which we can use with a standard PC.

 

The third component, an electric motor emulator that imitates electric car driving systems, can perform electric motor control ECU testing.

 

ECU Integration

After we created the simulation system, the next important step was ECU integration (see Figure 3).

We extended the ECU with simple small electric circuits to emulate the wheel speed sensors, valves, and motor. The ECU controls the motor and valves; the real-time system only measures component states. The simulator controls the wheel speed sensors and digital output, switching the voltage on or off according to the wheel speed to generate correct frequency pulses for the ABS. We modified the veDYNA Simulink model brake system to handle the incoming valve states and independently modify the brake pressure at the wheels according to the valve position (see Figure 4) for each wheel.

 

The main pressure modification equation algorithm is

 

where

            n=the current simulation step

            p(n)=the modified brake pressure for the wheel

            ptarget(n)=the target brake pressure

            pdiff(n)=the difference between the current and the target brake pressure

            t(n)=the current time of the modification period

            =the time constant

 

The algorithm, implemented in MATLAB and Simulink, features six subalgorithms3. Besides modifying the veDYNA model, we also created a new NI VeriStand project. The compiled veDYNA model is compatible with NI VeriStand, so the I/O signals can connect to the PXI I/O by converting the wheel speed signals. We designed the NI VeriStand UI to monitor and change simulation parameters (see Figure 5).

 

Conclusion

We used NI PXI, NI VeriStand, and NI TestStand to create a real-time vehicle simulator with integrated HIL simulation to easily validate new theoretical research results. NI TestStand as a ready-to-run test management software helped us reduce development time because this framework already contains such components as sequence execution or report generation. Furthermore as using real-time OS was a requirement, NI VeriStand gave great reliability and performance as it is designed to run on NI real-time hardware for configuring real-time testing applications.

The ABS ECU-based test system met our expectations (see Figures 6 and 7). We require further development to refine the simulation. We also need to improve the pressure model, taking into consideration the ABS motor states.

 

Acknowledgment

We acknowledge the financial support of this work by the Hungarian State and the European Union under the TAMOP-4.2.1/B-09/1/KONV-2010-0003 project and the intensive technical support of Continental Teves Veszprem and National Instruments Budapest.

 

References

1 Rieth, Dr. P. E., S. A. Drumm, and M. Harnishfeger, Electronic Stability Program: The Brake that Steers, Verlag Moderne Industrie, 2002, 16-26.

2 Gustafsson, F., Automotive Safety Systems: Replacing Costly Sensors with Software Algorithms, 2009, IEEE Signal Processing Magazine, Volume 26, Issue 4, July 2009.

3 Fodor, D., K. Enisz, and P. Toth, Vehicle-Dynamics-Based Real ABS ECU Testing on a Real-Time HIL Simulator, Hungarian Journal of Industrial Chemistry, January 2012.

MATLAB® and Simulink® are registered trademarks of MathWorks, Inc.

 

Author Information:

Dr. Dénes Fodor
University of Pannonia, Faculty of Engineering, Institute of Mechanical Engineering
Egyetem u. 10.
Veszprém 8200
Hungary
fodor@almos.uni-pannon.hu

Figure 1: HIL Simulation Environment Anatomy
Figure 2: Simulation Environment Physical Appearance
Figure 3: ABS ECU Hardware Integration
Figure 4: ABS ECU Software Integration Into Tesis veDYNA
Figure 6: Velocities (Vehicle Velocity km/h), Wheel Speeds (km/h), and Brake Pressures (Pa) Without ABS ECU (Emergency Braking From 115 km/h)
Figure 7: Velocities (Vehicle Velocity km/h), Wheel Speeds (km/h), and Brake Pressures (Pa) With the ABS ECU (Emergency Braking From 115 km/h)
Figure 5: UI Speeds and Pressure Page