• 沒有找到結果。

Chapter 3 Robust NCS Design

3.4 Results

3.4.1 Simulation results

To verify the effectiveness of the proposed robust NCS design in real applications with significant time-varying delay, simulation results provided with the same sinusoidal command are analyzed for three different controllers: (1) PI controller, (2) PI with Smith predictor, and (3) PI with the adaptive Smith predictor. Due to the high gain of the encoder with 10000 P/R, coefficients of the PI controller are tuned as

0.0002

Kp  and Ki0.00001 to obtain satisfactory performance. Figure 3.7 shows that the PI-controlled system response becomes unstable as the delay time increases.

Furthermore, the delay compensation of Smith predictor with a fixed delay time as shown in Fig. 3.7 (b) is not suitable as the delay time shown in Fig. 3.7 (d) increases.

Moreover, the control performance of the adaptive Smith predictor as the delay time increases is much better than that of other methods as shown in Fig. 3.7 (c).

Moreover, the QFT controller obtained in Eqs. (3-9)-(3-10) is compared with the

shown in Fig. 3.8. Simulation results indicate that the NCS performance is not seriously affected by the small time-delay variations. However, results show that the QFT controller obtains better performance as significant variation of the time delay occurs under the external disturbance.

3.4.2 Experimental results

The proposed QFT integrated with the adaptive Smith predictor and with the on-line RTT estimator was further tested on the Panasonic AC 400W servo motor and on the TI DSP 2812 microcontroller. The position controlled motor is located in the client node. When the vacant sampling occurs, the previous data are held to continue the operation. When two data messages arrive at the same sampling period, only the most recent data message is adopted, and all the previous data are discarded. Fig. 3.9 shows experimental results under different network loads. The measured network delay time around 10 ms, 100 ms, and 200 ms are categorized as low, medium, and heavy traffic jam, respectively. Tracking errors of different controllers are shown in Fig.

3.10. It is clear that the proposed QFT controller renders a lower root mean square (RMS) compared with the PI controller under a heavy network load.

0 5 10 15

Fig. 3.7 Simulation sinusoidal responses of NCS for (a) PI controller, (b) PI + Smith predictor, and (c) PI + adaptive Smith predictor

0 5 10 15

Fig. 3.8 Responses of (a) PI and (b) QFT, both applying the adaptive Smith predictor (with 1J payload variation)

Fig. 3.9 Experimental results of the different controllers in heavy traffic load for (a) PI and (b) QFT

0 5 10 15

Fig. 3.11 Tracking errors with the adaptive Smith predictor under the external disturbance (1J) in high traffic load with (a) PI and (b) QFT

The experiments with an extra ring (0.34 kg‧cm²) attached to the motor (inertia of 0.36 kg‧cm²) as the external disturbance were tested as illustrated in Fig. 3.11, while the tracking errors are illustrated in Fig. 3.11(a) and Fig. 3.11(b). Experimental results indicate that the proposed QFT controller with the adaptive Smith predictor renders better control responses against the variations of inertia.

Table 3.2 Comparison of tracking performance (without external disturbance)

Network traffic load

As summarized in Table 3.2, control performance of all the different controllers is similar under a light traffic load with a relatively small network delay. As network delay increases, control performance of PI controller is degraded drastically. In

contrast, the QFT controller maintains its performance well. Under a high traffic load, experimental results demonstrate the robustness of the proposed QFT controller with the adaptive Smith predictor, as shown in Table 3.3.

Table 3.3 Comparison of tracking performance (with external disturbance)

Network traffic load

Low Median High

Controller Tracking error (RMS)

Average delay (ms)

Tracking error (RMS)

Average delay (ms)

Tracking error (RMS)

Average delay (ms)

PI +ASP 1.4667 12.5585 6.6000 94.6756 18.0667 188.004

QFT+ASP 5.6333 6.9912 4.0227 94.9469 6.1294 195.2883

3.5 Summary

(1) The proposed plant templates applying the QFT design are constructed by considering the network-delay variation in the phase and the external disturbance in the gain to achieve the robust NCS design.

(2) The QFT controller is more capable than the PI controller to deal with the bounded variation in the delay time with a stochastic nature, as shown in both simulation and experimental results.

(3) As the delay time becomes significant and unbounded, the designed robust NCS of QFT becomes unsuitable. Thus, an on-line delay estimator is proposed by including the adaptive Smith predictor to cope the unpredictable time delay on the network for remote control systems.

Chapter 4

Multi-rate Design for Wireless NCS

Industrial area networks generally provide short-distance applications in automation and manufacturing systems. To extend network-based applications to remote control systems, this study integrates the IEEE 802.11g ad-hoc wireless network and the control area network (CAN) as the hybrid networked control system (HNCS) by implementing a communication gateway between the two protocols. As network congestion of HNCS mainly occurs in the wireless system and its irregularly induced time delay seriously degrades its stability and performance, information of the wireless network time delay is crucial to the quality and stability of remote control systems. In this study, an on-line delay estimation algorithm with a short-window median filter is adopted for the adaptive Smith predictor in the HNCS design.

Moreover, the sampling rate is automatically switched according to the estimated delay time as network congestion occurs to render the reliable control performance of HNCS.

Analytical and experimental results have proven the feasibility of the present HNCS design to achieve a satisfactory remote control system under the serious time delay for the wireless network.

4.1 Design of the gateway for HNCS

Recently, the development of wireless NCS (WNCS) which reduces connection problems has attracted increasing attentions in the development of remote control systems and all sensors, actuators, and controllers are interconnected (Gast, 2002; Lian et al., 2001; Li, 2008). Moreover, the technology that integrates both commercial networks and industrial networks has resulted in easy maintenance and expendability for remote control systems (Sanchez et al., 2004; Yang et al., 2008). On the other hand, it has also led to time delays, data dropout, and package collision. Network time delays may be constant, bounded, stochastic, and even random or unpredictable depending on the network protocols and hardware. Basically, HNCS performance is inherently limited by its system sampling rate owing to the limited network bandwidth;

moreover, it may easily become unstable because of unpredictable network delays in

wireless communication, even with a robust control design. Therefore, the control design of HNCS in real applications should concern both time-invariant characteristics such as the plant dynamic model and the average time delay, and the time-varied characteristics such as the instantaneous time delay variation. To integrate different network protocols for an HNCS, the design of a gateway is required. A typical closed-loop NCS where the sensor and the actuator encounter different time delays induced in general network structures as shown in Fig. 4.1 and its real application in the present study is shown in Fig. 4.2. The transmission between the controller and its actuator input over a communication network introduces a command time delay t1 into HNCS, and t2 is the feedback delay time. The network time delay in fact includes the total transmission time of a message and the transformation time of the package. As shown in Fig. 4.1, the total time delay (round-trip time, RTT) can be explicitly expressed by the following:

1 2

t

RTT  

t t (4-1)

where t1tcommand1ttf1tcommand2 , t2tfeedback1ttf2tfeedback2

Fig. 4.1 The block diagram of HNCS

As shown in Figs. 4.2 (a) and (b), the present HNCS mainly comprises the remote node and the client node, and both nodes communicate with each other from a distance through the wireless network. The client node includes two parts; the first part is the gateway on a computer communication with the USBCAN, which is designed to

gateway is linked with TI TMS320F2812 DSP through the CAN network and the remote site is linked via the wireless network. The second part is the servo motor and its controller is implemented on TI TMS320F2812 DSP with a speed-control mode.

Finally, the data communication protocol adopts the transmission control protocol (TCP) to achieve the desirable position loop control for the guaranteed eventual delivery of packets (Cheng et al., 2007).

(a)

(b)

(c)

Fig. 4.2 Experimental setup (a) experimental platform, (b) diagram of HNCS , and (c) the HNCS block diagram

The communication network can be modeled as the time delay on the forward-command direction for actuators and on the feedback direction for sensors. As shown in Fig. 4.2 (c), t1 is the command delay time, t2 is the feedback delay time, and

G

c(s) is the controller. Gp(s) denotes the transfer function of the plant without the delay time. The transfer function from input R to output Y is obtained as follows:

1

1 2

( )

( ) ( ) ( )

( ) 1 ( ) ( )

t s

c p

t t s

c p

G s G s e Y s

R s G s G s e

 

 (4-2)

Fig. 4.3 The diagram block of the gateway between wireless 802.11g and CAN

4.1.1 The structure of the gateway

The CAN communication protocol is embedded in TI TMS320F2812 DSP and the data are transmitted to the remote node through the CAN bus and the wireless network with the TCP communication protocol. These two protocols, TCP and CAN, cannot communicate with each other directly, and thus message packages have to be processed through a gateway, as shown in Fig. 4.

3.

The block diagram of the proposed gateway is divided into four parts. The upper part accepts the CAN package from the CAN network, then this package is transferred through the wireless network; all packages are then sent to the remote site. The second part receives the TCP package from the wireless network and transfers the CAN package to the client with a DSP controller via the CAN network. The third part is the gateway management program which allows just one client to be connected through the communication channel at one time by sending the warning message to another node to avoid interference from other nodes. The fourth part is the operation interface for users, as shown in Fig. 4.3.

4.1.2 The procedure of the package transformation

In remote control systems, when data have to be transmitted to the client node with the CAN protocol, the type and transmission data in the data frame should be set up in advance. They are included in the CAN package transmitted to the gateway through the CAN network, as shown in Step 1 in Fig. 4.4. After the gateway receives the package from the CAN network, the data of the CAN package will be included in the TCP package, and the wireless network can thus be transmitted directly to the remote node as shown in Step 2. When the remote site has received the package from the wireless network, the message in the CAN package will be extracted from the TCP package, and the data defined by users can thus be obtained at the end of Step 3. The package transformation will analyze the data frame and follow the procedure (1) (2)

(3) to transmit the message to a remote node. When data have to be transmitted from the remote node, the inverse procedure is followed: (4) (5) (6), as shown in the left part of Fig. 4.4.

Fig. 4.4 The package transmission diagram

4.2 Analysis of time delay in HNCS

In general, the induced network time delay presents different characteristics depending on both the network hardware and protocols; moreover, it varies owing to network loading, scheduling policies, and the number of nodes. Research on HNCS is much more difficult than those on general delayed systems where the time delay is usually assumed to be constant or bounded. In this study, the total time delay in HNCS is categorized into three types as they occur at (1) the gateway node, (2) the network channel, and (3) the remote site. The summed time delay at each node actually includes

all the network node preprocessing time, the controller computation time, the encoding time, the waiting time, the total queuing time, and the blocking time (Lian et al., 2002).

The total time delay, also called the round-trip delay, is the required period for a packet to travel from the client node to the remote node and back to the original client node. The proposed networked control architecture combines both the time-driven and the event-driven processes and the typical NCS structure is the same as shown in Fig.

2.9(a).

4.2.1 Delay time analysis

The RTT is measured from the client node to the control center station through the gateway, and back to the original client node. In this experimental setup, a notebook computer with Intel® Pentium CPU 1.60 GHz was tested with 496 MB of RAM, Intel(R) PRO/Wireless 2200BG Network Connection Card, and with Windows XP Professional Version 2002 OS with Service Pack 2. For the CAN bus, the experimental results indicate that the time delay in the CAN bus is relatively small as compared to that of the wireless network, as shown in Fig. 4.5.

0 2 4 6 8 10 12 14 16 18 20

1 1.5 2 2.5 3 3.5 4

Sec.

Time Delay (ms)

(a) (b)

Fig. 4.5 Measurement of the delay time on CAN network (a) the transmit time for a node-to-node and (b) the RTT between the gateway and the client

The time delays on both IEEE 802.11g ad-hoc wireless network and the CAN network (transmitted with different sampling rates and various environments) were measured as shown in Fig. 4.6, and the results are summarized in Tables 4.1- 4.2.

(a) (b)

Fig. 4.6 Measurements of time delay in (a) a simple environment and (b) a complex environment

Table 4.1 The averaged delay time of the hybrid networks in a simple environment (unit: ms)

Sampling Time No. 1 No. 2 No. 3 No. 4

5 ms 2.807961 11659.09 2.474295 5574.375 10 ms 4453.212 5489.112 2910.771 3.897898 20 ms 20.2813 470.5569 23.0162 5590.872

Table 4.2 The averaged delay time of the hybrid networks in a complex environment.

(unit: ms )

Sampling Time No. 1 No. 2 No. 3 No. 4

5 ms 22797.18 15326.39 4855.466 22797.18 10 ms 7818.727 16693.98 8716.06 12349.45 20 ms 21.59492 21.16303 10726.56 535.6239 50 ms 37.0036 45.71434 44.39008 49.5021

The results indicate that different environments and sampling rates greatly affect the delay time of HNCS. Results also indicate that an increasing network load and longer messages lengths also cause a significant increase in the delay time. Furthermore, the delay time increases dramatically in a more complex environment with a faster sampling time. Too many wireless devices use a 2.4 GHz unlicensed band in our daily

living environment. Owing to the limited bandwidth in wireless networks, most ad-hoc networks use a contention-based protocol for controlling channel access resource.

Performance of wireless ad-hoc networks is thus poor because of network congestion with abundant medium contest. The previously mentioned definition of a transmission is then implemented using TCP. Due to network congestion, traffic load balancing, or other unpredictable network behavior, TCP detects these problems, requests the retransmission of lost packets, and rearranges out-of-order packets to reduce the occurrence of other problems. TCP sometimes incurs relatively long delays while waiting for out-of-order messages or retransmissions of lost messages. Therefore, the probability that the time delay in a complex environment is dramatically changed increases when it is under the same sampling time. Comparing the results of the CAN bus and wireless systems, it is obvious that no matter the environment is simple or complex, the time delay in wireless systems remains to be the bottleneck during the transmission for HNCS.

4.2.2 Stability of HNCS

Experiments were conducted for the present HNCS and the position controller was located on the control center station. The coefficients of PI controller were tuned as

K

p=0.0001 and Ki=0.00000001. The system identification result from the pseudo random binary signal (PRBS) response for the present AC permanent magnet synchronous motor is obtained as

5 2

10 (0.029 1.6105) ( ) s(0.0001s 0.019s 1)

p

G ss

 

For the wireless 802.11g with a 54 Mbps transmission rate, the measured time delay is shown in Fig. 4.7. The results indicate that although the time delay effect in the wireless network is in a stochastic nature, it is basically bounded. For the client of the servo motor, the sampling time is 20 ms with a square wave command input and the upper/lower commands are 30000/15000 pulse of the encoder readout. As shown in Fig. 4.8, the communication congestion occurs around 4.5 seconds and note that the PI control cannot maintain a stable HNCS with a fixed sampling time under such

applying the first-order Padé approximation to the time delay are shown in Fig. 4.9.

When tm is greater than 100 ms, the Nyquist plot encloses -1, and the system becomes unstable.

Fig. 4.7 The bounded time delay effect measured in HNCS

unbounded time-delay effect (after 4.5 s)

0 0.5 1 1.5 2 2.5 3 3.5 4

-1.5 -1 -0.5 0 0.5 -1.5

-1 -0.5 0 0.5

tm=0ms tm=20ms tm=40ms

tm=60ms tm=80ms tm=100ms tm=120ms tm=140ms

j Im L

Re L

Fig. 4.9 Nyquist plots with different time delay

Fig. 4.10 Structure of the multi-rate design method

4.3 Multi-rate HNCS

As the time delay induced during transmission over the communication network is unavoidable and unpredictable, the control design of HNCS will mainly cope with the time delay that occurs irregularly. Traditionally, the Smith predictor has been applied successfully to industrial processes usually with a constant delay time model. However, because the time delay of the present HNCS is significantly varied, the delay must be

Furthermore, a multi-rate design method by applying both the adaptive Smith predictor and the switching sampling time based on the RTT is proposed here, as shown in Fig.

4.10.

4.3.1 The on-line estimation of the delay time

The procedure for estimating the delay time on the present HNCS is proposed here by applying the measurement of RTT. The delay measurement relies on RTT due to its easy implementation. It does not require clock synchronization between the sender and the receiver since corresponding computations are operated on the same device. The data length of CAN is limited to only 8 bytes for a single frame with the serial data communications bus, but the minimum data length to measure RTT is 10 bytes in the present experiment. Therefore, the measured data are sent at each half sampling period to overcome the limitation of the CAN network, as shown in Fig. 4.11. It is clear that the smaller the sampling period is, the more data packets are transmitted. This makes the network traffic load heavier and it thus increases the possibility of obtaining a greater constant time, and data loss increases in a bandwidth-limited network and time delays become longer (Lian et al., 2002). Basically, when a network is busy, the sampling time can be adjusted to a larger period so that the data can be transmitted on time. Therefore, the variable sampling period based on the online measured RTT to switch the sampling time is proposed in this chapter to avoid the network traffic jam and maintain satisfactory performance of NCS.

Fig. 4.11 The frame of the CAN network in the proposed HNCS.

0 50 100 150 200 250 0

50 100 150 200 250

Time delay (ms)

Samples (a)

0 50 100 150 200 250

0 20 40 60 80 100

Sampling time (ms)

Samples (b)

Fig. 4.12 Experimental results (a) the measured time delay and (b) the switching the sampling time

4.3.2 Switching the sampling time

In wireless network systems, the delay time increases dramatically in a complex environment or faster sampling time is processed. The proposed switching sampling time strategy is designed mainly based on the estimated RTT to cope with serious network congestion. RTT is measured from the transmitting node to the receiving node and back to the transmitting node. The switching is based on the following algorithm:

As shown in Fig. 4.12 and Table 4.3, experimental results indicate that the delay time is convergent and bounded by the proposed policy with the switching sampling time policy. The delay time under such arrangement is bounded within 200 ms four experiments.

Table 4.3 The averaged delay time by switching the sampling time Switching sampling time based on RTT (unit: ms)

Environment No. 1 No. 2 No. 3 No. 4

Simple 132.3329 26.08322 179.6125 165.5099 Complex 168.0632 127.0632 193.15 174.3076

4.3.3 The short-window median filter

Since the online measured RTT is not reliable, a median filter which is a nonlinear digital filtering technique often used to remove noise from signals and reserve the interrupt change (Astola and Neuvo, 2002) is adopted. Thus, the present multi-rate HNCS will avoid frequent switching which may lead to improper compensation of the delay time adopted in the Smith predictor. The short-window median filter applied to the measured RTT removes the short-term variation of the measured delay time and maintains a relatively constant delay time. To obtain the output of a median filter, the sample values are sorted and the median value is used as the filter output shown as

Since the online measured RTT is not reliable, a median filter which is a nonlinear digital filtering technique often used to remove noise from signals and reserve the interrupt change (Astola and Neuvo, 2002) is adopted. Thus, the present multi-rate HNCS will avoid frequent switching which may lead to improper compensation of the delay time adopted in the Smith predictor. The short-window median filter applied to the measured RTT removes the short-term variation of the measured delay time and maintains a relatively constant delay time. To obtain the output of a median filter, the sample values are sorted and the median value is used as the filter output shown as