You are on page 1of 2

Embedded Systems in Automotives

Dwij Patel Arizona State University


Introduction to Electric and Tempe, AZ
Autonomous Vehicles dnpatel8@asu.edu

Abstract—Electronic components have shown a significant AUTmotive Open Systems Architecture (AUTOSAR) is
growth at an exponential rate in automobiles and with growth open and standardized automotive software architecture
of electronics, there is a strong need for software improvements which support standard interfaces between application
for the components to function efficiently. This research paper software and basic vehicular functions, and it helps in
mainly focuses on software for embedded systems, specifically establishing common ECU software architecture. In all
real-time operating system (RTOS). The paper depicts ideas modern vehicles the ECUs are configured using AUTOSAR.
from two state of the art research papers addressing adaptive
real-time operating systems and machine learning based task The application design in an automotive system is the
migration in automotive real-time embedded systems. The main priority in order to reduce the likelihood and effects of
growing complexity in automotive embedded systems has traffic collisions. These collisions increase the risk of safety
resulted in a transition from single core to multicore integrity; therefore, a particular safety level is assigned and
architectures. In automotives, such multicore architecture is various strategies of coordinating the cores are implemented.
represented by RTOS which coordinates the CPU cores and In the first paper, researchers assumed that ECUs adhere to
tasks according to different scheduling strategies. The first the AUTOSAR standard and leverage the multicore
paper proposes extension of RTOS with adaptive capabilities of real-time operating system described by this
functionalities. ECU consolidation is a process of minimizing
standard. They propose the enhancement of automotive
the amount of hardware devices used in a vehicle in order to
optimize testing, costs and resources. To implement this, one
safety by suggesting a modified version of the AUTOSAR
needs to work with the same number of tasks/processes shared operating system with adaptive capabilities. The adaptive
between a smaller number of ECUs. Hence the idea of task capabilities are then demonstrated by distribution and
migration comes in action to add redundancy to automotive reallocation of crucial tasks between cores in case of core
systems. The second paper provides an implementation of an malfunctioning.
architecture to test different machine learning techniques for
ECU consolidation addressed the problem of growing
scheduling and deploying tasks to ECU with migration between
electronic devices by executing tasks on a small number of
them. This implementation is also based on a real-time
operating system. powerful multi-purpose devices. But this type of system
presents difficulty in maximizing the efficiency of the system
Keywords—real-time operating systems (RTOS), adaptive ensuring that all the tasks get chance to execute, meeting
multicore systems, ECU consolidation, task migration their deadlines. The researchers have investigated dynamic
task migration and proposed this method for facilitating ECU
I. INTRODUCTION (HEADING 1) consolidation. The second research paper focusses on the
The automotive industry is one of the largest economies possibility of using machine learning techniques to assign
in the world producing around 70 million cars every year. A tasks to different devices based on their prediction on
survey in 2006 showed that the cost for embedded system in schedulability analysis.
a car account for 25% of total cost of the vehicle and around
II. ADAPTIVE REAL-TIME OPERATING SYSTEMS
35% for a luxury high end vehicle. Embedded systems in
automobiles have evolved rapidly and will grow even more Lockstep is inefficient, so authors make use of task
rapidly due to technological progress, high-end demands migration concept. There are 2 strategies for task migration:
from customer and government legislation for a sustainable recreation and replication from which the authors have made
future. The power electronics used in automotives have use of replication strategy. If task is assigned on native core,
shifted to gallium nitride (GaN) and silicon carbide (SiC) due then a copy of same task in allocated to let’s say
to the limits reached by silicon MOSFETs. Most of the target/migration core. As we have same tasks in two cores,
research is focused on battery and charging. As most the task will run normally in native core and be in suspended
automotives are shifting to electric drives, the demand for state in the target core. In case of malfunctioning of native
larger battery capacity and shorter charging time increases. core, we just need to move the task in target core to ready
For this purpose, there is a strong requirement efficient state. Due to this the context size is less and we can get over
software that works parallel with modern electronics that the overhead of recreation.
have high switching capabilities. There exists a shared memory between tasks on native
Recently, embedded software has been the fundamental core and target core. Whenever a core is not able to execute a
keystone to enable advanced functionality and features in task due to malfunction, the core tries to reset in order to
automobiles. Embedded software is not only used in modern recover. If the core crashes even after some resets, a flag is
on-road vehicles but also in construction, mining, and set in the shared memory. This flag generates an interrupt
agricultural vehicles. The society of Automotive Engineers demonstrating that migration is requested. The operating
(SAE) has defined 6 levels of automation, 0 being to system on target core gets this interrupt, thus the task to be
automation to 5 being full automation. The use of embedded migrated is suspended in native core and its replica is put to
systems increases with increase in automation levels. ready state in the target core. As the context of original task
Embedded systems in automotive is divided in in already saved in shared memory, there is no overhead for
Electronic/Engine Control Units (ECUs) distributed across context transfer and the replicated task can use this. Even
entire vehicle. when the native core is back to normal operation, the
execution will not be transferred back in case of multiple
failures in future. It is only after every ECU reset, that the
native core is back to ready state and the replicated task on has an obstacle. This task is used to check when the running
target core will be suspended by default. ECU faces problems to meet its deadline. Scheduling of
these tasks is done using the concept of utilization. As all the
The authors have provided two cases where this
tasks are periodic, the authors have considered two types of
migration condition can occur. First is when a hardware
scheduling policies for real-time systems: Rate Monotonic
monitor detects an interrupt if a core crashes unexpectedly.
(RM) and Earliest Deadline First (EDF). In rate monotonic
Second is when interrupt flag is set by the native core itself in
scheduling, tasks that have shorter periods are higher in
case of multiple software faults. In both the cases, the task
priority and therefore as the priorities are predefines, they are
cannot be executed in native core and therefore migration is
static. On the other hand, for EDF scheduling, priority is
required.
assigned to the task based on its earliest deadline occurrence
III. TASK MIGRATION, DEPLOYMENT AND EXECUTION hence it is dynamic. In this case, to achieve highest
utilization possible along with devices meeting their
One of the challenges task migration faces is that real- deadlines, the authors chose preemptive EDF scheduler. Due
time constraints must be met because some automotive tasks to the limitations of FreeRTOS to offer the suggested policy,
have hard deadlines. Missing of hard deadline results in fatal ESFREE library is used extending the basic scheduler to add
incidents. Therefore, checking the integrity of machine dynamic priority policies.
learning techniques on safety critical systems is necessary.
The authors have presented an architecture to simply IV. CONCLUSION
distribute a set of real-time tasks to set of ECUs which is
This paper discusses ideas from two state of the art
capable to adapt new task distributions in real time.
research papers on real-time embedded systems in
A. System and Test Setup automotives. In the first paper, we discussed a modification
The system used here is an ARM based System on Chip to the existing AUTOSAR standard to facilitate adaptive
(SoC) Xilinx MPSoC with two processors: ARM Cortex- migration of critical tasks across ECU cores to reduce latency
A53 with 4 cores, and an ARM Cortex-R5 with 2 cores. For in automotive embedded systems. In the second paper, we
this application only core 0 from A53 was used. This present the advantages of ECU consolidation with the aspect
hardware was used for all ECUs involved in the system. For of optimizing costs and resources. To attain ECU
the real-time operating system, FreeRTOS was used due to consolidation, we used machine learning based task
its extensive availability, support, and real-time capabilities migration in multicore ECU architectures. For future work,
of implementing priority based preemptive scheduling. To the concepts from both the paper can be further extended and
test the system, the test setup consists of a machine learning combined where we can used shared memory from paper one
based schedulability analysis algorithm and a task with the deployment tool from paper 2. The interrupt flag can
deployment tool. The algorithm predicts whether a task also be added in the EDF scheduling between multiple cores
distribution will be able to execute correctly, and the to reduce latency of task migration.
deployment tool generates task distributions, triggers REFERENCES
schedulability prediction and deploys best predicted task
[1] Octavio Delgadillo, Bernhard Blieninger, Juri Kuhn and Uwe
distribution. The devices in the system communicate with the Baumgartenand, An Architecture to Enable Machine-Learning-Based
deployment tool by using a task which receives a distributed Task Migration for Multi-Core Real-Time Systems, 2021 IEEE 14th
task set and responds with information on whether the task International Symposium on Embedded Multicore/Many-core
set was executed successfully or if any deadlines were Systems-on-Chip (MCSoC).
missed. If the current task distribution misses at least one [2] Maria-Geanina Unguritu and Teodor-Constantin Nichițelea, Adaptive
deadline, it is deemed as unschedulable. The deployment tool Real-Time Operating System in Automotive Multicore Embedded
Systems, 2021 25th International Conference on System Theory,
is responsible to detect failures on ECUs and generate new Control and Computing (ICSTCC).
task distributions. [3] S. Widlund, and A. Annenkov, “Migrating a single-core AUTOSAR
application to a multi-core platform: challenges, strategies and
B. Tasks recommendations,” Master’s thesis, 2017.
The authors have used two types of tasks in their [4] H. Wang, and C. Yao, “Task migration for energy conservation in
development: dummy tasks generated automatically to fill real-time multi-processor embedded systems,” 2011 International
the utilization of ECU; and a simulated autonomous task Conference on Cyber-Enabled Distributed Computing and Knowledge
which tests the system under a realistic use case. To keep it Discovery, Beijing, 2011.
simple, all the tasks in the system are periodic with their [5] Nicolas Navet and Francoise Simonot-Lion, Automotive Embedded
Systems Handbook.
deadlines relative to their periods. The dummy tasks are
[6] A. I. Orhean, F. Pop, and I. Raicu, “New scheduling approach using
generated using COBRA framework. This framework creates re- inforcement learning for heterogeneous distributed systems,” in
tasks with random execution time and period until a certain Journal of Parallel and Distributed Computing.
CPU utilization value is filled. The generated tasks have [7] Electric vehicle lithium-ion battery, Nissan Motor Corporation.
period in range from 100ms to 10s. The autonomous task is Accessed: May 17, 2022.
divided into two sub-tasks that shares a memory block. One [8] Adnan Shaout and Shanmukha Pattela, Model Based Approach for
task is responsible for communication to send and receive Automotive Embedded Systems, 2021 22nd International Arab
control or message signals, another task is responsible for Conference on Information Technology (ACIT).
simultaneous localization and mapping (SLAM) to explore [9] B. Steux and O. E. Hamzaoui, "tinySLAM: A SLAM algorithm in
less than 200 lines C-language program," in 2010 11th International
surroundings. The SLAM subtask estimates object position Conference on Control Automation Robotics Vision, 2010.
using a single LIDAR scan to check whether the mapping

You might also like