XI International PhD Workshop OWD 29, 17 2 Octoer 29 Distriuted control of "all on eam" system Michał Ganois, University of Science and Technology AGH Astract This paper presents possiilities of control for unstale dynamic systems asing on "all on eam" example. First section is a short introduction. In the second section, system is presented - its structure, equations and equilirium points. Using 1st Lapunov method and Kalman matrix it is proven that the system is unstale, ut controllale. Third section shortly descries design of LQR controller for the "all on eam". In the fourth part short description of simulation framework (Matla/Simulink, TrueTime lirary) is introduced. The influence of specific parameters of Ethernet (such as throughput, proaility of losing packet, and minimal frame size) on control quality is descried. It is shown, that insufficient network parameters can destailize control loop. The last part of the paper is a proposition of control loop design using uffers. It is proven that appropriate uffers and simple oserver are sufficient to design asymptotically stale control for "all and eam" system. 1. Introduction Distriuted control systems are significant part of a modern automatic control. Its applications can e found in many kind of industries, as oil refining, power stations, automotive, and many others. In these systems, measurements and process itself are separated, and communicate via network (e.g. Ethernet, Modus or CAN) - as a result, influence of a network has to e taken into consideration. Fig. 1. "Ball on eam" system A "all on eam" is a well-known example of unstale, controllale dynamic system. Simplicity and possiility of constructing a real oject in laoratory make it one of the most popular examples in control theory. Additionally, "all and eam" can e used as a simple model of more complicated prolems related with variale moment of inertia (e.g. stailizing of airplane flight or root manipulators). 2. Control system System consists of rotating eam, and a solid all rolling on it. We assume eam s torque as an input. The structure of the system is presented on figure (1). We assume, that: all does not slide on the eam there is no dynamic friction in the system the all is perfectly round and homogeneous the all has a constant contact with the eam the eam is perfectly flat and symmetric State equations for the system descried aove are as follow (see [3] or [1]) 479
ẋ 1 = x 2 (1) ẋ 2 = a(x 1 x 4 2 g sin x 3 ) (2) ẋ 3 = x 4 (3) ẋ 4 = 2x 1 x 2 x 4 g x 1 cos x 3 x 2 1 + + u x 2 1 + (4) where x 1 - position of the all [m] x 2 - velocity of the all [m/s] x 3 - angular position of the eam [rad] x 4 - angular velocity of the eam [rad/s] I =.1 - eam s moment of interia [k g m 2 ] I - all s moment of inertia [k g m 2 ] m =.1, R =.1 - weight [k g] and radius [m] of the all a = 1 1+ I mr 2 = I +I m System (1) can e linearized in its equilirium point (x = [,,,]). Jacoi matrix of this system takes form J (x) = where 1 2 ax 4 ga cos x 3 2ax 1 x 4 f 1 (x) f 2 (x) f 3 (x) f 4 (x) f 1 (x) = 2x 2 x 4 g cos x 3 + x 2 1 + + 2 (2x 1 x 2 x 4 + g x 1 cos x 3 )x 1 (x 1 2 + ) 2 f 2 (x) = 2x 1 x 4 x 1 2 + f 3 (x) = g x 1 sin x 3 x 1 2 + f 4 (x) = 2x 1 x 2 x 1 2 + In the equilirium point we have J (x s ) = 1 ga 1 g where eigenvalues of J are λ 1 = p λ 2 = p λ 3 = j p λ 4 = j p with p = 4 g 2 3 a, j 2 = 1 For positive values a,, Re(λ 1 ) > - the system is unstale. Oservaility of the system can e proven using Kalman matrix (see e.g. [4]), which takes a form ga Q = ga 1 1 (5) Because detq >, system is considered oservale. 3. Optimal control of "Ball on eam" system This section shortly presents an optimal control of the system using LQR controller, i.e. minimizing quality index given y (6) Q(u) = (x(t) Qx(t) + u(t) Ru(t))d t (6) with assumptions Q = Q, R = R, Q R > In further experiments we assume Q = I, R =.1 Solving Riccati s equation for linearized system leads us to the controller vector 48
Fig. 2. Trajectories for closed loop (LQR) K = [ 23.8184 17.5655 67.45 15.3235] (7) Trajectories of the system with aove controller are presented on figure (2) Fig. 3. Simulink model of the system 4. Distriuted control via Ethernet and its simulations Control loop for "all on eam" system via Ethernet network was simulated using MAT- LAB/Simulink environment and TrueTime lirary (see [5]). Full simulation system is presented on figure (3). The most important parts are: "Ball on eam" lock - represents model of the system, designed using equations (1) "Sensor" lock - represents a sensor, its responsiility is a conversion of measurements to digital form appropriate for Ethernet network "Controller" - represents a digital controller "Actuator" - represents actuator, which converts data received via Ethernet to input for "all on eam" system. "Network" - represents model of Ethernet network To measure a quality of control, we use an integral of squared error in finite time T = 5 J (x,t ) = 4 ( i=1 T x 2 i d t) (8) Default parameters for simulations were: throughput DR = 18 /s proaility of packet loss LP = Fig. 4. Influence of throughput minimal frame size MFS = 46 octets Influence of particular network parameters are presented on plots (4), (5), (6). It can e noticed, that throughput elow 75/s causes with worse quality of control. Destailization of the system occurs for aout 6/s. Similarly, too ig value of minimal frame size also causes with destailization (control systems should use ig amount of small packets - this is the reason why too ig minimal frame size is not appropriate for control purposes). Interesting results can also e otained when proaility of losing packet is changed - quality of control decreases rapidly for some values (plot has a shape of "stairs"). Staility is lost for aout.175. 481
Introduce a new state variales, related with delays of the uffers Design discrete controller for otained system First of all, discrete form (as elow) of the system is needed. x(k + 1) = A d x(k) + B d u(k) (9) y(k + 1) = C d x(k) (1) Appropriate matrices can e calculated using equations Fig. 5. Influence of packet loss proaility A d = e AT (11) B d = T e AT Bd t (12) C d = C (13) As a result, for sampling time T =.1, the following matrices are otained Fig. 6. Influence of minimal frame size 5. Design of distriuted control system Typical approach to design of distriuted control systems is to design a system neglecting its distriuted character, and then analyzing the influence of the network in various aspects (as e.g. delays) [2]. In this section, some methodology using uffers will e presented, and applied to "all on eam" system. The main prolem for distriuted control systems (e.g. via Ethernet) is a variale delay introduced y network. This prolem can e solved y introducing uffers - after such introduction, system has constant delays, which are easier to handle. The main idea of presented approach is as follows: Create discrete-time model of the system Determine max delay of the network Add uffers to the system to make delays constant A d = 1.4.1.491.16.16 1.4.9811.491.491.16 1.4.1.9811.491.16 1.4 B d =.16.5 1 (14) (15) C d = 1 1 1 1 (16) In the second step we determine network delay. Experiments have proven, that the iggest otained delay was way smaller than discretization step T =.1. Third step is adding uffers on input and output of the system. Because delays are smaller than discretization step, one-sample uffers are sufficient. System with uffers is presented on figure (7) Now we have discrete system with one-step delay on input and all outputs. For discrete systems, it is possile to treat one-step delay as a new state variale. Using this approach, we otain extended state space, defined as 482
Fig. 7. Control system with uffers x(k + 1) z(k + 1) where = Ad T Γ 1 (τ) = e As Bd s, Γ (τ) = T τ Γ 1 (τ) x(k) + z(k) Γ (τ) + u(k) (17) 1 T τ e A sbd s (18) Then, using equation (17),(18) (see e.g. [2]) all delays can e incorporated. A new 9-rank system is created, with matrices as presented elow A e = B d A d C d B e = 1... C e = I n n (19) (2) (21) To create optimal LQR controller, full state of the system has to e known. To otain the full state, a simple oserver is introduced, asing on the following rules: x 1 is a control one sample efore x 2 5 can e otained asing on output (i.e. the state delayed for one sample), and internal system model x 6 9 are availale directly as an output Basing on aove system, DLQR controller parameters can e calculated: Fig. 8. DLQR with state oserver K e2 = [.7345 23.8684 7.962 27.8963 8.6184 ] (22) As one can see on figure (8), trajectories of the system with aove controller are asymptotically stale 6. Conclusions In this paper, a method for design distriuted control via Ethernet for "all on eam" system is presented. Model of the system in a form of differential state equations is introduced. Basic properties, as instaility and controllaility of the system are proven. The influence of particular network parameters as throughput, proaility of frame loss, and minimal size of a frame are shown. A method for design control system with compensation of variale delay using uffers is proposed. The simulations show that system with such controller guarantees stailization of the system. Biliography [1] Michał Ganois. Przegląd możliwości sterowania systemem o zmiennym momencie ezwładności typu all on eam. Automatyka, Uczelniane Wydawnictwa Naukowo-Techniczne AGH, 12(2):197 21, 28. [2] Wojciech Grega. Metody i algorytmy sterowania cyfowego w układach scentralizowanych i rozproszonych. Uczelniane Wydawnictwa Naukowo- Dydaktyczne, AGH w Krakowie, 24. [3] Wojciech Mitkowski Jerzy Baranowski, Michał Ganois. Oserver design for variale moment of inertia system. Materiały konferencji Computer Methods and Systems, 27. 483
[4] Wojciech Mitkowski. Stailizacja Systemów Dynamicznych. Wydawnictwo AGH, Kraków, 1991. [5] Martin Ohlin, Dan Henriksson, and Anton Cervin. TrueTime 1.5 - Reference Manual. Department of Automatic Control, Lund University, 27. Authors: M.Sc.Michał Ganois University of Science and Technology AGH al.mickiewicza 3 3-59 Kraków email: ganois@agh.edu.pl This work was supported y Ministry of Science and Higher Education in Poland in the years 28-211 as a research project No N N514 41434 484