Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi BraunMathematics and EngineeringUniversity of Applied Sciences Bielefeld
Modelica and Optimization
Theoretical Backgroundmultiple shooting method total collocation handling
Current status & Outlook
model
goal
constraints
free variables
model
2 ⋅
⋅ goal Maximize the yield of after one hour of operation
1
constraints0 , 10 5
free input the reaction temperature
Objective function Mayer term Lagrange term
Path constrains
New attribute free
…
A part of the MODRIO-Project
optimization modelName(objective=…., objectiveIntegrand=….)
-> Modelica model;
constraints
…
end modelName
objective function
min Mayerterm
, ,
Lagrangeterm subject to model equations path constraints
Mayer term
requirements for the endpoint boundary value problem
Mayer term
requirements for the endpoint boundary value problem
Mayer term
requirements for the endpoint boundary value problem
multiple shooting method principle
free variable
free variable
Mayer term
requirements for the endpoint boundary value problem
multiple shooting method principle
change of the free variable
Mayer term
requirements for the endpoint boundary value problem
multiple shooting method principle
change of the free variable
continuity conditions
Mayer term
requirements for the endpoint boundary value problemmultiple shooting method principle change of the free variable continuity conditions
DAE system inline solver
algebraicsystem
Lagrange term
, , Δ ⋅ , , , , ,
quadrature formula with abscissas Legendre Radau Lobatto
, , is given by the quadrature formula
Δ ⋅ , , , , ,
, , , are needed
Δ ⋅ , , , , ,
collocation method
Δ ⋅ , , , , ,
collocation method in the loop
add collocation conditions
Δ ⋅ , , , , ,
collocation method in the loop
add collocation conditions
simplify Radau IIA or Lobatto IIIA
Collocation method and Jacobian structure
Example
≔ Δ ⋅ ⋅,,,
! 0
Δ ⋅ ⋅
∗ 0 00 ∗ 00 0 ∗
∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗
Collocation method and Jacobian structure
Example
≔ ⋅ Δ ⋅,,,
! 0
∗ 0 00 ∗ 00 0 ∗
Lagrange-term Example Radau quadrature
34 ⋅
13 Δ ,
13 Δ , t
13 Δ
14 ⋅ 1 ⋅ Δ , 1 ⋅ Δ , t 1 ⋅ Δ
not included in the objective function!
Lobatto IIIA for the first subinterval
Differences between Radau IIA and Lobatto IIIA
Radau IIA
more sparse structure
a high stability
Lobatto IIIA
continuously differentiable continuation
Differences between multiple shooting and total collocation
multiple shooting
more sparse structure
reduced search space
total collocation
no need to solve nonlinear system in optimization step
easier to generate Jacobian, gradient,… for optimizer
path constraints
evaluate on the collocation points
evaluate on the multiple shooting points
Current Status Optimica+Modelica parser and AST building already works C-Code generation for Lagrange- ,Mayer term and path constraints exist numerical differentiation partially automated for the problem
Outlook generate the equations in Compilier symbolic preprocessing symbolic differentiation