Adaptive Regulator for Networked Control Systems

9 downloads 1129 Views 153KB Size Report
of delays in the network used for sensor-to-controller, and controller-to-actuator ... sion, ABB Global Industries and Services Ltd., Bangalore, India [email protected].
Adaptive Regulator for Networked Control Systems: MATLAB and True Time Implementation ¨ Seshadhri Srinivasan1 , Mishiga Vallabhan2 , Srini Ramaswamy2 , and Ulle Kotta1 Abstract— Networked Control Systems (NCSs) employ digital network for transmitting control and monitoring information among system components. Control information over digital network may be delayed due to transmission and this can adversely affect the control performance. To achieve desired performance in the presence of delays the controller needs to modify its gain based on the delay or compute the gains on line based on channel delays. This requires knowledge of delays in the network used for sensor-to-controller, and controller-to-actuator channels. Controller node can only obtain the knowledge of the sensor-to-controller delays and need to estimate the controller-to-actuator delay to compute the gains. Further, such computation should not result in significant computation overhead as it will increase the computation time. In this paper, we propose a simple adaptive regulator that uses first order approximation for computing the controller gains based on prior knowledge of channel delays. Simulation results indicate that the adaptive regulator performs well even with an approximation of delay like Gaussian distribution. Delay samples obtained from MODBUS over TCP/IP and data-networks are used to illustrate the performance of the controller. The controller is implemented in True Time to illustrate its real-time performance.

I. INTRODUCTION Digital communication channels have proliferated industrial control loops and are being used for transmitting control and monitoring information. Control loops that employ digital network for transmitting control data are called networked control systems (NCSs). A detailed review of NCSs can be found in [1]-[5], see also references therein. Time-varying delays are introduced in the transmitted data due to the digital communication link and these delays deteriorate the system performance eventually leading to instability. Most results in NCSs are motivated in designing stabilizing controller considering the worst-case de-stabilizing effect of delays. This design is a bit conservative as controller parameters are computed based on the worst-case conditions. Traditionally, adaptive controllers have been used in scenarios wherein control systems encounter time-varying parameters. The role of adaptation in NCSs has not been fully explored and this is mainly due to two reasons, namely:(i) Need for prior knowledge of delays, and (ii) Computation delays induced in controller nodes due to on line computations. Our goal is to propose a simple adaptive controller that requires simple This work was supported by European Union through European Regional Development Fund and target project SF140018s08 1 S. Seshadhri and U. Kotta are with the Control Systems Dept. ,Institute of Cybernetics, Tallinn University of Technology, Tallinn, Estonia, 12618 e-mail: ([email protected]) 2 Srini Ramaswamy is with Industrial Software Systems Division, ABB Global Industries and Services Ltd., Bangalore, India

[email protected]

computation and approximate knowledge of the channel delays to meet the performance specification. Adaptive control of NCSs is a recent research topic available results can be classified into three broad categories: (i) Gain-scheduling based approaches [7], [10], [11], [12], (ii) Adaptive control based on either assumption or delay models [6], [8], [13],and (iii) Adaptive control rule that employ parameter identification followed by an controller update step [14], [15], [9]. Most of the results, except ([14], [13]) do not consider stability or explicit performance metrics intended from the closed loop systems. Adaptive control rule that computes the controller gains using channel information and a model that captures the required performance from the plant has been proposed in [14]. The adaptation rule proposed requires delay measurements and matrix computations and can induce undesirable computation delays. In this investigation, we propose an adaptive regulator based on the Linear Quadratic Regulator (LQR) and propose an approximation scheme that simplifies the computation. Resulting adaptive controller is simple and requires only an approximation of channel delays. In our analysis, we use an empirical Gaussian model to capture the delays. This paper develops a simple adaptive regulator for NCSs with random communication delays that are modelled as a Gaussian distribution using studies conducted on MODBUS over TCP/IP network. The adaptive control rule is implemented in True Time toolbox to show the performance of adaptive controller. The paper is organized in five sections including the introduction. In section II, we study the NCSs model and formulate the problem. In section III, we propose the adaptive regulator design, and present the empirical model for time-varying delay obtained from experiments conducted on MODBUS over TCP/IP and industrial controller. Simulations in True Time are shown to illustrate the proposed adaptive controller in section IV. Conclusions and future directions of this investigation are discussed in section V. II. P ROBLEM S TATEMENT Consider the linear time-invariant (LTI) system x(t) ˙ y(t)

= =

Ax(t) + Bu∗ (t) Cx(t)

(1)

with controller u∗ (t) = uk n

t ∈ [kh + τk , (k + 1)h + τk+1 ) m

p

(2)

where x(t) ∈ R , u (t) ∈ R , y(t) ∈ R are the state, input and output vectors respectively and A, B, C are ∗

constant matrices with appropriate dimensions. Networks N1 and N2 are used to connect sensor and controller output to the controller and plant respectively. Generic NCS with dynamics (1) and (2) is shown in Fig. 1. Total delay in the

III. A DAPTIVE C ONTROLLER D ESIGN In this section, an adaptive control scheme called the adaptive regulator is proposed. This regulator adapts its gain depending on the time-varying network delays. A. Adaptive Regulator Design

- ZOH

- Plant

The control objective is to achieve good regulation with minimum control effort based on the LQR approach. Using the cost function

Sensor @ h

J= N2

N1

Jk (xk ) =

min

uk ,...uN −1

Networked Control System (NCS)

τk = τ1 + τc + τ2 f or k = 0, 1, 2, 3, ...

(3)

In general, we are interested in analyzing the NCSs where the total delay τk is less than the sampling period h and drop the data with delays greater than h. These assumptions ensure that the most recent feedback information is available at the controller and out-of-sequence samples are not delivered. Sampling the system (1) under these assumptions leads to the discrete-time model as in [17], [18]: φxk + Γ0 (τk )uk + Γ1 (τk )uk−1 Cxk

N −1 X

(eTτ Qeτ + uTτ Ruτ )

(6)

τ =k

+ eTN QN eN subject torelations(4)

control input τk is the sum of networked-induced delays in the channels N1 and N2 , denoted by τ1 and τ2 , respectively and computation delay τc in the controller

= =

(5)

Define the cost-to-go function at time instant k is, ? Controller

xk+1 yk

(eTτ Qeτ + uTτ Ruτ ) + eTN QN eN

τ =0

6

Fig. 1.

N X

(4)

R h−τ where φ = eAh , Γ0 (τk ) = 0 k eAλ B dλ and Γ1 (τk ) = Rh eAλ B dλ. h−τk The problem is to design an adaptive controller that adapts its gains based on the delays τk to regulate the state with minimum control effort and/or to meet the desired performance in the presence of time-varying delays. In particular, the controller should 1) stabilize the system 2) reduce the deviations of the state xk from the reference signal rk with minimum control effort 3) reduce the computation delay Further, the performance of the adaptive control scheme needs to be tested in a real-time scenario. In order to accomplish this, we employ the True Time package for use with Simulink to illustrate the effectiveness of the proposed adaptive control scheme. One may verify that there are conflicting controller design requirements and this makes control design complex.

In (6), ek = xk −rk , Q ≥ 0 and R > 0 are weighing matrices of appropriate dimensions, and QN ≥ 0 is the terminal weighing matrix. Note that Jk (xk ) gives the minimum of LQR cost-to-go, starting from state xk at time instant k. It has been shown that Jk (xk ) is quadratic, Jk (xk ) = xk Pk xk + 2qk xk + rkT Qrk , where qk = −QT rk , Pk = PkT ≥ 0 that can be found recursively working backwards from k = N by taking PN = QN . Now according to the dynamic programming principle, suppose we know Jk+1 (xk+1 ) and look for optimal uk . Observe that uk affects the terms uTk Ruk and Jk+1 (xk+1 ). Therefore, Jk (xk ) = min[((xk −rk )T Q(xk −rk )+uTk Ruk +Jk+1 (xk+1 ))] uk (7) From the necessary condition for optimality, we obtain, taking into account (4) Ruk +ΓT0 Pk+1 [φxk +Γ0 uk +Γ1 uk−1 ]+ΓT0 Pk+1 rk = 0 (8) As N → ∞, the value of Pk+1 approaches a steady value and can be replaced by a constant matrix P ≥ 0. This simplification, with little manipulation leads to uk = Lx (τk )xk + Lu (τk )uk−1 + Lr (rk )

(9)

From (9), we have Lx (τk ) Lu (τk )

= =

−(R + ΓT0 P Γ0 )−1 ΓT0 P φ −(R + ΓT0 P Γ0 )−1 ΓT0 P Γ1

C(τk )

=

−(R + ΓT0 P Γ0 )−1 (−ΓT0 QT )

(10)

are the adaptive control gains that depend on the network delay τk . Obviously, the control rule (10) requires the knowledge of the delay τk to compute Γ0 and Γ1 and moreover, computational complexity increases as the system order n increases. Below we suggest how to overcome these shortcomings.

∂L (τk − τ0 ) (12) ∂τ ∂L L(τk ) ≈ Ψ(τ ) L(τ0 ) + (τk − τ0 ) (13) ∂τ where τ0 is the nominal delay or the gain corresponding to the sampling period of the system. L(τk ) ≈ L(τ0 ) +

- ZOH

- Plant Sensor @ h

N2 6

N1

IV. R ESULTS AND D ISCUSSIONS -

?

τk

A. Numerical Example The double integrator system     0 1 0 x(t) = x(t) + u(t) 0 0 1   y(t) = 1 0 x(t)

?

Adaptation rule 6

is used to illustrate the effectiveness of the proposed AR. Discretization with sample time h and by considering delays in the channel τk ≤ h leads to " #     (h−τ )2 τ (h − τ2 ) 1 h 2 x + uk−1 + uk (15) xk+1 = τ 0 1 k h−τ

LUT

Controller

Fig. 2.

(14)

Schematic Block Diagram of Adaptive Regulator

To illustrate the effectiveness of the controller, we first

B. Modeling Time-Varying Delays Modeling time-varying delays in communication channels has been investigated in [22], [23], [24], [8], [25], [26]. Delays in communication channels can be modeled using empirical distributions [22], [23], [24], Markov Chain [25], shifted Rayleigh model [8] and Markov Chain Monte Carlo (MCMC) techniques [26]. Usually in industrial automation network used in sensor to controller and controller to actuator channel are correlated meaning that the delays τsc and τca are relateed by τ1 = ξ × τ2

(11)

where ξ is an arbitrary constant determined from experiments. We use measurements from experiment on Modbus over TCP-IP to model the delay. The samples generated by a Gaussian distribution are shown to be close enough to capture the delay distribution and will be used in controller design instead of actual measurements. In case when empirical distribution does not fit normal distribution well enough, the MH-sampler proposed in [26] can be used for computation of delays. 1) Approximation of AR Gains: To simplify the computation of controller gains, a look-up-table based approach was used in [26]. Unfortunately, then the controller induces chattering behavior in output and moreover, there are no guidelines to fix the number of controllers in the table that, in general, depends on the delays in the channel. In this paper, we propose a first order approximation for the controller gain in (12) that will be improved later by introducing a learning parameter Ψ(τ ), computed from offline simulation, yielding (13).

Fig. 3.

True Time simulation of Adaptive Regulator

employ MATLAB with Gaussian model for channel delay. Second, we simulate the controller in True Time and introduce the delay sample obtained from Gaussian distribution during execution. Here network loading (presence of additional nodes) is considered for modeling the delays. In both the cases, the controller uses the approximation in (13) to compute the gains. B. MATLAB simulation The sampled-data representation of NCSs with total delays less than sampling time can be obtained using MATLAB together with the routine NCSsd. The later routine is developed by the author of this paper is available for simulation in [27]. The effectiveness of the proposed approach is illustrated using both delay measurements (assuming symmetrical channels) that are used to model a Gaussian distribution with

Respnse with random delay in the channel 2 x x

1

Respnse with delay(0.03 and 0.04) in the channel 1.4 x x

1 2

1.2

1

0.8

states

mean and variance computed from the experiment. The states of the regulator for a sampling time of 0.1s and with delay having mean of 30 ms and variance of 10 ms is shown in Fig. 4. This response is obtained considering loading in the channel, whereas the response of the adaptive regulator with a sampling time of 0.1 s and with a delay having mean 6 ms and variance of 1.5 ms is shown in Fig. 3. The regulatory performance of the AR controller can be ascertained from the results. Further, the controller works well even with empirical model for delay with a first order approximation that significantly simplifies the design.

0.6

0.4

0.2

0

−0.2

0

500

1000

1500

2000

2500

3000

3500

samples

Fig. 6. States of the double integrator system with network loading using True Time simulation

2

1.5

Variation of controller gains due to delay 0 K1 K2 −0.01

states

1

−0.02 0.5

Gain

−0.03

0

−0.04

−0.05 −0.5

0

500

1000

1500 iterations

2000

2500

3000 −0.06

Fig. 4. States of the double integrator system with network loading using MATLAB simulation

−0.07

0

500

1000

1500

2000

2500

3000

3500

samples

Fig. 7.

Variations in controller gains in True Time simulation

Respnse with random delay in the channel 1.2 x x

1 2

D. Summary of Results

1

Simulation using MATLAB and True Time indicate good regulatory performance of the AR controller. The AR regulator only requires an approximate model for delay for computing the controller gains. Further, the approximation used for computing the controller gains is very simple and it eliminates the need for matrix computations required with other adaptive controllers proposed in literature.

0.8

states

0.6

0.4

0.2

0

−0.2

0

200

400

600

800

1000 iterations

1200

1400

1600

1800

2000

Fig. 5. States of the double integrator system without network loading using MATLAB simulation

C. True Time simulation To mimic the real-time control scenario, we then use the True Time toolbox [30] to implement the AR controller and the implementation in Simulink is as shown in Fig. 3. The network and the controller node are created using True Time and embedded MATLAB function NCSsd is used for implementing the plant dynamics. States of the doubleintegrator system in (15) employing Modbus over TCP/IP communication channels for information exchange with AR is shown in Fig. 6. The channel delay changes after 2020 iterations. These iterations can be converted to the time by considering the controller hardware to which the AR algorithm is ported. The variations in state-feedback gains is shown in Fig. 7.

V. CONCLUSIONS In this investigation, a simple adaptive regulator for NCSs subjected to random communication delays has been proposed. The controller only requires an approximation of delay samples like a Gaussian model and matrix computations are not required for computing the controller gains. Effectiveness of the proposed scheme is illustrated using True time and MATLAB based simulation. Stability analysis and packet loss handling are the future course of this investigation. ACKNOWLEDGMENT The authors acknowledge H. Voit, Institute of Automatic Control Engineering, Technische Univerit¨at M¨unchen for his clarifications on his publication in ACC 2011. R EFERENCES [1] J. Baillieul, and P.J. Antsaklis, “Control and Communication challenges in networked real-time control systems”, Proceedings of the IEEE, vol. 95, no.1, Jan. 2007, pp. 925.

[2] J. P. Hespanaha, P. Naghshtabrizi, and, Y. Xu, “A survey of recent results in networked control systems”, Proceedings of the IEEE, vol. 95, no.1, Jan. 2007, pp. 138162. [3] T.C. Yang, “Networked Control Systems: A brief survey”, IET control theory and applications, vol. 153, no.4, 2006, pp. 403412. [4] Y. Tipsuwan and M. Y. Chow, “Control methodologies in networked control systems”, Cont. Eng. Pract., vol. 11, pp. 1099-1111, 2003. [5] S. Seshadhri,Estimation and design methodologies for networked control systems with communication constraints, Ph.D. dissertation,Dept. Instrumentation and Control Eng.,National Institute of Technology,Tiruchirappalli., Tiruchirappalli, India, 2010. [6] P. Marti, J. Yepez, M. Velasco, R. Villa, and J. Fuertes, “Managing quality-control in networked-based control systems by controller and message scheduling co-design”, IEEE Transaction on Industrial Electronics, vol. 51, no. 6, pp. 1159-1167,Dec 2004. [7] A. Tzes, and G. Nikolakopulous, “LQR-Output feedback gain schedulling of mobile networked controlled systems”, in Proceedings of the 2004 American Control Conference, Boston, Massachusetts, 2004, pp. 4325-4329 [8] N. B. Loden, and J. Y. Hung, “An adaptive PID controller for network based control systems”, IEEE 31st Anual Conference on Industrial Electronics Society, IECON 2005, 2005, pp. 2445-2450. [9] L. Chunmao and X. Jian, ”Adaptive delay estimstion and control of networked control systems”, in International Symposium on Communicationand Information Technologies(ISCIT), 2006. [10] E.P. Godoy, A. J. V. Porto, and R. Y. Inamasu, ”Sampling time adaptive control methodology for CAN-based Networked Control Systems”, in 2010 9th IEEE/IAS International Conference on Industry Applications(INDUSCON),2010, pp.1-6. [11] S. Plitz, M. Bj¨orkbom, L. Eriksson, and H. Koivo, “Step adaptive controller for networked mimo control systems”, in Proc. of International Conference on Networking, Sensing and Control(ICNSC), 2010, pp. 464-469. [12] M. Bj¨orkbom, “Wireless control system simulation and network adaptive control”, PhD dissertation, School of Science at Technology, Aalto University, Dept. of Aiutomation and Systems Technology, Oct. 2010. [13] A. H. Tahou, and F. H-jing, “Adaptive stabilization of networked control systems”, Journal of Applied Sciences, vol.7, no.22, 2007, pp.3547-3551. [14] H. Voit, A. Annaswamy, ”Adaptive Control of a Networked COntrol System with Hierarchical Scheduling”, in American Control Conference 2011, San Francisco, CA, July 2011, pp. 4189-4194 [15] A. Annaswamy, D. Goswami, and S. Chakraborty ”Tutorial on arbitrated networked control systems appraoch to cyber-physical systems, CPSWeek, 2011. [16] G. Tao, “Adaptive control design and analysis”, John Wiley and Sons, Inc. New Jersey, 2003. [17] Z. Wei, M. S. Branicky and S. M. Philips , “Stability of networked control systems :explicit analysis of delay,IEEE Control System Magazine,vol. 21, no. 1, pp. 84-99, 2001. ˚ om, and B. Wittenmark, Computer Controlled Systems: [18] K. J. Astr¨ Theory and Design., Prentice Hall, 1990. [19] J. Daafouz, P. Reidinger, and C. Lung, “Stability analysis and control synthesis for switched system: A Lyaponov function approach”, IEEE Transactions on Automatic Control, vol. 47, 2002, pp. 1883-1887. [20] A. Bemporad, M. Heemels, and M. Johanson Networked Control Systems, Springer-Verlag, 2010, pp.203-253. [21] M. Vallabhan, S. Seshadhri, S. Ashok, S. Ramaswmay, and R. Ayyagari, “An analytical framework for analysis and design of networked control systems with random delays and packet losses”, in Proceedings of the 25th Canadian Conference on Electrical and Computer Engineering (CCECE), 2012, Quebec, Canada. [22] A. Mukerjee, On the dynamics and significance of low frequency components of internet load,Inter networking :research and Experience , vol. 5, pp. 163-205, 1994. [23] H. Chan and U. Ozguner, Closed loop of control systems over communication systems with queues,Int. Journal of Control, vol 62, no.3, pp. 493-510. [24] Y. Tipsuwan and M. -Y. Chow, “Gain Scheduler middleware: A methodology to enable existing controller for networked control and tele-operation- Part 1: Networked Control ,IEEE Transactions on Industrial Electronics, vol. 51, no.3, pp. 1218-1227, Dec. 2004. [25] J. Nilsson Real Time Control Systems with Time Delays,PhD Dissertation, Department of Automatic Control, Lind Institute of Technology, Sweden, 1998.

[26] S. Seshadhri and R. Ayyagari, “Dynamic controllers for networked control systems with random communication delays”,International Journal of Systems, Control, and Communications (IJSCC)-Special issue on progress in Networked Control Systems , vol. 3, no. 2, April 2011, pp. 178-193. [27] S. Seshadhri, Sampled-data model for NCSs with delay less than sampling time”, http://www.mathworks.com/matlabcentral/ fileexchange/37875 [28] F. Lian, Analysis , Design, Modelling and Control of Networked Control Systems , PhD Dissertation, Department of Mechanical Engineering, University of Michigan, Ann Arbor , MI, USA, 2001. [29] S. Seshadhri, M. Vallaban, S. Ramaswamy and U. Kotta, Adaptive LQR controller for networked control systems subjected to random communication delays, Submitted to American Control Conference 2013. [30] Anton Cervin, True Time toolbox, http://www3.control.lth. se/truetime/

Suggest Documents