01 ERTS Introduction
01 ERTS Introduction
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
How many do we use?
⚫ Average middle-class American home has 40 to 50 embedded
processors in it
⚫ Microwave, washer, dryer, dishwasher, TV, VCR, stereo, hair dryer,
- Mike Schulte
Types of Embedded Systems
⚫ Single-functioned
▫ Executes a single program, repeatedly
• Tightly-constrained
▫ Low cost, low power, small, fast, etc.
Field Programmable Gate Arrays (FPGAs) are semiconductor devices that are based
around a matrix of configurable logic blocks (CLBs) connected via programmable
interconnects.
FPGAs can be reprogrammed to desired application or functionality requirements after
manufacturing.
This feature distinguishes FPGAs from Application Specific Integrated Circuits (ASICs),
which are custom manufactured for specific design tasks.
Field Programmable Gate Array
~100 KB
The Arduino Development Board
USB
PWR IN
(to Computer)
POWER
5V / 3.3V / GND
Digital I\O
PWM(3, 5, 6, 9, 10, 11)
Analog
INPUTS
Microcontrollers dominates processor market
General-Purpose Computer
Large Embedded Systems
• Embedded doesn’t mean small
24
Service robotics
25
Service robotics
26
Agricultural Robots
Space Robotics
Autonomous vehicles
Correctness of Embedded Systems
Correctness
Response Time and Deadline
Real Time Systems
Segway
Controller design and implementation
What is special in ERTS
Real-Time Embedded control
▪ The responsiveness of the system (Car) can be measured by its rise time R.
▪ R is the time it takes to get close to its final state after the input changes.
▪ A good rule of thumb is the ratio R/T of rise time to sampling period is from
10 to 20.
▪ The faster a system respond to changes, the shorter the sampling period is.
PERIODICALLY
Actual T
speed
Sensor
37
Real-Time Embedded control
Set timer to interrupt periodically with Period T;
at each interrupt, do;
read data from Sensor;
compute control output u;
write command to Actuator;
end do;
PERIODICALLY
Actual T
speed
Sensor
38
Real-Time Embedded control
T
CPU
PERIODICALLY
Actual T
speed
Sensor
39
Real-Time Embedded control
Real Time
Embedded PC Software Microcontroller
with OS without OS
PERIODICALLY
Actual T
speed
Sensor
Real-Time Embedded control
Min distance
41
Concurrent Real-Time Embedded control
T1
CPU { T2
communication
Obstacle distance
Distance
Sensor Environment
Monitor
PERIODICALLY T2
Road slope, surface
Desired +
speed + +
Speed
+ Controller
Actuator + Car
-
PERIODICALLY
Actual
speed
T1
Sensor
42
Distributed Real-Time Embedded control
T1
CPU 1
Network
T2
CPU 2
Obstacle distance
Distance
Sensor Environment
Monitor
PERIODICALLY T2
Network
Road slope, surface
Desired + Actual
speed + + speed
Speed
+ Actuator + Car
Controller
-
PERIODICALLY
T1
Sensor
43
Concurrent Real-time Applications
Real-time Application Real-time Application
Task Task
1 2 ...
Interrupt Interrupt
Handler Handler ... Real-time
1 2 Operating System
Hardware Hardware
NO
RT-Operating System RT-Operating System
Cyclic Executive &
Interrupt Handlers Scheduler
44
Distributed Real-time Applications
Real-time Application Real-time Application
Task Task
1 2 ...
Interrupt Interrupt
Handler Handler ... Real-time
1 2 Operating System
Hardware Hardware
CAN
Transceiver
45
Distributed Real-time Applications
Real-time Application Real-time Application
46
Need for Special Network Technologies
▪ General-purpose networks, such as Ethernet, exhibit random and
nondeterministic behaviour due to the conflict arbitration methods used (e.g.,
CSMA/CD)
47
Classification of RT Systems
49
Hard RT System versus Soft RT System
Hard RT System versus Soft RT System
Hard RT System versus Soft RT System
Fail-safe versus Fail-Operational
For some hard real-time systems one or more safe states which can be reached
in case of a system failure, can be identified. Consider the example of a railway
signaling system. In case a failure is detected, it is possible to stop all the trains
and to set all the signals to red to avoid a catastrophe. If such a safe state can
be identified and quickly reached upon the occurrence of a failure, then we call
the system fail-safe.
Fail-safeness is a characteristic of the controlled object, not the computer
system. In fail-safe applications the computer system must have a high error-
detection coverage, i.e., the probability that an error is detected, provided it has
occurred, must be close to one.
There are, however, applications where a safe state cannot be identified, e.g., a
flight control system aboard an airplane. In such an application the computer
system must provide a minimal level of service to avoid a catastrophe even in
the case of a failure.
This is why these applications are called fail-operational.
Course content and organization
Course syllabus
o Part one: embedded system programming
• Arduino (periodic and reactive programming)
• Introduction to operating systems and RT OS
• Concurrent programming with POSIX
• RT Communication : CANBUS, DDS
• Component-based development
• UML MARTE
55
Teaching material
❑ Textbook
Giorgio C. Buttazzo, «Sistemi in Tempo Reale»,
Pitagora Editrice Bologna, 3° edizione
⚫ Course material
Send an email to [email protected]
Subject: ERTS
Body: Name, ID number (matricola)
56
Exam
Written exam only
• Theoretical questions
• Scheduling exercises
• Preappello
• Monday 18 December 2023
58