7/27/2019 Towards a Seamless Development Process for Automotive Engine Control System
1/10
Control Engineering Practice 12 (2004) 977986
Towards a seamless development process for automotive
engine-control system
Wootaik Lee, Seungbum Park, Myoungho Sunwoo*
Automotive Control & Electronics Laboratory, Department of Automotive Engineering, Hanyang University, 17 Haengdang-Dong, Seongdong-Gu,
Seoul 133-791, South Korea
Received 24 March 2003; accepted 26 November 2003
Abstract
This paper describes a new development platform for an automotive engine-control system and introduces a seamless
development process with a practical example of model-based engine control. The development platform consists of a target-
identical rapid control prototyping (RCP) system and a PC-based hardware-in-the loop simulation equipment. This RCP system is
designed very similarly to the real production controller with the help of a customized target package and powerful microcontrollers.
This RCP system insures rapidity of production as well as prototyping, by adopting a target-identical microprocessor. The resulting
target identity is important from the viewpoint of practice and application. An organized development environment is provided by
matching hardware-in-the-loop simulation (HILS) equipment with the RCP system. A control system can be easily tested and
validated using PC-based HILS that uses commercial-off-the-shelf I/O boards. The development platform supports enhanced
concurrent engineering, and results in a reduction of development time and cost. To examine the feasibilities of the proposed
development environment, a model-based air-to-fuel ratio controller based on a sliding mode control scheme is implemented as a
practical example.
r 2004 Elsevier Ltd. All rights reserved.
Keywords: Engine-control systems; Hardware-in-the-loop simulation; Rapid control prototyping
1. Introduction
Automotive electronics have been changed dramati-
cally recently, and new features have been introduced to
satisfy customer expectations. Moreover, the require-
ments for existing functions are becoming more
demanding because of the stricter environmental man-
datory regulations and safety standards. Engine-control
tasks, that were classically solved mechanically, are now
being replaced by electronic control systems, and the
design and implementation of control algorithms is a
crucial element in the development of automotive
engine-control systems. The pressure on the develop-
ment process of electronic engine-control systems has
increased rapidly because engineers are expected to
implement more features in a less time. Ad hoc heuristic
design and implementation methods are being replaced
by systematic requirements-driven processes.
In the last decade, researchers have enhanced the
development process of the control system efficiently in
both academia and industry. The requirements of the
modern development process have been the subject of
many studies. Isermann (1996) examined the importance
of a systematic development process and software tools
for the design. Hanselmann (1998) suggested that the
modern development process is characterized by com-
puter-aided support in all stages from specification to
product. Smith (1999) also proposed that a more
efficient development process is not intended to change
the basic steps. Rather, improved software and hard-
ware tools can make the process more efficient.
Browne, Bass, Croll, and Fleming (1994) and Hajji
et al. (1996) proposed a framework of tools which allow
the design of distributed, potentially fault-tolerant, real-
time control software. Kimura and Maeda (1996) also
introduced two development tools for an engine-control
system. One is the engine and vehicle simulator and the
other is the control logic simulator substituting for a
ARTICLE IN PRESS
*Corresponding author. Tel: +82-2-2290-0453; fax: +82-2-2297-
5495.
E-mail addresses: [email protected] (W. Lee),
[email protected] (S. Park), [email protected]
(M. Sunwoo).
0967-0661/$- see front matterr 2004 Elsevier Ltd. All rights reserved.
doi:10.1016/j.conengprac.2003.11.016
7/27/2019 Towards a Seamless Development Process for Automotive Engine Control System
2/10
part of the engine-control logic in production CPUs.
Butts (1996) benchmarked many computer-aided con-
trol system design (CACSD) tools and computer-aided
software/systems engineering (CASE) tools to be
adopted in the modern development process. Tradi-
tional CASE and CACSD tools were integrated to
improve hybrid systems development support for theautomotive power train control community, and CASE/
CACSD products were applied to a simplified power
train system model to investigate the feasibilities.
Toeppe, Bostic, Ranville, and Rzemien (1999) per-
formed a trial evaluation of commercially available
CACSD tools, and Howold and Jupfer (2000) compared
classical CASE-tools approach and tools for automated
code generation.
Some companies offer sophisticated development
environments for automotive applications (Hansel-
mann, 1998; Leharth, Baum, Beck, Werther, & Zur-
awka, 1998). They support the specification of
embedded systems, and verify and validate it on
different abstraction levels. They also generate a code
automatically for rapid control prototyping (RCP)
controllers, and provide a hardware-in-the-loop simula-
tion (HILS) experimental environment.
This paper presents a new integrated platform-based
development environment for automotive engine-con-
trol system. The control algorithms can be developed by
using the MATLABs/SIMULINKs off-line simulation
environment. This control design can be easily imple-
mented in the proposed RCP platform through the
REAL-TIME WORKSHOPs and the customized
target package. The generated execution codes areeffectively tested and verified by using PC-based HILS.
The proposed platform-based environment enables the
developers to design control laws, to generate executable
code, and to test the control system in a unified way, and
make the development process more seamless.
The modern development process is introduced and
the way to enhance the development process is proposed
in the following section. The features of a newly
proposed development platform are explained in detail
in the next section. The results from the pilot project of
an air-to-fuel ratio (AFR) control using the developed
platform are presented to illustrate the feasibilities of the
proposed development environment.
2. Development process
The major characteristics of the traditional develop-
ment process are described as follows: (i) conventional
textual specifications, (ii) a lack of comprehensive tools,
(iii) a sequential approach. The inefficient traditional
development process is being replaced with a modern
development process, which is characterized by an
integrated computer tool chain in all stages from the
specification to the final product.
2.1. Conventional development process V-model
The modern development process can replace the
expensive prototypes with the appropriate alternativesand provide an economical virtual test environment to
minimize the expensive and time-consuming experi-
ments on the test bench or in-vehicle. Furthermore,
the modern development process eliminates an error-
prone hand-coding process.
Sivashankar and Butts (1999) and Smith (1999)
addressed the modern development process in the form
of a simplified V-model (see Fig. 1), and summarized the
requirements of each development phase, respectively.
On the left downward path, development becomes more
detailed and concrete, eventually leading to the compo-
nent. The right upward path leads to the final
production electronic control unit (ECU), which is then
compared to the original ideas, objectives and specifica-
tions.
At the beginning of a new project, the overall system
functionalities are specified. After the initial concept
phase, the requirements of each subsystem are defined
according to the project characteristics. These require-
ments are analyzed and the core functions and features
of each subsystem are specified.
Control algorithms are primarily designed in response
to the pre-defined specifications, and they are also made
robust with respect to extreme and abnormal operating
conditions. A number of architectures and softwaredesign requirements are incorporated. A modeling work
of both the physical plant and the control system occurs
in this stage. This is the most mature stage in the
development process. Advanced modeling tools are well
established and offer powerful graphical user interface
and modeling capabilities. These tools can be smoothly
integrated into the development process.
The control algorithm is implemented in the form of
source codes through a traditional hand-coding or an
auto code-generation method, and is validated with its
ARTICLE IN PRESS
Fig. 1. Modern development process V-model.
W. Lee et al. / Control Engineering Practice 12 (2004) 977986978
7/27/2019 Towards a Seamless Development Process for Automotive Engine Control System
3/10
requirements, using a software-in-the-loop simulation
(SILS) method or an RCP method. As in the case of the
modeling and simulation phase, both the SILS and RCP
environment are used to represent the actual system as
much as possible. RCP including an automatic code
generator is the key step for the modern development
process. With the help of the RCP environment, thecontrol engineers can easily validate and verify their
own controller design in the vehicle or in the special test-
benches, without the intervention of software or hard-
ware specialists.
The next step is the modification of the source codes
to an appropriate form for the production target
processor. Converting the control algorithms to the
production level codes is a very time-consuming and
tedious phase.
After the functions are integrated in the production
target, they should be tested against the above-
mentioned functional requirements. Integrated control
systems can be tested and verified using the specially
designed test benches or real vehicles. As an alternative,
a real-time model-based testing procedure, which is
called HILS, may be used. HILS is characterized by the
operation of real components in connection with real-
time simulated components. Usually, the control system
hardware and software is the real system, and the
controlled process can be either fully or partially
simulated.
Final validation and testing will always be required in
the completed system. At the end of the design process,
the control system is finally calibrated for the specific
application using the HILS and the in-vehicle testprocedures. This phase has shown the greatest advance
in the development process.
2.2. Proposed V-model for engine-control system
This RCP equipment enables the control engineers to
verify their own control algorithm in an ideal environ-
ment using an automatic code-generation technique. In
the target implementation phase, this control algorithm
is coded and linked with other parts of the software by
the software engineers. This final software is validated
against the pre-defined requirements or specifications to
check the feasibilities of the target implementation in the
HILS phase. The described V-model can be enhanced
more seamlessly in an application-specific case. A
development platform, which is composed of a target-
identical RCP (Lee, Shin, & Sunwoo, under submission)
and a convenient HILS (Lee, Yoon, & Sunwoo, 2003),
alleviates some technical difficulties in transition from
one phase to another phase (see Fig. 2).
As shown in Fig. 1, the conventional V-model
separates the RCP phase from the target-implementa-
tion phase due to the insufficient computing power of a
target microprocessor and the difference of the abstrac-
tion levels of CACSD tools. The computing power
difference can be alleviated by the recent advent of
powerful floating-point microcontrollers, which are
currently used in high-end engine-control applications.
Furthermore, the difference in the abstraction levels can
also be overcome by some CACSD tools, which have an
automatic code-generation function and provide a
flexible environment for integrating source codes. The
powerful microcontrollers and these CACSD tools
make a target-identical RCP viable in the engine-control
application in spite of its immaturity. The target-
identical RCP also makes control validation easier. This
conventional V-model has two different phases to
validate the control algorithms. One is the control
verification phase, in which only the control algorithm
can be tested by use of an RCP equipment, and the other
is the control validation phase, in which the whole
control system may be tested, including control algo-
rithm and software implementation, by use of a target
ECU. The target-identical RCP can constitute thefinal control system as easily as the RCP in the context
of Fig. 1. Therefore, it makes the former validation
phase redundant, and renders the later validation phase
as easy as the former one.
The conventional V-model enables software engineers
to code the application part after the control algorithm
is verified in the RCP phase. Hand coding of the control
algorithm makes it difficult to shorten the development
time. The automatic code-generation technique, which is
widely used in RCP and HILS, has been developed to
the production-quality level and this technique can be
applied to convert the control algorithm to the execu-
tion code. In spite of the maturity of the automatic code-
generation technique, it is very difficult to generalize the
code-generation procedure of the low layer codes,
because of the hardware dependencies and efficiency of
the codes. The easiness of automatic code generation
can be compromised with the efficiency of hand coding
in the aspect of the layered architecture. The application
part of the software is converted to the codes by the
automatic code-generation technique, and the low layer
codes are programmed by software experts on a trial
and error basis. This compromise makes the control
design and the software design perform concurrently.
ARTICLE IN PRESS
Fig. 2. Proposed V-model for engine-control system.
W. Lee et al. / Control Engineering Practice 12 (2004) 977986 979
7/27/2019 Towards a Seamless Development Process for Automotive Engine Control System
4/10
7/27/2019 Towards a Seamless Development Process for Automotive Engine Control System
5/10
executed in real-time. The Mororola MPC555s is
selected as the target processor. The HILS equipment
is composed of a host computer and a target computer,
which have some data acquisition cards to interface the
physical signals. Fig. 4 shows the block diagram of the
proposed development platform. Although this figure
depicts the RCP host, HILS host, and measurement and
calibration hosts separately, all the programs of the host
computers are executed concurrently in a single host
computer for the developers convenience.
Fig. 5 shows the layered architecture of the proposed
development platform. This RCP platform is designed
for target implementation as well as RCP. To achieve
this goal, layered architecture is strictly maintained and
the RCP platform is designed similarly to the produc-
tion controller. In order to utilize all the features of the
MPC555s, hardware abstraction layer (HAL) is de-
signed as similarly to the target codes as possible. The
middle layer is carefully organized and designed for the
TARGET LANGUAGE COMPILERs realizations.
By use of the implemented scheduler, any task of the
application program can be easily activated in accor-
dance with the pre-defined condition, such as a certain
event or time period. A customized toolbox, called
engine-control toolbox, is developed to interface an
application program, e.g. the control algorithm, with the
lower layer. The frequently used functions are more
abstracted as in a block library form (see Fig. 6). All theblocks are categorized as initialization, I/O functions,
and scheduling functions. The I/O signals of the ECU,
which generally interact with the engine sensors and
actuators at the off-line simulation phase, are replaced
with the appropriate sink and source blocks, such as
rpm read, and update fuel duration. The execution of the
control algorithms can be configured by use of the
trigger blocks and the task subsystem.
To develop a new engine-control system, highly
sophisticated software, calibration, measurement and
diagnosis equipment has to be used. It would be
beneficial to use the same tool for the calibration and
rapid prototyping. CAN calibration protocol (CCP) is
widely used in the automotive industry, and is becoming
a standard tool. Thus, the CCP is selected as a
measurement and calibration tool in this study.
The HILS environment requires signals from the
computational platform to be interfaced with the
ARTICLE IN PRESS
Fig. 4. Hardware block diagram of the development platform.
Fig. 5. Layered architecture of the development platform.
Fig. 6. SIMULINKs toolbox of rapid prototyping platform.
W. Lee et al. / Control Engineering Practice 12 (2004) 977986 981
7/27/2019 Towards a Seamless Development Process for Automotive Engine Control System
6/10
hardware. In the layered architecture perspective, the
hardware layer can be divided into two categories. One
is the logic-level I/O layer in which the microcontroller
directly interfaces, and the other is the real I/O layer
containing signal conditioning subsystems, power am-
plifying subsystems, and other subsystems. During the
design phase, one must determine the proper portioningof signal processing into available software and hard-
ware. This results in a trade-off among system complex-
ity, computational burden, and maintainability. Though
the lowest hardware interface layer is desired to emulate
more realistic environment, this layer can be by-passed
for the purpose of economy and convenience. If the
logic-level signals, such as the ignition-triggering signal,
can be used instead of real I/O signals, these complicated
devices can be eliminated. In this study, the logic-level I/
O is used and major parts of the by-passed layer are
modeled. For seamless integration of the development
process, xPC targets of REAL-TIME WORKSHOPs
is used in the HILS platform.
4. Engine-control experiments
An engine-control experiment is performed as a pilot
project, to prove the feasibility of the proposed
development process. Two air-to-fuel ratio (AFR)
control algorithms are evaluated in this experiment.
One employs a relatively simple PI control law with a
feed-forward compensation function, and the other
employs a sliding mode fuel injection control law with
a Smith predictor (Yoon, Park, Lee, & Sunwoo, 2001).
4.1. Off-line simulation model
The off-line simulation model mainly consists of anengine model and a controller, as shown in Fig. 7. In this
stage, all SIMULINKs library blocks can be used free
of implementation problems, and a variable-time step
ordinary differential equation solver can be also used for
simulation speed and accuracy. However, it is difficult to
model event-based or crank angle-based controller
behaviors because SIMULINKs basically provides a
time-based simulation method. To model event-based
behavior in a time-based simulation environment,
special simulation mechanisms must be designed, but
this may cause significant overhead in designing and
simulating the model. Therefore, the event-based
behaviors are generally simplified in an off-line simula-
tion phase by minimizing a sampling period to an
affordable value. To increase the accuracy of the
simulation, multi-rate simulation methods are adopted.
Mean value engine models are widely used in
developing model-based engine controllers. Addition-
ally, these engine models are generally appropriate for
the HILS platform. The nonlinear dynamic engine
model, which was introduced in the previous study
(Yoon & Sunwoo, 2001), is used for designing a fuel-
injection controller and HILS.
ARTICLE IN PRESS
Fig. 7. Off-line simulation model using SIMULINKs.
W. Lee et al. / Control Engineering Practice 12 (2004) 977986982
7/27/2019 Towards a Seamless Development Process for Automotive Engine Control System
7/10
The controllers are expressed in relatively complicated
differential and algebraic equations. Some equations are
related with engine models, and they are already
expressed in block diagram representation of the engine
model. These are imported from the previous engine
model blocks and other equations are expressed in
combination of SIMULINKs
blocks and user-definedS-functions.
4.2. Engine model and HILS platform
As shown in Fig. 8, the engine model should be
supplemented with analog I/O and timing I/O signal
modules to interface actual signals in real-time. Engine
I/O signals can be categorized into two groups. One
group is composed of analog signals, and the other is
composed of digital signals, including timing signals.
Synchronization of timing I/O signals, such as crank
shaft signal, cam shaft signal, and spark and injectionsignals, with the engine event make the interface more
difficult. Sometimes, these interfaces are achieved
through sophisticated I/O boards with dedicated pro-
cessors. With the help of the powerful computing power
of a PC and efficient kernel of xPC targets, these
synchronized timing I/O signals are interfaced through
the digital I/O and the timing I/O subsystems.
4.3. Control algorithm and RCP platform
Since the engine model can be easily modified for the
HILS platform, the controller can also be altered into an
RCP form with the developed engine-control toolbox
(see Fig. 9).
The major changes are substitution of I/O blocks forthe I/O signals in the off-line simulation. Each I/O block
calls appropriate functions, which are already designed
and implemented in the lower layer. Some blocks and
modules should be replaced with more simple ones
because the generated code should be compact for an
embedded microcontroller and it should be executed in a
timely manner for real-time control. In this case, the
controller is configured to generate a stroke-based event
trigger signal in every engine stroke, to execute the
control algorithm at the same rate.
4.4. Closed-loop experiments
An off-line simulation model is tested under the
proposed development platform (see Fig. 10). The
engine model is executed on the xPC target desktop
PC, and the engine-control algorithm is run on the
target processor. As described previously, all I/O signals
are connected at the logic level.
ARTICLE IN PRESS
Fig. 8. Engine HILS model.
W. Lee et al. / Control Engineering Practice 12 (2004) 977986 983
7/27/2019 Towards a Seamless Development Process for Automotive Engine Control System
8/10
The results of the off-line simulation and a virtual
experiment using the proposed platform are depicted
and compared in Figs. 11 and 12. In Fig. 11, the PI AFR
control algorithm is tested in the time-based manner,
and the synchronization of the engine is achieved by a
60-2 type crankshaft sensor. On the other hand, in Fig.
12, the sliding mode AFR control law is executed in the
event-based manner, and it is assumed that a 36-1 type
crankshaft sensor is mounted on the engine.
For performance evaluation of the proposed con-
troller, the throttle angle is changed as shown in Figs.
11(a) and 12(a), to simulate a fast tip-in and tip-out
situation that allows the engine to be operated abruptly
between 2000 and 4000 rpm. In addition, the engine
is assumed to be operated under a constant load
condition. The AFR sensor is assumed to have a
measurement delay of two engine cycles because of the
event-based nature of the engine, and it is assumed to
have band-limited white noise.
Figs. 11(c) and 12(c) represent the off-line simulation
results of the models. The off-line simulation model is
also tested under the proposed development platform
and the results are shown in Fig. 11(d) and 12(d).
Compared with the off-line simulation, the performance
of the experiment using the development platform shows
some degradation. A non-zero execution time of the
plant model and the control algorithm, measurement
noise, quantization, and other factors in the experiment
cause this degradation. The different execution period of
the control task also degrades the control performance.
These problems, which may occur in the target
implementation stage and the validation stage, can be
efficiently handled with the help of this virtual develop-
ment environment.
ARTICLE IN PRESS
Fig. 9. Engine controller (using an engine-control toolbox).
Fig. 10. Photograph of the proposed development platform.
W. Lee et al. / Control Engineering Practice 12 (2004) 977986984
7/27/2019 Towards a Seamless Development Process for Automotive Engine Control System
9/10
5. Conclusions
A new development platform for automotive engine-
control systems is introduced.
MATLABs/SIMULINKs/REAL-TIME WORK-
SHOPs tool chain is used as a base environment for
implementation and evaluation of the engine controller
as well as the development of the control algorithm.
This platform provides a target-identical RCP platform
and PC-based HILS environment. With the help of a
customized target package and the advent of powerful
microcontollers, the RCP system is organized very
similarly to the real production ECU. This feature
alleviates many implementation problems, which may
occur between the RCP system and the production
system. The control system is easily investigated and
validated using the PC-based HILS system. This system
uses xPC targets with commercially available off-the-
shelf I/O boards and logic-level signals for connection
with the controller. This platform-based development
process enables the developers to design control laws, to
generate executable codes, and to evaluate the control
system in a unified manner.
In order to prove the feasibilities of the proposed
environment, a pilot project for the development of an
air-to-fuel control system is performed, and the simula-
tion results are presented. The simulation results show
that the proposed development process and the virtual
experiment environment can efficiently handle various
ECU design problems caused by transitions among
separate development steps. The proposed environment
can be a basis for the model-based approach in engine-
control application.
References
Browne, A. R., Bass, J. M., Croll, P. R., & Fleming, P. J. (1994). A
prototype framework of design tools for computer-aided control
engineering. IEEE/IFAC joint symposium on computer-aided control
system design, Tucson, AZ (pp. 369374).
Butts, K. R. (1996). An application of integrated CASE/CACSD
to automotive powertrain systems. Proceedings of the 1996
ARTICLE IN PRESS
Fig. 11. Comparison of the off-line simulation and the experiment
using development platform (PI control system, 60-2 type crank signal,
time-based execution).
Fig. 12. Comparison of the off-line simulation and the experiment
using development platform (sliding mode control system, 36-1 typecrank signal, event-based execution).
W. Lee et al. / Control Engineering Practice 12 (2004) 977986 985
7/27/2019 Towards a Seamless Development Process for Automotive Engine Control System
10/10
IEEE international symposium on CACSD (pp. 339345),
Dearborn, MI.
Hajji, M. S., Bass, J. M., Browne, A. R., Schroder, P., Croll, P. R., &
Fleming, P. J. (1996). The development framework: Work in
progress towards a real-time control system design environment.
IEE Colloquium on Advances in Computer-Aided Control System
Design, London, UK (pp. 4/14/3).
Hanselmann, H. (1998). Development speed-up for electronic controlsystems. Convergence 98, Dearborn, USA.
Howold, C., & Jupfer, R. (2000). Integration of new methods and tools
for automotive control unit developmenta project management
task. SAE2000-01-0392.
Isermann, R. (1996). On the design and control of mechatronic
systemsa survey. IEEE Transactions on Industrial Electronics,
43(1), 415.
Kimura, A., & Maeda, I. (1996). Development of engine control system
using real time simulator. Proceedings of the 1996 IEEE Interna-
tional Symposium on CACSD, Michigan, USA (pp. 157163).
Lee, W., Shin, M., & Sunwoo, M. (under submission). Target-identical
rapid control prototyping platform for model-based engine
control. Proceedings of the Institution of Mechanical Engineers,
Part D. Journal of Automobile Engineering.
Lee, W., Yoon, M., & Sunwoo, M. (2003). A cost- and time-effectivehardware-in-the-loop simulation platform for automotive engine
control systems. Proceedings of the Institution of Mechanical
Engineers, Part D. Journal of Automobile Engineering, 217, 4152.
Leharth, U., Baum, U., Beck, T., Werther, K., & Zurawka, T. (1998).
An integrated approach to rapid product development for
embedded automotive control systems. Control Engineering Prac-
tice, 6, 529540.
Sivashankar, N., & Butts, K. (1999). A modeling environment for
production powertrain controller development. Proceedings of the1999 IEEE international symposium on CACSD (pp. 563568),
Hawaii, USA.
Smith, M.H. (1999). Towards a more efficient approach to automotive
embedded control system development. Proceedings of the 1999
IEEE international symposium on CACSD (pp. 219224), Hawaii,
USA.
Toeppe, S., Bostic, D., Ranville, S., & Rzemien, K. (1999). Automatic
code generation requirements for production automotive power-
train applications. Proceedings of the 1999 IEEE International
Symposium on CACSD (pp. 200206), Hawaii, USA.
Yoon, P., Park, S., Lee, W., & Sunwoo, M. (2001). Robust nonlinear
control of air-to-fuel ratio in spark ignition engines. KSME
International Journal, 15(6), 699708.
Yoon, P., & Sunwoo, M. (2001). A nonlinear dynamic modeling of SI
engines for controller design. International Journal of VehicleDesign, 26(2/3), 277297.
ARTICLE IN PRESS
W. Lee et al. / Control Engineering Practice 12 (2004) 977986986
Top Related