This presentation is the result of my team in the course "Embedded Systems" at the University of Massachusetts, Amherst. It presents the findings of the paper "Timing analysis of the FlexRay communication protocol", a communication network with automotive uses.
(NEHA) Call Girls Pushkar Booking Open 8617697112 Pushkar Escorts
Β
Flexray
1. 1
TIMING ANALYSIS OF THE FLEXRAY
COMMUNICATION PROTOCOL
presented by:
CHENG SUN // YINGLAI YANG // YUNNING LI
TRAIAN POP, PAUL
POP, PETRU ELES, ZEBO
PENG, ALEXANDRU
ANDREI
2. 2
Developments in automotive
ο§ Comfort:
β’ x-by-wire (drive-by-wire, brake-by-wire, β¦)
β’ Lane control
ο§ Safety:
β’ Automatic emergency brake
β’ Pedestrian recognition
ο§ Future:
β’ Self-driving cars
CHENG SUN // YINGLAI YANG // YUNNING LI
4. 4
New solution: FlexRay
ο§ We need fast, deterministic (safe) communication
protocol: Development started at BMW and continued by
a consortium resulted in FlexRay protocol.
ο§ CAN, LIN vs. FlexRay
Bus LIN CAN FlexRay
Speed 40 kbit/s 1 Mbit/s 10 Mbit/s
Cost $ $$ $$$
Wires 1 2 2 or 4
Typical
Applications
Body
Electronics
Powertrain Safety-critical
apps
CHENG SUN // YINGLAI YANG // YUNNING LI
7. 7
Internal architecture of a node
ο§ CPU: writes
messages into...
ο§ CHI: reserves a
buffer...
ο§ Controller:
reads messages
from...
ο§ Black Chunk:
~Static
ο§ Grey Chunk:
~Dynamic
CHENG SUN // YINGLAI YANG // YUNNING LI
8. 8
Internal architecture of a node
The number
of slots in
ST is fixed,β¦
The size of
each slot is
fixed,β¦
CHENG SUN // YINGLAI YANG // YUNNING LI
9. 9
Delays in dynamic segment
ο§ (1) Delays by higher priority messages.
Here mg and mf
share the same
Frame ID,
but ...
CHENG SUN // YINGLAI YANG // YUNNING LI
10. 10
(1)Delays by higher priority messages
ο§ Here mg is delayed by mf .
CHENG SUN // YINGLAI YANG // YUNNING LI
11. 11
Delays in the dynamic segment
ο§ (2)Delays by earlier (lower frame) messages and without
enough slots left.
Such as mh,
static segment;
Frame ID=5;
Assuming that the
length of mh takes
2 slots
CHENG SUN // YINGLAI YANG // YUNNING LI
12. 12
(2)Delays by earlier (lower FrameID) messages
and without enough slots left.
ο§ We can not
be too
stingy to
mh !
CHENG SUN // YINGLAI YANG // YUNNING LI
13. 13
(2)Delays by earlier (lower FrameID) messages
and without enough slots left.
ο§ Finally, mh
finds an
available
position.
ο§ Althoughβ¦
ο§ What if mg β¦
CHENG SUN // YINGLAI YANG // YUNNING LI
14. 14
Timing analysis
Question for safety issue:
How long can it take until a message reaches its recipient?
βThe driver turns the steering wheel to the left. How long does it maximally
take until the car follows that movement?β
Value of interest:
Worst Response Time β Longest possible time from
creation of message to complete arrival.
CHENG SUN // YINGLAI YANG // YUNNING LI
15. 15
Quantization of delay-causes
Note:
Assume regular, periodic messages with period T (dynamic
messages)
Such a message will occur
π‘+π½
π
times in the time frame π‘.
E.g. βπ π‘ =
π‘+π½βπ
πβπ
for higher priority messages
J is the jitter of the message β difference between best response time to worst response
time
CHENG SUN // YINGLAI YANG // YUNNING LI
16. 16
Definition of response time
Important for us:
Those are the only things that can change.
CHENG SUN // YINGLAI YANG // YUNNING LI
17. 17
Mathematical formulation for π΅π’π πΆπ¦ππππ π
Make it an ILP problem:
Furthermore constraints are added to the ILP formulation
to satisfy the FlexRay protocol β¦
frame overfilled: π¦π = 1
frame can take message: π¦π = 0
CHENG SUN // YINGLAI YANG // YUNNING LI
18. 18
Messages are not sent multiple times per cycle
CHENG SUN // YINGLAI YANG // YUNNING LI
19. 19
FrameIDs are unique
Or: βYou shall not use the same ππππππΌπ· multiple times in
one cycleβ
CHENG SUN // YINGLAI YANG // YUNNING LI
20. 20
Fixed assignment of frameID
Or: βA message can only be transmitted with the ππππππΌπ·
that was assigned to itβ
CHENG SUN // YINGLAI YANG // YUNNING LI
21. 21
Messages need to fit completely
Or: βAny message can only be sent if it fits in the remaining
space.β
CHENG SUN // YINGLAI YANG // YUNNING LI
22. 22
Optimal solution for π€ π
β²
After π΅π’π πΆπ¦ππππ π is known, we maximize the delay in the
cycle where the message π is being sent (inserted in the
dynamic frame).
ILP is used again and the max. π΅π’π πΆπ¦ππππ π is being
enforced. The optimization goal is now to find the largest
possible π€ π
β²
.
Same constraints as before (FlexRay compliance)
CHENG SUN // YINGLAI YANG // YUNNING LI
23. 23
Summary of optimal calculation
ο§ ILP used
ο§ βOptimizationβ goal: Maximize π΅π’π πΆπ¦ππππ π and π€ π
β²
ο§ Constraints used to model FlexRay rules
However:
ο§ ILP is very computationally complex. Takes extremely
long and can exceed available computational power
easily!
CHENG SUN // YINGLAI YANG // YUNNING LI
24. 24
Heuristic Solution for π΅π’π πΆπ¦ππππ π & π€ π
β²
Simplification of calculation of π΅π’π πΆπ¦ππππ π:
Straightforward computation of π€ π
β²
:
CHENG SUN // YINGLAI YANG // YUNNING LI
by adding pessimistic ππ -count to communication time:
25. 25
Experimental Setup
CHENG SUN // YINGLAI YANG // YUNNING LI
OO- is not used in production since it is optimistic about
WRT. It is only used to be able to calculate a common
reference value for OH and HH.
26. 26
Experimental Results
Where A presents OO, OH or HH, and n is the number of
messages in the analyzed application.
CHENG SUN // YINGLAI YANG // YUNNING LI
27. 27
Experimental Results
CHENG SUN // YINGLAI YANG // YUNNING LI
Fewer frameIDs/processor β constraints more important β
heuristics worse
28. 28
Conclusions
ο§ The paper showed a way to analyze the worst response
time.
ο§ It was shown how heuristics can be used to radically
reduce the calculation time of the WRT with a trade off
in additional pessimism of the result.
ο§ Allows timing assertions for safety analysis.
ο§ First paper to analyze dynamic FlexRay timing without
simplifying constraints.
ο§ Good heuristics with very low calculation time.
CHENG SUN // YINGLAI YANG // YUNNING LI
29. 29 CHENG SUN // YINGLAI YANG // YUNNING LI
Thank you for your attention!