22
PART II INDUSTRIAL INFORMATION TECHNOLOGY

Industrial Comm Sys

Embed Size (px)

Citation preview

Page 1: Industrial Comm Sys

PART II

INDUSTRIAL INFORMATION TECHNOLOGY

9854_C037.qxd 10/15/2004 12:26 PM Page 1

Page 2: Industrial Comm Sys

Section 3: Industrial CommunicationSystems

3.1 Introduction to Data Communication Networks37. Principles of Lower-Layer Protocols for Data Communications

Andreas Willig and Hagen Woesner38. Wireless Local Area Networks and Wireless Personal Area Networks

(WLANs and WPANs)Kirsten Matheus

3.2 Field Area Networks39. PROFIBUS — Open Solutions for the World of Automation

Ulrich Jecht, Wolfgang Stripf and Peter Wenzel 40. The WORLDFIP Fieldbus

Jean-Pierre Thomesse 41. FOUNDATION Fieldbus: History and Features

Salvatore Cavalieri 42. Operating Principles and Features of CAN Networks

Gianluca Cena and Adriano Valenzano43. LonWorks/EIA-709 Networks EIA 709 Protocol (LonTalk)

Dietmar Loy 44. Time-Triggered Communication Networks

Hermann Kopetz and Günther Bauer 45. IEEE 1394 for Factory Automation

Michael Scholles, Uwe Schelinski and Petra Nauber 46. Which Network for Which Application

Jean-Dominique Decotignie47. Networked Control Systems Overview

Pau Martí, Ricard Villà, Josep M. Fuertes and Gerhard Fohler

3.3 Ethernet and Wireless/Mobile Network Technologies48. The Quest for Real-Time Behavior in Ethernet

P. Pedreiras, L. Almeida and J. A. Fonseca 49. Switched Ethernet in Automation Networking

Tor Skeie, Svein Johannessen and Øyvind Holmeide50. Wireless LAN Technology for the Factory Floor

Andreas Willig51. Bluetooth

Thomas Jatschka and Robert Tschofen

3.4 Linking Factory Floor with the Internet and Wireless Fieldbusses52. Linking Factory Floor and the Internet

Thilo Sauter

9854_C037.qxd 10/15/2004 12:26 PM Page 3

Page 3: Industrial Comm Sys

53. LonWorksTM over IP Dietmar Loy and Stefan Soucek

54. Interconnection of Wireline and Wireless FieldbussesJean-Dominique Decotignie

3.5 Security and Safety Technologies in Industrial Networks55. Security in Automation Networks

Christian Schwaiger 56. PROFIsafe — Safety Technology with PROFIBUS

Wolfgang Stripf and Herbert Barthel

3.6 Automotive and Industrial Applications57. A Comparative Case Study of Distributed Network Architectures

for Different Automotive Applications Jakob Axelsson, Joakim Fröberg, Hans Hansson,Christer Norström, Kristian Sandström and Björn Villing

58. The Standard Message Specification for Industrial Automation Systems — ISO 9506 (MMS) Karlheinz Schwarz

9854_C037.qxd 10/15/2004 12:26 PM Page 4

Page 4: Industrial Comm Sys

Andreas WilligHasso-Plattner-Institute ofUniversity of Potsdam

Hagen WoesnerTechnical University of Berlin

37Principles of Lower-Layer Protocols forData Communications

37.1 Introduction

37.2 Framing and Synchronization Bit Synchronization • Frame Synchronization • Example: Bitand Frame Synchronization in the Profibus

37.3 Medium Access Control Protocols Requirements and Quality of Service Measures • Design Factors• Random Access Protocols • Fixed Assignment Protocols• Demand Assignment Protocols • Meta-MAC Protocols

37.4 Error Control Techniques Open-Loop Approaches • Closed-Loop Approaches • HybridApproaches • Further Countermeasures

37.1 Introduction

In packet-switched networks, the lower layers (data link layer, medium access control layer, and physicallayer) have to solve some fundamental tasks in order to facilitate successful communication. The lowerlayers are concerned with communication between neighbored stations, as compared to the layers above(networking layer, transport layer), which are concerned with end-to-end communications over multipleintermediate stations.

The lower layers therefore communicate over physical channels and are thus most strongly influencedby physical channel properties (bandwidth, channel errors, etc.), which in turn affect their design. Theimportance of the lower layers for industrial communication systems is related to the often foundrequirement for giving hard real-time and reliability guarantees: if the lower layers could not guaranteesuccessful delivery of a packet/frame within a prescribed amount of time, this cannot be compensated byany actions of the upper layers. Therefore, a wide variety of mechanisms has been developed to imple-ment these guarantees and to deal with harmful physical channel properties like transmission errors.

In virtually all data communication networks used in industrial applications, the transmission ispacket-based, that is, the user data is segmented into a number of distinct packets or frames and theseframes are transmitted over the channel. Therefore, the following fundamental problems have to besolved:

What constitutes packet and how are the bounds of a packet specified? How does the receiver detectpackets and the data contained in a packet? To this end, framing and synchronization schemes are needed,discussed in Section 37.2.

9854_C037.qxd 10/15/2004 12:26 PM Page 1

Page 5: Industrial Comm Sys

When to transmit a packet? If multiple stations want to transmit their packets over a common chan-nel, appropriate rules are needed to share the channel and to let each station determine when it may sendits packets. This problem is tackled by medium access control (MAC) protocols, discussed in Section 37.3.

How to cope with channel errors? The topic of error control is briefly touched in Section 37.4.Which packet to transmit next? This is the problem of packet scheduling.How to protect the receiver against too much data sent by the transmitter? This is the problem of flow

control.

This chapter surveys framing and synchronization, MAC protocols and error control in some detail inthe following sections. Some references discussing packet scheduling algorithms are [57, 59–61, 58,Chapter 9]. Flow control algorithms are explained in [20].

37.2 Framing and Synchronization

The problem of synchronization is related to the transmission of information units (packets, frames)between a sending and a receiving entity. In computer systems, information is usually stored andprocessed in a binary digital form (bits). A packet is formed from a group of bits and shall be transmit-ted to the receiver. The receiver must be able to uniquely determine the start and end of a packet as wellas the bits within the packet.

The transmission of information over short distances, for instance, inside the computer, can be donewith parallel transmission. Here, a number (say, 64) of parallel copper wires transport all bits of a 64-bitdata word at the same time. In most cases, one additional wire transmits the common reference clock.Whenever the transmitter has applied the correct voltage (representing a “0” or “1” bit) on all wires, it sig-nals this by sending a sampling pulse on the clock wire toward the receiver. Conversely, on receiving apulse on the clock wire, the receiver samples the voltage levels on all data wires and converts them backto bits by comparing them with a threshold.

This kind of transmission is fast and simple, but cannot span large distances, because the cablingcost becomes prohibitive. Therefore, the data words have to be serialized and transmitted bit-by-bit ona single wire.1

Bit Synchronization

The spacing of bits generated by the transmitter depends on its local clock. The receiver needs this clockinformation to sample the incoming signal at appropriate points in time. Unfortunately, the transmittersand receivers clocks are not synchronized, and the synchronization information has to be recovered fromthe data signal; the receiver has to synchronize with the transmitter. This process is called bit synchroniza-tion. The aim is to let the receiver sample the received signal in the middle of the bit period in order to berobust against the impairments of the physical layer, like bandwidth limitation and signal distortions. Bitsynchronization is called asynchronous if the clocks are synchronized only for one data word and have tobe resynchronized for the next word. One common mechanism used for this uses one start bit precedingthe data word and one or more stop bits concluding it. The Universal Asynchronous Receiver/Transmitter(UART) specification defines one additional parity bit that is added to the 8 data bits, leading to the trans-mission of 11 bits in total for every 8 data bits [3]. The upper row in Figure 37.2 illustrates this.

For longer streams of information bits, it is necessary to synchronize the receiver clock continuously.The Digital Phase-Locked Loop (DPLL) is an electrical circuit that controls a local clock and adjusts it tothe received clock that is extracted from the incoming signal [20]. To recover the clock from the signal,sufficiently frequent changes of signal levels are needed. Otherwise, if the wire shows the same signal levelfor a long time (as may happen for the Non-Return to Zero (NRZ) coding method, where bits are directly

37-2 The Industrial Information Technology Handbook

1The term wire is actually used here as a synonym for a transmission channel. Therefore, it could also be a wirelessor ISDN channel.

9854_C037.qxd 10/15/2004 12:26 PM Page 2

Page 6: Industrial Comm Sys

mapped to voltage levels), the receiver clock could drift away from the transmitter clock. The Manchesterencoding that is shown in the second row of Figure 37.1 ensures that there is at least one signal changeper bit. Every logical “1” is represented by a signal change from one to zero, while a logical “0” shows theopposite signal change. The internal clock of the DPLL samples the incoming signal with a much higherfrequency, for instance, 16 times per bit. For a logical “0” bit that is arriving exactly in time, the DPLLreceives a sample pattern of 0000000011111111. If the transition between the “0” and “1” samples is not

Principles of Lower-Layer Protocols 37-3

1 0 1 1 0 0 1 0

Diff. Manchester

Manchester

NRZ

1 means no level change 0 means level change

FIGURE 37.1 NRZ, Manchester, and differential Manchester codes.

SD1 DA SA FC FCS ED

SD2 DA SA FC Data FCS ED

SD3 LE LEr SD3 SA DA FC Data FCS ED

SD1SD3 Start delimiterDA, SA Destination, Source addressFC Frame Control byteFCS Frame Check Sequence (CRC)LE Length FieldLEr Length Field repeatedED End Delimiter

Start

Control frame (no data)

Fixed data length (8 characters)

UART character (11 bit)

Variable length data frame (0249 characters)

Start, Stop Start/Stop bit

StopParityD7 D6 D5 D4 D3 D2 D1 D0

D7D0 Data bits

FIGURE 37.2 DIN 19245 Profibus: character and selected frame formats.

9854_C037.qxd 10/15/2004 12:26 PM Page 3

Page 7: Industrial Comm Sys

exactly in the middle of the bit, but rather left or right of it, the local clock has to be re-adjusted to runfaster or slower, respectively. In the classical IEEE 802.3 Ethernet, the bits are Manchester encoded [2]. Toallow the DPLL of the receiver to synchronize to the received bit stream, a 64-bit long preamble is trans-mitted ahead of each frame. This preamble consists of alternating “0” and “1” bits that result in a squarewave of 5 MHz. A start of frame delimiter of two consecutive “1” bits marks the end of the preamble andthe beginning of the data frame.

Frame Synchronization

It is of interest for the receiver to know if the received information was (a) complete and (b) correct.Section 37.4 treats the latter problem in some more detail. To decide about the first problem, the receiverneeds to know where a packet starts and ends. The question that arises immediately is that of markingthe start and the end of a frame. There are several ways to accomplish this. In real-world protocols, oneoften finds combinations of them. In the following, the most important will be discussed briefly:

Time Gaps

The most straightforward way to distinguish between frames is to leave certain gaps of silence betweenthem. However, specifically if the medium is shared between several stations, all of them have to obeythese time gaps. As it will be seen in CSMA Protocols section, several MAC protocols rely on minimumtime gaps to determine if the medium is accessible.

While time gaps are a simple way to detect the start of a frame it should be possible to detect the endof it, too. Using time gaps, the end of the previous packet can be detected only after a period of silence.Even if the receiver detects a silent medium, it cannot be sure if this is the result of a successful transmis-sion or a link or node failure. Therefore, other ways have to be explored.

Code Violations

A bit is usually encoded by a certain signal pattern (e.g., a change in voltage or current levels) that is, ofcourse, different for a “0” and “1” bit. A signal pattern that represents neither of the allowed values can betaken as a marker for the start of a frame. An example for this is the IEEE 802.5 token ring protocol [23],which uses the differential Manchester encoding (see Figure 37.1 and [23]). Here, two special symbols “J”for a so-called positive code violation and “K” for a negative one appear. In contrast to the bit definitionsin the encoding, these special symbols do not show a transition in the middle of the bit. Special 8-bit longcharacters that mark the beginning and end of the frame are constructed from these symbols.

Start/End Flags

Some protocols use special flags to indicate the frame boundaries. A sequence of 01111110, that is, six “1”bits in a sequence, marks the beginning and the end of each frame. Of course, since the payload that isbeing transmitted can be an arbitrary sequence of bits, it is possible that the flag is contained in the pay-load. To avoid the misinterpretation of a piece of payload data as being the end of a frame, the sender hasto make sure that it only transmits the flag pattern if it is meant as a flag. Any flag-like data have to bealtered in a consistent way to allow the receiver to recover the original payload. This can be done usingbit or byte(character) stuffing techniques.

Bit stuffing, as it is done in High-level Data Link Control (HDLC) [20], means for the sender to inserta zero bit after each sequence of 5 consecutive “1” bits. The receiver checks if the sixth bit that follows thefive ones is a zero or one bit. If it detects a zero, it removes it from the sequence of bits. If it detects a “1,”it can be sure that this is a frame boundary. Unfortunately, it might happen that a transmission error mod-ifies the data sequence 01111100 into 01111110 and thus creates a flag prematurily. Therefore, additionalmechanisms like time gaps are needed to remove the following bits and detect the actual end of the frame.

Byte stuffing as in Point-to-Point Protocol (PPP) uses the same flag pattern, but relies on a byte-ori-ented transmission medium [5, 6]. Thus, the flag can be written as a hexadecimal value 0x7E. Every unin-tentional appearance of the flag pattern is replaced by two characters, 0x7D 0x5E. This way the flagcharacter disappears, but the 0x7D (also called escape character) also has to be replaced, if it is found in

37-4 The Industrial Information Technology Handbook

9854_C037.qxd 10/15/2004 12:26 PM Page 4

Page 8: Industrial Comm Sys

the user data. To this end, 0x7D is replaced by 0x7D 0x5D. The receiver, after detecting the escape char-acter in the byte stream, discards this byte and performs an XOR operation of 0x20 with the followingbyte to recover the original payload.

In both cases, more data are being transmitted than it would be necessary without bit or byte stuffingtechniques. To make things worse, the amount of overhead that has to be added depends on the contentsof the payload. A malicious user might effectively double the data rate (with byte stuffing) or increase itby around 20% (with bit stuffing) by transmitting a continuous stream of flags. To avoid this, severalmeasures can be taken. One is to scramble the user data before it is put into data frames [4].

Another possibility is the so-called consistent overhead byte stuffing (COBS), proposed in [1]. Here,the stream of data bytes is scanned in advance for appearing flags. The sequence of data bytes is then cutinto chunks of at most 254 bytes not containing the flag. Thus, every flag that appears in the flow isreplaced by one byte representing the number of nonflag data bytes following it. This way, no additionaldata are to be transmitted as long as there is at least one flag every 255 data bytes. Otherwise, one byte isinserted every 254 bytes, indicating a full-length chunk.

Length Field

To avoid the processing overhead that comes with bit or character stuffing, it is possible to reserve a fieldin the header of the frame that indicates the length of the whole frame. Having read this field, the receiverknows in advance how many characters or bytes will arrive. No end delimiter is needed anymore. Eithera continuous transmission of packets followed by idle symbols or the usual combination of preamble andstart delimiter is needed to correctly determine which of the header fields carries the length information.

Being potentially the best solution concerning transmission overhead, the length field mechanism suf-fers from erroneous transmission media. If the packet length information is lost or corrupted, then it isdifficult to find it again. Therefore, it has to be protected separately using error-correcting codes or redun-dant transmission. Additional mechanisms (e.g., time gaps) should be used to find the end of a frameeven when the length field is erroneous.

Example: Bit and Frame Synchronization in the Profibus

As an example to illustrate the mechanisms introduced above, let us look at the lower layers of the DIN19245 PROcess FIeld BUS (Profibus) [42]. This standard defines a field bus system for industrial appli-cations. The lowest layer, the physical layer, is based on the RS-485 electrical interface. A shielded twistedpair or fiber cable may be used as a transmission medium. The UART converts every byte into 11-bittransmission characters by adding start, parity, and stop bits. Thus, asynchronous bit synchronization isused on the lowest layer of the Profibus, no matter which transmission medium is being used.

The second layer is called Fieldbus Data Link (FDL). It defines the frame format as it can be seen inFigure 37.2. Start and end delimiters are used in every frame, but different SDx (SD1–SD4; the latter isnot shown in the figure) define different frame types. Thus, a receiver knows after reading an SD1 that acontrol frame of fixed length will arrive. In addition, time gaps of 33 bit times have to be left between theframes. After receiving an SD3, the receiver interprets the next byte as LE (length field) and checks thisagainst the redundant transmission of LE in the third byte, thereby decreasing the probability of unde-tected errors in the length field. Using the combination of time gaps and the redundant transmission ofthe length field, a character stuffing to replace all possible start and end delimiters in the payload becomesunnecessary.

37.3 Medium Access Control Protocols

All medium access control or MAC protocols try to solve the same problem: to let a number of stationsshare a common resource (namely, the transmission medium) in an efficient manner and such that somedesired performance objectives are met. They are a vital part of local area network (LAN) and metropol-itan area network (MAN) technologies, which typically connect a small to moderate number of users ina small geographical area such that a user can communicate with other users.

Principles of Lower-Layer Protocols 37-5

9854_C037.qxd 10/15/2004 12:26 PM Page 5

Page 9: Industrial Comm Sys

With respect to the OSI reference model, the MAC layer does not form a protocol layer of its own, butis a sublayer of either the physical layer or the data link layer [35]. However, in the following, we will con-sider the MAC as being a layer of its own, since it has a distinguished task. The importance of the MAClayer is reflected by the fact that many MAC protocol standards exist, for example, the IEEE 802.x stan-dards. Its most fundamental task is to determine for each station attached to a common broadcastmedium when it is allowed to access the medium, that is, to send data or control frame to it. To this end,each station executes a separate instance of a MAC protocol.

The operation and behavior of a MAC protocol are heavily influenced by the properties of the under-lying physical layer and the design goals. Specifically for hard real-time communications, the MAC layeris a key component: if the delays on the MAC layer are not strictly bounded, the upper layers cannot com-pensate this. A large number of MAC protocols have been developed during the last three decades. Thefollowing references are landmark papers or survey articles covering the most important protocols: [7, 8,26, 27, 37, 43, 38, 19, 32, 33, 39, 40, 15]. Furthermore, MAC protocols are covered in many textbooks oncomputer networking, for example, [35, 12, 20]. In this survey, we restrict to those classes of protocolsthat are important for industrial applications and have found some deployment in factory plants, eitheras stand-alone protocols or as building blocks of more complex protocols.

Requirements and Quality of Service Measures

There are a number of (sometimes conflicting) requirements for MAC protocols, some of which are spe-cific for industrial applications with hard real-time and reliability constraints.

There are two main delay-oriented measures: the medium access delay and the transmission delay. Themedium access delay is the time between the arrival of a frame and the time its transmission starts. Thistime is affected by the operational overhead of the MAC itself, like collisions, MAC control frames, back-off and waiting times, etc. The transmission delay denotes the time between frame arrival and its suc-cessful reception at its intended receiver. Clearly, the medium access delay is a fraction of the transmissiondelay. For industrial applications with hard real-time requirements, both delays must be upper-bounded.In addition, a desirable property is to have low medium access delays in case of low network loads.

A key requirement for industrial applications is the support for priorities: important frames (e.g.,alarms, periodic process data) should be transmitted before unimportant ones. This requirement can beposed locally or globally: in the local case, each station decides independently as to which of its frames istransmitted next. There is no guarantee that station A’s important frames are not blocked by another sta-tion B’s unimportant frames. In the global case, the protocol identifies the most important frame of allstations to be transmitted next.

The need to share bandwidth between stations constitutes another important class of desired MACproperties. A frequently posed requirement is fairness: stations should get their “fair share” of the band-width, which, for example, can be defined as the minimum of a stations load and the overall bandwidthdivided by the number of stations. It is also often required that a station receives a minimum bandwidth,like for the transmission of periodic process data of fixed size.

With respect to throughput clearly, it is important to keep the MAC overhead low. This concerns theframe formats, the number and frequency of MAC control frames, and efficiency losses due to the oper-ation of the MAC protocol. An example for efficiency losses is when the protocol allows collisions: thebandwidth spent for collided packets is lost, since typically the collided frames are useless and must beretransmitted, which is costly in terms of bandwidth. A MAC protocol is said to be stable if an increase inthe overall load does not lead to a decrease in throughput.

Depending on the application area, other constraints can be important as well. For simple field devices,the MAC implementation should have a low complexity and be simple enough to be implemented inhardware. For mobile stations using wireless media, the energy consumption is a major concern; theMAC should contain different power-saving mechanisms. For wireless transmission media, the MACshould contain additional mechanisms to adapt to the instantaneous error behavior of the wireless chan-nel; possible control knobs are the transmit power, error correcting codes, the bit rate, etc.

37-6 The Industrial Information Technology Handbook

9854_C037.qxd 10/15/2004 12:26 PM Page 6

Page 10: Industrial Comm Sys

Design Factors

The most important factors influencing the design of MAC protocols are the medium properties/medium topology and the available feedback from the medium.

We can broadly distinguish between guided media and unguided media. In guided media, the signalsoriginating from frame transmissions propagate within specified geographical bounds, typically withincopper or fiber cables. If the medium is properly shielded, then beyond these bounds the communicationsare invisible, and two cables can be placed close to each other without mutual interference. In contrast, inunguided media (with radio-frequency or infrared wireless media being the prime example), the wavepropagation is visible in the whole geographical vicinity of the transmitter, and ongoing transmissions canbe received at any point close enough to the transmitter. Therefore, two different networks overlayedwithin the same geographical region can influence each other.

Guided media networks can show a number of topologies. We discuss a few examples. In a ring topol-ogy (see Figure 37.3) each station has a point-to-point-link to two neighbors, such that the stations forma ring. In a bus topology like the one shown in Figure 37.4, the stations are connected to a common bus,and all stations see the same signals. Hence, the bus is a broadcast medium. In the star topology illustratedin Figure 37.5, all stations only have a physical connection to a central device, the star coupler, which repeatsand optionally amplifies the signals coming from one line to all the other lines. A network with a star topol-ogy also provides a broadcast medium, where each station can hear all transmissions. When using wirelesstransmission media, the distance between stations might be too large to allow all stations to receive alltransmissions. Therefore, the network is often only partially connected or has a partial mesh structure,shown in Figure 37.6. Additional mechanisms have to be employed to implement multi-hop transmission.

Principles of Lower-Layer Protocols 37-7

1 2

34

FIGURE 37.3 Ring topology.

1 2

34

FIGURE 37.4 Bus topology (the black boxes are line terminations).

9854_C037.qxd 10/15/2004 12:26 PM Page 7

Page 11: Industrial Comm Sys

An important property of a physical channel is the available feedback. Specifically, some kinds of mediaallow a station to read back data from the channel while transmitting. This can be done to detect faultytransceivers (like in the PROFIBUS protocol [42]), collisions (like in the Ethernet protocol), or parallelongoing transmissions of higher priority (like in the CAN protocol). This feature is typically not found inwireless channels. Here, it is not possible to send and receive simultaneously on the same channel.

Random Access Protocols

In random access (RA) protocols, the stations are uncoordinated and the protocols operate in a fully distrib-uted manner. RA protocols often incorporate a random element, for example, by exploiting random packetarrival times, setting timers to random values, etc. The lack of central coordination and of fixed resourceassignment allows to share a channel potentially between an infinite number of stations, while fixed assign-ment and polling protocols support only a finite number of stations. However, the randomness can make itimpossible to give deterministic guarantees on medium access delays and transmission delays. There are manyRA protocols, which are not only used on their own but also as building blocks of more complex protocols.

ALOHA and Slotted ALOHA

A classical protocol is ALOHA [7], where a station sends a newly arriving data frame immediately withoutinquiring the status of the transmission medium. Hence, frames from multiple stations can overlap in time(collisions), which may make them unrecognizable. In slotted ALOHA, all stations are synchronized to acommon time reference and the time is divided into fixed-sized slots. In slotted ALOHA, newly arrivingframes are sent at the beginning of the next time slot. In both cases, the transmitter starts a timer after frametransmission. The receiver has to send an immediate acknowledgement frame upon successful reception ofthe data frame. When the transmitter receives the ack, it stops the timer and considers the frame as success-fully transmitted. If the timer expires, the transmitter randomly selects a backoff time, which has to expirebefore it attempts to transmit the frame again. The backoff time is chosen randomly to avoid synchroniza-tion of colliding stations. This protocol has two advantages: it is extremely simple and it offers short delays

37-8 The Industrial Information Technology Handbook

4

1

3

2

5

7

6

8

FIGURE 37.6 Partial mesh topology.

1 2

34

Star

FIGURE 37.5 Star topology.

9854_C037.qxd 10/15/2004 12:26 PM Page 8

Page 12: Industrial Comm Sys

in case of a low network load. However, the protocol does not support priorities and with increasing net-work load the collision rate increases and the transmission delays grow as well. In addition, ALOHA is notstable: above a certain threshold load, an increase in the overall load leads to a decrease in overall through-put. The maximum normalized throughput of pure ALOHA is 1/2e ≈ 18.4% under Poisson arrivals and aninfinite number of stations. The maximum throughput can be doubled with slotted ALOHA. A criticalparameter in ALOHA is the backoff time, which is typically chosen from a certain time interval (backoff win-dow). A collision can be interpreted as a sign of congestion. If after the backoff time another collision occurs,the next backoff time should be chosen from a larger backoff window to reduce the pressure on the chan-nel. A popular rule for the evolution of the backoff window is the truncated binary exponential backoffscheme, where the backoff window size is doubled after each collision, up to a certain threshold, after whichthe window stays constant. After successful transmission, the backoff window is restored to its original value.

CSMA Protocols

In carrier sense multiple access (CSMA), the stations act more careful than in ALOHA: before transmit-ting a frame they listen on the medium (carrier sensing) to see whether it is busy or free [39, 36]. If themedium is free (many protocols require it to be contiguously free for some minimum amount of time),the station transmits its frame. If the medium is busy, the station defers transmission. The steps follow-ing this distinguish the protocols.

In nonpersistent CSMA, the station simply defers for a random time (backoff time) without listeningto the medium during this time. All other protocols discussed next wait until the end of the ongoingtransmission before starting further activities.

In p-persistent CSMA (0 < p < 1), the time after the preceding transmission ends is divided into timeslots. A station listens to the medium at the beginning of a slot. If the medium is free, the station startstransmitting its frame with a probability p and with probability 1 – p it waits until the next slot. In 1-per-sistent CSMA, the station transmits immediately without further actions. Both approaches still have therisk of collisions, if two or more stations decide to transmit (1-persistent CSMA) or choose the same slot(p-persistent CSMA). The problem is as follows: if one station A senses the medium idle and starts trans-mission at time τ0, another station B would notice this earliest at some later time τ0 + τ, due to the prop-agation delay. If B performs carrier sensing at a time between τ0 and τ0 + τ, it senses the medium idle andstarts transmission, which results in a collision. Therefore, the collision probability depends on the prop-agation delay and thus on the maximum geographical distance between stations. As in ALOHA, in pureCSMA protocols the recognition of collisions needs acknowledgement frames.

Although the throughput of CSMA-based protocols is much better than that of ALOHA (ongoingtransmissions can be completed without disturbance), the number of collisions and their duration limitthe throughput. Collision detection and collision avoidance techniques can be used to relax these prob-lems. These are discussed in the following sections.

Specifically for wireless media, the task of carrier sensing is not without problems, since it is the trans-mitter who senses the medium ultimately because he wants to know the state of the medium at theintended receiver (collisions are only important at the receiver). However, due to path loss [30, Chapter 4]the signal experiences attenuation with increasing distance. If a minimum signal strength is required, thehidden terminal problem occurs (please refer to Figure 37.7): consider three stations A, B, and C with trans-mission radii as indicated by the circles. Stations A and C are in the range of B, but A is not in the range ofC and vice versa. If C starts to transmit to B, A cannot detect this by its carrier-sensing mechanism and con-siders the medium to be free. Hence, A also starts frame transmission and a collision occurs at B.

For wireless media, there is a second scenario where carrier sensing leads to false predictions about thechannel state at the receiver: the so-called exposed terminal scenario, depicted in Figure 37.8. The four sta-tions A, B, C, and D are placed such that the pairs A/B, B/C, and C/D can hear each other, and all remain-ing combinations cannot. Consider the situation where B transmits to A, and one short moment later Cwants to transmit to D. Station C performs carrier sensing and senses the medium as being busy, due toB’s transmission. As a result, C postpones its transmission. However, C could safely transmit its frame toD, without disturbing B’s transmission to A. This leads to a loss of efficiency.

Principles of Lower-Layer Protocols 37-9

9854_C037.qxd 10/15/2004 12:26 PM Page 9

Page 13: Industrial Comm Sys

Two approaches to solve these problems are busy tone solutions [40] and the RTS/CTS protocol, asapplied in the IEEE 802.11 wireless LAN medium access control (MAC) protocol [28]. In the busy toneapproach, the receiver transmits a busy tone signal on a second channel during frame reception. Carriersensing is performed on this second channel. This solves the exposed terminal problem. The hidden termi-nal scenario is also solved, except in the rare cases where A and C start their transmissions simultaneously.

The RTS/CTS protocol attacks the hidden terminal problem using only a single channel. Consider thecase that A has a data frame for B. After A has obtained channel access, it sends a short request to send(RTS) frame to B, indicating the time duration needed for the whole frame exchange sequence. If Breceives the RTS frame properly, it answers with a clear to send (CTS) frame, which indicates the timeneeded for the remaining frame exchange sequence. Station A starts transmission after receiving the CTSframe. Any other station C hearing the RTS and/or the CTS frames defers its transmissions for the indi-cated time, thus not disturbing the ongoing frame exchange. It is a conservative choice to defer on any ofthese frames, but the exposed terminal problem still exists. If a station C defers only on receiving bothframes, the exposed terminal problem is solved. However, there is the risk of bit errors in the CTS frame,which may lead C to start transmissions falsely. The RTS/CTS protocol does not resolve collisions of RTSframes at the receiver; furthermore, it introduces significant overhead.

CSMA Protocols with Collision Detection

If two or more stations collide without recognizing this, they would transmit their entire frames, which,however, are not useful for the receiver. If the stations could detect and abort the collision within a shorter

37-10 The Industrial Information Technology Handbook

A B DC

FIGURE 37.8 Exposed terminal scenario.

A B C

FIGURE 37.7 Hidden terminal scenario.

9854_C037.qxd 10/15/2004 12:26 PM Page 10

Page 14: Industrial Comm Sys

time than needed to transmit the longest frame, less bandwidth is wasted. The class of carrier sense mul-tiple access with collision detection (CSMA/CD) protocols enhances the basic CSMA method with acollision detection facility. The collision detection is performed by hearing back the signal on the cableduring transmission and to compare the measured signal with the transmitted one. If the signals differ, acollision has occured [20, Section 6.1.3].

When a station experiences a collision, it can perform a backoff scheme. This scheme works with slot-ted time, where a time slot is large enough to accommodate the maximum round-trip time to make surethat all stations have the chance to recognize an ongoing transmission reliably. As an example, in theCSMA/CD method of IEEE 802.3 a truncated binary exponential backoff scheme is used: after the firstcollision a station chooses to wait either 0 or 1 slots. If another station starts transmission during the wait-ing time, the station defers. After the second collision a station chooses to wait between 0 and 3 slots, andfor all subsequent collision the backoff window is doubled. After ten collisions the backoff window is keptfixed to 1024 slots, and after 16 collisions the station gives up and discards the frame.

A stochastic form of priorities can be introduced to CSMA/CD by using different initial sizes or evo-lution speeds for backoff windows, as is done in [11] for the CSMA variant used in the IEEE 802.11 wire-less LAN standard.

In wireless LANs (e.g., in the IEEE 802.11 wireless LAN), frequently acknowledgement frames are usedto give the transmitter a feedback, since wireless transceivers cannot transmit and receive simultaneously.The lack of an acknowledgement frame indicates either a collision or a transmission error. Furthermore,two colliding frames do not necessarily result in a total loss of information: when the signal strength of oneframe is much stronger than the other one, the receiver may be able to decode the frame (near–far effect).

CSMA Protocols with Collision Resolution

A class of CSMA protocols reacts on collisions not by going into a backoff mode and deferring transmis-sions; instead, they try to resolve the collision, that is, to determine one station among the contenders,which is ultimately allowed to send its frame. Some examples of this class are the adaptive tree walkingprotocol [13] and protocols with bit-wise priority arbitration like the MAC protocol of controller areanetwork (CAN) [18] and the protocol used for the D-channel of ISDN [31].

The adaptive tree walking protocol works as follows: the time is slotted, just as in the EthernetCSMA/CD protocol. Furthermore, all stations are arranged in a balanced binary tree T and know theirrespective positions in this tree. All stations wishing to transmit a frame (called backlogged stations) waituntil the end of the ongoing transmission and start to transmit their frame in the first slot (slot 0). If thereis only one backlogged station, then it could transmit its frame without further disturbance. If two ormore stations collide, then in slot 1 only the members of the left subtree TL are allowed to try transmis-sion again. If another collision occurs, only stations of the left subtree TLL of TL are allowed to transmitin slot 2, and so forth. On the other hand, if only one station from TL transmits its frame, then for fair-ness reasons the next frame transmission is reserved for a station from the right subtree TR.

The bit-wise arbitration protocols use a similar idea as the tree-walking protocol; however, they do notkeep any history information that is needed to achieve fairness. As an example, we present the MAC pro-tocol of CAN. As a prerequisite, the transmission medium guarantees that overlapping signals do notdestroy each other, but lead to a valid signal. If two stations transmit the same bit, the medium adapts thecommon bit value. If one station transmits a zero bit and the other a one bit, the medium adopts a well-defined state, for example, a zero bit. The CAN protocol uses a priority field of a certain length at thebeginning of a MAC frame. Backlogged stations wait until the end of an ongoing frame and then trans-mit the first bit of their priority field. In parallel, they read back the state of the medium and compare itwith the sent bit. If both agree, the station continues with the second bit of the priority field. If the bitsdiffer, the station has lost contention and defers until the end of the next frame. If it can be guaranteedthat all stations use different priority fields, no collisions occur. This protocol supports global frame pri-orities in a natural way, and the medium access time for the highest priority frame is bounded. However,the assignment of priorities to stations or frames is a nontrivial issue. If the priorities are assigned fixedon a per-station basis, the protocol is inherently unfair. If fairness is desired, the priorities should change

Principles of Lower-Layer Protocols 37-11

9854_C037.qxd 10/15/2004 12:26 PM Page 11

Page 15: Industrial Comm Sys

over time. Therefore, in CAN applications, the priorities are assigned depending on the type of the mes-sage. Another drawback of the protocol is that all stations have to be synchronized with the precision ofa bit-time, and the need for all stations to agree on the state of the medium limits either the bit rate orthe geographical extension of CAN.

CSMA Protocols with Collision Avoidance

If it is technically not feasible to Immediately detect collisions, one might try to avoid them. Protocolsbelonging to this class are called carrier sense multiple access with collision avoidance (CSMA/CA) pro-tocols. An important application area are wireless LANs, where: (a) stations cannot transmit and receivesimultaneously on the same channel, and (b) the transmitter cannot directly detect collisions at thereceiver due to path loss and the need for a minimum signal strength (see the discussion of the hiddenterminal scenario in CSMA Protocols section).

One CSMA/CA approach is the RTS/CTS handshake protocol used in the IEEE 802.11 WLAN; seeCSMA Protocols section. Other protocols use additional random waiting times. As an example, in theEY/NPMA protocol of HIPERLAN [16], the collision avoidance part consists of three phases: all stationswishing to transmit a frame wait for the end of the ongoing transmission. In the first phase (priorityphase), the stations wait for a number of slots corresponding to the frames priority; there are five distinctpriorities. If a station A decides to transmit in slot n and another station B starts in slot m < n, then Adefers, since B has a higher priority frame. In the second phase (elimination phase), the surviving stationstransmit a burst of random length before switching to the receive mode. If there is still energy present,the station gives up, since another station sends a longer burst. In the following third phase (yield phase),the surviving stations remain idle for a random amount of time. If another station starts to transmitmeanwhile, the station defers. Otherwise, the station starts to transmit its data frame.

Fixed Assignment Protocols

In fixed assignment (FA) protocols, a station is assigned a channel resource (frequency, time, code, space)exclusively, that is, it does not need to contend with other stations for using its share and obtains mediumaccess within a bounded time.

In frequency division multiple access (FDMA) systems, the available spectrum is subdivided into Nsubchannels, with some guard band between the channels. A channel is assigned exclusively to a station.When a frame arrives, the station can transmit immediately on the assigned channel, the intendedreceiver has to know the channel in advance. Idle subchannels cannot be used by highly loaded stations.

In code division multiple access (CDMA) systems, the stations spread their frames over a much largerbandwidth than needed while using different codes to separate their transmissions. The receiver has toknow the code used by the transmitter; all parallel transmissions using other codes appear as noise. Likein FDMA, stations can transmit incoming frames immediately.

In time division multiple access (TDMA) systems, the time is divided into fixed-length superframes,which in turn are divided into time slots. Each station is assigned a set of slots in every superframe. Duringits slots, a station can use the full channel bandwidth. The stations need to be synchronized on slotboundaries; however, the slots contain some guard times to compensate for inaccurate synchronization.In a centralized setting where all stations transmit to a central station, such inaccuracies can be intro-duced by different propagation delays and the problems to determine the exact distance between a sta-tion and the central station.

In space division multiple access (SDMA) systems, spatial resources are divided among stations. Inwireless systems where a central station is equipped with smart antenna arrays, the central station canform a number of spatially directed spot beams and focuses them to the stations. If a beam covers two ormore stations, these have to share the channel by some other protocol; but stations in different beams cantransmit in parallel. Another example is the use of sectored antennas in cellular systems.

In all these schemes, the allocation of channel resources to stations can be static or dynamic. In thestatic case, the allocation may be preconfigured or a station requests the resource once from some

37-12 The Industrial Information Technology Handbook

9854_C037.qxd 10/15/2004 12:26 PM Page 12

Page 16: Industrial Comm Sys

resource management facility (which may be part of a central station/access point). The Time-TriggeredProtocol is an example of such a scheme [41]. Another example is the cyclic window in the WorldFIPprotocol, which offers a preconfigured allocation of time slots. Some dynamics can be introduced bychanging the allocation tables at appropriate times. The dynamic approach requires a separate channel,which a station can use to request channel resources from the resource manager. The fixed assignment ofchannel resources is advantageous specifically for industrial applications for the following reasons:

● It allows to guarantee a minimum bandwidth to a station.● It allows to guarantee a strictly bounded medium access time as well as strictly isochronous service.

Demand Assignment Protocols

In demand assignment (DA) protocols, channel resources are also assigned exclusively to a station, but ona much shorter timescale than for fixed assignment protocols. In the latter case, assignment happens onceand lasts for the lifetime of the session, while in DA protocols resources are assigned for the duration ofa data burst and have to be requested explicitly using a signaling mechanism. We can broadly distinguishtwo classes of DA protocols: the distributed protocols use no central authority for resource allocation;instead they often use token-passing schemes. On the other hand, for centralized protocols the stationshave to signal their demands to a centralized station, which assigns resources and schedules transmis-sions. The signaling channel can either be in-band (requests can be piggybacked to transmissions of dataor control frames) or a separate logical signaling channel with its own medium access procedure is used.

For industrial applications, DA protocols have two major advantages: they can guarantee a boundedmedium access time and they allow to use idle resources. However, for the distributed schemes there isinevitably some jitter in the medium access times, which hinders strictly isochronous services. The cen-tralized schemes introduce a single point of failure, namely the resource manager.

Centralized Schemes: Hub-Polling Protocols and Reservation Protocols

As a very general description [34], a hub-polling system consists of a central station (called hub) and anumber of stations, with each station conceptually having a queue for requests or frames. The hub car-ries out two different tasks: first it queries the queue states from the stations, and second, it assigns band-width to the stations according to the query results and some polling policy. Typically, it is assumed thata query is less costly than to serve a frame; otherwise, the query overhead could not be justified as com-pared to a pure TDMA system. To be queried, a station must register itself with the hub. Polling schemesdiffer in the sequence by which stations are polled:

● in round-robin, the stations are visited one after another,● in table-driven schemes, the next station to be visited is determined from a prespecified table, and● in random polling, the next station to poll is determined randomly

and in the type of service a polled station receives:

k-Limited service: up to k frames are served per station before proceeding to the next station.Time-limited service: the station may transmit frames including retransmissions for no longer than a

specified time.Exhaustive service: a queue is serviced until it is empty.Gated service: the server serves only those frames of station i that were already present when starting

service for i.

As an example, the master-/slave protocol of PROFIBUS can be classified as a table-driven and time-limited service (however, with varying masters). In the BITBUS protocol [24], the role of the master doesnot change over time.

A variation of hub-polling protocols are probing protocols [32, 21]. These are based on the observa-tion that polling each station separately is wasteful if the load is low. Instead, it is more effective to polla group of stations as a whole. For example, the hub may announce that a random access slot follows,

Principles of Lower-Layer Protocols 37-13

9854_C037.qxd 10/15/2004 12:26 PM Page 13

Page 17: Industrial Comm Sys

which can be used by stations belonging to a certain group to signal their transmission needs. If no sta-tion answers, the next group can be polled. If a single station answers, it is granted access to themedium, if two or more stations answer, their requests will collide in the random access slot. Differentmethods can now be applied to resolve this collision, for example, the tree walking approach discussedin CSMA Protocols with Collision Resolution section, or all stations in the group can be polled sepa-rately. In [44], the latter approach is introduced, along with a scheme that adapts the group sizes to thecurrent load.

In reservation protocols, the stations have to send a reservation message to a resource managementfacility (often located in a central station). The reservation message may specify the length of the desireddata transmission and its timing constraints. The central station can perform an admission control test todecide, whether the request can be satisfied without harming the guarantees given to already admittedrequests. After successful admission control, the central station sends some feedback to the station indi-cating the allocated resources (e.g., the time slots to use). For signaling requests, three approaches arecommonly used: (a) in piggybacking schemes the reservation requests are sent along with already admit-ted data or control frames; (b) the stations send request frames on a separate signaling channel under acontention-based MAC protocol (ALOHA or CSMA protocols); and (c) the central station may poll allstations that are currently idle and thus cannot use piggybacking. Many protocols developed in the con-text of wireless ATM [15] belong to this class, for example, the MASCARA protocol [29] of the EuropeanUnion Magic Wand project. The FFT-CAN [10] protocol is another example of this class, where stationssend reservation requests for periodic transmissions to a central master station.

Distributed Schemes: Token-Passing Protocols

In distributed schemes, there is no central facility controlling resource allocation or medium access.Instead, a special frame, called the token frame is sent between stations. The station that currently holds thetoken is allowed to initiate transmissions. After some time, the current token owner is required to pass thetoken to another station, that is, to send it a token frame. Token passing schemes can be applied in net-works with a ring topology (examples: the IEEE 802.5 Token Ring [23] or FDDI [14, 25]) or with a bus/treetopology (examples: the IEEE 802.4 Token Bus [22] or the PROFIBUS with the FMS profile [42]).

To guarantee an upper bound on medium access delay, the IEEE Token-Bus, FDDI, and the PROFIBUSprotocols use variants of the timed-token protocol [9]. In this protocol, all stations agree on a commonparameter, the target token rotation time TTTRT. Furthermore, each station is required to measure the timethat passed between the last time it received the token and the actual token reception time. This time iscalled the token rotation time. If the difference TTTRT – TTRT is positive, the arriving token is called an earlytoken; otherwise, it is called a late token.

Token-passing protocols over broadcast media (bus, tree) construct a logical token passing ring. Thetoken frame is passed among all stations in this ring, and each station gets the token once per cycle. Thering members have the additional burden to execute ring maintenance algorithms, which include amongothers: including new stations, excluding leaving or crashed stations, detect and repair lost tokens, etc.These mechanisms use a certain number of control frames and are designed in a way that they do notharm the timing guarantees given by the timed-token protocol.

Meta-MAC Protocols

In [17] “Meta-MAC” protocols are introduced. The basic idea is simple and elegant: a station contains notonly a single MAC instance, but several of them, running in parallel. These can be entirely different pro-tocols or the same protocol, but with different parameters. However, only one protocol is really active ata given time in the sense that its decisions (transmit/not transmit) are executed; the other instance deci-sions are only recorded. From time to time, a new active protocol is selected. This selection is based onhistory information about transmission outcomes (success, failure). For each candidate protocol, it isevaluated as to how “successful” the protocol would have been given the outcomes in the history. Forexample, a protocol that produced several “transmit” decisions in “successful” time slots would get a high

37-14 The Industrial Information Technology Handbook

9854_C037.qxd 10/15/2004 12:26 PM Page 14

Page 18: Industrial Comm Sys

ranking, while a protocol that “transmits” decisions would have resulted in collisions getting a bad rank-ing. Based on this ranking, a new protocol is chosen.

37.4 Error Control Techniques

When a packet is transmitted over a physical channel, it might be subject to distortions and channelerrors. Potential error sources are noise, interference, loss of signal power, etc. As a result, a packet mayeither be completely or partially lost (e.g., when the receiver fails to acquire bit synchronization or losesit somewhere), or a number of the bits within a packet are modified. In some types of channels, errorsoccur quite frequently, for example, in wireless channels [56].

One option to deal with errors is to tolerate them. For example, in Voice-over-IP systems, a loss rate ofspeech packets of ≈ 1% still gives an acceptable speech quality at the receiver, depending on the codec andthe influence of error concealment techniques [47, Chapter 7].

However, in safety-critical industrial applications errors are often not tolerable, must be detected, andsubsequently be corrected. There are the following fundamental approaches to error control [49]:

● In open-loop approaches, the transmitter receives no feedback from the receiver about the trans-mission outcomes. Redundancy is introduced to protect the transmitted data against errors.

● In closed-loop schemes, the transmitter receives feedback about erroneously received packets. Thereceiver requests retransmission of these packets from the transmitter.

● In hybrid schemes, these two approaches are combined.

The detection of errors is based on checksums, which are sent along with the packet, for example, as apacket trailer. Well-known kinds of checksums are cyclic redundancy checks (CRC) or parity bits [48].However, no checksum algorithm is perfect; there are always bit error patterns that cannot be detected bya checksum algorithm. Hence, the residual error probability is nonzero. A study of the performance ofchecksum algorithms over real data is [55].

There is a rich literature about error control. Some standard references are [48–50].

Open-Loop Approaches

In general, open-loop approaches involve redundant data transmission. Several kinds of redundancy canbe used:

● Send multiple copies of a packet.● Add redundancy bits to the packet data.● Diversity techniques.

In the multiple-copies approach, the transmitter sends K identical copies of the same packet [45], eachone equipped with a checksum. If the receiver receives at least one copy without checksum errors, this isaccepted as the correct packet. If the receiver receives all copies with checksum errors, it might apply abit-by-bit majority voting scheme [52, Chapter 4] on all received copies and check the result again. A vari-ation of the multiple-copies scheme is to not send multiple copies of the same packet, but to send eachbit of the user data multiple times: instead of sending 00110101, the transmitter sends, for example,000.000.111.111.000.111.000.111. Hence, each user bit is transmitted three times and the receiver appliesmajority voting to each group of three bits.

In error correcting codes or forward error correction (FEC) codes to k bits of user data, a number n – kof redundancy bits are appended and the block of n bits is transmitted (the fraction k/n is called coderate), such that bit errors can be detected and a limited amount of bit errors can be corrected [48–50]. Inblock coding schemes, the user data are divided into blocks of k bits and each block is coded independently.Some well-known block FEC schemes are Reed–Solomon codes, Hamming codes, andBose–Chaudhuri–Hocquenghem (BCH) codes. In convolutional coding schemes, the encoder has some“memory,” such that the coding of the current bit affects coding of future bits. Therefore, there are no

Principles of Lower-Layer Protocols 37-15

9854_C037.qxd 10/15/2004 12:26 PM Page 15

Page 19: Industrial Comm Sys

clear block boundaries. Recently, the class of turbo codes has attracted attention [54]. In this class of codes,two convolutional codes are concatenated: first an inner code is applied to the user data, and after this anouter code is applied to the result of the first coding stage.

Diversity techniques are often applied on wireless channels. In the case of receiver diversity, the receiveris equipped with two or more antennas. If these are appropriately spaced [51], the antennas receive twocopies of the transmitted waveform, which, in the best case, are uncorrelated. Hence, it might happen thatone antenna receives only a weak signal while the other one experiences good signal quality. The twoantenna signals may then be combined in different ways.

Closed-Loop Approaches

In closed-loop approaches, the receiving station B checks the arriving packets sent by station A by meansof checksums and provides A with feedback information indicating the transmission outcome (successor failure). Usually, B sends acknowledgement frames to provide this feedback to A; but the feedback infor-mation may as well be piggybacked onto data frames sent from B to A. Automatic Repeat reQuest (ARQ)protocols implement this approach [46, 20]. Four basic ARQ protocols are the Send-and-Wait protocol,the alternating bit protocol, the Goback-N protocol, and the Selective-Repeat protocol.

In the Send-and-Wait protocol, the transmitter sends a packet and starts a timer. The receiver sends anacknowledgement, if the packet is received correctly; otherwise, the receiver keeps quiet. If the transmitterreceives the acknowledgment, the timer is resetted and the next packet is transmitted. If the transmitterstimer expires without acknowledgment, the transmitter retransmits the packet. This protocol is simple, butdoes not fill “long fat pipes” (links with a high bandwidth-delay product) efficiently and cannot preventduplicate data at the receiver. Duplicates can be created if not the data packet but the acknowledgment islost or erroneous. In the alternating bit protocol, a one-bit sequence number is introduced to detect andremove duplicates. If the receiver receives a duplicate packet, the packet is acknowledged, but the data arenot delivered to the user. This works reliably if the delay for data packets or acknowledgments can beupper-bounded. However, the alternating bit protocol is still inefficient on long fat pipes.

Both the Goback-N and the Selective-Repeat protocol are not restricted to a single unacknowledged oroutstanding frames, but allow for multiple outstanding frames; these protocols are also called sliding-win-dow protocols. The frames are identified by sequence numbers. In the Goback-N protocol, there may beN outstanding frames. The transmitter sets a timer for each transmitted frame and resets it as soon as anacknowledgment for this frame is received. If the receiver receives an insequence frame, it delivers theframe to its local user and sends a positive acknowledgment; otherwise the frame, is dropped (even if itis received correctly) and either the receiver sends a negative acknowledgment or keeps quiet. When thetransmitter receives a negative ack for an outstanding frame or if the timer for this frame expires, heretransmits this frame and all subsequent outstanding frames. Therefore, it might happen that correctlyreceived frames are retransmitted, which is inefficient.

This drawback is attacked by the Selective-Repeat protocol, which works similar to the Goback-N pro-tocol, but allows the receiver to buffer and acknowledge frames that are not received in-sequence. As soonas the missing frames arrive, the buffered frames are delivered to the user and the buffer is freed.

Hybrid Approaches

Open-loop and closed-loop approaches can be combined, for example, by continuously increasing theamount of FEC applied to subsequent retransmissions of the same packet, or by adapting the number ofcopies in a multicopy approach to the feedback [45].

Further Countermeasures

The transmitter potentially has further control knobs to reduce the probability of packet errors at thereceiver. One control knob is the packet length: in a scenario where a packet is equipped with a checksumbut not with redundant FEC data, longer packets have a higher probability to be received in error, but the

37-16 The Industrial Information Technology Handbook

9854_C037.qxd 10/15/2004 12:26 PM Page 16

Page 20: Industrial Comm Sys

fixed overhead is only a small portion of a packet. In contrast, shorter packets have a higher probabilityto arrive successfully, but the fixed overhead requires a larger share of the overall bandwidth. When thetransmitter receives feedback about transmission outcomes, it may adapt the packet size accordingly.

It is a fundamental communications law that the bit error rate at the receiver depends on the ratio ofthe energy expended per bit to the channel noise level [53]. There are two possibilities to use this rela-tionship to increase transmission reliability:

● If the transmit power is increased, the energy per bit is increased and the bit error rate is reduced.However, often, the transmit power is technically or legally restricted.

● If the bits are transmitted at a lower speed, the energy per bit is also increased.

Hence, a transmitter might apply transmit power control or modulation rate control.

References

Bit and Frame Synchronization

[1] Cheshire, Stuart and Mary Baker, Consistent overhead byte stuffing, ACM SIGCOMM ComputerCommunication Review, 27:209–220, 1997.

[2] IEEE, Carrier Sense Multiple Access with Collision Detection (CSMA/CD) - (ETHERNET), 1985.[3] International Standardization Organization (ISO), IS 1177 -1985 Character Structure for Start/Stop

and Synchronous Character Oriented Transmission, 1985.[4] Manchester, J., J. Anderson, B. Doshi, and S. Dravida, IP over SONET, IEEE Communications

Magazine, Vol. 36, 136–142, May 1998.[5] Simpson, W., RFC 1661: The point-to-point protocol (PPP), July 1994.[6] Simpson, W., RFC 1662: PPP in HDLC-like framing, July 1994, Obsoletes RFC1549, Status:

STANDARD.

Medium Access Control Protocols

[7] Abramson, Norman, Development of the ALOHANET, IEEE Transactions on Information Theory,31:119–123, 1985.

[8] Abramson, Norman, Ed., Multiple Access Communications — Foundations for EmergingTechnologies, IEEE Press, New York, 1993.

[9] Agrawal, G., B. Chen, W. Zhao, and S. Davari, Guaranteeing synchronous message deadlines with thetimed token medium access control protocol, IEEE Transactions on Computers, 43:327 – 339, 1994.

[10] Almeida, Luis, Paulo Pedreiras, and Jose Alberto G. Fonseca, The FFT-CAN protocol: why and how,IEEE Transactions on Industrial Electronics, 49:1189–1201, 2002.

[11] Berry, Michael, Andrew T. Campbell, and Andras Veres, Distributed Control Algorithms for ServiceDifferentiation in Wireless Packet Networks, in Proceedings of INFOCOM 2001, Anchorage,Alaska, IEEE, New York, Apr., 2001.

[12] Bertsekas, D. and R. Gallager, Data Networks, Prentice-Hall, Englewood Cliffs, NJ, 1987.[13] Capetanakis, J. I., Tree Algorithm for Packet Broadcast Channels, IEEE Transactions on Information

Theory, 25:505–515, 1979.[14] Chen, Biao, Nicholas Malcolm, and Wei Zhao, Fiber distributed data interface and its use for time-

critical applications, in The Communications Handbook, Gibson, Jerry D., Ed., CRC Press/IEEEPress, Boca Raton, FL, 1996, pp. 597–610.

[15] Dellaverson, Lou and Wendy Dellaverson, Distributed channel access on wireless atm links, IEEECommunications Magazine, 35:110–113, 1997.

[16] ETSI, High Performance Radio Local Area Network (HIPERLAN) — Draft Standard, ETSI, March 1996.[17] Farago, Andras, Andrew D. Myers, Violet R. Syrotiuk, and Gergely V. Zaruba, Meta-MAC protocols:

automatic combination of MAC protocols to optimize performance for unknown conditions, IEEEJournal on Selected Areas in Communications, 18:1670–1681, 2000.

[18] International Organization for Standardization, ISO Standard 11898 — Road Vehicle — Interchangeof Digital Information — Controller Area Network (CAN) for High-Speed Communication, ISO-Internation Organization for Standardization, 1993.

Principles of Lower-Layer Protocols 37-17

9854_C037.qxd 10/15/2004 12:26 PM Page 17

Page 21: Industrial Comm Sys

[19] Gummalla, Ajay Chandra V., and John O. Limb, Wireless medium access control protocols, IEEECommunications Surveys and Tutorials, 3, 2000. http://www.comsoc.org/pubs/surveys.

[20] Fred Halsall, Data Communications, Computer Networks and Open Systems, Addison-Wesley,Reading, MA, 1996.

[21] Hayes, J.F., Modeling and Analysis of Computer Communications Networks, Plenum Press,New York, 1984.

[22] IEEE, 802.4 Token-passing Bus Access Method, IEEE, New York, 1985.[23] IEEE, 802.5 Token Ring Access Method and Physical Layer Specifications, IEEE, New York, 1985.[24] IEEE - Institute of Electrical and Electronics Engineers, IEEE Standards Department, 445 Hoes

Lane, P.O. Box 1331, Piscataway, NJ 08855-1331, USA, IEEE Standard 1118 — IEEE StandardMicrocontroller System Serial Control Bus, August 1991.

[25] Jain, Raj, FDDI Handbook: High-Speed Networking Using Fiber and Other Media, Addison-Wesley,Reading, MA, 1994.

[26] Kurose, J.F., M. Schwartz, and Y. Yemini, Multiple-access protocols and time-constrained commu-nication, ACM Computing Surveys, 16:43–70, 1984.

[27] Lam, S.S., Multiaccess protocols in computer communications, Vol. I: Principles, in Principles ofCommunication and Network Protocols, Chon, W., Ed., Prentice-Hall, Englewood Cliffs, NJ, 1983,pp. 114–155.

[28] The Editors of IEEE 802.11, IEEE Standard for Wireless LAN Medium Access Control (MAC) andPhysical Layer (PHY) Specifications, IEEE, New York, November 1997.

[29] Passas, Nikos, Sarantis Paskalis, Dimitri Vali, and Lazaros Merakos, Quality-of-service-orientedmedium access control for wireless atm networks, IEEE Communications Magazine, 35:42–50, 1997.

[30] Rappaport, Theodore S., Wireless Communications — Principles and Practice, Prentice-Hall, UpperSaddle River, NJ, USA, 2002.

[31] Rathgeb, Erwin P., Integrated services digital network (isdn) and broadband (b-isdn), in TheCommunications Handbook, Gibson, Jerry D., Ed., CRC Press/IEEE Press, Boca Raton, FL, 1996,pp. 577–590.

[32] Rubin, Izhak, Multiple access methods for communications networks, in The CommunicationsHandbook, Gibson, Jerry D., Ed., CRC Press/IEEE Press, Boca Raton, FL, 1996, pp. 622–649.

[33] Sachs, S.R., Alternative local area network access protocols, IEEE Communications Magazine,26:25–45, 1988.

[34] Takagi, Hideaki, Analysis of Polling Systems, MIT Press, Cambridge, MA, 1986.[35] Tanenbaum, Andrew S., Computer Networks, 3rd ed., Prentice-Hall, Englewood Cliffs, NJ, 1997.[36] Tanenbaum, Andrew S., Computernetzwerke, 3rd ed., Prentice-Hall, Muenchen, 1997.[37] Tobagi, Fouad A., Multiaccess protocols in packet communications systems, IEEE Transactions on

Communications, 28:468–488, 1980.[38] Tobagi, Fouad A., Multiaccess link control, in Computer Network Architectures and Protocols, Green,

P.E., Ed., Plenum Press, New York, 1982.[39] Tobagi, Fouad A. and Leonard Kleinrock, Packet switching in radio channels: Part I carrier sense

multiple access models and their throughput-/delay-characteristic, IEEE Transactions onCommunications, 23:1400–1416, 1975.

[40] Tobagi, Fouad A. and Leonard Kleinrock, Packet switching in radio channels: Part II the hidden ter-minal problem in csma and busy-tone solutions, IEEE Transactions on Communications,23:1417–1433, 1975.

[41] TTTech Computertechnik GmbH, Vienna, TTP/C Protocol, Version 0.5, 1999.[42] Union Technique de l’Electricité, General Purpose Field Communication System, EN 50170, Volume

2: PROFIBUS, 1996.[43] van As., Harmen R., Media access techniques: the evolution towards terabit/s LANs and MANs,

Computer Networks and ISDN Systems, 26:603–656, 1994.[44] Willig, Andreas and Andreas Köpke, The Adaptive-Intervals MAC protocol for a wireless

PROFIBUS, in Proceedings of 2002 IEEE International Symposium on Industrial Electronics,L’Aquila, Italy, July 2002.

37-18 The Industrial Information Technology Handbook

9854_C037.qxd 10/15/2004 12:26 PM Page 18

Page 22: Industrial Comm Sys

Error Control

[45] Annamalai, A. and Vijay K. Bhargava, Analysis and optimization of adaptive multicopy transmis-sion ARQ protocols for time-varying channels, IEEE Transactions on Communications,46:1356–1368, 1998.

[46] Haccoun, David and Samuel Pierre, Automatic repeat request. in The Communications Handbook,Gibson, Jerry D., Ed., CRC Press/IEEE Press, Boca Raton, FL, 1996, pp. 181–198.

[47] Hersent, Olivier, David Gurle, and Jean-Pierre Petit, IP Telephony — Packet-based multimedia com-munications systems, Addison-Wesley, Harlow/England, London, 2000.

[48] Lin, Shu and Daniel J. Costello, Error Control Coding — Fundamentals and Applications, Prentice-Hall, Englewood Cliffs, NJ, 1983.

[49] Liu, Hang, Hairuo Ma, Magda El Zarki, and Sanjay Gupta, Error control schemes for networks: anoverview, MONET — Mobile Networks and Applications, 2:167–182, 1997.

[50] Michelson, Arnold M. and Allen H. Levesque., Error-Control Techniques for Digital Communication,John Wiley and Sons, New York, 1985.

[51] Paulraj, Arogyaswami, Diversity techniques, in The Communications Handbook, Gibson, Jerry D.,Ed., CRC Press / IEEE Press, Boca Raton, FL, 1996, pp. 213–223.

[52] Shooman, Martin L., Reliability of computer systems and networks, John Wiley and Sons, New York,2002.

[53] Sklar, Bernard, Digital Communications — Fundamentals and Applications, Prentice-Hall,Englewood Cliffs, NJ, 1988.

[54] Sklar, Bernard, A primer on turbo code concepts, IEEE Communications Magazine, 35, December1997, pp. 94–102.

[55] Stone, Jonathan, Michael Greenwald, Craig Partridge, and James Hughes, Performance of check-sums and crc’s over real data, IEEE/ACM Transactions on Networking, 6:529–543, 1998.

[56] Willig, Andreas, Martin Kubisch, Christian Hoene, and Adam Wolisz, Measurements of a wirelesslink in an industrial environment using an IEEE 802.11-compliant physical layer, IEEE Transactionson Industrial Electronics, 49:1265–1282, 2002.

Further References

[57] Bennet, Jon C.R. and Hui Zhang, Hierarchical Packet Fair Queueing Algorithms, in Proceedings ofACM SIGCOMM, 1996.

[58] Keshav, Srinivasan, An Engineering Approach to Computer Networking: ATM Networks, the Internetand the Telephone Network, Addison-Wesley, Reading, MA, 1997.

[59] Parekh, A. K. and G. Gallager, A Generalized Processor Sharing Approach to Flow Control inIntegrated Services Networks - The Single Node Case, in Proceedings of IEEE INFOCOM, Vol. 2,IEEE, New York, 1992, pp. 915–924.

[60] Parekh, A. K. and G. Gallager, A generalized processor sharing approach to flow control in inte-grated services networks — the multiple node case, in Proceedings of IEEE INFOCOM, Vol. 2,IEEE, New York, 1993, pp. 521–530.

[61] Varma, Anujan and Dimitrios Stiliadis, Hardware implementation of fair queueing algorithms foratm networks, IEEE Communications Magazine, 35:54–68, 1997.

Principles of Lower-Layer Protocols 37-19

9854_C037.qxd 10/15/2004 12:26 PM Page 19