360
W. Chang et al.
A program usually has different execution paths resulting in different execution
times. The worst-case execution time (WCET) is defined to be the maximum length
of time a program takes to be executed. There are two general methods to reduce
the WCET of a program – increasing the cache size and cache reuse. Many CPS
applications are cost-sensitive, which makes it desirable to minimize the cache size.
Therefore, the cache reuse should be maximized. When multiple applications share
the same memory resources, the cache reuse depends on the execution schedule. For
instance, a schedule that consecutively executes the same application increases the
cache reuse.
Computational resources usually mean the available execution time, for a given
processor with a certain operating frequency. When multiple applications share one
processor, in general, the performance of an application can be improved if it is
allowed to access the processor longer. Taking applications running periodic tasks
as an example, a shorter period usually results in better performance. The downside
is a higher processor utilization. On the condition that the performance requirement
can be satisfied, reduction on the processor utilization of an application is desirable,
as more applications can then be mapped to the processor, thereby saving the cost.
Due to the safety-critical nature of many CPS, time-triggered operating systems
(TT OS) often run on the processor. For instance, OSEK/VDX (Open Systems
and Their Corresponding Interfaces for Automotive Electronics/Vehicle Distributed
Executive)-compatible OS are widely used in the automotive domain. OSEK/VDX
OS only offer a limited set of predefined periods. In most cases, the optimal
period is not directly realizable on the OS. The conventional way to handle it
is to use the largest period offered by the OS that is smaller than the optimal
one. This is a straightforward method, yet leads to a waste of computational
resources. Sometimes, a mixture of periods may achieve a better trade-off between
the performance and the processor utilization.
In the rest of this chapter, we will describe the essential technical background on
CPS, organized into cyber components and physical components, emphasizing on
the interactions between them. Resource-oriented efforts taking safety into account
will be discussed to illustrate the new CPS design methodology, which could
incorporate robustness and security. Two case studies on connected autonomous
vehicles (CAVs) will be presented. One is on safety of machine learning (ML)-based
perception for highly automated driving. The other is on robustness and security of
connected vehicles.
7.2 Background
The technical background of CPS includes both the cyber and physical components,
as well as their interactions. For the cyber components, we will focus on the memory
architecture and analysis, real-time operating systems (RTOS), and scheduling.
It is noted that there is a dedicated chapter in this book on communication.
For the physical components, we will cover modelling of plant dynamics, safety
W. Chang et al.
A program usually has different execution paths resulting in different execution
times. The worst-case execution time (WCET) is defined to be the maximum length
of time a program takes to be executed. There are two general methods to reduce
the WCET of a program – increasing the cache size and cache reuse. Many CPS
applications are cost-sensitive, which makes it desirable to minimize the cache size.
Therefore, the cache reuse should be maximized. When multiple applications share
the same memory resources, the cache reuse depends on the execution schedule. For
instance, a schedule that consecutively executes the same application increases the
cache reuse.
Computational resources usually mean the available execution time, for a given
processor with a certain operating frequency. When multiple applications share one
processor, in general, the performance of an application can be improved if it is
allowed to access the processor longer. Taking applications running periodic tasks
as an example, a shorter period usually results in better performance. The downside
is a higher processor utilization. On the condition that the performance requirement
can be satisfied, reduction on the processor utilization of an application is desirable,
as more applications can then be mapped to the processor, thereby saving the cost.
Due to the safety-critical nature of many CPS, time-triggered operating systems
(TT OS) often run on the processor. For instance, OSEK/VDX (Open Systems
and Their Corresponding Interfaces for Automotive Electronics/Vehicle Distributed
Executive)-compatible OS are widely used in the automotive domain. OSEK/VDX
OS only offer a limited set of predefined periods. In most cases, the optimal
period is not directly realizable on the OS. The conventional way to handle it
is to use the largest period offered by the OS that is smaller than the optimal
one. This is a straightforward method, yet leads to a waste of computational
resources. Sometimes, a mixture of periods may achieve a better trade-off between
the performance and the processor utilization.
In the rest of this chapter, we will describe the essential technical background on
CPS, organized into cyber components and physical components, emphasizing on
the interactions between them. Resource-oriented efforts taking safety into account
will be discussed to illustrate the new CPS design methodology, which could
incorporate robustness and security. Two case studies on connected autonomous
vehicles (CAVs) will be presented. One is on safety of machine learning (ML)-based
perception for highly automated driving. The other is on robustness and security of
connected vehicles.
7.2 Background
The technical background of CPS includes both the cyber and physical components,
as well as their interactions. For the cyber components, we will focus on the memory
architecture and analysis, real-time operating systems (RTOS), and scheduling.
It is noted that there is a dedicated chapter in this book on communication.
For the physical components, we will cover modelling of plant dynamics, safety
