410 likes | 601 Views
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. Damped oscillator.
E N D
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 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: 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 Tutorial 2, Part 1: Optimization
Project manager 1. 2. 3. • 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. • 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. 3. • Click “open file” icon in parametrize editor • Browse for the SLang input file oscillator.s • Choose file type as INPUT Tutorial 2, Part 1: Optimization
Parameterization of the problem 2. 1. 3. • Mark value of m in the input file • Define m as input parameter • Define parameter name Tutorial 2, Part 1: Optimization
Parameterization of the problem 1. 2. • Open parameter in parameter tree • Enter lower and upper bounds (0.1 … 5.0) Tutorial 2, Part 1: Optimization
Parameterization of the inputs • Repeat procedure for k Tutorial 2, Part 1: Optimization
Parameterization of the output signal 1. 2. 3. • Click “open file” icon in parametrize editor • Browse for the SLang output file oscillator_solution.txt • Choose file type as OUTPUT Tutorial 2, Part 1: Optimization
Parameterization of the problem 2. 1. 3. • Mark output value in editor • Define omega as output parameter • Repeat for x_max and x_max_env Tutorial 2, Part 1: Optimization
Parameterization of the problem 2. 1. • Create new objective function • Define objective as x_max Tutorial 2, Part 1: Optimization
Parameterization of the problem 2. 1. • Create new constraint equation • Define inequality constraint 0≤8-omega Tutorial 2, Part 1: Optimization
Parameterization of the problem 1. 2. • Check overview for inputs • Check overview for outputs Tutorial 2, Part 1: Optimization
Parameterization of the problem 1. 2. • Check overview for objectives • Check overview for constraints Tutorial 2, Part 1: Optimization
Design Of Experiments (DOE) 2. 1. 2. 3. • 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. • 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. • 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) • 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 2. 1. 2. 3. 4. • 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. • Keep default settings and start optimization task • Differentiation interval is too small for noisy objective • Optimizer runs into local optimum • Change differentiation interval to 5% • Slow convergence but global optimum is found Tutorial 2, Part 1: Optimization
Gradient-based optimization 1. 3. 2. 4. • Objective history • Best design input parameters • Best design response data • Objective and constraints data • Parameter history 5. Tutorial 2, Part 1: Optimization
Gradient-based optimization using MOP 3a. 3b. 4. • 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. • Keep default settings and start optimization task Tutorial 2, Part 1: Optimization
Gradient-based optimization using MOP 1. 3. 2. 4. • 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. • 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. • NLPQL as optimization method • Approximation settings: keep polynomial regression • Advanced settings: no recycle of previous support points Tutorial 2, Part 1: Optimization
Adaptive response surface (local) 1. 3. 2. 4. 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. • GA & NLPQL as optimization method • Approximation settings: choose Moving Least Squares Tutorial 2, Part 1: Optimization
Adaptive response surface (global) 2. 1. • Increase stopping criteria to 0.1% • Advanced settings: choose recycle previous support points Tutorial 2, Part 1: Optimization
Adaptive response surface (global) Tutorial 2, Part 1: Optimization
Evolutionary algorithm (EA) 2. 1. 2. 3. 4. • 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. • Choose start population size • Keep defaults for Selection, Crossover and Mutation Tutorial 2, Part 1: Optimization
Evolutionary algorithm (EA) 1. 3. 2. 4. 5. • 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 Tutorial 2, Part 1: Optimization
Parameterization of second objective 2. 3. 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. • 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. • 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. • Choose start population size • Keep defaults for Selection, Crossover and Mutation Tutorial 2, Part 1: Optimization
Pareto optimization with EA 2. 3. 1. 5. 4. • 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 Tutorial 2, Part 1: Optimization