Ethernet RT I

Embed Size (px)

Citation preview

  • 7/26/2019 Ethernet RT I

    1/41

    2004ContemporaryControl Systems, Inc.

    (Nopart of theExtension maybereproduced without thewritten consent of ContemporaryControls.)

    Volume 5 Issue 3

    MAY-J UNE

    INTRODUCTION

    Real-time electronic distributed control systems arean important development of the technologicalevolution. Electronics are employed to control andmonitor most safety-critical applications from flightdecks to hospital operating rooms. As these real-timesystems become increasingly prevalent and advanced,so does the demand to physically distribute the controlin strict real-time. Thus, there is a need for control

    network protocols to support stringent real-timerequirements. Real-time networks must provide aguarantee of service so they will consistently operatedeterministically and correctly.

    Ethernet, as defined in IEEE 802.3, is non-deterministicand thus, is unsuitable for hard real-time applications.The media access control protocol, CSMA/CD with itsbackoff algorithm, prevents the network from supportinghard real-time communication due to its random delaysand potential transmission failures.

    Decreasing costs and increasing demand for a singlenetwork type, from boardroom to plant-floor, have ledto the development of Industrial Ethernet. The desire to

    incorporate a real-time element into this increasinglypopular single-network solution has led to thedevelopment of different real-time Industrial Ethernetstrategies. Fieldbus networking standards have failed todeliver an integrated solution. Typically, emerging real-time Industrial Ethernet solutions complement thefieldbus standardsfor example, by using commonuser layers. This article covers an introduction to real-time systems and a study of Ethernets potential as areal-time network. Part 2 provides a study of thereal-time Industrial Ethernet solutions available today.

    Real-Time Introduction

    Real-Time (RT) systems are becoming increasinglyimportant, as industries focus on distributed computingin automation, see Figure 1. As computing costsdecrease, and computing power increases, industry hasrelied more on distributed computers to deliverefficiency and increased yield to production lines. RTdoes not automatically mean faster execution, but ratherthat a process is dependent on the progression of time for

    valid execution.RT systems are those that depend not solely on the

    validity of data but also on its timeliness. A correct RTsystem will guarantee successful system operationso

    far as its timely execution is concerned. RT systems aregenerally broken into two main sub-categories: hardand soft.

    Hard Real-Time (HRT) systems are those in whichincorrect operation can lead to catastrophic events.Errors in HRT systems can cause accidents or evendeath, such as in flight control or train control.

    Soft Real-Time (SRT) systems, on the other hand,are not as brittle. An error in a SRT system, while notencouraged, will not cause loss of property or life. SRTsystems are not as safety-critical as HRT systems, and

    should not be employed in a safety-critical situation.Examples of SRT systems are online reservationsystems and streaming multimedia applications whereoccasional delays are inconvenient but not serious.

    Jobs are the RT systems building blocks. Each RT jobhas certain temporal quantities (Figure 2):

    1. Release Time,2. Ready Time,3. Execution Time,4. Response Time,5. Deadline.

    Release Time of a job is when a job becomesavailable to the system. Execution Time is the timefor a job to be completely processed. Response Timeis the interval between release time and completion ofthe execution. Ready Time is the earliest time a jobcan start executing (never less than the Release Time).The Deadline is the time by which execution must befinished, beyond which the job is late. A deadline canbe either hard or soft, indicating the jobs temporaldependence. As mentioned earlier, a missed hard dead-line can have serious consequences. All RT systemshave a certain level of jitter(a variance on actualtiming). In a RT system, jitter should be measurable sosystem performance can be guaranteed. For textbook

    information on RT systems, refer to [1].

    IntroductiontoReal-TimeEthernetIBy Paula D oyle, a doctoral researcher wi th the Circuits and Systems Research Centre at the University of Li meri ck in I reland

    Node with RT Clock

    RT Network

    Controller Station 3

    Station 1 Station 2

    Figure 1 D istributed Real-Time Processing

  • 7/26/2019 Ethernet RT I

    2/4

    ReleaseTime

    ReadyTime Deadline

    Execution Time

    time

    Respon se Time

    2

    To develop a RT distributed system of interconnectedcomputers, it is vital to provide communication amongthe various computers in a reliable and timely fashion.Distributed processors running RT applications must beable to intercommunicate via a RT protocol, otherwisethe temporal quality of work is lost. Real-TimeCommunication networks are like any RT system.They can be hard or soft, depending on requirementsand their jobs include message transmission,propagation, and reception. A number of RT controlnetworks are employed in industry, but none have thepopularity or bandwidth of Ethernet.

    The Demand for Real-Time Ethernet

    Demand for Ethernet as a RT control network isincreasing as manufacturers realize the benefits ofemploying a single network technology fromboardroom to plant floor. Decreased product costsplus the possibility of overlapping training andmaintenance costs for information, field level, controland possibly device networks would greatly reducemanufacturers expense.

    At the RT control level, Ethernet offers many

    benefits over existing solutions. As a control network,10 Gbps Ethernet offers bandwidth almost 1000x fasterthan todays comparable fieldbus networks (such as the12 Mbps of ProfiBus) and can also support RTcommunication. Distributed applications in controlenvironments require tight synchronization so toguarantee the delivery of control messages withindefined message cycle times (typical times appear inTable 1). Traditional Ethernet and fieldbus systemscannot meet cycle time requirements below a fewmilliseconds, but emerging RT Industrial Ethernetsolutions allow cycle times of a few microseconds.

    Along with the increased bandwidth and tightsynchronization, RT Ethernet gives manufacturers thesecurity of using a physical and data-link layer technologythat has been standardized by both the IEEE and theISO. Ethernet can provide reduced complexity with allthe attributes required of a field, control or devicenetworkin operations having up to 30 differentnetworks installed at this level [2]. Furthermore,Ethernet devices can also support TCP/IP stacks so thatEthernet can easily gate to the Internet. This feature isattractive to users since it allows remote diagnostics,control, and observation of their plant network fromany Internet-connected device around the world with a

    license-free web browser. Although Ethernet does

    introduce overhead through its minimum message datasize (46 bytes), which is large in comparison to existingcontrol network standards, its increased bandwidth,standardization and integration with existing planttechnology should generate good reasons to considerEthernet as a control network solution.

    Ethernet and CSMA/CD

    Ethernet, as defined in IEEE 802.3, is unsuitable forstrict RT industrial applications because its communicationis non-deterministic. This is due to the definition of itsmedia access control (MAC) protocol, based on CarrierSense Multiple Access/ Collision Detection (CSMA/CD).The implementation described in the standard uses atruncated binary exponential backoff algorithm.

    With CSMA/CD, each node can detect if anothernode is transmitting on the medium (Carrier Sense).

    When a node detects a carrier, its Carrier Sense isturned on and it will defer transmission until determiningthe medium is free. If two nodes transmit simultaneously(Multiple Access), a collision occurs and all frames are

    destroyed. Nodes detect collisions (Collision Detection)by monitoring the collisionDetect signal provided bythe physical layer. When a collision occurs, the nodetransmits ajam sequence.

    When a node begins transmission there is a timeinterval, called the Collision Window, during which acollision can occur. This window is large enough toallow the signal to propagate around the entirenetwork/segment. When this window is over, all(functioning) nodes should have their Carrier Sense on,and so would not attempt to commence transmission.

    When a collision occurs, the truncated binaryexponential backoff algorithm is employed at each

    colliding node. The algorithm works as follows:Initially: n:=0, k:=0, r:=0.

    When a collision occurs, the node enters thealgorithm which states: It increments n, the Transmit Counter, which

    tracks the number of sequential collisionsexperienced by a node.

    If n> 16, (16 unsuccessful successive transmissionattempts), transmission fails and the higher layersshould be informed.

    If n

  • 7/26/2019 Ethernet RT I

    3/4

    and unsuitability for RT communicationsespecially onheavily-loaded networks. Re-definition of the mediaaccess protocol could solve the problem but wouldleave the new nodes unable to interoperate with legacyEthernet nodes.

    Ethernet is non-deterministic only if collisions canoccur. To implement a completely deterministicEthernet, all collisions must be avoided. A collision

    domain is a CSMA/CD segment where simultaneoustransmissions can produce a collision and wherecollision probability increases with the number ofnodes transmitting. Completely avoiding collisions,therefore, gives Ethernetwith a relatively largebandwidth and popularityan opportunity to bedeveloped for the RT domain. The most common wayof implementing a collision-free Ethernet is through theuse of hardware.

    A situation where two or more nodes compete formedium access to a network segment is calledShared Ethernet.

    Full & Half Duplex Ethernet

    When Ethernet was standardized in 1985, allcommunication was half duplex. Half duplex restricts anode to either transmit or receive at a time but notto perform both actions concurrently.

    Nodes sharing a half duplex connection are in thesame collision domain. This means these nodes willcompete for bus access, and their frames may collide

    with other frames on the network. Unless access to thebus is controlled at a higher level and highlysynchronized across all nodes on the collision domain,collisions can occur and RT communication isnot guaranteed.

    Full duplex communication was standardized forEthernet in the 1997 edition of 802.3 as IEEE 802.3x.With full duplex, a node can transmit and receivesimultaneously, but only two devices can be connectedon a single full duplex linktypically a node-to-switchor switch-to-switch configuration. Theoretically, fullduplex links can double available network bandwidthfrom 10 to 20 Mbps or 100 to 200 Mbps, but in practiceit is limited by the internal processing capability ofeach node. Full duplex provides every node with aunique collision domaincompletely avoidingcollisions and even ignoring the traditionalCSMA/CD protocol.

    Since full duplex links have a maximum of twonodes per link, such technology is not viable as anindustrial RT solution without the use of fast, intelligentswitches that can form a network with single collisiondomains for each nodei.e., Switched Ethernet.

    Full Duplex, Switched Ethernet

    With Shared Ethernet, nodes compete for access to

    the media in their shared collision domains.The use of a non-deterministic bus accessscheme, such as CSMA/CD, makes sharedEthernet unviable as a RT networksolution. The most popular method ofcollision-avoidance, which produces adeterministic Ethernet, introduces singlecollision domains for each node guaranteeingthe node exclusive use of the medium andeliminating access contention. This isachieved by implementing full duplex linksand hardware devices such as switches and

    bridges. These devices can isolate collision domains

    through the segmentation of thenetwork because each device port is configured as asingle collision domain. Although, both switches andbridges will suffice, switches are more flexible becausethey allow more segments.

    Switches

    Switches are data-link layer hardware devices thatpermit single-collision domains through networksegmentation. While a bridge operates like a switch, itonly contains two ports compared to switches thathave more than twowith each port connected to acollision domain. Switches can operate in half duplex

    or full duplex mode. When full duplex switches areused with full duplex capable nodes, no segment willhave collisions. Todays switches are more intelligentand faster and with careful design and implementationcould be used to achieve a hard RT communicationnetwork using IEEE 802.3.

    Although switches are data-link layer devices, theycan perform switching functions based on data fromlayers 3 and 4. Layer 3 switches can operate oninformation provided by IPsuch as IP version,source/destination address or type of service. Layer 4devices can switch by source/destination port or eveninformation from the higher-level application.

    Further refinements to the IEEE 802 standards,specifically for switch operations, are 802.1p and802.1Q. IEEE 802.1p (incorporated into IEEE 802.1D[3]) brings Quality of Service (QoS) to the MAC leveland defines how these switches deal with prioritization

    priority determination, queue management, etc. Thisis achieved by adding a 3-bit priority field to the MACheader, giving 8 (0-7) different priority levels for use byswitches or hubs. As defined, 802.1p supports prioritieson topologies compatible with its prioritization service,but for Ethernet, which has no prioritization field in itsframe format, it uses 802.1Q.

    3

    Control Ap plication

    Low speed sensors (e.g. temp. pressure)

    Drive control systems

    M otion control (e.g. robotics)

    Precision motion control

    High-speed devices

    Electronic ra nging (e.g. fault d etection)

    Tens o f milliseconds

    M illiseconds

    Hundred s of microseconds

    Tens o f microseconds

    M icroseconds

    M icroseconds

    Typical Cycle Time

    Table 1 Typical Cycle Times for Control A pplications

  • 7/26/2019 Ethernet RT I

    4/4

    IEEE 802.1Q [4] defines an architecture for virtualbridged LANs, their services and the protocols andalgorithms used by those services. 802.1Q allowsEthernet frames to support VLANs (Virtual Local AreaNetworks)limiting broadcast domains and therebyreducing broadcast traffic on the entire LAN. This isachieved by inserting 4 bytes between the sourceaddress and length/type fields in the frame header,

    which among other identifiers, includes that of theoriginating VLAN.

    For a RT Industrial Ethernet application, an802.1p/Q implementation has certain advantages: itintroduces standardized prioritization, allowing controlengineers up to eight different user-defined prioritylevels for their traffic. But these standards also havedrawbacks including the extra hardware costs for theincreased frame length (1522 bytes)which introducescompatibility issues with legacy Ethernet networks. ART implementation using 802.1 p/Q requires fullduplex, switched Ethernet. IEEE 802.1p/Q areacceptable for certain applications of RT Ethernet inindustry when switch through time is predictable andan overload situation will not result in hard deadlinesbeing missed.

    Although switches can certainly provide RTdeterministic Ethernet communication and are thebackbone of the Industrial Ethernet solutions availabletoday, they have drawbacks. They are costlya majorinfluence on cost-conscious industries. They arepowered devices capable of failure (a major factor forhard RT control operations). And sometimes theoperational predictability is not guaranteed by themanufacturer. A study on switches for RT applications

    is available at [5].TCP/UDP/IP for Real-Time Ethernet

    With Industrial Ethernet, the trend is to define anapplication-layer environment along with the TCP/IPprotocol, to realize an industrial automation networkingsolution. Some RT Ethernet solutions (e.g., EtherNet/IP)perform all their communication, RT included, throughthe TCP/UDP/IP stack. But most solutions, whileproviding TCP/IP compatibility, do not employ thisprotocol for RT communication. In a system likeEtherNet/IP, TCP is used for initialization and configu-ration of explicit messages while UDP, with its reduced

    overhead, is used for RT I/O (implicit messaging).Typically, RT Industrial Ethernet applications arecompatible with TCP/IP, but the protocol suite isbypassed for all RT communication. The ability of a RTEthernet solution to intercommunicate with an office-

    based system is paramount to achieve the Ethernettechnology plant of the future.

    CONCLUSION

    This article covered a broad introduction toEthernet for RT. It described concepts to be developedin the follow-up article: Real-Time Ethernet II. The fol-low-up article will provide detail on existing RT

    Ethernet solutions such as PROFInet V3, ETHERNETPowerlink and EtherNet/IP plus IEEE 1588an importantsupporting technology for clock synchronization.

    References

    [1] Liu, J. Real-time Systems; Prentice Hall Inc., 2000;ISBN: 0130996513.

    [2] Crockett, N. Industrial Ethernet is Ready toRevolutionize the FactoryConnecting the FactoryFloor, Manufacturing Engineer, Volume: 82, Issue: 3,

    June 2003, pages 41-44.

    [3] ISO/IEC 15802-3: 1998, ANSI/IEEE Std 802.1D, 1998

    Edition. Information technology

    telecommunicationsand information exchange between systemslocal andmetropolitan area networkscommon specifications.Part 3: Media Access Control (MAC) bridges.

    [4] IEEE Std 802.1Q-1998 IEEE standards for local andmetropolitan area networks: Virtual bridges local areanetworks.

    [5] Georges, J.-P.; Rondeau, E.; Divoux, T Evaluationof Switched Ethernet in an Industrial Context by Usingthe Network Calculus, Factory CommunicationSystems, 2002. 4th IEEE International Workshop on 28-30 Aug. 2002, pages 19-26.

    Look for Paula Doyles complete article as ElectiveIE401 in the Curriculum of Industrial EthernetUniversity atwww.industrialethernetu.com.If you

    wish to contact Paula, her e-mail address is:[email protected].

    Paula Doyle is a doctoralresearcher with the Circuitsand Systems ResearchCentre at the University ofLimerick in Ireland. She hasa first class honors B.

    Engineering degree inComputer Engineering fromthe University of Limerick.Her research interestsinclude embeddedreal-time systems, with emphasis on control networksfor smart transducers with applications in the field ofindustrial automation. Paula is currently in the finalstages of her Ph.D. research, based on thetime-triggered transducer clusters in an Ethernetnetworking environment.

    4

    w w w.ccontrols.com

    Past issues of the Extension are available. If you would like acopy, please send your request to [email protected]

    http://www.industrialethernetu.com/http://www.industrialethernetu.com/http://www.industrialethernetu.com/mailto:[email protected]://www.industrialethernetu.com/mailto:[email protected]