Download - The flex ray protocol

Transcript
Page 1: The flex ray protocol

.

.

.

The FlexRay protocol

Master Of Control SystemsWissam Kafa

June 17, 2014

Page 2: The flex ray protocol

Outline

1 Introduction

2 Why FlexRay?

3 Network Topology

4 Structure of a FlexRay Node

5 FlexRay configuration: Cycle Segments

6 Clock Synchronization

7 Summary-Conclusion

.

.

.Wissam Kafa | HIAST 2/26

Page 3: The flex ray protocol

1 Introduction

• FlexRay: A Communication Protocol in distributed systems withinautomotive context.

• developed by the FlexRay consortium (BMW, DaimlerChrysler, Mo-torola, Philips) founded in 1999.

• since 1999 many well-known companies joined (e.g. Bosch, GM,VW, Mazda, etc.)

• aim: fast, flexible, fault-tolerant communication protocol.

• FlexRay was used for the first time in BMW X5 model in 2007.

.

.

.Wissam Kafa | HIAST 3/26

Page 4: The flex ray protocol

2 Why FlexRay?• X-by-wire Technique

steer-by-wire, brake-by-wire,. . .

• Hydraulic steering and braking is replaced by an electronic systemof sensors and actuators.

• Over years these new tasks have increased the requirements of thecommunication between control units.

• CAN is not sufficient any more.

Real-time capabilities are not supported because of bit arbitra-tion

.

.

.Wissam Kafa | HIAST 4/26

Page 5: The flex ray protocol

3 Network Topology

Figure 1: some possible FlexRay Network topologies (a) Passive bus. (b)Active star. (c) Hybrid topology

.

.

.Wissam Kafa | HIAST 5/26

Page 6: The flex ray protocol

Passive Bus Topology

Figure 2: Passive Bus Topology

A node can be connected to one or both channels A and B.

.

.

.Wissam Kafa | HIAST 6/26

Page 7: The flex ray protocol

Active Star Topology

Figure 3: Active Star Topology

- free of closed rings.- Received Signal is driven to all connected nodes.- A node could be connected to a maximum of two star couplers.

.

.

.Wissam Kafa | HIAST 7/26

Page 8: The flex ray protocol

Hybrid Topology

Figure 4: Hybrid Topology

.

.

.Wissam Kafa | HIAST 8/26

Page 9: The flex ray protocol

4 Structure of a FlexRay Node

Figure 5: Structure of a FlexRay Node

.

.

.Wissam Kafa | HIAST 9/26

Page 10: The flex ray protocol

FlexRay Node: Host Controller

- Processor to execute the main application.

- It processes the received data.

- Decides what to do, and what to besent to the communication controller

.

.

.Wissam Kafa | HIAST 10/26

Page 11: The flex ray protocol

FlexRay Node: Communication Controller

- Realizes all functions of the FlexRay pro-tocol.- Receives data that should be sent from thehost controller.- Decides what to do, and what to be sentto the communication controller.- Handles the data according to the FlexRayprotocol, and sends them to the bus driver

.

.

.Wissam Kafa | HIAST 11/26

Page 12: The flex ray protocol

FlexRay Node: Bus Guardian

- Changes in the supply of a node could oc-cur.

This could cause defects on the bus.- Important for the fault-tolerance of theFlexRay.- Bus guardian could prevent these defects.- It organizes sending the data on the bus.- It prevents the node from sending and re-ceiving outside its time slots.- It can Recognize synchronization and com-munication errors

.

.

.Wissam Kafa | HIAST 12/26

Page 13: The flex ray protocol

FlexRay Node: Bus Driver

- Responsible for the connection betweenthe FlexRay nodes and the bus.

- Sends Data to the Bus.

- Receives Data from the Bus.

.

.

.Wissam Kafa | HIAST 13/26

Page 14: The flex ray protocol

5 FlexRay configuration: Cycle Segments

Figure 6: FlexRay Cycle Segment

.

.

.Wissam Kafa | HIAST 14/26

Page 15: The flex ray protocol

FlexRay configuration: Cycle Segments

- The communication on the bus passes incycles.- Each cycle can be divided into three seg-ments:

- Static segment.- Dynamic segmentand.- Symbol segment.

- A cycle is terminated by a network idletime, the NIT.- A typical FlexRay cycle takes about 2.5ms.

.

.

.Wissam Kafa | HIAST 15/26

Page 16: The flex ray protocol

Cycle Segments: Static Segment- The static segment is time triggered.- It is divided into time slots, Each slot has:

- A fixed length.- ID assigned to a specific control unit.

- Hard real-time requirements possible byguaranteed latency.- No delays or collisions could occur.- A node can be allocated to more than oneslot by clever distribution of slot IDs.- A Hard real-time application which shouldbe realized in the static segment:

- Explosion of the airbag.

.

.

.Wissam Kafa | HIAST 16/26

Page 17: The flex ray protocol

Cycle Segments: Dynamic Segment

- For reacting flexibly on specific events.- Event triggered segment.- It is also divided into slots with IDs.-If the ID of the actual slot corresponds withthe ID of the control unit, then the controlunit is allowed to send data.- If a longer message has to be sent, thetime slot of the next node shifts backwards.- An application for the dynamic segment:

The control of the wipers dependingon the rain sensor.

.

.

.Wissam Kafa | HIAST 17/26

Page 18: The flex ray protocol

Cycle Segments: The symbol segment

- In the symbol segment:FlexRay sends internal control infor-

mation (starting the network).

.

.

.Wissam Kafa | HIAST 18/26

Page 19: The flex ray protocol

Cycle Segments: NIT and Frames

Figure 7: FlexRay-Frame

- The Network Idle Time is used for the synchronization of the clocks.- Each slot corresponds to one frame.- A frame can contain up to 254 bytes of data.

.

.

.Wissam Kafa | HIAST 19/26

Page 20: The flex ray protocol

6 Clock Synchronization

- Large temperature differences, voltage changes and productiontolerances have a negative influence on the accuracy of the clocks.- A regular synchronization, especially for real-time and time-criticalapplications is essential.- For correct Operation, each node has to know the start time, the endtime and the number of the actual slots.- Therefore, all nodes need a common time base.- The Data rate also depends on the synchronization.- The synchronization of FlexRay is an internal synchronization algorithmand is most likely the midpoint algorithm.

.

.

.Wissam Kafa | HIAST 20/26

Page 21: The flex ray protocol

Clock Synchronization- The problem is divided into two aspects:

- Nodes have to compound on a common time (offset correction).- Nodes have to adjust the time deviation between them (rate

correction).- Each nodes communication controller has a local clock.

counts in micro-ticks.- For example a FlexRay network with 10MBit/s scans the bus with80MHz. One tick of the oscillator correspond 0.0124 us. A micro-tick istypical twice this time.- The synchronization of the offset, as well as the rate correction usesmicro-ticks as smallest time unit.

.

.

.Wissam Kafa | HIAST 21/26

Page 22: The flex ray protocol

7 Summary-Conclusion

• FlexRay focuses on a set of core needs for todays automotive indus-try.

• Higher data rates than previous standards.

• very flexible network topology.

• fault-tolerant operation.

• FlexRay thus delivers the speed and reliability required for next-generation in-car control systems.

.

.

.Wissam Kafa | HIAST 22/26

Page 23: The flex ray protocol

Summary-Conclusion

• The CAN network has reached its highest performance levels witha maximum speed of 1 Mbps.

• With a maximum data rate of 10 Mbps available on two channels,A gross data rate of up to 20Mbit/sec.

• Time and Event Triggered Protocol.

.

.

.Wissam Kafa | HIAST 23/26

Page 24: The flex ray protocol

Summary-Conclusion

Figure 8: Vehicle-Network-Standards

.

.

.Wissam Kafa | HIAST 24/26

Page 25: The flex ray protocol

Summary-Conclusion

Figure 9: Comparision (LIN, CAN, FlexRay)

.

.

.Wissam Kafa | HIAST 25/26

Page 26: The flex ray protocol

.

.

.

Thanks!