Simulation based Timing Analysis of FlexRay Communication at System Level Stefan Buschmann Till Steinbach Franz Korf Thomas C. Schmidt stefan.buschmann@haw-hamburg.de {till.steinbach, korf, schmidt}@informatik.haw-hamburg.de 6th International Workshop on March 5th, 2013 NET
Agenda 1 2 3 4 5 2 / 21
Motivation Why simulate FlexRay on system level? State-of-the-art automotive fieldbus Simulation of complex networks Important in automotive development 3 / 21
Goals Configurable FlexRay simulation Compliant to FlexRay specification Compatible with other simulation models CAN, Real-time Ethernet, Ethernet-AVB 4 / 21
Agenda 1 2 3 4 5 4 / 21
FlexRay Technical features Layer 1 and 2 in the OSI model Communication over two channels Redundant transmission Different data per channel 10 MBit/s per channel Synchronised time base Event- and time-triggered communication 5 / 21
FlexRay Communication cycle dynamic segment dynamic segment Segment Slot 1 2 3 4 5 6 7 8 1 2 3 4 5 6 8 9 10 cycle 0 cycle 1 Node 1 Node 2 Node 3 Node 4 static segment network idle time symbol window static segment Time-triggered communication Event-triggered communication 6 / 21
FlexRay Synchronisation Time measurement with synchronisation messages in the static segment Combination of two synchronisation methods Offset correction deviation node 1 t node 2 Rate correction deviation node 1 t node 2 7 / 21
For the FlexRay model Layer 2 in the OSI model FlexRay functions Communication Synchronisation Implementation of a model of an oscillator Configuration of the network structure and the parameters System level error detection 8 / 21
Agenda 1 2 3 4 5 8 / 21
Architecture FlexRay nodes as modules Bus topology as module 9 / 21
Node Several submodules Connection to the bus module Independent configuration 10 / 21
Topology only provides point to point communication Bus topology Realised as module Provides a maximum of two connections for each node Distribution of incoming messages unit1 unit2 bus unit3 unit4 unit5 channel A channel B 11 / 21
Model of the oscillator Very accurate model would simulate every tick Huge amount of events Our approach for the clock drift Only one drift value per cycle Reducing the number of events Cycle Cycle Cycle Event Event Constant Ticklength Event variable Driftfactor t 12 / 21
Agenda 1 2 3 4 5 12 / 21
Protocol conformance & error detection Protocol conformance: are fulfilled Typical error detection: Configuration problems Too many sync nodes Frames in the same slot Timing errors Frames in wrong slot 13 / 21
Latency Analysis for the dyn. segment Simulation parameter 4 nodes 10 minislots Transmission points distributed over dynamic segment Dynamic frames require 1 to 3 minislots minislot ID dynamic segment 1 2 3 4 11 12 13 14 15 16 17 18 19 20 14 / 21
Latency Analysis for the dyn. segment Latency of frames with different IDs 3,3 ID 1 1 T im e fo r B u s A c c e s s [m s ] 3,2 3,3 3,2 1 0 8 6 4 2 0 6 0 5 0 4 0 3 0 2 0 1 0 ID 1 5 ID 1 7 ID 1 9 0 0,0 0,3 1 2 3 4 5 S im u la tio n T im e [s ] 15 / 21
Latency Analysis for the dyn. segment Latency distribution R e la tiv e N u m b e r o f P a c k e ts [% ] 1 0 0 9 5 9 8 7 6 5 4 3 2 1 0 ID 1 1 ID 1 5 ID 1 7 ID 1 9 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 T im e fo r B u s A c c e s s [m s ] 16 / 21
Performance test Several networks of various size Only messages in the static segment Further parameters identical number of nodes channels t_sim/t_real [s] 10 single 0.96 20 single 0.58 30 single 0.45 10 dual 0.62 20 dual 0.32 Nearly worst case scenario Timing parameter and configuration have a large influence 17 / 21
Evaluation against CANoe Comparison of latency results CANoe Commercial network simulator Variety of automobile communication protocols Two equal networks Three nodes Same parameters Same behaviour in both networks Amount and timing of messages Repressed dynamic frames Difference of approximatly 100 ns 18 / 21
Agenda 1 2 3 4 5 18 / 21
Conclusion System level simulation Support of different applications Evaluation against CANoe Can be used for simulation of complete communication-matrices 19 / 21
Outlook Extension of the simulation Active star topology Startup procedure and node integration during operation Gateway between FlexRay and other communication models Simulation of complex real communication-matrices 20 / 21
Thank you! Thank you for your attention! Website of Co research group: http://www.haw-hamburg.de/core 21 / 21