2007-01-0515

Design and Implementation of an Integrated Development
Environment Consisting of Engine Rapid Control Prototyping
and Real Time Vehicle Simulation
Shugang Jiang, Dharshan Medonza, Satoshi Furukawa and Michael Smith
A&D Technology Inc.

Copyright © 2007 SAE International

ABSTRACTTo meet the ever increasing requirements for engines
and vehicles in the areas of performance, fuel economy
and emission, and reduce product development time, we
see the need for an integrated development environment
which combines engine rapid control prototyping (RCP)
capability with real-time vehicle simulation capabilityusing an engine dynamometer in the test cell. Designand implementation of such a system with the ADX
universal high-speed system controllers are described.
An application example of simulating an FTP-75 cycle in
the test cell while the engine is under ADX control ispresented. This system moves a lot of work from thewhole vehicle environment to the engine test cell
environment, and is a powerful tool for quick
development and testing of control algorithms as well ascalibration.

INTRODUCTION
In recent years we have seen a trend in the automotive
industry where more and more electronic systems arebeing installed on vehicles. Moreover, the functions of
the electronic systems are becoming more and morecomplex. This has been driven by the ever increasing
requirements of safety, fuel economy and environmental
protection, etc. Meanwhile, OEMs are continuallyseeking to shorten the product development cycle inorder to survive the fierce market competition. Under
such a situation the market sees a great need formethods for rapid development, testing and calibration ofvehicle subsystems. This has led to the rapid adoption ofmodel-based development of control systems. Modelbased development provides solutions to quickly
prototype complex control strategies and carries out
testing and verification in an efficient way. With the useof rapid prototyping methods, new algorithms can bespecified in a high-level graphical language and directlycompiled into executables to be implemented and tested
on real-time hardware. Because of the seamless
transition from simulation to implementation and testing,system behavior can be assessed and tested in every
development phase. Due to these advantages, modelbased development has become an essential part of thedevelopment processes for modern automotive controlstrategies, especially in engine control systemdevelopment.
It is also ideal during engine control system developmentthat as much work as possible in algorithm design andECU calibration be carried out in the engine test cell,
before we have to perform at the vehicle level. In fact it
is very often the case that whole vehicle integration is
not available when engine control development isperformed. Moreover, development work in the engine
test cell provides better monitoring of engine behavior aswell as good repeatability of the test runs. Because of
the above reasons, real-time vehicle simulation using anengine dynamometer in the test cell is greatly desired.
Thus we see the need for an integrated development
environment which combines the engine RCP capability
and real-time vehicle simulation capability in the test cell.
Such an environment provides the developers with acomprehensive method to quickly and efficiently carryout development, evaluation and verification of engine
control strategies and to quickly calibrate and optimize
the performance of engine systems. Seamlessly
integrating the engine prototyping controller and realtime vehicle simulation bench moves a lot of vehiclebased work into the test cell. It ensures a reliable andconsistent process, and is a very desirable development
environment for engineers.
This paper presents an effort to set up such an
integrated development environment. We used two ADX
universal high-speed system controllers in realizing thissystem --- an RCP Controller, which carries out full passengine RCP, and a Simulation Controller, which carriesout real-time vehicle simulation and test cell control. TheRCP Controller provides the hardware and softwareenvironment for engine control functions such as sparktiming and fuel injection. The Simulation Controller isdesigned as a model-based dynamometer and throttlecontroller along with vehicle and driver models to realize
real-time simulation of an actual vehicle.
The paper is organized into four parts. First, the featuresof the ADX high-speed system controller are described.
Its hardware and software configurations are introduced.
The next section explains the overall design of theintegrated development system, followed by a detailed
description of the implementation of the full pass engine
RCP system, and the vehicle simulation and test cellcontrol system. The third section provides an example ofusing the integrated development system to simulate anFTP-75 test in the engine test cell while implementing afuel control algorithm. Finally a conclusion section
summarizes the benefit of this integrated development
system and gives the direction of future work.
ADXUNIVERSALCONTROLLER

HIGH

SPEED

SYSTEM

The ADX is a high-speed measurement and control
system. Figure 1 shows the hardware framework of thecontroller. It has a dual CPU architecture, using aPentiumM processor for high-speed simulation andcontrol, and a Renesas SH4 processor for running thehuman-machine and host communication interface. A
bus controller on the active back plane handles the datatransfer between the I/O interface boards and the CPUs.
This design lets the ADX free up the PentiumM CPU andenables execution of highly efficient digital signal
processing operations. The model cycle of the system
can be as high as 20 kHz.

The controller can be configured for a wide variety of
applications by combining multiple I/O boards, and it
provides very powerful and flexible solutions for control
system design, prototyping, simulation and testing. The
ADX has a color touch-screen display and 14 function
keys which can be customized. The controller canoperate as a stand-alone unit, as well as connected to ahost PC through Ethernet. It is portable, and suitable forboth lab and in-vehicle use.
Figure 2 shows the software architecture of the ADX andthe specific role of each software component.
MathWorks products --- MATLAB / Simulink / Stateflow -- are used to develop control logic in the form of model
block diagrams. Real-time interface blocksets for various
functionalities are provided, and the S-functions for
system hardware and interface boards can be integrated
in the block diagram. Real-Time Workshop converts theblock diagram into C code. Then they are compiled,linked, and downloaded automatically to the target
platform for real-time execution under the RT-Linux
operating system. It uses Virtual Console for a graphicaluser interface. Virtual Console enables the arrangementof the screen elements (e.g. oscilloscope) by simply
selecting control components from the library on the hostPC, dragging them onto the screen, and associatingthem with the variables and parameters of the Simulink
model. Virtual Console provides engineers with aninterface for real-time parameter setting and signal
monitoring.

Fig. 2 Specific Roles of ADX Software Components

Fig. 1 Hardware Architecture of ADX

The controller has a modular design, and seven slots areavailable for any combination of dedicated I/O boards.
Various user selectable general-purpose (A/D, D/A,DI/O, PWM, thermocouple etc.) and special function
interface boards (engine timing detection, three-phase
PWM motor control, networking, ECU bypass etc.), as
well as necessary Simulink S-functions, are provided.

DESIGNAND
IMPLEMENTATIONINTEGRATED DEVELOPMENT SYSTEM

OFTHE

Figure 3 gives an overview of the integrated
development environment. The minimum necessaryfunctions for gasoline engine operation are implemented
with the RCP Controller. These basic functions provide
the framework for additional or more advanced control
strategies, which can be added by integrating with
MATLAB/Simulink models. The Simulation Controller
realizes real-time simulation of vehicle behavior in theengine test cell environment. It runs mathematicalmodels of vehicle subsystems and the driver, andcontrols the dynamometer and engine throttle. The
dynamometer needs to be controlled in such a way that
it loads the engine as in a real vehicle. The throttle
needs to be controlled in such a way that the desired
vehicle speed trace required by the driving cycle ismaintained.

Fig. 3 Overview of the Integrated Development System
Based on application needs, the two controllers canserve as slaves of a higher level central control unit,
which is not shown in the figure and will not be coveredby this paper. Below we give a brief description of thefunction implementation of the RCP Controller and theSimulation Controller.

Implementation of Full Pass Engine RCP
Figure 4 shows part of the Simulink Model of the fullpass engine controller. An engine timing detection cardis used for processing the crankshaft and camshaft input
signals and sending out control signals for spark ignition
and fuel injection. An analog input card is used formeasuring the throttle position and the manifold absolutepressure, which are used for determining engine load. It
is also used for the input of the air-fuel ratio signal, thus
realizing not only open loop fuel control, but also closed
loop fuel control based on the air-fuel ratio feedback.
Based on the engine RPM, load information and control
parameter settings or adjustments through Virtual
Console (spark advance, ignition dwell angle,open/closed loop fuel control mode, fuel injection
duration adjustment etc.), the RCP controller implements
real-time control of the engine operation. More optionalcards, such as D/A, thermocouple, encoder, PWM,
digital I/O, serial communication etc., are available toimplement various additional control features of theengine.
Real-time crank angle detection and cylinder
identification are critical for engine control. The enginetiming mechanism is specific to customers andplatforms. There are various types of crankshaft andcamshaft signals that are currently used by OEMs andsuppliers. The engine timing detection card of the ADX
controller can handle different types of input signals,e.g., an encoder signal, a missing tooth signal, a chasing
tooth signal, a cylinder identification signal etc. An FPGA
is used for signal processing and the output of control
signals. The card has 16 output channels, which can beFig. 4 Part of the Full Pass Engine RCP Modelused for ignition and fuel injection control. The timing
resolution can be 1 µsec. The card can be configured
and parameter settings can easily be made via the Sfunctions. For each output channel of the card, in eachworking cycle (2 crankshaft revolutions) of the engine, it
can output as many as 8 pulses for ignition, or as manyas 20 pulses for fuel injection. Figure 5 shows agraphical user interface screen that is used to adjust
spark advance, ignition dwell angle and fuel injection
duration, etc., in real time, as well as monitor related
variables for engine behavior.

ImplementationofVehicle
Dynamometer/Throttle Control

Simulation

andFigure 6 shows part of the Simulink model of theSimulation Controller, which realizes driving cycle
settings, vehicle configuration settings, and all necessary
calculations of the vehicle model for obtaining thedynamometer and throttle control set point. ADX sends
out control commands at a maximum rate of 1000Hz tothe dynamometer drive and the throttle actuator. It also
has control over the resetting, stopping, and emergency
safety mechanism of the drive. The Simulation Controller
makes the dynamometer emulate a vehicle to theconnected engine.
APPLICATION EXAMPLE
Using this development environment, a fuel control
strategy together with other necessary control functions
running on the RCP Controller, and a Simulink model for
an FTP-75 driving cycle running on the Simulation
Controller were carried out. Unlike what we show inFigure 3, a driver model is not used in this example.
Instead an operator manually adjusts the throttle input
and follows the FTP-75 trace by monitoring the feedback
from the system. Figure 7 is an excerpt that shows partof the result of the FTP-75 trace and the speed trace
generated by the dynamometer.

Fig. 5 GUI for Parameter Setting and Variable Monitoring

Fig. 6 Part of the Simulink Model of the Simulation Controller

Controller (cam signal and a cylinder pressure signal arealso shown in this figure). At the moment, an emissions
bench has not yet been installed in the development
environment. We will show more about the effectivenessof the whole system in control feature design andperformance optimization in later papers.

CONCLUSION

Fig. 7 Excerpt of FTP-75 Trace and Speed Trace
Generated by Dynamometer

We can modify the control parameters and monitor
engine behavior through the Virtual Console GUI. We
also use a high-speed data acquisition system to show
how the ignition and fuel injection pulses change in realtime during the driving cycle. Figure 8 shows a snapshotof the ignition and fuel injection pulses from the RCP

Integrating engine rapid control prototyping with realtime vehicle simulation provides engineers a desirable
development environment with comprehensive capability
in engine control development. With its highperformance design, abundant functional cards and very
friendly GUI, the ADX universal high-speed systemcontrollers can be successfully applied to realize such asystem. This development environment can effectively
move much development work from the vehicle
environment to the engine test cell environment, thus
greatly reducing the time for control algorithm
development and control parameter optimization. Keyelements and functions of this system have been set up
and some basic applications have been carried out.
Results indicate the feasibility and benefit of such adevelopment environment. Further work includes
integrating the emission bench into the system and also
refining the vehicle model, driver model etc. These will
greatly enhance the system capability in transient modedevelopment and enhance the value of the system.

Fig. 8 Ignition and Fuel Injection Pulses

REFERENCES
1. Jooyoung Ma, Jeamyoung Youn and Minsuk Shin,et. al., “A Design Approach using Seamless
Development Environments, SILs/RCP, for RealTime Control Systems”, SAE 2006-01-0310.
2. Andrew Beaumont, Joe Lemieux and Paul Battiston,et. al., “Design of a Rapid Prototyping Engine
Management
SystemforDevelopmentofCombustion Feedback Control Technology”, SAE
2006-01-0611.
3. Tom Erkkinen and Koos Zwaanenburg, “A Seamless
Implementation of Model-Based Design Applied to a
New Fuel Control Feature for an Existing EngineECU”, SAE 2006-01-0612.
4. Seungbum Park, Hakmo Yoo and Youngbug Park,et. al., “Model-based Development of Engine Control
System from Concept to Vehicle”, SAE 2006-010856.
5. Joe Steiber, “Development of an Engine Test Cellfor Rapid Evaluation of Advanced Powertrain
Technologies
using
Model-Controlled
Dynamometers”, SAE 2006-01-1409.
6. Jeffrey D. Naber, Eric K. Bradley and John E.
Szpytman, “Target Based Rapid Prototyping Control
System for Engine Research”, SAE 2006-01-0860.
7. Joe Steiber, Bapraju Surampudi, Ben Treichel, et.al.,“Vehicle HIL, the Near Term Solution for Optimizing

Engine and Transmission Development”, SAE 200501-1050.
8. O. Philipp, M. Buhl, S. Diehl; et.al., “Engine ECUFunction Development Using Software-in-the-LoopMethodology”, SAE 2005-01-0049.
9. Mark Hsu, Maher El-Jaroudi and Eric Bender,“Accelerated Life Cycle Development for Electronic
Throttle Control Software using Model-based/AutoCode Technology”, SAE 2004-01-0276.
10. Michael Beine and Rainer Otterbach, “Developmentof Safety-Critical Software Using Automatic Codegeneration”, SAE 2004-01-0708.
11. Kurt B. Plischke, “Bringing MATLAB Into the TestCell”, SAE 2003-01-1025.
12. Paul Cook, Peter James and Mark Willows, “Rapid
Prototyping of Generic Hybrid Concept Vehicles”,SAE 2002-01-0755.
13. Joseph J. Lemieux, “Foundation for Rapid
Embedded Development”, SAE 2001-01-0022.

CONTACTDr. Shugang Jiang
Technical Specialist
A&D Technology Inc.
4622 Runway Blvd., Ann Arbor, MI 48108 USA
email: sjiang@aanddtech.com