Traversal time for weakly synchronized CAN bus Hugo Daigmorte, Marc - - PowerPoint PPT Presentation

traversal time for weakly synchronized can bus
SMART_READER_LITE
LIVE PREVIEW

Traversal time for weakly synchronized CAN bus Hugo Daigmorte, Marc - - PowerPoint PPT Presentation

Context and goal Computing an upper bound on network delay Experimental results Conclusion Traversal time for weakly synchronized CAN bus Hugo Daigmorte, Marc Boyer ONERA The French aerospace lab 24th International Conference on Real-Time


slide-1
SLIDE 1

Context and goal Computing an upper bound on network delay Experimental results Conclusion

Traversal time for weakly synchronized CAN bus

Hugo Daigmorte, Marc Boyer

ONERA – The French aerospace lab 24th International Conference on Real-Time Networks and Systems RTNS’2016 19th October 2016

C
  • n
s i s t e n t * C
  • m
p l e t e * W e l l d
  • c
u m e n t e d * E a s y t
  • r
e u s e *

*

E v a l u a t e d

* R T N S *

A r t i f a c t

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 1 / 24

slide-2
SLIDE 2

Context and goal Computing an upper bound on network delay Experimental results Conclusion Context and goal Global clock Local clock Bounded phases

Table of Contents

1

Context and goal Context and goal Global clock Local clock Bounded phases

2

Computing an upper bound on network delay

3

Experimental results

4

Conclusion

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 2 / 24

slide-3
SLIDE 3

Context and goal Computing an upper bound on network delay Experimental results Conclusion Context and goal Global clock Local clock Bounded phases

Context

Context Real-time networked system Bus network: CAN Periodic flows with Offsets

reduces contentions ⇒ reduces delays requires synchronization

CAN Node n°N CAN Node n°2 CAN Node n°1

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 3 / 24

slide-4
SLIDE 4

Context and goal Computing an upper bound on network delay Experimental results Conclusion Context and goal Global clock Local clock Bounded phases

Model and Goal

Model Flows Fi: Pi, Si, Oi N nodes, each node j has a clock: cj(t) Sending frame k: cj(t) = Oi + kPi Goal Accurate bound on network traversal time aka Worst Case Traversal Time (WCTT)

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 4 / 24

slide-5
SLIDE 5

Context and goal Computing an upper bound on network delay Experimental results Conclusion Context and goal Global clock Local clock Bounded phases

Global clock

∀j, j′ : cj(t) = cj′(t) Advantage: efficient schedule ⇒ no contention Drawback: perfect synchronization (HW/SW cost)

A,1 B,1 A,2 C,3 C,1 C,2 A,1 B,1 A,2 C,1 C,2 C,3 BUS N1 N2 BUS

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 5 / 24

slide-6
SLIDE 6

Context and goal Computing an upper bound on network delay Experimental results Conclusion Context and goal Global clock Local clock Bounded phases

Local clock

Advantage: efficient schedule ⇒ no contention intra-nodes efficient schedule ⇒ workload spread over time

N1 N2 BUS BUS A,1 B,1 A,2 C,3 C,1 C,2 A,1 B,1 A,2 C,1 C,2 C,3

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 6 / 24

slide-7
SLIDE 7

Context and goal Computing an upper bound on network delay Experimental results Conclusion Context and goal Global clock Local clock Bounded phases

Bounded phases

∀j, j′ : cj(t) − cj′(t) ≤ Φj,j′ Objectives: affordable synchronization reduces delays wrt no sync/local clock

N1 N2 BUS BUS A,1 B,1 A,2 C,3 C,1 C,2 A,1 B,1 A,2 C,1 C,2 C,3

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 7 / 24

slide-8
SLIDE 8

Context and goal Computing an upper bound on network delay Experimental results Conclusion Network Calculus Methodology

Table of Contents

1

Context and goal

2

Computing an upper bound on network delay Network Calculus Methodology

3

Experimental results

4

Conclusion

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 8 / 24

slide-9
SLIDE 9

Context and goal Computing an upper bound on network delay Experimental results Conclusion Network Calculus Methodology

Reality modeling

Network Calculus is a theory designed to compute memory and delay bounds in networks. A αA+A′ Flow : Cumulative curve A

A(t) : amount of data sent up to time t Properties: null at 0 (and before), non decreasing

Server: simple arrival/departure relation:

Property: departure produced after arrival: A

S

− → D = ⇒ A ≥ D

Worst delay: d(A, S) = sup

t∈R+{inf{d ∈ R+|A(t) ≤ D(t + d)}}

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 9 / 24

slide-10
SLIDE 10

Context and goal Computing an upper bound on network delay Experimental results Conclusion Network Calculus Methodology

Arrival curve and services

Real behaviors are unknown at design time ⇒ use of contracts Traffic contract: arrival curve A flow A has arrival curve α iff: ∀t, d ∈ R+ : A(t + d) − A(t) ≤ α(d) Server contract: service curve For t, s in the same busy/backlogged period, a server S offers a strict minimal service of curve β iff: D(t) − D(s) ≥ β(t − s)

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 10 / 24

slide-11
SLIDE 11

Context and goal Computing an upper bound on network delay Experimental results Conclusion Network Calculus Methodology

A common period

Problem transformation

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 11 / 24

slide-12
SLIDE 12

Context and goal Computing an upper bound on network delay Experimental results Conclusion Network Calculus Methodology

A common period

Problem transformation Initial problem: Flow : Fi =< Ti, Oi, Si >, F = {F1, .., Fn}

1 source periodic messages Size, Period, Offset Priority

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 11 / 24

slide-13
SLIDE 13

Context and goal Computing an upper bound on network delay Experimental results Conclusion Network Calculus Methodology

A common period

Problem transformation Initial problem: Flow : Fi =< Ti, Oi, Si >, F = {F1, .., Fn}

1 source periodic messages Size, Period, Offset Priority

Transformed problem: A = {A1, .., Am}

Period T = ppcm(Ti) Offset Oj Size Sj

Donner un exemple (avec figure)

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 11 / 24

slide-14
SLIDE 14

Context and goal Computing an upper bound on network delay Experimental results Conclusion Network Calculus Methodology

Arrival curve

Arrival curve α1..k (Theorem 5) Capture the synchronization Efficient algorithm Required common period

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 12 / 24

slide-15
SLIDE 15

Context and goal Computing an upper bound on network delay Experimental results Conclusion Network Calculus Methodology

A O P α A′ O′ P α A + A′ 2α αA+A′

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 13 / 24

slide-16
SLIDE 16

Context and goal Computing an upper bound on network delay Experimental results Conclusion Network Calculus Methodology

State of the art: hDev(Ai, Di) ≤ hDev(αi, β −

j<i

αj − L)

1 Method 1: hDev(Ai, Di) ≤ hDev(αi, β − α1..i−1 − L)

Taking into account synchronization between flows A1..Ai−1

αi β − α1..i−1 − L

hDev(αi, βi − α1..i−1)

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 14 / 24

slide-17
SLIDE 17

Context and goal Computing an upper bound on network delay Experimental results Conclusion Network Calculus Methodology 2 Method 2: hDev(Ai, Di) ≤ (β − α1..i − L)−1(0)

Bound busy period for high priority flows (1..i) Pessimistic if several messages of the same flow are in the same busy period

(

  • β

α1

. . i

  • L

)

  • 1

( )

i,1 i,2 i,1 i,2

8,6cm

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 15 / 24

slide-18
SLIDE 18

Context and goal Computing an upper bound on network delay Experimental results Conclusion Network Calculus Methodology 3 Method 3 (Theorem 3): hDev(Ai, Di) ≤ hDev(Ai, Di)

Requires good knowledge of Ai

Ai Di Di

hDev(Ai, Di) hDev(Ai, Di)

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 16 / 24

slide-19
SLIDE 19

Context and goal Computing an upper bound on network delay Experimental results Conclusion Phases bounded by 0ms Phases bounded by ±1ms Phases bounded by ±5ms Phases bounded by ±10ms

Table of Contents

1

Context and goal

2

Computing an upper bound on network delay

3

Experimental results Phases bounded by 0ms Phases bounded by ±1ms Phases bounded by ±5ms Phases bounded by ±10ms

4

Conclusion

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 17 / 24

slide-20
SLIDE 20

Context and goal Computing an upper bound on network delay Experimental results Conclusion Phases bounded by 0ms Phases bounded by ±1ms Phases bounded by ±5ms Phases bounded by ±10ms

Configuration under study 250 kbit/s 10 nodes 62 flows Load: 35% Period: {20,50,100,200,500,1000} Payload: 1-8 bytes

1 2 3 4 5 6 7 8 9 Frame payload (bytes) 101 102 103 Period (ms) 1 1 1 1 2 3 2 1 3 1 2 1 2 2 1 1 1 1 2 3 1 3 2 1 1 1 4 2 3 2 1 3 1 1 3 1

Method Synchronization WCTT Method 1 Phases Bound Method 2 Phases Bound Method 3 Phases Bound Method 4 Local clocks Exact Method 5 Global clock Bound Method 6 No offsets Exact Phases : cj(t) − c′

j (t) ≤ Φ, Local clocks : Φ = ∞,

Global clocks : Φ = 0, No offset : Oi = 0/unknown

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 18 / 24

slide-21
SLIDE 21

Context and goal Computing an upper bound on network delay Experimental results Conclusion Phases bounded by 0ms Phases bounded by ±1ms Phases bounded by ±5ms Phases bounded by ±10ms

10 20 30 40 50 60 Frame by decreasing priority 2 4 6 8 10 12 14 Response times in ms

Local clocks: Method 4 Global clock: Method 5 No offsets: Method 6

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 19 / 24

slide-22
SLIDE 22

Context and goal Computing an upper bound on network delay Experimental results Conclusion Phases bounded by 0ms Phases bounded by ±1ms Phases bounded by ±5ms Phases bounded by ±10ms

10 20 30 40 50 60 Frame by decreasing priority 2 4 6 8 10 12 14 Response times in ms

Phases: Method 1 Phases: Method 2 Phases: Method 3 Local clocks: Method 4 Global clock: Method 5 No offsets: Method 6

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 20 / 24

slide-23
SLIDE 23

Context and goal Computing an upper bound on network delay Experimental results Conclusion Phases bounded by 0ms Phases bounded by ±1ms Phases bounded by ±5ms Phases bounded by ±10ms

10 20 30 40 50 60 Frame by decreasing priority 2 4 6 8 10 12 14 Response times in ms

Phases: Method 1 Phases: Method 2 Phases: Method 3 Local clocks: Method 4 No offsets: Method 6

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 21 / 24

slide-24
SLIDE 24

Context and goal Computing an upper bound on network delay Experimental results Conclusion Phases bounded by 0ms Phases bounded by ±1ms Phases bounded by ±5ms Phases bounded by ±10ms

10 20 30 40 50 60 Frame by decreasing priority 2 4 6 8 10 12 14 Response times in ms

Phases: Method 1 Phases: Method 2 Phases: Method 3 Local clocks: Method 4 No offsets: Method 6

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 22 / 24

slide-25
SLIDE 25

Context and goal Computing an upper bound on network delay Experimental results Conclusion Phases bounded by 0ms Phases bounded by ±1ms Phases bounded by ±5ms Phases bounded by ±10ms

10 20 30 40 50 60 Frame by decreasing priority 2 4 6 8 10 12 14 Response times in ms

Phases: Method 1 Phases: Method 2 Phases: Method 3 Local clocks: Method 4 No offsets: Method 6

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 23 / 24

slide-26
SLIDE 26

Context and goal Computing an upper bound on network delay Experimental results Conclusion

Offsets pro/cons

Pro: reduced contention and delays Cons: global clock has HW/SW cost

Is there a benefit even with a weak inter-nodes synchronization ?

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 24 / 24

slide-27
SLIDE 27

Context and goal Computing an upper bound on network delay Experimental results Conclusion

Offsets pro/cons

Pro: reduced contention and delays Cons: global clock has HW/SW cost

Is there a benefit even with a weak inter-nodes synchronization ? Great results

Phases 10% minimal period ⇒ Gains 75% Phases 50% minimal period ⇒ Gains 45%

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 24 / 24

slide-28
SLIDE 28

Context and goal Computing an upper bound on network delay Experimental results Conclusion

Offsets pro/cons

Pro: reduced contention and delays Cons: global clock has HW/SW cost

Is there a benefit even with a weak inter-nodes synchronization ? Great results

Phases 10% minimal period ⇒ Gains 75% Phases 50% minimal period ⇒ Gains 45%

Further work

Model clock drift and re-synchronization Enhance the analysis Compare analytic results to simulation results Create a dedicated offset algorithm

  • H. Daigmorte, M. Boyer

Traversal time for weakly synchronized CAN bus 24 / 24