Aes Hu
Aes Hu
Email: [email protected]
1
Embedded Systems
2
Embedded System?
• Engineering systems that could contain small components that are
design to perform specific engineering functions
Software
Processor
Coprocessors
ASIC
Converters
5
Real-Time Applications of ES
• A real-time system consists of tasks under deadline constraints
– notion of time typically is global and “physical”
• Hard real-time versus soft real-time systems
– in hard real-time systems, the tasks must complete by specified
deadlines: flight control, collision alert.
– in soft real-time systems, task execution may go beyond specified
deadlines without catastrophic failures, may also be timed-out: display
updates, connection establishment.
• Hard real-time systems are more often embedded
– dedicated applications.
AU 6
A “Short List” of Embedded Systems
Applications
• Anti-lock brakes Fingerprint identifiers
• Auto-focus cameras Home security systems
• Automatic teller machine Medical testing systems
• Automatic toll systems Modems
• Automatic transmission MPEG decoders
• Avionic systems Network cards
• Battery chargers Network
switches/routers
• Camcorders Pagers
• Cell phones Photocopiers
• Cell-phone base stations Printers
• Cordless phones Scanners
• Cruise control Stereo systems
• Digital cameras TV
• Disk drives VCR
• Electronic card readers Video game controllers
• Electronic toys/games Video phones
• Fax machines Washers and dryers
EST- Applications in
Automotives
8
A typical real-time embedded system
9
Car example
• Mission: Reaching the destination safely.
• Controlling System
- Human driver: Sensors - Eyes and Ears of the driver.
- Computer: Sensors - Cameras, Infrared receiver, and
Laser telemeter.
11
Timeliness requirements
• Example: inflation of an air bag
– real-time fast
– real time: fulfill specific timing requirements
12
Timeliness requirements
• Example: Software controlling the
deployment of airbags has 15 to 40
milliseconds to determine which and in what
order to activate
• Specification:
– Lower and upper bounds on the response time
• Metrics:
– Worst-case response time
– Tardiness
13
Pre-crash system
• Reduce severity of head-to-tail crash
14
Pre-crash system
Collision avoidance zone
• Stage 1 (~2.6s to impact):
– Provide visual and audible collision warning
• shine lights and sound
• Stage 2 (~1.6s to impact):
– Automatically initiate partial braking at 4m/s2
– Move the front passenger seat to safe position
• Height, fore/aft adjustment, backrest angle
• Inflate air-chambers inside seat for better support
– If skidding: close front windows and sunroof
• Stage 3 (~0.6s to impact):
– Tighten the seatbelts (e.g. fire pyrotechnics or pulleys)
Damage
– Prepare airbags mitigation zone
for deployment
15
Pre-crash system
• Relies on several subsystems
– Radar for detecting potential collision
– Anti-lock Braking System to apply partial
braking
– Traction Control to identify if skidding
– Window Control System to close windows
–…
16
EEMS
• The Embedded processors determines the amount of fuel to inject
based on a number of sensor readings. Oxygen sensors tell the
ECU whether the engine is running rich (too much fuel or too little
oxygen) or running lean (too much oxygen or too little fuel) as
compared to ideal conditions (known as stoichiometric).
The throttle position sensor tells the ECU how far the throttle plate
is opened when the accelerator (gas pedal) is pressed down. The
mass air flow sensor measures the amount of air flowing into the
engine through the throttle plate. The engine coolant temperature
sensor measures whether the engine is warmed up or cool. If the
engine is still cool, additional fuel will be injected.
• If the ECU has control over the fuel lines, then it is referred to as
an electronic engine management system (EEMS).
Control of variable valve timing
21
CPU-GPU-TPU
22
ELECTRONIC CONTROL UNIT
23
24
First Electronic Control Unit
• First seen in 1975 Chevrolet Cosworth
Vega
• Received information from 10 sensors
• Pre-programmed to monitor engine and
deliver fuel to cylinders
• Developed to adhere to stringent emission
control requirements
• Still analog
ECU components
• 8-32bit 40 MHz microprocessor
• Analog-digital converter
• High-level digital outputs
• Digital-analog converter
• Signal conditioner
• Communication chips
– controller-area-networking, 500 Kbps
Electronic Control Unit (ECU)
• Controls one or more car functions
• 70 – 100 ECUs inside a car (nearly as
many as inside Airbus A380)
• Embedded processor-based
27
Types of electronic control units
–Airbag (ACU)
–Engine Control Unit(ECU)
–Transmission (TCU)
–Vehicle Control Unit
–Engine Management Unit
–ABS
–BCU
–VX
–Infotainment
–Suspension
–Brake control Unit……….
…….
28
An ECU and its interfaces
Power
Debug port Digital and
CAN port FlexRay port Analog
I/O ports 29
Automotive Grade- ECU
• Renesas
• ST Microelectronics
• FreeScale
• Microchip
• Xilinx
• Intel
30
Example ECU (Freescale board
EVB9512XF)
Power
CAN controller
CAN port FlexRay port
Reset button
Digital and
Debug port Analog
I/O ports
Microcontroller
(CPU + memory)
LEDs
31
Hardware platform pre-requisites
■ High-computing capacity
■ GPU / High performance
graphics
■ Multiple video outputs
■ Car standard interfaces
— CAN / MOST / AVB etc
Open ECU
Bosch
Continental
Delphi
Siemens
Pi-Innova
33
FlexECU
Open ECU development platform supporting Bosch ECU
module
34
ECU- programming -MATLAB
35
Open ECU
FPGA+ Power PC
36
AI Processors
• Fuzzy Processors:
• Siemens SAE81C99: 256/128 I/O, 16384 rules, 10 M
fuzzy logic instruction per sec.
• Siemens SAE81C991: 4096/1024 I/O, 131072 rules,
10 M FL instruction per sec.
• Neuro-Processors:
• Analog or Digital implementation but not yet
commercialized.
• Example: 1000 neuron, 1M synapses, 1.37M
connection per sec.
Automotive functional domains
• powertrain, e.g.
– engine control, transmission and gear control;
• chassis, e.g.
– ABS (Antilock Braking System), ESP (Electronic Stability Program),
ASC (Automatic Stability Control), ACC (Adaptive Cruise Control);
• body (comfort), e.g.
– air conditioning and climate control, dash board, wipers, lights,
doors, seats, windows, mirrors, cruise control, park distance control;
• telematics/wireless, e.g.
– multimedia, infotainment, GPS and in-vehicle navigation systems,
CD/DVD players, rear-seat entertainment;
• passive safety (emerging), e.g.
– rollover sensors, airbags, belt pretensioners.
38
ECU- EMS
Basic Calculation
• Base Pulse Width – function of Load and RPM
• RPM = 2K Load = 4
• BPW = 8 milliseconds
• A = coolant temp = 100
• B = oxygen level = 3
41
ECU-ABS
42
Automotive domains
Powertrai Chassis Body Telemati Passive
n cs safety
Program size 2 MB 4.5 MB 2.5 MB 100 MB 1.5 MB
Number of 3-6 6-10 14-30 4-12 11-12
ECUs
Number of 36 180 300 660 20
messages
Bus topology Bus Bus Bus Ring star
Bandwidth 500 Kb/s 500 Kb/s 100 22 Mb/s 10 Mb/s
Kb/s
Cycle time 10 ms – 10 10 ms – 10 50 ms 2 20 ms 0 5 50 ms
s s s s
Safety High High Low Low Very
requirements high
43
(AUTOSAR-AUTomotive Open
System Architecture)
44
AUTOSAR from a Technical Point of View
• AUTOSAR Layered Architecture
AUTOSAR Application Actuator Sensor Application
Software
Component
Software
Component
Software
Component
Software
Component AUTOSAR Software
Component
AUTOSAR AUTOSAR AUTOSAR Software AUTOSAR
Interface
Interface Interface Interface
.............. Interface
ECU
AUTOSAR Runtime Environment (RTE)
Firmware
Standardized
Standardized Standardized AUTOSAR AUTOSAR
Standard AUTOSAR
Interface Interface Interface Interface
Software Interface
ECU
Services Communication
Abstraction
API 2
VFB & RTE Standardized Standardized Standardized
Standardized
API 1 Complex
Operating
RTE Device
System
relevant Drivers
Standardized
Interface
API 0
API 3 Private
Basic Software Microcontroller
Abstraction
Interfaces inside
Basic Software
possible ECU-Hardware
45
ECU programming
46
ECU-HIL
47
Automotive Data
Communication Buses
CAN – most spread network in the car, some limitations with 1 Mbps
bandwidth and non-deterministic behavior under high loading >60%.
LIN – low cost bus for body applications with 19.2 Kbauds and a
UART interface
Ethernet – mainly used for diagnostics today, high potential for more
48
In-Vehicle Networking complexity
Adaptive
1996 Typical Vehicle: 6 ECUs Cruise Control
Ethernet
LIN
Higher ECU integration and emergence
CAN
of domain controller will create new
challenges in terms of functional safety
(ISO26262) 50
51
AUTONOMOUS CAR -(Level 0~5)
AUTONOMOUS CAR -(Level 0~5)
53
Environment Fusion
Environment Perception
Possible Sensor technologies for
Autonomous Vehicles
GPS Lidar
Camera
Ultrasonic
Odometr
y
Central
Computer Inertial Radar
Sensors
Environment Perception
LiDA
R GP
S
Video IM
Cameras U
Ultrasonic
Processing
Platform
Rada
r
The evolution to autonomous driving
Today Future
Distribution on multiple ECUs One domain controller
Actuators Actuators
One domain
ECUs controller
Sensors Sensors
59
LiDAR+Camera-based Lane Detection
Status message
Secure
these
wireless
links
Vehicles transmit status V2V messages must be
messages to each other to securely transmitted and
improve traffic flows and increase processed.
safety. Reliable
“Traffic jam ahead” Encrypted
“I have just put the brakes on” Authenticated
“Ice on the road ahead” Ensure privacy (no
Vehicle-to-Infrastructure (V2I)
“Traffic lights not working at
junction ahead” “Road ahead closed.
Turn left at junction”
Secure these
wireless links
“Road works ahead”
“Spaces available in
Broad Street car
park”
ROADSIDE UNITS
Status messages can be
transmitted from kerbside
infrastructure to warn of
delays, hazards or provide
useful advice to travellers.
Vehicle-to-Person (V2P)
Secure these
wireless links
Pedestrians
and joggers
Horses (and
other animals)
Non-vehicular road
users can indicate Cyclists, scooter
their presence by riders and other
sending status
messages to oncoming 2-wheeled
vehicles transport
What is augmented reality HUD?
Transition from
- below line of
sight -
into
- driver’s direct
vision -
overlaying
Conventional Augmented Reality HUD
- reality and
HUD Further enhances driver’s
information -
Visual assistance experience and generates
system to increase faster
driving safety and reliable decisions out of
user experience ADAS-
7
system data in real time
0
Augmented reality HUD – basic features
Lane departure Adaptive cruise Intuitive
warning control navigation
Cameras AR HUD
External and Data fusion
internal • Data processing
Image HUD
ADAS generation
Car • Data fusion
• Real-time domain
sensors • AR decision
domain Speed/ making
drawing
• Dynamic
acceleration, • Dynamic
steering angle object
Navigatio coordinates
creation
n positioning • Warping
GPS/ • Prediction
pre-
positioning function
correctio
n
Avoiding driver distraction
73
IOT
Edge-Fog-Cloud
75
Edge-Fog-Cloud
76
Edge-Fog-Cloud- Automotive
Systems
77
Edge-Fog-Cloud- Automotive
Systems
78
The automotive data lake
age
nt
agent Homes,
Appliance s,
etc.
Clo
ud
Devic
e
Manage
ment
agen agen
t t Industrial
Weara
bles Devices
83
84
WHY RPLD?( CPLDs+ FPGAs)
• RPLDs can integrate processor, Industrial
Ethernet/fieldbus standards, custom motor interfaces,
and DSPfunctions in one device.
• RPLDs give designers the freedom to create custom
functions completely adapted to their specific application
requirements by enabling both hardware and software
customization.
• RPLDs provide the capability to implement functions in
hardware, accelerating performance and simplifying the
software porting effort.
• This additional freedom opens up new avenues of
enhanced system performance, especially for motor
control energy efficiency 85
RPLDs Enable Massively Parallel DSP
Example 256 TAP Filter Implementation
•
Programmable DSP - Sequential RPLD - Fully Parallel Implementation
Data In
Data In
Reg
Reg
Reg
Reg
Coefficients X C0 X C1 C0
X C2 X C3
X …C255 X
MAC Unit
256 clock
cycles
+ +
needed 256 operations
Reg
in 1 clock cycle Data Out
Data Out
1 GHz 500 MHz
= 4 MSPS = 500 MSPS
256 clock cycles 1 clock cycle
“… the unprecedented signal processing requirements of next-generation wireless
devices threaten to outpace the capabilities of DSP processors, creating opportunities
for massively parallel and highly customized devices.” BDTI, 2004
86
CHALLENGES OF MOTOR CONTROL 7
Control?
Wider integration capabilities
– Industrial networking (Real-time Ethernet, CAN, PCIe)
– Multiple motors and motor types
– Custom interfaces and logic (i.e. camera sensors)
Higher Performance
– Parallel processing capabilities reduce latency
– Real-time functions are deterministic in RPLD fabric
Reduced Total Cost of Ownership (TOC)
– Increase power efficiency by advanced modulation schemes
(Space Vector Modulation, RPFM)
– Eliminate encoder cost using Sensorless Field Oriented Control
(SFOC)
– Reduce board BOM by integration of industrial networking
– Reduce motor BOM by using low cost Stepper instead of BLDC or
PMSM
Multiple MCU
89
FPGA-Based Control for Electric Vehicle and
Hybrid Electric Vehicle
90
91
RPLD Parallel Processing
EV –Powertrain
93
RPLD for EV
94
FPGAs
• Automotive grade, Virtex , XA Zynq-7000
MPSoCs
• Automotive grade Intel FPGAs (Altera),
Excalibre, Stratix, Cyclone
95
96
97
98
Xilinx ECU-EV
99
Electric Vehicle Management
ECU
• Electric Vehicle Management ECU
- Vehicle dynamics and predictive maintenance can be accelerated using
the low latency AI processing capabilities in the XA Zynq-7000 and XA Zynq
UltraScale+ MPSoC platforms
- Flexible PL hardware pipelines can handle multiple protocols which must
be processed simultaneously to handle complex vehicle communications
and act in real time upon critical data
• On-board Charger, Battery Management Systems and EV Motor Drive
Control
- Increasing use of AI and hardware acceleration to drive model-based
algorithms to adapt to the behavior of the underlying hardware in real time
utilizing hardware accelerators tightly-coupled with application software
- The PL provides unique and flexible ways to reduce EMI and minimize
losses and generate an IO map tuned to the specific platform
100
Xilinx advantages in SiC-based
Motor Control
• Xilinx advantages in SiC-based Motor Control:
101
RPLD Integration Advantage
9
RPLD Performance Advantage 10
Clarke Transform:
Convert phase currents from 3-axis to 2-axis ADC
Spartan-6
ParkTransform:
RPLD: Convert to rotating coordinate system
2.5us
Slide Mode Controller:
Estimate motor position and speed
Sensorless
MCU: Field Oriented
Control
PI Controllers:
55-100us Estimate and correct error in speed & torque
higher efficiency
Power Modulation:
Power Modulation: Drive
PWM, SVM, RPFM
PWM, SVM, RPFM Stage
Typical 3-phase Brushless Drive 13
• Synchronize
• Network & IO
Modulation
– Determines voltage waveform delivered to the
motor
– Simplest is Pulse Width Modulation (PWM)
– Space Vector Modulation (SVM) based on
sinusoids
– RPLD creates complex waveforms, easily
changed on-the-fly
Control
– Speed, position and torque can be controlled
– Field Oriented Control (FOC) used to
precisely regulate torque
– Add PID loops to control speed / position
– RPLD has huge performance advantage
Field Oriented Control System 20
Park-1 Modulator
ISqref PID Motor
d,q SVM
- Driver
ISdref PID α, β RPFM
-
Ɵ = theta = rotor angle
θ
ISq d,q a
α, β
b
ISd α, β a, b, c
Park Clarke
15 Unique Building
Blocks
Easy Plug-and-Play
Configuration
each motor
Parallel control path
processing
for
Accelerated
computations using Xilinx Fully Documented
DSP48 slices IP
FOC PID CLARK PARK PWM-
SVM
– 48-bit operations
– 18-bit precision ATAN2 SIN/COS Rect2Pol Encoder IIR
– Interpolated
Sin/Cos/Atan2
PI Controller with DSP48E1
System Diagram with 7 Series
FPGA
Xilinx Zynq-7000
46
Gigabit
Ethernet
ZedBoard.org
Gigabit
Embedded Coder™ Ethernet
C Code
Generation Cortex-A9
Processor
- System stimuli
- Voltage rectification
- 3-phase inverter
- Signal measurement
Plant Model - PMSM motor model
AXI Bus
HDL Coder™
HDL Code
Generation Programmable
Logic - Field Oriented Control
- Coordinate transforms
- Torque control loop
- Speed control loop
- Vector modulation
Controller
Simulink Design Flow for
Zynq-7000 EPP
48
Algorithm Model
Embedded
HDL Coder
Coder
Zynq Template
Xilinx EDK
Development
Board
Zynq-7000 EPP –
Embedded Design Flow
114
115
116
117
118
119
Stratix -Electrical Vehicle
120
Motor Control with FPGA
121
122
The car of the future
https://www.toyota.com/ http://www.discover-sedric
concept-i/ .com/en/
123
28/03/017 Connected Cars & Autonomous Vehicles
The taxi of the future
There seems to be universal consensus that driverless taxis are
the way forward. In fact, they are already being trialled in major
cities around the world.
nuTonomy Uber
( Singapore ) (Pittsburgh,
USA)
http://nutonomy http://uber.
.com/
28/03/2017
com 124
The transport revolution
Driverless Hyperloop
buses
126