Adaptive PID Control MIT

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

2.

153 Adaptive Control


Lecture 7
Adaptive PID Control

Anuradha Annaswamy

aanna@mit.edu

( aanna@mit.edu ) 1 / 17
Pset #1 out: Thu 19-Feb, due: Fri 27-Feb
Pset #2 out: Wed 25-Feb, due: Fri 6-Mar
Pset #3 out: Wed 4-Mar, due: Fri 13-Mar
Pset #4 out: Wed 11-Mar, due: Fri 20-Mar
Midterm (take home) out: Mon 30-Mar, due: Fri 3-Apr

( aanna@mit.edu ) 2 / 17
Adaptive Control of a Second-order Plant
+ e τ 1 x
Gc (s)
s(Js + B)

Plant: Jẍ + Bẋ = τ J>0


ki
PI Control: Gc (s) = kp +
R s
τ = kp e(t) + ki e(τ )dτ
R
Adaptive PI Control: τ = kp (t)e(t) + ki (t) e(τ )dτ

PID Control: Gc (s) = kp + kd s + ksi


τ = kp e(t) + ki e(τ )dτ + kd de
R
dt
R
Adaptive PID Control: τ = kp (t)e(t) + ki (t) e(τ )dτ + kd (t)ė(t)
J and B are unknown. Adjust kp (t), ki (t) and kd (t) so that the
closed-loop system is stable and limt→∞ e(t) = 0.
( aanna@mit.edu ) 3 / 17
Adaptive Control of a Second-order Plant
+ e τ 1 x
Gc (s)
s(Js + B)

Plant: Jẍ + Bẋ = τ J>0


ki
PI Control: Gc (s) = kp +
R s
τ = kp e(t) + ki e(τ )dτ
R
Adaptive PI Control: τ = kp (t)e(t) + ki (t) e(τ )dτ

PID Control: Gc (s) = kp + kd s + ksi


τ = kp e(t) + ki e(τ )dτ + kd de
R
dt
R
Adaptive PID Control: τ = kp (t)e(t) + ki (t) e(τ )dτ + kd (t)ė(t)
J and B are unknown. Adjust kp (t), ki (t) and kd (t) so that the
closed-loop system is stable and limt→∞ e(t) = 0.
( aanna@mit.edu ) 3 / 17
Adaptive Control of a Second-order Plant
+ e τ 1 x
Gc (s)
s(Js + B)

Plant: Jẍ + Bẋ = τ J>0


ki
PI Control: Gc (s) = kp +
R s
τ = kp e(t) + ki e(τ )dτ
R
Adaptive PI Control: τ = kp (t)e(t) + ki (t) e(τ )dτ

PID Control: Gc (s) = kp + kd s + ksi


τ = kp e(t) + ki e(τ )dτ + kd de
R
dt
R
Adaptive PID Control: τ = kp (t)e(t) + ki (t) e(τ )dτ + kd (t)ė(t)
J and B are unknown. Adjust kp (t), ki (t) and kd (t) so that the
closed-loop system is stable and limt→∞ e(t) = 0.
( aanna@mit.edu ) 3 / 17
Adaptive Control of a Second-order Plant
+ e Adaptive τ 1 x
Controller s(Js + B)

Plant: Jẍ + Bẋ = τ J>0


ki
PI Control: Gc (s) = kp +
R s
τ = kp e(t) + ki e(τ )dτ
R
Adaptive PI Control: τ = kp (t)e(t) + ki (t) e(τ )dτ

PID Control: Gc (s) = kp + kd s + ksi


τ = kp e(t) + ki e(τ )dτ + kd de
R
dt
R
Adaptive PID Control: τ = kp (t)e(t) + ki (t) e(τ )dτ + kd (t)ė(t)
J and B are unknown. Adjust kp (t), ki (t) and kd (t) so that the
closed-loop system is stable and limt→∞ e(t) = 0.
( aanna@mit.edu ) 3 / 17
PID -Control: Algebraic Part

r + er Nominal τ 1 x
Controller s(Js+B)

ki
Gc (s) = kp + + kd s Parameterize kd = K, kp = 2λK > 0, ki = λ2 K > 0
s

K(s + λ)2
Closed-loop transfer function:
s2 (Js
+ B) + K(s + λ)2
K(s + λ)2
= 3
Js + s (B + K) + 2Kλ2 s + Kλ
2

Stable if

0<K< − B.
2
Design the controller so that x → xd
( aanna@mit.edu ) 4 / 17
PID Control - Algebraic Part: Tracking
Wcl (s)

r + er τ 1 x
Gc (s)
s(Js + B)

Gc (s)
Wcl (s) =
s(Js + B) + Gc (s)
Wcl−1 (s) = 1 + s(Js + B)G−1
cl (s)

r = Wcl−1 (s)[xd ]
 
= xd + s(Js + B)G−1
cl (s) [xd ]
= xd + (s(Js + B)) [ωd ] = xd + Bω̇d + J ω̈d
( aanna@mit.edu ) 5 / 17
PID Control - Algebraic Part: Tracking
Wcl (s)

r + er τ 1 x
Gc (s)
s(Js + B)

Gc (s)
Wcl (s) =
s(Js + B) + Gc (s)
Wcl−1 (s) = 1 + s(Js + B)G−1
cl (s)

r = Wcl−1 (s)[xd ]
 
= xd + s(Js + B)G−1
cl (s) [xd ]
= xd + (s(Js + B)) [ωd ] = xd + Bω̇d + J ω̈d
( aanna@mit.edu ) 5 / 17
PID Control - Algebraic Part: Tracking
Wcl (s)

xd r + er τ 1 x
Wcl−1 (s) Gc (s) s(Js+B)

Gc (s)
Wcl (s) =
s(Js + B) + Gc (s)
Wcl−1 (s) = 1 + s(Js + B)G−1
cl (s)

r = Wcl−1 (s)[xd ]
 
= xd + s(Js + B)G−1
cl (s) [xd ]
= xd + (s(Js + B)) [ωd ] = xd + Bω̇d + J ω̈d
( aanna@mit.edu ) 5 / 17
PID Control - Algebraic Part: Tracking
Using r = J ω̈d + Bω̇d + xd the block diagram can be represented as

ω̈d
J

+
ω̇d + r + er τ 1 x
B Gc (s) s(Js+B)
+ −
xd

which can then be simplified to


ẍd
J

ẋd
B
Plant
+
xd + e + τ 1 x
Gc (s) s(Js+B)

( aanna@mit.edu ) 6 / 17
PID Control - Algebraic Part: Tracking - Revised
Design

ẍd
J

ẋd
B
Plant
+
xd + e + τ 1 x
Gc (s) s(Js+B)

Move B from feedforward - to feedback

(K + Jλ)s + Kλ
Gc (s) =
s
( aanna@mit.edu ) 7 / 17
PID Control - Algebraic Part: Tracking - Revised
Design

ẍd
J
Controller Plant
+
xd + e + τ 1
Gc (s) s(Js+B)
− +

B
ẋ x

Move B from feedforward - to feedback

(K + Jλ)s + Kλ
Gc (s) =
s
( aanna@mit.edu ) 7 / 17
PID Control - Algebraic Part: Tracking - Revised
Design
r + er + τ 1
Gc (s)
s(Js + B)
− +
ẋ x
B

Reparameterize to accommodate J:
(K + 2λJ)s2 + (2λK + λ2 J)s + λ2 K
Gc (s) =
s
(K + 2λJ)s2 + (2λK + λ2 J)s + λ2 K
Wcl (s) =
Js3 + (K + 2λJ)s2 + (2λK + λ2 J)s + λ2 K

Always stable, for any J and B.


( aanna@mit.edu ) 8 / 17
PID Control - Algebraic Part: Tracking - Complete
Design
ẍd
J
xd + e + +τ 1
Gc ( s )
− + s(Js + B)
ẋ x
B

(K + 2λJ)s2 + (2λK + λ2 J)s + λ2 K Gc (s)


Gc (s) = , Wcl (s) = 2
s Js + Gc (s)

r = Wcl−1 (s)[xd ]
 
= xd + (Js2 )G−1 cl (s) [xd ]

= xd + J ω̈d
τ = Jẍd + Bẋ + Gc (s)[e]
   Z 
= J ẍd + 2λė + λ2 e + Bẋ + K ė + 2λe + λ2 e(τ )dτ = Je1 (t) + Bẋ + Ke2 (t)

( aanna@mit.edu ) 9 / 17
PID Control - Algebraic Part: Tracking - Complete
Design
ẍd e1
J
xd e2 + +τ 1
K
x + s(Js + B)

B

τ = Je1 (t) + Bẋ + Ke2 (t)


   Z 
e1 = ẍd + 2λė + λ2 e , e2 = ė + 2λe + λ2
e(τ )dτ

φ = [ e1 ẋ e 2 ]> , θ ∗ = [ J B K ]>
Adaptive PID control:

τ = J(t)e1 + B(t)ẋ
b b + Ke2

( aanna@mit.edu ) 10 / 17
PID Control - Algebraic Part: Tracking - Complete
Design
ẍd e1
J
xd e2 + +τ 1
K
x + s(Js + B)

B

τ = Je1 (t) + Bẋ + Ke2 (t)


   Z 
e1 = ẍd + 2λė + λ2 e , e2 = ė + 2λe + λ2
e(τ )dτ

φ = [ e1 ẋ e 2 ]> , θ ∗ = [ J B K ]>
Adaptive PID control:

τ = J(t)e1 + B(t)ẋ
b b + Ke2

( aanna@mit.edu ) 10 / 17
PID Control - Algebraic Part: Tracking - Complete
Design
ẍd e1
J
xd e2 + +τ 1
K
x + s(Js + B)

B

τ = Je1 (t) + Bẋ + Ke2 (t)


   Z 
e1 = ẍd + 2λė + λ2 e , e2 = ė + 2λe + λ2
e(τ )dτ

φ = [ e1 ẋ e 2 ]> , θ ∗ = [ J B K ]>
Adaptive PID control:

τ = J(t)e1 + B(t)ẋ
b b + Ke2

( aanna@mit.edu ) 10 / 17
PID Control - Algebraic Part: Tracking - Complete
Design
ẍd e1
J
xd e2 + +τ 1
K
x + s(Js + B)

B

τ = Je1 (t) + Bẋ + Ke2 (t)


   Z 
e1 = ẍd + 2λė + λ2 e , e2 = ė + 2λe + λ2
e(τ )dτ

φ = [ e1 ẋ e 2 ]> , θ ∗ = [ J B K ]>
Adaptive PID control:

τ = J(t)e1 + B(t)ẋ
b b + Ke2

( aanna@mit.edu ) 10 / 17
PID Control - Algebraic Part: Tracking - Complete
Design
ẍd e1
J
xd e2 + +τ 1
K
x + s(Js + B)

B

τ = Je1 (t) + Bẋ + Ke2 (t)


   Z 
e1 = ẍd + 2λė + λ2 e , e2 = ė + 2λe + λ2
e(τ )dτ

φ = [ e1 ẋ e 2 ]> , θ ∗ = [ J B K ]>
Adaptive PID control:

τ = J(t)e1 + B(t)ẋ
b b + Ke2

( aanna@mit.edu ) 10 / 17
PID Control - Algebraic Part: Tracking - Complete
Design
ẍd e1
J
xd e2 + +τ 1
K
x + s(Js + B)

B

τ = Je1 (t) + Bẋ + Ke2 (t)


   Z 
e1 = ẍd + 2λė + λ2 e , e2 = ė + 2λe + λ2
e(τ )dτ

φ = [ e1 ẋ e 2 ]> , θ ∗ = [ J B K ]>
Adaptive PID control:

τ = J(t)e1 + B(t)ẋ
b b + Ke2

( aanna@mit.edu ) 10 / 17
PID Control - Algebraic Part: Tracking - Complete
Design
ẍd e1
J
b
xd e2 + +τ 1
K
x + s(Js + B)

B
b

τ = Je1 (t) + Bẋ + Ke2 (t)


   Z 
e1 = ẍd + 2λė + λ2 e , e2 = ė + 2λe + λ2
e(τ )dτ

φ = [ e1 ẋ e 2 ]> , θ ∗ = [ J B K ]>
Adaptive PID control:

τ = J(t)e1 + B(t)ẋ
b b + Ke2

( aanna@mit.edu ) 10 / 17
Adaptive PID Control (ẋ measurable)

τ
= b
J(t)e1 + B(t)ẋ
b + Ke2
1
Plant+controller: ẍ = (−Bẋ + τ )
J
1 
= −Bẋ + b
J(t)e1 + B(t)ẋ
b + Ke2
J
 Z 
e2 = ė + 2λe + λ2 e(τ )dτ
.. ..
K 1 e 
ė2 = − e2 + −Je1 − Bẋ
e − Error Model 3
J J
Globally stable; limt→∞ e2 (t) = limt→∞ e(t) = 0.

( aanna@mit.edu ) 11 / 17
Adaptive Phase Lead Compensators

+ e τ 1 x
Gc (s)
s(Js + B)

Plant: Jẍ + Bẋ = τ J>0


s + z0
Phase-lead: Gc (s) = k , z0 < p0
s + p0
τ = Gc (s)e
J and B are unknown. Deternine τ so that limt→∞ e(t) = 0.

( aanna@mit.edu ) 12 / 17
Adaptive Phase Lead Compensators

+ e τ 1 x
Gc (s)
s(Js + B)

Plant: Jẍ + Bẋ = τ J>0


s + z0
Phase-lead: Gc (s) = k , z0 < p0
s + p0
τ = Gc (s)e
J and B are unknown. Deternine τ so that limt→∞ e(t) = 0.

( aanna@mit.edu ) 12 / 17
Adaptive Phase Lead Compensators

+ e τ 1 x
Gc (s)
s(Js + B)

Plant: Jẍ + Bẋ = τ J>0


s + z0
Phase-lead: Gc (s) = k , z0 < p0
s + p0
τ = Gc (s)e
J and B are unknown. Deternine τ so that limt→∞ e(t) = 0.

( aanna@mit.edu ) 12 / 17
Adaptive Phase Lead Compensators

+ e Adaptive τ 1 x
Controller s(Js + B)

Plant: Jẍ + Bẋ = τ J>0


s + z0
Phase-lead: Gc (s) = k , z0 < p0
s + p0
τ = Gc (s)e
J and B are unknown. Deternine τ so that limt→∞ e(t) = 0.

( aanna@mit.edu ) 12 / 17
Phase Lead Compensators - Algebraic Part

cmd + Nominal 1 x, ẋ y
s(Js+B) s+a
Controller

θ0

s + z0
Gc (s) = k , z0 < p0
s + p0

Always stable for any J, B, z0 , p0 > 0 with z0 < p0 .


Assume x and ẋ measurable

( aanna@mit.edu ) 13 / 17
Phase Lead Compensators - Synthetic output y

ω̇d0
B Wcl (s)
+
ω̈d0 + + v 1 x, ẋ y
J Gc (s) s(Js+B) s+a
+ −

yd
θ0 θ0

ν = θ0 (yd − y) + Bω̇d0 + J ω̈d0

Stable for all parameters of Gc (s)


θ0 = θ∗ - value for which Wcl (s) has a desired phase margin

( aanna@mit.edu ) 14 / 17
Adaptive Phase Lead Compensators - Synthetic
output y

ω̇d0
B
b

+
ω̈d0 + + v 1 x, ẋ y
J
b Gc (s) s(Js+B) s+a
+ −

yd θy
θy

ν = θy (t)(yd − y) + Bbω̇d0 + b
J ω̈d0
e ω̇d0 + e
= θey (t)(yd − y) + B(t) J(t)ω̈d0 + θ∗ (yd − y) + Bω̇d0 + J ω̈d0

( aanna@mit.edu ) 15 / 17
Adaptive Phase Lead Compensators - Synthetic
output y

ω̇d0
B
b

+
ω̈d0 + + v 1 x, ẋ y
J
b Gc (s) s(Js+B) s+a
+ −
+
yd
θ∗ θ∗

ω
θ̃

ν = θeT ω + θ∗ ey + Bω̇d0 + J ω̈d0


   
θey ey
θe =  B  , ω =  ω̇d0 
 e 
J
e ω̈d0

( aanna@mit.edu ) 16 / 17
Underlying Error Model

ω ey
θ̃> Wm (s)

kc
(s + zc ) (s + a)
Wm (s) = J
kc
s (s + pc ) s + BJ + θ∗ (s + zc ) (s + a)

  J
 
θy
e ey
θ =  B  , ω = ω̇d0 
e  e  
J
e ω̈d0

( aanna@mit.edu ) 17 / 17

You might also like