Sie sind auf Seite 1von 32

Explicit Model Predictive Control via

Piecewise Nonlinear Approximations

Vuong V. Trinh, Mazen Alamir,


Patrick Bonnay and François Bonne

CNRS, GIPSA-lab & CEA

NOLCOS 2016, California


Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 1 / 10

Explicit MPC As Identification Problem


Concepts
Implicit MPC: control law is computed via online programming
Explicit MPC: control law is computed offline
Main idea
Assume that an implicit MPC is available, we try to identify each control
input as piecewise nonlinear function of a regressor
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 1 / 10

Explicit MPC As Identification Problem


Concepts
Implicit MPC: control law is computed via online programming
Explicit MPC: control law is computed offline
Main idea
Assume that an implicit MPC is available, we try to identify each control
input as piecewise nonlinear function of a regressor

Problem statement
Given data D = {q(k), Z(k)}Nk=1 generated from implicit MPC
A scalar quantity q(k) ∈ R which is a control input
A regressor Z(k) ∈ Rnz which is problem-dependent
(trivial choice is plant states)
Find a multi-input single-output nonlinear map F such that

q ≈ F(Z)
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 2 / 10

A Continuous Nonlinear Approximator

Search F of the form


L ∈ Rnz is linear parameter
q ≈ F(Z) = Γ−1 (LT Z) Γ is strictly increasing
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 2 / 10

A Continuous Nonlinear Approximator

Search F of the form


L is linear parameter
q ≈ F(Z) = Γ−1 (LT Z) Γ is strictly increasing


Γ(q) ≈ LT Z
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 2 / 10

A Continuous Nonlinear Approximator

Search F of the form


L is linear parameter
q ≈ F(Z) = Γ−1 (LT Z) µ is nonlinear parameter
B(·) is a basis function

ξ(q) is a normalization map
B(ξ(q))µ = Γ(q) ≈ LT Z
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 2 / 10

A Continuous Nonlinear Approximator

Search F of the form


L is linear parameter
q ≈ F(Z) = Γ−1 (LT Z) µ is nonlinear parameter
B(·) is a basis function

ξ(q) is a normalization map
B(ξ(q))µ = Γ(q) ≈ LT Z

Optimization problem
Finding (µ, L) such that
B(ξ(q))µ ≈ Z T L
and Γ is strictly increasing
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 2 / 10

A Continuous Nonlinear Approximator

Search F of the form


L is linear parameter
q ≈ F(Z) = Γ−1 (LT Z) µ is nonlinear parameter
B(·) is a basis function

ξ(q) is a normalization map
B(ξ(q))µ = Γ(q) ≈ LT Z

Optimization problem
Finding (µ, L) such that
 
  µ
B(ξ(q)) − ZT ≈0
L
dB
and [ dη (η)]µ ≥  for all η ∈ [0, 1]
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 2 / 10

A Continuous Nonlinear Approximator

Search F of the form


L is linear parameter
q ≈ F(Z) = Γ−1 (LT Z) µ is nonlinear parameter
B(·) is a basis function

ξ(q) is a normalization map
B(ξ(q))µ = Γ(q) ≈ LT Z

Optimization problem
Finding (µ, L) such that
 
  µ
B(ξ(q)) − ZT ≈0
L
dB
and [ dη (ηi )]µ ≥  for some 0 = η1 < η2 · · · < ηngrid = 1
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 2 / 10

A Continuous Nonlinear Approximator

Search F of the form


L is linear parameter
q ≈ F(Z) = Γ−1 (LT Z) µ is nonlinear parameter
B(·) is a basis function

ξ(q) is a normalization map
B(ξ(q))µ = Γ(q) ≈ LT Z ω(q, Z) is positive weight

Optimization problem
 
  µ
B(ξ(q))
min ω(q, Z) − ZT
µ,L L
dB
s.t. [ (η)]µ ≥  · 1

Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 3 / 10

Extension to Piecewise Nonlinear Approximations


Search the partitions {R(i) }si=1 of the regression domain such that

−1 T
Γ(1) (L(1) Z) if Z ∈ R(1)


..
q ≈ F(Z) = .

Γ −1 (L T Z) if Z ∈ R

(s) (s) (s)
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 3 / 10

Extension to Piecewise Nonlinear Approximations


Search the partitions {R(i) }si=1 of the regression domain such that

−1 T
Γ(1) (L(1) Z) if Z ∈ R(1)


..
q ≈ F(Z) = .

Γ −1 (L T Z) if Z ∈ R

(s) (s) (s)

A common strategy to find the satisfactory partitions


Iterative partitioning the regression domain into regions (by some heuristic
rules) until a sufficiently small approximation error is obtained
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 3 / 10

Extension to Piecewise Nonlinear Approximations


Hyper-rectangular domain partitioning
Search the partitions {R(i) }si=1 of the regression domain such that

−1 T
Γ(1) (L(1) Z) if Z ∈ R(1)


..
q ≈ F(Z) = .

Γ −1 (L T Z) if Z ∈ R

(s) (s) (s)

A common strategy to find the satisfactory partitions


Iterative partitioning the regression domain into regions (by some heuristic
rules) until a sufficiently small approximation error is obtained
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Identification Methodology for Explicit MPC 3 / 10

Extension to Piecewise Nonlinear Approximations


Search the partitions {R(i) }si=1 of the regression domain such that

−1 T
Γ(1) (L(1) Z) if Z ∈ R(1)


..
q ≈ F(Z) = .

Γ −1 (L T Z) if Z ∈ R

(s) (s) (s)

A common strategy to find the satisfactory partitions


Iterative partitioning the regression domain into regions (by some heuristic
rules) until a sufficiently small approximation error is obtained

Post-processing: complexity reduction


The number of regions s can be reduced by forcing the model parameters of
some regions to be identical =⇒ see paper for details
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 4 / 10

The Power Electronic Module in A Power Plant


Control Concept, Challenge & Solution

PMSG Diode Bridge DC/DC Full Bridge


Ω Ired ILfb

Vred
S

αfb
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 4 / 10

The Power Electronic Module in A Power Plant


Control Concept, Challenge & Solution

PMSG Diode Bridge DC/DC Full Bridge


x1 x2 x4

x3
S

u
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 4 / 10

The Power Electronic Module in A Power Plant


Control Concept, Challenge & Solution

PMSG Diode Bridge DC/DC Full Bridge


x1 x2 x4

x3
Plant model: 4 states & 1 input
S
ẋ1 = −a1 x1 − a3 x2 + a2
ẋ2 = −a4 x2 + a6 x1 − au7 x3
ẋ3 = a8 (x2 − kx4 u)
ẋ4 = a9 (−x5st + kx3 u)
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 4 / 10

The Power Electronic Module in A Power Plant


Control Concept, Challenge & Solution

PMSG Diode Bridge DC/DC Full Bridge


x1 x2 x4

x3
S

Objective Force x4 to track a reference signal x4r

Challenge Fast sampling period 100µs


Input saturation u ∈ [0, 1]
Positivity constraint xi ≥ 0, i = 1, . . . , 4

Solution Fast nonlinear model predictive control


Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 5 / 10

Implicit Nonlinear Model Predictive Control


 r
x
Reference
ur

PNp −1
min
? i=1 (||x(i + 1) − x r ||2Q + ||u(i) − ur ||2R ) + ρδ 2
u
s.t. x(0) = x measurement
x(i + 1) = f (x(i), u(i)) prediction model
g(x(i), u(i), δ) ≤ 0 constraints

u? (0) Plan state x

N
S

100µs
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 5 / 10

Implicit Nonlinear Model Predictive Control


 r
x
Reference
ur

PNp −1 0 ≤ u(k) ≤ 1
min
? i=1 (||x(i + 1) − x r ||2Q + ||u(i) − ur ||2R ) + ρδ 2 0 − δ ≤ x1 (k) ≤ 40 + δ
u
s.t. x(0) = x measurement 4.5 − 0.1δ ≤ x2 (k) ≤ 5.5 + 0.1δ
x(i + 1) = f (x(i), u(i)) prediction model 55 − δ ≤ x3 (k) ≤ 200 + δ
g(x(i), u(i), δ) ≤ 0 constraints 1 − δ ≤ x4 (k) ≤ 25 + δ
0≤δ

u? (0) Plan state x

N
S

100µs
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 5 / 10

Implicit Nonlinear Model Predictive Control


 r
x
Reference
ur

PNp −1
min
? i=1 (||x(i + 1) − x r ||2Q + ||u(i) − ur ||2R ) + ρδ 2
u
s.t. x(0) = x measurement ∃ NMPC control law

x(i + 1) = f (x(i), u(i)) prediction model u(x, x r , ur )

g(x(i), u(i), δ) ≤ 0 constraints

u? (0) Plan state x

N
S

100µs
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 5 / 10

Implicit Nonlinear Model Predictive Control


 r
x
Reference
ur

PNp −1
min
? i=1 (||x(i + 1) − x r ||2Q + ||u(i) − ur ||2R ) + ρδ 2
u
s.t. x(0) = x measurement Choose q = u and

x(i + 1) = f (x(i), u(i)) prediction model Z = [x, x r , ur ]

g(x(i), u(i), δ) ≤ 0 constraints

u? (0) Plan state x

N
S

100µs
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 6 / 10

Explicit Nonlinear Model Predictive Control


Data & Weight Tuning

Data cardinality > 24000 generated from a 10s simulation scenario

Weight tuning
Stationary data
Setpoint neighborhood Data corresp. interested constraint
Normal data

Evolution of u Evolution of x2
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 6 / 10

Explicit Nonlinear Model Predictive Control


Data & Weight Tuning

Data cardinality > 24000 generated from a 10s simulation scenario

Weight tuning
ω(q, Z) = 102
ω(q, Z) = 10 ω(q, Z) = 2
ω(q, Z) = 1

Evolution of u Evolution of x2
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 7 / 10

Explicit Nonlinear Model Predictive Control


Identification Results

Trade-off curve
102
Raw
32-regions
Reduced
Complexity

101
4-regions

100 1-region
1 2 3 4 5 6
Approximation error [%]
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 7 / 10

Explicit Nonlinear Model Predictive Control


Identification Results

Trade-off curve
102 Nonlinearity of a 32-regions 1%-error EMPC
Raw
32-regions
B(ξ(q)) · µ(i) LT(i) Z
Reduced dB/dξ(ξ(q)) · µ(i)
Complexity

1
10 i = 16 i = 17 i = 31
6.2
4-regions 2.9
1.2 6
2.8
100 1 5.8
1-region
2.7
1 0.82 3 4 5 6 5.6
Approximation
3 error [%]1.6
2.5 1.6
2 1.4 1.4
1.5 1.2 1.2
1 1 1
0.2 0.4 0.6 0.2 0.4 0.6 0.3 0.4
ξ(q) ξ(q) ξ(q)
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 8 / 10

Closed-Loop Validation
Control Input & Region Index

Implicit NMPC 1%-error 3%-error


Control input u

0.6

0.5

0.4

30
Region index i

20

10

0 1 2 3 4 5 6 7 8 9 10
Time [s]
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 8 / 10

Closed-Loop Validation
Constraint Satisfaction, Setpoint Stabilization & Tracking Error

Implicit NMPC 1%-error 3%-error 6%-error

5.5
5.25
x2 [A]

5
4.75
4.5
25
20
x4 [A]

15
10
5
0
0 1 2 3 4 5 6 7 8 9 10
Time [s]
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Application to A Stirling Engine Based Power Plant 9 / 10

Real-Time Comparison

Implicit NMPC 1%-error EMPC 3%-error EMPC

15
EMPCs compiled in C language
Distribution [%]

(≈ 100 code lines)


10 ACADO Code Generation
(qpOASES solver)

0
8 10 12 14 16 18 20 22
Computation time [µs]
Implicit NMPC 1%-error EMPC 3%-error EMPC
Worst 22.22 18.51 16.43
Mean 14.89 9.41 8.83

Platform: 2.6 GHz Intel(R) Core(TM) i7 and 16GB of RAM.


Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Conclusion, Future Work & Acknowledgement 10 / 10

Conclusion, Future Work & Acknowledgement

Conclusion
A practical computational methodology for explicit piecewise nonlinear
representation of MPC control laws derived from learning data
Illustrative example with a fast constrained nonlinear application
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Conclusion, Future Work & Acknowledgement 10 / 10

Conclusion, Future Work & Acknowledgement

Conclusion
A practical computational methodology for explicit piecewise nonlinear
representation of MPC control laws derived from learning data
Illustrative example with a fast constrained nonlinear application

Future work
An experimental validation is in progress for a MIMO system
Application outside MPC context, for example, off-line computation of
moving-horizon observers
Explicit Model Predictive Control via Piecewise Nonlinear Approximations | Conclusion, Future Work & Acknowledgement 10 / 10

Conclusion, Future Work & Acknowledgement

Conclusion
A practical computational methodology for explicit piecewise nonlinear
representation of MPC control laws derived from learning data
Illustrative example with a fast constrained nonlinear application

Future work
An experimental validation is in progress for a MIMO system
Application outside MPC context, for example, off-line computation of
moving-horizon observers

Acknowledgement
This work is financially supported by the project CRYOGREEN from French
National Research Agency (ANR)

Das könnte Ihnen auch gefallen