scispace - formally typeset
Open AccessJournal ArticleDOI

OS-Aware Automotive Controller Design Using Non-Uniform Sampling

Reads0
Chats0
TLDR
This article proposes a controller that cyclically switches among the available periods, thereby leading to an average sampling period closer to the optimal one, and shows that a higher number of applications can be packed on a processor, which is of particular interest in the cost-sensitive automotive industry.
Abstract
Automotive functionalities typically consist of a large set of periodic/cyclic tasks scheduled under a real-time operating system (OS). Many of the tasks are feedback control applications with stringent performance requirements. OSEK/VDX is a common class of automotive OS that offers preemptive periodic schedules supporting a pre-configured set of periods. The feedback controllers implemented onto such OSEK/VDX-compliant systems need to use one of the pre-configured (sampling) periods. A shorter period is often desired for a higher control performance, and this implies a higher processor load. For a given performance requirement, the longest sampling period that meets this requirement is the optimal one. Given a limited set of pre-configured periods, such optimal sampling periods are often not available, and the practice is to choose a shorter available period—leading to a higher processor load. To address this, we propose a controller that cyclically switches among the available periods, thereby leading to an average sampling period closer to the optimal one. This way, we reduce the processor load and are able to pack more control applications on the same processor. The main challenge in this article is the design of such controllers that takes into account such cyclic switching of sampling periods (i.e., use non-uniform sampling). The controller needs to meet specified performance requirements (settling time) and system constraints (e.g., input saturation). Such a non-convex constrained controller optimization problem as raised in the OS-aware automotive systems design has not been addressed in the traditional optimal control literature. A novel approach based on adaptively parameterized particle swarm optimization (PSO) is proposed to solve it. Using the OS-aware controller design with non-uniform sampling, we show that a higher number of applications can be packed on a processor, which is of particular interest in the cost-sensitive automotive industry.

read more

Content maybe subject to copyright    Report

This is a repository copy of OS-aware automotive controller design using non-uniform
sampling.
White Rose Research Online URL for this paper:
https://eprints.whiterose.ac.uk/144212/
Version: Published Version
Article:
Chang, Wanli orcid.org/0000-0002-4053-8898, Goswami, Dip, Chakraborty, Samarjit et al.
(1 more author) (2018) OS-aware automotive controller design using non-uniform
sampling. ACM Transactions on Cyber-Physical Systems. 26. ISSN 2378-9638
https://doi.org/10.1145/3121427
eprints@whiterose.ac.uk
https://eprints.whiterose.ac.uk/
Reuse
Items deposited in White Rose Research Online are protected by copyright, with all rights reserved unless
indicated otherwise. They may be downloaded and/or printed for private study, or other acts as permitted by
national copyright laws. The publisher or other rights holders may allow further reproduction and re-use of
the full text version. This is indicated by the licence information on the White Rose Research Online record
for the item.
Takedown
If you consider content in White Rose Research Online to be in breach of UK law, please notify us by
emailing eprints@whiterose.ac.uk including the URL of the record and the reason for the withdrawal request.

26
OS-Aware Automotive Controller Design Using
Non-Uniform Sampling
WANLI CHANG, Singapore Institute of Technology
DIP GOSWAMI, Eindhoven University of Technology
SAMARJIT CHAKRABORTY, Technical University of Munich
ARNE HAMANN, Robert Bosch GmbH
Automotive functionalities typically consist of a large set of periodic/cyclic tasks scheduled under a real-
time operating system (OS). Many of the tasks are feedback control applications with stringent performance
requirements. OSEK/VDX is a common class of automotive OS that oers preemptive periodic schedules
supporting a pre-congured set of periods. The feedback controllers implemented onto such OSEK/VDX-
compliant systems need to use one of the pre-congured (sampling) periods. A shorter period is often de-
sired for a higher control performance, and this implies a higher processor load. For a given performance
requirement, the longest sampling period that meets this requirement is the optimal one. Given a limited set
of pre-congured periods, such optimal sampling p eriods are often not available, and the practice is to cho ose
a shorter available period—leading to a higher processor load. To address this, we propose a controller that
cyclically switches among the available perio ds, thereby leading to an average sampling period closer to the
optimal one. This way, we reduce the processor load and are able to pack more control applications on the
same processor. The main challenge in this article is the design of such controllers that takes into account such
cyclic switching of sampling p eriods (i.e., use non-uniform sampling). The controller needs to meet specied
performance requirements (settling time) and system constraints (e.g., input saturation). Such a non-convex
constrained controller optimization problem as raised in the OS-aware automotive systems design has not
been addressed in the traditional optimal control literature. A novel approach based on adaptively parame-
terized particle swarm optimization (PSO) is proposed to solve it. Using the OS-aware controller design with
non-uniform sampling, we show that a higher number of applications can be packed on a processor, which
is of particular interest in the cost-sensitive automotive industr y.
CCS Concepts: Computer systems organization Embedded and cyber-physical systems; Real-
time operating systems;
Additional Key Words and Phrases: OSEK/VDX, non-uniform sampling, computation resources, optimal
control
ACM Reference format:
Wanli Chang, Dip Goswami, Samarjit Chakraborty, and Arne Hamann. 2018. OS-Aware Automotive Contro-
ller Design Using Non-Uniform Sampling. ACM Trans. Cyber-Phys. Syst. 2, 4, Article 26 (July 2018), 22 pages.
https://doi.org/10.1145/3121427
This work is partially supported by the Singap ore National Research Foundation under its Campus for Research Excellence
And Technological Enterprise (CREATE) program.
Authors’ addresses: W. Chang, Singapore Institute of Technology, 10 Dover Drive, Singapore 138683; email: wanli.chang@
singaporetech.edu.sg; D. Goswami, Eindhoven University of Te chnology, P.O. Box 513, 5600 MB Eindhoven, The Nether-
lands; email: d.goswami@tue.nl; S. Chakraborty, Technical University of Munich, Arcisstrasse 21, D-80290, Munich, Ger-
many; email: samarjit@tum.de; A. Hamann, Robert Bosch GmbH, Renninger, 70465 Stuttgart, Germany; email: arne.
hamann@de.bosch.com.
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee
provided that copies are not made or distributed for prot or commercial advantage and that copies bear this notice and
the full citation on the rst page. Copyrights for components of this work owned by others than ACM must be honored.
Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires
prior specic permission and/or a fee. Request p ermissions from
permissions@acm.org.
© 2018 ACM 2378-962X/2018/07-ART26 $15.00
https://doi.org/10.1145/3121427
ACM Transactions on Cyber-Physical Systems, Vol. 2, No. 4, Article 26. Publication date: July 2018.

26:2 W. Chang et al.
1 INTRODUCTION
In the p ast decade, the complexity of automotive software and the number of applications and
software tasks have considerably increased. For instance, in engine management, the main drivers
are complex exhaust gas treatment systems like NOx storage catalyst converter (NSC) and selec-
tive catalytic reduction (SCR) and fuel eciency measures like staged injection and variable cam
timing (Jeong et al.
2011; Popovic et al. 2003). As a consequence, standard engine management
software nowadays contains dozens of tasks with around 1,500 runnables (Kramer et al. 2015). At
the same time, automotive systems are highly cost sensitive, and there is an increasing eort to in-
tegrate multiple tasks onto a single electronic control unit (ECU). In line with such developments,
in this article we study a commonly occurring setup—where multiple feedback control applica-
tions are to be implemented on a single ECU. The goal is to pack as many applications as possible
in an eort to reduce costs.
Tasks in automotive software systems are typically scheduled with preemptive policies and
cyclically repeated with a xed period on OSEK/VDX-compliant operating systems (OS)
1
(Feiler
2003; Consortium 2005; Apuzzo et al. 2016). For control applications, runnables containing the
functional code are assigned to tasks according to the continuous dynamics of the physical process
being controlled. For example, injection control in engine management has faster dynamics than
exhaust gas control and thus requires a shorter period.
A feedback control loop consists of three operations:
Measure: Sensors measure the states of the physical plants. This is also called sampling.
Compute: Taking the data from sensors, control programs are executed and compute the
control input.
Actuate: The control input is sent to actuators, aiming to achieve certain desired behavior
of the plants.
In this work, we assume that the measure and the actuate operations take negligible time compared
to the compute operation, and they are performed in a separate sensing/actuating unit under a
strict time-triggered policy. As shown in Figure 1, the time duration between two consecutive
measurements (or samplings) of the plant states is dened as the sampling period h.Thetime
duration between the measurement and the actuation of one feedback control loop is dened as
the sensor-to-actuator delay τ
sa
. The actual execution time of the control program is denoted as
E and the worst-case execution time (WCET) is E
wc
. The actuate operation is performed exactly
after E
wc
time from the measure operation while the compute operation is performed in between.
This setting leads to a constant sensor-to-actuator delay, i.e., τ
sa
= E
wc
.
Generally, a shorter sampling period allows the controller to respond to its plant more frequently
and is thus potentially able to achieve a better control performance with an appropriately designed
controller. The obvious downside is a higher processor load, since the control program is executed
more frequently. This prevents more functions and applications from being integrated onto the
ECU. Therefore, the controller should be designe d to use the largest possible sampling period (to
reduce ECU load) that is able to fulll the control performance requirement and satisfy the system
constraints. This is the optimal sampling period that should be ideally used.
1
Open Systems and Their Corresponding Interfaces for Automotive Ele ctronics (OSEK) is a joint project in the Ger-
man automotive industry founded in 1993 with initial partners of BMW, Bosch, DaimlerChrysler, Opel, Siemens, and
Volkswagen. It was later joined by the French car manufacturers PSA and Renault introducing their Vehicle Distributed
Executive (VDX) approach. The goal is to dene an industry standard for an open-ende d architecture for distributed control
units in vehicles.
ACM Transactions on Cyber-Physical Systems, Vol. 2, No. 4, Article 26. Publication date: July 2018.

OS-Aware Automotive Controller Design Using Non-Uniform Sampling 26:3
Fig. 1. The general timing model of a control loop.
Fig. 2. Allowed switching instants among multiple sampling periods.
Fig. 3. Packing of control applications onto the ECU.
However, an OSEK/VDX OS is usually pre-congured to support a small set of predened sam-
pling periods.
2
Hence, often the optimal sampling period is not directly realizable on the ECU. The
conventional way to handle it is to use the largest sampling period from the pre-congured set of
sampling periods available in the OSEK/VDX OS that is shorter than the optimal one. It is clearly
a waste of scarce computation resources on board.
Main idea: In this work, we design controllers that switch between the available pre-congured
sampling periods oered by the OSEK/VDX OS, following a predened static schedule. A typical
example with sampling periods of 2, 5, and 10ms on OSEK/VDX OS is illustrated in Figure
2. For
one application, switching between two sampling periods can only o ccur at the common multiplier
of them. For instance, switching between 2 and 5ms is possible at the time instant of 10ms, 20ms,
and so on. Therefore, possible sequences of sampling periods are {2ms, 2ms, 2ms, 2ms, 2ms, 5ms,
5ms, repeat}, {5ms, 5ms, 10ms, repeat}, and so on.
Illustrative example: We now explain a simple case that multiple identical control applications
C need to be implemented on ECUs. Assuming that the control performance requirement of C
can be satised with a sampling period of 5ms, yet not with 10ms. If the WCET of C is 3ms, then
only one application can be implemented on the ECU as shown in Figure
3, since the sampling
2
Theoretically, more periods can be created. However, due to the large number of software runnables from many dierent
suppliers, this will create much overhead and is thus practically infeasible.
ACM Transactions on Cyber-Physical Systems, Vol. 2, No. 4, Article 26. Publication date: July 2018.

26:4 W. Chang et al.
period 5ms is not long enough to execute two applications, which require 6ms. If 10ms is used
as the sampling period, then three applications can be integrated into the ECU. However, this is
not feasible due to the violation of the control performance requirement. A non-uniform sampling
schedule {5ms, 5ms, 10ms, repeat} achieves an average sampling period of 6.67ms, which reduces
the processor load compared to the schedule with a constant sampling period of 5ms and enables
two applications to be packed onto the ECU. Detailed scheduling will be explained later in this
article. The question is how to design the controller for such a non-uniform sampling schedule to
satisfy the control performance requirement.
Contributions: The main technical challenge we address is designing a controller that uses a non-
uniform scheme, striving for optimizing control performance and respecting system constraints
simultaneously to pack more control applications on one processor. Given a non-uniform sampling
schedule, which could come up by checking the performance of uniform sampling schedules, our
proposed controller design approach optimizes the settling time—a common control performance
metric that is especially important for real-time applications and harder to analyze than quadratic
cost and explicitly respects the hard physical constraint on the input saturation. Such a constrained
non-convex optimization problem with signicant non-linearity has not been addressed in the
control theory literature and do es not lend itself to an analytical closed-form solution. Therefore,
one has to resort to heuristic optimization techniques. In this article, we address this problem
using an approach based on particle swarm optimization (PSO) with adaptive parameterization
for controller pole-placement. The proposed idea is evaluated on a real-life electro-mechanical
braking (EMB) system. The number of applications implemented on an ECU can be higher, which
makes the presented approach attractive for the cost-sensitive automotive domain.
Although the OS-related constraints are a major problem faced in the industry when designing
embedded control systems, currently there are no systematic solutions. This is the rst article
that provides a solution to handle OS-related characteristics directly in the control strategy. While
there have been works taking network characteristics or communication resources into account
when designing controllers (Hong et al.
2010, 2015;Chenetal.2014), in many embedded systems,
computation resources are often also scarce (due to the use of simple microcontrollers and cost
pressures). Our work goes in this direction and the techniques we provide result in computation-
resource-ecient controllers.
Organization: The rest of the article is organized as follows. Section
2 discusses the related work
on resource-aware embedded control systems design, optimal control and non-uniform sampling.
Section
3 describes the automotive system architecture under consideration, including feedback
control applications and the OSEK/VDX OS. The OS-aware controller design is presented in Sec-
tion
4. A novel PSO technique with adaptive parameterization is proposed in Section 5 to solve the
pole-placement problem. Section
6 introduces an alternative controller design with better scala-
bility. Experimental results on the EMB system are reported in Section
7, and Section 8 makes the
concluding remarks.
2 RELATED WORK
There have been a number of works on resource-aware embedded control systems design, most of
which consider the communication among networked systems (Anta and Tabuada
2009; Yue et al.
2013;Royetal.2016). The conventional paradigm in networked embedded control systems regards
the messages as periodic, which facilitates the analysis and implementation yet leads to conser-
vative usage of the communication bandwidth. An aperiodic strategy for dynamic allocation of
bandwidth according to the current state of the plants and available resources is proposed in Anta
and Tabuada (
2009). Control loops closed over Controller Area Network (CAN) are discussed and
ACM Transactions on Cyber-Physical Systems, Vol. 2, No. 4, Article 26. Publication date: July 2018.

Citations
More filters
Book ChapterDOI

Latency-aware placement of data stream analytics on edge computing

TL;DR: This work introduces strategies to create placement configurations for data stream processing applications whose operator topologies follow series parallel graphs and shows that they can improve the response time in up to 50% for application graphs comprising multiple forks and joins while transferring less data and better using the resources.
Proceedings ArticleDOI

Butterfly Attack: Adversarial Manipulation of Temporal Properties of Cyber-Physical Systems

TL;DR: This work introduces the butterfly attack, a new attack scenario against cyber-physical systems that carefully exploits the sensitivity of control applications with respect to the implementation on the underlying execution platforms.
Book ChapterDOI

Intelligent and Connected Cyber-Physical Systems: A Perspective from Connected Autonomous Vehicles

TL;DR: This chapter presents the technical background of CPS, with an emphasis on the cyber and physical interactions, corresponding to the new design methodology, aiming for assurance of safety and security, as well as high robustness and resource efficiency.
Proceedings ArticleDOI

Exploiting System Dynamics for Resource-Efficient Automotive CPS Design

TL;DR: By properly modeling the physical dynamics of the systems that an automotive control software interacts with, it is possible to better save resources while still guaranteeing safety properties and shows the significance of synergistically combining the cyber component and physical processes in the cyber-physical systems (CPS) design paradigm.
Book ChapterDOI

TorqueDB: Distributed querying of time-series data from edge-local storage

TL;DR: TorqueDB is proposed, a distributed query engine over time-series data that operates on edge and fog resources that performs comparable to InfluxDB on a cloud VM for a smart city query workload, but without the associated monetary costs.
References
More filters
Journal ArticleDOI

Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment

TL;DR: The problem of multiprogram scheduling on a single processor is studied from the viewpoint of the characteristics peculiar to the program functions that need guaranteed service and it is shown that an optimum fixed priority scheduler possesses an upper bound to processor utilization.
Book

Scheduling algorithms for multiprogramming in a hard real-time environment

TL;DR: In this paper, the problem of multiprogram scheduling on a single processor is studied from the viewpoint of the characteristics peculiar to the program functions that need guaranteed service, and it is shown that an optimum fixed priority scheduler possesses an upper bound to processor utilization which may be as low as 70 percent for large task sets.
Journal ArticleDOI

Model predictive control: theory and practice—a survey

TL;DR: The flexible constraint handling capabilities of MPC are shown to be a significant advantage in the context of the overall operating objectives of the process industries and the 1-, 2-, and ∞-norm formulations of the performance objective are discussed.
Journal ArticleDOI

Stability and Stabilizability of Switched Linear Systems: A Survey of Recent Results

TL;DR: This paper focuses on the stability analysis for switched linear systems under arbitrary switching, and highlights necessary and sufficient conditions for asymptotic stability.
Book

Feedback Systems: An Introduction for Scientists and Engineers

TL;DR: Feedback Systems develops transfer functions through the exponential response of a system, and is accessible across a range of disciplines that utilize feedback in physical, biological, information, and economic systems.
Related Papers (5)
Frequently Asked Questions (2)
Q1. What are the contributions mentioned in the paper "Os-aware automotive controller design using non-uniform sampling" ?

This is indicated by the licence information on the White Rose Research Online record for the item. 

A relevant question for the future works is the design of the optimal sampling schedule. While in this article the focus was on single-core ECUs, the authors intend to extend their approach to multi-core architectures.