Introduction to TTP and FlexRay real-time protocols

staff.iha.dk

Introduction to TTP and FlexRay real-time protocols

Introduction toTTP and FlexRayreal-time protocols15.11.2005IDA/DSFD meeting 15.11.2005at IHA ÅrhusbyFinn Overgaard Hansen,Ingeniørhøjskolen i Århusfoh@iha.dkAgenda• Application areas for Time TriggeredSystems: X-by-Wire systems• Two competing approaches (TTP-FlexRay)• The Time Triggered Protocol (TTP) & theTime Triggered Architecture (TTA)• The FlexRay Protocol• SummarySlide 2© Ingeniørhøjskolen i Århus1


X-by-wire System Requirements• Safety-critical applications require:– Fault tolerance: no single point of failure may leadto a system failure– Predictable and timely system behavior– Synchronized time base (global time)• Automotive constraints:– Automotive temperature requirements-40 to +125 degrees Celsius– Automotive and legal EMC requirements– Support of future high supply voltages (36/42V instead of 12 V)Slide 7© Ingeniørhøjskolen i ÅrhusExample 1: Steer-by-wire SystemSlide 8© Ingeniørhøjskolen i Århus4


Example 1: Steer-by-wireSlide 9© Ingeniørhøjskolen i ÅrhusExample 2: Break-by-wireSlide 10© Ingeniørhøjskolen i Århus5


SAE Communication Classes & TTP• SAE: Society of Automotive Engineers• Three Communication System Classes– Class A• For systems with low speed networks• Soft Real-Time systems– Class B• For systems with high speed networks, but without safetycriticalrequirements– Class C• For systems with safety-critical requirements• Hard Real-Time systems• TTP/A (Automotive Class A = Soft Real-Time)– A scaled-down version of TTP– A cheaper master/slave variant• TTP/C (Automotive Class C = Hard Real-Time)– A full version of TTP– A fault-tolerant distributed variantSlide 17© Ingeniørhøjskolen i ÅrhusTime-Triggered Protocol (TTP)• The Time-Triggered Protocol (TTP) is a real-timecommunication protocol for the interconnection ofelectronic modules of distributed fault-tolerant real-timesystems• TTP/C was originally intended to meet the requirements ofSAE class C automotive applications• The current protocol specification is targeted at distributedreal-time systems with strong requirements for safety,availability, and composability in the fields of:– automotive– aerospace electronics– industrial controlSlide 18© Ingeniørhøjskolen i Århus9


TTP/C Bus Access SchemeFTU: Fault Tolerant UnitSlide 21© Ingeniørhøjskolen i ÅrhusTime-Triggered Architecture (TTA)• The Time-Triggered Architecture (TTA)generates a framework for the domain ofdistributed embedded real-time systems inhigh-dependability environments• A central characteristic of the Time-TriggeredArchitecture is the treatment of (physical) realtime as a first-order quantity• The TTA decomposes a large embeddedapplication into clusters and nodes andprovides a fault-tolerant global time base ofknown precision at every nodeSlide 22© Ingeniørhøjskolen i Århus11


TTA Cluster and NodesCNI: Communication Network InterfaceThe Host programming interface to the Time-triggered networkSlide 23© Ingeniørhøjskolen i ÅrhusTTA LayersSlide 24© Ingeniørhøjskolen i Århus12


Membership• The node membership vector– contains as many bits as there are(sending) nodes in a cluster– each node is assigned to a specific bitposition• a “TRUE” indicates that the node was operatingduring the last sending slot• a “False” indicates that the node was notoperatingSlide 29© Ingeniørhøjskolen i ÅrhusThe Message Descriptor List (MEDL)MEDLSRU-TimemessagetimeAddressAttributesD L I AMessage AreaMessageD: Direction – input/output messageL: Length of messageI: Initialization – Initialization or normal messageA: Additional parameterThe MEDL’s of a cluster are generatedautomatically by a cluster compilerSlide 30© Ingeniørhøjskolen i Århus15


TTP/C Frame types: I-FramesI/NMessageModebit 14 bit HeaderModebit 2Modebit 316 bitC-State: Controller stateSlide 33© Ingeniørhøjskolen i ÅrhusCRC CalculationCRC calculation at senderHeader Data Field C-State of SenderCRCMessage on the networkHeader Data Field CRCCRC calculation at receiverHeader Data Field C-State ofReceiverCRCSlide 34© Ingeniørhøjskolen i Århus17


Fault-tolerant NodeSlide 35© Ingeniørhøjskolen i ÅrhusTTP/C Communication Properties• Static Scheduling– Guaranteed delivery times with known variance (jitter)• Clock Synchronization– All nodes synchronized to within one microsecond eachTDMA round• Composability– TTP/C nodes are temporally composable as well asfunctionally composable• Fail Silent– The bus guardians ensure transmission only during thecorrect timeslot, in all cases• Membership– Every node’s membership is available during each TDMAroundSlide 36© Ingeniørhøjskolen i Århus18


Advantages/Disadvantages of TTP• Advantages– Simple protocol to implement– Deterministic response time– No wasted time for Master polling message• Disadvantages– Wasted bandwidth when some nodes are idle– Static solution– Fixed network size after installationSlide 37© Ingeniørhøjskolen i ÅrhusTTP Software Tool SuiteSlide 38© Ingeniørhøjskolen i Århus19


FlexRay ProtocolThe Communication Systems foradvanced automotive controlapplicationsThe FlexRay protocol provides flexibility anddeterminism by combining a scalable static anddynamic message transmission, incorporating theadvantages of familiar synchronous and asynchronousprotocolsSource:”FlexRay Protocol Specification” – version 2.1, 12-May-2005Slide 41© Ingeniørhøjskolen i ÅrhusFlexRay Context• Demand for a bus system with high datarate for automotive applications• Deterministic and fault-tolerant bussystem for advanced automotive controlapplications• Support from the bus system fordistributed control systems• Limited number of differentcommunication systems within vehiclesSlide 42© Ingeniørhøjskolen i Århus21


FlexRay Architecture ExampleSlide 47© Ingeniørhøjskolen i ÅrhusBasic Features• Synchronous and asynchronous data transmission(scalable)• High net data rate of up to 10 Mbit/sec• Deterministic data transmission, guaranteed messagelatency and message jitter• Support of redundant transmission channels• Fault tolerant and time triggered servicesimplemented in hardware• Fast error detection and signaling• Support of a fault tolerant synchronized global time base• Error containment on the physical layer through anindependent "Bus Guardian"• Support of optical and electrical physical layer• Support for bus, star and multiple star topologiesSlide 48© Ingeniørhøjskolen i Århus24


Layered Protocol StructureSlide 49© Ingeniørhøjskolen i ÅrhusFlexRay Node Architecture (1)ECU= Electronic Control UnitSlide 50© Ingeniørhøjskolen i Århus25


Topologies - Bus & Star• Bus– passive medium– no active components within the channel– most automotive experience– automotive costs• Star– best suited technology for high speed networks– different degrees of intelligence possible• with/without protocol knowledge• can protect against concurrent media access• limits the error domain of not correctly working subnetworksSlide 53© Ingeniørhøjskolen i ÅrhusPassive Bus TopologySlide 54© Ingeniørhøjskolen i Århus27


Active Star ToplogySlide 55© Ingeniørhøjskolen i ÅrhusActive Star Component• A branch has to bedeactivated if a faultysignal is detected• A deactivated branchshall be fail-silent andshould be reactivated ifthe fail condition is nolonger availableSlide 56© Ingeniørhøjskolen i Århus28


Hybride ToplogySlide 57© Ingeniørhøjskolen i ÅrhusTopology ExampleA node can either be connected to both channelsor only to one of the channelsSlide 58© Ingeniørhøjskolen i Århus29


Frame Transfer (1)Communication cycle with static anddynamic segmentsA,D,C,EA,B,C,ESlide 59© Ingeniørhøjskolen i ÅrhusFrame Transfer (2)Communication cycle in a pure dynamic systemSlide 60© Ingeniørhøjskolen i Århus30


Communication Scheme (1)• Each node must be able to make use of adistributed clock• Each node must send frames inside apredefined static slot or/and inside a dynamicsegment• Transmission can be divided into 3 phases:– The bus guardian must enable the access to the bus– It must be signaled that a frame should betransmitted– The transmission itselfSlide 61© Ingeniørhøjskolen i ÅrhusCommunication Scheme (2)Slide 62© Ingeniørhøjskolen i Århus31


Frame TransferCycles consisting of two segment• Static:– Divided in timeslots (TDMA)– The slot length is defined off-line and therefore fixedduring runtime• Dynamic:– Has start delimiter: Start of cycle SOC (alarm/normal)– Dynamic frame length– Media is accessed via timers and priorities• MixedSlide 63© Ingeniørhøjskolen i ÅrhusFlexRay Frame Format (1)Frame ID (11 bits): The frame ID defines the slot in which theframe should be transmitted. A frame ID is used no more thanonce on each channel in a communication cycle.Slide 64© Ingeniørhøjskolen i Århus32


FlexRay Frame Format (2)Network Management VectorThe message ID is an application determinable number that identifies thecontents of the data segmentSlide 65© Ingeniørhøjskolen i ÅrhusFlexRay ConfigurationsSlide 66© Ingeniørhøjskolen i Århus33


FlexRay Communication CycleSlide 67© Ingeniørhøjskolen i ÅrhusStatic Part Characteristics (1)Slide 68© Ingeniørhøjskolen i Århus34


Static Part Characteristics (2)Slide 69© Ingeniørhøjskolen i ÅrhusDynamic Part – Minislotting (1)Slide 70© Ingeniørhøjskolen i Århus35


Dynamic Part – Minislotting (2)Slide 71© Ingeniørhøjskolen i ÅrhusDynamic Characteristics (1)Slide 72© Ingeniørhøjskolen i Århus36


Dynamic Characteristics (2)Slide 73© Ingeniørhøjskolen i ÅrhusStart-Up• For each configuration the start-up of thecommunication network has to be possible as soon astwo nodes are able to communicate• The integration of controllers that are powered on latermust not disturb the start-up procedure or normaloperation of the other nodes• The communication network must be operational after100 ms• No reliance on collision detection• Static/Mixed– Startup, reintegration etc. must be fault tolerant against:Temporary/permanent failure of controllers, channels or frames• Dynamic– Master sends SOC (Start of cycle)Slide 74© Ingeniørhøjskolen i Århus37


Clock Synchronisation• In a pure dynamic mode a master sends a SOC• In static mode:– The clock synchronization mechanism must be able to keep allfault-free controllers within the precision. A clocksynchronization precision within the different controllers of betterthan 1 microsecond is required– The absolute value of the global time must be the same at everycontroller– The start node determines the value of the global time– The cycle time is a counter incremented in units of macro ticksThe cycle time is reset to 0 at the beginning of eachcommunication cycle– The synchronization algorithm uses FTM (Fault TolerantMidpoint) algorithm– External synchronization must be supported (e.g. GPS)Slide 75© Ingeniørhøjskolen i ÅrhusFlexRay Communication Controllerhttp://www.semiconductors.bosch.de/de/20/flexray/flexray.aspSlide 76© Ingeniørhøjskolen i Århus38


E-Ray FlexRay Controller Block DiagramPRT A: Protocol Controller (Protocol Finit State Machine)TBF A: Transient Buffer RAMIBF: Input BufferOBF: Output BufferSource: www.bosch.deSlide 77© Ingeniørhøjskolen i ÅrhusSummary• TTP is currently the most mature technology– is used in commercial safety critical systems– aerospace and industrial applications• TTP allows only static (synchronous) definedcommunication• TTP is supported by the TTA framework• FlexRay seems to win in the automotivemarket• FlexRay supports both static and dynamiccommunicationSlide 78© Ingeniørhøjskolen i Århus39


References (FlexRay)[FlexRay2002]”FlexRay Requirements Specification”, Version 2.0.2,9-april-2002[FlexRay2005]”FlexRay Communications System, ProtocolSpecification” Version 2.1, 12-may-2005[FlexRay]FlexRay Consortium home page:www.flexray-group.comSlide 79© Ingeniørhøjskolen i ÅrhusReferences (TTA/TTP)[TTP2003]“Time-Triggered Protocol TTP/C High-Level SpecificationDocument”, Protocol Version 1.1, 19-nov-2003, TTTech & TTAGroup[ViennaUnivesity]Real-Time Systems Research Group at the Vienna University ofTechnology, http://www.vmars.tuwien.ac.at[TTA Group]TTA Group Forum (the open industry consortium for timetriggeredsystems today), http://www.ttagroup.org/[TTTech]TTTech Computertechnik AG, supplier of technology in the fieldof time-triggered systems and TTP® (Time-Triggered Protocol),http://www.tttech.com/[Kopetz97]“Real-Time Systems – Design Principles for DistributedEmbedded Applications”, Hermann Kopetz, TechnischeUniversität Wien, Kluwer Academic Publishers, 1997,ISBN 0-7923-9894-7Slide 80© Ingeniørhøjskolen i Århus40

More magazines by this user
Similar magazines