Tuning of angular velocity observers
Jerzy Baranowski, Marek Długosz,
Akademia Górniczo-Hutnicza w Krakowie
Abstract In this paper a new method of observer tuning is considered. Some sufficient conditions for exponential matrix to be a contraction semigroup are presented. The results are applied with velocity observers for separately excited and series DC motors.
result in chosen polynomial. When m > 1 (many outputs) and system is observable from more than one of them the choice of G is much more problematic - infinite number of gains results in the same characteristic polynomial. 2. Multi output observers
1. Introduction Common problem in the control of electric motors is lack of the angular velocity measurements. Typically we measure only the angular position via encoders or resolvers. Instead of numerical differentiation of the position signal - which greatly increases disturbance effects on the system the more sophisticated approach is to construct a state observer. Velocity observers for DC motors - described by continuous, discrete, linear and nonlinear models - were considered among the others in[1, 2, 4, 7, 10–12]. In this paper we will consider velocity estimation using the measurements of angular position and current. A very effective tool for state estimation is the full rank Luenberger observer (see for example [9, 10]). Let us consider systems described by following equations x(t) ˙ = Ax(t) + Bu(t) y(t) = Cx(t)
(1)
where x(t) ∈ Rn , u(t) ∈ Rr and y(t) ∈ Rm with A, B and C of appropriate dimensions. The Luenberger observer takes form x ˆ(t) = Aˆ x(t) + Bu(t) + G(y(t) − C x ˆ(t))
(2)
where the state estimate x ˆ(t) ∈ Rn and gain matrix G ∈ Rn×m . The estimation error is given by e = x−x ˆ evolves according to the equation e˙ = (A − GC)e
(3)
It is widely known, that if pair (C; A) is observable (rank([C T (CA)T . . . (CAn−1 )T ]) = n) then one can find such G that results in a desired characteristic polynomial of A−GC. Essentially G should be chosen in such way, that the equation (3) is asymptotically stable. In that case e will tend to zero, as time follows. In the case of m = 1 (systems with one output) it is straightforward to chose G that will
Generally because the choice of G is not unique it in natural to chose one in a way, that will be beneficial, for example by minimisation of certain performance indexes. In authors previous works ([3, 4, 12]) following indices were considered (let us consider G = [gij ]n×m ) 1. Disturbance augmentation J1 (G) = kGk2 =
m n X X
2 gij
(4)
i=1 j=1
2. Minimal dynamical error J2 (G) = λmax (H)
(5)
(A − GC)T H + H(A − GC) = P
(6)
where
with H, P ∈ Rn×n are symmetric positive semidefinite. It corresponds to dynamical error because Z ∞ eT (t)P e(t)dt = eT (0)He(0) (7) 0
Both of them were subjected to constrained minimisation, keeping the roots of the characteristic polynomial fixed. In this paper we want to focus on different approach. Our intention, is to guarantee, that the estimation error norm will be steadily reducing over time and does not exceed its initial value. It is desired because it is quite common when using observers with high gains, to obtain large transitional error (so called peaking phenomena). In order for this to happen, the error dynamics must evolve as a contraction semigroup, that is k exp((A − GC)t)k ≤ e−αt , α > 0. It gives an exponential bound on the vanishing of error and guarantees that the error will not exceed the initial value.
and for each 1 ≤ i ≤ n the following inequalities hold
3. Bound on the matrix exponential In order to guarantee the fulfillment of k exp((A − GC)t)k ≤ e−αt , α > 0 t ≥ 0
one needs to find a way to asses the value of matrix exponential norm. It is rather obvious, that determination of such norm explicitly, especially as a function of observer parameters is difficult, if not entirely impossible. We will p focus on the spectral norm i.e. kAk = max1≤i≤n λi (A∗ A), where A∗ denotes conjugate transpose of A. Let us introduce a following Definition 1 (Dampening coefficient). A real number µ(A) will be called a dampening coefficient of matrix exponential of A if kI + ∆Ak − 1 µ(A) = lim ∆→0+ ∆
For spectral norm we have A + AT µ(A) =λmax 2
n X
|aii | > |aii | >
j=1, j6=i n X
|aij |
(13)
|aji |
(14)
j=1, j6=i
then a matrix exponential is a contraction semigroup and keAt k is bounded by keAt k ≤ eαt α = sup aii +
(15)
n X j=1, j6=i
1 (aij + aji ) 2
(9)
(16)
(10)
Proof. First one should see that Gershgorin discs of matrices A and AT are located strictly in left open complex half plane, it is assured by assumptions (13) and (14). Let us analyse the dampening coefficient of A
(11)
µ(A) = λmax (B)
More on dampening coefficient (under the name logarithmic norm) see [8]. As it can be seen if damping coefficient is negative then we have our desired contraction property. However determining the coefficients explicitly from (11) is not practical for tuning the observers - it leads to a non-smooth optimisation problem. On the other hand one can use a following Theorem 1 (Gershgorin see [13 p. 50 ]). Let A = [aij ] be a matrix with complex elements aij . Let us denote by Ki a closed disk on the complex surface center of which is at aii with a radius ri =
n X
1≤i≤n
Dampening coefficient fulfills keAt k ≤ eµ(A)t
(12)
aii < 0
(8)
|aij |
j=1,j6=i
Every eigenvalue of A lies inside or on the boundary of one of discs K1 , K2 , . . . , Kn . Using Gershgorin theorem we will prove a necessary condition for given matrix exponential to be a contraction semigroup Proposition 2. For A ∈ Rn×n such as that a11 a12 . . . a1n a21 a22 . . . a2n A= . .. .. .. .. . . . an1 an2 . . . ann
B=
A+A 2
(17)
T
(18)
Elements of B are given by bii = aii 1 bij = (aij + aji ) 2
(19) (20)
We will show now, that Gershgorin discs of matrix B are also located strictly in left open complex half plane. First, because the diagonals (12) and (19) are equal, then centers of Gershgorin discs are located in negative part of real axis. Let us check now the radii of discs. For given i we have ri given by n n X X 1 (aij + aji ) ≤ ri = |bij | = 2 j=1, j6=i j=1, j6=i n n X 1 X ≤ |aij | + |aji | < 2 j=1, j6=i
j=1, j6=i
1 < (|aii | + |aii |) = |aii | 2 It means, that for every given i the radius of Gershgorin disc is lower than the distance of disc center from the imaginary axis. That is why, according to Gershgorin theorem, and because B is symmetric,
all its eigenvalues are located in the negative part of real axis. From (17) we then get, that the dampening coefficient of A is negative. In consequence it means, that according to (10) keAt k is bounded by vanishing exponential function. The last thing is to give the bound on µ(A). Because all eigenvalues of B are located in some closed interval (or sum of closed intervals), the upper bound on the largest eigenvalue will be the end of the interval closest to the imaginary axis. The value α of this point is given by (16).
10
8
6
α(t) [rad] 4
2
0
−2
These results can be used as an useful tool for observer tuning. One can chose G in such way, that the proposition 2 form matrix A − GC will hold. The assumptions of proposition 2 are unfortunately very restrictive. It is however possible to guarantee the contraction property without fulfilling them. One such way, is to locate the Gershgorin discs of matrix 0.5((A − GC)T + A − GC) in left open complex half plane. Such approach will be considered in following section
Angular position Estimate of position
0
0.01
Fig. 2. State estimation in separately excited DC motor - angular position and its estimate
45 40 35 30 25 it(t) [A]
Armature current Estimate of current
20
4. Applications
0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 t [s]
15 10 5
4.1. Separately excited DC motor
0
0
0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 t [s]
0.01
Fig. 3. State estimation in separately excited DC motor - armature current and its estimate 120
100
80 18 60 ω(t) [rad/s]
16 Angular velocity Estimate of velocity
14
40
12 20 10 ||e(t)|| 0
−20
8 6 0
0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 t [s]
0.01
Fig. 1. State estimation in separately excited DC motor - angular velocity and its estimate
Separately excited, armature controlled DC motor can be modeled by the following system of
4 2 0
0
0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 t [s]
0.01
Fig. 4. State estimation in separately excited DC motor - norm of estimation error
differential equations (see [7]) x(t) ˙ = Ax(t) + Bu(t) + ZMz (t) 0 0 1 A = 0 a b 0 c d 0 0 B = L1t Z = 0 − J1 0
(21)
where Mz is the load torque, u(t) is the armature voltage, x = [x1 x2 x3 ]T , x1 = α is the angular position, x2 = it is the armature current and x3 = ω is the angular velocity. Elements of A are given by Rt Lt Km φw c= J
a= −
Km φw Lt Bv d= − J b= −
are left with two parameters that will not violate desired structure and can be used to tune the speed of observer convergence. We have tested the arising observer (22) with gain matrix (25), using motor parameters described in [7], through simulations. Tuning parameters were chosen as g11 = 1000 and g22 = 0, this choice was motivated by the desire of small disturbance augmentation, especially in fast and numerical instability prone electrical dynamics. The results of simulations are presented in figures 1–4. Especially interesting is the angular velocity plot in figure (1). As it can be seen, initial error is quickly compensated. As it can be seen in figure 4 the desired exponential vanishing of error was obtained. 4.2. Series DC motor
140
Luenberger observer takes form
120 Angular velocity Estimate of velocity 100
x ˆ(t) = Aˆ x(t) + Bu(t) + ZMz (t) + G(y(t) − C x ˆ(t)) (22) with g11 g12 G = g21 g22 (23) g31 g32 In order to apply results from previous section we have to consider the matrix −g11 −g12 1 A − GC = −g21 a − g22 b (24) −g31 c − g32 d It can be easily verified, that for real motor parameters matrix (24) cannot fulfill the assumptions of proposition 2. However when considering matrix Q = 0.5((A − GC)T + A − GC) we get − g12 − g21 1 − g31 −g 11 2 2 − g12 − g21 b + c − g32 Q= a − g 22 2 2 1 − g31 b + c − g32 d 2 2
80 ω(t) [rad/s] 60
40
20
0
0
1
2
3
4
5 t [s]
6
with g11 > 0 and g22 > a we will locate the Gershgorin discs of Q in left open complex half plane. We
8
9
10
Fig. 5. State estimation in series DC motor - angular velocity and its estimate
100 90 80 70 60 α(t) [rad] 50 40
Angular position Estimate of position
30
It can be easily verified that setting gain matrix g11 0 (25) G= 0 g22 1 b+c
7
20 10 0
0
0.1
0.2
0.3
0.4
0.5 t [s]
0.6
0.7
0.8
0.9
1
Fig. 6. State estimation in series DC motor - angular position and its estimate
where Mz is the load torque, u(t) is the motor voltage, x = [x1 x2 x3 ]T , x1 = α is the angular position, x2 = it is the motor current and x3 = ω is the angular velocity and parameters are:
4 3.5 Motor current Estimate of current
3
2.5
Rt + Rw Lt + Lw 1 β= Lt + Lw Bv γ2 = J
α1 =
it(t) [A] 2
1.5 1
0.5 0
0
0.1
0.2
0.3
0.4
0.5 t [s]
0.6
0.7
0.8
0.9
1
Km Lw Lt + Lw Km Lw γ1 = J Mz τ= J
α2 =
The system (26) is transformable by the following change of coordinates (see [2, 5, 6, 12])
Fig. 7. State estimation in series DC motor - motor current and its estimate
ξ1 = x1 ξ2 = lnx2 ξ3 = x3
12
into an observer form (for simplicity, unchanged variables were kept)
10
8
x˙ 1 = x3 ||e(t)|| 6
ξ˙2 = − α1 − α2 x3 + β 4
u exp(ξ2 )
x˙ 3 = γ1 exp(ξ2 )2 − γ2 x3 − τ 2
0
0
1
2
3
4
5 t [s]
6
7
8
9
10
Fig. 8. State estimation in series DC motor - norm of estimation error Above results in some cases can also be applied for nonlinear systems. A DC motor in which the field circuit is connected in series with the armature circuit is referred to as a series DC motor. Due to this electrical connection, the torque produced by this motor is proportional to the square of the current (below field saturation), resulting in a motor that produces more torque per ampere of current than any other dc motor. Such a motor is used in applications that require high torque at low speed, such as subway trains and people movers. In fact, the series motor is the most widely used dc motor for electric traction applications [6]. Series DC motor can be modeled by the following system of differential equations x˙ 1 = x3 x˙ 2 = − α1 x2 − α2 x2 x3 + βu x˙ 3 =
γ1 x22
− γ2 x3 − τ
(26)
which after the substitution of ξ2 on the right side by lnx2 allows the construction of the following observer x ˆ˙ 1 = x ˆ3 + g11 (x1 − x ˆ1 ) + g12 (lnx2 − ξˆ2 ) u ˙ ξˆ2 = β − α1 − α2 x ˆ3 + g21 (x1 − x ˆ1 ) + g22 (lnx2 − ξˆ2 ) x2 x ˆ˙ 3 = γ1 x2 − γ2 x ˆ3 − τ + g31 (x1 − x ˆ1 ) + g32 (lnx2 − ξˆ2 ) 2
or equivalently ˙ x ˆ3 x ˆ1 x1 − x ˆ1 ξ˙2 = β u − α − α x (27) 1 2 ˆ3 + G x lnx2 − ξˆ2 2 x˙ 3 γ1 x22 − γ2 x ˆ3 − τ which is a nonlinear full rank observer estimating the angular position, natural logarithm of armature current, angular velocity and the load torque. G has the same form as (23). Estimation error of observer (27) is described by following linear differential equation g11 g12 1 e˙ = g21 g22 −α2 e = F e (28) g31 g32 −γ2
As it can be seen form equation (28) we can apply the same approach for choice of parameters as for separately excited motor. The matrix Q = 0.5(F + F T ) takes form −g11 − g12 − g21 Q= 2 1 − g31 2
− g12 − g21 2 −g22 − α2 − g32 2
1 − g31 2 − α2 − g32 2 −γ2
Similar to the previous example, we can construct a gain matrix, that will locate the Gershgorin discs of Q in left open half plane. Such gain matrix has form g11 0 G= 0 (29) g22 1 −α2 with g11 > 0 and g22 > 0. Again g11 and g22 are tuning parameters, that do not violate the desired structure. We have applied observer (27) with gain (29). Tuning parameters were chosen as g11 = g12 = 200. Simulations were obtained for parameters from [6]. Results are presented in figures 5–8. Because the observer convergence in the case of position and current is rapid, in order to increase legibility, the timescale of plots in figures 6 and 7 was shorter than in other plots. As it can be seen in figure 8 the desired exponential vanishing of error was obtained. Speed estimation can be observed in figure 5. 5. Conclusions Some new results on state observer tuning were presented. Using the Gershgorin theorem, a sufficient condition for contracting observer error was proved. Results were applied in observer design of two different types of DC motors - one with linear (separately excited) and one nonlinear (series) models. Results seem to be promising, especially, that they have at least partially robust. Acknowledgements Work financed by state science funds for 20082011 as a research project. Contract no. N N514 414034 Bibliography [1] J. Baranowski. Projektowanie obserwatora dla serwomechanizmu pradu ˛ stałego. In Materiały VIII Miedzynarodowych ˛ Warsztatów Doktranckich OWD 2006, volume 2, pages 373–378, Wisła, 24.10. 2006.
[2] J. Baranowski. Projektowanie obserwatora dla silnika szeregowego pradu ˛ stałego. Półrocznik AGH AUTOMATYKA, 10(1):33–52, 2006. [3] J. Baranowski. State estimation in linear multi output systems - design example and discussion of optimality. Półrocznik AGH AUTOMATYKA, 10(2):119–131, 2006. [4] J. Baranowski, M. Długosz, and W. Mitkowski. Remarks about dc motor control. Archives of Control Sciences, 18(LIV)(3):289–322, 2008. [5] J. Chiasson. Nonlinear differential-geometric techniques for control of a series dc motor. IEEE Transactions on Conrol Systems Technology, 2(1):35–42, March 1994. [6] J. Chiasson and S. Metha. Nonlinear control of a series dc motor: Theory and experiment. IEEE Transactions on Industrial Electronics, 45(1):134–141, February 1998. [7] M. Dlugosz. Problemy optymalizacji układów napedowych ˛ w automatyce i robotyce. PhD thesis, Akademia Górniczo-Hutnicza, 2009. Supervisor: W. Mitkowski. [8] H. Guang-Da and L. Mingzhu. The weighted logarithmic matrix norm and bounds of the matrix exponential. Linear Algebra and its Applications, 390:145–154, 2004. [9] T. Kaczorek. Polynomial and Rational Matrices. Applications in Dynamical Systems Theory. Springer-Verlag, London, 2007. [10] W. Mitkowski. Stabilizacja systemów dynamicznych. WNT, Warszawa, 1991. [11] W. Mitkowski. Stabilizacja systemów dynamicznych. Wydawnictwa AGH, Kraków, 1996. [12] W. Mitkowski and J. Baranowski. Observer design for series dc motor – multi output approach. In Materiały XXX Miedzynarodowej ˛ konferencji z podstaw elektrotechniki i teorii ´ obwodów IC-SPETO, pages 135–136, Ustron, 23-26.05 2007. Extended version on CD. [13] A. Turowicz. Geometria zer wielomianów. PWN, Warszawa, 1967. Authors contact data: mgr in˙z. Jerzy Baranowski dr in˙z Marek Długosz e-mail:
[email protected],
[email protected] Akademia Górniczo-Hutnicza Katedra Automatyki Al. Mickiewicza 30/B1 30-059 Kraków phone. +48(012)617-28-34 www: http://sdts.ia.agh.edu.pl