Folie 1 - Dynardo

Tutorial 2, Part 1:
Optimization of a
damped oscillator
Damped oscillator
• Mass m, damping c, stiffness k
and initial kinetic energy
• Equation of motion:
• Undamped eigen-frequency:
• Lehr's damping ratio D
• Damped eigen-frequency
2
Tutorial 2, Part 1: Optimization
Damped oscillator
• Time-dependent displacement function
• Optimization goal: Minimize maximum
amplitude after 5s free vibration
• Optimization constraint:
• Optimization parameter bounds &
constant parameters:
3
Tutorial 2, Part 1: Optimization
Task description
•
Parameterization of the problem
•
Definition and evaluation of DOE scheme
•
Definition and evaluation of MOP
•
Single objective, constraint optimization
• Gradient based optimization
• Global response surface method
• Adaptive response surface method
• Evolutionary algorithm
•
Multi objective optimization
• Pareto optimization with
evolutionary algorithm
4
Tutorial 2, Part 1: Optimization
Project manager
1.
2.
3.
1.
2.
3.
4.
5
Open the project manager
Define project name
Create a new project directory
Copy optiSLang examples/Oscillator into project director
Tutorial 2, Part 1: Optimization
Parameterization of the problem
1.
2.
3.
4.
5.
1.
2.
3.
4.
6
Start a new parametrize workflow
Define workflow name
Create a new problem specification
Enter problem file name
Tutorial 2, Part 1: Optimization
Parameterization of the problem
1.
2.
1. Click “open file” icon in parametrize editor
2. Browse for the SLang input file oscillator.s
3. Choose file type as INPUT
7
Tutorial 2, Part 1: Optimization
3.
Parameterization of the problem
2.
1.
1. Mark value of m in the input file
2. Define m as input parameter
3. Define parameter name
8
Tutorial 2, Part 1: Optimization
3.
Parameterization of the problem
1.
2.
1. Open parameter in parameter tree
2. Enter lower and upper bounds
(0.1 … 5.0)
9
Tutorial 2, Part 1: Optimization
Parameterization of the inputs
1. Repeat procedure for k
10
Tutorial 2, Part 1: Optimization
Parameterization of the output signal
1.
2.
3.
1. Click “open file” icon in parametrize editor
2. Browse for the SLang output file oscillator_solution.txt
3. Choose file type as OUTPUT
11
Tutorial 2, Part 1: Optimization
Parameterization of the problem
2.
1.
3.
1. Mark output value in editor
2. Define omega as output parameter
3. Repeat for x_max and x_max_env
12
Tutorial 2, Part 1: Optimization
Parameterization of the problem
2.
1.
1. Create new objective function
2. Define objective as x_max
13
Tutorial 2, Part 1: Optimization
Parameterization of the problem
2.
1.
1. Create new constraint equation
2. Define inequality constraint 0≤8-omega
14
Tutorial 2, Part 1: Optimization
Parameterization of the problem
1.
2.
1. Check overview for inputs
2. Check overview for outputs
15
Tutorial 2, Part 1: Optimization
Parameterization of the problem
1.
2.
1. Check overview for objectives
2. Check overview for constraints
16
Tutorial 2, Part 1: Optimization
Design Of Experiments (DOE)
2.
1.
2.
3.
1.
2.
3.
4.
5.
17
Start a new DOE workflow
Define workflow name and workflow identifier
Enter problem file name
Enter solver call (slang –b oscillator.s)
Start DOE evaluation with 100 LHS samples
Tutorial 2, Part 1: Optimization
Meta-Model of Optimal Prognosis (MOP)
2.
1.
3.
4.
1.
2.
3.
4.
18
Start a new MOP workflow
Define workflow name and workflow identifier
Choose DOE result file
Choose optional problem file
Tutorial 2, Part 1: Optimization
Meta-Model of Optimal Prognosis (MOP)
1.
4.
2.
3.
5.
1.
2.
3.
4.
5.
19
CoP settings (sample splitting or cross validation)
Investigated approximation models
DCoP - accepted reduction in prediction quality to simplify model
Filter settings
Selection of inputs and outputs
Tutorial 2, Part 1: Optimization
Meta-Model of Optimal Prognosis (MOP)
•
20
Check approximation quality to identify solver problems
and for a possible use of MOP for the optimization task
Tutorial 2, Part 1: Optimization
Gradient-based optimization
1.
2.
2.
3.
4.
1.
2.
3.
4.
5.
6.
21
Start a new Gradient-based workflow
Define workflow name and workflow identifier
Enter problem file name
Choose optimization method
Enter solver call (slang –b oscillator.s)
Start gradient workflow
Tutorial 2, Part 1: Optimization
Gradient-based optimization
1.
1. Keep default settings and start optimization task
 Differentiation interval is too small for noisy objective
 Optimizer runs into local optimum
2. Change differentiation interval to 5%
 Slow convergence but global optimum is found
22
Tutorial 2, Part 1: Optimization
Gradient-based optimization
1.
3.
2.
4.
5.
23
Tutorial 2, Part 1: Optimization
1.
2.
3.
4.
5.
Objective history
Best design input parameters
Best design response data
Objective and constraints data
Parameter history
Gradient-based optimization using MOP
3a.
3b.
4.
1.
2.
3.
4.
5.
24
Start a new Gradient-based workflow
Define workflow name, workflow identifier and problem file name
Use MOP as solver and choose MOP data file
Enter solver call (slang –b oscillator.s) to verify best design
Start gradient workflow
Tutorial 2, Part 1: Optimization
Gradient-based optimization using MOP
1.
1. Keep default settings and start optimization task
25
Tutorial 2, Part 1: Optimization
Gradient-based optimization using MOP
1.
3.
2.
4.
1.
2.
3.
4.
26
Objective history
Best design input parameters (MOP and calculated)
Best design response data (MOP and calculated)
Objective and constraints data (MOP and calculated)
Tutorial 2, Part 1: Optimization
Adaptive response surface (local)
2.
1.
2.
3.
1.
2.
3.
4.
5.
27
Start a new ARSM workflow
Define workflow name and workflow identifier
Enter problem file name
Enter solver call (slang –b oscillator.s)
Start ARSM workflow
Tutorial 2, Part 1: Optimization
Adaptive response surface (local)
2.
1.
2.
3.
1. NLPQL as optimization method
2. Approximation settings:
keep polynomial regression
3. Advanced settings: no recycle
of previous support points
28
Tutorial 2, Part 1: Optimization
Adaptive response surface (local)
1.
3.
2.
4.
1.
2.
3.
4.
5.
29
5.
Objective history for each iteration step
Best design input parameters (ARSM and original)
Best design response data (ARSM and original)
Objective and constraints data (ARSM and original)
Parameter history for each iteration step
Tutorial 2, Part 1: Optimization
Adaptive response surface (global)
2.
1.
2.
1. GA & NLPQL as optimization method
2. Approximation settings: choose Moving Least Squares
30
Tutorial 2, Part 1: Optimization
Adaptive response surface (global)
2.
1.
1. Increase stopping criteria to 0.1%
2. Advanced settings: choose recycle previous support points
31
Tutorial 2, Part 1: Optimization
Adaptive response surface (global)
32
Tutorial 2, Part 1: Optimization
Evolutionary algorithm (EA)
1.
2.
2.
3.
4.
1.
2.
3.
4.
5.
33
Start a new NOA workflow
Define workflow name and workflow identifier
Enter problem file name
Choose optimization algorithm (EA with global search is default)
Enter solver call (slang –b oscillator.s) and start workflow
Tutorial 2, Part 1: Optimization
Evolutionary algorithm (EA)
1.
1. Choose start population size
2. Keep defaults for Selection,
Crossover and Mutation
34
Tutorial 2, Part 1: Optimization
Evolutionary algorithm (EA)
1.
3.
2.
4.
5.
1.
2.
3.
4.
5.
35
Tutorial 2, Part 1: Optimization
Objective history for each design
Best design input parameters
Best design response data
Penalized objective and constraints data
Parameter history for each design,
new generations are marked
Parameterization of second objective
2.
3.
1.
2.
3.
4.
36
4.
Start a new parametrize workflow
Define workflow name
Create a copy and modify it
Open Tutorial_Oscillator.pro and enter new problem file name
Tutorial 2, Part 1: Optimization
Parameterization of second objective
2.
4.
1.
3.
1.
2.
3.
4.
37
Create a new objective
Enter name, activate and enter function obj2 = omega
Delete omega constraint
Close editor and check objectives
Tutorial 2, Part 1: Optimization
Pareto optimization with EA
2.
1.
2.
3.
4.
1.
2.
3.
4.
5.
38
Start a new Pareto workflow
Define workflow name and workflow identifier
Enter problem file name
Choose EA as optimization algorithm
Enter solver call (slang –b oscillator.s) and start workflow
Tutorial 2, Part 1: Optimization
Pareto optimization with EA
1.
1. Choose start population size
2. Keep defaults for Selection, Crossover and Mutation
39
Tutorial 2, Part 1: Optimization
Pareto optimization with EA
2.
3.
1.
4.
1.
2.
3.
4.
5.
5.
Plot of objective values of designs including Pareto front
Best design input parameters
Best design response data
Objectives data
Parameter history for each design, new generations are marked
40
Tutorial 2, Part 1: Optimization