Comparing Time-Triggered Ethernet with Flexray: an Evaluation of Competing Approaches to Real-Time for In-Vehicle Networks
Total Page:16
File Type:pdf, Size:1020Kb
Comparing Time-Triggered Ethernet with FlexRay: An Evaluation of Competing Approaches to Real-time for In-Vehicle Networks Till Steinbach, Franz Korf, Thomas C. Schmidt Department of Computer Science Hamburg University of Applied Sciences, Germany ftill.steinbach, korf, [email protected] Abstract are many attempts to overcome those obstacles like token- FlexRay is considered the next generation state-of-the- based, bandwidth-limiting or time-triggered systems. art technology for in-car networks, while time-triggered For a smooth integration into current designs, this pa- Ethernet emerges with the promise to integrate real-time per focuses on time-triggered Ethernet systems [3]. The and best-effort traffic into one homogeneous backbone. results of this paper are based on the time-triggered Ether- This paper contributes a competitive analysis of FlexRay net (TTEthernet) specification by TTTech [3] that is cur- and time-triggered Ethernet. By showing that it is possible rently proposed for standardisation by the Society of Au- to transfer a fully utilized FlexRay system to a sys- tomotive Engineers [4]. Nonetheless, the results are tem based on time-triggered Ethernet, it is demonstrated mostly transferable to other time-triggered Ethernet pro- that time-triggered Ethernet is a suitable replacement of tocols, as well. TTEthernet supports several traffic classes current in-vehicle bus-systems. Further it is shown that a with different qualities for the various real-time related switched system has advantages in bandwidth utilization metrics. This offers the chance to decrease the hetero- over a shared bus, when using group communication. geneity of today’s in-vehicle communication systems, that consist of several CAN, FlexRay or MOST [5] busses con- 1. Introduction nected via gateways, by aggregating several systems into one Ethernet based communication network. Today’s vehicles are complex distributed real-time sys- This paper offers a competitive analysis of FlexRay and tems with a high demand of broadband communication TTEthernet by showing the differences and commonali- links. In such systems, the communication flow between ties of both technologies. Based on a mathematical model, modules has significant impact on safety, reliability, and the general eligibility of TTEthernet for in-vehicle appli- comfort of the vehicle. New proposals for automotive sys- cations is shown in the scenario, when a fully utilised tems require supervising control units for specific tasks FlexRay system is replaced by a time-triggered Ethernet that are connected across a backbone network. These net- substitute. Further, it is discussed that a switched system works need to carry heavy load, while keeping message has advantages in utilization, when using group commu- delays predictable. nication. Besides general differences like components and Currently, FlexRay [1] gains importance as state-of- topology, the analysis covers comparisons for real-time the-art technology for a backbone of in-vehicle networks relevant metrics like latency, jitter and bandwidth. designed to meet hard real-time constraints. It is the The remainder of this paper is organised as follows. In first automotive protocol that allows offline scheduling section 2 related work and the base techniques are intro- for time-triggered traffic and randomly occurring event- duced. Section 3 compares the performance of the pro- triggered data in parallel. For each message, the prede- tocols under common real-time related metrics. Finally, fined schedule defines an exact, system-wide timestamp section 4 concludes and gives an outlook. at which this message will be visible on the FlexRay bus. FlexRay complies to the enhanced temporal requirements 2. Background of the new vehicle chassis control applications, which Related Work In process automation, there is already could not be satisfied with busses like CAN [2]. a large collection of products that rely on Ethernet and A new approach to in-vehicle networks is based on promise real-time communication. For in-vehicle com- Ethernet, which has proven to be a flexible, highly scal- munication, the use of Ethernet is a novelty. able protocol. Current Ethernet — in contrast to FlexRay In general, there are token-based, bandwidth limiting — is a technology based on switching that allows to in- and time-triggered protocols to ensure a predictable delay crease the amount of traffic simultaneously transferred by and jitter in packet delivery and prevent real-time packets using segregated communication in groups. However, due from simultaneously traversing a switch interface or line to its randomised access and best effort approach, it does card. Time-triggered protocols are well known within the not provide reliable temporal performance bounds. There automotive industry and based on previous experiences cycle i cycle i+1 Table 1. Sample configuration static segment dynamic symbol network static segment FlexRay TTEthernet segment window idle time Mbit Mbit bus speed (VB) 10 s 100 s ... ... max payload size (lP ) 254 Byte 1500 Byte static slot1 static slot2 static slot3 static slot4 static slot5 static slotn static slot1 static slot2 static slot3 slot4 static static slot5 static slotn min payload size (lP ) 1 Byte 46 Byte Figure 1. Composition of FlexRay cycle topology two active stars/switches with TTCAN [6] and FlexRay. Therefore they are in focus wire length (lW ) 72 m ∆ 200 ppm of this paper. All senders in time-triggered protocols are divergence of quartz ( Q) t 16 ms required to operate in a synchronised way. A schedule de- cycle time ( C ) fines permissible transmission times. In process automa- Latency Since FlexRay is a wired bus, latency consists tion, these protocols dominate deployment. Examples are of the signal runtime from sender to receiver and the trans- Profinet [7], SynqNet [8] or RTnet [9]. fer time for the message. Equation 1 calculates the sig- FlexRay FlexRay has been developed by the FlexRay nal runtime tS for the FlexRay sample configuration. It consortium [1] starting in the year 2000. Especially new is composed of the propagation delay of the wire tWD, requirements by the chassis control led to a system with maximum delays for sending and receiving at bus drivers synchronisation and a predefined schedule that allows op- tDD, and the product of the number of active stars nS and eration without collision and thus lower bounds for la- their maximum delay tSD. Considering our sample con- tency and jitter. figuration with a wire length of lW and a topology with The FlexRay protocol is centred about periodic cycles. two active stars nS we get a delay of tS = 1420 ns. Each cycle is composed of a static and a dynamic seg- tS = tWD ∗ lW + 2 ∗ tDD + tSD ∗ nS (1) ment (see figure 1), governed by different bus access poli- ns = 10 ∗ 72 m + 2 ∗ 100 ns + 250 ns ∗ 2 cies. For time-triggered communication, each node is as- m signed to communication slots in the static segment. De- = 1420 ns livery depends on a global time across all participants and The transfer time depends on frame size and bus speed. thus a precise synchronisation. The dynamic segment is In FlexRay, the frame size l is composed of the trans- intended for priorised event-triggered communication. It F mission start sequence l , the frame start sequence l , is not intended for hard real-time communication and is TS FS the protocol overhead l , the frame end sequence l therefore not subject of this paper. PO FE and the payload l . For synchronisation of FlexRay con- FlexRay allows for bus, star or mixed topologies and P trollers each byte is encoded in 10 bit. The transmission defines two separate channels for transmission. Both can start sequence must fill the time needed to change state be used simultaneously, leading to a total bandwidth of 20 from idle to active at sender, receiver and at each active Mbit/s or with one channel for redundancy at 10 Mbit/s. star and the time to transmit one bit. For the sample con- Time-Triggered Ethernet TTEthernet [3] combines figuration, a sequence of lTS = 15 bits is suitable. standard Ethernet based best-effort network traffic and lF = lTS + lFS + lPO + lP ∗ 10 bit + lFE (2) hard real-time communication on the same infrastruc- = 15 bit + 1 bit + 80 bit + l ∗ 10 bit + 2 bit ture. It adds, similar to FlexRay, time slotting to stan- P dard switched Ethernet. On layer 2 a global out of band = 98 bit + lP ∗ 10 bit schedule that defines a plan for transmission or relaying in lF min = 98 bit + (1 ∗ 10 bit) = 108 bit (3) the time-triggered domain, is shared among all TTEther- lF max = 98 bit + (254 ∗ 10 bit) = 2638 bit (4) net participants and switches. The TTEthernet specifi- 1 µs With the bit time tb = = 0:1 , the transfer time cation defines a failsafe synchronisation protocol to dis- VB bit tribute a global time among all senders. Besides the time- tT can be calculated. triggered traffic, TTEthernet offers rate-constrained traf- tT = lF ∗ tb (5) fic based on the AFDX-Protocol [10] for communication µs t = 108 bit ∗ 0:1 = 10:8 µs (6) with less rigid temporal requirements, similar to the mes- T min bit sages in FlexRays dynamic segment and best-effort traffic. µs t = 2638 bit ∗ 0:1 = 263:8 µs (7) TTEthernet relies on switched Ethernet. Any topology T max bit is formed of switches that relay the messages. Redun- Together with the signal runtime tS = 1420 ns a total dancy can be achieved by multiple redundant channels. latency between 12:2 µs and 265:2 µs was calculated. 3. Comparison Latency in TTEthernet is caused by switching delays. TTTech indicates the switching delay t for their cur- Based on the configuration given in table 1, time- SD rent implementation between 1 µs and 2:4 µs. Total la- triggered functionality of FlexRay and TTEthernet are tency can be calculated as the sum of propagation delay compared.