Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Hebertt Sira-Ramı́rez
Jesús Linares-Flores
1
The DC motor model
2
Flatness of the DC motor model
4
Robust angular velocity feedback control
KV
ẅ = u + ϕ(t)
JL
ė1 = e2 − λ4e1
ė2 = ϕ(t) − z1 − λ3e1
ż1 = z2 + λ2e1
ż2 = z3 + λ1e1
ż3 = λ0e1
7
Theorem. The linear feedback control law
JL
u = u∗(t) + −ϕ̂(t) − k1(w2 − ẇ∗(t))
KV
−k0(w − w∗(t))
ˆ
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
dia=1/L*(v-R*ia-K*w)
dw=1/J*(K*ia-B*w-tau)
tau=0.5*exp(-sin(3*t)*sin(3*t))*cos(0.3*t)*cos(0.3*t)
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)
z1s=z1*sf
w2s=w2*sf
sin8=sin4*sin4
sin4=sin2*sin2
sin2=sin1*sin1
sin1=sin(pi*t/(2*eps))
pi:3.14159265
eps:0.5
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
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
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
15
A two stage robust controller design
d K B 1
w = ia − w − τ (t)
dt J J J
d V R K
ia = u − ia − w
dt L L 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:
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)
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
dia=u*V/L-R/L*ia-K/L*w
dw=K/J*ia-B/J*w-tau/J
tau=0.6*exp(-sin(3*t)*sin(3*t))*cos(0.3*t)*cos(0.3*t)
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
diah=u*V/L+z1i+g3*(ia-iah)
dz1i=z2i+g2*(ia-iah)
dz2i=z3i+g1*(ia-iah)
dz3i=g0*(ia-iah)
dwh=K/J*ia+z1+g3*(w-wh)
dz1=z2+g2*(w-wh)
dz2=z3+g1*(w-wh)
dz3=g0*(w-wh)
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
whs=wh*sf
z1s=z1*sf
z1is=z1i*sf
eps:0.5
pi:3.14159265
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
delt=t2-t1
tdif = abs(t-t1)
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
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
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
∗ 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
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,
42
Simulation results
CONTINUOUS SYSTEM MOTORDC3
dia=u*V/L-R/L*ia-K/L*w
dw=K/J*ia-B/J*w-tau/J
tau=0.6*exp(-sin(3*t)*sin(3*t))*cos(0.3*t)*cos(0.3*t)
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
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
k1=2*zc*wc
k0=wc*wc
zc:1
wc:4
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
eps:0.2
pi:3.14159265
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
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
delt=t2-t1
tdif = abs(t-t1)
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
50
0
0 2 4 6 8 10
0.5
τ (t), τ̂ (t)
[N−m]
−0.5
0 5 10 15 20
48
0.6
0.5
0.4 u(t)
0.3
0.2
0.1
−0.1
0 5 10 15 20
49