Systems and Smart Design - UNR€¦ · III. SMARTNODESBASEDONARMPROCESSOR S3C44B0,AT91SAM7series...

5
Proceedings of the 2007 IEEE International Conference on SunE02 Networking, Sensing and Control, London, UK, 15-17 April 2007 Embedded Ethernet Control Systems and Smart Node Design Method Li Ju-Guang, Zhang Hua Abstract-In this paper, we discusses a new networked con- systems. Although the token-passing network is efficient and trol systems (NCS), embedded Ethernet control system (EECS). deterministic, at low network traffic its performance is not Compared with traditional NCS, EECS has many different satisfied. In general, when there are many nodes in one features. Network nodes of EECS are often not PCs and . . ' workstations, but smart controllers with sensors and actuators logic ring, a large percentage of the network tme is used based on cost-effective high-performance micro-controller solu- in passing the token between nodes when data traffic is tion for embedded systems, which can run complex embedded light. CAN is a deterministic network also, which protocol operating systems and advanced control algorithms. General optimized for short messages. The messages have different design methods of smart nodes based on ARM micro-controller priority, and higher priority messages always gain access to for EECS are emphasized. As an example, we designed a smart the network. Therefore, the transmission delay for higher node for EECS. An embedded operating system (EOS) Linux, which is a stable, open source and free operating system, is priority messages can be guaranteed. But, compared with used in this smart node to realize real-time control and high- the other networks, CAN is the slow data rate (maximum speed data acquisition based on EECS. Experimental results of 500Kb/s). Thus the system's throughput is limited. At the show that the system is effective and reliable. same time, the bit-synchronization requirement of the CAN I. INTRODUCTION protocol also limits the maximum length of a network. The defining characteristic of networked control systems (NCS) is having one or more control loops closed via a serial communication channel [1]. NCS provide several advantages Rl*T:"1 F.t such as small volume of wiring, ease of system diagnosis and maintenance, and distributed processing. Especially with respect to manufacturing systems, NCS architectures that 1 1 utilize processing power at each node allow for the mod- A ularization of functionality and standard interface for inter- a EJ.i changeability and interoperability [1]. NCS use a common :1!! communication backbone to connect sensors, actuators, and r -, controller. Fig.1 illustrates a typical setup and information flows of an NCS [2]. Unfortunately, the insertion of com- munication network in the feedback control loop makes the F analysis and design of a NCS complex, traditional control Ethernet uses the CSMAICD mechanism for resolving theories with many ideal assumptions must be reevaluated contention on the communication medium. When a node before they can be applied to NCS. The most important issue wants to transmit messages, it listens to the network. If the is the network-induced times delay, which can degrade the network is busy, it waits until the network is idle; otherwise it performance of control systems designed without considering transmits immediately. If two or more nodes listen to the idle it and can even destabilize the system. At the same time, the network and decide to transmit simultaneously, the messages network is not a reliable transmission path; some packets not of these transmittin nodes collide and the messages are only suffer transmission delay but, even worse, can be lost . g . .. .. ' . ' ........ ~corrupted. While transmitting, a node must also listen to during transmission. This is unacceptable in many control detect a message collision. On detecting a collision between systems, especially in real time control systems. two or more messages, a transmitting node stops transmitting In the last decade, many different network types have and waits a random length of time to retry its transmission. been promoted for use in control systems, such as Ethernet,' Ethernet uses a simple algorithm for operation of the network token-passing network, and controller area network (CAN). and has almost no time delay at low networks loads because Meanwhile, token-passing network is a deterministic net- of low medium access overhead [3]. No communication work because the maximum waiting time before sending a milIcnGi fnmi rn h- bnrrt-rizitl v bi-tnci- rtntnn bandwidth is used to gain access to the network compared mesagefrae an e carateize bythetoen otaio with the token bus or token ring protocol. Most of all, time ths fetur mae itbe uitble sedin ime-ritcal Ethernet used so widely that there are lots of network devices Li Ju-Guang is with Southwest University of Science and Technology, support it and many manufacturers work for it. Ethernet used China and with Institute of Automation, Chinese Academy of Sciences, as a control network commonly uses the 1l0Mb/s standard. In China. Zhang Hua is with Southwest University of Science and Technology, recent years, a high-speed (100Mb/s or even lGb/s) Ethernet, China. which is mainly used in data networks, is induced to control 1-4244-1076-2/07/$25.00 ©2007 IEEE 42

Transcript of Systems and Smart Design - UNR€¦ · III. SMARTNODESBASEDONARMPROCESSOR S3C44B0,AT91SAM7series...

Page 1: Systems and Smart Design - UNR€¦ · III. SMARTNODESBASEDONARMPROCESSOR S3C44B0,AT91SAM7series canbeworkedat from50MHz DESIGNMETHOD to 75MHz, and processors based on ARM9 core such

Proceedings of the 2007 IEEE International Conference on SunE02Networking, Sensing and Control, London, UK, 15-17 April 2007

Embedded Ethernet Control Systems and Smart Node Design Method

Li Ju-Guang, Zhang Hua

Abstract-In this paper, we discusses a new networked con- systems. Although the token-passing network is efficient andtrol systems (NCS), embedded Ethernet control system (EECS). deterministic, at low network traffic its performance is notCompared with traditional NCS, EECS has many different satisfied. In general, when there are many nodes in onefeatures. Network nodes of EECS are often not PCs and . . 'workstations, but smart controllers with sensors and actuators logic ring, a large percentage of the network tme is usedbased on cost-effective high-performance micro-controller solu- in passing the token between nodes when data traffic istion for embedded systems, which can run complex embedded light. CAN is a deterministic network also, which protocoloperating systems and advanced control algorithms. General optimized for short messages. The messages have differentdesign methods of smart nodes based on ARM micro-controller priority, and higher priority messages always gain access tofor EECS are emphasized. As an example, we designed a smart the network. Therefore, the transmission delay for highernode for EECS. An embedded operating system (EOS) Linux,which is a stable, open source and free operating system, is priority messages can be guaranteed. But, compared withused in this smart node to realize real-time control and high- the other networks, CAN is the slow data rate (maximumspeed data acquisition based on EECS. Experimental results of 500Kb/s). Thus the system's throughput is limited. At theshow that the system is effective and reliable. same time, the bit-synchronization requirement of the CAN

I. INTRODUCTION protocol also limits the maximum length of a network.The defining characteristic of networked control systems

(NCS) is having one or more control loops closed via a serialcommunication channel [1]. NCS provide several advantages Rl*T:"1 F.tsuch as small volume of wiring, ease of system diagnosisand maintenance, and distributed processing. Especially withrespect to manufacturing systems, NCS architectures that 1 1utilize processing power at each node allow for the mod- Aularization of functionality and standard interface for inter- a EJ.ichangeability and interoperability [1]. NCS use a common :1!!communication backbone to connect sensors, actuators, and r -,controller. Fig.1 illustrates a typical setup and informationflows of an NCS [2]. Unfortunately, the insertion of com-munication network in the feedback control loop makes the Fanalysis and design of a NCS complex, traditional control Ethernet uses the CSMAICD mechanism for resolvingtheories with many ideal assumptions must be reevaluated

contention on the communication medium. When a nodebefore they can be applied to NCS. The most important issuewants to transmit messages, it listens to the network. If theis the network-induced times delay, which can degrade the network is busy, it waits until the network is idle; otherwise it

performance of control systems designed without considering transmits immediately. If two or more nodes listen to the idleit and can even destabilize the system. At the same time, the network and decide to transmit simultaneously, the messagesnetwork is not a reliable transmission path; some packets not of these transmittin nodes collide and the messages areonly suffer transmission delay but, even worse, can be lost .

g... .. ' . ' ........ ~corrupted. While transmitting, a node must also listen toduring transmission. This is unacceptable in many controldetect a message collision. On detecting a collision betweensystems, especially in real time control systems. two or more messages, a transmitting node stops transmittingIn the last decade, many different network types have and waits a random length of time to retry its transmission.

been promoted for use in control systems, such as Ethernet,' Ethernet uses a simple algorithm for operation of the networktoken-passing network, and controller area network (CAN). and has almost no time delay at low networks loads becauseMeanwhile, token-passing network is a deterministic net- of low medium access overhead [3]. No communicationwork because the maximum waiting time before sending a

milIcnGi fnmirn h- bnrrt-rizitl v bi-tnci- rtntnnbandwidth is used to gain access to the network comparedmesagefrae an e carateize bythetoen otaio with the token bus or token ring protocol. Most of all,

time ths feturmae itbe uitble sedin ime-ritcal Ethernet used so widely that there are lots of network devicesLi Ju-Guang is with Southwest University of Science and Technology, support it and many manufacturers work for it. Ethernet used

China and with Institute of Automation, Chinese Academy of Sciences, as a control network commonly uses the 1l0Mb/s standard. InChina.

Zhang Hua is with Southwest University of Science and Technology, recent years, a high-speed (100Mb/s or even lGb/s) Ethernet,China. which is mainly used in data networks, is induced to control

1-4244-1076-2/07/$25.00 ©2007 IEEE 42

Page 2: Systems and Smart Design - UNR€¦ · III. SMARTNODESBASEDONARMPROCESSOR S3C44B0,AT91SAM7series canbeworkedat from50MHz DESIGNMETHOD to 75MHz, and processors based on ARM9 core such

network gradually. controllers through the Ethernet. Then, controller carries outHowever, Ethernet is a non-deterministic protocol and its control-law computation and gets output. The output sent

does not support any message prioritization. At high network to the actuator through the Ethernet again. In this kind ofloads, messages collisions are a major problem because they Ethernet control systems, smart sensors and smart actuatorsgreatly affect data throughput and time delay, which may be can only provide an Ethernet interface and cannot carryunbounded [3]. So Ethernet often not considered as control out control-law. Time delay or even message loss inducednetworks, but as data networks. in systems and degraded systems performance because of

this working way. Fig.3 illustrates a typical Ethernet controlII. EMBEDDED ETHERNET CONTROL SYSTEMS system.As we know, all networks can be classified data net-

works or control networks, depending on the informationexchanged. Large data packets, infrequent burst transmis- <sion, and high data rates characterize data networks, which -generally do not have time constraints. Control networks,

14 ' *.in contrast, must transmit lots of small but frequent packetsamong a relatively large set of nodes to meet the time-criticalrequirements. The key element that distinguishes controlnetworks from data networks is the capability to support real-netimorkstime-rtical apito.ns. Fig. 3. A typical Ethernet Control System setup and information flows.time or time-critical applications.

Ethernet is designed to using for data networks. Becauseof its fast, simple and widely available, Ethernet is the Embedded Ethernet Control System (EECS) has samemost popularly used network nowadays. Ethernet meets the Ethernet architecture. But its nodes are not simple sensorsIEEE 802.3 standard, in which the media access is random, or simple actuators that can only provided a simple Ethernetsince it is for a CSMA/CD LAN. This property leads to interface. Each node in Embedded Ethernet has a cost-the unpredictable time delay when transmitting message effective high-performance micro-controller for embeddedon the network. Therefore, Ethernet is often considered to systems such ARM, MIPS and PowerPC. Hard real-timeinappropriate for control systems, especially for hard real- Embedded Operating Systems (EOS) like RTLinux, Vxworkstime control systems. However, the advantages of Ethernet can be run on the node. At the same time, advanced controljustify the need to make it suitable for control systems, even algorithms can be run on this node. So each node can treathard real-time applications. sensor information and can control actuator directly. That is

General Ethernet, We also called it data Ethernet, is to say, some control information that has time constraints,based on PCs and workstations that run lots of non real- does not need to transmit through the Ethernet, and maketime applications such as our editor and network browser. the network load light. Fig.4 illustrates Embedded EthernetThere are mass messages such as pictures, music and video control network setup and information flows.files to transmit on the network. Ethernet is a CSMA/CD In EECS, each node acts as a controller and runs controlLAN. The more messages transmit on the network, the more algorithms. PCs or workstations act only as a console orprobability brings the collision and time delay. But, as we monitor terminal. The message which has real-time require-mentioned before, these non real-time applications have no ments transmitted through Ethernet is greatly decreased bytime constraints. Fig.2 illustrates a typical data Ethernet. this way, and the timing constraints of control can be ensured

through the embedded real-time operating system running onK a. XOr node. The message transmission through the Ethernet is the

... sr]dtin non-control information and has not the timing constraints.From the discussion we can see that Embedded Ethernet

can be used to control systems and can get satisfied perfor-mance, even these systems have hard real-time requirements.

Fig..2. A typicaldataEther sp ad i o floK__ ____ o_r Kcl

Whe Etere use as coto newok it noe are :o:il= ll

often not PCs or workstations, but embedded devices such Fig. 4. A typical Embedded Ethernet control system setup and informationas controllers, smart sensors and smart actuators. The sensor flows.measure state of the plant and send this information to

43

Page 3: Systems and Smart Design - UNR€¦ · III. SMARTNODESBASEDONARMPROCESSOR S3C44B0,AT91SAM7series canbeworkedat from50MHz DESIGNMETHOD to 75MHz, and processors based on ARM9 core such

III. SMART NODES BASED ON ARM PROCESSOR S3C44B0, AT91SAM7 series can be worked at from 50MHzDESIGN METHOD to 75MHz, and processors based on ARM9 core such

In a traditional Ethernet control systems, smart sensors as S3C2410, EP93XX, AT91RM9200 can be worked atand actuators can only provide a simple Ethernet interface 200MHz or more. Because of this reason, the system designbecause of the performance limitation of MPU. In an EECS, based on ARM processors need to consider some issueseach node must have enough process abilities and memo- such as electronic parts selection, PCB wiring, treatment ofries to run complex tasks such as EOS, advanced control power and ground. Otherwise the system cannot work well,algorithms and TCP/IP protocol stack. especially in rigorous industrial environments.As the rapid growth of semiconductor technology, more The second issue is system bus interface design. As

performance 32-bit embedded microprocessors are used to we mentioned before, ARM processor has very low powercontrol systems in recent years. Meanwhile, ARM embedded consumption. This lead to system bus load ability weak.processor is occupying the most market share because of However, the embedded systems based on ARM processorsits high-performance and cost-effective RISC architecture. are often very complex and have more peripheral devices.ARM processor is a complete system-on-chip built around The system bus need to have strong load ability and can drivethe ARM core. Generally, it incorporates a rich set system these devices. Hence, the system bus load ability should beand application peripherals and standard interface in order to enhanced in system design.provide a single-chip solution for a wide range of compute- The last issue is embedded operating system and ap-intensive applications that require maximum functionality plication development on it. The systems based on ARMat minimum power consumption at lowest cost, especially processors can address 4GB memories for ARM processor'sin embedded control applications. At present, more and 32-bit architecture in theoretically. In general, the systemsmore embedded control node designs do not based on based on ARM processors have more physical memoriestraditional 8-bit processors (such as MCS51 architecture), than traditional systems and reach to dozens of MB inbut ARM processors. However, ARM processors have more quantitatively. Such mass memories and high performancerapid system clock and complex core architecture, which processor can support to run complex EOS completely.make the smart node design based ARM processors have The EOS can provide some advantages such as multi tasksmore difficult than traditional 8-bit processors, especially in synchronization running, hardware layer abstraction, codeinterface design between CPU and devices such as ADC, modularization, application interface unification and networkDAC etc. Furthermore, smart nodes used to EECS's always protocol stack supporting, and can realize more complex em-need to run complex embedded operating system, which bedded applications. However, just because of these advan-make the programming methods different from traditional tages, the software programming on operating systems hassystem completely. many different features compared with traditional systems.

In this section, we discuss the system design differ- The following sections we design an embedded smartence between based on ARM processors and traditional node based on a concrete ARM processor (AT91RM9200).processors from hardware design and software design, and It includes mass memories, DI, DO, ADC, DAC and highdesign a smart node based on a concrete ARM processor, speed (lOMbps/l00Mbps adaptive) Ethernet interface, andAT91RM9200. The smart node includes mass memories, DI, very suitable used to Embedded Ethernet control systems.DO, ADC, DAC and high speed (lOMbps/l00Mbps adaptive)Ethernet interface, and very suitable used to EECS's. B. Hardware architecture design of Smart Node

A. Performance ofARM processor and system design method As an example, we design an embedded smart node basedARM processor is an ideal hardware platform of complex on AT91RM9200 ARM processor. The smart node consists

embedded applications because of its cost-effective, high- of some parts such as ARM processor, memories (SDRAMperformance, low-power consumption characters. But, the and Flash), and other devices (Ethernet PHY, DAC, ADC,system design methods based on ARM processors have great DI/DO, etc). Fig.5 illustrates the architecture of smart node.difference compared with traditional processors. There are The main processor is AT91RM9200. It is built aroundthree main issues should be considered in system design. an outstanding ARM920T RISC CPU core, which is a low-

Firstly, the working frequencies of ARM processors are power consumption, general-purpose microprocessor. Thefaster than traditional processors. Compared with tradi- most important peripheral function is an embedded Ethernettional processors which working frequencies often less than controller, which can provide high performance Ethernet10MHz, ARM processors based on ARM7 core such as interface with very low system cost [4].

44

Page 4: Systems and Smart Design - UNR€¦ · III. SMARTNODESBASEDONARMPROCESSOR S3C44B0,AT91SAM7series canbeworkedat from50MHz DESIGNMETHOD to 75MHz, and processors based on ARM9 core such

IV. EMBEDDED OPERATING SYSTEMS (EOS)RUNNING ON SMART NODES

The important difference between systems based on ARMprocessor and traditional embedded CPU is the system's soft-

A MWlsliWiware structure and programming method. As we mentioned

[D 1 1 < . , ,, 0nbefore sections, because of process abilities and memory lim-itation, the software structure based on traditional embedded

U70A="A AN =CPU often use a simple loop and some interrupt routines,and this software structure can only implement comparativeordinary tasks. Especially, such software structure cannotmeet the multi tasks system requirements.

EOS's can resolve these problems easily. They providesome advantages such as real-time multitasking scheduling,hardware layer abstraction, code modularization, applicationinterface unification and network protocol stack supporting,and very suitable used on complex embedded applications.However, EOS's provide such advantages but need to con-siderable system cost. The systems based on 32-bit ARMprocessors can support to run complex EOS's very well etherits process ability or memory capability.

Fig. 5. The hardware architecture of smart node used to EECS It is very important issue for system design to selectsuitable EOS's. At present, the main EOS's can be groupedto two types. One is commercial EOS's, such as WinCE,Vxworks and QNX, which developed by some famous

System memories include SDRAM and Flash. Flash is companies and have perfect performance and good service.But the commercial EOS's often expensive and don't opena kind of memory based on ROM technology and used to. ..source code, which limited its application because contra-

storage program code (including EOS and applications) when vee wihcsoiaino meddsses h te., , ~~vened with customization of embedded systems. The othersystem in static. SDRAM is a kind of volatile memory, but is non-commercial EOS's such as Linux/uCLinux, eCOS andits access speed faster than Flash. When system power up, uC/OS II. They have some advantages like open source,it boot from Flash and then copy the code to SDRAM. favorable user customization, and have more application.After this, PC pointer jump to SDRAM and the code can We use Linux in this smart node design. It is a stability,be run in very high speed. In this smart node, we design

4MBFash,nd sch mas memries superior network capability, and excellent file system support32MB SDRAM and . OS perfect for embedded systems. Such advantages, cooper-can support complex EOS running in it absolutely. ating with the ARM processor, guarantee the efficient workThe smart node also includes high speed, high precision of smart node.

ADC and DAC, which are indispensable parts in data acqui-sition and control systems. In order to meet the requirements V. CONCLUSIONof control systems, a 12-bit ADC (ADC1674) and a 16-bit This article analyzed the main problem in typical Ether-DAC (DAC712) be used to this smart node. net control system: network-induced time delay. The main

Ethernet PHY provides a direct interface either to UTP5 reason of time delay in typical Ethernet control systems is

for 100BASE-TX fast Ethernet, or UTP5/UTP3 cable for disadvantage of traditional network architecture and designIOBASE-T Ethernet on the media side. Through the Media of network node. Up to now, there is no way to resolve the

Independent Interface (MII), it connects to the Media Access network-induced time delay completely. We propose a new

Control (MAC) layer (Note that AT9 1RM9200 not embed a NCS architecture EECS and smart node structure based on

completeEthertinterface but only a MAC). high-performance and cost-effective ARM processors, andresolve this problem well.

DI/DO interface provide digital information input or out- We setup an experimental EECS based on smart node weput channel for smart node. designed. Experiments and analysis show that EECS has

45

Page 5: Systems and Smart Design - UNR€¦ · III. SMARTNODESBASEDONARMPROCESSOR S3C44B0,AT91SAM7series canbeworkedat from50MHz DESIGNMETHOD to 75MHz, and processors based on ARM9 core such

a good time performance and meets the requirements ofnetworked control systems.

REFERENCES

[1] Feng-Li Lian, James R.Moyne, and Dawn M.Tibury, "PerformanceEvaluation of Control Networks: Ethernet, ControlNet, and De-viceNet", IEEE Control Systems Magazine, pp. 66, February 2001.

[2] Wei Zhang, Michael S.Branicky, and Stephen M.Philips, "Stability ofNetworked Control Systems", IEEE Control Systems Magazine, pp.84, February 2001.

[3] J.D. Wheelis, "Process control communications: Token Bus,CSMA/CD, or Token Ring?" ISA Trans., vol.32, no.2, pp. 193-198,July 1993.

[4] ATMEL,"AT91RM9200 User Manual".

46