In search for the Perfect Timing to Switch from CAN to FlexRay Kai Richter Symtavision GmbH Braunschweig, Germany
In search for the Perfect Timing to Switch from CAN to FlexRay
Kai RichterSymtavision GmbH
Braunschweig, Germany
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
2
Outline
History on “electronics and cables in cars”
FlexRay on the RoadKey questions with FlexRay from a performance & timing perspective
Technical implicationsComparison: CAN vs. FlexRay
Design process implicationsExperience from Practice
Conclusion
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
3
Electronics and cables in cars
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
4
Volkswagen Beetle, 1960
6 V “network” voltage“winkers” instead of “blinkers”no integrated circuitsno software
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
5
Bosch Anti-lock braking: Mercedes S-Series 1978
BMW 7 seriesDecember, same year
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
6
First CAN buses in cars, Mercedes S-Series, 1992
2 CAN busesfew ECUs: ABS (anti-lock breaking), engine control, some body(Gateway)
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
7
Mercedes E-series, 2006
55 ECUs (electronic control units, tens of megabytes of software)4 CAN buses (bis 500kbit/s)2 LIN buses1 MOST ring1 PRIVATE bus
24V
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
8
Typical mid-class network architecture today
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
9
FlexRay on the Road
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
10
FlexRay on the Road
first use in distributed control: chassis domain / active safetygoal of early adopters: innovation demonstration, key new functionsstill high risk / costfuture: risk/cost will drop, FlexRay attractive for other domains & markets
AUDI Concept Pegasus
2006: BMW X5 – Adaptive Drive 2009: BMW 7
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
11
Key questions
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
12
Key questions
When to transition from CAN to FlexRay?
When is CAN no longer good, fast, cheap or extensible enough?
Can we postpone FlexRay and save cost? How long, how much?
How to define a communication platform strategy?
What helps answering these question?
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
13
Most popular arguments pro FlexRay
FlexRay provides
20-times higher bandwidth than CAN
deterministic timing through synchronization and static slots
failure safety through redundant channels
... and the trigger condition for a transition
... so CAN is no longer enough if
... CAN bandwidth is exhausted, blocking necessary extensions.
... exact predictability is essential
... failure safety is required and no alternative solution exists.private CAN for break assistant
can the bandwidth always be exploited ?
is synchronization easy ?
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
14
Technical implications
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
15
Timing Effects along End-to-End Signal Flow
Over- and under-sampling
Signal jitter due to preemptive task layouts
Signal-to-frame multiplexing
Synchronous & asynchronous systems
Access to signal buffers (RTE) must be considered
application software (function)
COM layer (communication)
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
16
Layered Automotive Software
RTE “decouples” application timing from communication timingsignal timing at RTE has significant influence on end-to-end timing
ECU 3
BSW
I/OCOM
ECU 2ECU 1
VFB
BSW
I/O COM
RTE RTE
SensorSWC
ControllerSWC
RTE
ActuatorSWC
BSW
COM
Hardware Hardware
Bus
OS
time
base
Bus
tim
e ba
seC
OM
tim
e ba
se
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
17
RTE
RTE
Tread
Twrite
Tread
dupe
lostlost lost lost
dupedupe dupe
Twrite
Frequency Changes at RTE
over-sampling signal duplicates
under-sampling lost signals
more complex with non-harmonic frequencies, e.g. 50ms vs. 80ms.
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
18
faster receiver varying delays & signal duplicates
faster sender lost signals & varying delays
Clock Skew Effects in Asynchronous Systems
RTEduplicate duplicate
RTElost
Twrite
Tread
Twrite
Tread
lost
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
19
RTE
Twrite Jwrite
Tread
lostduplicate
Twrite
response time
interference (preemptions,
interrupts)
functionaltasks
Signal Jitter
varying task & function response times due to scheduling
lost signals & duplicates even in synchronized case
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
20
Comparison: CAN vs. FlexRay
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
21
Simple Network Topology Example
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
22
signal written to RTE
frame generated in COM
frame available for reading at receiver signal read from RTE
RTE delay
143 msnetwork delay(RTE-to-RTE)
CAN vs. FlexRay –Step 1: existing CAN Communication
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
23
signal written to RTE
frame generated in COM
frame available for reading at receiver
signal read from RTE
RTE delay
120 msnetwork delay(RTE-to-RTE)
Step 2: Asynchronous ECUs on FlexRay
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
24
reduced network delaybut 50ms additional delay due to undersampling with poor synchronization lost signals
signal overwritten to RTE
signal read from RTE
network delay(RTE-to-RTE)
20 ms
Step 3a: Synchronized ECUs on FlexRay (poor synchronization)
50ms
signal written to RTE
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
25
signal written to RTE
signal read from RTE
network delay(RTE-to-RTE)
Step 3b: Synchronized ECUs on FlexRay (optimized synchronization)
20 ms
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
26
Original CAN SystemCommunication Delay: 143msEnd-to-end Delay (estimated): 291ms
FlexRay, asynchronous ECUsCommunication Delay: 120msEnd-to-end Delay (estimated): 268ms
FlexRay, poor synchronizationCommunication Delay: 20msUndersampling Delay: 50msEnd-to-end Delay (estimated): 218ms
FlexRay, optimized synchronizationCommunication Delay: 20msUndersampling Delay: 0msEnd-to-end Delay (estimated): 168ms
Summary of Alternatives
Gateway
ECU1
CAN1 CAN2
CAN2
ECU2
ECU3
ECU4
ECU5
ECU6
ECU8ECU7
FlexRay
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
27
Design process implications
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
28
Design process implications
Decision for transition from CAN to FlexRaybenefit must be determined in early design stagestiming requirements must be known to take optimized decisionsprocess must be in place to explore different architectural choices
collateral benefit: this will also help to live longer with CAN
PLUS: Impact of bus extension or use of event triggered communication:CAN:
incremental bus load increasesincremental degradation of performance
FlexRay: static allocation of bandwidth compromises incremental designbinary performance degradation
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
29
Network Architecture Design Process at DAIMLERFlexibilityPlatformMigrationOptimization
Existing Communication
Database
Constraints
Innovations
Architecture Generation
Architecture Evaluation
ManufacturerStrategy
... ...
...
...
...
...
...
... ......
...
... ... ...
... ...
...
...
...
... ...
......
... ...
...
...
figure courtesy of DAIMLER
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
30
Future Estimation: CAN vs. FlexRay
Source: SAE 2009, figure courtesy of DAIMLER
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
31
CAN Network Design Enhancement
Source: ATZ Elektronik, Issue 03.2009, figure courtesy of DAIMLER
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
32
Conclusions
In search for the Perfect Timing to Switch from CAN to FlexRayKai Richter© 2009, Symtavision GmbH, Germany
33
Conclusion
Key question: When to move from CAN to FlexRay
FlexRay is no „silver bullet“ against performance and timing problemsmany new effects must be considered (sampling, jitter, synch)flexibility (dynamic behavior) and extensibility (incremental design) must be considered carefully
optimal transition to FlexRay requires systematic exploration ofalternativesarchitecture generation, evaluation and comparisoncollateral benefit: this will also help to live longer with CAN
process is in place; DAIMLER (and others) use SymTA/S and PREEvisioncan be customized to OEM specific platform strategy