Marek Długosz, WOJCIECH MITKOWSKI AGH UNIVERSITY OF SCIENCE AND TECHNOLOGY KRAKÓW, POLAND
Control system for tracking angular postion dc servomotor Key words: DC servomotor, controll, deadbeat, lqr
3
1
Proposed control system is built with two controllers: LQR and deadbeat controller which are shortly described below.
Introduction
Our problem is to find a controller for DC servomotor which is tracking ordered angular value. DC servomotor is described by equations: ˙ x(t) = Ax(t) + Bu(t)
(1)
where x(t) is state space vector, u(t) is control vector and A and B are real constant matrices of appropriate dimensions. The controller should minimize performance index given by: Z I=
T
2 α(t) − αR (t) dt
3.1
Control system
LQR controller
Let us consider a performance index: Z ∞ T T J(x, u) = x(t) Wx(t) + u(t) Ru(t) dt T
T
where W = W ≥ 0, R = R > 0. If we consider that pair (A, B) is stabilisable and (W, A) is detectable then optimal controller minimising (4) and stabilising system (1) is given by [3]: T
u(t) = −R−1 B Kx(t)
(2)
0
This type of performance index minimises transitory error between ordered value of αR (t) and angular value of dc servomotor α(t). In this paper we consider computer control system includes two different controllers, which realise desired control task. This type of control was considered for example in [6]. In paper [2] control system using two controllers for dc servomotor is considered but without optymalisation.
T
T
KBR−1 B K − A K − KA − W = 0 3.2
DC servomotor can be describe by equations (1) with matrices A and B given by: 1 0 B= a b
T
(6)
Deadbeat controller
Deadbeat controller stabilise in 0 point discret system [4]: (7)
Let us choice
Model of DC servomotor
0 A= 0
(5)
where K is unique, symetric, nonnegative solution of algebraci Riccati equation:
x(k + 1) = Ad x(k) + Bd u(k)
2
(4)
0
(3)
where x(t) = [α(t) ω(t)] , α(t) is angular position, ω(t) is angular velocity. Parameters of model come from real laboratory servomotor plant and was calibrated so angular position and angular velocity are between -1 to 1 values.
u(k) = Kd x(k)
(8)
Then using (8) in (7) we obtain: x(k + 1) = Ad + Bd Kd x(k)
(9)
If pair (Ad , Bd ) is controllable we can set Kd such, that eigenvalues of matrix (Ad + Bd Kd ) have chosen values. If we set eigenvalues matrix (Ad + Bd Kd ) for 0, then based on Cayley-Hamiltion [8] theorem after n step system (9) reached 0 point [7] and n is dimension of system (7).
Computer control system
1
Consider control system includes two controlers: LQR and deadbeat controller and adequate switching algorithm. The control system is implemented in computer. This system is presented in figure 1.
0.5
α
3.3
0 −0.5
0
2
4
6
8
10
12
14
16
18
20
12
14
16
18
20
12
14
16
18
20
Czas [s] 1
Control computer α
0.5
Switching algorithm
u1
Controller 1
0 −0.5
x_zad
0
2
4
6
8
10
Czas [s]
Object
u2
0.8
Controller 2 α
0.6 0.4 0.2 0
Fig. 1: Schematic diagram of the controll system. Let us consider: ∆α(t) = |α(t) − αR (t)|
(10)
where αR (t) is desired angular value. If value of ∆α(t) is greater then αS (t) then the deadbeat controller is used. If value of ∆α(t) is smaller then αS (t) then the LQR controller is used. This is simple control law which is realised by switching algorithm. u(t) =
use deadbeat use LQR
∆α(t) > αS (t) ∆α(t) ≤ αS (t)
0
2
4
6
8
10
Czas [s]
Fig. 3: Angular value of DC servomotor for three different values of αS (t) = const. Figure 3 shows angular value of dc servomotor for three different values of αS . As we can notice for some value of αS output reached desired value in short time but can occure oscilation. For other value of αS output reached desired value without occure oscilation but in long time. 0.206
(11)
0.204 0.202
where αS (t) is switch point. The deadbeat controller can move system from any start point x(t) 6= 0 to 0 point in particular time. The LQR controller is used to stabilise system state in ordered value.
0.2
J
0.198 0.196 0.194
1
DB
0.9
LQR
DB
0.192
LQR
0.19
α
0.8 0.7
0.188
0.6
0.186
0
0.1
0.2
0.5
0.3
αS
0.4
0.5
0.6
0.7
0.4 0.3 0.2 0.1 0
0
1
2
3
4
5
6
7
8
9
Time [s]
Fig. 2: Angular position of servomotor controlled LQR and deadbeat regulator. Figure 2 shows example angular value of dc servomotor controled by two controllers. On this figure we signed regions when works proper controllers deadbeat or LQR.
4
Optimal choice parameters of control system
For correct work control system parameter αS (t) should be chosen propertly. This parameter depends on the ordered angular value αR (t).
Fig. 4: Change performance index (2). Figure 4 shows changes performance index (2) in function αS (t) and αR (t) = const. As we can notice for ordered angular value exists αS (t) when minimum of performance index (2) is reached. Value of αS (t) depends on ordered angular αR (t). For αR (t), which is time interval constant function, relation αS (t) in function of αR (t) show figure 5 gray line. Black line on figure 5 shows linear aproximation αS (t) in function αR (t). αS = aαR + b
(12)
This aproximation αS (t) is used in the control system described in section 3.
5
Simulations
All simulations was made in MATLAB/Simulnik environment. For given performance index (2) coefficients of linear aproximation (12) was obtained in numerical experiment.
0.22 0.29
0.2 0.18
0.28 0.16 0.27
0.12
J
α
S
0.14
0.1
0.26
0.08 0.25 0.06 0.04 0.02
0.24 0
0.1
0.2
0.3
0.4
0.5
αR
0.6
0.7
0.8
0.9
1 0.23
0
Fig. 5: Linear aproximation (black line) αS in function of ordered angular αR .
0.1
0.2
0.3
αS
0.4
0.5
0.6
0.7
Fig. 7: Change performance index (13).
Figure 6 shows effect of works control system with linear aproximation of αS (t). As we can see, tracking of ordered angular value is very good. In first phase works the deadbeat controller and angular value of DC servomotor moves fast to ordered value. In second phase the LQR controller works and angular value of DC servomotor is stabilised on ordered value.
0.5 0.45 0.4 0.35
0.9
0.3
αS
0.8 0.25
0.7 0.2 0.6
α(t)
0.15 0.5
0.1
0.4
0.05
0.3
0
0
0.1
0.2
0.3
0.4
0.5
α
0.6
0.7
0.8
0.9
1
R
0.2 0.1 0
0
5
10
15
20
25
30
Time [s]
Fig. 8: Linear aproximation (black line) αS in function of ordered angular αR .
Fig. 6: Angular position of servomotor controlling by two controlers for perfomance index (2).
0
This type of performance index minimised transitory error between ordered value of αR (t) and angular value of dc servomotor α(t) and angular velocity ω(t). Figure 7 show changes performance index (13) in function αS (t) for constant value angular αR . Also in this case exist one αS (t) when miminum performance index (13) is reached and coefficients of linear aproximation (12) was found. Figure 9 shows angular positon od dc servomotor for performance index (13). As we can notice angular positon α(t) slowly reached ordered value αR (t) because control signal also minimise angular velocity ω(t).
0.7
0.6
0.5
α(t)
Using computer for controll give ability easy change performance index (2) to other. Let us consider other performance index given by: Z T 2 I2 = α(t) − αR (t) + 0.5ω(t)2 dt (13)
0.8
0.4
0.3
0.2
0.1
0
0
5
10
15
20
25
30
Time [s]
Fig. 9: Angular position of servomotor controlling by two controlers for perfomance index (13).
Figure 10 shows control signal value u(t). We can notice regions where deadbeat controller and LQR controller operate. 1 0.8 0.6 0.4
u(t)
0.2 0 −0.2 −0.4 −0.6 −0.8 −1
0
5
10
15
20
25
30
Time [s]
Fig. 10: Controll signal u(t) for perfomance index (13).
6
Conclusion
Use of computers in control system enables building more advanced control systems. Example of one system is described in this paper. Control system includes two different regulators: LQR and deadbeat controller. We used the best features of these controlers for control DC servomotor. The deadbeat controler is fast but quality of stabilisation is not good - sometimes it can cause oscilation. The LQR controler is not fast but quality of stabilistation is good. Using this two controllers in proper way we can obtain control system which is fast and quality of stabilisation is good. The control system minimizes given performance index. Work of this two controlers is managed by simple algorithm. For correct work this algorithm is nessesary to properly choose a point when the controlers should work. This point depends on the ordered value and was aproximated by linear function. Described servomotor is small power electrical machine and step changes control signal are allowed. For eletrical machines which are big power engines step changes control signal could damage ones. In future works will be consider control system which can generate control signal which can be use for big power machines.
ACKNOWLEDGMENT Work financed by state science funds for 2008-2011 as a research project. Contract no. N N514 414034.
7
REFERENCES
[1] J. Baranowski, M. Długosz, and W. Mitkowski. Remarks about dc motor control. Archives of Control Sciences, 18(3):289–322, 2008. [2] M. Długosz. Sterowanie serwomechanizmem prądu stałego przy pomocy dwóch regulatorów. In W Materiały XI Międzynarodowych Warsztatów Doktoranckich OWD, volume 26, pages 397–402. Polskie Towarzystwo Elektrotechniki Teoretycznej i Stosowanej, 2009.
[3] H. Górecki, S. Fuksa, A. Korytowski, and W. Mitkowski. Sterowanie optymalne w systemach z liniowym wskaźnikiem jakości. PWN Warszawa, 1983. [4] W. Grega. Metody i algorytmy sterowania cyfrowego w układach scentralizowanych i rozproszonych, volume 7 of Monografie. Uczelniane Wydawnictwo Naukowo-Dydaktyczne AGH, Kraków, 2004. [5] K. Hajduk, M. Pauluk, and A. Turnau. Sterowanie serwomechanizmem cyfrowym w środowisku matlaba. In I Krajowa Konferencja Użytkowników MATLAB-a, pages 203–208, 1995. [6] L. Leszczyński and J. Pułaczewski. Dwuetapowe algorytmy sterowania. Pomiary Automatyka Robotyka, 4:12–17, 2004. [7] W. Mitkowski. Stabilizacja Systemów Dynamicznych. WNT Warszawa, 1991. [8] A. Turowicz. Teoria macierzy. Wydawnictwo AGH, 1996.
8
SHORT ABSTRACT
In this paper we presented control system of DC servomotor. Control system includes two controllers: LQR and deadbeat controller. The deadbeat controller works when current angular value of servomotor is far from ordered angular value. The LQR controller works when current angular value of servomotor is near ordered angular value. Time, when first controler should stop work and second should start work is important for quality of control and is depend on ordered angular. dr inż. Marek Długosz prof. dr hab. inż. Wojciech Mitkowski Akademia Górniczo-Hutnicza Wydział Elektrotechniki, Automatyki, Informatyki i Elektroniki Katedra Automatyki Al. Mickiewicza 30/B1 30-059 Kraków E-mail:
[email protected] [email protected]