Industrial Automation

advertisement
Industrial Automation
Automation Industrielle
Industrielle Automation
3.4 MVB (IEC 61375): a fieldbus case study
Prof. Dr. H. Kirrmann
ABB Research Center, Baden, Switzerland
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -1
Outline
1. Applications in rail vehicles
2. Physical layer
1. Electrical RS 485
2. Middle-Distance
3. Fibre Optics
3. Device Classes
4. Frames and Telegrams
5. Medium Allocation
6. Clock Synchronization
7. Fault-tolerance concept
8. Integrity Concept
9. Summary
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -2
Summary
MVB is a field bus for time-critical, cyclical data transmission operating on the
principle of source-addressed broadcast on different media, twisted wire pair and
optical fibers.
MVB is an IEC standard since 1999 (IEC 61375) for use in railways as a vehicle
bus and as a train bus for closed train sets by the IEC Technical Committee 9.
MVB is also an IEEE standard (IEEE 1473-T).
MVB is also used outside of railways in applications such as industrial automation,
printing, metals and minerals, power plants and electrical substations.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -3
Multifunction Vehicle Bus in Locomotives
standard communication interface for all kind of on-board equipment
radio
power line
cockpit
Train Bus
diagnosis
Vehicle Bus
brakes
data rate
delay
medium
number of stations
EPFL - Industrial Automation
power electronics
motor control
track signals
1'500'000 bits/second
0,001 second
twisted wire pair, optical fibres
up to 255 programmable stations
up to 4095 simple sensors/actuators
2009-03-05, HK
MVB case study 3.4 -4
Multifunction Vehicle Bus in Coaches
passenger
information
doors
light
Train Bus
Vehicle Bus
air conditioning
seat reservation
covered distance:
power
brakes
> 50 m for a 26 m long vehicle
< 200 m for a train set
diagnostics and passenger information require relatively long, but infrequent messages
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -5
Physical Media
• OGF
• EMD
• ESD
optical fibres
shielded, twisted wires with transformer coupling
wires or backplane with or without galvanic isolation
(2000 m)
(200 m)
(20 m)
Media are directly connected by repeaters (signal regenerators)
All media operate at the same speed of 1,5 Mbit/s.
devices
star coupler
optical links
rack
optical links
rack
twisted wire segment
EPFL - Industrial Automation
2009-03-05, HK
sensors
MVB case study 3.4 -6
Application in train sets
MVB can span several vehicles in a multiple unit train configuration:
Train Bus
repeater
node
MVB
devices
devices with short distance bus
The number of devices under this configuration amounts to 4095.
MVB can serve as a train bus in trains with fixed configuration, up to a distance of:
> 200 m (EMD medium or ESD with galvanic isolation) or
> 2000 m (OGF medium).
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -7
Topography
Bus
Administrator
Node
Train Bus
EMD Segment
Device
Device
Device
Device
Terminator
Repeater
ESD Segment
section
Repeater
Device
Device
Device
OGL link
Repeater
ESD Segment
Device
Device
Device
Device
all MVB media operate at same speed, segments are connected by repeaters.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -8
Outline
1. Applications in vehicles
2. Physical layer
1. ESD (Electrical, RS 485)
2. EMD (Transformer-coupled)
3. OGF (Optical Glass Fibres)
3. Device Classes
4. Frames and Telegrams
5. Medium Allocation
6. Clock Synchronization
7. Fault-tolerance concept
8. Integrity Concept
9. Summary
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -9
ESD (Electrical Short Distance) RS485
Interconnects devices over short distances ( 20m) without galvanic separation
Based on proven RS-485 technology (Profibus)
Main application: connect devices within the same cabinet.
device 1
terminator/
biasing
TxS RxS
•••
device 2.. n-1
TxS RxS
Ru
(390)
Data_N
Rm
(150 )
Rd
(390 )
terminator/
biasing
+5V
+5V
Ru
(390)
device N
TxS RxS
Rm
(150 )
Rd
(390 )
Data_P
GND
equipotential line
Bus_GND
segment length
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -10
ESD Device with Galvanic Isolation
shield connected to
connector casing
optocouplers
1
galvanic
barrier
protection
circuit
protective earth
+5V el
TxF
0V el
TxS
+Vcc
1
Data
GND
TxF'
female
TxS'
male
RxS
RxS'
+5V
RS 485
transceiver
power
cable
shield connected to
connector casing
EPFL - Industrial Automation
device casing
connected to
supply ground
2009-03-05, HK
DC/DC
converter
MVB case study 3.4 -11
1
2
3
4
5
5
A.Bus_5V
B.Bus_5V
B.Data_N
B.Data_P
A.Data_N
A.Data_P
B.Bus_GND
A.Bus_GND
ESD Connector for Double-Line Attachment
4
reserved
(optional TxE)
3
2
1
male
female
9
9
Line_B
8
8
7
6
Line_A
cable
7
Line_B
Line_A
6
Line_A
Line_A
Line_B
Line_B
cable
10
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -12
EMD (Electrical Medium Distance) - Single Line Attachment
• Connects up to 32 devices over distances of 200 m.
• Transformer coupling to provide a low cost, high immunity galvanic isolation.
• Standard 120 Ohm cable, IEC 1158-2 line transceivers can be used.
• 2 x 9-pin Sub-D connector
• Main application: street-car and mass transit
device
bus
controller
transceiver
transformer
shield
bus section 2
bus section 1
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -13
EMD Device with Double Line Attachment
device
Bus_Controller
transceiver A
transceiver B
A.Data_P
A.Data_N
B.Data_P
B.Data_N
1
Connector_1
A1
B1
B2
1
A1. Data_P
A1. Data_N
A2
Connector_2
1
B1. Data_P
B1. Data_N
B2. Data_N
B2. Data_P
A1. Data_N
A1. Data_P
Line_A
Line_A
Line_B
Line_B
Carrying both redundant lines in the same cable eases installation
it does not cause unconsidered common mode failures in the locomotive environment
(most probable faults are driver damage and bad contact)
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -14
EMD Connectors for Double-Line Attachment
cable
Connector_1 (male)
Zt.A
Line_A
A.Term_P
A.Term_N
male
1 A1. Data_P
6
Line_A
2 A1. Data_N
7
terminator connector
3
8
4 B1. Data_P
9
5 B1.Data_N
5
Line_B
9
4
8
shields contacts case
3
Line_B
B.Term_N
B.Term_P
5 B1.Data_N
9
7
Line_B
2
6
4 B1. Data_P
8
1
3
7
2 A1. Data_N
6
Line_A
1 A1. Data_P
Zt.B
EPFL - Industrial Automation
female
Connector_1 (female)
2009-03-05, HK
MVB case study 3.4 -15
EMD Shield Grounding Concept
device
device
device
inter-section
connectors
terminator
terminator
shield
possible shield
discontinuity
device ground
device ground
inter-device
impedance
inter-device
impedance
Shields are connected directly to the device case
Device cases should be connected to ground whenever feasible
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -16
OGF (Optical Glass Fibre)
Covers up to 2000 m
Proven 240µm silica clad fibre
Main application: locomotive and critical EMC environment
Star Coupler
wired-or electrical media
opto-electrical
transceiver
to other device
or star coupler
to other device
or star coupler
fibre pair
Rack
device
EPFL - Industrial Automation
device
device
2009-03-05, HK
device
ESD segment
device
device
MVB case study 3.4 -17
OGF to ESD adapter
MVBC
RxDA
A.Data_P
1
3
A.5V
A.0V
TxD
5
TxE
RxDB
3
1
A.Data_P
B.5V
B.0V
RS-485 transceiver
fibre-optical transceivers
to star coupler A
to star coupler B
from star coupler A
from star coupler B
Double-line ESD devices can be connected to fibre-optical links by adapters
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -18
Repeater: the Key Element
A repeater is used at a transition from one medium to
another.
bus
administrator
slave
slave
repeater
encoder
decoder
(RS 485)
slave
decoder
encoder
ESD segment
slave
(redundant)
bus
administrator
EMD segment
(transformer-coupled)
The repeater:
• decodes and reshapes the signal (knowing its shape)
• recognizes the transmission direction and forward the frame
• detects and propagates collisions
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -19
duplicated segment
Line_A
Line_B
Repeater internals
repeater
decoder
encoder
decoder
Line_A
(single-thread
optical link)
direction
recogniser
decoder
encoder
decoder
Line_B
(unused for singlethread)
recognize the transmission direction and forward the frame within 3 µs (~500m cable back and forth).
decode and reshape the signal (using a priori knowledge about its shape and encoding)
jabber-halt circuit to isolate faulty segments with continuous sender.
detect and propagate collisions (which also occur when senders answer on both sides with no overlap)
increase the inter-frame spacing to avoid overlap of master and slave frame (race condition)
can be used with all three media (OGF, EMD, ESD)
appends the end delimiter in the direction fibre to transformer, remove it the opposite way
suppress overshoot when the transformer side is not terminated
handles redundancy (transition between single-thread and double-thread) – option.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -20
Outline
1. Applications in vehicles
2. Physical layer
1. Electrical RS 485
2. Middle-Distance
3. Fibre Optics
3. Device Classes
4. Frames and Telegrams
5. Medium Allocation
6. Clock Synchronization
7. Fault-tolerance concept
8. Integrity Concept
9. Summary
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -21
Class 1 Device
used for MVB
A B
board bus
bus
controller
MVB
redundant
bus pairs
(ESD)
RS 485
drivers/
receivers
address
register
analog
or
binary
input/
output
clock
device
status
(monomaster)
Class 1 or field devices are simple connections to sensors or actuators.
They do not require a micro-controller.
They do not participate in message data communication.
The Bus Controller manages both the input/output and the bus.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -22
Class 2-3 Device
A B
private
RAM
traffic store
used for MVB
application
processor
EPROM
MVB
redundant
bus pairs
(ESD)
bus
controller
RS 485
drivers/
receivers
clock
shared
local RAM
device
status
local
input/
output
• Class 2 and higher devices have a processor and may exchange messages
• Class 2 devices are configurable I/O devices (but not programmable)
• The bus controller communicates with the application processor through a
shared memory (traffic store), which holds typically 256 ports.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -23
Class 4-5 Device
Class 4 devices present the functionality of a Programming and Test station
Class 4 devices are capable of becoming Bus Administrators.
To this effect, they hold additional hardware to read the device status of the
other devices and to supervise the configuration.
They also have a large number of ports (4096), so they can supervise the process
data transmission of any other device.
Class 5 devices are gateways with several link layers (one or more MVB, WTB).
The device classes are distinguished by their hardware structure.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -24
MVBC - bus controller ASIC
duplicated
electrical or optical
transmitters
A
12 bit device address
Manchester
and CRC
encoder
16x16
Tx buffer
CPU parallel bus
to traffic store
Clock,
Main
Timers &
Control
Sink Time
Unit
Supervision
A19..1
address
D15..0
data
B
A
JTAG
interface
DUAL
Manchester
and CRC
decoders
16x16
Rx buffer
Class 1
logic
Traffic Store
Control
& Arbiter
control
B
duplicated electrical or
optical receivers
• Automatic frame generation and analysis
• Adjustable reply time-out
• Up to 4096 ports for process data
• 16KByte.. 1MByte traffic store
• Freshness supervision for process data
• In Class 1 mode: up to 16 ports
• Bit-wise forcing
• Time and synchronization port
EPFL - Industrial Automation
2009-03-05, HK
• Bus administrator functions
• Bookkeeping of communication errors
• Hardware queuing for message data
• Supports 8 and 16-bit processors
• Supports big and little endians
• 24 MHz clock rate
• HCMOS 0.8 µm technology
• 100 pin QFP
MVB case study 3.4 -25
Bus Interface
The interface between the bus and the application is a shared memory, the
Traffic Memory, where Process Data are directly accessible to the application.
Traffic Store
Application
processor
6 bus
management
ports
bus
controller
0..4095
Logical Ports
(256 typical)
for Process
data
process data
base
8 physical
ports
messages packets
and
bus supervision
2 message ports
MVB
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -26
Outline
1. Applications in vehicles
2. Physical layer
1. Electrical RS 485
2. Middle-Distance
3. Fibre Optics
3. Device Classes
4. Frames and Telegrams
5. Medium Allocation
6. Clock Synchronization
7. Fault-tolerance concept
8. Integrity Concept
9. Summary
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -27
Manchester Encoding
data
110 100010 111110 1
clock
frame
signal
0 123 45 67 8
9-bit Start Delimiter
with non-Manchester sequence
frame data
8-bit check
sequence
end
delimiter
The Manchester-coded frame is preceded by a Start Delimiter containing
non-Manchester signals to provide transparent synchronization.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -28
Frame Delimiters
Different delimiters identify master and slave frames:
Master Frame Delimiter
0
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
start bit
active state
idle state
Slave Frame Delimiter
0
start bit
active state
idle state
This prevents mistaking the next master frame when a slave frame is lost.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -29
Frames Formats
MVB distinguishes two kinds of frames:
master frames issued by the master
9 bits 4
(33 bits, 22 us)
12
MSD = Master Start Delimiter (9 bits)
CS = Check Sequence (8 bits)
F = F_code (4 bits)
8
MSD F address
CS
slave frames sent in response to master frames
9
(33 bits, 22 us)
SSD
(49 bits, 32.7 us)
9
SSD
(81 bits, 54 us)
(153 bits, 102 us)
8
16 bits
CS
data
32 bits
data
SSD = Slave Start Delimiter (9 bits)
8
CS
9
SSD
64 bits
9
SSD
64 bits
9
64 bits
(297 bits , 198 us) SSD
data
data
data
8
CS
8
CS
64 bits
8
CS
64 bits
data
data
8
CS
8 64 bits
8 64 bits
8
CS data CS data CS
useful (total) size in bits
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -30
Media Distance Limits
The distance is limited by the maximum allowed reply delay of 42,7 µs
between a master frame and a slave frame.
repeater
repeater
master
remotest
data source
repeater
delay
cable delay for 2000m: 10 µs
repeater delay: 2 x 5 µs
total: (10 + 10) x 2 = 40 µs.
propagation delay
(5 µs/km)
max
t_ms < 42,7µs
repeater
delay
t_source
t_ms
repeater
delay
t_s
t_sm
time
EPFL - Industrial Automation
The reply delay time-out can be
raised up to 83,4 µs for longer
distances
(with reduced troughput).
distance
2009-03-05, HK
MVB case study 3.4 -31
Telegram formats
Process Data
Master Frame (Request)
Slave Frame (Response)
port
address
4 bits 12 bits
F=
0..7
dataset
time
16, 32, 64, 128 or 256 bits of Process Data
Message Data
256 bits of Message Data
Master Frame
source
device
4 bits 12 bits
F=
12
destination
device
prot
ocol
decoded
by
hardware
Supervisory Data
Master Frame
port
F=
8-15 address
4 bits 12 bits
source size FN FF ON OF MTC
transport data
device
final node
final function
origin node
origin function
time
message
tranport
control
Slave Frame
16 bits
time
Telegrams are distinguished by the F_code in the Master Frame
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -32
Principle of Source-addressed broadcast
Phase1: The bus master broadcasts the identifier of a variable to be transmitted:
bus
master
subscribed
device
subscribed
device
sink
source
subscribed devices
sink
sink
devices
(slaves)
bus
variable identifier
Phase 2: The device which sources that variable responds with a slave frame
containing the value, all devices subscribed as sink receive that frame.
subscribed
device
subscribed
device
sink
source
bus
master
subscribed devices
sink
sink
devices
(slaves)
bus
variable value
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -33
Decoupling the bus and application processes
cyclic
poll
cyclic
algorithms
cyclic
algorithms
cyclic
algorithms
cyclic
algorithms
application
1
application
2
application
3
application
4
bus
master
Poll
List
Traffic
Stores
Ports
Ports
source
port
Ports
sink
port
bus
controller
bus
controller
Ports
sink
port
bus
controller
bus
controller
bus
controller
bus
port address
port data
The bus traffic and the application cycles are not synchronised.
The bus master sends the variable identifiers according to their individual period.
Bus and applications interface through a shared memory, the traffic store*.
*Verkehrsspeicher
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -34
Traffic Memory
Bus and application are (de)coupled by a shared memory, the Traffic Memory,
which is not a simple dualport RAM, but a structure that guarantees exclusive
and asynchronous access by both the bus and the application.
Application
Processor
Associative
memory
Traffic Memory
Process Data
Base
two pages ensure that read and
write can occur at the same time
Bus
Controller
bus
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -35
Restriction in simultaneous access
starts
t1
t2
time
ends
writer
reader 1
error !
(slow) reader 2
page0
traffic store
page1
page 1 becomes valid
page 0 becomes valid
• there may be no semaphores to guard access to a traffic store (real-time)
• there may be only one writer for a port, but several readers
• a reader must read the whole port before the writer overwrites it again
• therefore, the processor must read ports with interrupt off.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -36
Operation of the traffic memory
In content-addressed ("source-addressed") communication, messages are broadcast,
the receiver select the data based on a look-up table of relevant messages.
For this, an associative memory is required.
Since address size is small (12 bits), the decoder is implemented by a memory block:
port index table
processor
12-bit Address
0
1
2
4
5
0
0
0
1
2
6
7
voids
4091
4092
4093
4094
0
0
voids
0
4
0
3
4095
0
storage
page 0
page 1
data(4)
data(5)
data (4094)
data(4)
data(5)
data (4094)
data(4092)
0
data(4092)
0
bus
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -37
F_code Summary
Master Frame
F_code address
0
1
2
3
4
5
6
7
logical
Slave Frame
request
source
Process_Data
reserved
reserved
reserved
single
device
subscribed
as
source
size
16
32
64
128
256
-
response
destination
Process_Data
(application
-dependent)
all
devices
subscribed
as
sink
8
all devices Master_Transfer
Master
16
Master_Transfer
Master
9
device
General_Event
>= 1devices
16
Event_Identifier
Master
10
11
12
device
device
device
reserved
reserved
Message_Data
single device
256
Message_Data
selected device
13
group
Group_Event
>= 1devices
16
Event_Identifier
Master
14
device
Single_Event
single device
16
Event_Identifier
Master
15
device
Device_Status
single device
16
Device_Status
Master or monitor
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -38
Outline
1. Applications in vehicles
2. Physical layer
1. Electrical RS 485
2. Middle-Distance
3. Fibre Optics
3. Device Classes
4. Frames and Telegrams
5. Medium Allocation
6. Clock Synchronization
7. Fault-tolerance concept
8. Integrity Concept
9. Summary
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -39
Master Operation
The Master performs four tasks:
1) Periodic Polling of the port addresses according to its Poll List
2) Attend Aperiodic Event Requests
3) Scan Devices to supervise configuration
4) Pass Mastership orderly (last period in turn)
basic period
sporadic phase
periodic
phase
1 2 3 4
supervisory
phase
5 6 7 SD
event
phase
? ? ? ?
basic period
sporadic phase
periodic
phase
1 2
guard phase
8
supervisory
phase
9 SD
event
phase
? ? ? ? EV
guard phase
1 2
time
The Administrator is loaded with a configuration file before becoming Master
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -40
Bus Traffic
State Variable
State of the Plant
Response in 1..200 ms
Messages
Events of the Plant
Response at human speed: > 0.5 s
... commands, position, speed
• Diagnostics, event recorder
• Initialisation, calibration
Periodic Transmission
On-Demand Transmission
Spurious data losses will be
compensated at the next cycle
Periodic Data
Basic Period
Basic Period
event
time
Sporadic Data
EPFL - Industrial Automation
Flow control & error recovery
protocol for catching all events
2009-03-05, HK
MVB case study 3.4 -41
Medium Access
basic period
periodic
phase
1
2
3
4
5
basic period
sporadic
phase
6
? ?
? ?
periodic
phase
1
2
7
events ?
guard
time
8
9
sporadic
phase
10
?
events ?
!
1
? ?
2
3
time
event guard
data
time
individual period
A basic period is divided into a periodic and a sporadic phase.
During the periodic phase, the master polls the periodic data in sequence.
Periodic data are polled at their individual period (a multiple of the basic period).
Between periodic phases, the Master continuously polls the devices for events.
Since more than one device can respond to an event poll, a resolution procedure
selects exactly one event.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -42
Bus Administrator Configuration
period 0
period 1
1 ms
1 ms
Tspo
1 2.0
4.0
period 2
1 ms
4 ms
Tspo
1 2.1
period 3
4.1
period 4
1 ms
Tspo
1 2.0 8.2
Tspo
1 2.1
1 2.0 4.0
time
2 ms
cycle 2
2 ms
begin of turn
The Poll List is built knowing:
• the list of the port addresses, size and individual period
• the reply delay of the bus
• the list of known devices (for the device scan
• the list of the bus administrators (for mastership transfer)
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -43
Poll List Configuration
macroperiod (8 T_bp shown, in reality 1024 T_bp)
2 BP datasets
4.2
4.0
4.2
4.0
2.1
2.0
2.1
2.0
2.1
2.0
2.1
2.0
2.1
2.0
2.1
1 BP datasets
1
1
1
1
1
1
1
1
1
1
1
period 2
period 3
period 4
period 5
period 6
period 7
0
1
2 BP datasets
period 1
8.1
period 0
4.0
period 7
8.1
basic period
T_spo
>350µs
guard
The algorithm which builds the poll table spreads the cycles evenly over the macroperiod
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -44
Event Resolution (1)
To scan events, the Master issues a General Event Poll (Start Poll) frame.
If no device responds, the Master keeps on sending Event Polls until a device
responds or until the guard time before the next periodic phase begins.
A device with a pending event returns an Event Identifier Response.
If only one device responds, the Master reads the Event Identifier (no collision).
The Master returns that frame as an Event Read frame to read the event data
Start Event Poll
(parameters and
setup)
MSD
9 EMET
Event Identifier
Response
from slave
- CS SSD 12
1234
Event Poll telegram
EPFL - Industrial Automation
2009-03-05, HK
CS
Event Identifier
returned as master
frame
MSD 12
1234
CS
Event data
SSD
xxxx xxxx
Event Read telegram
CS
time
MVB case study 3.4 -45
Event Resolution (2)
If several devices respond to an event poll, the Master detects the collision and
starts event resolution
arbitration round
start poll and
parameter
setup
Fcode9
any?
group poll
Fcode13
C
individual
poll
xxx1
Fcode13
C
N
xx11
Fcode14 Fcode12
Fcode13
x101
C
0101
A
event
reading
Fcode12
A
D
time
telegram
collision
silence
collision
valid event frame
The devices are divided into groups on the base of their physical addresses.
The Master first asks the devices with an odd address if they request an
event.
• If only one response
• If there is no response, • If collision keeps on, the
comes, the master returns the master asks devices master considers the 2nd
bit of the device address.
that frame to poll the event. with an even address.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -46
Event Resolution (3)
Example with a 3-bit device address: 001 and 101 compete
width of
group
address
start arbitration
general poll
silence
xxx
n=0
collision
no event
xx0
xx1
silence
x00
silence
x10
x01
n=1
collision
silence
x11
collision
n=2
collision
000
100
010
110
001
101
011
111
individual poll
EA
EA
EA
EA
EA
EA
EA
EA
event read
even devices
EPFL - Industrial Automation
odd devices
2009-03-05, HK
time
MVB case study 3.4 -47
Time Distribution
At fixed intervals, the Master broadcasts the exact time as a periodic variable.
When receiving this variable, the bus controllers generate a pulse which can
resynchronize a slave clock or generate an interrupt request.
Application
processor 1
Bus master
Application
processor 2
Int Req
Periodic
list
Slave
Master clock
clock
Bus controller
Ports
Bus controller
Application
processor 3
Int Req
Slave
clock
Ports
Int Req
Slave
clock
Bus controller
Ports
Bus controller
MVB
Sync port address
EPFL - Industrial Automation
2009-03-05, HK
Sync port variable
MVB case study 3.4 -48
Slave Clock Synchronization
Master
Slave clock clock
Slave clocks
MVB 1
Bus
administrator 1
Slave devices
Slave clocks
Bus
administrator 2
Synchronizer
MVB 2
The clock does not need to be generated by the Master.
The clock can synchronize sampling within 100 µs across several bus segments.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -49
Outline
1. Applications in vehicles
2. Physical layer
1. Electrical RS 485
2. Middle-Distance
3. Fibre Optics
3. Device Classes
4. Frames and Telegrams
5. Medium Allocation
6. Clock Synchronization
7. Fault-tolerance concept
8. Integrity Concept
9. Summary
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -50
Fault-tolerance Concept
Transmission Integrity
MVB rather stops than provides false data.
The probability for an undetected transmission error (residual error rate)
is low enough to transmit most safety-critical data.
This is achieved through an extensive error detection scheme
Transmission Availability
MVB continues operation is spite of any single device error. In
particular, configurations without single point of failure are possible.
This is achieved through a complete duplication of the physical layer.
Graceful Degradation
The failure of a device affects only that device, but not devices which
do not depend on its data (retro-action free).
Configurability
Complete replication of the physical layer is not mandatory.
When requirements are slackened, single-thread connections may
be used and mixed with dual-thread ones.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -51
Basic Medium Redundancy
The bus is duplicated for availability (not for integrity)
address
data
control
parallel bus logic
receive register
send register
encoder
bus controller
selector
signal quality report
decoder decoder
A
transmitters
B
A
B
receivers
bus line B
bus line A
A frame is transmitted over both channels simultaneously.
The receiver receives from one channel and monitors the other.
Switchover is controlled by signal quality and frame overlap.
One frame may go lost during switchover
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -52
Medium Redundancy
The physical medium may be fully duplicated to increase availability.
Principle: send on both, receive on one, supervise the other
device
BA
AB
device
repeater
repeater
optical link A
optical link B
device
repeater
electrical segment X
repeater
device
electrical segment Y
Duplicated and non-duplicated segments may be connected
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -53
Double-Line Fibre Layout
star coupler A
opto links A
A
B
A
B
Bus Administrator
device
rack
copper bus A
copper bus B
redundant
Bus
Administrator
opto links B
star coupler B
The failure of one device cannot prevent other devices from communicating.
Optical Fibres do not retro-act.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -54
Total or partial redundancy ?
not redundant
APL
APL
Traffic Store
Traffic Store
Phy
Phy
Phy
Repeater
Phy
Phy
Phy
Phy
APL
APL
Traffic Store
Traffic Store
Phy
Phy
totally redundant
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -55
Master Redundancy
A centralized bus master is a single point of failure.
To increase availability, the task of the bus master may be assumed by one of
several Bus Administrators
The current master is selected by token passing:
token passing
bus
administrator
1
bus
administrator
2
bus
administrator
3
current bus
master
Bus
slave
device
slave
device
slave
device
slave
device
slave
device
slave
device
slave
device
If a bus administrator detects no activity, it enters an arbitration procedure. If
it wins, it takes over the master's role and creates a token.
To check the good function of all administrators, the current master offers
mastership to the next administrator in the list every 4 seconds.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -56
Mastership transfer state machines
INIT
(entering this state
resets T_standby)
T_standby
token passing
get next administrator
in the list
STANDBY_MASTER
yes
master list or basic
period exhausted ?
no
valid Master_Frame
inquire status
mastership offered
to me ?
no
status request
to me ?
status (AX, MAS, ACT)
am I configured
(ACT = 1) ?
yes
no
FIND_NEXT
status response
T_find_next
valid next master ?
no
no
mastership reject
yes
mastership offer
mastership accept
INTERIM_MASTER
REGULAR_MASTER
master collision or resign
T_interim
mastership response
end of turn
remote accept ?
report error
no
yes
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -57
Outline
1. Applications in vehicles
2. Physical layer
1. Electrical RS 485
2. Middle-Distance
3. Fibre Optics
3. Device Classes
4. Frames and Telegrams
5. Medium Allocation
6. Clock Synchronization
7. Fault-tolerance concept
8. Integrity Concept
9. Summary
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -58
Transmission Integrity (1)
1) Manchester II encoding
Double signal inversion necessary to cause an undetected error, memoryless code
Clock
Data
1
1
0
1
0
0
0
1
Frame
violations
Line Signal
Start Delimiter
Manchester II symbols
2) Signal quality supervision
Adding to the high signal-to-noise ratio of the transmission, signal quality
supervision rejects suspect frames.
125ns
125ns
reference
edge
125ns
BT = bit time = 666
ns
time
BT0.5
BT1.0
BT1.5
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -59
Transmission Integrity (2)
3) A check octet according to TC57 class FT2 for each group of up to 64 bits,
provides a Hamming Distance of 4 (8 if properties of Manchester coding are considered):
-15
(Residual Error Rate < 10
under standard disturbances)
Master Frame
9
MSD
16 data bits (33bits) = 22 us
size in bits
4
12
F address
8
CS
MD = Master frame Delimiter
CS = Check Sequence 8 bits
useful (total)
size in bits
Slave Frame
9
16 data bits (33bits) = 22 us, poll = 67 us
SSD
9
32 (49) = 33 us, poll = 78 us
64 (81) = 54 us, poll = 99 us
128 (153 bits) = 102 us, poll = 147 us
256 (297 bits) = 198 us, poll = 243 us
SSD
9
SSD
8
2 bytes
CS
SD = Slave frame Delimiter
32
8
4 bytes
CS
64
8 bytes
8
CS
DATA
64
repeat 1, 2 or 4 x
(worst-case response = 43 us)
EPFL - Industrial Automation
16
2009-03-05, HK
MVB case study 3.4 -60
Transmission Integrity (3)
4) Different delimiters for address and data against single frame loss:
respond within
1.3 µs < t
< 4.0 µs
ms
MSD ADDRESS a CS
SSD
DATA (a)
respond within
4 µs < t sm<1.3 ms
CS
MSD ADDRESS b CS
time
t mm • 1,3 ms
5) Response time supervision against double frame loss:
> 22 µs
MSD ADDRESS a CS
SSD DATA (a) CS
> 22 µs
MSD ADDRESS b CS
SSD DATA (b) CS
time
accept if 0.5µs < t_mm < 42.7 µs
6) Configuration check: size at source and sink ports must be same as frame size.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -61
Safety Concept
Data Integrity
Very high data integrity, but nevertheless insufficient for safety applications
(signalling)
Increasing the Hamming Distance further is of no use since data falsification
becomes more likely in a device than on the bus.
Data Transfer
• critical data transmitted periodically to guarantee timely delivery.
• obsolete data are discarded by sink time supervision.
• error in the poll scan list do not affect safety.
Device Redundancy
Redundant plant inputs A and B transmitted by two independent devices.
Diverse A and B data received by two independent devices and compared.
The output is disabled if A and B do not agree within a specified time.
Availability
Availability is increased by letting the receiving devices receive both A and
B. The application is responsible to process the results and switchover to the
healthy device in case of discrepancy.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -62
Integer Set-up
poll
A B
time
A B
individual period
Bus
Administrator
redundant vehicle bus
(for availability only)
output
devices
input
devices
A
B
A
B
confinement
°
application
responsibility
spreader device
(application
dependent)
redundant input
EPFL - Industrial Automation
2009-03-05, HK
fail-safe
comparator
and enabling
logic
redundant, integer output
MVB case study 3.4 -63
Integer and Available Set-up
poll
A B
individual period
redundant
bus
administrator
redundant
bus
administrator
redundant vehicle bus
(for availability)
input
devices
A
time
A B
B
output
devices
A
B
A
B
C
A
B
C
comparator
and enabling
logic
confinement
spreader device
(application
dependent)
A
redundant input
EPFL - Industrial Automation
switchover logic or
comparator
(application
dependent)
B
available and integer output
2009-03-05, HK
MVB case study 3.4 -64
Outline
1. Applications in vehicles
2. Physical layer
1. Electrical RS 485
2. Middle-Distance
3. Fibre Optics
3. Device Classes
4. Frames and Telegrams
5. Medium Allocation
6. Clock Synchronization
7. Fault-tolerance concept
8. Integrity Concept
9. Summary
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -65
Summary
Topography:
Medium:
bus (copper), active star (optical fibre)
copper: twisted wire pair
optical: fibres and active star coupler
Covered distance:
OGF: 2000 m, total 4096 devices
EMD: 200 m copper with transformer-coupling
ESD: 20 m copper (RS485)
Communication chip
dedicated IC available
none (class 1), class 2 uses minor processor capacity
Processor participation
Interface area on board 20 cm2 (class 1), 50 cm2 (class 2)
RAM, EPROM , drivers.
Additional logic
fully duplicated for availability
Medium redundancy:
Manchester II + delimiters
Signalling:
1,5 Mb/s
Gross data rate
typical 10 µs (<43 µs)
Response Time
4096 physical devices, 4096 logical ports per bus
Address space
Frame size (useful data) 16, 32, 64, 128, 256 bits
Integrity
CRC8 per 64 bits, HD = 8, protected against sync slip
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -66
Software: Link Layer Interface
Real-Time Protocols
Upper Link Layer
LP
LM
LS
process
data
message
data
supervisory
data
Traffic Store
Lower Link
Layer
slave
Process Data
Message Data
Supervisory Data
master
polling
arbitration
mastership transfer
frame coding
Physical Layer
EPFL - Industrial Automation
telegram
handling
management
station
Link Layer Interface
2009-03-05, HK
MVB case study 3.4 -67
Available Components
Bus Controllers:
BAP 15 (Texas Instruments, obsolete)
MVBC01 (VLSI, in production, includes master logic
MVBC02 (E2S, in production, includes transformer coupling) – exists as VHDL
Repeaters:
REGA (in production)
MVBD (in production, includes transformer coupling) – exists as VHDL
Medium Attachment Unit:
OGF: fully operational and field tested (8 years experience)
ESD: fully operational and field tested (with DC/DC/opto galvanic separation)
EMD: lab tested, first vehicles equipped
Stack:
Link Layer stack for Intel 186, i196, i960, 166, 167, Motorola 68332, under
DOS, Windows, VRTX,...
Tools:
Bus Administrator configurator
Bus Monitor, Download, Upload, remote settings
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -68
Comparison MVB (IEC 61375) vs Fieldbus (IEC 61158-2) Frames
IEC 61158-2 frame
Preamble
Start Delimiter
1 0 1 0 1 0 1 0 1 N+ N- 1 0 N+ N- 0
PhSDU
Data
End Delimiter
FCS
Spacing
1 N+ N- N+ N- 1 0 1 v v v v
16 bits
MVB frame
Start Delimiter
8 bits
End Delimiter
0 N- N+ 1 N- N+ 1 1 1
Data
FCS
v v
Master Frame
0 0 0 0 N+ N- 0 N+ N-
Data
FCS
v v
Slave Frame
IEC 61158-2 frames have a lesser efficiency (-48%) then MVB frames
To compensate it, a higher speed (2,5 Mbit/s) would be needed,
which reduces the covered distance without repeaters fro copper wiring.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -69
Throughput (raw data) and comparison with IEC field busses
transmission delay [ms]
0.9
IEC Fieldbus @ 1,0 Mbit/s
0.8
0.7
MVB @ 1,5 Mbit/s
0.6
0.5
0.4
0.3
IEC Fieldbus @ 2,5 Mbit/s
0.2
0.1
16
32
48
64
80
96
112
128
144
160
176
192
208
224
240
256
dataset size in bits
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -70
Operation: What would a faster bus bring ?
20 Mbit/s
24 Mbit/s - short
24 MBit/s - far
10 Mbit/s
12 Mbit/s - short
12 Mbit/s - far
1.5 Mbit/s - short
1.5 Mbit/s - far
1.0 Mbit/s
16
32
64
128
256
512
1024
2048
4096
frame size [bits]
0.2 Mbit/s
A faster bus makes only sense with longer frames, i.e. coarser granularity of exchanged data.
With a frame size of 256 bits, 1.5 Mbit/s is optimal.
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -71
EPFL - Industrial Automation
2009-03-05, HK
MVB case study 3.4 -72
Download