SlideShare a Scribd company logo
Pushing the limits of CAN -
   Scheduling frames with offsets
provides a major performance boost

 Nicolas NAVET
 INRIA / RealTime-at-Work

 http://www.loria.fr/~nnavet
 http://www.realtime-at-work.com
 Nicolas.Navet@loria.fr
 ERTS – 30/01/2008

  Joint work with Mathieu GRENIER and Lionel HAVET
In-vehicle networking :
will CAN be able to keep up the pace?
Typically max. bus load is set to 35%
Not enough wrt to short/medium term bandwidth
needs …
  Solution 1: multiple CAN networks … but
  gateways induce heavy overhead
  Solution 2: switch to FlexRay … expensive for
  bandwidth alone
  Solution 3: optimize the scheduling of CAN
  frame .. Offsets provide a solution to make
  CAN predictable at higher network load
  (≥60%)
                                                  2
Scheduling frames with offsets ?!
 Principle: desynchronize transmissions to avoid
 load peaks
0       10        15                                         Periods
0        5         5                                          20 ms
0        0         5                                          15 ms
                                                              10 ms




0       10   20        30   40   50   60    70   80   90   100         110

 5                                     5
2,5                                   2,5                    Periods
 0                                     0
                                                              20 ms
                                                              15 ms
                                                              10 ms



0       10   20        30   40   50   60    70   80   90   100         110



 Algorithms to decide offsets are based on arithmetical
 properties of the periods and size of the frame
                                                                             3
System model (1/2)

                    Frame response time

         task
ECU
           Frame Transmission request


                   Higher prio. frames
                                         frame
CAN


 Performance metric: worst-case response time

                                                 4
System model (2/2)
The offset of a message stream is the time at which
the transmission request of the first frame is issued




Complexity: best choosing the offsets is exponential in
the task periods → approximate solutions
Middleware task imposes a certain granularity
Without ECU synchronisation, offsets are local to ECUs
                                                          5
But task scheduling has to be
                adapted…

                                  Frame response time

           task
ECU
             Frame Transmission request


                     Higher prio. frames
                                           frame
CAN


 In addition, avoiding consecutive frame constructions
on an ECU allows to reduce latency
                                                         6
Offsets Algorithm (1/3)
Ideas:
  assign offsets in the order of the transmission
  frequencies
  release of the first frame is as far as possible
  from adjacent frames
  identify “least loaded interval”
Ex: f1=(T1=10), f2=(T2=20), f3(T3=20)

Time    0 2    4     6    8     10 12 14 16 18
Frame         f1,1       f2,1        f1,2    f3,1


                                                     7
Offsets Algorithm applied on a typical
            body network



                                  65 ms




                                  21 ms




                                          8
Offsets Algorithm (3/3)

Low complexity and efficient as is but
further improvements possible:
  add frame(s) / ECU(s) to an existing design
  user defined criteria : optimize last 10 frames,
  a specific frame,
  take into account priorities
  optimization algorithms: tabu search, hill
  climbing, genetic algorithms
  …



                                                     9
Efficiency of offsets :
               some insight (1/2)


 Work =
 time to
transmit
the CAN
 frames
 sent by
   the
 stations




   Almost a straight line, suggests that our algorithm is near-optimal
                                                                   10
Efficiency of offsets :
           some insight (2/2)




   A larger workload waiting for transmission implies
larger response times for the low priority frames ..
                                                        11
Computing worst-case
response times with offsets
Computing frame worst-case
        response time with offsets
                       AUTOSAR COM

                    5ms       Frame-packing task           Waiting queue:

Requirements :
                                                           -FIFO

                                                       2   -Highest Priority First
- handle 100+ frames                                       (HPF - Autosar)
                                                       1   -Carmaker specific
- very fast execution times
- ≠ waiting queue policy at the                CAN Controller
microcontroller level
                                                   9   6   8
- limited number of transmission
buffers                                                        buffer Tx
                                                                           CAN Bus

                                                                                     13
WCRT : State of the art
Scientific literature:
  Complexity is exponential
  No schedulability analysis with offsets in the
  distributed non-preemptive case
  Offsets in the preemptive case : not suited
  for > 10-20 tasks
  WCRT without offsets: infinite number of Tx
  buffers and no queue at the microcontroller
  level
Our software: NETCAR-Analyzer

                                                   14
NETCAR-Analyzer : developed at INRIA, then RealTime-at-Work




                                                          15
NETCAR-Analyzer : an overview
   Worst-case response time on CAN with and without
offsets
  Proven near-optimal offsets assignments with user-
defined performance criteria (e.g. WCRT of the 10 lowest prio.
frames)

   Exhibit the situations leading to the worst-case (results can
be checked by simulations/testing)

  Enable to dimension transmission/reception buffers
(RAM)
   Handle both FIFO and prioritized ECUs
   Fast multi-core implementation (<1mn for 100 frames)
   Industrial use since December 2006

                                                                   16
Performance evaluation :
  Experimental Setup
  WCRT of the frames wrt random offsets
and lower bound
  WCRT reduction ratio for chassis and body
networks
  Load increase : add new ECUs / add more
traffic
Experimental Setup

   Body and chassis networks
Network   #ECUs    #Messages   Bandwidth    Frame periods
 Body      15-20     ≈ 70       125Kbit/s      50ms-2s
Chassis     5-15     ≈ 60       500Kbit/s      10ms-1s

With / without load concentration: one ECU generates 30%
of the load


  Set of frames generated with NETCARBENCH
 (GPL-licenced)
                                                       18
Offsets in practice : large response
     time improvements (1/2)



                               65 ms



                               32
                               21
                               17




                                       19
WCRT Reduction Ratio

    Body Networks               Chassis Networks




Results are even better with loaded stations

                                                   20
Offsets allow higher network loads
 Typically: WCRT at 60% with offsets ≈ WCRT
 at 30% without offsets




                                              21
Partial offset usage



                       65 ms


                       42
                       34
                       17




                               22
Conclusions
  Offsets provide an cost-effective short-term
  solution to postpone multiple CANs and FlexRay
  Tradeoff between Event and Time Triggered

  ET CAN        CAN with offsets    TT-CAN

                                     + Complexity
                                     + Determinism

  Further large improvements are possible by
synchronizing the ECUs …


                                                   23
Questions, feedback?
please contact me at
Nicolas.Navet@loria.fr




                         24

More Related Content

DOCX
Vlsi interview questions compilation
PDF
Instrumenting parsecs raytrace
PDF
Multicore scheduling in automotive ECUs
PDF
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
PDF
Lect.10.arm soc.4 neon
PPT
PPT
PDF
Implementing Useful Clock Skew Using Skew Groups
Vlsi interview questions compilation
Instrumenting parsecs raytrace
Multicore scheduling in automotive ECUs
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
Lect.10.arm soc.4 neon
Implementing Useful Clock Skew Using Skew Groups

What's hot (20)

PDF
Extending TFWC towards Higher Throughput
PPTX
TCP Congestion Control By Owais Jara
PDF
Docsis cmts receiver
PDF
FlexRay Product Days RTaW
PDF
idle mode_operation_v1.1_chema
PDF
PPT
Tcp congestion avoidance algorithm identification
PPT
TCP congestion control
PDF
10 fn s22
PDF
Cat @ scale
PPT
Csma(carriers sense-multiple-acess)
PPTX
Cubic
PPT
Tcp congestion control (1)
PDF
Java and Containers - Make it Awesome !
PDF
Lightweight DNN Processor Design (based on NVDLA)
PPT
Resolution enhancement of low-quality videos using a high-resolution frame
PPTX
A Prototype Storage Subsystem based on Phase Change Memory
PDF
Dan_Duncan_PhD_Defense
PPT
Tcp congestion control
PPT
Introduction to Real Time Java
Extending TFWC towards Higher Throughput
TCP Congestion Control By Owais Jara
Docsis cmts receiver
FlexRay Product Days RTaW
idle mode_operation_v1.1_chema
Tcp congestion avoidance algorithm identification
TCP congestion control
10 fn s22
Cat @ scale
Csma(carriers sense-multiple-acess)
Cubic
Tcp congestion control (1)
Java and Containers - Make it Awesome !
Lightweight DNN Processor Design (based on NVDLA)
Resolution enhancement of low-quality videos using a high-resolution frame
A Prototype Storage Subsystem based on Phase Change Memory
Dan_Duncan_PhD_Defense
Tcp congestion control
Introduction to Real Time Java
Ad

Viewers also liked (7)

PDF
Automotive communication systems: from dependability to security
PDF
Isi2007 nn shc_2007
PDF
Automating the Configuration of the FlexRay Communication Cycle
PDF
New policies
PDF
Mécanismes de protection dans AUTOSAR OS
PDF
In-Vehicle Networking : a Survey and Look Forward
PPT
Battery Aware Dynamic Scheduling for Periodic Task Graphs
Automotive communication systems: from dependability to security
Isi2007 nn shc_2007
Automating the Configuration of the FlexRay Communication Cycle
New policies
Mécanismes de protection dans AUTOSAR OS
In-Vehicle Networking : a Survey and Look Forward
Battery Aware Dynamic Scheduling for Periodic Task Graphs
Ad

Similar to Pushing the limits of CAN - Scheduling frames with offsets provides a major performance boost (20)

PDF
Frame latency evaluation: when simulation and analysis alone are not enough
PPT
Pushing the limits of Controller Area Network (CAN)
PDF
CAN in Automotive Applications: a Look Forward
PDF
Configuring the communication on FlexRay: the case of the static segment
PDF
CESEC_CAN for automotive communication which can used
PDF
Real-time Systems Design (part I)
PDF
Ertss2010 multicore scheduling
PDF
Ec 2 traffic signal controller brochure
PDF
Green Telecom & IT Workshop: Ee routing and networking thierry klein
PPT
16 high speedla-ns
PPT
16 high speedla-ns
PDF
Fcamp may2010-tech2-fpga high speed io trends-alteraTrends & Challenges in De...
PDF
PDF
Putting 50-ms In Perspective
PDF
IMPROVING TRANSMISSION EFFICIENCY IN OPTICAL COMMUNICATION
PDF
Multithreaded Data Transport
PPTX
Solace Systems The Evolution of Messaging The Rise of the Appliance
PPTX
Extent 2013 Obninsk High Performance Messaging
PDF
Telco Evangelist Presentation Nsn
PPTX
IEEE 802.22 WRAN Standard
Frame latency evaluation: when simulation and analysis alone are not enough
Pushing the limits of Controller Area Network (CAN)
CAN in Automotive Applications: a Look Forward
Configuring the communication on FlexRay: the case of the static segment
CESEC_CAN for automotive communication which can used
Real-time Systems Design (part I)
Ertss2010 multicore scheduling
Ec 2 traffic signal controller brochure
Green Telecom & IT Workshop: Ee routing and networking thierry klein
16 high speedla-ns
16 high speedla-ns
Fcamp may2010-tech2-fpga high speed io trends-alteraTrends & Challenges in De...
Putting 50-ms In Perspective
IMPROVING TRANSMISSION EFFICIENCY IN OPTICAL COMMUNICATION
Multithreaded Data Transport
Solace Systems The Evolution of Messaging The Rise of the Appliance
Extent 2013 Obninsk High Performance Messaging
Telco Evangelist Presentation Nsn
IEEE 802.22 WRAN Standard

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Programs and apps: productivity, graphics, security and other tools
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Spectroscopy.pptx food analysis technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Big Data Technologies - Introduction.pptx
NewMind AI Weekly Chronicles - August'25 Week I
MYSQL Presentation for SQL database connectivity
Programs and apps: productivity, graphics, security and other tools
The AUB Centre for AI in Media Proposal.docx
Spectral efficient network and resource selection model in 5G networks
Network Security Unit 5.pdf for BCA BBA.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Encapsulation_ Review paper, used for researhc scholars
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Electronic commerce courselecture one. Pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
MIND Revenue Release Quarter 2 2025 Press Release
Spectroscopy.pptx food analysis technology
Advanced methodologies resolving dimensionality complications for autism neur...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

Pushing the limits of CAN - Scheduling frames with offsets provides a major performance boost

  • 1. Pushing the limits of CAN - Scheduling frames with offsets provides a major performance boost Nicolas NAVET INRIA / RealTime-at-Work http://www.loria.fr/~nnavet http://www.realtime-at-work.com Nicolas.Navet@loria.fr ERTS – 30/01/2008 Joint work with Mathieu GRENIER and Lionel HAVET
  • 2. In-vehicle networking : will CAN be able to keep up the pace? Typically max. bus load is set to 35% Not enough wrt to short/medium term bandwidth needs … Solution 1: multiple CAN networks … but gateways induce heavy overhead Solution 2: switch to FlexRay … expensive for bandwidth alone Solution 3: optimize the scheduling of CAN frame .. Offsets provide a solution to make CAN predictable at higher network load (≥60%) 2
  • 3. Scheduling frames with offsets ?! Principle: desynchronize transmissions to avoid load peaks 0 10 15 Periods 0 5 5 20 ms 0 0 5 15 ms 10 ms 0 10 20 30 40 50 60 70 80 90 100 110 5 5 2,5 2,5 Periods 0 0 20 ms 15 ms 10 ms 0 10 20 30 40 50 60 70 80 90 100 110 Algorithms to decide offsets are based on arithmetical properties of the periods and size of the frame 3
  • 4. System model (1/2) Frame response time task ECU Frame Transmission request Higher prio. frames frame CAN Performance metric: worst-case response time 4
  • 5. System model (2/2) The offset of a message stream is the time at which the transmission request of the first frame is issued Complexity: best choosing the offsets is exponential in the task periods → approximate solutions Middleware task imposes a certain granularity Without ECU synchronisation, offsets are local to ECUs 5
  • 6. But task scheduling has to be adapted… Frame response time task ECU Frame Transmission request Higher prio. frames frame CAN In addition, avoiding consecutive frame constructions on an ECU allows to reduce latency 6
  • 7. Offsets Algorithm (1/3) Ideas: assign offsets in the order of the transmission frequencies release of the first frame is as far as possible from adjacent frames identify “least loaded interval” Ex: f1=(T1=10), f2=(T2=20), f3(T3=20) Time 0 2 4 6 8 10 12 14 16 18 Frame f1,1 f2,1 f1,2 f3,1 7
  • 8. Offsets Algorithm applied on a typical body network 65 ms 21 ms 8
  • 9. Offsets Algorithm (3/3) Low complexity and efficient as is but further improvements possible: add frame(s) / ECU(s) to an existing design user defined criteria : optimize last 10 frames, a specific frame, take into account priorities optimization algorithms: tabu search, hill climbing, genetic algorithms … 9
  • 10. Efficiency of offsets : some insight (1/2) Work = time to transmit the CAN frames sent by the stations Almost a straight line, suggests that our algorithm is near-optimal 10
  • 11. Efficiency of offsets : some insight (2/2) A larger workload waiting for transmission implies larger response times for the low priority frames .. 11
  • 13. Computing frame worst-case response time with offsets AUTOSAR COM 5ms Frame-packing task Waiting queue: Requirements : -FIFO 2 -Highest Priority First - handle 100+ frames (HPF - Autosar) 1 -Carmaker specific - very fast execution times - ≠ waiting queue policy at the CAN Controller microcontroller level 9 6 8 - limited number of transmission buffers buffer Tx CAN Bus 13
  • 14. WCRT : State of the art Scientific literature: Complexity is exponential No schedulability analysis with offsets in the distributed non-preemptive case Offsets in the preemptive case : not suited for > 10-20 tasks WCRT without offsets: infinite number of Tx buffers and no queue at the microcontroller level Our software: NETCAR-Analyzer 14
  • 15. NETCAR-Analyzer : developed at INRIA, then RealTime-at-Work 15
  • 16. NETCAR-Analyzer : an overview Worst-case response time on CAN with and without offsets Proven near-optimal offsets assignments with user- defined performance criteria (e.g. WCRT of the 10 lowest prio. frames) Exhibit the situations leading to the worst-case (results can be checked by simulations/testing) Enable to dimension transmission/reception buffers (RAM) Handle both FIFO and prioritized ECUs Fast multi-core implementation (<1mn for 100 frames) Industrial use since December 2006 16
  • 17. Performance evaluation : Experimental Setup WCRT of the frames wrt random offsets and lower bound WCRT reduction ratio for chassis and body networks Load increase : add new ECUs / add more traffic
  • 18. Experimental Setup Body and chassis networks Network #ECUs #Messages Bandwidth Frame periods Body 15-20 ≈ 70 125Kbit/s 50ms-2s Chassis 5-15 ≈ 60 500Kbit/s 10ms-1s With / without load concentration: one ECU generates 30% of the load Set of frames generated with NETCARBENCH (GPL-licenced) 18
  • 19. Offsets in practice : large response time improvements (1/2) 65 ms 32 21 17 19
  • 20. WCRT Reduction Ratio Body Networks Chassis Networks Results are even better with loaded stations 20
  • 21. Offsets allow higher network loads Typically: WCRT at 60% with offsets ≈ WCRT at 30% without offsets 21
  • 22. Partial offset usage 65 ms 42 34 17 22
  • 23. Conclusions Offsets provide an cost-effective short-term solution to postpone multiple CANs and FlexRay Tradeoff between Event and Time Triggered ET CAN CAN with offsets TT-CAN + Complexity + Determinism Further large improvements are possible by synchronizing the ECUs … 23
  • 24. Questions, feedback? please contact me at Nicolas.Navet@loria.fr 24