AI 302
Embedded Systems
SPRING 2023
Lecture 01 - Introduction
Instructor: Dr. Tarek Abdul Hamid
The Future
Embedded System
Future of 21st Century
Embedded systems incorporated in the Internet of Things (IoT)
Machine to Machine (M2M) devices
Exceptionally versatile and adaptable, embedded systems can be found in all smart
devices today.
It is difficult to find a single portion of modern life that doesn’t involve this technology.
Here are some of the real-life examples of embedded system applications.
Central heating systems
GPS systems
Fitness trackers
Medical devices
Automotive systems
Transit and fare collection
ATMs
Factory robots
Electric vehicle charging stations
Interactive kiosks
2 Embedded Systems Tarek Abdul Hamid
History of Embedded Systems
1970
Computers for commercial and admin apps
Microprocessor – miniaturization – Moore’s Law
1980
Computer networks – bridge IT + Telecommunication
Mouse, Windows and GUI
1990
Internet and WWW – access to digital technologies
2000
Second revolution for embedded systems
Economic Challenges
Increase fuel economy and reduce emissions in automobile by adjusting motor state
Airbags and assisted braking systems – improve comfort and security of passengers
Improve security, performance, attractiveness and market share
3 Embedded Systems Tarek Abdul Hamid
Introduction to Embedded System
System
Way of working, organizing, performing one or many tasks as per rules or plan
Arrangement – units assemble and work together as per program or plan
Examples of system
Time display system – watch
Automatic cloth washing system – washing m/c
Embedded Systems are
Omnipresent (homes, office, shopping malls, hospitals, cars, aircraft…)
Computing Device – does a specific focused job
4 Embedded Systems Tarek Abdul Hamid
What is Embedded System?
Embedded System
Any device that includes a computer but is not itself a general purpose
computer
H/W and S/W - part of some larger systems and expected to function without
human intervention
Respond, monitor, control external environment using sensors and actuators
Embedding a computer - but not for general purpose
Applied Computer System
Includes analog interface to the external world
5 Embedded Systems Tarek Abdul Hamid
Embedded System - Definitions
An embedded system is an application that contains at least one programmable
computer (typically in the form of a microcontroller, a microprocessor or digital
signal processor chip)
is used by individuals who are, in the main, unaware that the system is
computer-based
o From Embedded C Programming perspective by Michael.J.Pont
“An embedded system is a system that has software embedded into computer-
hardware, which makes a system dedicated for an application (s) or specific part
of an application or product or part of a larger system.”
S/W usually embeds into a ROM or flash
Independent system or part of a large system
o by Raj Kamal
6 Embedded Systems Tarek Abdul Hamid
Embedded System Vs Desktop System
Desktop / Laptop
General purpose computer
Used for playing games, word processing, accounting, SDT etc.,
Embedded System
Single Purpose and
fixed embedded software for specific job
Typical Examples
A/C, VCD/DVD Player, Printer, Fax m/c, Mobile phone etc
Customized embedded HW + fixed embedded SW (firmware) + specific processor
to meet the specific requirement
7 Embedded Systems Tarek Abdul Hamid
Examples
PDA
Digital camera
Cell phone
Simple Control: front panel of microwave – less functionality
Camera - Canon EOS has 3 microprocessors - 32b RISC CPU runs auto focus
Analog TV - tuning and channel selection - less functionality
Digital TV
decompression, descrambling etc., more functionality
complex signaling functions
8 Embedded Systems Tarek Abdul Hamid
Examples
Automobile ES
High end automobile may have 100 microprocessors
4b up checks tension of the seat belt
UC run dashboard devices - display services
A UC is a processing core that has the memory (volatile and non volatile) integrated internally.
16/32b up controls engine - most complex function
Example Automobile system
ABS (Anti-Lock Braking System)
4 sensors senses the speed of wheels
4 brakes controlled by hydraulic pump
Embedded ABS
receives inputs from sensors
actuates hydraulic pump
Similar control system implemented through microcontroller in AU
9 Embedded Systems Tarek Abdul Hamid
Characteristics of Embedded System
Sophisticated functionality - differ by appliances
RT operation (not always necessary)
Low manufacturing cost
Application dependent processor
Restricted memory
low power
Critical in battery operated devices
Excessive power consumption increases system cost even in wall powered devices
10 Embedded Systems Tarek Abdul Hamid
Characteristics of Embedded System
Manufacturing cost
Non-Recurring Engineering cost (NRE) – cost for design and development
Cost of production and marketing each unit
Production cost should be taken care when targeting mass market
Technology choice depends on no of units plan to produce
11 Embedded Systems Tarek Abdul Hamid
Characteristics of Embedded System
RT operation
Finish operations by deadlines
HRTS (Hard Real Time Systems) - missing deadline is catastrophic
Automated missile launch system
SRTS (Soft Real Time Systems) - missing deadline degrades performance
Playing video - missed decoded frame
Many systems are multi rate - inputs from external world comes at different rates
12 Embedded Systems Tarek Abdul Hamid
Characteristics of Embedded System
Application dependent requirements
Fault Tolerance and Reliability
Continue operation despite HW or SW faults
Ex: aircraft and medical monitoring sys
Safe
Avoid physical or economic damage to person or property
13 Embedded Systems Tarek Abdul Hamid
Characteristics of Embedded System
More Features – Dedicated Systems
Pre-defined functionalities – h/s accordingly designed
Programmability rarely used during life time of system
Not programmed on regular basis
OTP and execute infinitely
Do specific task
RT, fault-tolerant and safe
14 Embedded Systems Tarek Abdul Hamid
Characteristics of Embedded System
Single Functional - cannot be programmed to do different things
pagers and mobile phones
Limited Resources - fixed RAM, ROM
No secondary storage CD-ROM, FDD
Work against deadlines - Real Time systems
Missing deadline cause catastrophe
Power constrained - Battery powered products
Highly reliable - No 3 finger salute – cannot afford to reset
Extreme environment conditions - Temperature and humidity
Cost sensitive to CE - Millions of units sold
Diversified processors and OS unlike desktop (intel + MS - Wintel)
complex to chose right platform
15 Tarek Abdul Hamid
Constraints in Embedded Systems
Tightly constrained than traditional software systems
Cost
Cannot have high end or fast processor
Cannot have more memory – processor footprint should be less
Size
Processor footprint should be less
Cooling requirements + Processor should take less space
Performance
Ex: Digital camera snaps, Mobile phone address book contact list etc.,
Power
Battery power products – Mobile phones
Optimized power saving algorithms and operating modes – reduce power dissipation
SW Program size + # of instructions – affect processor’s energy consumption
Available System Memory and Processor Speed
Limited power dissipation when running system continuously
Reactive and Real Time – Adaptive cruise control and radar missile detection systems
16 Embedded Systems Tarek Abdul Hamid
More Examples
NASA Mars Rover uses an Intel 80C85 8-bit microprocessor
17 Embedded Systems Tarek Abdul Hamid
More Examples
Palm Vx Handheld uses Motorolla Dragonball EZ 32-b microprocessor
18 Embedded Systems Tarek Abdul Hamid
More Examples
Philips sonicare plus toothbrush – Zilog Z8 8b microprocessor
19 Embedded Systems Tarek Abdul Hamid
More Examples
Vendo V-MAX 720 vending machine uses the Motorola M68HC11 8b
microprocessor
Electronic and mechanical parts should go in hand
Delivering a good wrt cash - transformed - web enabled cashless delivery
Stock monitored remotely
Transactions through credit or smart card
Security monitor from remote
20 Embedded Systems Tarek Abdul Hamid
More Examples
Sony’s Aibo Robotic Dog uses ERS-110 an MIPS 64b RISC processor
Coordinate the motions
Needs to do sensing
Control the manipulators
Need to communicate
Ex: football competition b/w robo
21 Embedded Systems Tarek Abdul Hamid
More Examples
Rio MP3 Player uses 32b RISC processor
Compressed form of audio is mp3
Sophisticated up to be used for audio processing
22 Embedded Systems Tarek Abdul Hamid
More Examples
Garmin Streetpiolot GPS receiver uses a 16b processor
Any transport system can get its global location
Automated navigation system make use GPS
Communication with satellite and output about vehicle position and map display
23 Embedded Systems Tarek Abdul Hamid
More Examples
Hunter 44550 programmable thermostat uses a 4b processor
24 Embedded Systems Tarek Abdul Hamid
Types of Embedded System
Similar to general computing
PDA, video games, STP box, ATM
Since the functionalities is subset of PC functionalities
I/0 based
No sensing of ext environment and no control of actuators
More like general purpose
Respond to users input
Control systems
Sensing and actuating - is a specific job
Feed back control of RT systems
Vehicle engines - fuel injection control
Flight control
Nuclear reactors
25 Embedded Systems Tarek Abdul Hamid
Types of Embedded System
Signal Processing
Core job is processing of signals
Radar
Sonar
DVD players
Communication and Networking
Cellular phones,
Internet appliances
Web enabled vending m/c
26 Embedded Systems Tarek Abdul Hamid
Nature of System Functions
Functions expected from Embedded Systems – To do
Obey control laws - for sensing and actuation
Sequencing logic - task specific and not general
Signal processing - if there is external interface
May not be a core activity
But required to deal with sensing inputs
App specific interfacing
What kind of sensors and actuators interconnected
h/s interfacing for i/o devices
Fault response
What happens if fault occurs
General philosophy is - graceful degradation
Catastrophic failure should not happen
Ex: battery low in mobile phone – message to user before shut down
27 Embedded Systems Tarek Abdul Hamid
Embedded System Architecture
Memory - has the software to control the system
AD conversion blocks - interface to sensors
DA conversion blocks - interface to actuators
Integral and essential component of embedded control systems
28 Embedded Systems Tarek Abdul Hamid
Embedded System Architecture
FPGA / ASIC
Special hw interfaces with CPU
CPU off shores special functionalities
Human interface with CPU - LCD, LED
Diagnostic tools
Trace failures
System does self checks to check all paths on regular basis using diagnostic
tools
If not system may damage the users due to unexpected malfunctions
Power cooling systems
Proper package of whole systems wrt external environment
Good well system can fail due to improper packaging
Ex: moisture controlling
Mechanical aspects of design - too critical
29 Embedded Systems Tarek Abdul Hamid
Implementing Embedded System
HW
PE (Portable Executable)
peripheral devices
i/o
interfacing sensors and actuators
interfacing protocols
Memory
Bus
HW aspects looks similar to general purpose systems
But embedded systems differ by peripherals
General purpose is about std i/o devices
in ES - i/o devices varies a large
Diff kinds of sensors - so PE should be defined wrt i/o devices
30 Embedded Systems Tarek Abdul Hamid
Implementing Embedded System
Cross assemblers and compilers
Host and target m/c
Ex: compiler for PIC uc on simple PC
Compile c program for PIC uc (target board)
Not executed on PC in which it is compiled
Compilers for family of processors (variants)
Since similar architecture but differ by registers or features
Emulators
IS emulators
Emulates target processor on another m/c
Simulation environment
timing analysis of code on host m/c
31 Embedded Systems Tarek Abdul Hamid
Implementing Embedded System
PC - hw connector - target board
Monitor execution of code from PC
Debugging tools
System SW
Cross compilers and assemblers
Emulators and simulators
Debugging tools
System SW aspects differ from that of general purpose system
Top of the system sw is specialized OS with RT features if required
App sw - flavors for different devices
Ex: same os vxworks on laser printer and on other appliances
App sw targeted for printing on top of OS
App sw distinguish the functionality
32 Embedded Systems Tarek Abdul Hamid
Characteristics of Embedded SW
Logically and temporally correct programs
Cant do correct at wrong time
Correct operation has no meaning
Deal with inherent physical concurrency
GP m/c - multi users and processes running
ES - physical world is concurrent - have to support concurrency
Reactive Systems
Has to be reliability and fault tolerance
Has to be app specific and single purpose
33 Embedded Systems Tarek Abdul Hamid
Multitasking and Concurrency
Deal with several i/o and multiple events occurring independently
Many of ES - expected to be multitasking
Separating tasks simplifies programming complexity
but requires s/w mechanism for multi-tasking - switching b/w different tasks
Concurrency => appearance of simultaneous execution of many tasks
34 Embedded Systems Tarek Abdul Hamid
Challenges in ES Design
How much hw do we need?
Word size of CPU and size of memory
How do we meet our deadlines (deadlines for a RT system)
Faster hw or cleverer sw
Faster cpu means extra cost
Cleverer sw requires faster cpu
So, design logic on FPGA or ASIC a dedicated function using low cost cpu and include
it for compromising on cost
Dedicated logic on FPGA or ASIC to compromise of SW so as to meet deadline
How do we minimize power
Turn off unnecessary logic
Reduce memory accesses
35 Embedded Systems Tarek Abdul Hamid
ES Design – A Global Picture
Multi objective
Dependability
Not fail
Should have fault tolerance or graceful degradation
Affordability
Depending on the market targeted
Safety
Security
Not cause bodily harms to users
Scalability
Timeliness
Operation in time
36 Embedded Systems Tarek Abdul Hamid
ES Design – A Global Picture
To meet above multi objectives of ES design we need multi-discipline
Electronic hw
Mechanical hw
Control algorithms
SW
Humans
Society / institutions
sociological acceptance of product - accept by society
37 Embedded Systems Tarek Abdul Hamid
ES Design – Life Cycle
ES Design Life cycle events
LC => how do a ES gets developed
Requirements
Design
Manufacturing
Deployment
Logistics of maintaining the system
Retirement support
38 Embedded Systems Tarek Abdul Hamid
ES Design Goals
Performance
overall speed, deadlines
Functionality and user interface
MFG cost
Power consumption
Phy size etc.,
Size and power also related to performance and should be taken care accordingly
Ex: cannot design a digital camera of wt 10 kg
39 Embedded Systems Tarek Abdul Hamid
ES Design Goals
Functional and Non Functional Requirements part of ES design
Functional requirements
o/p as a function of i/p - specification of ES as i/o
Non Functional requirements
time to compute o/p
size
weight
power consumption
Reliability etc.,
functional and non functional requirements are critical for product acceptance
40 Embedded Systems Tarek Abdul Hamid
Design and Development Process of
ES Life Cycle
Requirements
Specifications
Architecture
Components Design
System Integration
Testing is critical
GP system - patch download for a bug
ES system - use forever and no flexibility for patch update
41 Embedded Systems Tarek Abdul Hamid