SLIDING MODE CONTROLS OF COMPLEX CONTROL SYSTEMS Radim Farana 1 , Renata Wagnerová 2 Annotation: This contribution describes non-linear control system synthesis. This problem is solved by the use of sliding mode controls, which is developed at the Department of Control Systems and Instrumentation at the Technical University of Ostrava, Czech Republic, during solving the research project. Those kinds of control were applied to control of very complex non-linear control systems like position control of winding machine or the industrial robots. The designed algorithms were verified by computer simulation and also directly on laboratory model - very fast and complex non-linear control system of the position control of levitating object in magnetic field. Keywords: sliding mode control, position control, object levitation in magnetic field
1 INTRODUCTION One of the possibilities on how to solve non-linear systems control synthesis is using the aggregation method. It enables designing the optimal control for dynamic subsystems, which have a standard form of mathematical model [Víteček, 2000]. The method includes the design of non-adaptive, robust control and its combination. A non-adaptive control ensures the track of a state trajectory, but it requires exact knowledge of the mathematical model of subsystems and fully measured deviations. By using robust control we can remove this disadvantage. The robust control requires knowledge of the deviations and the order of a controlled subsystem. Its disadvantage is the extremely high value of the control. This problem can be solved with using sliding modes. It means using discontinuous control, when the value of the switching function decides when to switch between the upper and the lower value of control [Utkin, 1992]. This control can be written by the equation
[
]
T
u sl = u1sl , u 2sl ,K, u msl ,
which elements are described + for ⎪⎧u j sl uj = ⎨ − for ⎪⎩u j
(1)
m j > 0, m j < 0,
(2)
where u +j , u −j - marginal values of control, mj – j- component of switching function, m number of controls of dynamic subsystem. It is possible in (2) to change the inequalities into the opposite. If we consider the robust algorithm of the aggregation method [Víteček, 2000], we can write the control with sliding modes t
u = U sgn(m ), , m = D(e − e 0 ) + T D ∫ edτ , sl
m
−1
(3)
0
1
Ass.Prof., MSc., Ph.D. Department of Control Systems and Instrumentation, VŠB-TU Ostrava, Czech Republic, 17. listopadu 15, Ostrava - Poruba, 708 33,
[email protected] 2 MSc., Department of Control Systems and Instrumentation, VŠB-TU Ostrava, Czech Republic, 17. listopadu 15, Ostrava - Poruba, 708 33,
[email protected]
[
]
U m = diag u1m , u 2m ,K, u mm ,
(4)
sgn(m ) = [sgn(m1 ), sgn(m2 ),K, sgn(mm )],
(5)
⎧− 1 sgn (m j ) = ⎨ ⎩1
(6)
for for
mj < 0 , mj > 0
where Um - the diagonal matrix, which elements u mj are marginal values of control, m - vector of functions order m, e - vector errors order n, D - aggregation matrix with constant elements order (m,n), T - diagonal matrix with time constant order m, n - order of controlled subsystem, sgn - signum function. The control with sliding modes (3) is discontinuous, robust and simple, but its disadvantage is the high activity of control, it means quick switching between marginal values of control. It can be removed by using the function of saturation u sa = U m sat Θ m m , (7)
[
(
)
]
Θ m = diag Θ 1m ,Θ 2m ,K ,Θ mm ,
(8)
sat(m ) = [sat(m1 ),sat(m2 ),K ,sat(mm )],
(9)
⎧⎪ Θ j m j for Θ j m j ≤ 1 , sat (m j ) = ⎨ ⎪⎩sgn (Θ j m j ) for Θ j m j > 1
(10)
where Θm - positive diagonal matrix, sat - function of saturation.
Fig.1. The relation between the different controls with sliding modes
The relation between the value of switching function mj and the value of control is linear in interval − 1 ≤ θ mj m j ≤ 1 , when the saturation function is used in (7). This relation can be changed into nonlinear, when tgh function is used in (7). The control is written by equation: u tg = U m tgh Θ m m , (11)
[
(
)
]
Θ m = diag Θ 1m ,Θ 2m ,K,Θ mm ,
(12)
tgh (m ) = [tgh (m1 ), tgh (m2 ),K, tgh (mm )] , T
(13)
where tgh is function of hyperbolic tangent. Dependence of control value with function signum, saturation and hyperbolic tangent on 1 value of the switching function mj is shown in Fig. 1. The value m determines slope of static
θ characteristic for sliding controls with function saturation and hyperbolic tangent. When the
value is high, than the course of static characteristic is the same as the static characteristic of control with signum function. The trend of implementing sliding mode control is towards using digital computers due to the availability of low-cost and high-performance microprocessor. Sliding mode control is not simply a discretization of continuous sliding mode, since a well-designed control for continuous system may exhibit chaos in the corresponding discretised system even with a quite small sampling period. So it is necessary to define another conditions for the existence of discrete sliding mode control [Yu, 1993]. The design of discrete sliding mode control requires determination of sliding surface m(xk ) between marginal values of control. It is determined, as for continuous system, from the aggregation method of state variables [Víteček, 2000] k −1
m k = D[e k − e0 ] − T −1 Dh∑ ei ,
(14)
i =0
where ek - n-dimensional vector errors, D - aggregation matrix with constant elements order (m,n), T - m-dimensional diagonal matrix with time constants. Discrete sliding mode control is described by equation: ⎧u +j for m j > 0, x (k ) ∉ Ω sl ⎪ EQ (15) u j (k ) = ⎨u j for x (k ) ∈ Ω sl ⎪u − for m j < ε , x (k ) ∉ Ω sl ⎩ j where u +j , u −j - marginal values of controls, u EQ - equivalent control, which is designed as the j robust control of aggregation method, Ω sl - neighbourhood of sliding surface m k = 0 , which satisfied condition ∇mk mk < 0, ∇mk = mk +1 − mk . (16) The controls uk+ and uk− are chosen to drive the system state to reach Ω sl . The control u EQ is designed to drive the system state as close as possible to sliding surface and is written by equation k −1 ⎡ ⎤ m k = Θ ⎢ D(ek − e0 ) − T −1 Dh∑ ei ⎥ (17) i =0 ⎣ ⎦ where Θ - positive diagonal matrix order m.
2 SLIDING CONTROL APPLICATION The mathematical model The application of the method will be shown on the task of levitation of a steel bar, which schema is on Fig. 2. The behaviour of this system can be written by equations [Yamamoto a Kimura, 1995] 1 ∂L ( x ) , (18) m&x& = mg + i 2 2 ∂x d [L(x )i ], dt
(19)
Q + L∞ , X∞ + x
(20)
u = Ri + L( x ) =
where m - a weight of a steel bar [kg], X - distance between magnetic circuit and bar [m], I current [A], U - electrical voltage [V], L(x) - inductance of coil [H], R - electrical resistance [Ω], Q, L∞, X∞ - constants values of magnetic stand [H.m, H, m]. U
6
5
Legend: 1 - stand, 2 – fiber optic position sensor, 3 – steel bar, 4 – tube ensuring the vertical movement, 5 – pole piece of core coil, 6 - electromagnet.
4 3 2 1
Fig. 2. The levitation of steel bar
We edit equations (11) - (13) and implement state variables x1 = x, x2 = x&, x3 = &x& and we obtain the mathematical model of levitation task on state representation [Smutný & Wagnerová, 1998]: x&1 = x2 ,
x& 2 = x3 , x&3 = f 3 ( x ) + g 3 ( x )u ,
(21)
where f3(x), g3(x) - common nonlinear functions of state variables with a representation, ⎡ ⎤ ⎢ ⎥ 2 x2 2Qx 2 2R ⎢ ⎥ (g − x ), + − f3 (x) = 3 ⎢ Q ⎥ ( X ∞ + x1 ) ⎛ ⎞ Q 2 + L∞ ( + L∞ ⎟⎟ ⎥ X ∞ + x1 ) ⎜⎜ ⎢ X + x1 ⎝ X ∞ + x1 ⎠ ⎦⎥ ⎣⎢ ∞
g3 (x ) = −
g − x3 2Q . m ⎛ Q ⎞ ⎜⎜ + L∞ ⎟⎟( X ∞ + x1 ) ⎝ X ∞ + x1 ⎠
The design of optimal feedback control Mathematical model of levitation task corresponds to standard form [Víteček, A., 2000]. The aggregation matrix D, matrix of time constants T and matrix Θm have presentation: ⎡ 1 2ξ 0 ⎤ D=d =⎢ 2 1⎥, T = T3 , Θ = θ m , (22) T T 0 ⎣⎢ 0 ⎦⎥ where Ti, ξ0, θm - constants chosen with the respect for required behaviour of closed control circuit (marginal aperiodical course). We introduce (17) into (3) and obtain equation for control with sliding modes
u sl = u m sgn (m ), ⎡ 1 t m = ⎢ 2 ∫ e1dτ ⎢⎣ T0 T3 0
⎤ ⎛ 1 ⎛ 2ξ 2ξ ⎞ 1⎞ +⎜⎜ 2 + 0 ⎟⎟(e1 − e10 ) + ⎜⎜ 0 + ⎟⎟(e2 − e20 ) + e3 ⎥. ⎥⎦ ⎝ T0 T3 ⎠ ⎝ T0 T0T3 ⎠
(23)
The algorithm with function of saturation is written by equation: u sa = u m sat (θ m m ), ⎡ 1 t m = ⎢ 2 ∫ e1dτ ⎣⎢ T0 T3 0
⎤ ⎛ 1 ⎛ 2ξ 2ξ ⎞ 1⎞ +⎜⎜ 2 + 0 ⎟⎟(e1 − e10 ) + ⎜⎜ 0 + ⎟⎟(e2 − e20 ) + e3 ⎥. ⎝ T0 T3 ⎠ ⎝ T0 T0T3 ⎠ ⎦⎥
(24)
The algorithm with function hyperbolic tangent is written by equation: u tgh = u m tgh (θ m m ), ⎡ 1 t m = ⎢ 2 ∫ e1dτ ⎣⎢ T0 T3 0
⎤ ⎛ 1 ⎛ 2ξ 2ξ ⎞ 1⎞ +⎜⎜ 2 + 0 ⎟⎟(e1 − e10 ) + ⎜⎜ 0 + ⎟⎟(e2 − e20 ) + e3 ⎥. ⎝ T0 T3 ⎠ ⎝ T0 T0T3 ⎠ ⎦⎥
(25)
3 VERIFICATION DESIGNED CONTROL ALGORITHMS The designed control algorithms were verified by computer simulation using simulation programs SIPRO 3.4 and MATLAB/SIMULINK, and also directly on laboratory model, which is realised on Department of Control Systems and Instrumentation. Fig. 3 shows laboratory model and its connection to PC, which is realised by using data acquisition card AD 512. The control algorithms were created with help of program MATLAB/REAL TIME TOOLBOX. uP WINDOWS 95
1
MATLAB/REAL TIME TOOLBOX 5
2 yE
3
uE
N
yE Information of steel cylinder position
PC 4
1 – controlled system, 2 - fiber optic position sensor, 3 – gain of electric variable, which responses to steel cylinder position measured by card AD512, 4 – data acquisition card AD512, 5 – control gain to performance value. Fig. 3. Schema of realised laboratory model
The controlled system has small time constant, that means it is quick controlled system, so that why the control with sign function can not be applied, [Víteček, 2000]. The position of steel bar can be control only by algorithms with saturation function and sample time equal to 0.001s or less. Experimental verification results of position control are shown on Fig. 3 – 6. Fig. 3 – 4 show courses of position and control for required position 2V (4 mm), when chosen constant have values: T0=0.2 s, T3=0.18 s, θ m = −0.0061, Um=7 V. Experimental results for required position 1 V (5.5 mm) can be seen on Fig. 5 – 6. Chosen constants have values: T0=0.2 s, T3=0.18 s, θ m = −0.0071, Um=7 V.
position [V]
-1
8.5 control [V]
-2
8 7.5
-3
7 -4 6.5 -5 6 -6
5.5
-7
-8 0
5
0.5
1
1.5
2
2.5 time [s]
3
3.5
4
4.5
5
Fig. 3. Position of steel bar
4.5 0
0.5
1
1.5
2
2.5 time [s]
3
3.5
4
4.5
5
Fig. 4. The control with sliding modes
0
8.5 control [V] 8
position [V] -1
7.5 -2 7 -3
6.5
-4
6 5.5
-5 5 -6
-7 0
4.5
0.5
1
1.5
2
2.5 time [s]
3
3.5
4
4.5
Fig. 5. Position of steel bar
5
4
0
0.5
1
1.5
2
2.5 time [s]
3
3.5
4
4.5
5
Fig. 6. The control with sliding modes
4 CONCLUSIONS The contribution presents solving of position control of levitation steel bar in magnetic field. The control algorithms were designed with help of aggregation method using sliding modes. The algorithms with sliding modes can include sign function or saturation function. Both algorithms were designed for position control and were verified by using computer simulation, but only control with saturation function can be applied directly on laboratory model. Experimental results are shown on Fig. 3 – 6. Value of constant θ m produces control oscillation and when its value is high, the course of control is nearly the same as course of control with sign function. The research work was performed to financial support of grant GACR 102/00/0186 and grant CEZ: J17/98: 272300012.
5 REFERENCES SMUTNÝ, L. & WAGNEROVÁ, R., 1998. Position Control of Levitation Object by the Method of the Aggregation of State Variables. In: Proceedings the 3rd Scientific Technical Conference with International Participants “Process Control ’98”. Volume 2. Kouty nad Desnou : 1998, s. 381-384. ISBN 80-7194-139-5. UTKIN, V. I., 1992. Sliding Modes in Control Optimisation. Berlin: Springer - Verlag. VÍTEČEK, A., 2000. Sliding Control. In: Proceedings of International Carpathian Control Conference ´2000. Podbánské, Slovensko: Faculty BERG Technical University of Košice, 2000, pp. 531-534. ISBN 80-7099-510-6.