introduction to automotive networks
Short Description
introductions to automotive networks, including CAN, LIN, MOST and Flexray...
Description
Introduction to Automotive Networks An introduction to: CAN, LIN, MOST and Flexray
Agenda • Evolution of in-vehicle automotive Networks – Why were automotive networks introduced? – What are automotive networks used for?
• Basic introduction to networking principles • Current and future networking technologies – CAN, LIN, MOST, Flexray
General Computer Networks •Interconnected devices that store, retrieve and share information
Automotive Network Evolution - 1
ECU = Electronic Control Unit
Automotive Networking Evolution - 2
Hard-wired Integration ECU = Electronic Control Unit
Automotive Networking Evolution - 3
Data Bus Integration ECU = Electronic Control Unit
Automotive Networking - advantages • Reduced wiring harness weight – lower emissions, improved fuel consumption
• Reduction in number of redundant sensors & connectors • Improved reliability – fewer warranty issues • Improved diagnostics • Eases integration of more ECU’s – Standard interfaces
Legacy and current networking technologies •In-Vehicle Network Protocols Legacy Powertrain / Chassis Body
SCP, K-bus
Infotainment D2B
Current
Future
CAN
CAN, FlexRay
CAN, LIN
CAN, LIN, FlexRay
MOST Gen 2.1
Ethernet (BroadR-Reach)
Why so many different types of networks? Data rate
Comparison : Network data rate versus relative communication costs per node
(bps)
MOST
25M
Optical
10M
Flexray Optical/
1M
Copper
CAN 125K 20K
Dual wire
LIN
Relative communication cost per node
Single wire
0.5
1
2.5
5
Multiple networks and gateways
Multiple-Bus Networking
Head Lights
Low Speed CAN
High Speed CAN
ABS
Tail Lights
Dash Board
Doors
Engine Control Gateway
Suspension Control
Controller Area Network (CAN) Overview
CAN
CAN Network History & Evolution •Developed by Bosch in Europe – At request of BMW and Mercedes
•History and Evolution of CAN Network protocol – 1991 CAN – 1992 – 1999 – 2003 – 2003
– ISO/Draft International Standard + Extended – – – –
First use in car (S-series, BMW 8) estimated 125 million nodes world-wide estimated 240 million nodes world-wide ISO 11898 revised
•Used by almost all car manufacturers for the main data communications technology
CAN “physical layer” – Hardware Input/Output Ports
Input/Output Ports
Microcontroller eg. 80537
Microcontroller eg. 68705 Microcontroller eg. 68HC05X4
CAN Controller e.g. 82C200 TX0 TX1
CAN Controller e.g. 82527
RX0 RX1
TX0 TX1
CAN Transceiver CAN_L
RX0 RX1
CAN Transceiver
CAN_H
CAN_H
T w i sted - p ai r W i re
CAN_L
CAN “physical layer” – CAN Signalling •Bit Representation – CAN uses an electrical medium to transfer data – UTP (Unshielded Twisted Pair) – Data represented by voltage difference between two wires • CAN_High – Recessive = 2.5V – Dominant = 3.5V • CAN_Low – Recessive = 2.5V – Dominant = 1.5V
V 3.5 V
2.5 V
Can_H
0 1 0 1 0 1 0
1.5 V
Can_L t
CAN Signalling Logical ‘1’ = Vdiff = 0V Logical ‘0’ = Vdiff = 2V
CAN “physical layer” – Twisted pair wiring Transient noise
CAN-HI
Receiver looks for a 2V differential CAN-LO
CAN “physical layer” – Bus topology •CAN Physical Layer – Realities: JLR + J2284 (SAE) Node 1 120Ώ
Node 2
Node n Node 3
120Ώ
CAN_H CAN_L Automotive constraints are quite different from the original theoretical specification
CAN Data Rate 500 Kbps 250 Kbps 125 Kbps
CAN Bus Length 33.5 m* 50 m 50 m
Stub Length 1m 1m 1m
Max Nodes 16* 32 32
*Note. 5m + 1node required for test equipment access => max length from J1962 connector to terminator = 28.5m
CAN “physical layer” – Bus topology •Example – Physical implementation of CAN bus schematic
CAN “physical layer” – Bus topology •Example – Physical implementation of CAN bus schematic
CAN “data link layer” – CAN message frame •CAN Data is transferred in frames 1 Bit 6 Bits 1 ... 8 Bits bytes
11 or 29
15 1 Bit 7 1 Bit 1Bit Bits Bits
>=3 Bits
End of Frame ACK Delimiter ACK ACK Slot CRC Delimiter
CRC Sequence Data Field Control (2 bits reserved for future, DLC0-3 is the data length code )
{
1 Bit
Interframe Space
{
Interframe Space
RTR Bit Identifier Start of Frame
Arbitration Field
RTR = Remote Transmission Frame CRC = Cyclic Redundancy Check ACK = Acknowledge DLC = Data Length Code
CAN “data link layer” – Bus Access •Access to the CAN network
– Multiple bus masters - every node attempts to transmit when it wants to… – Every node must contend (arbitrate) for network access
•Bus Access is achieved through CSMA/CD with NDBA •Carrier Sense Multiple Access/Collision Detect – Allows multiple access to transmission medium – Used in Ethernet, CAN etc.
•Non-Destructive Bit-wise Arbitration
– Fixed priority scheme (based on node ID) – If node senses a higher priority node is requesting bus access it relinquishes bus – Highest priority node always granted access – No corrupted message during arbitration - No wasted bandwidth – Guaranteed throughput of high priority messages
Automotive Networking CAN bus Overview •CAN Data Link Layer – How CSMA/CD & NDBA t1 t2 works SOF R Node A 0 1 0 1 1 1 1 1 0 ID 1493 D (5D5Hex) R D
Node B ID 1501 (5DDHex)
R D
Node C ID 2013 (7DDHex)
R D
Bus ID 1493 (5D5Hex)
t1 & t2 , Node C and Node B lost arbitration
CAN Network – Bus Load & Message Latency •CAN networks are non-deterministic – No guarantees on time to deliver a message – Does not perform well above 50% bus loading – 35-40% is the usual practical bus loading limit Typical CAN bus characteristic Message Latency
Bus Load
CAN Network Summary •Features – Low cost, twisted-pair (2-wire) electrical implementation – Multiple bus masters - arbitration used to grant access to network – 125 & 500kbits/sec – Non-deterministic
•Where used – High speed - PowerTrain – Low/Medium speed – Body Control Systems
Local Interconnect Network (LIN) Overview
LIN Network overview • Not a competitor or alternative to CAN – Introduced in 2000 – Low cost / lower bandwidth – Developed for intelligent sensor and actuator applications – Automotive Sub-bus (UART based), CAN bus complement
• Where used – Switches, Solenoids, Actuators and Motors (mechatronics) – Bodywork, Doors etc.
LIN applications
LIN “physical layer – Signalling •Data Representation – LIN uses an electrical medium to transfer data – A simple single wire interconnect (based on enhanced ISO 9141) – Data represented simply by voltage on wire – 12 volts = Logic 1, 0 volts = Logic 0
• Speed
12V=logic 1
– Low speed - 20Kbaud – Limited for EMC reasons
0V=logic 0
LIN Bus Architecture – master/slave LIN Master Message Header
Possibly to vehicle body control CANbus
Message Response
LIN Bus
LIN Slave
LIN Slave
LIN Slave
Message Response
Message Response
Message Response
LIN “data link layer” – LIN message frame •LIN data is transferred in frames
Produced by Master
Produced by Master or Slave
LIN “data link layer” – Bus access Access to the LIN network Single Master – no arbitration necessary Master determines transmission using task schedule – Predictable message timing as everything works to the master schedule – Slaves respond to master request
LIN Network Summary •Features – – – –
Low cost, single-wire implementation (UART) Single Master, Multiple Slaves Low bandwidth - 20kbaud Complements CAN bus – not a replacement
•Where used – Switches, Solenoids, Actuators and Motors (mechatronics) – Bodywork, Doors etc.
Media Orientated Systems Transport (MOST) Network Overview
MOST Network History • A network was required to link modular multi-media systems
– Ability to transmit audio signals as well as control – Audio signals are typically twisted pair wiring, can be 9+ audio sources = wiring complexity issues – AM/FM radio, CD, DVD, Satellite radio, Navigation, Phone, Voice, TV, Auxiliary input
• Ability to seamlessly control several sources • Need to share large amounts of data
– Phone book (phone to navigation display) – Traffic messages (radio to navigation display) – Station data (Satellite radio to navigation display)
• Ease of upgrade (not quite plug & play) • MOST was developed & controlled by industry consortium – Used by JLR, Volvo, BMW, Mercedes, GM……
MOST Physical Layer – Network layer 1 • Data representation – – – –
MOST uses an optical medium to transfer data Plastic Optical Fibre (POF) Ring topology Data represented by presence or absence of light
• Speed – Up to 25Mbits/sec
MOST “data link layer” – Types of MOST messages •MOST Data is transferred in network frames which can contain three types of data: • Synchronous data – Guaranteed bandwidth with minimal buffering – Real-time transmission e.g. streaming audio & video files
• Asynchronous data – Variable throughput – For transmission of ‘large’ packet data e.g. computer files, Sat-Nav maps, web pages etc.
• Control Data – Transportation of Commands, Status and “small” Packet Data
MOST Frame Data •Two examples ONE NETWORK FRAME = 512 bits (64 bytes) MAX BANDWIDTH ALLOCATED TO ASYNCHRONOUS CHANNELS = 36 bytes 0
63
Audio – CD, Radio
Data – phone book download, traffic info
24 bytes
36 bytes
0
63
Audio – CD, Radio, DVD, Phone, satellite radio, i-Pod 60 bytes 1-60
0 0
SOURCE DATA CHANNELS (Asynchronous and/or Synchronous) BOUNDARY DESCRIPTOR PREAMBLE
= Asynchronous Channel
CONTROL CHANNEL FRAME CONTROL & STATUS PARITY CHECK
= Synchronous Channel
= Boundary Descriptor
61-62 63 63
MOST “data link layer” – Bus Access • Access to the MOST network • Single network master device – the timing master • Time Division Multiplexing – Time slots provide predictable performance – Bandwidth can be varied by allocating bytes to logical channels
MOST Network Summary •Features – Single Plastic Optical Fibre, Ring topology – Good EMC characteristics (immunity & emissions) – High speed for digital audio & video (low cost per Mhz) – Asynchronous (14.4Mbps), Synchronous (23Mbps) data – Plug & Play Applications for up to 64 devices
•If ring is broken everything fails •Where used – Designed for Multi-media applications (also known as Infotainment) in the automotive environment
Future Automotive Networks
Future Automotive Networks Industry pressures: • Move to drive-by-wire applications – Safety-critical, robust, fault-tolerant – More sophisticated control strategies • Hybrid/EV vehicles
• Faster speeds – Increased bandwidth • More ECU’s, more sensors • Higher volumes of data to move around the vehicle – Faster response times • Hybrid vehicle electric motor control
Networking – Message Latency Typical TT network characteristic – predictable latency
Typical CAN bus characteristic – unpredictable latency
Message Latency
Message Latency
Bus Load
Bus Load
FlexRay is a time-triggered (TT) protocol – each node is guaranteed access to the bus
FlexRay Physical Layer •
•
FlexRay • Electrical, Twisted Pair • 22metres@ 10Mbit/s
•
Idle-LP : Power Off situation. BP & BM @ GND. Idle : No current is drawn, BP & BM biased to the same voltage level
CAN •
Differential voltage uBus = uBP - uBM
Electrical, Twisted Pair (40metres@ 1Mbit/s)
Data_1, BP +ve, BM –ve, Differential = +ve Data_0, BM +ve, BP -ve, Differential = -ve
FlexRay Physical Layer
FlexRay Data Link Layer
TDMA Access
Note: FlexRay is much more complex than CAN to design – there are multiple design parameters to consider. Consider integration issues as well.
FlexRay Networking FlexRay High speed backbone X-by-Wire Airbag deployment
LIN Sub Bus: Doors Seats etc. CAN/TTCAN – Applications: Powertrain/body TTCAN deterministic powertrain MOST Infotainment Many proposed uses of FlexRay
Review of what we’ve learnt • Networking principles – “physical layer” – how data is represented – “data link layer” – how data is transferred between nodes
• Evolution of automotive networks – Why they were introduced
• Current Network Technologies – CAN, LIN, MOST – Choice depends upon application requirements, speed, cost etc.
• Future Network Technologies – FlexRay (one possible solution)
View more...
Comments