+ All Categories
Home > Documents > Applicability of ZigBee for Real-Time Networked Motor Control...

Applicability of ZigBee for Real-Time Networked Motor Control...

Date post: 10-Feb-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
4
International Conference on Control, Automation and Systems 2008 Oct. 14-17, 2008 in COEX, Seoul, Korea 1. INTRODUCTION A networked control system (NCS) is a feedback control system where information from the sensors and the controllers is sent over an electronic communication network [1], as shown in Fig. 1. NCSs offer reduced cost and relatively simple implementation, as well as greatly increased flexibility. Fig. 1 A block diagram of an NCS NCSs are not without their drawbacks. At best, communication networks can introduce nontrivial delays, but the network can also introduce nondeterministic elements such as time-varying random delays and packet loss. Additionally, the use of an electronic network requires the discretization of measurements as well as the control signal, and limited network capacity affects the ability of the system to use fast sampling frequencies. In this paper the wireless ZigBee network is used for real-time DC motor control. Going wireless has some obvious advantages; without cables we have a much greater freedom to physically distribute the nodes. It is possible to place actuators and sensors without worrying about the location of the control node. For example, it allows us to place the sensor and actuator on a mobile object and still run the controller from a stand-still platform. However, going wireless will also result in less dependable systems. The likelihood of a wireless link containing bit errors is several orders of magnitude larger than for a wired link. This means that the possibility of a message being corrupt or delayed due to retransmission is much larger. In [2], Nilsson analyzes several important features of NCSs. Nilsson’s work standardized a few basic assumptions, which are used throughout this work. First, sensors are always assumed to be time-driven, that is, the plant output is sampled periodically. Second, actuators are event-driven, and therefore apply control signals as soon as they are received. The actuator also holds the last received control signal until a new one is received. Finally, the controller is also event-driven, meaning that the control signal is calculated as soon as a sensor value is received. In following sections we describe ZigBee standard, its limitations and ways to overcome them, experimental system, controller design and method of play-back buffer, which removes variance in round-trip time (RTT) delay, thus enabling us to use predictive control designed for fixed time delay. Finally results of experiments and conclusion are presented. 2. ZIGBEE/IEEE 802.15.4 ZigBee is the name of a specification for a suite of high level communication protocols using small, low-power digital radios based on the IEEE 802.15.4 standard for wireless personal area networks (WPANs). ZigBee is designed for low-rate applications. The channel bandwidth in 2.4GHz radio band is 250kbps. The claimed throughput is 120kbps, but during experiments it was discovered that maximum throughput on given hardware is 80kbps, which is achieved by unidirectional sending of packets with maximum allowed payload without ACK (acknowledgment). However, for RTC (Real-Time Control) purposes the packets should be small (less lag due to smaller transmission time) and be sent bothway frequently. Experiments with two nodes sending packets of 5 and 4 bytes length to each other have shown up that packet interspace should be at least 25ms (control frequency 40Hz), i.e. achievable throughput is only 3.2kbps. More nodes we have, the lower is achievable control frequency rate (10Hz in case of 1 master and 3 slaves). ZigBee supports star, clustered tree and mesh networks. It is obvious, that for RTC of multiple slaves by single master only star network is appropriate, Applicability of ZigBee for Real-Time Networked Motor Control Systems Ulugbek R. Umirov 1 , Seong-Hyun Jeong and Jung-Il Park 2 1 Department of Electronic Engineering, Yeungnam University, Gyeongsan, Korea (Tel : +82-53-810-3927; E-mail: [email protected]) 2 (Tel : +82-53-810-2498; E-mail: [email protected]) Abstract: This paper discusses networked real-time control systems. The common network and ZigBee specific problems are discussed and methods to overcome them are explained. Limitations of ZigBee networks, sources of delay and benefits of broadcast mode over unicast mode for control loop time delay minimization are reviewed. It is explained how play-back buffer, originally used in multimedia play-back, can help to eliminate variance of loop time delay. To cope with achieved constant loop time delay the Smith predictor is used. Performance of control loop utilizing conventional PID controller, Smith predictor and play-back buffer is verified via experiments and proved to be efficient. Keywords: networked control, ZigBee, play-back buffer. 2937
Transcript
Page 1: Applicability of ZigBee for Real-Time Networked Motor Control …yu.ac.kr/~jipark/files/FE10-5.pdf · 2014-11-06 · ZigBee supports star, clustered tree and mesh networks. It is

International Conference on Control, Automation and Systems 2008 Oct. 14-17, 2008 in COEX, Seoul, Korea

1. INTRODUCTION

A networked control system (NCS) is a feedback control system where information from the sensors and the controllers is sent over an electronic communication network [1], as shown in Fig. 1. NCSs offer reduced cost and relatively simple implementation, as well as greatly increased flexibility.

Fig. 1 A block diagram of an NCS

NCSs are not without their drawbacks. At best, communication networks can introduce nontrivial delays, but the network can also introduce nondeterministic elements such as time-varying random delays and packet loss. Additionally, the use of an electronic network requires the discretization of measurements as well as the control signal, and limited network capacity affects the ability of the system to use fast sampling frequencies.

In this paper the wireless ZigBee network is used for real-time DC motor control. Going wireless has some obvious advantages; without cables we have a much greater freedom to physically distribute the nodes. It is possible to place actuators and sensors without worrying about the location of the control node. For example, it allows us to place the sensor and actuator on a mobile object and still run the controller from a stand-still platform. However, going wireless will also result in less dependable systems. The likelihood of a wireless link containing bit errors is several orders of magnitude larger than for a wired link. This means that the possibility of a message being corrupt or delayed due to retransmission is much larger.

In [2], Nilsson analyzes several important features of NCSs. Nilsson’s work standardized a few basic assumptions, which are used throughout this work. First,

sensors are always assumed to be time-driven, that is, the plant output is sampled periodically. Second, actuators are event-driven, and therefore apply control signals as soon as they are received. The actuator also holds the last received control signal until a new one is received. Finally, the controller is also event-driven, meaning that the control signal is calculated as soon as a sensor value is received.

In following sections we describe ZigBee standard, its limitations and ways to overcome them, experimental system, controller design and method of play-back buffer, which removes variance in round-trip time (RTT) delay, thus enabling us to use predictive control designed for fixed time delay. Finally results of experiments and conclusion are presented.

2. ZIGBEE/IEEE 802.15.4

ZigBee is the name of a specification for a suite of high level communication protocols using small, low-power digital radios based on the IEEE 802.15.4 standard for wireless personal area networks (WPANs).

ZigBee is designed for low-rate applications. The channel bandwidth in 2.4GHz radio band is 250kbps. The claimed throughput is 120kbps, but during experiments it was discovered that maximum throughput on given hardware is 80kbps, which is achieved by unidirectional sending of packets with maximum allowed payload without ACK (acknowledgment). However, for RTC (Real-Time Control) purposes the packets should be small (less lag due to smaller transmission time) and be sent bothway frequently. Experiments with two nodes sending packets of 5 and 4 bytes length to each other have shown up that packet interspace should be at least 25ms (control frequency 40Hz), i.e. achievable throughput is only 3.2kbps. More nodes we have, the lower is achievable control frequency rate (10Hz in case of 1 master and 3 slaves).

ZigBee supports star, clustered tree and mesh networks. It is obvious, that for RTC of multiple slaves by single master only star network is appropriate,

Applicability of ZigBee for Real-Time Networked Motor Control Systems Ulugbek R. Umirov1, Seong-Hyun Jeong and Jung-Il Park2

1 Department of Electronic Engineering, Yeungnam University, Gyeongsan, Korea (Tel : +82-53-810-3927; E-mail: [email protected])

2 (Tel : +82-53-810-2498; E-mail: [email protected])

Abstract: This paper discusses networked real-time control systems. The common network and ZigBee specific problems are discussed and methods to overcome them are explained. Limitations of ZigBee networks, sources of delay and benefits of broadcast mode over unicast mode for control loop time delay minimization are reviewed. It is explained how play-back buffer, originally used in multimedia play-back, can help to eliminate variance of loop time delay. To cope with achieved constant loop time delay the Smith predictor is used. Performance of control loop utilizing conventional PID controller, Smith predictor and play-back buffer is verified via experiments and proved to be efficient. Keywords: networked control, ZigBee, play-back buffer.

2937

Page 2: Applicability of ZigBee for Real-Time Networked Motor Control …yu.ac.kr/~jipark/files/FE10-5.pdf · 2014-11-06 · ZigBee supports star, clustered tree and mesh networks. It is

because each hop retransmission in clustered tree and mesh networks increases packet delay, negatively impacting on control performance. Average measured hop-to-hop time delay is 20ms, giving average RTT 40ms. In fact, in not congested network the RTT varies uniformly between 30 and 50ms.

In RTC process packets are sent continually, thus packet loss is acceptable and retransmissions are not required, moreover retransmissions are undesirable, because they introduce additional lag. ZigBee allows us to disable ACK mechanism for that purpose. By disabling ACK we do not only minimize lag, but also save channel throughput. However, some vendors’ ZigBee modules do not allow ACK disabling for unicast packets, then we can use broadcast packets, which do not cause ACK by design.

Main goal of ZigBee is low-power consumption. For lag minimization, sleeping has to be turned off on all nodes.

ZigBee defines GTS (Guaranteed Time Slot) feature for real-time purposes, but most of vendors do not implement this feature, as in case of our hardware.

3. DESIGN OF NCS

3.1 Setup of NCS

The distributed control configuration is shown in Fig. 1. The feedback loop consists of three parts: the sensor, the controller and the actuator. The sensor node is time-driven while the controller and actuator are event-driven. The sensor samples the process periodically and sends the measurement values to the controller. Upon receipt, the controller calculates a new control signal and sends it to actuator node which outputs the value. In our setup, the sensor node and actuator node are located in the same hardware unit, called the Remote I/O.

The implementation structure of networked control system is shown in Fig. 2. MaxStream XBee/XBee 2 ZigBee modules are used and connected to PC and Remote I/O via RS-232 link at 115kbps baudrate. API (Application Programming Interface) frames are used to control configuration and communication of modules. Remote I/O is based on AVR ATMega128 MCU with PWM controlled DC motor driver.

Fig. 2 NCS implementation structure

3.2. DC Motor Controller

The DC motor model is derived during experiment, and has the form of first-order transfer function, where input is torque, and output is angular velocity.

1501450)(+

=s

sGm (1)

Encoder is used in the role of sensor, thus the plant has integrator block added to the motor block as shown in Fig. 3.

s1

1501450+s

ω αT

Fig. 3 Plant model: T – torque, ω – angular velocity, α – output angle.

To cope with loop delay Smith predictor [3] is used, which structure is shown in Fig. 4. The quick, easy way to understand the controller is to assume that the plant model is perfect, i.e., G’(s)=G(s), and ignore the feedback from the plant and the feedback from the delayed plant model. Then, we can see that the control signal, u, will be the same control signal sent to the plant as if it were controlled in a closed loop without delay. This means that the controller can be designed for the delay-free system, and therefore can have a much more aggressive response. However, because the plant model is not always perfect, the error signal must also include feedback from the plant. The feedback from the plant must be compared to the output of the model, and because the plant has delay, the feedback from the model must also include that delay.

( )sGc ( )sG

( )sGm

u y

Fig. 4 Smith predictor

For NCSs, while a good plant model may be available, the delays in the loop are time-varying and random. This presents a significant problem for the Smith predictor, as differences between the delay in the plant loop and the model of the delay in the controller can degrade performance and destabilize the system.

3.3. Coping with Varying Delays

Control schemes designed to compensate for a constant loop delay are easily destabilized by loop delays which are not equal to the modelled delay, and therefore can perform very poorly when the loop delay is time varying. Of course, if the delays are known in advance, the predictive control scheme can adjust

2938

Page 3: Applicability of ZigBee for Real-Time Networked Motor Control …yu.ac.kr/~jipark/files/FE10-5.pdf · 2014-11-06 · ZigBee supports star, clustered tree and mesh networks. It is

accordingly, but in NCSs, the delays are typically random. A play-back buffer at the actuator can be designed to hold a control signal and apply it only after a specified amount of time has passed. Thus, the delay in the loop is reshaped to be more deterministic, but the delay must be increased for this to happen, a potentially costly drawback.

Play-back buffers were originally designed for multimedia play-back [4]. In [5], Liberatore proposed an algorithm to integrate a play-back buffer with networked control for the control algorithm, actuator and sensor. The main feature is a play-back actuator which delays the application of a control signal until a specified play-back time is reached. If control signal is arrived after specified play-back time, it is dropped, thus play-back time has to be chosen carefully.

The structure of system with play-back buffering is represented in Fig. 5.

Fig. 5 Remote I/O with play-back buffer

For an example of the effects of play-back buffering, see Fig. 6. The f(t) is function sampled by level and sent over the network, thus giving us fd(t) function, which is delayed version of original one.

( )tf( )tf d

t t

( )tf( )tf d

Fig. 6 An example of the effects of play-back buffering.

In Fig. 6 the continuous-time signal to be sampled is solid line. The left plot shows the delayed signal without play-back buffering. The plot on the right shows the delayed signal using play-back buffering, removing the uncertainty in the delay.

The play-back time is chosen to remove much of the variation in the loop time delay, which makes the application of the control signal more predictable. As we mentioned before, in non-congested ZigBee network the RTT varies between 30 and 50 ms, thus we select 50 ms as play-back time for all experiments described in next section.

4. EXPERIMENTS

In order to verify effectiveness of Smith predictor and play-back buffer we performed several experiments on system using single DC motor and 3 DC motors. As controller the conventional PI controller is used. Smith predictor’s prediction time is set to 50ms, same as play-back buffer. All experiments use step-function for reference angle. The step is equal to π/2 rad.

4.1 Single Remote I/O

As we mentioned before, in case of single Remote I/O (2 nodes in network) the maximum achievable control frequency is 40Hz (Ts=25ms). PI controller uses Kp=10 and Ki=0.1 gains. It is shown in Fig. 7, that utilization of only PI controller causes oscillations of motor shaft. Fig. 8 represents results of experiment utilizing predictor and play-back buffer. As we can see, the oscillations are eliminated in that case.

Fig. 7 Single Remote I/O, Ts=25ms, Only PI Controller

Fig. 8 Single Remote I/O, Ts=25ms, PI Controller + Smith predictor + Play-back buffer

4.2 Multiple Remote I/O

A number of experiments have been done on system with 3 Remote I/O. In case of 3 Remote I/O the achievable control frequency is only 10Hz (Ts=100ms), otherwise the network is congested and most of packets are lost. In first experiment we used the same gains for PI controller as we used for experiment with Ts=25ms, i.e. Kp=10 and Ki=0.1. The results are shown in Fig. 9

-0.2

0.3

0.8

1.3

1.8

0 1 2 3 4 5 6 7 8 9 10

angl

e (r

ad)

time (s)

angle

reference

-0.2

0.3

0.8

1.3

1.8

0 1 2 3 4 5 6 7 8 9 10

angl

e (r

ad)

time (s)

anglereference

2939

Page 4: Applicability of ZigBee for Real-Time Networked Motor Control …yu.ac.kr/~jipark/files/FE10-5.pdf · 2014-11-06 · ZigBee supports star, clustered tree and mesh networks. It is

and Fig. 10, which demonstrate identical behavior to Fig. 7 and Fig. 8.

Fig. 9 Multiple Remote I/O, Ts=100ms, Only PI Controller

Fig. 10 Multiple Remote I/O, Ts=100ms, PI Controller + Smith predictor + Play-back buffer

Another experiment has been done for only PI controlled system with lower Kp=2 gain, to verify whether it is possible to eliminate oscillations in that case. As Fig. 11 demonstrates, the oscillations are eliminated; however the raising time is obviously increased, what is undesirable.

Fig. 11 Multiple Remote I/O, Ts=100ms, Only PI Controller, Kp=2, Ki=0.1

From results of experiments we can say definitely that Smith predictor together with play-back buffer efficiently copes with variable network delay.

5. CONCLUSION

The problems of common and ZigBee networks and their solution are discussed. Also the common problem of variable time delay in networked control loop is discussed in this paper and play-back buffer solution is verified. It is verified that play-back buffering and model predictive control for constant time delay together give satisfactory results.

However ZigBee’s original purpose is low-rate low-power applications, it was not designed with real-time control in mind. The satisfactory results of experiments were achieved by aggressive optimization of packets structure, decreasing their size to minimum reachable level – 4 bytes for control packet and 5 bytes for information packet. Even in case of such extreme optimization the only reachable control frequency is 40Hz, which is not appropriate for many RTC problems.

As far as only star network is appropriate for wireless control purposes, i.e. mesh networking capabilities of ZigBee standard are not used, utilization of pure 802.15.4 standard could be the better approach.

ACKNOWLEDGEMENT

This research was supported by the Center for Embedded Software Technology research grants in 2007.

REFERENCES

[1] D. Hristu-Varsakelis and W. S. Levine, editors. Handbook of Networked and Embedded Control Systems. Springer Verilag, 2005.

[2] J. Nillson, “Real-Time Control Systems with Delays”. PhD thesis, Department of Automatic Control. Lund Institute of Technology, 1998.

[3] O. J. M. Smith. “Closer control of loops with deadtime,” Chemical Engineering Progress, 1957.

[4] L. L. Peterson and B. S. Davie, Computer Networks, Morgan Kaufman, 2000.

[5] V. Liberatore, “Integrated play-back, sensing, and networked control,” IEEE Infocom, 2006.

-0.2

0.3

0.8

1.3

1.8

0 1 2 3 4 5 6 7 8 9 10

angl

e (r

ad)

time (s)

angle

reference

-0.2

0.3

0.8

1.3

1.8

0 1 2 3 4 5 6 7 8 9 10

angl

e (r

ad)

time (s)

angle

reference

-0.2

0.3

0.8

1.3

1.8

0 1 2 3 4 5 6 7 8 9 10

angl

e (r

ad)

time (s)

angle

reference

2940


Recommended