remarks about dc motor control

0 downloads 0 Views 570KB Size Report
Jun 5, 2008 - open and leave field for an improvement, for example properties of ... [9] A. Ciepiela and J. Wyżga: Astatyczny układ regulacji prędkości silnika.
REMARKS ABOUT DC MOTOR CONTROL∗ J. Baranowski

M. Długosz

W. Mitkowski

June 5, 2008

Abstract This paper was motivated by known results in the electric motor control (see for example [27], [9]) where classical control algorithms were verified in the experimental framework. We want to show, that the control theory offers more sophisticated control methods that await their practical implementation. Presented algorithms for both continuous and discrete control and state estimation give many possibilities of improvement in the field of electric drive control. Our results are illustrated with simulations, but with available technology (such as MATLAB/Simulink/RTWT) can be easily verified in practice.

1

Introduction

Control of DC motors is an important problem, solution of which requires a careful consideration. As in all control problems many different strategies can be implemented. Moreover character of control can be continuous or discrete. Finally motors can be described by linear or nonlinear differential equations. In this paper few remarks regarding the control of DC motors are introduced. First of all, we will consider continuous optimal control problems, for reaching of zero. These problems will be solved for an example of field controlled DC motor. Following, an armature controlled DC motor will be analysed, and for that motor discretisation and discrete model will be introduced. For this discrete structure, dead-beat and DLQR controllers will be compared. Then we will discuss a possible discretisation optimisation choosing an optimal discretisation step. The following section will introduce a series DC motor for which velocity and load torque estimation will be considered. A general nonlinear observer will be presented allowing different parameter tuning approaches. Among the special cases will be a sensorless Work financed by state science funds for 2008-2011 as a research project. no. N N514 414034 ∗

1

Contract

observer (estimation from the current), a reduced observer and two optimal parameter choices for different performance indexes. Finally the estimation will be coupled with control, presenting a nonlinear dynamical feedback.

2

Control reducing to zero

We consider a system described by equations x(t) ˙ = Ax(t) + Bu(t),

x(t) = [x1 (t) x2 (t) . . . xn (t)]T ,

t≥0

(1)

A ∈ Rn×n , B ∈ Rn×r , u(t) ∈ Rr , u ∈ U = L2 (0, T ; Rr ) and a cost function in the form Z T J(u) = (x(t)T W x(t) + u(t)T Su(t))dt, (2) 0

where W = [wij ] and S = [sij ] are real matrices of appropriate dimensions, W = W T is semi-positive definite, W T = [wji] is matrix transpose of W , S = S T is positive definite (S is positive definite iff z T Sz > 0 for z 6= 0), T > 0 is the control time. Problem 1. Let T > 0 and x(0) = x0 ∈ Rn be fixed. Find control u ∈ U such that J(v) ≥ J(u), ∀ v ∈ U and x(T ) = 0.  (3) Using maximum principle (see [2], p. 454; [26], pp. 59, 79 and 53, 76; [12], p. 393) we can obtain solution of problem 1 in the following form: u(t) =

1 −1 T S B ψ(t), 2

where ψ(t) is given by the solution of equation      x(t) ˙ Z1 Z2 x(t) = , x(0) = x0 , ˙ Z Z ψ(t) ψ(t) 3 4 with Z1 = A, Z2 = B T /2, Let us define following  Z1 Z= Z3

(4)

x(T ) = 0

Z3 = W , Z4 = −AT . matrices    Z2 Φ1 (t) Φ2 (t) Zt and e = . Z4 Φ3 (t) Φ4 (t)

(5)

(6)

Let det Φ2 (T ) 6= 0. Then from (4), (5) and (6) we have ([2], p. 458) u(t) =

1 −1 T S B [Φ3 (t) − Φ4 (t)Φ2 (T )−1 Φ1 (T )]x(0). 2 2

(7)

Example 1. Consider problem 1 (see (3)). If W = 0 (see (2)), then from (6) we have T

Φ1 (t) = eA t , Φ2 (t) =

1 2

Φ4 (t) = e−A t ,

Rt 0

Φ3 (t) = 0,

T

Φ1 (t − τ )BB Φ4 (τ )dτ =

1 2

At

e

Rt 0

(8) −A τ

e

T −AT τ

BB e

dτ.

If (A; B) is controllable, then det Φ2 (t) 6= 0. Consequently (see (7) and see also [17], p. 33) optimal control is given by 1 u(t) = − S −1 B T [Φ4 (t)Φ2 (T )−1 Φ1 (T )]x(0).  2

(9)

Example 2. We consider system (1) for n = 2 with     0 0 1 , , B= A= K 0 −f where f ∈ R and K ∈ R. In this case   1 (1 − e−f t )/f At , e = 0 e−f t

e

=



−AT t



1 0 −t 1

−AT t

(10)

1 0 ft (1 − e )/f ef t



.

(11)

If f = 0, then At

e

=



1 t 0 1



,

e

=



. 

(12)

Problem 2. Let T > 0 and x(0) = x0 ∈ Rn be fixed. Find control u ∈ U such that J(v) ≥ J(u), ∀ v ∈ U, (13) where J(u) is given by (1) and (2).



Solution of problem 2 (see for example [13], pp. 150, 160, 164, 171, 175) is given by following equality u(t) = −S −1 B T D(t)x(t),

(14)

where D(t) = D(t)T is a unique nonnegative definite solution of differential Riccati equation ˙ D(t) = D(t)BS −1 B T D(t) − AT D(t) − D(t)A − W,

3

D(T ) = 0.

(15)

Let T = +∞ and (A; B) be stabilizable and (W ; A) be detectable. Then (see for example Górecki et. al. 1983 [13], pp. 179-182) D(t) → D = const., D is unique nonnegative definite solution of algebraic Riccati equation DBS −1 B T D − AT D − DA − W = 0.

(16)

In this case optimal control is given by a feedback (a control law) u(t) = −S −1 B T Dx(t).

(17)

Closed loop system (1), (17) is given by the equation x(t) ˙ = [A − BS −1 B T D]x(t) and Reλ(A − BS −1 B T D) < 0.

(18)

The spectrum of matrix A is denoted by λ(A). If the real part of every eigenvalue of matrix A is negative, then we write Reλ(A) < 0. In addition, for u given by (17) we have J(u) = x(0)T Dx(0). (19) Example 3. Now we consider problem 2 (see (13)) for n = 2 with T = +∞ and matrices (10), where f = 0. Let   w 0 , w, a ∈ R and w > 0, a ≥ 0. (20) W = 0 a In this case pair (W ; A) is detectable. Pair (A; B) is controllable if and only if K 6= 0 (see matrices (10)). Solution of algebraic Riccati equation (16) has a following form:   d1 d3 D= (21) d3 d2 where

p √ S(a + 2 d3) d2 d3 K 2 Sw d1 = , d2 = , d3 = . S K K Then we have optimal regulator in the form (see (17)) u(t) = −S −1 K[d3 x1 (t) + d2 x2 (t)] and closed loop system (see (18)) with a state matrix given by   0 1 −1 T . [A − BS B D] = 2 2 − KS d3 − KS d2

(22)

(23)

(24)

The matrix (24) is a Frobenius matrix 2×2. Thus from elementary calculations we can obtain u(t) = −S −1 B T D exp([A − BS −1 B T D] t) x(0) x(t) = exp([A − BS −1 B T D] t) x(0).  4

(25)

Example 4. The spectrum (or set of eigenvalues) λ(·) of a matrix is a set of discrete points. Dynamical properties of system (1) depend on the eigenvalues of A. If Reλ(A) < 0, then the matrix A (system (1)) is called exponentially stable. Now we consider the state matrix (24). Let λ1 and λ2 be fixed. Find parameters w and a (see (20)) such that λ(A − BS −1 B T D) = {λ1 , λ2 }.

(26)

Let Reλi < 0, i = 1, 2. Let λ1,2 = α ± jβ, α2 ≥ β 2 , j 2 = −1. Under these assumptions (see [21])   w = KS2 λ21 λ22 = KS2 (α2 + β 2 ) λ(A − BS −1 B T D) = {λ1 , λ2 } ⇐⇒ (27)  S S 2 2 2 2 a = K 2 λ1 + λ2 = K 2 2 (α − β ).

√ If a ≥ 2 Sw/K, then λi ∈ R and λi < 0 for i = 1, 2. 

3

Mathematical Model of the separately excited DC motor

The circuit of the separately excited DC motor can be represented in schematic form in the figure 1. DC motor can be described with the following four differential

Figure 1: DC motor

5

equations (see [18], pp.54-55) dia (t) + erot (t) dt dϕf (t) uf (t) = Rf if (t) + nf dt dω(t) = Mem (t) − µω(t) J dt dα(t) = ω(t) dt ua (t) = Ra ia (t) + La

(28) (29) (30) (31)

where Mem (t) = kE ϕf (t)ia (t) erot = kE ϕf (t)ω(t)

(32) (33)

Where J is the inertia torque of the motor, La and Lf are the armature inductance and the field inductance, Ra and Rf are the armature resistance and the field resistance, ϕf (t) is the field flux, ia (t) and if (t) is the armature current and the field current, ω(t) is the angular velocity, and α(t) is the angular position, nf is the number of field circut turns, erot (t) is induced voltage, Mem (t) is the electrical torque, µ is the clamping coefficient, kE is the motor’s constant. ua (t) and uf (t) are the armature voltage and the field voltage (the control vector).

3.1

Armature controlled DC motor

In the armature control of the DC motor the field flux is constant ϕf (t) = ϕ = const and the equation (29) can be neglected. Often in this kind of the DC motor there is no field circut because the source of field flux are permanent magnets. Armature controlled DC motor can be described with the following differential equations (see for example [15], pp. 10-11) ua (t) = Ra ia (t) + La J

dia (t) + erot (t) dt

dω(t) = Mem (t) dt dα(t) = ω(t) dt

(34) (35) (36)

and Mem (t) = kE ϕia (t) erot (t) = kE ϕω(t) We take the following assumptions: 6

1. La is constant and La ≈ 0 - electrical dynamics are much faster than mechanical; 2. Because we are considering a motor with permanent magnets we assume ϕ = const; 3. We omit effects of friction µ = 0. From (34) after applying the assumptions we get 1 kE ϕ ω(t) + ua (t) Ra Ra

(37)

kE ϕ (kE ϕ)2 ω(t) + ua (t) Ra J Ra J

(38)

ia (t) = − Using (35) with (37) we get ω(t) ˙ = − Let us denote

x1 (t) = α(t) x2 (t) = ω(t) u(t) = ua (t) (kE ϕ)2 a= Ra J kE ϕ b= Ra J Then, from (36) and (38) we can form system (1):     0 0 1 u(t) = Ax(t) + Bu(t) x(t) + x(t) ˙ = b 0 −a

(39)

In situations where instead of the entire state only the angular position will be available we will add an output equation   y(t) = 1 0 = Cx(t) (40)

It can be easily verified that pairs (A; B) and (C; A) are respectively controllable and observable.

7

3.2

Field controlled DC motor

In the field control of the DC motor the armature current is constant ia (t) = ia = const and we change the field flux by changing the field voltage uf (t). The induction field circuit (see Fig. 1) can be described by an approximate equation (see for example [2], p. 453) Lf ϕ˙f (t) + Rf ϕf (t) = k1 uf (t).

(41)

where k1 is some constant. Dynamic of rotor we can described by equation (30) where electrical torque is given by: Mem (t) = k2 ia ϕf (t)

(42)

where k2 is some constant. If Lf = 0 (or Lf ≈ 0), then (see (41)) ϕf (t) =

k1 uf (t) Rf

(43)

Consequently from (30) we have dω(t) µ k1 k2 ia uf (t) − ω(t) = dt JRf J

(44)

where k1 and k2 are some constants. Let us denote µ J R = Rf I = ia k1 k2 I K= JR x1 (t) = α(t) x2 (t) = ω(t) u(t) = uf (t) f=

Thus from (44) we obtain system (1) with n = 2 and matrices given by (10),     0 1 0 x(t) ˙ = x(t) + u(t) = Ax(t) + Bu(t) (45) 0 −f K 8

3.3

Control of DC motor

We consider problem 1 and problem 2 (see (3) and (13)) for system (1) with n = 2 and matrices given by (45). If T = +∞, then problem 2 has analytic formulas for optimal control (see (23) and (25); see also (27)). If W = 0, then problem 1 also has analytic formulas for optimal control (see (9)). Example 5. Consider problem 1 with W = 0 and S = 1. Thus Z T J(u) = u(t)2 dt

(46)

0

is the ”energy” of control u. In this case optimal control is given by (9). Actually from (9) we obtain 1 − ef t u(t) = M[ ψ1 (0) + ef t ψ2 (0)], f

M=

k1 k2 I 2J

(47)

and from x(T ) = 0 we have ψ(0) = −Φ2 (T )−1 Φ1 (T )x(0).

(48)

If additional friction factor µ = 0, then f = 0 (see (45) and (12)). In this case the optimal control for problem 1 is given by u(t) = M[ψ2 (0) − tψ1 (0)], ψ1 (0) = and

(0)+T x2 (0)] , − 6[2x1KM T3

(49) ψ1 (0) =

x2 (0)] − 2[3x1 (0)+2T KM T 2

x1 (t) = x1 (0) + tx2 (0) + KM[ 21 t2 ψ2 (0) − 16 t3 ψ1 (0)], x2 (t) = x2 (0) + KM[tψ2 (0) − 12 t2 ψ1 (0)], J(u) =

3.4

4 [3x1 (0)2 KT 3

(50)

+ 3T x1 (0)x2 (0) + T 2 x2 (0)2 ]. 

Controls comparison

Our computations were performed using Matlab package. Let us consider the system (1) with n = 2 and matrices given by (45) with f = 0. Let Let k1 = 1, k2 = 1, R = 1, J = 1 and I = 1 (see [21]). Let x1 (0) = 1 and x2 (0) = −1. To compare algorithms described by problem 1 and problem 2 trajectory (50) ”o” for T = 10 and trajectory (25) ” ∗ ” for 9

0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -0.2 -1

0

-0.50.2

0.4 0 0.6

0.80.5

1

1.2 1

Figure 2: Reduction to zero for T = 10

0.6 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 0 -0.1 -0.1 -0.2 0

1 2

2 4

3 6

4 8

5 10

Figure 3: Control reducing to zero for T = 10

10

α = −0.5, β = 0.5 are shown in Fig. 2 respectively. Optimal control (49)”o” for T = 10 and control (25) for t ∈ [0, T ] and α = −0.5, β = 0.5 are shown in Fig. 3. In this case for T = 10 we have  Z T 0.2920 for control (49) 2 J(u) = u(t) dt = (51) 0.4000 for control (25). 0 If T = 5 and α = −0.6, β = 0.5, then  Z T 0.4160 for control (49) 2 J(u) = u(t) dt = 0.4163 for control (25). 0

(52)

Optimal control (49) brings trajectory to point zero (see problem 1). While control (25) brings trajectory near point zero, e.g. for T = 5 we have x(T )T = [−0.0637 0.0393],

(53)

however it is easier to calculate (see regulator (23), where d2 and d3 are constants).

3.5

Discrete model

Figure 4: System continuous in time, with a discrete control and observation

When a continuous system is controlled by discrete (digital) means we have to consider a discrete-continuous control structure. Control signal u(t) of continuous system (1) with output (40) is generated by zero-order hold (ZOH) type element (for example a digital-analog converter) with a sampling period h, from control sequence ud (k) in a following way: u(t) = ud (k) for t ∈ [kh, (k + 1)h], where k = 0, 1, 2, . . .. The output is being sampled with sampling time h (for example by an analog-digital converter) resulting in output yd (k) = y(kh) . Both zeroorder hold and sampling elements work synchronously. Such series connection is illustrated on figure 4.

11

Dependence of yd (k) on ud (k) can be described by the following linear, time invariant, discrete in time system xd (k + 1) = Ad xd (k) + Bd ud (k) yd (k) = Cd xd (k) Ad = exp(Ah) Z h Bd = exp(At)Bdt

(54) (55) (56) (57)

0

Cd = C

(58)

For discrete control of the DC motor (system (39)) the matrices of discrete model (54) take a form:   1 (1 − exp(−ah))/a (59) Ad = 0 exp(−ah)   b(exp(−ha) + ha − 1)/a2 (60) Bd = −b(exp(−ha) − 1)/a

3.6 3.6.1

Discrete LQ and Dead-Beat controllers Discrete Linear Quadratic Control

Consider a discrete dynamical system described by the equations (54), (55), (59), (60). Let us consider a performance index: J(u) =

∞ X

xTd (k)W xd (k) + uTd (k)Rud (k)

(61)

k=0

where W = W T is a semi-positive definite matrix , and R = RT is a positive definite matrix [19]. This performance index measures the deviation of the state space vector x(k) from 0 and measures the “energy” of the control signal u(k). If we assume that (Ad ; Bd ) is stabilizable and (W ; Ad ) is detectable then optimal controller minimizing (61) is: ud (k) = −(R + BdT DBd )−1 BdT Dxd (k)

(62)

where D is unique, semi-positive definite solution of algebraic Riccati equation: D = W + ATd DAd − Ad T D(R + BdT DBd )−1 DAd

(63)

Explicit analytic formula for (62) is not given because of its complexity, however it can be easily computed numerically (for example of an algorithm for determination of controller parameters see [19] p. 154). The regulator (62) minimises 12

3 Deadbeat controller DLQR controller

x1(t)

2

1

0

−1

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

t 20 Deadbeat controller DLQR controller

10

u(t)

0 −10 −20 −30

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

t

Figure 5: Comparison of two different controllers - Discrete LQ and Deadbeat x1 (t) and u(t)

performance index (61) and stabilises system (54) in a zero equilibrum. Setting appropriate values of the elements of W we can decide which coordinate of state vector should be stronger stabilised. Setting element values of matrix R we can limit the amplitude of the control signal u(t). To use the discrete LQ controller all values of state have to be available. Because very often these values are not available discrete LQ controller usually works with a state observer. It should be also noted, that performance index (61) is the analogue of (2) with T = +∞ for discrete systems. 3.6.2

Deadbeat control

Let us choose u(k) = Kd x(k)

(64)

Then from (54) and (64) we have: x(k + 1) = (Ad + Bd Kd )x(k)

(65)

x(k) = (Ad + Bd Kd )k x(0)

(66)

Let us notice that

Now if (Ad , Bd ) is controllable we can set Kd such, that eigenvalues of the matrix (Ad + Bd Kd ) have chosen values. In particular, we can set eigenvalues of matrix 13

(Ad + Bd Kd ) for λ1 = λ2 = · · · = λn = 0 where n = dim(x(k)). Then from CayleyHamilton theorem, we know that matrix (Ad + Bd Kd ) satisfies its characteristic equation (see [24], p.70) W (λ) = λn = 0 (Ad + Bd Kd )n = 0

(67) (68)

This means that after n steps system (65) will reach zero. Controller with such feature is called the deadbeat controller. Such controller for system (39) is given by   a exp(−2ha) + exp(−ha) − 1 Kd = (69) b(exp(−ha) − 1)h b(exp(−ha) − 1)2 h Operation of both discrete LQ and deadbeat controllers is illustrated in the figure 5. Total time after which system (65) reaches 0 is T ≤ hn where h is a discretisation step. If we reduce h then system (65) will reach zero faster, however the amplitude of control signal will grow. In real systems the control signal is bounded so we cannot reduce the discretisation step h too much and keep the desired behaviour. Following section considers that problem.

3.7

Optimal discretisation step

For dead beat control of system (39) (described above) one requires the knowledge of the entire system state. For such task one can use a discrete, full rank Luenberger observer: xˆd (k + 1) = Ad xˆd (k) + Bd ud (k) + G(yd (k) − C xˆd (k))

(70)

To obtain a property of estimation error reaching zero in finite time, one has to choose the observer gain matrix G in such way that λi (A − GC) = 0, ∀i. Such observer shall be called dead beat observer and it exists only if (C; Ad ) is observable. Dead-beat controller using the state estimates gives a following control law ud (k) = Kd xˆd (k) Closed loop structure of dynamical feedback consisting of dead-beat observer and dead-beat controller is presented in the figure 6. For reminder of this section, all general derivations will be performed under the assumption that both control and output signals are scalar. For such structure one should consider the choice of appropriate discretisation step. This discussion of optimality of discretisation step 14

h is a continuation of proposal formulated in ([19] p. 241) further developed by in [3]. We consider a following problem: min J(h) h∈Ω

J(h) = αkKd k2 + βkGk2 + γh2

(71) (72)

where α ≥ 0, β ≥ 0, γ > 0, α + β > 0 are arbitrarily chosen weights, Ω is a set of feasible h, which is defined as Ω = {h ≥ 0 : (Ad ; Bd ) controllable, (C; Ad) observable}. p As the kf k we will denote the Euclidean vector norm, defined as kf k = f T f. Performance index (72) is an attempt to find a compromise solution between conflicting goals of: • short stabilisation time - it is bounded by 4h so addition of h to the performance index is natural • avoiding actuator saturation (higher the norm of Kd the higher is the amplitude of control signal) and measurement disturbance augmentation (the norm of G) Let us assume that the spectrum of A consists of only real eigenvalues (λ(A) ∈ R), then the performance index (72) has following properties 1. J(0) = ∞, 2. J(∞) = ∞, 3. ∀τ 6= 0 : 0 < J(τ ) < ∞, 4. J is continuous on Ω, 5. Inequality constraint h ≥ 0 is never active,

Figure 6: Closed loop structure of dead-beat observer and dead-beat controller

15

6. Ω is convex, 7. Ω, with an additional inequality constraint h ≤ hmax , is compact. In addition to these properties we formulate a following hypothesis. Hypothesis 1. If λ(A) ∈ R then J is strictly convex on Ω. Remark 1. The assumption regarding eigenvalues of A is necessary because for matrices with complex eigenvalues minimisation problem (71) becomes ill-posed. In such situation there exists a numerable set of h for which pairs (Ad ; Bd ) and (C; Ad ) are respectively not controllable and not observable and in consequence Ω loses properties of convexity and compactness. Performance index (72) will have then a numerable set of local minimisers and a numerable set of discontinuities. We will now perform the analysis of discretisation step optimality for DC motor described by equations (39) (continuous model) and (54) (discrete model) with matrices (59) and (60). Gain of deadbeat controller is given by (69) and gain of deadbeat observer takes a following form  T − a exp(−2ha) G = 1 + exp(−ha) (73) 1 − exp(−ha) for those matrix gains we will numerically compute values of performance index and present the simulation results. all numerical experiments will be performed for a = 1 and b = 4 which are close to real values (see [6]). Disturbances will be represented as band-limited white noise. First we will consider finding optimal h with focus on avoiding possible actuator saturation and reduction of disturbances influence. To shift that focus in the performance index (72) we will set weights α = 100, β = 100andγ = 1. Because of the character of (73) and (69) explicit analytical computation would be difficult. However assuming that hypothesis of strict convexity holds, optimization theory (see [29] p.44)) gives us that local minimum of strictly convex function on convex set is its global minimum on that set. So the numerical approach in finding the minimum is sufficient to find the optimal value of h in respect to (72). We will present the plot of J(h) in the figure 7 (with the optimal value hopt = 6.422 marked with a dot) to show that our convexity hypothesis holds in this case. Figures 8 to 11 illustrate that when we focus on reduction of control amplitude and disturbances impact stabilisation time of closed loop system significantly increases. We will now take different approach and choose weights in such way 16

Performance index α=100 β=100 γ=1 1000 J(h) hopt

900

800

700

J(h)

600

500

400

300

200

100

0

0

2

4

6

8

10

12

14

16

18

h

Figure 7: Performance index (72) with α = 100, β = 100 and γ = 1. Convexity hypothesis supported

Angular position 0

−1

−2

−3

α [rad]

−4 α estimate of α

−5

−6

−7

−8

−9

−10

0

10

20

30

40

50

60

t [s]

Figure 8: Angular position α of DC motor with h = hopt

17

Angular velocity 1.5

ω estimate of ω

ω [rad/s]

1

0.5

0 0

10

20

30

40

50

60

t [s]

Figure 9: Angular velocity ω of DC motor with h = hopt

Control − armature voltage

0.35

0.3

V [s]

0.25

0.2

0.15

0.1

0.05

0 0

10

20

30

40

50

60

t [s]

Figure 10: Armature voltage of DC motor with h = hopt

18

Phase portrait 1.6

1.4

1.2 State Estimates x(0)

1

x2

0.8

0.6

0.4

0.2

0

−0.2 −12

−10

−8

−6

−4

−2

0

2

x1

Figure 11: Phase portrait of DC motor system with h = hopt

to focus on quick stabilisation rather than saturation avoidance and disturbance rejection. We will apply weights α = 1, β = 10 and γ = 50. Again explicit analytical computation of J(h) would be difficult so we will present graphical illustration of it on figure 12. We can see on it that the convexity hypothesis is supported. The optimal h is hopt = 0.812. We can see the closed loop system performance for it on figures 13 to 16. Performance of the closed loop system is consistent with expectations - focus on quick stabilisation resulted in higher control amplitude and overshoot related to disturbances. Simulational analysis of behaviour of the closed loop system as on figure 6, with discretisation step optimal in respect to (72) leads to some interesting conclusions. The problem of finding compromise solution between time of stabilisation and disturbance robustness is a complex one, however in our opinion the minimization problem described in this paper is the step in the right direction. However for further research are many aspects of it. First of all, the problem of weight values, which are chosen experimentally at the moment, should be analyzed whether, is 19

Performance index α=1 β=10 γ=50 1000 J(h) hopt

900

800

700

J(h)

600

500

400

300

200

100

0

0

0.5

1

1.5

2

h

Figure 12: Performance index (72) with α = 1, β = 10andγ = 50. Convexity hypothesis supported

Angular position 0

−2

−4

α [rad]

−6 α estimate of α −8

−10

−12

−14 0

1

2

3

4 t [s]

5

6

7

8

Figure 13: Angular position α of DC motor with h = hopt

20

Angular velocity 14

ω estimate of ω

12 10 8

ω [rad/s]

6 4 2 0 −2 −4 −6 0

1

2

3

4 t [s]

5

6

7

8

Figure 14: Angular velocity ω of DC motor with h = hopt

Control − armature voltage 6

4

V [s]

2

0

−2

−4

−6 0

1

2

3

4 t [s]

5

6

7

8

Figure 15: Armature voltage of DC motor with h = hopt

21

Phase portrait 15

10

x2

5

0

−5 State Estimates x(0) −10 −16

−14

−12

−10

−8

−6

−4

−2

0

2

x1

Figure 16: Phase portrait of DC motor system with h = hopt

it possible to at least determine conditions suggesting proper values. Moreover the question is whether the choice of Euclidean vector norm for the performance index is the correct one. The consideration of possible application of the H∞ norm of sensitivity operator instead of kGk is necessary. Furthermore hypothesis of convexity of J should be further verified and proven (however shuch proof in a general case is very difficult).

4

Series DC motor

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 [8].

22

4.1

Nonlinear observer

Observer design for systems modeled by nonlinear differential equations is a difficult task. Nonlinearity of the system makes stabilization of the observer problematic. In literature one can find different kinds of observers for systems with specific structure. Usual requirements of such structure are global Lipschitz condition or the existence of change of coordinates transforming the system into desired observer form. Mathematical model of series DC motor, which was among the others discussed in [7] and [4] is transformable to an observer form that is linearizable by output injection. This property allows construction of the observer with linear error dynamics, which can be easily made globally exponentially stable. Such observer allows smooth estimation of angular velocity of the rotor and the load torque. Discussed observer for series DC motor requires only the measurement of the armature current. However usually angular velocity can be estimated using the measurement of angular position of the rotor.The benefits of simultaneous estimation of state of linear systems with many outputs were considered in [5]. In that paper constrained optimization of selected performance indexes was proposed, to improve the properties of estimation and its robustness. The goal of this section is to present that for observers with linear error dynamics one can apply the results of linear system theory, improve the quality of estimation with the increased amount of information caused by the consideration of many outputs at the same time. The 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 − τ

(74)

where x1 is angular position, x2 is armature current, and x3 is angular velocity. u is the control voltage. The system (74) is transformable by the following change of coordinates (see [7], [8], [4], [23]) ξ1 = x1 ξ2 = lnx2 ξ3 = x3

23

into an observer form (for simplicity, unchanged variables were kept) x˙ 1 = x3 u exp(ξ2 ) 2 x˙ 3 = γ1 exp(ξ2 ) − γ2 x3 − τ τ˙ = 0 ξ˙2 = − α1 − α2 x3 + β

(load torque τ was modeled as a constant) 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 x22 − γ2 xˆ3 − τˆ + g31 (x1 − xˆ1 ) + g32 (lnx2 − ξˆ2 ) τˆ˙ = g41 (x1 − xˆ1 ) + g42 (lnx2 − ξˆ2 )

(75)

which is a nonlinear full rank observer estimating the angular position, natural logarithm of armature current, angular velocity and the load torque. Estimation error of observer (75) is described by following linear differential equation   g11 g12 1 0 g21 g22 −α2 0   (76) e˙ =  g31 g32 −γ2 −1 e g41 g42 0 0 Literature [1] and experiments suggest that eigenvalues of the state matrix of system (76) should be all equal -100 with multiplicity 4. One can see that it can by assured by infinite number of gain matrices   g11 g12 g21 g22   (77) G=  g31 g32  g41 g42 That is the reason why following [5] a constrained optimization of chosen performance indexes was proposed. Now we will present two performance indexes along with their motivation.

4.2

Optimal observer parameters

Problem 3. Minimal disturbance augmentation. 24

Let us consider the following performance index XX J1 (G) = kGk2 = gij2 i

(78)

j

The index is a square of rectangular matrix norm (see for example [24], p. 75, 114). Index (78) will be minimised over all matrices of the (77) form which satisfy the following constraint det(sI − A) = s4 + 4 · 102 s3 + 6 · 104 s2 + 4 · 106 + 108

(79)

 1 0  −α2 0    A=  G,  −γ2 −1 0 0

(80)

where 



Theoretically such minimization can be performed analytically considering that it is a problem of finite dimensional optimization with equality constraints (see [14]) however it would require the solving of 12 nonlinear algebraic equations with 12 variables. Minimisation of (78) with constraint (79) can be however solved for example with methods basing on sequential quadratic programming (SQP). Performance index (78) was proposed, because coefficients of gain matrix G satisfying (79) usually have very large values. Such large gains in the presence of disturbances might have a huge negative impact on the process of estimation. If G has minimal norm, the disturbances would be augmented minimally. Problem 4. Minimal dynamical error. Let us consider the integral of the quadratic form of the estimation error on infinite time horizon (P = P T ≥ 0) Z ∞ I= eT (t)P e(t)dt (81) 0

Value of I is obviously dependent on initial error (see [20]) specifically it equals I = eT (0)He(0)

(82)

where H = H T ≥ 0 is a solution of the Lyapunov equation AT H + HA = P

25

(83)

One can verify, that value of I is bounded and I ≤ λmax (H)ke(0)k2

(84)

that is the reason why one can propose a performance index independent of initial error such as J2 (G) = λmax (H)

(85)

Performance index (85) allows minimization of the bound on the dynamical error of estimation. Appropriate choice of matrix P in (81) and subsequently in (83) gives the possibility of focusing on either specific states or estimation as whole. This performance index also should be subjected to constraint (79). In this problem (minimization of (85) subjected to (79)) finding the minimizer analytically is even more difficult than with (78), main reason is that explicit form of (85) might not exist. However numerical solution can be obtained by SQP methods, while in every iteration the Lyapunov equation (83) is solved along with its eigen problem. Following the simulational results will be presented for different approaches in gain selection. The matrix P in (83) was chosen to put more emphasis on estimation of load torque. In ([4]) the observer for series DC motor used only the measurements of armature current. For such observer computed gains are corresponding to the following gains of observer (75) g12 = 299.43 g22 = − 22130 g32 = 519.34 and all others equal 0. Performance index (78) has value J1 (G) = 4.9 · 108 and the appropriately modified performance index (85) (to consider 3x3 matrices) had value J2 (G) = 44.653 For such observer estimation of angular velocity and load torque is illustrated in figures 17 and 18. Both of them are characterized by rather large initial errors before reaching steady state of estimation. Minimization of performance index (78) has resulted in gain matrix   −115.45 335.67 −354.68 514.88   G=   559.65 295.72  −696.59 1183.29 26

Estimation of Angular Velocity 140

120

100

values

80

60

40

20

Velocity Estimate

0

−20

0

0.05

0.1

0.15

0.2

0.25 t

0.3

0.35

0.4

0.45

0.5

Figure 17: Observer using only armature current - angular velocity estimation

Estimation of Load Torque 1.5

1

0.5

values

0

−0.5

−1

−1.5 Torque Estimate

−2

−2.5

−3

0

0.05

0.1

0.15

0.2

0.25 t

0.3

0.35

0.4

0.45

0.5

Figure 18: Observer using only armature current - load torque estimation

27

which given following values of performance indexes J1 (G) = 2.8 · 106 (minimum of this index) and J2 (G) = 28.49 simulations show (figures 19 and 20), that the estimation of velocity has lower initial error than the one basing only on current, and that load torque estimation, has the higher error, but a litle shorter settling time. This gain is probably the most robust one of those considered. Estimation of Angular Velocity 120

100

80

values

60

40 Velocity Estimate 20

0

−20

0

0.05

0.1

0.15

0.2

0.25 t

0.3

0.35

0.4

0.45

0.5

Figure 19: Observer optimal with respect to (78) - angular velocity estimation

Minimization of performance index (85) has resulted in gain matrix   −17707.3344 24203.6073 −13248.5792 18106.763   G=   6687.7892 −9037.8159 −37.8217 49.809 which given following values of performance indexes J1 (G) = 1.52 · 109 28

Estimation of Load Torque 2

1

0

values

−1

−2

Torque Estimate

−3

−4

−5

−6

0

0.05

0.1

0.15

0.2

0.25 t

0.3

0.35

0.4

0.45

0.5

Figure 20: Observer optimal with respect to (78) - load torque estimation

and J2 (G) = 27.52 (minimum of this index). Simulations show (see figures 21 and 22) that estimation optimal in respect to (85) produces very good results in sense of dynamical error. Overshoot of estimation of both load torque and angular velocity is rather small in comparison to observer basing on current and in respect to (78). However the settling time is the worst of all considered.

4.3

Reduced observer

It is a known property for linear systems, that for observable systems one can find a reduced Luenberger observer (see [19]). The results for nonlinear systems are unfortunately not as easy to formulate. However, for system (74) one can propose an observer, which has lower order of dynamics than (75) that can still estimate angular velocity and load torque. Moreover such observer does not require any change of coordinates to have linear error dynamics ([7]). Let us consider system (74) without its second equation, instead choosing x2 as an independent input x˙ 1 = x3 x˙ 3 = γ1 x22 − γ2 x3 − τ 29

Estimation of Angular Velocity 120

100

80

values

60

40 Velocity Estimate 20

0

−20

0

0.05

0.1

0.15

0.2

0.25 t

0.3

0.35

0.4

0.45

0.5

Figure 21: Observer optimal with respect to (85) - angular velocity estimation

Estimation of Load Torque 0.6

0.4

0.2

values

0

−0.2

−0.4 Torque Estimate

−0.6

−0.8

−1

−1.2

0

0.05

0.1

0.15

0.2

0.25 t

0.3

0.35

0.4

0.45

0.5

Figure 22: Observer optimal with respect to (85) - load torque estimation

30

in that case one can propose an observer xˆ˙ 1 = xˆ3 + g1 (x1 − xˆ1 ) x˙ 3 = γ1 x22 − γ2 xˆ3 − τˆ + g2 (x1 − xˆ1 ) τˆ˙ = g3 (x1 − xˆ1 ) for which error dynamics will become   g1 1 0 e˙ = g2 −γ2 −1 e g3 0 0

(86)

(87)

which is linear, and one can choose gains such, that eigenvalues will be all equal -100 with multiplicity of 3. Those gains are g12 = 299.4286 g22 = 29828.90 g32 = − 700 For comparison only the corresponding performance indexes values are J1 (G) = 8.9 · 108 and J2 (G) = 79.38 Simulations show (figures 23 and 24), that such observer, by ignoring dynamics one of the states has very good estimation properties, especially for the estimation of angular velocity. Remark 2. Because of linear error dynamics (76) of nonlinear observer (75) one can attempt to apply the methods of parametric optimization known from linear methods to find optimal observers. The main problem is the right formulation of performance index. There are some requirements for the structure of observer for any system, most notable are global asymptotic stability and speed of error convergence to zero. With nonlinear systems linearizable by output injection (or transformable to the form that is), both of those requirements can be easily guaranteed. However, in case of low amount of information one cannot choose the optimal way of satisfying those requirements because usually there is only one solution. On the other hand, systems with many outputs (like in this case system (74)) can provide enough information for parametric optimization. 31

Estimation of Angular Velocity 120

100

80

values

60

40 Velocity Estimate 20

0

−20

0

0.05

0.1

0.15

0.2

0.25 t

0.3

0.35

0.4

0.45

0.5

Figure 23: Reduced observer (86) - angular velocity estimation

Estimation of Load Torque 0.18 0.16 0.14 0.12

values

0.1 Torque Estimate

0.08 0.06 0.04 0.02 0 −0.02

0

0.05

0.1

0.15

0.2

0.25 t

0.3

0.35

0.4

0.45

0.5

Figure 24: Reduced observer (86) - load torque estimation

32

4.4

Dynamical feedback

A state observer can be used for stabilisation of the angular velocity. One of the control structures that can be used for such stabilisation is a following PID-like controller Z t u(t) = K(w(t) − xˆ3 (t)) + I (w(t) − xˆ3 (t))dt + D(w(t) ˙ − γ1 x22 − γ2 xˆ3 − τˆ) {z } | 0 x ˆ˙ 3

(88)

Application of such controller with a reduced observer is illustrated in the figure 25. Angular Velocity Stabilisation 140

120

100

values

80

60 Velocity Estimate 40

20

0

0

5

10

15

20 t

25

30

35

40

Figure 25: Reduced observer and the dynamical feedback (88)

5

Concluding remarks

In this paper we have presented few remarks regarding the control of DC motors. We have considered both linear and nonlinear models. For different motors different strategies were considered. It should be noted that we have not depleted this great source of problems for consideration. More details regarding some parts of presented ideas are included in author’s previous works [3], [4], [5], [6], [10], 33

[11], [19], [20], [21], [22], [23], [24]. Some parts of the ideas presented here are still open and leave field for an improvement, for example properties of (72) can be further analysed and its convexity formally proved, at least with more assumptions regarding system, also the dynamical feedback (88) can be a field for parametric optimisation, both individually and together with the observer (75).

References [1] J. Ackerman: Regulacja impulsowa, Wydawnictwa Naukowo Techniczne, Warszawa 1976 [2] M. Athans and P.L. Falb, Optimal Control. An Introduction to the Theory and Its Applications. (Sterowanie optymalne. Wstęp do teorii i jej zastosowania), WNT, Warszawa, 1969, in Polish. [3] J. Baranowski and W. Mitkowski: Optimal discretisation step for second order SISO systems (Optymalny krok dyskretyzacji dla systemów SISO drugiego rzędu). XXVIX IC-SPETO-2006, Gliwice-Ustroń, 24-27.05.2006, t. 2, s. 415-418. [4] J. Baranowski: Observer design for series DC motor (in polish). Automatyka, t. 10, z. 1, Uczelniane Wydawnictwa Naukowo Dydaktyczne AGH, Kraków 2006, 33-52 [5] J. Baranowski : State estimation in linear multi output systems - design example and discussion of optimality. Automatyka, t. 10, z. 2, Uczelniane Wydawnictwa Naukowo Dydaktyczne AGH, Kraków 2006, 119-132 [6] J. Baranowski : Projektowanie obserwatora dla serwomechanizmu prądu stałego (Observer design for DC servo). Materiały VIII Międzynarodowych Warsztatów Doktoranckich OWD, 21-24.10.2006, Wisła, vol. 2. 373-378. [7] J. Chiasson: Nonlinear differential - geometric techniques for control of a series dc motor. IEEE Transactions on Control Systems Technology, 2 (1), , 35-42, March 1994 [8] J. Chiasson and S. Metha: Nonlinear control of the series DC motor: Theory and experiment. IEEE Transactions on industrial electronics, 45 (1), 134-141, February 1998 [9] A. Ciepiela and J. Wyżga: Astatyczny układ regulacji prędkości silnika prądu stałego. Automatyka, 3, (1969), Zeszyty Naukowe AGH, Nr 209, 101113. 34

[10] M. Długosz: Stabilizacja systemów dynamicznych przy pomocy regulatorów suboptymalnych (Stabilization dynamical systems using suboptimal regulators). Materiały VIII Międzynarodowych Warsztatów Doktoranckich OWD, 21-24.10.2006, Wisła, vol. 2. 357-361 [11] M. Długosz and W. Mitkowski: Komputerowe sterowanie minimalnoenergetyczne (Energy-optimal computer control). XXVIX IC-SPETO-2006, Gliwice-Ustroń, 24-27.05.2006, t. 2, s. 365-368. [12] H. Górecki: Optymalizacja systemów dynamicznych, PWN, Warszawa, 1993, in Polish. [13] H. Górecki, S. Fuksa, A. Korytowski and W. Mitkowski: Sterowanie optymalne w systemach liniowych z kwadratowym wskaźnikiem jakości, PWN, Warszawa, 1983. [14] H. Górecki: Optymalizacja i sterowanie systemów dynamicznych. Uczelniane Wydawnictwa Naukowo Dydaktyczne AGH, Kraków 2006 [15] K. Jaracz, A. Dziadecki, J. Strycharz and L. Szklarski: Automatyka Napędu Elektrycznego. Wydawnictwa AGH, Kraków, 1996. [16] T. Kaczorek : Polynomial and Rational Matrices. Applications in Dynamical Systems Theory, Springer-Verlag. London. 2007. [17] J. Klamka: Sterowalność układów dynamicznych, PWN, Warszawa, 1990. [18] W. Leonhard: Control of Electrical Drives. - Third edition, Springer, 2001. [19] W. Mitkowski: Stabilizacja systemów dynamicznych, WNT, Warszawa, 1991. [20] W. Mitkowski: Stabilizacja systemów dynamicznych, Wydawnictwa Naukowo Dydaktyczne AGH, Kraków, 1996

Uczelniane

[21] W. Mitkowski: Energy – Optimal Control (Sterowanie minimalnoenergetyczne). Prace XXV IC-SPETO-2002, Gliwice-Ustroń, 22-25.05.2002, t. 2, s. 325-328. [22] W. Mitkowski and M. Długosz: Stabilisation of DC motor using LQ and deadbeat controllers. XXX IC-SPETO-2007, Gliwice-Ustroń, 23-26.05.2007, s. 157-158. Wersja 4 stronicowa na CD. [23] W. Mitkowski and J. Baranowski: Observer design for series DC motormultioutput approach. XXX IC-SPETO-2007, Gliwice-Ustroń, 23-26.05.2007, s. 135-136. Wersja 4 stronicowa na CD. 35

[24] W. Mitkowski: Równania macierzowe i ich zastosowania, Wyd. 2. Uczelniane Wydawnictwa Naukowo Dydaktyczne AGH, Kraków 2007 [25] M. Piątek: Real Time Application Interface focused on servo motor control (Zastosowanie Real Time Application Interface w sterowaniu serwomechanizmem). Automatyka, t. 10, z. 2, (2006), 187-196. [26] L.S. Pontriagin, W.G. Bołtiański, R.W. Gamkrelidze and E.F. Miszczenko: Matematiczeskaja tieoria optimalnych processow, Izd. 4, Nauka, Moskwa 1983, in Russian. [27] G. Sieklucki, T. Orzechowski, R. Sykulski and B. Szostak: Start-up of DC drive under load. Archives of Control Sciences, 17 (3), (2007), 283-293. [28] A. Tutaj: Adaptacyjne sterowanie serwomechanizmem prądu stałego (Adaptive Control of DC Motor). Automatyka, t. 6, z. 2, (2002), 121-138. [29] A. Wierzbicki, J. Szymanowski and W. Findeisen: Teoria i metody obliczeniowe optymalizacji. PWN, Warszawa, 1980.

36