controller structure & nonsmooth programming Institut für Systemtheorie und Regelungstechnik, January 2012, Stuttgart Invitation Carsten Scherer
Pierre Apkarian ONERA & UPS/Institut de Mathématiques, Toulouse, France
challenges
nonsmooth opt.
MATLAB tools
The End
outline
1 challenges with control structures, multi-loop architectures
2 nonsmooth optimization
3 MATLAB tuning tools
4 conclusion
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
2 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller structure • PID simple white-box structure Kp
Ki s
Kd s 1+Ts
• 3 tunable structured blocks • Ki , Kp , Kd and T design variables with assigned roles • easily retuned, scheduled & implemented controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
3 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
Riccati, LMI, full-order controllers z
w P (s ) u
y
K (s )
• • • • •
full-order controller has no structure [DGKF 1989] centralized monolithic black box no physical insight into what the controller does often high order and unduly complex (freq. weight size inflation) often require post-processing (reduction, equil., scaling, etc) controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
4 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
why enforcing controller structure ?
easier to understand role of components scheduling and implementation are simpler facilitates re-tuning (component-wise if necessary) mandatory in some applications (decentralized, etc) stems from theoretical characterizations (µ, anti wind-up, dyn. inversion) good control architectures pave the way to good designs
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
5 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller structure • more complicated aircraft longitudinal law reference model
z1 −
R (s ) feed forward
z2
Ff (s )
r
Kp + −
Ki s
roll−off filter
aircraft
F (s )
G (s )
−
Nz q
Kq (s )
w
• tunable blocks often designed independently (suboptimal) controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
6 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller structure • helicopter multi-loop MIMO architecture bank of PIDs
bank of roll−off filters
roll−off filter
PID set−points PID _
_ PID
roll−off filter
Helicopter
H
θ φ r
roll−off filter
static gain
• 7 blocks (42 tunable parameters) • tuning is complicate because of loop interactions
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
7 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller structure • decentralized control has diagonal structure • mandatory in some applications z
w
...
P (s )
yq
...
uq Kq (s )
yq−1
uq−1 Kq−1 (s )
... y1
u1 K1 (s )
• one-loop-at-a-time synthesis is time consuming and tedious controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
8 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller structure • multiple model synthesis has replicated decentralized controller z1
1 P11 (s )
z2
0 y1
0
2 P11 (s )
1 P21 (s )
y2
0
0
2 P21 (s )
K (s ) 0
0
w1
2 P12 (s )
w2
1 P12 (s )
0
1 P22 (s )
2 P22 (s )
0
u1
0 u2
0 K (s )
• N copies if N systems controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
9 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller structure • robust complex µ synthesis reformulated as structured controller design f D ω
f D ω
−
Dω−1
Dω
P (s )
P (s ) y
y
u
Pc (s ) u
y
u
C (s ) C (s )
C (s )
f D (s ) f D (s )
• abstract controller has repeated diagonal structure (2 copies of D-scale) • one shot without D-K -iteration and SISO fitting • can be extended to multiplier-based and IQC syntheses
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
10 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller structure • anti wind-up involves two-block structured controller J (s )
y
−
u K (s )
u˜ sat
• design for 2 operating modes • numerous variants
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
11 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
joint model and controller design • both p (feedback) and Π (model) are tunable model parameters Π w
z
#
P z
w
P
y
y
u C(s,p) 0
u
0
C(s,p)
Π
controller
p & Π tunable
• again is highly structured controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
12 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
challenges with structured synthesis
sequential design of components is time consuming biconvex schemes (D-K like) fail to converge global solutions are not systematically accessible (NP-hard non-convex) Riccati and LMI approaches do not help BMI formulations remain costly and unreliable
• estimate local solutions using specialized nonsmooth programming
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
13 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
viewpoint this work privileges local paradigm • local solutions to realistic problems versus • global solutions to conservative relaxations
• on the bad side: practical problems are nonconvex and/or nonsmooth controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
14 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
dimensionality: an illustrative example transport aircraft at flutter condition stabilization with static output feedback u = Ky : "
x˙ y
#
"
=
A B C 0
#"
x u
#
,
A : 55 × 55, K : 2 × 2
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
15 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
dimensionality: an illustrative example transport aircraft at flutter condition stabilization with static output feedback u = Ky : "
x˙ y
#
"
=
A B C 0
#"
x u
#
A : 55 × 55, K : 2 × 2
,
BMI: (A + BKC )T P + P(A + BKC ) ≺ 0 et P = P T 0 ⇒ 1544 variables most of them (1540) for Lyapunov matrix P min α(A + BKC ) where α , max Re λi is spectral abscissa i
K
⇒ 4 variables : tunable controller parameters tunable space is small if accepting nonsmooth formulations
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
15 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
dimensionality: an illustrative example transport aircraft at flutter condition stabilization with static output feedback u = Ky : "
x˙ y
#
"
=
A B C 0
#"
x u
#
A : 55 × 55, K : 2 × 2
,
BMI: (A + BKC )T P + P(A + BKC ) ≺ 0 et P = P T 0 ⇒ 1544 variables most of them (1540) for Lyapunov matrix P min α(A + BKC ) where α , max Re λi is spectral abscissa i
K
⇒ 4 variables : tunable controller parameters tunable space is small if accepting nonsmooth formulations
⇒ recast controller design as nonsmooth program controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
15 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller design as nonsmooth (minimax) optimization stabilization min max Re λi (A + BKC ) K
i
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
16 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller design as nonsmooth (minimax) optimization stabilization min max Re λi (A + BKC ) K
i
H∞ synthesis (triply nonsmooth) min K
max ω∈[0,+∞]
max σi Tw →z (K , jω) i
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
16 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller design as nonsmooth (minimax) optimization stabilization min max Re λi (A + BKC ) K
i
H∞ synthesis (triply nonsmooth) min K
max ω∈[0,+∞]
max σi Tw →z (K , jω) i
time-domain design min K
max t∈[0,+∞]
max
n
+ o + z(K , t) − zmax (t) , zmin (t) − z(K , t)
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
16 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller design as nonsmooth program • optimization problems are nonsmooth and/or nonconvex • but gentle special composite structure with cast minimize max λ1 ◦ T (x , ω) x
ω∈Ω
Ω index set freq. or times
where maxΩ∈Ω λ1 is convex but nonsmooth T (x , Ω) differentiable but nonconvex wrt. x , ∀ω
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
17 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller design as nonsmooth program • optimization problems are nonsmooth and/or nonconvex • but gentle special composite structure with cast minimize max λ1 ◦ T (x , ω) x
ω∈Ω
Ω index set freq. or times
where maxΩ∈Ω λ1 is convex but nonsmooth T (x , Ω) differentiable but nonconvex wrt. x , ∀ω • Clarke subdifferential Clarke calculus is closed (chain rules, etc) Clarke regularity ⇒ specialized and efficient techniques
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
17 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
controller design as nonsmooth program • optimization problems are nonsmooth and/or nonconvex • but gentle special composite structure with cast minimize max λ1 ◦ T (x , ω) x
ω∈Ω
Ω index set freq. or times
where maxΩ∈Ω λ1 is convex but nonsmooth T (x , Ω) differentiable but nonconvex wrt. x , ∀ω • Clarke subdifferential Clarke calculus is closed (chain rules, etc) Clarke regularity ⇒ specialized and efficient techniques • directly formulated in controller tunable space (no dummies !) • efficient: can handle large models controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
17 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
nonsmooth notions • directional derivative df (x ; d) = max < z, d > z∈∂f (x )
• Clarke’s gradient qualifies directions. df (x ; d) < 0 for descent • x ∗ local minimum then 0 ∈ ∂f (x ∗ ) • ∂f (x ) is convex hull of active branches in f (x ) := max f (x , ω) ω∈(0,∞)
smooth functions
nonsmooth functions ∇f (x , ω2 ) ∂f (x ) ∇f (x , ω1 )
∇f (x )
0 ∈ ∂f (x ) ∇f (x , ω3 ) ∇f (x , ω2 ) ∇f (x , ω1 )
descent cone half space descent cone
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
18 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
building the tangent model (extension set) σ1 [Tw →z (K , jω)] multiple active frequencies
kTw →z (K , ·)k∞ bracketting freq.
candidate nearly active
0
log ω (rad.s−1 )
• active frequencies often conflicting • smooth algorithms fail because of waterbed effect • capture all active frequencies and secondary pics (anticipate) • computations based on Hamiltonian method
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
19 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
nonsmooth technique pseudo-code
scheme 1 2 3 4 5
compute an extension set of the Clarke subdifferential of the H∞ objective estimate local curvature to speed up convergence form tangent program and compute descent direction perform line search loop over 1-4 until convergence
• stopping test and remote (global) convergence P. Apkarian, D. Noll, 2006.
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
20 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
HINFSTRUCT from Matlab RCT 2010b and higher
• • • • •
nonsmooth codes are slow as a rule (1st-order gradient type) HINFSTRUCT is specialized to H∞ computations turns out fast and reliable on most problems can tune arbitrary control architectures ideally suited to small tunable space for up to large size plants
• implementation is touchy (people, years and routines)
controller structure & nonsmooth programming - http://pierre.apkarian.free.fr N
21 / 28
challenges
nonsmooth opt.
MATLAB tools
The End
software for structured H∞ synthesis z1 z2
w1 w2
.. . y
P(s)
u
.. .
multidisk constraints
Tw
1
Tw
2
C (s,p) C1(s,p) .. 0
0
z1(s,p)