Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 1 of 17
PI Tuning via PI Tuning via ExtremumExtremum Seeking Seeking Methods for Cruise ControlMethods for Cruise Control
Yiyao(AndyYiyao(Andy) Chang) ChangScott MouraScott Moura
ME 569ME 569Control of Advanced Powertrain SystemsControl of Advanced Powertrain Systems
Professor Anna Professor Anna StefanopoulouStefanopoulou
December 6, 2007December 6, 2007
Motivation• Automated PID Tuning Method
– Online control synthesis– Achieve optimal performance in some sense– Reduces calibration time– Does not require knowledge of plant– Does not require special experiments
• Can ES be used as an adaptive control law?– Real-time controller adaptation– Varying plant parameters and dynamics– Varying disturbance inputs
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 2 of 17
Reference Paper
PID Tuning Using Extremum SeekingOnline, Model-Free Performance Optimization
Nick J. Killingsworth and Miroslav Krstic
IEEE Control Systems MagazineFebruary 2006
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 3 of 17
Literature Review
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 4 of 17
Relay Feedback Tuning
• Åström et al (1984)
• Leva (1993)
• Voda et al (1995)
Unfalsified Control
• Jun et al (1999)
• Saeki et al (2003, 2004)
Closed-loop (model free) PID parameter tuning
Iterative Feedback Tuning
• Hjalmarsson et al (1998)
• Lequin et al (1999, 2003)
Outline• Motivation & Literature Review• Paper Reproduction
– Extremum Seeking (ES) Algorithm– PID Tuning on Sample Plant– ES Parameter Sensitivity
• Case Study: Adaptive Cruise Control– Cruise Control Model– PI Tuning
• Vary Desired Velocity, Fix Road Grade• Vary Road Grade, Fix Desired Velocity• Vahidi Road Grade Profile (I-15 near San Diego)
• Summary & ConclusionsAdaptive Cruise Control via Extremum Seeking Methods
Yiyao(Andy) Chang and Scott Moura Slide 5 of 17
Extremum Seeking Algorithm
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 6 of 17
PID parameters
Cost
Washout filter cutoff freq
Perturbation freq.
Perturbation amplitude
Adaptation gain
PID parameters estimateθ
Jh
iω
iαγ
θ
1.) Initialize PID gains2.) Evaluate cost3.) Estimate cost gradient4.) Estimate new PID gains5.) Perturb PID gainsES algorithm parameters
Control Problem Formulation
( ) 2011 20
sG s es
−=+
( ) ( ) ( )e t , r t y t ,θ θ= −
Plant:
Controller:
( ) 11ri
C s KT s
⎛ ⎞= +⎜ ⎟
⎝ ⎠
( ) 11y di
C s K T sT s
⎛ ⎞= + +⎜ ⎟
⎝ ⎠Cost Function:
( ) ( )0
2
0
1 ,T
tJ e t dt
T tθ θ=
− ∫
[ ]Ti dK T Tθ =
Tuning Parameters:
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 7 of 17
0 5 10 15 200.8
1
1.2
1.4
1.6X: 0Y: 1.33
K
X: 20Y: 0.9987
0 5 10 15 2030.5
31
31.5
32
32.5
X: 0Y: 31
Ti X: 20Y: 31.68
0 5 10 15 207
7.5
8 X: 0Y: 7.74
Td
Iterations (k)
X: 20Y: 7.152
PID Tuning on Sample Plant
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 8 of 17
0 5 10 15 2010
-5
10-4
10-3
10-2
Iterations (k)
Cos
t
X: 0Y: 0.001207
X: 20Y: 5.201e-005
0 20 40 60 80 100-0.5
0
0.5
1
1.5
Time (sec)
y(t)
ZNIMCIFTES
Use Ziegler-Nichols as initial gains
PID Gain Trajectories wrt Cost
Cross-section of cost as a function of Td and Ti
Fixed KAdaptive Cruise Control via Extremum Seeking Methods
Yiyao(Andy) Chang and Scott Moura Slide 9 of 17
Ti
Td
30 30.5 31 31.5 326
6.5
7
7.5
8
8.5
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2.2
2.4x 10-3
Varying ES Parameters
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 10 of 17
0 50 100 150 200 250 300 350 4000
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6x 10-3
Iterations (k)
Cos
t J( θ
)
α ,γα /2,γα ,γ/10α /2,γ/10
How sensitive are the results to the choice of the ES parameters?
Killingsworth’s Answer“fairly insensitive”
Our Answer• Insensitive for more conservative values
• VERY sensitive for more aggressive values
Unstable Region
Stable Region
iαγ
Perturbation amplitude
Adaptation gain
Recall
Case Study
Adaptive Cruise Control
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 11 of 17
Vehicle Dynamics Model
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 12 of 17
ji
k
( )ˆ ˆcos sinmg j iθ θ− +
ˆdragF i−
ˆfNi−
ˆNj
ˆxF i
ˆ sinˆ cos 0
x dragm i F mg fN F
m j N mg
θ
θ
⋅ = − − −
⋅ = − =
a
a
( )20.5
cosdrag d wF AC v v
N mg
ρ
θ
= +
=
( )2sin cos 0.5x d wdvm F mg fmg AC v vdt
θ θ ρ= − − − +
Assumptions
• Rolling disk dynamics
• No wheel slip
• No actuator dynamics
• Coulomb frictionθ
Wind Speed
Linearization and Ziegler-Nichols
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 13 of 17
Variable Nominal ValueTraction Force, Fx 293 N
Road Grade, θ 0 radians
Wind Speed, vw 2 m/s
Vehicle Speed, v 20 m/s ≈ 45 mph
( ) [ ]0 0 01 1 1 cos sind w xv AC v v v F mg fmgm m m
δ ρ δ δ θ θ δθ= − + + + − +
( )( )
0.075875.75 1 1
Y s KU s s sτ
= =+ +
Step Response
Time (sec)
Ampl
itude
0 50 100 150 200 250 300 350 400 4500
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
System: sysRise Time (sec): 167
System: sysFinal Value: 0.0758
PI Controller:
( ) 1PIPI
sC s Ks
τ += ( ) ( ) 43 10.3845 sC s
s+
=Ziegler-Nichols
Open Loop
Step Response
PI Tuning for Cruise Control
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 14 of 17
0 200 400 600 800 1000 1200 140019
20
21
22
23
24
25
26
Act
ual S
peed
[m/s
]
Time (sec)
0 200 400 600 800 1000 1200 14000.2
0.3
0.4
0.5
0.6
0.7
PI G
ain:
Kpi
ESES FilteredZN FixZN GS
0 200 400 600 800 1000 1200 1400-1.5
-1
-0.5
0
0.5
1
1.5
Spe
ed E
rror[m
/s]
ESZN FixZN GS
0 200 400 600 800 1000 1200 140019
20
21
22
23
24
25
26
Act
ual S
peed
[m/s
]
Time (sec)
ESZN FixZN GSDesired
0 200 400 600 800 1000 1200 140034
36
38
40
42
44
PI G
ain:
τPI
Iterations (k)
ESZN FixZN GS
0 200 400 600 800 1000 1200 1400200
250
300
350
400
450
Trac
tion
Forc
e [N
]
Time (sec)
ESES FilteredZN FixZN GS
Control Methods
• Extremum Seeking (ES)
• Fixed Ziegler-Nichols Gains (ZN Fix)
• Gain Scheduling (ZN GS)
Summary & Conclusions• Tunes PID controllers by minimizing a cost function
characterizing the desired closed-loop behavior
• Achieves better or comparable results relative to other popular tuning methods
• Improper ES parameters may produce instability
• Successfully performs adaptation for time-varying systems
• Online adaptation does not require models
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 15 of 17
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 16 of 17
References[1] N.J. Killingsworth, M. Krstic, “PID tuning using extremum seeking,”
IEEE Control Systems Magazine, pp 70-79, Feb. 2006.
[2] K.J. Åström, B. Wittenmark, Computer Controlled Systems: Theory and Design, 3rd ed. Upper Saddle River, NJ: Prentice-Hall, 1997.
[3] O. Lequin, E. Bosmans, T. Triest, “Iterative feedback tuning of PID parameters: Comparison with classical tuning rules,” Contr. Eng. Pract., vol. 11, no. 9, pp. 1023-1033, 2003.
[4] A. Vahidi, A. Stefanopoulou, H. Peng, “Recursive least squares with forgetting for online estimation of vehicle mass and road grade: theory and experiments,” International Journal of Vehicle Mechanics and Mobility, Jan 2005.
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura Slide 17 of 17
QUESTIONS?
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura
APPENDIX SLIDES
Results: Road Grade Steps
0 2000 4000 6000 8000 10000 12000-0.01
0
0.01
0.02
0.03
Roa
d G
rade
[rad
]
0 2000 4000 6000 8000 10000 1200015
20
25
Act
ual S
peed
[m/s
]
0 2000 4000 6000 8000 10000 12000200
300
400
500
600
Trac
tion
Forc
e [N
]
Distance (m)0 100 200 300 400 500 600 700
0
0.05
0.1
0.15
0.2
Cos
t
Iterations (k)
0 100 200 300 400 500 600 7000
0.2
0.4
0.6
0.8
1
PI G
ain:
Kpi
ESES FilterZN
0 100 200 300 400 500 600 70042.5
43
43.5
PI G
ain:
τPI
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura
Results: Vahidi Road Grade Profile (Linear Model)
Adaptive Cruise Control via Extremum Seeking MethodsYiyao(Andy) Chang and Scott Moura
0 100 200 300 400 500 6000
0.5
1
1.5
Cos
t
ESZN
0 100 200 300 400 500 6000
1
2
3
4
PI G
ain:
Kpi
0 100 200 300 400 500 60040
45
50
55
60
PI G
ain:
τPI
Iterations (k)
0 2000 4000 6000 8000 10000 12000-0.04
-0.02
0
0.02
0.04
0.06
Roa
d G
rade
[rad
]
0 2000 4000 6000 8000 10000 12000-15
-10
-5
0
5
10
Act
ual S
peed
[m/s
]
0 2000 4000 6000 8000 10000 12000-400
-200
0
200
400
Trac
tion
Forc
e [N
]
Distance (m)