Alma Automotive Creates Modular HIL Test System for Automotive ECUs Using VeriStand

Enrico Corti, Alma Automotive

"The combination of NI VeriStand and the NI PXI platform satisfies all I/O, computational power, signal simulation, and data analysis customer requirements and is also completely open and modular. "

- Enrico Corti, Alma Automotive

The Challenge:

Developing a modular, hardware-in-the-loop (HIL) test system based on commercial off-the-shelf (COTS) hardware for real-time engine and vehicle simulation to reduce the amount of physical testing required during embedded software validation.

The Solution:

A test system based on NI VeriStand real-time testing software and NI PXI hardware that provides the necessary computational power, access to field-programmable gate array (FPGA) hardware for high-speed control, and a wide range of I/O to ensure the HIL system meets current requirements and can be expanded to meet future application needs.

Alma Automotive is a company based in northern Italy that supplies customized solutions for automotive calibration, control, and testing. Depending on customer needs, Alma Automotive offers software-only solutions (models or model-based analysis), or integrated hardware and software solutions. Eldor Corporation supplies automotive electronic components such as coils, ion-sensing systems, and electronic control units (ECUs).

 

Because they can be used to implement both automated and standardized tests, HIL systems are standard for ECU testing. Most HIL systems available on the market offer standard features that cannot be expanded or customized. Eldor Corporation chose the HIL solution proposed by Alma Automotive because the hardware and software were open and fully customizable based on their needs.

 

The HIL system must simulate the plant controlled by the ECU. All real-world signals going to the ECU must be replaced by simulated signals generated by the HIL test system. Because the objective is to test ECU functionalities, the simulation must run in real time. The model must accurately simulate plant response to ECU commands to test the entire embedded control system. For some types of signals, a correct time-base reproduction is difficult because of the need to synchronize the high frequency of the signal with the instantaneous crankshaft position. Typical examples of this include in-cylinder pressure, accelerometer, ion-current, and intake pressure signals.

 

There are many HIL system options on the market today. The main drawback of most systems is the lack of tools to customize the base library offered by HIL suppliers. It is very difficult to access low-level (FPGA-like) functions and these systems cannot be tailored to customer needs.

 

 

The combination of NI VeriStand and the NI PXI platform satisfies all I/O, computational power, signal simulation, and data analysis customer requirements and is also completely open and modular. Two crucial factors determining the application success are the ability to create complex FPGA code using the NI LabVIEW FPGA Module, as well as the ability to create a custom device that can output camshaft, crankshaft, intake, ion-current, and in-cylinder pressure signals.      

 

The HIL system proposed by Alma Automotive (Figure 1) integrates a set of hardware and software components including the following:

 

  • A complete engine/vehicle (motorcycle)/driver model developed with the PXI real-time controller 8110, with a step time of 500 µs and a single-core CPU load of 20%
  • A high-bandwidth signal generator implemented with a custom device that generates model-based crankshaft, camshaft, intake, and in-cylinder pressure and ion-current signals – the same custom device is used to acquire all the ECU output commands including ignition, injection, H-bridge, and relay-lamps. The custom device is implemented by means of the 7852R board.   
  • A custom I/O signal conditioning board designed and produced by Alma Automotive that converts the ECU analog output signals to Transistor-Transistor Logic (TTL) digital signals and boosts the PXI 6723 analog output signals when necessary (Variable Reluctance Signals, VRS)
  • A custom fault-insertion unit (FIU) for actuators and sensors and a break-out box that provides access to 96 signals that were designed and produced by Alma Automotive

 

The vehicle simulation mode can be used for open-loop (the user drives the vehicle) or closed-loop simulations (a simulated driver follows a vehicle speed trace). A dynamometer mode is also available to simulate a test bench running condition. The engine was modelled using multivariable torque maps. This submodel outputs engine torque, air-to-fuel ratio, and other parameters. These outputs are sent to the custom device to generate high-frequency signals such as intake pressure. Engine torque is used to feed the vehicle and transmission submodel, which simulates driveline components. Engine and vehicle speed are calculated based on engine torque, clutch position, inserted gear, tire behaviour, and actual loads on the front and rear wheels.

 

The driver submodel handles twist-grip, brake, clutch, and the selected gear by implementing torque-based control logic, while the dynamometer submodel evaluates the supplied torque to keep the engine at the desired operating conditions for the engine speed and load. A heat exchange submodel is also implemented to evaluate the engine coolant temperature; the electrical system submodel allows the user to simulate the starter and the battery voltage level during cranking.

 

The core of the system is the NI VeriStand custom device plug-in designed by Alma Automotive. This plug-in is an engine I/O subsystem simulator that generates dual-channel VRS/Hall sensor signals with voltages up to 120 V peak-to-peak after conditioning, angle-based configurable waveforms, and 4-channel wheel signals. It also acquires 12 channels of conditioned high-voltage ECU actuations; 16 channels of general-purpose, high-voltage ECU outputs such as on/off, frequency, and PWM; and 8 channels of analogue inputs that are conditioned to the 120 V peak-to-peak range. Figure 2 shows the custom device setting interface. The number of teeth of the sensor wheel and the type of sensor wheel are fully configurable.

 

 

The FIU developed by Alma Automotive is also FPGA-based. It uses the FPGA to handle the more than 400 signals required to operate the switches. The determinism of the FPGA allows for the implementation of safety features including a user-defined fault timeout, global FIU disable, and overcurrent monitoring on fault buses. The make-before-brake FIU operation prevents undefined states on the faulted channels with a user-configurable load release delay.

 

The FIU developed by Alma Automotive can handle 64 channels with 2 A limiting on power sources, giving access to four general-purpose fault buses. Open circuit GND, Vcc, and VBATT are available as power sources. Feedback on the switch state can be obtained through 320 LEDs.

 

The user can connect real-world or simulated loads. When actual loads such as throttle body are used, feedback sensors such as the throttle potentiometer are read by the simulator and feed the model. When using simulated loads such as the simulated throttle body, feedback signals are generated by a simulator such as the analogue output channels, and sent to the ECU. Switching between actual and simulated loads is accomplished by moving a jumper on the break-out box.

 

The system was successfully interfaced with the target ECU. Figure 3 shows a typical NI VeriStand interface used for HIL tests.

 

The user can stress and validate all the ECU functionalities for both software and hardware using the available road and bench test modes. The ease of use and configuration allows for direct system reconfiguration without the need for customer support request. The NI PXI platform was suitable for integration with third-party and custom-developed boards.

 

It is crucial that the HIL test system enables both hardware and software updates to slow down obsolescence. Because NI PXI hardware is modular and based on COTS components, it can be easily upgraded, which ensures that the system will be operational in the future. The open architecture of NI VeriStand and its easy integration with LabVIEW and other development software provides the flexibility necessary to meet any challenges that may arise as testing requirements change.

 

Author Information:

Enrico Corti
Alma Automotive
via Terracini 2/c, 40131
Bologna 40131
Italy
Tel: 00390519923806
Fax: 00390510548470
ecorti@alma-automotive.it

Figure 1: HIL System Integration
Figure 2: Crankshaft reference signal generator custom device
Figure 3: HIL test control panel