You are on page 1of 4

INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 9, ISSUE 06, JUNE 2020 ISSN 2277-8616

A Study On Automotive Embedded Software


Testing
Arunya Nivedha K V, Dr.X. Anitha Mary

Abstract: The rapid increase of technology and advancements in automobiles has introduced software in the automotive industry. Nowadays,
embedded systems and software have become a backbone and created a revolution in the automotive industries. Thus every component in a car
depends on software for its functioning. Engine Control Unit (ECU) is the heart of an automobile, the development of software to control the ECU plays a
major role. The development of ECU includes both hardware and software development. To attain a greater level of confidence during the development
of software, software testing is necessary. Nowadays testing of software became a crucial task because with multiple lines of code the complexity of
software has escalated. This paper reviews how the auto industries prepare and test their software before delivering to the c ustomers. There are many
software testing methods in different stages of the software development process. The paper focuses mainly on the different strategies adopted in
Hardware in the Loop (HIL) and Software in loop (SIL), also their benefits and limitations are discussed.

Index Terms: Software development, Automotive Software testing, ECU, Hardware in loop, Software in loop
——————————  ——————————

1. INTRODUCTION corresponding to it i.e. every next stage starts only after


The engine control unit (ECU) is a microcontroller which was completion of the previous stage. The OEMs will specify the
discovered in the year 1980 it is also called Powertrain control requirements, and they are responsible for the system design.
module that controls a series of actuators on an internal They perform the integration and acceptance test after getting
combustion engine to ensure optimal engine performance. At their software delivered from the suppliers. This is then
the time, the software complexities were less and testing was followed by the supplier; they develop the actual code to be
mainly performed in the car. Then nobody has thought that run on ECU. They test the software code manually or the test
software dependency will grow and become critical in the is automated by writing and executing the test case. Even
automotive industry. Software plays a major role in terms of though the code is tested at the supplier level the final
customer satisfaction, particularly in safety and comfort. So integration, system, and acceptance testing are done by
the auto industry started adding various embedded software- OEMs to ensure that the given implementation of software
controlled components in automobiles to enhance safety, meets its intended function and goals.
security, and performance, etc. This has resulted in more
software complexity hence, testing can no longer be done in a
car. The demand for the use of automotive software has been
increased gradually. Modern-day luxurious motor vehicles like
BMW, Audi motors have one hundred fifty Automotive ECUs
to manipulate and alter the functions of the car. Thus, software
establishes as a key technology in the automotive industry. In
early days real vehicles or prototypes have been used for
testing the software components. But before that, the software
to be deployed must be ECU executable so it is necessary to
ensure the reliability of the software as the failure in software
could lead to accidents. The prototypes were not available in
the early phase of software development because of its high
complexity to build them send they are high of cost. Due to Figure 1: V model
these limitations Hardware in Loop test benches was used. By
using this setup we can do a major part of testing and According to Kisoon Sung, et al. AUTOSAR is the standard
calibration in the lab before going to the real car for final architecture followed by the automobile industry for developing
validation. However, a real ECU and expensive complex test the automotive embedded software. It includes Application
benches are still required, but their availability is limited. To software (ASW) and Basic Software (BSW). ASW handles
test software components in early-stage Software in the loop, software for sensor evaluation and actuator control functions
testing is adopted. The following sections of this paper, whereas BSW is an abstraction layer between the ASW and
discuss the different stages in the software development the target hardware and it provides the various services
process, the importance of testing, the conventional Hardware necessary for the function of ASW i.e. it contains the operating
in loop testing methodology, and the need for Software in loop system, communication, memory, device drivers, and so on.
testing. The initial stage for developing automotive software is the
system configuration, which comprises of software component
modeling and establishing a network connection between the
2 SOFTWARE DEVELOPMENT PROCESS various software components. These models are documented
Generally, the development of software in the automotive in an ARXML file format which is called the System
sector follows the ‘V’ model, which is shown in fig1 below. Description file. Now the developer will implement the
Each stage in the model executes in sequentially. For every behavior of the software component by making source code
development stage, there is a parallel testing stage from the system description. All the developed source codes
1057
IJSTR©2020
www.ijstr.org
INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 9, ISSUE 06, JUNE 2020 ISSN 2277-8616

for ASW and the service BSW are integrated as single Figure 3: Open loop test
software and converted into ECU executable format so that it
can be deployed in the actual vehicle.

3 SOFTWARE TESTING
Rakesh Rana et al. mentions that the software must be tested
before delivering it to the customer. But testing the software is
a costly and drastic procedure that will account for up to 50%
of total software development costs. Although it is a costly
procedure it will check for any defects and fault in the software
that will ensure the reliability of the software product, which in
turn makes sure of the proper functioning of the system. Thus
it is necessary for the automotive industry to invest money in
testing or to adapt a better testing strategy with high software
development costs that will ensure a better quality of the
product. Fig2 shows the hierarchy of software testing for ECU.
Figure 4: Closed loop test

The different stages of testing according to the ‘V’ model are


unit testing, integration testing and System testing. The
purpose of the software Unit & Component Verification is to
verify software components to provide for compliance of the
software components with the detailed software design and
with the non-functional software requirements. The objective
of the test is to confirm the correct functionality of the isolated
software functional component. In general, it is performed in a
PC based test environment. Unit testing only tests the
correctness/functionality of individual software components.
Therefore it will not catch integration errors or border system-
Figure 2: Hierarchy of testing level errors. The purpose of the software Integration and
software Integration Test is to integrate the software elements
and to verify the integrated software against software
According to Syed Nabi et al. with their experience, they have
found that HIL has several advantages in testing and architectural design including interfaces. The objective of the
System Functionality Test is to verify the correct
validating the software product. In the design phase, testing is
implementation of the functional requirements of a System
classified into two types. The first kind, called the Open Loop
Functionality (SF). A SF may consist of N no: of software
Test (OLT) (fig3), here the simulation of the physical plant is
components and additionally by some hardware.
not included hence it is a low-level test that will check only for
the I/O functionalities and dynamic behavior of the system
cannot be tested. But by manually providing preset data 4 HARDWARE IN LOOP TESTING
values of the sensor to the ECU, their I/O level performance As the name suggests Hardware-in-the-loop (HIL) testing is a
can be monitored. The second kind called the Closed-Loop Hardware dependent testing methodology that is currently in
Test (CLT) (fig4), requires a complete plant model with practice in most of the automobile industry. It is used to
appropriate feedback response for the system. In a CLT validate the developed embedded software in a lab setup by
environment, the actual ECU data or signals are used to run simulating the real-time scenarios and adding real hardware
the actuator plant model and it is used to compute the (ECU) in the loop instead of actual vehicles. Susanne Kohl et
dynamic behavior of plant, sensor, and the device under test. al. explains HIL that, it is a technology that replaces the real
In the Closed-loop environment, the controller feedback loop is vehicle components by a real-time computer simulation based
preserved, and thus a complete system verification and on a mathematical model. The simulation is used to test a
validation is possible in this environment. CLT is apt for component, such as an electronic control unit (ECU), which
performing system-level testing and verification. instead of being connected to the real equipment under control
is actually connected to the simulation. The accuracy of the
simulation and its electrical interfacing to the ECU must be
such that the ECU 'thinks' it is controlling the real system. The
developer develops the software code for the ECU called the
project software that contains source files (.c), header files
(.h), and configuration files (.xml, .arxml), etc. The generator
will convert these files into unified .c and .h file format which is
then compiled and linked for ECU target to generate the
executable files i.e. a2l and hex files for the target hardware
ECU, this software preparation process is shown in fig5.

1058
IJSTR©2020
www.ijstr.org
INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 9, ISSUE 06, JUNE 2020 ISSN 2277-8616

Figure 7: Block Diagram of SIL test setup


Figure 5: Software preparation for HIL According to Stephanie Demers et al, the HIL testing is
hardware dependent and the cost for this lab equipment is
W lee et al. describes that only real component of the HIL test very high of a cost and their availability is also limited. By
setup is ECU, the remaining components are the Host PC adopting the SIL solution the testing can be done at low of a
where the calibration is modified and the behavior of software cost as there is no hardware dependency and the test results
is monitored by the INCA software tool and the LABCAR it can be obtained quickly which in turn minimizes software
consists of target real-time PC. development coding effort. Lumpp,B et al. states that SIL
technology will improve the efficiency of the software
development and calibration process. He used software-in-
the-loop (SIL) testing since it will replace the dependency on
real hardware and real-time with a virtual test bench. The
software for the PC target was prepared, flashed, and
executed in PC executable software modules which are similar
Figure 6: Block diagram of HIL test setup to the actual target software components. It was observed that
the result obtained from the virtual Test bench was similar to
The testing of ECUs is performed in a lab environment, the the actual HIL result. In addition to that, the quality of result
test components are connected in a closed-loop as shown obtained will rely on the quality of the plant model used.
fig6. The prepared ECU software file is uploaded in INCA Sooyong Jeong et al. has implemented SIL by simulating the
software to flash it in the ECU hardware. The ECU is Virtual Function Bus (VFB) layer of AUTOSAR in a PC so that
connected to the ETAS LABCAR which is a real-time simulator the software components will communicate via this VFB. They
that gives feedback input to the ECU. LABCAR is connected have used this technique in the Automatic Emergency Braking
to Experiment Window, which forms the control panel of the System to validate their functionality in the early stage and
HIL. INCA is a calibration, measurement software tool, where found it to be efficient only for early-stage but not feasible in
the ECU responses are monitored and the variables are some extreme situationsMarius Muresan et al. says about the
calibrated. Lukas Heidrich et al. proposed a new HIL test rig reliability of using SIL for testing the embedded software. They
platform which is illustrated through a case study of braking implemented the SIL environment in a MATLAB/Simulink
and steering system. The vehicle components and platform by simulating the embedded system model and
subsystems have their software realization in software connecting them to the Simulink model of the plant to provide
platform and the hardware subsystem can interact with them. the feedback mechanism to perform closed-loop testing. The
They carried the software testing by implementing HIL in a result obtained in SIL was compared with HIL and found it to
single platform and the vehicle subsystems are emulated and be reliable for embedded code. Though it is reliable the
connected to it. simulation time will not match the real-time performance which
is a limitation of this implantation.
5 SOFTWARE IN LOOP TESTING
Software in the Loop (SIL) systems are test setups in which 6 CONCLUSION
ECU software is run and tested in a pure virtual PC or IT The paper discussed the trends and advancements in the
environment, without any target ECU hardware or physical automotive testing, especially the HIL and SIL testing. Using
components. The software for SIL can be compiled for PC HIL testing completely relies on hardware which is of high cost
target i.e. Virtual ECU (vECU). This can be achieved by and complex to setup. The main thing to consider is its
making some modifications in the software so that it can run availability is also limited i.e. the testers can avail the setup by
on the PC, instead of the target hardware ECU. The software booking their slot on a time basis which will cause a delay in
can be connected to a virtual plant model substituting for delivering the product. But SIL overcomes these constraints as
costlier prototypes or test benches. For a closed-loop setup, it is low of cost and available for everyone as they can execute
the plant model connected will provide feedback input to the their test on their own PC, parallel and continuous execution
vECU. The performance can be monitored and the calibrations can also be done. Meanwhile, we cannot blindly depend on
can be done by connecting a measurement and calibration the SIL solution because it is useful for early-stage validation
tool like INCA which is again a software tool. Thus test setup of software which reduces only the testing complexity but
for SIL can be completely implanted on a PC which is shown testing is not complete without HIL. Thus, before delivering the
in fig7. software to the customer HIL is mandatory because it will
provide real-time test response which is more reliable than
SIL. To conclude, both testing methods are necessary and
1059
IJSTR©2020
www.ijstr.org
INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 9, ISSUE 06, JUNE 2020 ISSN 2277-8616

they have their own pros and cons, SIL validation is SICE International Joint Conference, 2009.
recommended only during the early stage validation of [15] C.Nebut, F. Fleurey, Y.Le Traon,J.M Jezequel,”Automatic
software but HIL is done before the final delivery of software Test Generation: A Use Case Driven Approach” IEEE
products. Transaction on Software Engineering, vol 32,pp.140-
155,2006.
REFERENCES [16] Peter Liggesmeyer, Mario Trapp, “Trends in Embedded
Software Engineering” IEEE Software, vol 26, May-June
[1] Sooyong Jeong, Yongsub Kwak, Woo Jin Lee, “Software-
2009.
in-the-Loop Simulation for Early-Stage Testing of
[17] R. N. Charette, "This Car Runs on Code" in IEEE
AUTOSAR Software Component”, Eighth International
Spectrum, vol. 46,no.3, 2009.
Conference on Ubiquitous and Future Networks (ICUFN),
[18] Per Erik Strandberg ; Eduard Paul Enoiu ; Wasif
978-1-4673-9991-3/16, 2016.
Afzal ; Daniel Sundmark ; Robert Feldt, “Information Flow
[2] Susanne Köhl and Dirk Jegminat, “How to do Hardware-
in Software Testing – An Interview Study With
in-the-loop Simulation right”, SAE Technical Paper 2005-
Embedded Software Engineering Practitioners” IEEE
01-1657.
Journal, vol 7, 2019.
[3] Kisoon Sung and Taeman Han,”Development Process for
[19] FeiDeng, Feng Gao,“Design of High Confidence
AUTOSAR based Embedded System”, International
Embedded Software Hardware-in-Loop Simulation Test
Journal of Control and Automation Vol.6, No.4, 2013.
Platform Based on Hierarchical Model” 2018 IEEE
[4] W Lee, M Yoon and M Sunwoo, “A cost- and time-
International Conference on Software Testing, Verification
effective hardware-in-the-loop simulation platform for
and Validation Workshops (ICSTW).
automotive engine control systems”, Proceedings of the
Institution of Mechanical Engineers, Part D: Journal of
Automobile Engineering 2003, vol.217: 41.
[5] Lumpp, B., Tanimou, M., McMackin, M., Bouillon, E. et al.,
"Desktop Simulation and Calibration of Diesel Engine
ECU Software using Software-in-the-Loop Methodology"
SAE Technical Paper 2014-01-0189.
[6] O. PHILipp, M. Buhl, S. Diehl, M. Huber, S. Roehlich and
J. Thalhauser, “Engine ECU Function Development Using
Software-in-the-Loop Methodology”, SAE Technical Paper
2005-01-0049.
[7] Antonio Tierno,Max M. Santos,Benedito A. Arruda.Joao
N. H. da Rosa, “Open Issues for the Automotive Software
Testing”,12th IEEE International Conference on Industry
Applications (INDUSCON), 2016.
[8] Deepa Ramaswamy, Ryan McGee, Shiva Sivashankar,
Amit Deshpande,” A Case Study in Hardware-In-the-Loop
Testing: Development of an ECU for a Hybrid Electric
Vehicle”, SAE Technical Paper 2004-01-0303.
[9] Syed Nabi, Mahesh Balike, Jace Allen and Kevin
Rzemien, “An Overview of Hardware-In-the-Loop Testing
Systems at Visteon”, SAE Technical Paper 2004-01-1240.
[10] Marius Muresan, Dan Pitica, “Software in the Loop
Environment Reliability for Testing Embedded Code”, 18th
IEEE International Symposium for Design and Technology
in Electronic Packaging (SIITME),2012.
[11] Jonathan Nibert, Marc E. Herniter, Zachariah Chambers,
“Model-Based System Design for MIL, SIL, and HIL”,
World Electric Vehicle Journal Vol. 5 - ISSN 2032-
6653,2012.
[12] Gabriele Vandi,Nicolò CavinaEnrico, CortiGiorgio,
ManciniDavide, MoroFabrizio, PontiVittorio, Ravaglioli,
“Development of a Software in the Loop Environment for
Automotive Powertrain Systems”, Science Direct, Energy
Procedia Journal ,vol.45,pp.789-798,2014.
[13] Lukas Heidrich,Barys Shyrokau,Dzmitry Savitski,Valentin
Ivanov,Klaus Augsburg,Danwei Wang,”Hardware-in-the-
loop test rig for integrated vehicle control systems”,
ScienceDirect, IFAC Proceedings, vol.46, pp.683-688
,2013.
[14] Gwangmin Park, Daehyun Kum , Seonghun Lee, Woong-
Jae Won, Wooyoung Jung, “Test methods of the
AUTOSAR application software components”, ICROS-
1060
IJSTR©2020
www.ijstr.org

You might also like