You are on page 1of 10

EL2620 2010 EL2620 2010

EL2620 Nonlinear Control

Lecture 7 Today’s Goal


You should be able to analyze and design
• Compensation for saturation (anti-windup)
• Anti-windup for PID and state-space controllers
• Friction models • Compensation for friction

• Compensation for friction

Lecture 7 1 Lecture 7 2

EL2620 2010 EL2620 2010

PSfr
The Problem with Saturating Actuator
r e v u y
Example—Windup in PID Controller
PID G
-
2

y
1

0
0 20 40 60 80
• The feedback path is broken when u saturates ⇒ Open loop 0.1

behavior! u
0

• Leads to problem when system and/or the controller are unstable −0.1
0 20 40 60 80
– Example: I-part in PID Time

  PID controller without (dashed) and with (solid) anti-windup


1
Recall: CPID (s) = K 1 + + Td s
Ti s

Lecture 7 3 Lecture 7 4
EL2620 2010 EL2620 2010

Anti-Windup for PID Controller Anti-Windup is Based on Tracking


Anti-windup (a) with actuator output available and (b) without
(a)
When the control signal saturates, the integration state in the
−y
KTd s
controller tracks the proper state
Actuator
e
K ∑
v u
The tracking time Tt is the design parameter of the anti-windup
K

1 − + Common choices of Tt :

Ti s

1
es
• Tt = Ti
Tt √
(b) • Tt = Ti Td
−y
KTd s

Actuator model Actuator


Remark: If 0 < Tt ≪ Ti , then the integrator state becomes sensitive
e
K ∑
v u
to the instances when es 6= 0:
Z t  Z
K

1 −

+ Ke(τ ) es (τ ) 1 t
Ti s
I(t) = + dτ ≈ es (τ ) dτ
1
es
0 Ti Tt Tt 0
Tt

Lecture 7 5 Lecture 7 6

EL2620 2010 EL2620 2010

Anti-Windup for Observer-Based Anti-Windup for


State Feedback Controller General State-Space Controller
xm State-space controller:

y
Observer State feedback Actuator ẋc = F xc + Gy
− xˆ sat v
Σ L u = Cxc + Dy
Windup possible if F unstable and u saturates
Idea: Rewrite representation of control law from (a) to (b) with the
same input–output relation, but where the unstable SA is replaced by
x̂˙ = Ax̂ + B sat v + K(y − C x̂) a stable SB . If u saturates, then (b) behaves better than (a).
v = L(xm − x̂) (a) (b)
y
y u u
SA SB
x̂ is estimate of process state, xm desired (model) state
Need actuator model if sat v is not measurable

Lecture 7 7 Lecture 7 8
EL2620 2010 EL2620 2010

State-space controller without and with anti-windup:


Mimic the observer-based controller:
D

ẋc = F xc + Gy + K(u − Cxc − Dy)


F
= (F − KC)xc + (G − KD)y + Ku
y xc u
G ∑ s −1 C ∑

Choose K such that F0 = F − KC has desired (stable)


D
eigenvalues. Then use controller

ẋc = F0 xc + G0 y + Ku F − KC

u = sat(Cxc + Dy) y
G − KD ∑ s −1
xc
C ∑
v
sat
u

where G0 = G − KD. K

Lecture 7 9 Lecture 7 10

EL2620 2010 EL2620 2010

Controllers with ”Stable” Zeros Controller F (s) with ”Stable” Zeros


Most controllers are minimum phase, i.e. have zeros strictly in LHP Let D = lims→∞ F (s) and consider the feedback implementation
zero dynamics
z }| { y u
Σ sat
ẋc = F xc + Gy ⇒u=0 ẋc = (F − GC/D) xc + D
u = Cxc + Dy y = −C/Dxc −

Thus, choose ”observer” gain


1 − 1
K = G/D ⇒ F − KC = F − GC/D F (s) D

and the eigenvalues of the ”observer” based controller becomes equal It is easy to show that transfer function from y to u with no saturation
to the zeros of F (s) when u saturates equals F (s)!
Note that this implies G − KD = 0 in the figure on the previous If the transfer function (1/F (s) − 1/D) in the feedback loop is
slide, and we thus obtain P-feedback with gain D under saturation. stable (stable zeros) ⇒ No stability problems in case of saturation

Lecture 7 11 Lecture 7 12
EL2620 2010 EL2620 2010

Internal Model Control (IMC) Example

IMC: apply feedback only when system G and model Ĝ differ! b 1


G(s) =
C(s) T1 s + 1

r u y Choose
Q(s) G(s) T1 s + 1
Q= , τ < T1
− τs + 1
yb Gives the controller
b
G(s)
− Q
F = ⇒
1 − QG b
 
T1 s + 1 T1 1
Assume G stable. Note: feedback from the model error y − yb. F = = 1+
τs τ T1 s
b
Design: assume G ≈ G and choose Q stable with Q ≈ G−1 . PI-controller!

Lecture 7 13 Lecture 7 14

EL2620 2010 EL2620 2010

Example (cont’d)
IMC with Static Nonlinearity Assume r = 0 and abuse of Laplace transform notation
Include nonlinearity in model b = − T1 s + 1 y + 1 v
u = −Q(y − Gv)
τs + 1 τs + 1
r u y
Q G −(T1 s + 1)
− if |u| < umax (v = u): PI controller u = y
τs
v If |u| > umax (v = ±umax ):
b
G − T1 s + 1 umax
u=− y±
τs + 1 τs + 1
Choose Q ≈ G−1 . No integration.

An alternative way to implement anti-windup!

Lecture 7 15 Lecture 7 16
EL2620 2010 EL2620 2010

Bumpless Transfer
Another application of the tracking idea is in the switching between
Other Anti-Windup Solutions automatic and manual control modes.
PID with anti-windup and bumpless transfer:
Solutions above are all based on tracking.
1 ∑
Tr +
Other solutions include: uc

1 1

Tm s
• Tune controller to avoid saturation
• Don’t update controller states at saturation y
PD
uc
M
• Conditionally reset integration state to zero e 1
Tr
∑ 1
s

u
A

• Apply optimal control theory (Lecture 12) −



+

1
Tr

Note the incremental form of the manual control mode (u̇ ≈ uc /Tm )

Lecture 7 17 Lecture 7 18

EL2620 2010 EL2620 2010

Friction
Friction is present almost everywhere
• Often bad:
Stick-Slip Motion
x
– Friction in valves and other actuators 2 y
1
• Sometimes good: 0
0 10 20
– Friction in brakes Fp 0.4
Time

Ff
• Sometimes too small: 0.2 ẏ
0
– Earthquakes 0 10 20
Time
y x Fp
Problems: 1

Ff
• How to model friction? 0
0 10 20
Time

• How to compensate for friction?


• How to detect friction in control loops?

Lecture 7 19 Lecture 7 20
EL2620 2010 EL2620 2010

Position Control of Servo with Friction


F
Friction

xr x
u
PID Σ 1
ms v
1
s

0.5 5 minute exercise: Which are the signals in the previous plots?
0
0 20 40 60 80 100
Time

0.2

−0.2
0 20 40 60 80 100
Time
1

−1
0 20 40 60 80 100
Time

Lecture 7 21 Lecture 7 22

EL2620 2010 EL2620 2010

Stribeck Effect
Friction increases with decreasing velocity (for low velocities)
Friction Modeling
Stribeck (1902)
Steady state friction: Joint 1

200

150

100

50

Friction [Nm] 0

-50

-100

-150

-200

-0.04 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04


Velocity [rad/sec]

Lecture 7 23 Lecture 7 24
EL2620 2010 EL2620 2010

Classical Friction Models


Friction Compensation
• Lubrication
• Integral action
• Dither signal
• Model-based friction compensation
• Adaptive friction compensation
• The Knocker
Advanced models capture various friction phenomena better

Lecture 7 25 Lecture 7 26

EL2620 2010 EL2620 2010

Integral Action Modified Integral Action


• Integral action compensates for any external disturbance K
Rt
Modify the integral part to I = Ti
ê(τ )dτ where
• Works if friction force changes slowly (v(t) ≈ const)
ê(t)
• If friction force changes quickly, then large integral action
(small Ti ) necessary. May lead to stability problem e(t)
F η
Friction

_
xr u 1 v 1 x
PID ms s Advantage: Avoid that small static error introduces oscillation
_
Disadvantage: Error won’t go to zero

Lecture 7 27 Lecture 7 28
EL2620 2010 EL2620 2010

replacements
Dither Signal
Avoid sticking at v = 0 (where there is high friction) Model-Based Friction Compensation
by adding high-frequency mechanical vibration (dither )
For process with friction F :
F
Friction
mẍ = u − F
_ use control signal
xr u 1 v 1 x
PID ms s u = uPID + F̂
_

where uPID is the regular control signal and F̂ an estimate of F .


Possible if:

Cf., mechanical maze puzzle • An estimate F̂ ≈ F is available


(labyrintspel) • u and F does apply at the same point

Lecture 7 29 Lecture 7 30

EL2620 2010 EL2620 2010

Adaptive Friction Compensation


F Friction Adaptation converges: e = a − â → 0 as t → ∞
Proof:
uPID − 1 v 1 x
+ de dâ dz d
+ ms s
=− = − + km |v|
dt dt dt dt
Friction
estimator = −kuPID sgn v + kmv̇ sgn v

= −k sgn v(uPID − mv̇)
Coulomb friction model: F = a sgn v
Friction estimator:
= −k sgn v(F − F̂ )
= −k(a − â)
ż = kuPID sgn v
= −ke
â = z − km|v|
d
F̂ = â sgn v Remark: Careful with dt |v| at v = 0.

Lecture 7 31 Lecture 7 32
EL2620 2010 EL2620 2010

1
P-controller 1
PI-controller
0.5 vref 0.5 The Knocker
0 v 0

−0.5 −0.5

−1
0 1 2 3 4 5 6 7 8
−1
0 1 2 3 4 5 6 7 8
Coulomb friction compensation and square wave dither
10 10
Typical control signal u
5 u 5
2.5

0 0

−5 −5
2

−10 −10
0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8
1.5

P-controller with adaptive friction compensation


1
1
0.5

0
0.5
−0.5

−1
0 1 2 3 4 5 6 7 8 0

10

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

−5

−10
Hägglund: Patent and Innovation Cup winner
0 1 2 3 4 5 6 7 8

Lecture 7 33 Lecture 7 34

EL2620 2010 EL2620 2010

Detection of Friction in Control Loops


• Friction is due to wear and increases with time
• Q: When should valves be maintained?
• Idea: Monitor loops automatically and estimate friction Today’s Goal
102

101

100 You should be able to analyze and design


y

99

98 • Anti-windup for PID, state-space, and polynomial controllers


50 100 150 200 250 300 350

12
• Compensation for friction
11.5
u

11

10.5

50 100 150 200 250 300 350

time
Horch: PhD thesis (2000) and patent

Lecture 7 35 Lecture 7 36
EL2620 2010

Next Lecture
• Backlash
• Quantization

Lecture 7 37