Development of a Hardware In the Loop System for ECU Testing.
Author(s):
E. Corti - ALMA AUTOMOTIVE
L. Solieri - UNIVERSITY OF BOLOGNA
Industry:
Automotive
Products:
Data Acquisition, Controllers, LabVIEW, R Series, Chassis
The Challenge:
To develop a Hardware In the Loop (HIL) system for automotive engine control units testing. The system must be available in two different configurations: a low cost version, which can generate signals starting from telemetry data, and a high performance version, integrating an engine/vehicle model, able to simulate driving conditions. Both the systems must be able to replicate engine position signals with high angular precision without glitches, for both VRS and Hall effect sensors.
The Solution:
The most critical task is associated to angular positioning signals generation, and can be carried out by means of the FPGA boards. The 7833R analog output lines are used for VRS signal generation, while Hall effect signals can be reproduced also with the 7813R (no analog I/O required). Other data are generated by means of the 6723 board. For the high performance version, the PXI-8196 RT controller has been used, to solve the engine/vehicle model in real time with fast loop rates.
"The HIL system is able to handle the transients without introducing glitches in the generated waveform. This requirement was successfully met by taking advance of the FPGA board, which handles all the high speed signal generation tasks"
Short Summary
Hardware in the loop (HIL) systems are used for rapid ECU testing operations: with a HIL system it is possible to reproduce in the lab engine-vehicle conditions, thus allowing an easy and cost effective hardware/software debug. In order to test the ECU in realistic running conditions, its input signals must be comparable to the signals coming from the engine/vehicle sensors. The project target is to develop a HIL system with two possible configuration: the first one consisting in the reproduction of sampled data (for example: telemetry) on analog output lines, also recreating coherent engine positioning signals. The second step is to simulate the engine sensors signals by means of an engine/vehicle model running in real time.
Article
Automotive ECU (Elctronic Control Unit) testing and diagnosis can be a time consuming and expensive task, expecially for high performance engines, that have limited test bench life. Being able to perform real life test procedures, without having the engine running would reduce the time required and the cost of such activities. A flexible HIL (Hardware In The Loop) platform, capable of replicating all the engine sensors signals, while being transparent to the ECU, is a possible solution.
The problem can be addressed in two different ways: the first deals with the reproduction of all the engine signals starting from a set of telemetry data, on the other hand, the second approach includes a physical model of the engine/driveline/vehicle as the source of the signals to be generated. Both methods share the engine positioning signals generation (crankshaft and camshaft angular references), which is carried out by the FPGA board.
The system is based on NI hardware and software. The basis of signal generation is the FPGA board PXI-7833R (or 7813R) togheter with the PXI-6723. For the model based application an embedded controller running LabVIEW RT is required; for that case the PXI-8196 was used.
The engine position reference generation was designed to be flexible, to be able to simulate the widest variety of engine-sensors configurations. It successfully simulated both VRS and Hall Effect type of transducers and sensor wheels of different geometric characteristics (teeth number and shape). This result is obtained because the waveform of the generated signals is user defined and changeable at run-time. The same functional block can be used to generate sensor wheel signals other than engine signals, like those coming from ABS systems or wheels.
One of the advanced feature of the system is the capability to simulate the systematic fluctuations of the sensor wheels signals, due to manufacturing flaws. These usually involve both frequency shifts and amplitude variations, similar to those of a modulated signal.
Particular attention has been devoted to transient response. The target top speed variation of 100,000 RPM/s has been considered adequate even for racing engines. The system must be able to handle such transients without introducing glitches in the generated waveform. This requirement was successfully met by taking advance of the FPGA board, which handles all the high speed signal generation tasks. The FPGA internal speed reference, which determines the precision of the signal generation, is updated every 16us, resulting in a maximum error of 1.6 RPM in a 100,000 RPM/s speed transient.
In steady state condition the system is able to generate angular position signals with ±0.1RPM error at 20,000RPM (considering one engine cycle as period reference). This is because the FPGA hardware has a timing resolution of 25ns and a maximum DAC (Digital to Analog Conversion) update rate of 1MSps (samples-per-second).
To evaluate a more realistic error figure, a race-track lap has been simulated. The system was fed with sampled data and the RMS speed error was computed, comparing the telemetry value with the value read from the ECU. In this configuration a simple following controller was implemented to keep the generated angular position signals in phase with the RPM value from telemetry. The RMS error was below 10 RPM over the complete track lap.
The full HIL system, featuring a engine-vehicle model, requires to intercept the ECU actuations. Reading the injection timing and the spark advance is necessary to be able to compute the torque value. The task of intercepting the ECU actuations is, again, realized with the aid of the FPGA board, by means of its high resolution timers and digital I/O. The system is able to read the injection duration with 1 us resolution and to determine the SA position with an accuracy of 0.1°.
The generation of all other engine sensors signals is carried out via the PXI-6723 32 channels analog output board. For each signal to be generated it is possible to specify its characteristic, in terms of physical unit to volt conversion. Both linear and nonlinear relationship are possible by means of user configurable LUTs (Look Up Tables). In this way a very wide range on sensors types can be successfully replicated (thermocouples, oxygen sensors, pressure transducers, etc).
A few words regarding the more advanced approach of the complete simulation of the engine, the driveline and the vehicle. The model, that runs on the embedded controller PXI-8196 with LabVIEW RT, is a torque generation model, capable of simulating the in cylinder pressure evolution within the engine cycle, hence the torque actually produced by the engine. Furthermore, driveline and vehicle dynamics can be simulated with the same model with high accuracy. The model execution step-time is 1ms, which determines the update frequency of the RPM value to be passed to the FPGA board.
Related Case Studies
Developing a Hardware-in-the-Loop (HIL) Simulator for Testing Servoassisted GearsThales Tests Fly-by-Wire Hardware with PXI and LabVIEW based HIL System
Development of a Rapid Control Prototyping platform targeted at the implementation of advanced engine control systems.
HIL Test Systems for the BMW Hydrogen 7
HIL-Family NovaSim: simulation and automation in the component test
|
|

