Está en la página 1de 49

Robust Generalized

Proportional Integral control of


a DC-Motor

Hebertt Sira-Ramı́rez
Jesús Linares-Flores

October 15, 2010

1
The DC motor model

Consider the popular model of a DC motor


dia
L = (uV − Ria − Kw)
dt
dw
J = Kia − Bw − τ (t)
dt
where ia is the armature current, w is the angu-
lar velocity of the motor shaft τ (t) is the load
torque applied to the shaft, The parameters L,
R and K represent respectively the inductance
in the armature circuit, the armature winding
resistance and the current gain of the motor.
V is the fixed input voltage amplitude, mod-
ulated by the control input u, taking values
on the segment [−1, 1]. On the other hand
J and B represent the motor inertia and the
viscous friction coefficient. The torque gain is
assumed to be identical to the current gain K.

2
Flatness of the DC motor model

The unperturbed motor system (τ (t) = 0, ∀ t)


is represented by a linear controllable system
model. Hence, the system is flat with flat out-
put given by the angular velocity w. Indeed, all
variables can be written in terms of the angular
velocity and its time derivatives:
1
ia = [J ẇ + Bw]
K
JL BL JR RB
   
u = ẅ + + ẇ + +K w
KV KV KV K

The perturbed version of the above differential


parametrization is simply given by
J B τ (t)
ia = ẇ + w +
K K K
JL BL RJ RB K
  
u = ẅ + + ẇ + + w
KV KV KV KV V
L R
+ τ̇ (t) + τ (t)
KV KV
3
Sensor aided control problem formulation

We first present the GPI observer-based solu-


tion to the problem of robust angular velocity
reference trajectory tracking when the angular
velocity is gathered from the motor with the
aid of a tachometer. We formulate the prob-
lem as follows:

Given a desired angular reference trajectory


w∗(t) device, on the basis of the measured w
and the relevant system parameters, a feed-
back control law which, irrespectively of the
uniformly absolutely bounded values of the torque
input τ (t), forces the motor angular velocity, w
to asymptotically exponentially track the given
reference signal, w∗(t), modulo a small as de-
sired tracking error neighborhood around the
origin of the tracking error phase space.

4
Robust angular velocity feedback control

A simplified non-phenomenological relation link-


ing the angular velocity to the control input is
readily obtained from the above perturbed dif-
ferential parametrization of the control input.
We have,

KV
 
ẅ = u + ϕ(t)
JL

where ϕ(t) is, both, an exogenous and a state


dependent unknown disturbance input given
by:
K2
!
B R RB 1 R
 
ϕ(t) = + ẇ+ + w+ τ̇ (t)+ τ (t)
J L JL JL J JL
We assume ϕ(t) is an unknown time signal,
but otherwise known to be uniformly abso-
lutely bounded combined state dependent and
exogenous disturbance input signal. We also
assume that the time derivatives: ϕ(j) (t), j =
1, 2, 3, 4 are also uniformly absolutely bounded.
5
A GPI observer based feedback controller is
readily proposed to be
JL 
u = u∗(t) + −ϕ̂s(t) − k1(w2s − ẇ∗(t))
KV
−k0(w − w∗(t))


where ϕ̂s(t) and w2s are, respectively, a smoothed


estimate of the unknown signal ϕ(t) and a
smoothed estimate of the angular acceleration
ẇ, given by the following GPI linear observer
ẇ1 = w2 + λ4(w − w1)
KV
ẇ2 = u + z1 + λ3(w − w1)
JL
ż1 = z2 + λ2(w − w1)
ż2 = z3 + λ1(w − w1)
ż3 = λ0(w − w1)
where w1 is the redundant estimate of the mea-
sured angular velocity w. The signal w2 is
the estimate of the angular acceleration ẇ and
z1 represents an internal, self-updating, time
polynomial model (also called Taylor polyno-
mial) of just second degree, estimating the
perturbation input ϕ(t).
6
The estimation error vector (e1, e2) = (w −
w1, ẇ − w2) satisfies

ė1 = e2 − λ4e1
ė2 = ϕ(t) − z1 − λ3e1
ż1 = z2 + λ2e1
ż2 = z3 + λ1e1
ż3 = λ0e1

The estimation error e = e1 = w − w1 obeys,


upon elimination of the variables z1, z2 and
z3, the following perturbed linear differential
equation

e(5) + λ4e(4) + · · · + λ0e = ϕ(3) (t)


We have the following result:

7
Theorem. The linear feedback control law
JL 
u = u∗(t) + −ϕ̂(t) − k1(w2 − ẇ∗(t))
KV
−k0(w − w∗(t))


with ϕ̂(t) = z1 and w2 being, respectively, es-


timates of ϕ(t) and ẇ which are generated by
the observer:
ẇ1 = w2 + λ4(w − w1)
KV
ẇ2 = u + z1 + λ3(w − w1)
JL
ż1 = z2 + λ2(w − w1)
ż2 = z3 + λ1(w − w1)
ż3 = λ0(w − w1)
asymptotically exponentially drives the obser-
vation error variables e1 = w − w1, e2 = ẇ − w2,
to an arbitrarily small neighborhood of zero,
while z1 asymptotically exponentially converges
to a small as desired neighborhood of the un-
known signal, ϕ(t), provided the observer gains,
{λ4, ..., λ0}, and the controller gains, {k1, k0},
are chosen so that the dominating characteris-
tic polynomials:
8
pc(s) = s2 + k1s + k0
po (s) = s5 + λ4s4 + · · · + λ1s + λ0
are Hurwitz polynomials with their roots lo-
cated deep into the left half of the complex
plane. Moreover, the further the roots of these
polynomials are located in the left half of the
complex plane the smaller the estimation er-
rors and the tracking errors ew = w − w∗(t),
ėw = ẇ − ẇ∗(t)

The proof of this result stems from the fact


that the closed loop and injected dynamics are
given by
e(5) + λ4e(4) + · · · + λ0e = ϕ(3)(t)
ëw + k1ėw + k0ew = ϕ(t) − ϕ̂(t) + l(e, ė, ...)
where l(e, ė, ...) is a linear, rapidly fading, func-
tion of the estimation error e and its time deriva-
tives, circumscribed to a small as desired disk
centered on the origin of the estimation error
phase space.
9
Remark

ˆ
The observer variables z1 = ϕ̂(t) and w2 = ẇ(t)
being produced by a high gain observer nat-
urally exhibit the “peaking” phenomenon at
the initial stages of their existence. In order
to avoid the effects of these initially large sig-
nals in the controller, we propose, as custom-
arily made, a smoothing of its initial values
by means of a “clutching” function smoothly
interpolating between the values 0 and 1 dur-
ing a small time interval [0, ] whose value is
a function of the large negative real part of
the eigenvalues, or characteristic polynomial
roots, defining the dominating estimation error
injected dynamics for e. We propose

φs(t) = sf(t)φ(t)
πt ) t ≤ 
sin8( 2
(
sf(t) =
1 for t > 
with φ = w2, z1.
10
Simulation Results
CONTINUOUS SYSTEM MOTORDC
"this program simulates a dc motor robustly controlled via
" a GPI observer based controller rejecting the
" additive disturbance containing the unknown load torque
" and other system terms. A stabilization task is presented.

STATE ia w
STATE w1 w2 z1 z2 z3
DER dia dw
DER dw1 dw2 dz1 dz2 dz3
TIME t

" Plant equations:

dia=1/L*(v-R*ia-K*w)
dw=1/J*(K*ia-B*w-tau)

" definition of load torque disturbance input

tau=0.5*exp(-sin(3*t)*sin(3*t))*cos(0.3*t)*cos(0.3*t)

"Linear controller with disturbance rejection

v=1/ga*(-z1s-k1*(w2s-wsd)-k0*(w-ws))
k0=wnc^2
k1=2*zetac*wnc

wnc:1.5
zetac:1

11
"GPI observer

dw1=w2+g4*(w-w1)
dw2=ga*v+z1+g3*(w-w1)
dz1=z2+g2*(w-w1)
dz2=z3+g1*(w-w1)
dz3=g0*(w-w1)

ga=K/(L*J)

"smoothing of observer signals

z1s=z1*sf
w2s=w2*sf

sf=if t < eps then sin8 else 1

sin8=sin4*sin4
sin4=sin2*sin2
sin2=sin1*sin1
sin1=sin(pi*t/(2*eps))

pi:3.14159265
eps:0.5

" pole placement for GPI observer

g4=po+4*zetao*wno
g3=4*zetao*po*wno+2*wno^2+4*zetao^2*wno^2
g2=4*zetao*wno^3+2*po*wno^2+4*zetao^2*po*wno^2
g1=wno^4+4*zetao*po*wno^3
g0=po*wno^4

po=40
wno=40
zetao=1
12
" reference angular velocity signal

ws:100
wsd:0

" Motor parameter values:

L:7e-3
R:2.33
B:.00937
K:.479
J:.01164

END

13
4

2
ia (t)
0
0 2 4 6 8 10

100

50 w(t), w∗ (t)
0
0 2 4 6 8 10

50
v(t)

0
0 2 4 6 8 10

Performance of direct GPI observer based


control for angular velocity tracking

14
5
x 10
1

−1
ϕ̂(t)
−2

−3

−4
0 2 4 6 8 10

0.5

0.4

0.3
τ (t)
0.2

0.1

0
0 2 4 6 8 10

Disturbance estimation and applied load


torque

15
A two stage robust controller design

Consider again the DC motor dynamics


d V R K
ia = u − ia − w
dt L L L
d K B 1
w = ia − w − τ (t)
dt J J J

In contrast with the previous controller design


procedure, we now adopt a two stage con-
troller design approach. This is accomplished
by first designing an outer loop robust GPI
observer based angular velocity reference tra-
jectory tracking controller taking the armature
current, ia, as an effective control input. Once
the robust feedback control law is established
for the armature current, we design an inner
loop controller specifying a robust controller
for the armature voltage so that the armature
current tracks, on-line, the generated time val-
ues of the designed outer loop armature cur-
rent inner loop controller.
16
Outer loop robust controller design

The design of the outer loop controller design


entitles the angular velocity dynamics alone
taking as an auxiliary control input the arma-
ture current, ia,

We consider the torque perturbed angular ve-


locity dynamics:

d K B 1
w = ia − w − τ (t)
dt J J J

We specifically assume that the load torque


τ (t) is unknown and that the viscous friction
coefficient B is also unknown.

We, thus, propose the following perturbed sim-


plified model of the mechanical part of the sys-
tem, lumping all the uncertainties into a sin-
gle time-varying function of unknown, but uni-
formly absolutely bounded, nature denoted by
ϕ1(t).
17
d K
w = ia + ϕ1(t)
dt J
where the unknown perturbation input ϕ1(t) is
given by the sum of uncertain quantities:
B 1
ϕ1(t) = − w − τ (t)
J J
The outer loop robust armature current feed-
back controller design may be formulated as
follows:

Given a smooth, desired, reference trajectory


for the motor shaft angular velocity, w∗(t), de-
vice an auxiliary feedback control law for the
armature current, denoted by ia,ref , which achieves
the reference trajectory tracking, even if in
an approximate manner, regardless of the per-
turbation inputs represented by the exogenous
torque input, τ (t) and regardless of the un-
known friction coefficient, B, i.e., regardless
of the lumped unknown but bounded uncer-
tain term, ϕ1(t), in the simplified description
of the perturbed system.
18
The robust, GPI observer based controller for
the angular velocity trajectory tracking is given
by
J
ia,ref = i∗a(t) + −z1s − k1(w − w∗(t))

K
where z1s is the smoothed version of the GPI
observer variable, z1, generated by the observer:
d K
ŵ = ia,ref + z1 + γ3(w − ŵ)
dt J
ż1 = z2 + γ2(w − ŵ)
ż2 = z3 + γ1(w − ŵ)
ż3 = γ0(w − ŵ)
The nominal armature current, i∗a(t), cannot
be exactly pre-computed, due to the uncer-
tainty surrounding the viscous friction coeffi-
cient, B, and the torque input, τ (t). We, thus,
propose to compute such a pre-compensation
in the following faulty manner:
J ∗
i∗a(t) = ẇ (t)
K
19
Let ew = w − ŵ denote the, redundant, angular
velocity estimation error. Subtracting from the
angular velocity equation the angular velocity
estimation equation and eliminating the z vari-
ables, we obtain, after some algebraic manip-
ulations it is found that ew satisfies,
(4) (3)
ew + λ3ew + λ2ëw + λ1ėw + λ0ew = ϕ(3)(t)

while the tracking error, e, closed loop system


satisfies,

ė + k1e = ϕ(t) − ϕ̂(t)


Under the assumption of an absolutely uni-
formly bounded right hand side in the above
set of equations, by choosing the observer gains
and the controller gains sufficiently large, it
follows that the trajectories of the estimation
error and of its time derivatives, as well as the
tracking error converge to a small neighbor-
hood of the origin of the corresponding phase
space.
20
Inner loop robust controller design

The second stage for the controller design is


concerned with the electrical system,

d V R K
ia = u − ia − w
dt L L L

which is controlled by the armature circuit in-


put voltage, u. In this instance, we assume
that the armature resistance, R, is unknown
while we try to synthesize the control without
the aid of the angular velocity w. We thus pro-
pose the following simplified perturbed model:
d V
ia = u + ϕ2(t)
dt L

where
R K
ϕ2(t) = − ia − w
L L
21
The inner loop robust armature input voltage
feedback controller design may be formulated
as follows:

Given the smooth, desired, reference trajectory


for the armature current, ia,ref (t), obtained
from the first design stage, device a feedback
control law for the armature input voltage, u,
which achieves the reference trajectory track-
ing, even if in an approximate manner, regard-
less of the perturbation inputs represented by
the endogenous inputs, − R L ia and regardless of
the angular velocity influence through the term
−KL w i.e., regardless of the lumped unknown
but bounded uncertain term, ϕ2(t), in the sim-
plified description of the perturbed system.

22
The robust feedback control law for the arma-
ture circuit input voltage is given by

∗ L 
u = u (t) + −z1is − p1(ia − ia,ref )
V
where
LJ ∗
u∗(t) = ẅ (t)
VK
and where z1is is the smoothed version of the
observer variable z1i defined by the following
observer
d V
ı̂a = u + z1i + γ3(ia −ı̂a)
dt L
ż1i = z2i + γ2(ia −ı̂a)
ż2i = z3i + γ1(ia −ı̂a)
ż3i = γ0(ia −ı̂a)

(Note that we have used the same design pa-


rameters for the observers appearing in each
design stage)
23
Since i∗a(t) = (J/K)ẇ∗(t) and u∗(t) = (L/V )i∗a(t),
the closed loop system is given by,
d d d
ia − i∗a(t) = (ia − i∗a(t)) = −p1(ia − ia,ref )
dt dt dt
Note that if eia = ia − ia,ref then
d ∗ d
ėia = −p1eia + ( ia(t) − ia,ref )
dt dt
For large p1, the tracking error eia converges to
a vicinity of zero in spite of the bounded per-
turbation input represented by the time deriva-
tive of i∗a(t) − ia,ref .

Let ei = ia −ı̂a. The injected estimation error


dynamics evolves, after elimination of the z1i,
in accordance with,
(4) (3) (2) (3)
ei + γ3ei + γ2ei + γ1ėi + γ0ei = ϕ2

24
CONTINUOUS SYSTEM MOTORDC4

" This program simulates a two stage robust gpi observer based
" controller for a dc motor in a sensor aided scheme.
" A two stage desgin controller is proposed. An outer loop
" controller for angular velocity control through the current
" acting as a control, with due cancellation of
" unknown torque and viscous friction effects
" thanks to a gpi observer. The GPI observer based inner
" loop controller specifies the input voltage to
" regulate the current towards the current
" reference signal acting as a control in the previous stage.
" the main advantage is that B, R, and tau may be unknown

STATE ia w wh z1 z2 z3
STATE iah z1i z2i z3i
DER dia dw dwh dz1 dz2 dz3
DER diah dz1i dz2i dz3i
TIME t

"dc motor plant

dia=u*V/L-R/L*ia-K/L*w
dw=K/J*ia-B/J*w-tau/J

"time varying load torque

tau=0.6*exp(-sin(3*t)*sin(3*t))*cos(0.3*t)*cos(0.3*t)

"outer loop PI controller

iar=ias+J/K*(-z1s-k1*(w-ws))
ias=J/K*wsd
phi1=-B/J*w-tau/J
k1:4

25
"inner loop PI controller

u=us+L/V*(-z1is-p1*(ia-iar))

us=L*J/(V*K)*wsdd
phi2=-R/L*ia-K/L*w

p1=20

" armature current and disturbance observer

diah=u*V/L+z1i+g3*(ia-iah)
dz1i=z2i+g2*(ia-iah)
dz2i=z3i+g1*(ia-iah)
dz3i=g0*(ia-iah)

" angular velocity and disturbance observer

dwh=K/J*ia+z1+g3*(w-wh)
dz1=z2+g2*(w-wh)
dz2=z3+g1*(w-wh)
dz3=g0*(w-wh)

"observer design gains

g3=4*zo*wno
g2=(2*wno^2+4*zo^2*wno^2)
g1=4*zo*wno^3
g0=wno^4

zo=1
wno=40

26
"angular velocity trajectory

ws=Fs "desired constant angular velocity


wsd=Fsd
wsdd=Fsdd

"smoothing of observer variables

whs=wh*sf
z1s=z1*sf
z1is=z1i*sf

sf=if t < eps then sin8 else 1


sin8=sin2*sin2*sin2*sin2
sin2=sin1*sin1
sin1=sin(pi*t/(2*eps))

eps:0.5
pi:3.14159265

"DC motor parameter values:

L:7e-3
R:2.33
B:0.00937
K:0.479
J:0.01164
V:100

27
"rest to rest trajectory planning for angular velocity profile

t1=0 " initial and final instants of rest-to-rest


t2=4

delt=t2-t1
tdif = abs(t-t1)

z1f = 100 " initial and final values


z1in = 0

z1dif = z1f-z1in

tau1=(tdif/delt)
tau2=tau1*tau1
tau3=tau1*tau2
tau4=tau1*tau3
tau5=tau1*tau4
tau6=tau1*tau5
tau7=tau1*tau6
tau8=tau1*tau7
tau9=tau1*tau8

r1=12870
r2=91520
r3=288288
r4=524160
r5=600600
r6=443520
r7=205920
r8=54912
r9=6435

28
z1st1 = z1in
fr=r1-r2*tau1+r3*tau2-r4*tau3+r5*tau4-r6*tau5+r7*tau6-r8*tau7+r9*tau8
z1stt = z1in+z1dif*tau8*fr
z1st2 = z1f

z1std1 = 0
frd2=14*r7*tau6-15*r8*tau7+16*r9*tau8
frd=8*r1-9*r2*tau1+10*r3*tau2-11*r4*tau3+12*r5*tau4-13*r6*tau5+frd2
z1stdt= z1dif*tau7*frd/delt
z1std2 = 0

z1stdd1 = 0
frdd2=-12*13*r6*tau5+13*14*r7*tau6-14*15*r8*tau7+15*16*r9*tau8
frdd=7*8*r1-8*9*r2*tau1+9*10*r3*tau2-10*11*r4*tau3+11*12*r5*tau4+frdd2
z1stddt = z1dif*tau6*frdd/(delt*delt)
z1stdd2 = 0

z1st3d1 = 0
frddd3=-13*14*15*r8*tau7+14*15*16*r9*tau8
frddd2=10*11*12*r5*tau4-11*12*13*r6*tau5+12*13*14*r7*tau6+frddd3
frddd=6*7*8*r1-7*8*9*r2*tau1+8*9*10*r3*tau2-9*10*11*r4*tau3+frddd2
z1st3dt = z1dif*tau5*frddd/(delt*delt*delt)
z1st3d2 = 0

Fs=if t < t1 then z1st1 else if t < t2 then z1stt else z1st2
Fsd=if t < t1 then z1std1 else if t < t2 then z1stdt else z1std2
Fsdd=if t < t1 then z1stdd1 else if t < t2 then z1stddt else z1stdd2
Fs3d=if t < t1 then z1st3d1 else if t < t2 then z1st3dt else z1st3d2

END

29
Simulation Results

0
ia,ref (t), ia (t)
−2
0 1 2 3 4 5 6 7 8 9 10

200

100

0
w(t), w∗ (t)

−100
0 1 2 3 4 5 6 7 8 9 10

30
0

−50
ϕ1(t), ϕ̂1(t)

−100

−150
0 1 2 3 4 5 6 7 8 9 10

5000

0 ϕ2(t), ϕ̂2(t)
−5000

−10000
0 1 2 3 4 5 6 7 8 9 10

31
Sensorless feedback control of the DC mo-
tor: A GPI observer approach

Sensorless control of DC motors refers to the possi-


bility of controlling the motor without measuring the
mechanical variables such as angular position or angu-
lar velocity. The control scheme is then to be carried
out solely on the basis of armature current measure-
ments and, possibly, the knowledge of the control input
voltage. The usual approach is to use an observer, of
the reduced order type, in order to estimate the angular
velocity from an indirect output equation representing
the angular velocity in terms of the input voltage, the
armature current and its time derivative.

However, most sensorless designs are not particularly ro-


bust with respect to the mechanical loads and specially
when these are not of constant nature, but rather time
varying. Here, we propose a GPI observer approach for
the efficient simultaneous asymptotic, though approxi-
mate, estimation of the angular velocity as well as of
the unknown, time-varying, load torque input.
32
Problem formulation

Given a desired angular velocity profile, w∗(t),


for the motor shaft, device a linear feedback
control law, on the basis of the armature cur-
rent, ia, and knowledge of the system parame-
ters, which asymptotically exponentially drives
the angular velocity of the motor, w(t), to-
wards the desired reference signal within an
uniformly absolutely bounded negligible error,
regardless of the unknown, but uniformly ab-
solutely bounded, load torque input, τ (t).

33
We will be proposing, in the next paragraphs,
a reduced order GPI observer which simultane-
ously estimates in a rather close manner, both,
the angular velocity, w, and the torque input,
τ (t), based only on knowledge of the armature
current, ia. In principle, such an observer is
given by
dŵ K B
= ia − ŵ + z1 + λ3(w − ŵ)
dt J J
ż1 = z2 + λ2(w − ŵ)
ż2 = z3 + λ1(w − ŵ)
ż3 = λ0(w − ŵ)
with the injection of w given by
L dia V R
 
w=− + u − ia
K dt K K
where we have adopted a second degree time
polynomial for the internal model of the torque
input, τ (t).

34
The angular velocity estimation error, e = w −
ŵ, is seen to formally satisfy the following per-
turbed injected dynamics,
(4) B (3) 1 (3)
e +(λ3 + )e +λ2ë+λ1ė+λ0e = − τ (t)
J J
Thus, the design coefficients may be chosen
by comparison with those of a desired, domi-
nating, fourth degree characteristic polynomial
of the form pd(s) = (s2 + 2ζoωnos + ωno
2 )2. i.e.,

B
λ3 = 4ζoωno −
J
2
λ2 = 2ωno + 4ζo2 ωno
2
3
λ1 = 4ζoωno
4
λ0 = ωno
As long as the roots of the characteristic poly-
nomial are chosen sufficiently far from the imag-
inary axis in the left portion of the complex
plane, the effect of the third order derivative
of τ (t) is diminished having the estimation er-
ror and its time derivatives converge towards
a small as desired disk in the estimation error
phase space.
35
Observer assessment Before presenting the
complete solution to the problem, we carry
out a partial assessment of the proposed load
torque GPI observer by simulating the observer
as if ia were the control input and w were ac-
tually the measurable output. We propose a
rather complex torque input given by,
− sin2 (3t)
τ (t) = e cos2(0.3t) [N − m]
We set, for the observer gains,
ζo = 1, ωno = 40
The feedback controller for the current, ia, was
set to be:
J 1

ia = i∗a + z1s − k1(w − w∗(t))
K J
Z t 
−k0 (w − w∗(σ))dσ
0
with w∗(t) being a rest-to-rest velocity profile
starting at 0 and ending at 100 [r/s] in 2
[s]. We have set k1 = 2ζcωnc, k0 = ωnc 2 , with
ζc = 1, ωnc = 0.3. The smoothing interval:
 = 0.4[s].
36
100

50
w(t), ŵ(t), w ∗ (t)

0
0 2 4 6 8 10

0.4

τ (t), τ̂ (t)
0.2

0
0 2 4 6 8 10

4 ia (t)
2

0
0 2 4 6 8 10

37
The sensorless GPI controller

However, we must modify the form of the GPI


observer since the expression for w contains
time derivatives which are inconvenient to com-
pute in practise. Substituting the expression
for w and defining:
L
ρ = ŵ + λ3 ia
K
L
ζj = zj + λ3−j ia, j = 1, 2, 3
K
one obtains the following modified GPI ob-
server:
   
dρ K L R L B
= − λ2 − λ3 + + λ3 λ3 ia
dt J K K K J
 
B V
− + λ3 ρ + ζ1 + λ3 u
J K
 
dζ1 V R L L
= ζ2 + λ2 u − λ2 + λ1 − λ2 λ3 ia − λ2 ρ
dt K K K K
 
dζ2 V R L L
= ζ3 + λ1 u − λ1 + λ0 − λ1 λ3 ia − λ1 ρ
dt K K K K
 
dζ3 V R L
= λ0 u − λ0 − λ0λ3 ia − λ0 ρ
dt K K K

38
The angular velocity estimate is thus given by
L
ŵ = ρ − λ3
ia
K
and the torque estimate is obtained as
L
 
τ̂ (t) = −J ζ1 − λ2 ia
K
In order to complete the solution to the prob-
lem we propose a customary two stage pro-
cedure with the advantageous standpoint of
having now accurate angular velocity and load
torque input estimations. For this, we first
view the armature current, ia, as an interme-
diate auxiliary control input we set,

J τ̂ (t) B
ia = + (ŵ − w∗(t)) − κ1 (ŵ − w∗(t))
K J J
Z t 
−κ0 (ŵ − w∗(σ)) dσ + i∗a (t)
0

where i∗a(t) may be taken to be

∗ J ∗ B ∗
ia(t) = ω̇ (t) + ω (t)
K K
and κ1, κ0 are control design constants

39
Under the assumption of fast convergence of
ŵ and τ̂ (t) to their actual values w and τ , the
closed loop behavior of the tracking error, ew =
w−w∗(t), caused by this auxiliary control input,
is found to be described by the following linear
dynamics,

B
t Z
ėw + κ1 + ew + κ0 ew (σ)dσ = 0
J 0
We may set κ1 and κ0 so that the closed loop
characteristic polynomial coincides with
s2 + 2ζcωncs + ωnc
2

and thus, have an asymptotic exponential con-


vergence of w to ŵ.

We regard this control law as part of an outer


control loop specifying the desirable current
signal. We let this specification of the arma-
ture current to act as a current reference and
denote it, from now on, as ia,ref , i.e.,

J τ̂ (t) B
ia,ref = + (ŵ − w∗(t)) − κ1(ŵ − w∗(t))
K J J
Z t 
−κ0 (ŵ − w∗(σ)) dσ + i∗a(t)
0

40
At the second controller design stage, the in-
ner control loop specifies now the input volt-
age, u, to the armature circuit, so that the ac-
tual armature current, ia, asymptotically expo-
nentially tracks the desired current reference,
ia,ref , specified in the first stage. We set


L R K
u = u∗(t) + (ia − i∗a(t)) + (ŵ − w∗(t))
V L L
Z t 
−γ1 (ia − ia,ref (t)) − γ0 (ia − ia,ref (σ))dσ
0
where
L d ∗ R K
 
u∗(t) = ia(t) + i∗a(t) + ω ∗(t)
V dt V V
and
J ∗ B
i∗a(t) = ω̇ (t) + ω ∗(t)
K K
The proposed controller design produces a closed
loop current behavior tracking error, eia = ia −
ia,ref , ultimately governed by
d

R
 t Z
eia + γ1 + eia + γ0 eia (σ)dσ = 0
dt L 0

41
where the coefficients γ1, γ0, are set so that
the characteristic polynomial coincides with the
desired closed loop polynomial,

pdi(s) = s2 + 2ζci ωncis + ωnci


2

This is achieved by simply setting


R
γ1 = 2ζci ωnci −
L
2
γ0 = ωnci

42
Simulation results
CONTINUOUS SYSTEM MOTORDC3

" This program simulates a robust gpi observer based


" controller for a dc motor in a sensorless scheme.
" A two stage desgin controller is proposed. An outer loop
" controller for angular velocity control through the current
" acting as a control, with due cancellation of unknown torque
" thanks to a gpi observer. The inner loop controller specifies
" the input voltage to regulate the current towards the current
" reference signal acting as a control in the previous stage.

STATE ia w iwmwo iiamir


STATE wh z1 z2 z3
DER dia dw diwmwo diiamir
DER dwh dz1 dz2 dz3
TIME t

"dc motor plant

dia=u*V/L-R/L*ia-K/L*w
dw=K/J*ia-B/J*w-tau/J

"time varying load torque

tau=0.6*exp(-sin(3*t)*sin(3*t))*cos(0.3*t)*cos(0.3*t)

"inner loop PI controller

u=us+L/V*(R/L*(ia-ias)+K/L*(wh-ws)-p1*(ia-iar)-p0*iiamir)
diiamir=ia-iar

us=L*J/(V*K)*wsdd+(L*B/(V*K)+R*J/(V*K))*wsd+uss
uss=(R*B/(V*K)+K/V)*ws

43
p1=2*zic*wnic
p0=wnic^2

zic:1
wnic:8

"outer loop PI controller

iar=ias+J/K*(tauh/J+B/J*(wh-ws)-k1*(wh-ws)-k0*iwmwo)
diwmwo=wh-ws

ias=J/K*wsd+B/K*ws

ws=Fs "desired constant angular velocity


wsd=Fsd
wsdd=Fsdd

k1=2*zc*wc
k0=wc*wc
zc:1
wc:4

"reduced order angular velocity and torque observer

dwh=1/J*(K*ia-B*wh)+z1+g3*(wm-wh)
dz1=z2+g2*(wm-wh)
dz2=z3+g1*(wm-wh)
dz3=g0*(wm-wh)

wm=-L/K*dia+V/K*u-R/K*ia

44
"smoothing of observer variables

whs=wh*sf
z1s=z1*sf
tauh=-J*z1s

sf=if t < eps then sin8 else 1


sin8=sin2*sin2*sin2*sin2
sin2=sin1*sin1
sin1=sin(pi*t/(2*eps))

eps:0.2
pi:3.14159265

"observer design gains

g3=4*zo*wno-B/J
g2=(2*wno^2+4*zo^2*wno^2)
g1=4*zo*wno^3
g0=wno^4

zo=1
wno=40

"DC motor parameter values:

L:7e-3
R:2.33
B:0.00937
K:0.479
J:0.01164
V:100

45
"rest to rest trajectory planning for angular velocity profile

t1=0 " initial and final instants of rest-to-rest


t2=2

delt=t2-t1
tdif = abs(t-t1)

z1f = 100 " initial and final values


z1in = 0

z1dif = z1f-z1in

tau1=(tdif/delt)
tau2=tau1*tau1
tau3=tau1*tau2
tau4=tau1*tau3
tau5=tau1*tau4
tau6=tau1*tau5
tau7=tau1*tau6
tau8=tau1*tau7
tau9=tau1*tau8

r1=12870
r2=91520
r3=288288
r4=524160
r5=600600
r6=443520
r7=205920
r8=54912
r9=6435

46
z1st1 = z1in
fr=r1-r2*tau1+r3*tau2-r4*tau3+r5*tau4-r6*tau5+r7*tau6-r8*tau7+r9*tau8
z1stt = z1in+z1dif*tau8*fr
z1st2 = z1f

z1std1 = 0
frd2=14*r7*tau6-15*r8*tau7+16*r9*tau8
frd=8*r1-9*r2*tau1+10*r3*tau2-11*r4*tau3+12*r5*tau4-13*r6*tau5+frd2
z1stdt= z1dif*tau7*frd/delt
z1std2 = 0

z1stdd1 = 0
frdd2=-12*13*r6*tau5+13*14*r7*tau6-14*15*r8*tau7+15*16*r9*tau8
frdd=7*8*r1-8*9*r2*tau1+9*10*r3*tau2-10*11*r4*tau3+11*12*r5*tau4+frdd2
z1stddt = z1dif*tau6*frdd/(delt*delt)
z1stdd2 = 0

z1st3d1 = 0
frddd3=-13*14*15*r8*tau7+14*15*16*r9*tau8
frddd2=10*11*12*r5*tau4-11*12*13*r6*tau5+12*13*14*r7*tau6+frddd3
frddd=6*7*8*r1-7*8*9*r2*tau1+8*9*10*r3*tau2-9*10*11*r4*tau3+frddd2
z1st3dt = z1dif*tau5*frddd/(delt*delt*delt)
z1st3d2 = 0

Fs=if t < t1 then z1st1 else if t < t2 then z1stt else z1st2
Fsd=if t < t1 then z1std1 else if t < t2 then z1stdt else z1std2
Fsdd=if t < t1 then z1stdd1 else if t < t2 then z1stddt else z1stdd2
Fs3d=if t < t1 then z1st3d1 else if t < t2 then z1st3dt else z1st3d2

END

47
8
6 ia (t), ia,ref (t)
[A]

4
2
0
0 5 10 15 20

100

w(t), ŵ(t)w∗ (t)


[rad/s]

50

0
0 2 4 6 8 10

0.5
τ (t), τ̂ (t)
[N−m]

−0.5
0 5 10 15 20

Performance of sensorless GPI observer based


control for angular velocity tracking

48
0.6

0.5

0.4 u(t)
0.3

0.2

0.1

−0.1
0 5 10 15 20

Applied input voltage in a sensorless GPI


observer based control for angular velocity
tracking

49

También podría gustarte