28
Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun Mathematics and Engineering University of Applied Sciences Bielefeld

Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi BraunMathematics and EngineeringUniversity of Applied Sciences Bielefeld

Page 2: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Modelica and Optimization

Theoretical Backgroundmultiple shooting method total collocation handling

Current status & Outlook

Page 3: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

model

goal

constraints

free variables

Page 4: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

model

2 ⋅

⋅ goal Maximize the yield of after one hour of operation

1

constraints0 , 10 5

free input the reaction temperature

Page 5: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Objective function Mayer term Lagrange term

Path constrains

New attribute free

A part of the MODRIO-Project

Page 6: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

optimization modelName(objective=…., objectiveIntegrand=….)

-> Modelica model;

constraints

end modelName

Page 7: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

objective function

min Mayerterm

, ,

Lagrangeterm subject to model equations path constraints

Page 8: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Mayer term

requirements for the endpoint boundary value problem

Page 9: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Mayer term

requirements for the endpoint boundary value problem

Page 10: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Mayer term

requirements for the endpoint boundary value problem

multiple shooting method principle

Page 11: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

free variable

Page 12: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

free variable

Page 13: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Mayer term

requirements for the endpoint boundary value problem

multiple shooting method principle

change of the free variable

Page 14: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Mayer term

requirements for the endpoint boundary value problem

multiple shooting method principle

change of the free variable

continuity conditions

Page 15: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Mayer term

requirements for the endpoint boundary value problemmultiple shooting method principle change of the free variable continuity conditions

DAE system inline solver

algebraicsystem

Page 16: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Lagrange term

, , Δ ⋅ , , , , ,

quadrature formula with abscissas Legendre Radau Lobatto

, , is given by the quadrature formula

Page 17: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Δ ⋅ , , , , ,

, , , are needed

Page 18: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Δ ⋅ , , , , ,

collocation method

Page 19: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Δ ⋅ , , , , ,

collocation method in the loop

add collocation conditions

Page 20: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Δ ⋅ , , , , ,

collocation method in the loop

add collocation conditions

simplify Radau IIA or Lobatto IIIA

Page 21: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Collocation method and Jacobian structure

Example

≔ Δ ⋅ ⋅,,,

! 0

Δ ⋅ ⋅

∗ 0 00 ∗ 00 0 ∗

∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗

Page 22: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Collocation method and Jacobian structure

Example

≔ ⋅ Δ ⋅,,,

! 0

∗ 0 00 ∗ 00 0 ∗

Page 23: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

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

Page 24: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

Differences between Radau IIA and Lobatto IIIA

Radau IIA

more sparse structure

a high stability

Lobatto IIIA

continuously differentiable continuation

Page 25: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

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

Page 26: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

path constraints

evaluate on the collocation points

evaluate on the multiple shooting points

Page 27: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint

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

Page 28: Vitalij Ruge, Bernhard Bachmann, Lennart Ochel, Willi Braun ......0 Q Q P Q5 free input the reaction temperature Q P Objective function Mayer term Lagrange term ... Microsoft PowerPoint