Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Comunicações Industriais

Industrial Communications

Lecture 3 – Basic communication concepts

Luís Almeida
lda@fe.up.pt
Previous lecture

• History of industrial computing architectures


– Focus on industrial networks

• The CIM architecture

• The benefits of distributed Data size


architectures requirements
Plant control
64KB Continuous- (non-real-time)
• The real-time requirements media
(soft real-time)
256B
• Typical requirements of Cell control Machine /
the severeal layers of the (hard/soft real-
time)
device
CIM architecture
16B Machine / configuration
process control and monitoring
(hard/soft (non-real-time)
1B real-time)

1ms 10ms 100ms 1s Max. delay


requirements

@Luís Almeida –Comunicações Industriais 2


This lecture

• Basic concepts of networks and time

– Messages, packets and transactions


– Communication latency and its jitter
– Throughput vs timeliness
– Time in a distributed system

@Luís Almeida –Comunicações Industriais 3


The network in a DS

• The network is a fundamental component in a distributed system (DS)


supporting all the interactions among nodes

• Thus, it is also a critical resource since loss of communication, results in


the loss of all global system services

Distributed System Node 2

Network
Node 1
Node n Node 3

@Luís Almeida –Comunicações Industriais 4


But what is a network?

• Physical infrastructure ?
– Wiring
– Connectors
– Networking equipment

OR
Preferred
definition for
• Communication system ? “networkers”
– Physical infrastructure plus
– Network access interfaces Supports a system-wide vision
that facilitates reasoning about
– Protocol stack the interplay between all
communicating nodes.

@Luís Almeida –Comunicações Industriais 5


Network interfaces

• The network extends up to the Communication Network Interface (CNI)


that establishes the frontier between communication system and the node
host processor (kopetz, 1997)

Computing node
Protocol stack
Host Local
processor resources
CNI
Communication
Comm.
system
controller
Network connection
Network wiring

@Luís Almeida –Comunicações Industriais 6


Purpose of the network

• To deliver communication services to the requesting nodes (i.e., to


transport messages from the CNI of a sender node to the CNI of a
receiver node) reliably, securely, efficiently and (for a real-time network)
timely !

CNI
Node A
Node B
Network

@Luís Almeida –Comunicações Industriais 7


Messages

• Interactions in a DS are supported by message passing

• A message is a unit of information that is to be transferred, at a given


time, from a sender process to one or more receiver processes

• Contains both the respective data as well as the control information that
is relevant for the proper transmission of the data (e.g. sender,
destination, contents).
234ret
data 3err
Sdfsd
sender wererert
zxcxcvb

destination

Int+PreaAdd+Typ Data CRC ID DLC Data CRC EOF+Int


12+8B 6+6+2B 46-1500B 4B 11/29+1 bits 6 bits 0-64 bits 15 bits 11+3 bits
Ethernet CAN

@Luís Almeida –Comunicações Industriais 8


Transactions

• A network transaction is the sequence of actions within the


communication system required to accomplish the
effective transfer of a message’s data.

• A transaction might include the transfer of messages carrying protocol


control information, only. These are referred to as control messages.

• A multi-message transaction is atomic when all its messages must be


transmitted without interruption.
Control mesg
control data
Mesg with
time effective data
Network-transaction

WorldFIP
Master poll
Slave answer

@Luís Almeida –Comunicações Industriais 9


Transactions

• Many networks automatically break large messages in smaller packets


(fragmentation/reassembly).

• In that case, a message transaction includes several elementary network


transactions that correspond to the transfer of the respective packets.

• A packet is the smallest unit of information that is transmitted without


interruption (when there is no risk of confusion we will use message and
packet interchangeably).

Elementary network transactions

Packet 0 Packet 1 ... Packet n


time
Message-transaction

@Luís Almeida –Comunicações Industriais 10


Transactions

• The data efficiency of the network protocol can be defined as the ratio
between the time to transmit effective data bits and the total duration
of the respective transaction.

data tx_time
Data_eff =
transaction duration
• In general:
The shorter the data per transaction,
the lower the efficiency is

control data

control data

@Luís Almeida –Comunicações Industriais 11


The temporal characterisation of a transaction

activation release termination

Respective exchanges
Ready Executing time

Response time
Waiting for Effective
bus free bus use

@Luís Almeida –Comunicações Industriais 12


Network delays

queuing – qA network load

Node A dequeuing – qB
Network
Node B
access – d a
transmission – d t

tA1 tA2 tA3 tA4 tA5 time


tA1 tA2 tA3 tA4 tA5 time
tB1 tB2 tB3 tB4 tB5
tBi – tAi = di , network-induced delay
Reception instants may suffer
di = qAi i
+ da + dt + i qBi , delay components irregular delays due to interferences
from the network load, queuing policies
di – di–1 = ji , delay jitter and processor load

@Luís Almeida –Comunicações Industriais 13


Delay and delay jitter

• Network induced delay – extra delay caused by the transmission of data


over the network.
– Some applications (e.g. control) are particularly sensitive to this

tA1 tA2 tA3 tA4 tA5 time


tB1 tB2 tB3 tB4 tB5

• Delay jitter – variation affecting the network delay.


– Some applications (e.g. streaming) are not much affected by the network
delay but are highly affected by delay jitter

tA1 tA2 tA3 tA4 tA5 time


tB1 tB2 tB3tB4 tB5

@Luís Almeida –Comunicações Industriais 14


Burstiness and buffering

• Burstiness – measure of the load submitted to the network in a short


interval of time.
– Bursts have a profound impact on the real-time performance of the
network and impose
high buffering requirements.
File transfers are a frequent cause of bursts.

burst time

• Buffer requirements – Buffer capacity needed to hold packet bursts.


– Too few buffers may lead to packet losses

Node A

@Luís Almeida –Comunicações Industriais 15


Throughput and arrival / dep. rate

• Throughput – average amount of data, or packets, that the network


dispatches per unit of time (bit/s and packets/s).

• Arrival / departure rate – long-term rate at which data arrives at/from


the network (bit/s and packets/s).

Throughput 
( s i, r i ) time Network capacity
( so , r o ) time

ri
offered load

burstiness rate burstiness rate


Arrival Departure
si (s,r)-model
time (Cruz, 1991)

@Luís Almeida –Comunicações Industriais 16


Throughput versus timeliness

• Throughput equates to speed, e.g., average number of packets delivered


per unit of time

• Timeliness is related to the instant of executing certain computations


(not directly related to speed!)

• Timeliness is highly influenced by the scheduling of activities in


the system,
i.e., when several packets are ready for transmission, which is sent first?

@Luís Almeida –Comunicações Industriais 17


Worst-case versus average-case

• Remember the case of the man that drowned crossing a river


with average depth of 20cm!!

Average depth

Worst-case depth

• Average response times to events can be short but a sequence of


late handled events can turn a system unmanageable and lead to a
critical failure (timing failure), e.g., feedback control applications.
– In real-time systems, late results can
» Be useless or even cause catastrophes (Hard real-time)

» Just cause a degradation of QoS (Soft real-time)


– Importance of the worst-case delays!

@Luís Almeida –Comunicações Industriais 18


Time across a network

• As opposed to a centralized system, in a distributed system


each node has its own clock

• Without specific support, there is no explicit coherent notion of time


across a distributed systems

• Worse, due to drift, clocks tend to permanently diverge

Network Node
Node
5h30 12h15
1s(A)

All clocks evolve at their own pace!


time_A Node There is no relative phase control
among periodic streams
5h19
time_B
1s(B)

@Luís Almeida –Comunicações Industriais 19


Time across a network

• However, a coherent notion of time can be very important for several


applications to:
– Carry out actions at desired time instants
e.g. synchronous data acquisition, synchronous actuation
– Time-stamp data and events
e.g. establish causal relationships that led to a system failure
– Compute the age of data
– Coordinate transmissions
e.g. TDMA clock-based systems
– etc.

• But how to synchronize the clocks across the network?


– Clock synchronization algorithms!
NTP, SNTP, PTP (IEEE1588 → IEEE802.1AS…)…
– To be revisited later on...

@Luís Almeida –Comunicações Industriais 20


Summary:

• The network is the kernel of a distributed system

• Transmits messages by means of network transactions

• Network delay & delay jitter

• Throughput vs timeliness

• Worst-case vs average-case

• Time in a DS – need for clock synchronization

@Luís Almeida –Comunicações Industriais 21

You might also like