3. 1 Introduction
• FlexRay: A Communication Protocol in distributed systems within
automotive 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
4. 2 Why FlexRay?
• X-by-wire Technique
steer-by-wire, brake-by-wire,. . .
• Hydraulic steering and braking is replaced by an electronic system
of sensors and actuators.
• Over years these new tasks have increased the requirements of the
communication 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
5. 3 Network Topology
Figure 1: some possible FlexRay Network topologies (a) Passive bus. (b)
Active star. (c) Hybrid topology
.
.
.Wissam Kafa | HIAST 5/26
6. 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
7. 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
9. 4 Structure of a FlexRay Node
Figure 5: Structure of a FlexRay Node
.
.
.Wissam Kafa | HIAST 9/26
10. FlexRay Node: Host Controller
- Processor to execute the main application.
- It processes the received data.
- Decides what to do, and what to be
sent to the communication controller
.
.
.Wissam Kafa | HIAST 10/26
11. FlexRay Node: Communication Controller
- Realizes all functions of the FlexRay pro-
tocol.
- Receives data that should be sent from the
host controller.
- Decides what to do, and what to be sent
to the communication controller.
- Handles the data according to the FlexRay
protocol, and sends them to the bus driver
.
.
.Wissam Kafa | HIAST 11/26
12. 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 the
FlexRay.
- 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
13. FlexRay Node: Bus Driver
- Responsible for the connection between
the FlexRay nodes and the bus.
- Sends Data to the Bus.
- Receives Data from the Bus.
.
.
.Wissam Kafa | HIAST 13/26
15. FlexRay configuration: Cycle Segments
- The communication on the bus passes in
cycles.
- Each cycle can be divided into three seg-
ments:
- Static segment.
- Dynamic segmentand.
- Symbol segment.
- A cycle is terminated by a network idle
time, the NIT.
- A typical FlexRay cycle takes about 2.5ms.
.
.
.Wissam Kafa | HIAST 15/26
16. 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 by
guaranteed latency.
- No delays or collisions could occur.
- A node can be allocated to more than one
slot by clever distribution of slot IDs.
- A Hard real-time application which should
be realized in the static segment:
- Explosion of the airbag.
.
.
.Wissam Kafa | HIAST 16/26
17. 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 with
the ID of the control unit, then the control
unit is allowed to send data.
- If a longer message has to be sent, the
time slot of the next node shifts backwards.
- An application for the dynamic segment:
The control of the wipers depending
on the rain sensor.
.
.
.Wissam Kafa | HIAST 17/26
18. Cycle Segments: The symbol segment
- In the symbol segment:
FlexRay sends internal control infor-
mation (starting the network).
.
.
.Wissam Kafa | HIAST 18/26
19. 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
20. 6 Clock Synchronization
- Large temperature differences, voltage changes and production
tolerances have a negative influence on the accuracy of the clocks.
- A regular synchronization, especially for real-time and time-critical
applications is essential.
- For correct Operation, each node has to know the start time, the end
time 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 algorithm
and is most likely the midpoint algorithm.
.
.
.Wissam Kafa | HIAST 20/26
21. 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 with
80MHz. One tick of the oscillator correspond 0.0124 us. A micro-tick is
typical twice this time.
- The synchronization of the offset, as well as the rate correction uses
micro-ticks as smallest time unit.
.
.
.Wissam Kafa | HIAST 21/26
22. 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
23. Summary-Conclusion
• The CAN network has reached its highest performance levels with
a 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