real time system and adaptive cruise control

Download Report

Transcript real time system and adaptive cruise control

Presentation
on
Real Time Systems and
Adaptive Cruise Control
Roadmap
•
•
•
•
•
•
•
•
Introduction to RTS
Problem Definition / Motivation
Adaptive Cruise Control (ACC)
Driver Models
Functional Model & Task Model
Extensions to Functional Model
Conclusion & Future Work
References
Functional Design & Mapping
F2
F1
F5
Functional
Design
Source:
Ian Phillips, ARM
F4
VSIA 2001
F3
Architectural
Design
HW1
Threa
d
(F2)
(F5)
(F3)
(F4)
HW2
HW3
HW4
RTOS/Drivers
Hardware Interface
What is “real” about real-time?
computer world
 e.g., PC
 average response for
user
 Interactive
 occasionally longer
 reaction: user annoyed
 computer controls speed
of user
 “computer time”
real world
 Industrial system,
airplane
 environment has own
speed
 reaction too slow:
deadline miss
 reaction: damage, pot.
loss of human life
 computer must follow
speed of environment
 “real-time”
Real-Time Systems
I/O - data
event
time
Real-time
computing system
action
I/O - data
A real-time system is a system that reacts
to events in the environment by
performing predefined actions
within specified time intervals.
Real-Time Systems: Properties of
Interest
• Safety: Nothing bad will happen.
• Liveness: Something good will
happen.
• Timeliness: Things will happen on
time - by their deadlines, periodically,
...
Types of RT Systems
Dimensions along which real-time activities can
be categorized:
• how tight are the deadlines?
--deadlines are tight when
laxity (deadline -- computation time) is small.
• how strict are the deadlines?
what is the value of executing an activity after
its deadline?
• what are the characteristics of environment?
how static or dynamic must the system be?
Hard, soft, firm
• Hard -- result useless or
dangerous
if deadline exceeded
Ex: Aircraft, Chemical Plant
• Soft -- result of some lower value if deadline
exceeded
Ex: Multimedia, Interactive video
games
Firm -- If value drops to
zero at deadline
•
value
hard
soft
time
-
+
deadline (dl)
Timing Constraints
Real-time means to be in time --how do we know something is “in time”?
how do we express that?
• Timing constraints are used to specify temporal
correctness
e.g., “finish assignment by 2pm”, “be at station before
train departs”.
• A system is said to be (temporally) feasible, if it
meets all specified timing constraints.
• Timing constraints do not come out of thin air:
design process identifies events, derives
models, and finally specifies timing constraints
Overall Picture
Physical properties of environment
Model-design
Timing constraints
Functional
Analysis, Testing
Temporal
Run-time dispatching
(In field use)
Timing Properties
• Periodic
– activity occurs repeatedly
– e.g., to monitor environment values, temperature, etc.
• Aperiodic
– can occur any time
– no arrival pattern given
• Sporadic
– can occur any time, but
– minimum time between arrivals
mint
time
Who initiates (triggers) actions?
Example: Chemical process
– controlled so that temperature stays below
danger level
– warning is triggered before danger point
…… so that cooling can still occur
Two possibilities:
– action whenever temp raises above warn
-- event triggered
– look every int time intervals; action when temp
if measures above warn -- time triggered
Other Issues to worry about
• Meet requirements -- some activities may run
only:
– after others have completed - precedence
constraints
– while others are not running - mutual exclusion
– within certain times - temporal constraints
• Scheduling
– planning of activities, such that required timing is
kept
• Allocation
– where should a task execute?
Project Motivation
Motivation (Cont…)
– Partitioning of system into TT and ET
domains
– Process Mapping
– Optimization of parameters corresponding
to communication protocol.
• Sequence and Slots of TDMA (TTC)
• Priorities of Messages (ETC)
– Schedulability
Adaptive Cruise Control
• Adaptive Cruise Control:
– automatically adjusts vehicle speed to maintain a
driver-selected safe distance from the vehicle ahead
in the same lane.
– It then returns to the set speed when traffic clears.
• Requirements:
– The speed should be kept close to the SET speed, if
there is no vehicle ahead.
– Timegap should be maintained at x sec.
– Manual intervention, UI, etc…
Functions Identified
•
•
•
•
•
•
•
•
•
Computing Current speed of our vehicle
Leading Vehicle related Task
Controlling Speed of our Vehicle
Controlling the Throttle
Controlling the Brake
Detecting Manual Intervention
UI to the Driver
Periodicity of Tasks
Hard, Firm; Periodic, Aperiodic…
Human Driver Model
• Stimulus-Reaction Model
Structure of Human Driver in Car-Following
Car Following Models
• Linear Follow-the-Leader Model
– Stimulus: Velocity Difference b/w Leader and Follower
– Reaction: Acceleration command to vehicle
• Look-Ahead-Model
– Driver observes the behavior of three vehicles ahead of
him.
– Stimulus: Majority direction of Acceleration
– Reaction: Acceleration command using switching logic
• Others…
Simple Car Following Model
vl
Velocity of Leader
vf
Velocity of Follower
rl
Retardation of Leader
rf
Retardation of Follower
tr
Short Reaction Time
Acceleration profile of vehicle
Dmin = Di – Di-1
Di = D1i + D2i + D3i
ACC System Design
Disturbances
(accelerator pedal (throttle) position, brake pedal position)
(air drag, grade,
Actuator Noise
Actuators
Control I/P
Physical Process
Desired
(desired vehicle speed)
Actual output
(vehicle speed)
Control I/P
Reference Input
friction etc)
Adaptive
Sensed O/P
Sensors
Sensor Noise
Cruise Cont.
(wheel speed sensor)
Src: Prof. Shashikant's Control
System Lec-1 in DEP Mode
Process Model
Disturbances
Control I/P
E
G
Physical Process
Actual Output
1/Rw
Src: Prof. Shashikant's Control
System Lec-1 in DEP Mode
1/M
Pictorial View
Sensors
Actuators
Friction
Estimator
Throttle
System
Speed
Sensor
Control
Algorithm
Radar
System
ABS
Roadside
Signals
SPEED
Module
as
Min-value
DISTANCE
Module
ad
Control
Signal to the
Actuators
Schematic
Picture of
Control
Algorithm
and its
Environment
The structure
of Control
Algorithm
Block Diagram
Flow Chart
Flow Chart
(cont…)
State Diagram
Precedence Graph showing communication relation
Curr_Thr
Pos
Wheel
S
a
d
Throt
tle A
e
Brake
A
c
IR S
b
Curr_Br
Pos
Speed
Set
Thrott
le S
Brake
S
f
g
Task Graph
Extensions to Functional Model
under consideration
• Adaptive to
– Driver Reaction Time
– Roadside Signals
– Friction b/w road and tyre (ABS)
– Relative positioning in the lane
Future Work
• Partitioning tasks as TT and/or ET and as
Soft, Hard or Firm.
• Writing Algorithm
• Allocation of Tasks
• Schedulability
• One or two similar application if time permits