Vous êtes sur la page 1sur 6

X International PhD Workshop OWD2008, 1821 October 2008

Time optimal control of DC motor

Marek Dugosz, AGH University Of Science And Technology ( 2006.06.30 , prof. dr hab. in z. Wojciech Mitkowski, AGH University Of Science And Technology)
Abstract

Let us consider a performance measure be:


T

The paper presents the control of DC motor using the time optimal and the LQR controllers. Synthesis of the time optimal controller is presented in the paper. Problem which occur when time optimal controller is used are presented and possible improvments are suggested. Aproximation at the time optimal controller with the LQR controller with limited control signal amplitude is proposed. A control system with time optimal and modied time optimal controlles is presented with simulation result.
1. Time optimal control

J (u ) =
0

1d t

(4)

where T is total control time and x (T ) = 0. The control u ( t ) which minimises cost functional (4) is the time optimal control. Time optimal control u ( t ), if exsits, maximises function called Hamiltonian [1][2] H ( x ( t ), u ( t ), ( t )) H ( x ( t ), z , ( t )) and z Ud (5) (6)

Let us consider linear dynamic at system described by following equations: ( t ) = Ax ( t ) + B u ( t ) x y (t ) = C x (t ) (1)

( t ) = H ( x ( t ), u ( t ), ( t )) x For linear systems Hamiltonian is given by:

H ( x ( t ), u ( t ), ( t )) = T ( t )(Ax ( t ) + B u ( t )) (7) where ( t ) is the solution of following system of equations: ( t ) = AT ( t ) (8) Time optimal control have values only on constraints of u ( t ) for linear systems. For linear systems which matrix A have only real eigenvalues, numbers of changes control signal u ( t ) is given by n 1 [1], [2] where n is system size (1) so we must nd the switching times at u ( t ) (changes from one constraint to another), times when u ( t ) contol value should changed.
2. DC motor model

where x ( t ) is a state space vector, u ( t ) is control vector, and matrces A, B , C is real and have constant values and A Rn n , B Rn r , C Rk n , x ( t ) Rn , u ( t ) R r . Without loss of generlity we may omit the second equation (1) and assume: C= 1 0 0 1 (2)

We also consider that system given by (1) is stabilisable (pair (A, B ) is stabilisable). We assume that: u ( t ) Ud (3)

in other words control signal u ( t ) must be include in admissible set.

DC (Direct Current) motor can be described by following equations:

281

electrical equation: u t ( t ) = R t i t ( t ) + L t i t (t ) + E (t ) (9)

where u ( t ) is control voltage, R t is resistance, L t induction and mechanical equation:


Fig. 1. Schematic diagram the DC motor.

(t ) M n ( t ) MZ ( t , , ) Bv ( t ) = J

(10) 2.1. Simplied DC motor model We can simplify DC motor model (13) before we start to obtain time optimal controller. Electrical dynamics are much faster the mechanical one so 1 ( t ) = 0 then we can compute we can assume x x1 ( t ) from rst equation of model (13) and we can substitute it to the second equation of model (13) in effect we obtain: 2 ( t ) = x c M c E 2 J Rt cM J Rt Bv J 1 x2 ( t ) (14)

where M n ( t ) is motor torque, MZ load torque, Bv damping coefcient, J inertia. Let us assume M n : M n ( t ) = cM w i ( t ) and E ( t ): E ( t ) = cE w ( t ) (12) (11)

and we set x1 ( t ) = i t ( t ) , x2 ( t ) = ( t ) then we can re-write (9) and (10) as: ( t ) = Ax ( t ) + B u ( t ) + Z M z ( t ) x Rt cE L L t t A= Bv cM J J 1 0 B = L Z = 1 t 0 J

+ Let us denote: (13) a1 = a2 = a3 =

u (t ) Mz (t ) J

c M c E 2 J Rt cM J Rt 1 J

Bv J

Parameters of the motor used in simulations: MAXON2260-881-51.216-200-80W: M n = 0.301 [Mn], R t = 0.360 [],L t = 0.14 104 [H], J = 1.22 104 [k g m 2 ], cE = 50.1 103 [Vs], cM = 50.1 103 [Nm/A], Bv = 5, 23 105[N m s ], un = 15 [V]. For every pair of initial and goal points we seek control function that minimizes performance measure (4). In other words control function u ( t ) must transfer the system from the initial point to a goal point. Without loss of generality we may assume that initial point of the system is x (0) = 0 and goal point is x (T ) = 0, T - total control time. Also we expect stabilisation of the system in the goal point. In all simulations we take initial condition as x (0) = [0.3105 297.1]T . 282

Then (14) can be rewrited as: 2 ( t ) = a1 x2 ( t ) + a2 u ( t ) a3 M z ( t ) x (15)

The last element at (15) is the external load torque treateu at us a distribuance.
3. Time optimal controller

The Hamiltonian for simpli model DC motor (15) is: H ( x ( t ), u ( t ), ( t )) = a1 x2 ( t )( t ) + a2 u ( t )( t ) (16) where ( t ) is solution of following equation: ( t ) = a ( t ) 1 (17)

0.1

optimal and it is reason why the time optimal controller is not used in pratice.
4. LQR controller

0.1

0.2

0.3

0.4

Let us try to eliminate switchies of the control signal u ( t ) by using different controller for example the LQR controller. Let the performance measure be

0.5

J (x , u ) =
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

x ( t )W x T ( t ) + u ( t )Ru T ( t ) d t

0.6

Fig. 2. Error value angular velocity between model (13) and (15)
300 Angular velocity [rad/s] 250 200 150 100 50 0 50 0 0.005 Time [s] 0.01 0.015

15 10 5 u(t) [V] 0 5 10 15 0 0.005 Time [s] 0.01 0.015

(19) where W and R are real matrices of appropiate dimensions, W = W T is semi-positive denite, R = RT is positive denite (R is positive denite iff z T Rz > 0 for z = 0). The matrix W is weight matrix - appropriately seting the values for this matrix we can decide which coordinates of the state space vector x ( t ) should be better stabilised. The values of matrix R limit maximum control signal value u ( t ). If we consider that pair matrices (A; B ) of model (13) is stabilisable and (W ; A) is detectable then the optimal controller minimising (19) and stabilising system (13) at zero point is [5],[10],[8] u ( t ) = R 1 B T K x ( t ) (20)

Fig. 3. Angular velicty x2 ( t ) and control signal u ( t ) using time optimal controller (18)

where K = K T and is an unique, symetric, nonnegative solution of algebraic Riccati equation AT K + KA KB R1 B T K + W = 0 (21)

where T - total control time. The Hamiltonian reaches maximum value when control signal u ( t ) have values given by: u ( t ) = un s g n ( x2 ( t )) (18)

Let notice that control signal u ( t ) is a function which values are u ( t ) = u max or u ( t ) = u mi n and depend only on the sign of the angular velocity x2 ( t ) = ( t ). As we can see on Fig. 3 time optimal controller given by (18) transferring system (13) from the initial conditions x (0) to the goal condition x (T ) = 0. Let notice when system is near goal condition we can see a lot of switches in the control signal u ( t ). This is main disadvantage of time 283

As we can see on Fig. 4, LQR controller transfers system (13) from the initial conditions x (0) to the goal condition x (T ) = 0. Let us notice that the switchies in control signal u ( t ) do not occur but goal condition x (T ) = 0 is reached later. The LQR controller need more time then the time optimal controller. For simulation it was chosen that: W= 1 0 0 10 R = [1000]

5. Controller switching

The time optimal controller given by (18) is very fast but direc use of this controller is not possible because of the frequent switches in the control signal u ( t ) after the goal reaching. The LQR

300 Angular velocity [rad/s] Angular velocity [rad/s] 0 0.01 0.02 0.03 0.04 0.05 Time [s] 0.06 0.07 0.08 0.09 0.1 250 200 150 100 50 0

300 250 200 150 100 50 0 0 0.01 0.02 0.03 0.04 0.05 Time [s] 0.06 0.07 0.08 0.09 0.1

5 5 u(t) [V] 10 u(t) [V] 10 15 0 0.01 0.02 0.03 0.04 0.05 Time [s] 0.06 0.07 0.08 0.09 0.1 15 0

20

0.01

0.02

0.03

0.04

0.05 Time [s]

0.06

0.07

0.08

0.09

0.1

Fig. 4. Angular velocity x2 ( t ) and control signal u ( t ) using LQR controller (20)

Fig. 6. Angular velocity x2 ( t ) and control signal u ( t ) using the time optimal controller (18) and the LQR controller (20) and the controll law (22)

300 Angular velocity [rad/s] 250 200 150 100 50 0 50 0 0.01 0.02 0.03 0.04 0.05 Time [s] 0.06 0.07 0.08 0.09 0.1

Fig. 5. Schematic diagram ilustrating control system which two


0 u(t) [V]

controllers which are switching.

controller given by (20) does not have this disadventage but this controller is slower. We can use both controllers using principle: if system is far from goal point point we use the time optimal controller (18), if we come close the to zero goal point we start to use the LQR controller (20). There are many possible algorithms for swiching of controllers. One of them present below. Let us denote p is a certain value of angular velocity, then control law can be: u (t ) = R1 B T K x ( t ) | x2 ( t )| p un s g n ( x2 ( t )) | x2 ( t )| > p (22)

10

15

0.01

0.02

0.03

0.04

0.05 Time [s]

0.06

0.07

0.08

0.09

0.1

Fig. 7. Angular velocity x2 ( t ) and control signal u ( t ) usign the time optimal controller (18), the LQR controller (??), the controll law (22) with p = 12.5 rad / s and external disturb of angular velicty.

of control signal u ( t ) can occur which we want to eliminate. On Fig. 8 we show a phase portrait of system with three different controllers. Let us notice that connection of two controllers (time optimal and LQR) gives compromise solution, we have fast controller without switchings and a stabilisation in goal point. On Fig. 7 angular velocity x2 ( t ) is show which are disturbed. Value of p was set on 12.5 rad / s and we can notice the occurence of switches unwanted switches control signal u ( t ). We can eliminated this switches by set larger value of p . If 284

where x2 ( t ) = ( t ). On Fig. 6 presents angular velocity x2 ( t ) and control signal u ( t ) when two controllers are used. Value of p was set on 20 rad / s . Firstly works the time optimal controller (18) is used and when the angular velocity x2 ( t ) | p | is turned on LQR controller (20). The value of p can be smaller but if this value will be to small then the switches

300 Timeoptimal LQR Timeoptiam+LQR 250


Angular velocity [rad/s] 250 200 150 100 50 0 0 0.005 0.01 Time [s] 0.015 0.02 0.025

300

200 Angular velocity (t) [rad/s]

150

100

50

u(t) [V] 10

50 80

60

40

20 Current i(t) [A]

20

40
15 0 0.005 0.01 Time [s] 0.015 0.02 0.025

Fig. 8. Phase portrait of DC motor system witch three dierent controllers (time optimal, LQR, time optimal+LQR). Fig. 9. Angulr velocity x2 ( t ) and control signal u ( t ) using sub time optimal controller show on Fig. 11

distribuance are not to big only the LQR controller works which also stabilises the system in goal point.
300

6. Approximation time optimal controller by using LQR controller

Timeoptimal LQR 250

The time optimal controller (18) and the LQR controll (20) for linear systems (13) can be approximated by one LQR conroller with proper gain matrix K . If we take small value of elements matrix R then control signal amplitude can be much bigger than admissible control value. So we must limit this value for example using function: u (t ) = u (t ) s g n ( u ( t )) u max | u ( t )| p | u ( t )| > p (23)

200 Angular velocity (t) [rad/s]

150

100

50

50 100

80

60

40 20 Current i(t) [A]

20

40

In rst phase when control signal value is big it is limited to admissible level un . This is simillar to the time optimal controller work. When the control signal is adimissible then is not limited and we see LQR controller operating. As we can see on Fig. 10 phase portrait of DC motor with approximated optimal time controller is close to the phase portraint with time optimal controll. If sytem is near goal point phase portait starts differing from phase portrait time optimal controller. In this case we also not observ switches and additionaly we do not need any control law given by (22).
7. Conclusion

Fig. 10. Phase portrait of DC motor system with time optimal controller and approximation time optimal controller.

x = Ax+Bu y = Cx+Du StateSpace1 Saturation Gain K*u Scope1

Fig. 11. Schematic diagram of DC motor system with approximation time optimal controller

Time optimal controller is the fastest controller which transffering system from initial point to 285

goal point. Main disadvantage of the time optimal are switches oscilations in near goal point, and it is the reason why the time optimal controller is not used in pratice. Second controller the LQR controller does not have this disadvantage but his work is much slower than the time optimal controller. Additionaly this kind of controller can stabilise system in ordered point in our case this is the goal point. If we use this two controllers and add proper control law for example (22) in efect we obtain a fast controller without the disadvantage of time optimal controller and LQR controller. We use the best properties of these controllers. For linear systems we can use the approximation of the time optimal controlle using LQR controller with proper matrxi R and a saturation of control signal amplitude. Proposed control system contain two controllers (time optimal and LQR controller) works ne even if we add external disturbance. In this paper we assume matrix C is given by (2) means that the entire state x system is known.In real application often it can is not always possible. All state variables are needed for the LQR controller. If we does not have all the state variables we must estimated missing state variables using observers. The LQR controller always needs all state variables for the time optimal controller it depends on system which will be controlled. All simulations were made using MATLAB with Simulink.
Bibliography

[ 7] [ 8]

[ 9] [10] [11]

[12]

[13]

staego. In K. Malinowski and eds L. Rutkowski, editors, Aktualne problemy i ich rozwi azania, 2008. T. Kaczorek. Teoria ukadw regulacji automatycznej. Warszawa WNT, 1977. W. Mitkowski M. Dugosz. Stabilisation of dc motor using lq and deadbeat controllers. In Gra zyna Wegiera Piotr Holajn, Dariusz Spaek, editor, 30th International Conference on Fundamentals of Electrotechnics and Circuit Theory, 2007. W. Mitkowski. Energy-optimal control. In Materiay Konferencyjne SPETO2002, 2002. Wojciech Mitkowski. Stabilizacja Systemw Dynamicznych. WNT, 1991. L. Leszczy nski J. Puaczewski. Dwuetapowe algorytmy sterowania. Pomiary Automatyka Robotyka, (4):1217, 2004. M. Tomera. Prosty regulator hybrydowy. In L. Rutkowski K. Malinowski, editor, Sterowanie i automatyzacja: aktulane problemy i ich rozwi azania, pages 127134, 2008. J. Zak. Sterowanie dwuetapowe. In Materiay Konferencyjne KKA, 2008.

Authors:

mgr in z.Marek Dugosz AGH University Of Science And Technology Al. Mickiewicza 30/B-1 p.303 30-101 Krakw tel(012) 617 48 38 email:mdlugosz@ia.agh.edu.pl This work was supported by Ministry of Science and Higher Education in Poland in the years 2008-2011 as a research project No N N514 414034.

[1] M. Athans. Sterowanie optymalne : wst ep do teorii i jej zastosowanie. Warszawa WNT, 1969. [2] W.G. Botianski. Matematyczne metody sterowania optymalnego. WNT, 1971. [3] M. Dugosz. Stabilizacja systemw dynamicznych przy pomocy regulatorw suboptymalnych. In Archiwum Konferencji PTETiS, volume 22, pages 357361, 2006. [4] H. Grecki. Optymalizacja systemw dynamicznych. PWN, 1993. [5] A. Korytowski W. Mitkowski H. Grecki, S. Fuksa. Sterowanie optymalne w systemach z liniowym kwadratowym wska znikiem jako sci. PWN Warszawa, 1983. [6] M. Dugosz J. Baranowski. Sterowanie czasooptymalne silnikiem obcowzbudnym pr adu

286

Vous aimerez peut-être aussi