Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Customer Solutions

Developing a Hardware-in-the-Loop (HIL) Simulator for Testing Servoassisted Gears

Author(s):

Nicola Ariotti, Seminara Magneti Marelli Powertrain Systems; Francesco Cimmino, Seminara Magneti Marelli Powertrain Systems; Rosella Crovato, Seminara Magneti Marelli Powertrain Systems; Alberto Lombardo, Seminara Magneti Marelli Powertrain Systems; Massimo Seminara, Seminara Magneti Marelli Powertrain Systems

Industry:

Automotive

Product:

CAN, Data Acquisition, LabVIEW, LabVIEW Real-Time, LabWindows/CVI, PXI/CompactPCI

The Challenge:

Implementing a hardware-in the-loop (HIL) simulator for the real-time simulation of the SelespeedĀ® electronic control unit (ECU) I/Os.

The Solution:

Using National Instruments software and hardware to develop the SABEV emulation bench acquisition system to test our Selespeed servoassisted gear based on a proven system used in Formula 1 racing cars.


Testing ECUs for Software/Hardware Functionality and Speed-Gear Mechanics
At Magneti Marelli, a Fiat company, we design and manufacture high-tech components and systems, including the hydraulic and electronic components, for the automotive industry. With this system, the ECU manages the clutch operation and the gear clutching using a closed-loop control system. We developed the described tool to test the ECUs for software functionality, as well as hardware and speed-gear mechanics. For the development of the resident software in the control unit, we needed a tool that exceeded the capabilities of the existing software-in-the-loop simulators because it is necessary to duplicate the control unit operating conditions at the software and hardware levels.

As a result, we developed the Sistema Acquisizione Banco Emulazione Veicolo (SABEV), which is an emulation bench acquisition system, with the goat to reproduce I/Os available in the car under all driving conditions for each pin of the control unit.

With this configuration, we can work as if we are actually in the car, connecting conventional tools to the ECU.

In implementing this system, we focused on computing performance and a streamlined simulation model because the system required real-time capabilities. We devised a layout in detail where we inserted the ECU and the simulation PC, as well as a speed gear complete with hydraulic kit. With this design, we can eliminate the modeling of the speed gear and of the control system hydraulics because they are physically available on the bench and therefore speed simulation.

Using Virtual Instrumentation to Develop Vehicle Model
We developed this tool using LabVIEW. The software consists of a while cycle, which incorporates a sequence cycle, where we execute the following operations:

  • Analog signal acquisition
  • Panel input analysis
  • Reception of CAN messages from the control unit
  • Data processing (vehicle dynamic model)
  • Frequency signal generation (vehicle speed)
  • Transmission of incoming messages to the Selespeed central unit through CAN

The virtual instrument (VI) is the heart of the vehicle model. After the VI receives an input from the panel with the position of the accelerator pedal, the engaged speed gear and the clutch status outputs the rotation speeds of the gear shafts and the values of the motor and stall torque. We wrote this model in C and compiled it with LabWindows/CVI to generate a DLL that we retrieve in LabVIEW as a sub VI. We use these values for the generation of motor speed and primary gear-speed signals. The signals are 0-5 V square waves with a frequency proportional to speed.

We generate these signals with the counters of the counters of the PCI-6024E boards using a subVI to change the counters frequency in real time. For redundancy, we duplicate these values on CAN together with all analog and digital signals required for the Selespeed operation, including accelerator pedal position, motor and air temperature, and brake status.

Designing a Test Virtual Panel to Test Gear Components
We designed the panel to reproduce a vehicle’s driving pace. The top left of our panel contains the instrumentation panel for the speedometer, engine speed indicator, alarm indicators, the key, accelerator, brake and temperature controls, and the speed gear controls. The top right of our display panel shows the signals of speed gear and clutch position sensors, the virtual position of the gear stick, the circuit pressure value, and the supply voltage level.

The lower section of the panel displays operator messages, the current values for valve control, and some information about VI execution speed, including time required for each loop.

To control the gear stick, we defined stable positions where the stick remains even when we release the control. We also defined unstable positions where the stick moves back to the original position when we release the control.

Simulating Digital Drives Connected to the Central Unit Inputs with NI Hardware
The architecture features two multifunction PCI boards connected to the electromechanical relay module SC-2062 to simulate all digital drives connected to the central unit inputs, including key, door open, DSC enabled, and sports program requested. We identify the position of the gear stick by matching the status of four switches connected to a resistive circuit. This causes a variation of the impedance detected by the central unit on the relevant pins. We generate the speed signals from pickups in the vehicle using the onboard digital counters. We use the PCI-CAN board to manage the read and write CAN messages. Through a series of amperometers, we can the valve actuation currents.

Achieving a Flexible System to Automate and Repeat Tests Easily
With this NI-based system, we can:

  • Use the bench for tests that we previously executed on the vehicle itself
  • Take advantage of automated software testing
  • Test the speed gear and the hydraulic kit using the same software as the vehicle rather than a bench-specific software



A major concern was system flexibility because we mount Selespeed with minor variations on different vehicles for multiple customers. For the wiring of the interface box that connects ECU, speed gear and PC, we developed a special system that we could easily adapt to different designs. In the current configuration, the system requires a terminal operator that executes the controls from the panel. We devised an alternative version of the tool, so we can read inputs from a text file to automate and repeat tests easily.

For more information, please contact:
Magneti Marelli Powertrain Systems
V.le Carlo Emanuele 118
Venaria Reale (TO) - Italy
Web: www.marelli.it