You are on page 1of 41

Part

1: In-Car Networking

OVERVIEW, USE CASES, AND


ARCHITECTURES
[C2X] Summer 2014

Overview, Use Cases, and Architectures

ISO/OSI Layers

Layered communicaGon architecture

One layer one funcGon one protocol


Layer interacts only with immediate base layer
Interfaces follow rigid specicaGon
commonly by standards body

ISO/OSI layered communicaGon model

Denes 7 layers
see next slide

Common architectures relax rigid guidelines


cf. TCP/IP

[C2X] Summer 2014

Overview, Use Cases, and Architectures

ISO/OSI Layers, Example


Application

7 Application
6

Presentation

Presentation

Session

Session

Transport

Network

Data link

Physical

Segment
Packet
Frame
Bit

Transport
Network

Network

Network

Data link

Data link

Data link

Physical

Physical

Physical

Router

[C2X] Summer 2014

Overview, Use Cases, and Architectures

ISO/OSI Layers, Func@ons in Detail

Physical Layer

Data Link Layer

Checked transmission of frames


Frame synchronisaGon, error checking, ow control, ...

Network Layer

Species mechanical, electrical properGes to transmit bits


Time synchronizaGon, coding, modulaGon, ...

Transmission of datagrams / packets


ConnecGon setup, rouGng, resource management,

Transport Layer

Reliable end to end transport of segments

[C2X] Summer 2014

Overview, Use Cases, and Architectures

ISO/OSI Layers, Func@ons in Detail

Session Layer

PresentaGon Layer

Dene Syntax and SemanGcs of informaGon

ApplicaGon Layer

Establish and tear down sessions

CommunicaGon between applicaGons

Our focus (in part 1 of lecture)

Physical Layer
Data Link Layer

[C2X] Summer 2014

Overview, Use Cases, and Architectures

Overview and Use Cases

Why bus systems?


Source: AUDI AG

Lower cost
Material
Weight
Volume

Higher modularity
customizability
of vehicles
cooperaGon with Original Equipment Manufacturers (OEMs)

Shorter development cycles


Re-usability of components
Standard protocols and tesGng plans less errors

[C2X] Summer 2014

Overview, Use Cases, and Architectures

Overview and Use Cases

History
First micro processors in vehicles in 1980s
CommunivaGon via point to point connecGons
Simple control lines, lifle real data transmission
True data transmission for connecGon external diagnosis
equipment
Birth of standard for character transmission via K-Line (ISO 9141)
Finally: introducGon of data busses for in-vehicle communicaGon
Later standardized as CAN (ISO 11898)
Use in series producGon models starts 1991

[C2X] Summer 2014

Overview, Use Cases, and Architectures

Overview and Use Cases

State of the art


K-Line and CAN are part of On Board Diagnosis (OBD) connector
Enables, e.g., reading engine parameters, catcon, oxygen
(lambda) sensor
Mandatory for newly registered vehicles in both EU und U.S.

Source: wikimedia commons


[C2X] Summer 2014

Overview, Use Cases, and Architectures

Overview and Use Cases

Use cases

[C2X] Summer 2014

Overview, Use Cases, and Architectures

Overview and Use Cases

Use cases
Driveline
Engine and transmission control

Active Safety
Electronic Stability Programme (ESP)

Passive Safety
Air bag, belt tensioners

Comfort
Interior lighting, A/C automation

Multimedia and Telematics


Navigation system, CD changer
[C2X] Summer 2014

Overview, Use Cases, and Architectures

10

Overview and Use Cases

ClassicaGon

On board communicaGon
O board communicaGon

On board communicaGon

Complex control and monitoring tasks


Data transmissions between ECUs / to MMI
E.g., engine control, ext. sensors, X-by-Wire

SimplicaGon of wiring
Replaces dedicated copper wiring
E.g., central power locks, power windows, turn signal lights

MulGmedia bus systems


Transmission of large volumes of data
E.g., NavigaGon unit, Radio/CD, Internet

[C2X] Summer 2014

Overview, Use Cases, and Architectures

11

Overview and Use Cases

ClassicaGon

On board communicaGon
O board communicaGon

O board communicaGon

Diagnosis
Readout of ca. 3000 kinds of errors
Garage, exhaust emission tesGng

Flashing
IniGal installaGon of rmware on ECUs
AdaptaGon of ECU to make, model, extras, ...

Debugging
Detailled diagnosis of internal status
During development

[C2X] Summer 2014

Overview, Use Cases, and Architectures

12

Overview and Use Cases

ClassicaGon by use case


Application

Message
length

Control and
monitoring

Message rate

Data rate

Latency

Robustness

Cost

Simplified
Wiring

Multimedia

Diagnosis

Flashing

Debugging

[C2X] Summer 2014

Overview, Use Cases, and Architectures

13

Overview and Use Cases

ClassicaGon by Society of AutomoGve Engineers (SAE)


Class A

Data rate ~ 16 kBit/s

Cheap

Diagnosis, Sensor-Actor

Class B

Data rate ~ 64 kBit/s

Error correcting

Networking ECUs

Class C

Data rate ~ 1 MBit/s

Real time requirements

Drive train

Class D

Data rate ~ 10 MBit/s


[C2X] Summer 2014

Low latency
Overview, Use Cases, and Architectures

X-By-Wire, Multimedia
14

Network Topologies

Network topologies

Line
Cost
Complexity
Robustness

Star
Cost
Complexity
() Robustness

Ring
Cost
Complexity
Robustness

[C2X] Summer 2014

Overview, Use Cases, and Architectures

15

Network Topologies

Coupling of bus elements

1 Phy

Repeater
Signal amplicaGon
Signal refreshing

Bridge
Medium / Gming adaptaGon
Unltered forwarding

Router
Filtered forwarding

Gateway
Address adaptaGon
Speed adaptaGon
Protocol adaptaGon

[C2X] Summer 2014

Overview, Use Cases, and Architectures

Bus 1

Bus 2

2 - Lnk
1 - Phy

1 - Phy

Bus 1

Bus 2

3 - Net
2 - Lnk

2 Lnk

1 - Phy

1 - Phy

Bus 1

Bus 2

7 - App
3 - Net

3 - Net

2 - Lnk

2 Lnk

1 - Phy

1 - Phy

Bus 1

Bus 2

16

Network Topologies

Medium and Data transmission

Data
transmission

Medium

Optical

Fiber line

[C2X] Summer 2014

Electrical

Wireless

One wire

Bluetooth

Two (multi)
wire

WiFi

Unicast

Overview, Use Cases, and Architectures

Broadcast

Multicast

17

Network Topologies

Concurrent bus access for typical wiring

Base state
transistors non-conducGve
pull up resistors raise bus level to high

One or more ECUs turn transistor conducGve


This connects bus to signal ground
Bus level is low independent of other ECUs ( dominant state)

Wired OR (if low 1) / Wired AND (if low 0)

[C2X] Summer 2014

Overview, Use Cases, and Architectures

18

Network Topologies

Wired OR

Example (assuming negaGve logic)


5V = logical 0
0V = logical 1
5V

Measurement point C

[C2X] Summer 2014

Overview, Use Cases, and Architectures

19

Network Topologies

Wired OR

Example (assuming negaGve logic)


5V = logical 0
0V = logical 1
5V

Measurement point: 5V
(logical 0)

A: 5V

B: 5V

[C2X] Summer 2014

Overview, Use Cases, and Architectures

20

Network Topologies

Wired OR

A v B = C

Example (assuming negaGve logic)


5V = logical 0
0V = logical 1
5V

Measurement point: 0V
(logical 1)

A: 0V

B: 5V

[C2X] Summer 2014

Overview, Use Cases, and Architectures

21

Network Topologies

Wired AND

Example (assuming posiGve logic)


5V = logical 1
0V = logical 0
5V

Measurement point C

[C2X] Summer 2014

Overview, Use Cases, and Architectures

22

Network Topologies

Wired AND

Example (assuming posiGve logic)


5V = logical 1
0V = logical 0
5V

Measurement point: 5V
(logical 1)

A: 5V

B: 5V

[C2X] Summer 2014

Overview, Use Cases, and Architectures

23

Network Topologies

Wired AND

Example (assuming posiGve logic)


5V = logical 1
0V = logical 0
5V

A ^

B = C

Measurement point: 0V
(logical 0)

A: 0V

B: 5V

[C2X] Summer 2014

Overview, Use Cases, and Architectures

24

Network Topologies

Wave eects

Wave eects: ReecGons and ends of wire or connectors


Non negligible at high data rates, i.e., short bit lengths
PropagaGon velocity of a signal on in-vehicle bus:
1
c c0
3

Signal delay on typical in-vehicle bus:


t=

l
200ns
c

Wave eects problemaGc if:


t bit < 10t

Countermeasures
Add terminator plugs (resistor)
Minimize use of connectors

[C2X] Summer 2014

Overview, Use Cases, and Architectures

25

Network Topologies

Bit coding


logical 0

logical 1

Non return to Zero (NRZ)

Manchester
(original variant)

NRZ

Manchester

[C2X] Summer 2014

Overview, Use Cases, and Architectures

26

Network Topologies

Non Return to Zero (NRZ)


Clock

Signal

Bits

[C2X] Summer 2014

0 1 1 0 1 1 1 0 1 1 1 1 0

Overview, Use Cases, and Architectures

27

Network Topologies

Manchester Code


Clock

Signal

Bits

[C2X] Summer 2014

0 1 1 0 1 1 1 0 1 1 1 1 0

Overview, Use Cases, and Architectures

28

Network Topologies

Reducing ElectromagneGc interference (EMI)

Add shieling to wires


Use twisted pair wiring
Reduce steepness of signal slope
Use coding with few rising/falling signal edges (NRZ)

NRZ

Manchester

[C2X] Summer 2014

Overview, Use Cases, and Architectures

29

Network Topologies

Clock drim

Caused by natural variaGons of quartz, environment


Receiver must sample signal at right Gme instant
Clock drim leads to de-synchronizaGon
Bit Gming has to be re-adjusted conGnually
Commonly used: rising/falling signal edges

NRZ

Manchester

[C2X] Summer 2014

Overview, Use Cases, and Architectures

30

Network Topologies

Bit stung

Problem
When using NRZ coding, sending many idenGcal bits leaves no signal
edges that could be used to compensate for clock drim

SoluGon
InserGon of extra bits amer n consecuGve idenGcal bits

Example (stung width: 3)

NRZ
plain

NRZ
w/ bit stuffing
[C2X] Summer 2014

Overview, Use Cases, and Architectures

31

Network Topologies

ClassicaGon according to bus access

Bus access

Deterministic

centralized

[C2X] Summer 2014

distributed

Random

non collision
free

Overview, Use Cases, and Architectures

collision free

32

Network Topologies

DeterminisGc, centralized

Master-Slave protocols

Simple request/response pafern

Master asks
Slave 1

Slave 1
answers

Master asks
Slave 2

Slave 2
answers

...

[C2X] Summer 2014

Overview, Use Cases, and Architectures

33

Network Topologies

DeterminisGc, distributed

Token based protocols, TDMA protocols

Slave 1
sending...

...

TDMA Slot
Slave 1

...
...hands
Token to
Slave 3

...hands
Token to
Slave 2

Slave 2
sending...

[C2X] Summer 2014

TDMA Slot
Slave 2

TDMA Slot
Slave 4

Overview, Use Cases, and Architectures

TDMA Slot
Slave 3

34

Network Topologies

Random access, non collision free

CSMA/CA (Collision Avoidance)

Client 1

d1

d1

Client 2

sense

sense

d2

d2

Bus

d1

d1

d2

d2

Data 1

Data 2

Data 2

Data 1
[C2X] Summer 2014

Overview, Use Cases, and Architectures

35

Network Topologies

Random access, non collision free

CSMA/CD (Collision DetecGon)

Client 1

d1

jam

d1

Client 2

d2

jam

backoff

d2

Bus

jam

d1

d2

Jam
signal

Data 1

Data 2

Collision
[C2X] Summer 2014

Overview, Use Cases, and Architectures

36

Network Topologies

Random access, collision free

CSMA/CR (Collision ResoluGon)

Client 1

d1

Client 2

backoff

d2

Bus

d1

d2

Data 1

Arbitration

Data 2

Arbitration

[C2X] Summer 2014

Overview, Use Cases, and Architectures

37

Network Topologies
Typical structure of an ECU

SeparaGon by Layers
Physical Layer: Transceiver / Bus driver
Bus access: CommunicaGon controller
ApplicaGon layer: Microprocessor
Commonly with bus guard for emergency shutdown

MAC

Enable

[C2X] Summer 2014

PHY

Bus guard

Overview, Use Cases, and Architectures

Bus

Enable

38

Network Topologies

Modern bus architecture:


Source: AUDI AG

[C2X] Summer 2014

Overview, Use Cases, and Architectures

39

Trend towards centralized architectures

Decentralized architecture
Con: MulGple interconnecGons
high delay
Con: Distributed complexity
high maintainance
Pro: Decouples individual funcGons

Centralized architecture
Pro: One interconnecGon
fast, robust networking
Pro: Manageable complexity
low maintainance
Pro: Flexible, modular deployment

[C2X] Summer 2014

Overview, Use Cases, and Architectures

40

Main Takeaways

Network Topologies

Single wire, two wire


Wired OR, wired AND
Non Return to Zero (NRZ) vs. Manchester coding
Clock drim, synchronizaGon, bit stung

Bus access

DeterminisGc, non-determinisGc access


CSMA/CA, CSMA/CD, CSMA/CR
Bus guard


[C2X] Summer 2014

Overview, Use Cases, and Architectures

41

You might also like