230 likes | 362 Views
Netcarbench. A Benchmark for Techniques and Tools used in the Design of Automotive Communication Systems. Christelle BRAUN Lionel HAVET Nicolas NAVET. LORIA-INRIA Campus Scientifique, B.P. 239 54506 Vandoeuvre-les-Nancy, France.
E N D
Netcarbench A Benchmark for Techniques and Tools used in the Design of Automotive Communication Systems Christelle BRAUN Lionel HAVET Nicolas NAVET LORIA-INRIA Campus Scientifique, B.P. 239 54506 Vandoeuvre-les-Nancy, France Christelle.Braun@mines-nancy.org {Lionel.Havet,Nicolas.Navet } @loria.fr FeT‘ 2007, 9th November 2007, Toulouse, France
Outline • Typical automotive communication networks today • The need for benchmarks • Our solution: Netcarbench Netcarbench C. Braun, L. Havet, N. Navet
In-vehicle embedded systems • Several communication networks needed in a vehicle • Body • Chassis • Powertrain • Typical configuration today • A CAN (Controller Area Network) with 5-25 ECUs (Electronic Control Units). • Subject to significant QoS: • High performance • Real-time capabilities • Fault tolerance (not considered yet) Netcarbench C. Braun, L. Havet, N. Navet
Issues • The complexity of these systems keeps increasing : • Up to 70 ECUs and 2500 signals in luxury cars. • Leads to an extensive use of electronics . • Necessity for algorithms and tools which automate and optimise the control of the communication • In-house • Third-party suppliers • SymtaVision, 2007 • RealTime-at-Work, 2007 • With the software NETCAR-Analyzer (initially developed at LORIA) • Configuration problems : • Frame packing • Guarantee the schedulability and minimize the bandwidth consumption. • Setting offsets • May lead to double the global load in the network. • Further information to be published soon in the Automotive embedded Handbook, N. Navet, F. Simonot-Lion editors, CRC Press/Taylor and Francis, 2008. Netcarbench C. Braun, L. Havet, N. Navet
System model • Inputs • Set of N ECUs. For each Nj, a set Sj of signals. • For each signal si=(Ni,Ti,Oi,Ci,Di) • Ni: the ECU it belongs to • Ti: the period of production • Oi: the offset • Ci: the size in bits • Di: the relative deadline (here Di=Ti) Netcarbench C. Braun, L. Havet, N. Navet
Frame packing • Goal • For each ECU Nj with the set Sj of signals, construct the set of frames Fj={fj1,...,fjk}, such that: • Fj is schedulable • None of the transmitted signal misses a deadline. • The bandwidth consumption is minimized • Important for practical applications • In LORIA, research on the optimisation method of offsets assignment (adding offsets to better distribute the load) [Grenier 2008] • Complexity • Frame packing is NP-hard [Norström, 2000] • Exact complexity shows that no exhaustive approach is possible [Saket and Navet, 2006] • Efficient heuristics are required. Netcarbench C. Braun, L. Havet, N. Navet
… Minimize bandwidth consumption and respect deadline constraints F1 F2 F3 F4 F5 F6 F7 ECU1 ECU2 ECU3 ECU4 Frame X Frame Y Frame Z Frame packing Netcarbench C. Braun, L. Havet, N. Navet
Setting Offsets • Output of the frame packing algorithm • Set of frames of the form fj=(Nj',Tj',Oj',Cj',Dj',Pj') • Nj',Tj',Oj',Cj',Dj': same meaning as before. • Pj': (unique) priority of the frame. • Goal • Compute the WCRT in order to check the schedulability of the messages (with offsets). • WCRT without offsets calculated in [Tindell and Burns, 1994] and revised in [Davis, 2007]. • No solution whose complexity is not exponential. • No reference for WCRT with offsets so far, but commercial softwares already available (SymtaVision, NETCAR-Analyzer). Netcarbench C. Braun, L. Havet, N. Navet
NETCAR-Analyzer • History • Initially developed at LORIA in the authors' research group. • Motivation: no tool available for the computation of response times with offsets on large sets of messages. • Taken over by the company RealTime-at-Work in 2007. • Goals • Computes exact and very fast WCRT of messages with offsets in CANs. • Includes a set of proprietary offset assignment algorithms, fine-tuned with the experience gained in industrial use. • Can be improved and extended according to the user's needs. Netcarbench C. Braun, L. Havet, N. Navet
NETCAR-Analyser: screenshot Netcarbench C. Braun, L. Havet, N. Navet
Benchmark • How to compare these algorithms and evaluate their efficiency? • Need for a domain-specific benchmark. • Benchmark • „Standard by which something is evaluated or measured.“ [Wiktionary] • What we need here • Generation of workloads which simulate the data exchange between the ECUs. • 3 challenges • Standardization • Capture the typical properties of the workloads in today‘s automotive networks (CAN, FlexRay...) • Scalability • Can be easily adapted to evolutions of the network model. • Customisation • Let the user define the specific parameters of his application Netcarbench C. Braun, L. Havet, N. Navet
Existing benchmarks • Why is so little information available? • Confidentiality + competition between car manufacturers. • Applications restricted to the brand under concern. • Only 2 published benchmarks • SAE Benchmark • Society of Automotive Engineers, 1993. • Initially developed for a point-to-point network. • Adapted by Tindell and Burns to a CAN composed of 7 ECUs exchanging 53 messages (1994). • Problem • obsolete • PSA Benchmark • PSA Peugeot-Citroen, 2000. • Powertrain network with 6 nodes and 12 different periodic messages. • Problem • obsolete Netcarbench C. Braun, L. Havet, N. Navet
Netcarbench • Our solution: Netcarbench • A new benchmark for broadcast networks in automotive distributed control systems. • Outperforms existing solutions • Input • User-defined configuration. • Output • Sets of messages complying with the specification and whose parameters are possibly completed by automatic randomisation. • Implementation • XML format for the configuration (input file) and the generated message sets (output files). • Several examples of typical realistic networks already predefined for an immediate use. Netcarbench C. Braun, L. Havet, N. Navet
Configuration file • Principles • Constant parameters defined by the user. • Variable parameters constrained by the user and instantiated by Netcarbench. • Parameters for the overall network • Type of messages (signals or frames) • <signals Value="False"> • Bandwidth • <bandwidth Value="125"> • Maximal load • <load Min="30" Max="35"> • Number of ECUs • <ecu Min="15" Max="20"> Netcarbench C. Braun, L. Havet, N. Navet
Configuration file • Parameters for the ECUs • Maximal load • <s Id="3" Load="0.10"> • Parameters for the messages • Period • <p Value="50" Weight="2" PrioLowRange="1" PrioHighRange="200" Margin="1"> • Selects a message with a probability of (Weight±Margin)/SumWeights %. • If the message is selected, it is assigned a period of 50ms and a (random) unused priority between 1 and 200. • Length • <m Length="8" Weight="10" Margin="2"> • Selects a message with a probability of (Weight±Margin)/SumWeights %. • If the message is selected, it is assigned a length of 8 bits. Netcarbench C. Braun, L. Havet, N. Navet
Generated message sets • Network<msgset Busspeed="125" Name="set1.xml" Load="32.054"> • Messages assigned sequentially to the ECUs<ecu Name="Ecu_0"> <frame Name="frame67" Priority="23" Period="100" Length="8"/> <frame Name="frame68" Priority="42" Period="50“ Length="4"/> ...</ecu> Netcarbench C. Braun, L. Havet, N. Navet
Evaluation (on 100 message sets) • Lengths of the messages<messages_sizes> <m Length="1" Weight="1" Margin="1" /> 6±6% <m Length="2" Weight="1" Margin="1" /> 6±6% <m Length="3" Weight="1" Margin="1" /> 6±6% <m Length="4" Weight="1" Margin="1" /> 6±6% <m Length="5" Weight="2" Margin="1" /> 12±6% <m Length="6" Weight="2" Margin="1" /> 12±6% <m Length="7" Weight="2" Margin="1" /> 12±6% <m Length="8" Weight="8" Margin="2" /> 44±12% </messages_sizes> • Loads of the ECUs<loaded_stations> <s Id="1" Load="0.30" /> <s Id="2" Load="0.15" /> <s Id="3" Load="0.10" /> </loaded_stations> Netcarbench C. Braun, L. Havet, N. Navet
Evaluation: lengths of messages Netcarbench C. Braun, L. Havet, N. Navet
Evaluation: loads of the ECUs Netcarbench C. Braun, L. Havet, N. Navet
Evaluation results • Lengths of the messages • The assigned lengths are within the user-specified range. • The average length is very close to the specified weight. • Loads of the ECUs • The load assigned to a given ECU by Netcarbench may differ from the value specified by the user, if provided. • But the compliance is always verified in the average case. • For unspecified loads, Netcarbench relies on a uniform distribution. • Conclusion • Even on a relatively limited number of experiments, the message sets are representatives of the user's specifications. Netcarbench C. Braun, L. Havet, N. Navet
Conclusion • Netcarbench: a new approach • Aimed at facilitating the design and comparison of configuration algorithms and communication protocols. • Genericity • Provides the main elements of today's mostly used automotive communication networks (CAN, FlexRAy...) • Customisation • Supports a user-defined configuration following the specificities of the application under concern. • Scalability • Can easily be extended to new network designs. • Automation • Performs automatically all remaining tasks, using randomization for the missing parameters. Netcarbench C. Braun, L. Havet, N. Navet
Conclusion • Interoperability • Uses for both input and output XML files, to ease the interoperability with other software tools. • Availability • The complete program and all accompanying material are licensed under the GNU GPL v.2 and can be downloaded at:http://www.loria.fr/~nnavet/netcarbench Netcarbench C. Braun, L. Havet, N. Navet
Future work • Extension to the method of offsets/deadlines assignment • Extension to the FIBEX format (Field Bus Exchange Format, 2006) • Standard available on the ASAM (Association for Standardisation of Automation and Measuring Systems) website. • On-going implementation at LORIA. • Participation of other research groups would be appreciated! • Open repository of configuration files. • Creation of a Sourceforge project. • ... Netcarbench C. Braun, L. Havet, N. Navet