982 rtcs31 RTComm - 國立臺灣大學

11
SPRING 2010 即時控制系統設計 Design of Real-Time Control Systems Lecture 31 Real-Time Communications for Control Applications Feng-Li Lian NTU-EE Feb10 – Jun10 NTUEE-RTCS31-RTComm-2 Feng-Li Lian © 2010 Introduction 04/12/03 Real-Time Control Systems Controlled by one Computer Processor Centralized control systems – Real-time operating systems Controlled by one Communication Medium Distributed control systems – Real-time communications Centralized Control System Distributed Control System NTUEE-RTCS31-RTComm-3 Feng-Li Lian © 2010 Introduction Real-Time Communications Networks for Control Applications & Automation Comparison Static properties Dynamic properties 04/12/03 NTUEE-RTCS31-RTComm-4 Feng-Li Lian © 2010 Networks for Data and Control Amstron & Wittenmark 97 02/16/03

Transcript of 982 rtcs31 RTComm - 國立臺灣大學

SPRING 2010

即時控制系統設計Design of Real-Time Control Systems

Lecture 31Real-Time Communications for Control Applications

Feng-Li LianNTU-EE

Feb10 – Jun10

NTUEE-RTCS31-RTComm-2Feng-Li Lian © 2010Introduction

04/12/03

Real-Time Control Systems• Controlled by one Computer Processor

– Centralized control systems

– Real-time operating systems

• Controlled by one Communication Medium– Distributed control systems

– Real-time communications

Centralized Control System Distributed Control System

NTUEE-RTCS31-RTComm-3Feng-Li Lian © 2010Introduction

Real-Time Communications

Networks for Control Applications & Automation

Comparison• Static properties

• Dynamic properties

04/12/03

NTUEE-RTCS31-RTComm-4Feng-Li Lian © 2010Networks for Data and Control

Amstron & Wittenmark 97 02/16/03

ni.comni.com

Industrial Bus HierarchyIndustrial Bus Hierarchy

Enterprise

Control

Fieldbus

Devicebus

SensorbusNN NN

NN NN

Fisher

Control PanelFlow

Pressure Alarm ConditionsSTOP

Temperature

Control PanelFlow

Pressure Alarm ConditionsSTOP

Temperature

NTUEE-RTCS31-RTComm-6Feng-Li Lian © 2010Introduction

03/25/04Proposed Network Hierarchy for Open Control, Contemporary Controls

NTUEE-RTCS31-RTComm-7Feng-Li Lian © 2010Introduction

03/25/04Hirschmann Network Systems: Distributed Communication Architecture © Siemens, 2000

8

TIA – Totally Integrated Automation

System bus

Operator terminals

Terminal bus

Engineeringsystem

OS server for multi-user systems,server for BATCH flexible

On-siteoperator panel

Warehouse– CORNERSTONE– SAP Client

Operator station OSas single-user system

Main-frame

Ethernet

Fiber-optic cable

Fiber-optic cable

Ethernet

I/O Block

Sensor

I/O

Hart

MicroMaster

Chip-card

GPS

I/O FieldbusI/O Fieldbus

Coupler

P

SIMOVERTMICROMASTER

SIEMENS

ooo

NTUEE-RTCS31-RTComm-9Feng-Li Lian © 2010Networked Control Systems (NCS)

Definition:• Control systems with physically distributed processing

power and network communication of control signals

02/28/01

...Machine

Tool

A CS

Assembly Line

Discrete-Event/Cell Network

Continuous-Variable/Device Network

Information/System Network

Automatic Material Handling

A CS A CS

Factory ControllerFactory Controller

Cell / SupervisoryController

Cell / SupervisoryController

EquipmentEquipment

Standardized Sensor Bus

EquipmentController

EquipmentController

NTUEE-RTCS31-RTComm-10Feng-Li Lian © 2010Introduction: Networks in Use (1)

In-Vehicle Network Systems

Source: ITS Data Bus Forum

• CAN

• J1850

• J1939

• IDB 1394

02/28/01

NTUEE-RTCS31-RTComm-11Feng-Li Lian © 2010

Network at Tractor and Implement

Source: BioSystems Engineering, Oklahoma State Univ.

Protocols:

• J1850

• J1939

Introduction: Networks in Use (2)

02/28/01

NTUEE-RTCS31-RTComm-12Feng-Li Lian © 2010

Distributed Manipulation Systems

Source: Professor Luntz, ME, Univ. of Michigan, Carnegie Mellon Univ

Source: USA Today

Protocols:• RS232• RS485

Introduction: Networks in Use (3)

02/28/01

NTUEE-RTCS31-RTComm-13Feng-Li Lian © 2010

Advanced Manufacturing Systems

NSF-ERC/EMS, Univ. of Michigan.

Protocols:• DeviceNet• Ethernet• Remote I/O

Introduction: Networks in Use (4)

02/28/01

NTUEE-RTCS31-RTComm-14Feng-Li Lian © 2010

Beverage Packaging & Food Processing

Anchor Products Corporate, New Zealand

Rhode Island Beverage Packaging Plant

Source: Open DeviceNet Vendor Association

Protocols:• ControlNet• DeviceNet• Ethernet• Profibus

Introduction: Networks in Use (5)

02/28/01

NTUEE-RTCS31-RTComm-15Feng-Li Lian © 2010

Automobile Production at OPEL, Germany

Final Assembly: Marriage of chassis and body

Computer Integrated Manufacturing

Source: Profibus

Protocols:ControlNet, DeviceNet, Ethernet, Profibus

Introduction: Networks in Use (6)

02/28/01

NTUEE-RTCS31-RTComm-16Feng-Li Lian © 2010

Beer Brewing at Germany

Source: Profibus

Introduction: Networks in Use (7)

Protocols: ControlNet, DeviceNet, Ethernet, Profibus

02/28/01

NTUEE-RTCS31-RTComm-17Feng-Li Lian © 2010

Orange Picking Robot

Introduction: Networks in Use (8)

05/18/03Cavalieri, Stefano, Mirabella 97

NTUEE-RTCS31-RTComm-18Feng-Li Lian © 2010Network Protocol: Data Networks & Control Networks

04/12/03Raji 94

NTUEE-RTCS31-RTComm-19Feng-Li Lian © 2010Network Protocol: Command- & Status-Based Systems

04/12/03Raji 94

NTUEE-RTCS31-RTComm-20Feng-Li Lian © 2010Network Protocol: Network Topology

04/12/03Bennett 94

(a) bus

(b) star

(c) tree

(d) ring

(e) mesh

NTUEE-RTCS31-RTComm-21Feng-Li Lian © 2010Network Protocol: Network Topology

03/25/04Hirschmann Network Systems: Distributed Communication Architecture

NTUEE-RTCS31-RTComm-22Feng-Li Lian © 2010Network Protocol: ISO-OSI 7-Layer Model

Physical

Data Link

Network

Transport

Session

Presentation

Application

Node A

Physical

Data Link

Network

Transport

Session

Presentation

Application

Node B

Communication Medium

NTUEE-RTCS31-RTComm-23Feng-Li Lian © 2010

data

Network Protocol: Message Framing

Layer Framing

data 1 of 3 data 2 of 3 data 2 of 3

data 1 of 3 data 2 of 3 data 3 of 3

data 1 of 3 data 2 of 3 data 2 of 3

data 1 of 3 data 2 of 3 …data 1 of 3 data 2 of 3 …

data 1 of 3 data 2 of 3

110010011011010101010101010101 110010011011111001010101010101

……Physical

Data Link

Network

Transport

Session

Presentation

Application

NTUEE-RTCS31-RTComm-24Feng-Li Lian © 2010Network Protocol: ISO-OSI 7-Layer Model

Physical

Data Link

Network

Transport

Session

Presentation

ApplicationReal data to send to another network device (IE, FTP, telnet, email)

Encoding data (different computers have different coding systems)

Token management (task exchange), synchronization (checkpoint)

Layer Functions

Split data into packets, and manage to the connect (TCP)

Add addressing for switching and routing (IP, ROUTER/GATEWAY)

Add error detection, flow control, and physical addressing (Medium Access Control, BRIDGE/SWITCH)

Transmits data over the medium (i.e., cable: fiber, twisted pair, etc. HUB/REPEATER)

NTUEE-RTCS31-RTComm-25Feng-Li Lian © 2010Network Protocol: ISO-OSI 7-Layer Model

Physical

Data Link

Network

Transport

Session

Presentation

Application

– Data objects

– Standardized networking structures – Networking structures

– Data interpretation– Authentication

– Network Management

Layer Control Networking Requirements

– End-to-end ACK

– Duplicate detection

– Automatic retries– Addressing, unicast, multicast, broadcast

– Routers– MAC, collision

avoidance/detection

– Framing, data encoding

– Priority

– Media transceivers

ni.comni.com

7 Application

6 Presentation

5 Session

Application layers

4 Transport

3 Network

2 Data link

1 Physical

Datatransport

layers

7 Application

6 Presentation

5 Session

Application layers

4 Transport

3 Network

2 Data link

1 Physical

Datatransport

layers

Typical Industrial NetworksTypical Industrial Networks

NTUEE-RTCS31-RTComm-27Feng-Li Lian © 2010Network Protocol: Physical Layer

$75-

200

$20-

75

$30-

50

$50-

150

$50-

100

$10-

30Node cost

-

0.05-

20

0.5-

30

Infrared

-

1.2-

9.6

50-

10,000

Radio

Medium-

highMedium

None-

LowLow

Installation cost

1-

100,000

300-

10,000

0.06-

10,000

0.3-

2000Data rate

(kb/s)

10-

10,000

10-

10,000

10-

5,000

1-

1000

Range

(m)

Fiber Optics

CoaxialPower Line

Twisted Pair

Characteristics

Raji 94

NTUEE-RTCS31-RTComm-28Feng-Li Lian © 2010Network Protocol: Leading Arch for Distributed Control

Raji 94

NTUEE-RTCS31-RTComm-29Feng-Li Lian © 2010Introduction

03/25/04Hirschmann Network Systems: Distributed Communication Architectureni.comni.com

Capability HierarchyCapability Hierarchy

Level of functionality• Enterprise bus (Ethernet)• Control bus (HSE, ControlNet)• Fieldbus (Foundation Fieldbus, Profibus PA)• Device bus (DeviceNet, Profibus DP, Interbus-S)• Sensor bus (CAN, ASI, Seriplex, LonWorks)

Level of functionality• Enterprise bus (Ethernet)• Control bus (HSE, ControlNet)• Fieldbus (Foundation Fieldbus, Profibus PA)• Device bus (DeviceNet, Profibus DP, Interbus-S)• Sensor bus (CAN, ASI, Seriplex, LonWorks)

NTUEE-RTCS31-RTComm-31Feng-Li Lian © 2010Introduction

03/25/04Hirschmann Network Systems: Distributed Communication Architecture

NTUEE-RTCS31-RTComm-32Feng-Li Lian © 2010Worldwide most popular field busses

Interbus-S

Profibus (3 kinds)

LON

Ethernet

CANs

ASI

Manufacturing

Process control

Building systems

Plant bus

Automotive, Process control

Building Systems

Phoenix Contact

Siemens, ABB

Echelon, ABB

alle

CiA, OVDA, Honeywell

Siemens

Modbus obsolete point-to-point many

ControlNet plant bus Rockwell

Fieldbus Foundation, HART Chemical Industry Fisher-Rosemount, ABB

7%

26%

6%

50%

25%

9%

22%

14%

7%

Sum > 100%, since firms support more than one bus

Bus Application SponsorUser*

*Source: ISA, Jim Pinto (1999)

**European market in 2002: 199 Mio USD, 16.6 % increase (Profibus: 1/3 market share)**Source: Elektronik, Heft 7 2002

NTUEE-RTCS31-RTComm-33Feng-Li Lian © 2010Worldwide most popular field busses

Criterion WorldFIP CAN + LONTalk Seriplex ISP BITBUS

Perf. / Speed / Determinism Good Good Poor Medium Good Medium

Interoperability Good Medium Good Poor Good Medium

Cost and Tech. Leverage Medium Good Medium Poor Medium Medium

Product Availability Medium Good Good Medium Poor Good

Development and Impl. Cost Poor Good Medium Good Poor Good

Outlook Medium Good Good Good Medium Medium

Reliability Good Good Good Medium Good Good

Peer-to-Peer Capability Medium Good Good Poor Medium Poor

Memory Requirements Poor Good Medium Good Poor Medium

User Friend. / Tools Medium Medium Good Medium Medium Medium

Ownership Good Good Poor Poor Good Good

Instal. Base Sem. Mfg. / Proven Poor Medium Good Good Poor Good

Board Size Poor Good Medium Good Poor Good

Msg. Passing Capability Good Medium Good Poor Good Medium

Remaining Work Good Poor Good Poor Medium Medium

Table: Qualitative Candidate Analysis W.R.T. Selection Criteria(Selection criteria listed in order of importance)

Source: ANALYSIS OF SENSOR / ACTUATOR BUS INTEROPERABILITY STANDARD ALTERNATIVES FOR SEMICONDUCTOR MANUFACTURING James R. Moyne, Nader Najafi 1 , Daniel Judd 2 , and Allen Stock 3 University of Michigan, Center for Display Technology Manufacturing, Ann Arbor, MI 48109-2108, 1 IBM, 2 Arlington Laboratories, 3 SEMATECH / Advanced Micro Devices

NTUEE-RTCS31-RTComm-34Feng-Li Lian © 2010Worldwide most popular field busses

10

100

1000

10,000

10c 100 1000 10,000

Sensor BusSimple devicesLow costBus powered (?)Short messages (bits)Fixed configuration Not intrinsically safeTwisted pairMax distance 500m

Low Speed FieldbusProcess instruments, valvesMedium costBus-powered (2 wire)Messages: values, statusIntrinsically safeTwisted pair (reuse 4-20 mA)Max distance 1200m

High Speed FieldbusPLC, DCS, remote I/O, motors$$ Medium costNon bus poweredMessages: values, statusNot intrinsically safeShielded twisted pairMax distance 800m

Data NetworksWorkstations, robots, PCsHigher costNot bus powered Long messages (e-mail, files)Not intrinsically safeCoax cable, fiberMax distance miles

One bus type cannot serveall applications and all device types efficiently...

frame size(bytes)

NTUEE-RTCS31-RTComm-35Feng-Li Lian © 2010Research Issues in Network Systems

Architecture:– Information/System Network (Information)

> Throughput Analysis, Flow Control, Database Management

– Discrete-Event/Cell Network (Control)> Correct & Safe Operation, Logic Control

– Continuous-Variable/Device Network (Instrumentation)> Real-Time Control & Processing

Static Parameters:– Medium Length– Node Number– Data Rate

Dynamic Parameters:Performance:

03/25/04

NTUEE-RTCS31-RTComm-36Feng-Li Lian © 2010Research Issues in Network Systems

Architecture:Static Parameters:Dynamic Parameters:

– Message Connection– Medium Access Control

Performance:– Network QoS

> Throughput> Network Utilization> Network Efficiency> Network Stability

– Network Delay> Message Period> Delay Statistics

03/25/04

NTUEE-RTCS31-RTComm-37Feng-Li Lian © 2010Microprocessor & Interfacing of Networked Device

Interface between network and sensor/actuator

Sensor/actuator

Network

Data Link Layer

Controller

microprocessorApplication

Layer Program

DeviceNet network interface card

NTUEE-RTCS31-RTComm-38Feng-Li Lian © 2010Components of Time Delay

Physical Layer

Data Link Layer

Application Layer

Node A Node B

Tpre

TwaitTpost

Tpre

TwaitTpost

Ttx

Ttx

Physical Layer

Data Link Layer

Application Layer

• Total end-to-end delay is the sum of– Pre-processing time: microprocessor– Waiting time: network protocol - MAC– Transmission time: data rate & length– Post-processing time: microprocessor

Depend on network protocol

and loading

Depend on network protocol

and loading

NTUEE-RTCS31-RTComm-39Feng-Li Lian © 2010Industrial Networks

3 main types of Medium Access Control (MAC)

• Ethernet:– EIB, EtherNet/IP, LonWorks, Modbus/TCP

• Token Passing:– BACnet, ControlNet, FDDI, MAP, P-Net, Profibus, SP50, WorldFIP

• Priority Based:– CAN, DeviceNet, SDS, CANOpen, CAN-Kingdom

NTUEE-RTCS31-RTComm-40Feng-Li Lian © 2010

Carrier Sense Multiple Access / Collision Detection (CSMA/CD)

• listen busy wait

• listen idle send

• collision backoff

Backoff algorithm• standard binary exponential backoff

• max collision = 16

• potential for lost data

Ethernet

• Random time delays

NTUEE-RTCS31-RTComm-41Feng-Li Lian © 2010Ethernet

Hirschmann Network Systems: Distributed Communication Architecture 03/25/04

NTUEE-RTCS31-RTComm-42Feng-Li Lian © 2010

Concurrent Time Domain Multiple Access (CTDMA) / Implicit Token Passing Bus

• a token rotating around the logical ring

• every device can listen to the network

• without token wait

• with token send messages

1 4

2 3

Token-Passing: ControlNet

• Bounded time delays

NTUEE-RTCS31-RTComm-43Feng-Li Lian © 2010

Carrier Sense Multiple Access / Arbitration on Message Priority (CSMA/AMP)

• a bit-synchronized bus

• devices and messages have different priorities

• listen busy wait

• listen idle send

• collision low-priority node backoff,high-priority node keep on sending

1 3

2

Priority Based: DeviceNet

• Constant time delays