510 likes | 713 Views
Tutorial 2, Part 2: Calibration 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: Calibration
Damped oscillator • Time-dependent displacement function • Identification of the input parameters m, k, D and Ekin to optimally fit a reference displacement function • Objective function is the sum of squared errors between the reference and the calculated displacement function values Tutorial: Calibration
Task description • Parametrization of the input parameters • Parametrization of the displacement vs. time functions as signals • Extraction of objective from output and reference signals • Definition and evaluation of a sensitivity analysis • Check for dependent parameters • Identification of the damper parameters using global and local optimization strategies • Identification using noisy reference function • Estimation of model representation quality Tutorial: Calibration
Project manager 1. 2. 3. • Open the project manager • Define project name • Create a new project directory • Copy optiSLang Examples/Oscillator into project directory Tutorial: Calibration
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: Calibration
Parameterization of the inputs 1. 2. 3. • Click “open file” icon in parametrize editor • Browse for the SLang input file oscillator.s • Choose file type as INPUT Tutorial: Calibration
Parameterization of the inputs 2. 1. 3. • Mark value of m in the input file • Define m as input parameter • Define parameter name Tutorial: Calibration
Parameterization of the inputs 1. 2. • Open parameter in parameter tree • Enter lower and upper bounds (0.1 … 5.0) • Repeat procedure for k, D, Ekin Tutorial: Calibration
Parameterization of the inputs Tutorial: Calibration
Parameterization of the inputs Tutorial: Calibration
Parameterization of the output signal 1. 2. 3. • Click “open file” icon in parametrize editor • Browse for the SLang output file oscillator_signal.txt • Choose file type as OUTPUT Tutorial: Calibration
Parameterization of the output signal 2. 1. 3. • Mark output object string in editor • Add string to repeated block marker set • Select “set super marker”, set start, increment, end values and “single steps” Tutorial: Calibration
Parameterization of the output signal 2. 1. 3. 4. • Mark first value of time column • Add string to a vector • Select marker • Define name of vector Tutorial: Calibration
Parameterization of the output signal 1. 2. • Repeat for the displacement column • Block marker and vectors appear in parameter tree Tutorial: Calibration
Definition of the output signal object 1. 2. 3. 4. 1. • Create a new signal object • Define signal object disp_time and activate • Choose abscissa reference and define label • Add disp as signal channel • Define channel name, label and activate Tutorial: Calibration
Parameterization of the reference signal 1. 2. 3. • Click “open file” icon in parametrize editor • Browse for the SLang output file oscillator_reference.txt • Choose file type as OUTPUT Tutorial: Calibration
Parameterization of the reference signal 2. 1. 3. • Mark output object string in editor • Add string to repeated block marker set • Select “set super marker”, set start, increment, end values and “single steps” Tutorial: Calibration
Parameterization of the reference signal 2. 1. 3. 4. • Mark first value of time column • Add string to a vector • Select marker • Define name of vector Tutorial: Calibration
Parameterization of the reference signal 2. 1. 3. 4. • Mark first value of displacement column • Add string to a vector • Select marker • Define name of vector Tutorial: Calibration
Parameterization of the reference signal 2. 1. 3. 4. • Mark first value of second displacement column (noisy reference) • Add string to a vector • Select marker • Define name of vector Tutorial: Calibration
Parameterization of the reference signal 2. 1. • Open the reference vectors in the parameter tree • Set vectors as active and constant Tutorial: Calibration
Definition of the reference signal object 1. 2. 3. 4. • Create a new signal object • Define signal object disp_time_ref and activate and set as constant • Choose abscissa reference and define label • Add disp_ref and disp_ref_noise as channels • Define channel name, label and activate 1. Tutorial: Calibration
Definition of difference from reference 2. 1. 2. 1. • Create a signal function • Add signal function SIG_DIFF_EUCLID as difference between solver output and reference channel Tutorial: Calibration
Definition of maximum values in time slots 2. 1. • Create new signal functions • Add signal functions SIG_MAX_Y and SIG_MAX_Y_SLOT to get maximum displacement values after a certain time (0, 2, 4, 6, 8s) Tutorial: Calibration
Definition of difference from noisy reference 2. 1. • Create new signal functions • Add signal function SIG_DIFF_EUCLID as difference between solver output and noisy reference channel Tutorial: Calibration
Definition of objective functions 2a. 2b. 1. • Create new objective function • Define objective as difference between solver output and reference channel (second objective using noisy reference) Tutorial: Calibration
Parameterization of the problem 1. 2. • Close parametrization editor • Check overview for inputs • Check overview for outputs Tutorial: Calibration
Parameterization of the problem 1. 2. • Check overview for signals • Check overview for objectives Tutorial: Calibration
Design Of Experiments (DOE) 2. 1. 2. 3. • Start a new DOE workflow • Define workflow name and workflow identifier • Enter problem file name Tutorial: Calibration
Design Of Experiments (DOE) 1. • Enter solver call (slang –b oscillator.s) • Start DOE evaluation with 100 LHS samples Tutorial: Calibration
Design Of Experiments (DOE) 100 samples • Coefficient of Determination of quadratic approximation of rmse_all_diff is very low (38% CoD) • Single values as maximum in time slot can be approximated much better (96% - 99% CoD) Tutorial: Calibration
Meta-Model of Optimal Prognosis (MOP) 2. 3. 1. 4. • Start a new MOP workflow • Define workflow name • Define workflow identifier • Choose DOE result file Tutorial: Calibration
Meta-Model of Optimal Prognosis (MOP) 1. 4. 2. 3. • CoP settings (sample splitting or cross validation) • Investigated approximation models • Set DCoP (accepted reduction in prediction quality to simplify model) to 0.01 • Filter settings Tutorial: Calibration
Meta-Model of Optimal Prognosis (MOP) 100 samples • Coefficient of Prognosis of rmse_all_diff is very low (45% CoP) and only m and k are found to be significant • CoP of maximum values in time slot are much better (95% - 99% CoD) and all inputs are indicated to be significant Tutorial: Calibration
Meta-Model of Optimal Prognosis (MOP) 100 samples 500 samples 2000 samples • Coefficient of Prognosis of rmse_all_diff increases if number of samples is increased (from 45% to 84%) and additionally Ekin becomes significant • Sensitivity study of objective function itself may require many samples due to a certain complexity • Analysis of single values may be more efficient Tutorial: Calibration
Meta-Model of Optimal Prognosis (MOP) • All inputs are significant for at least some of the output values • Identification of all input parameters is generally possible Tutorial: Calibration
Evolutionary algorithm (global search) 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 as default) • Enter solver call (slang –b oscillator.s) and start workflow Tutorial: Calibration
Evolutionary algorithm (global search) 1. • Choose start population size • Keep defaults for Selection, Crossover and Mutation Tutorial: Calibration
Evolutionary algorithm (global search) • Global optimization converges to small difference between output and reference Tutorial: Calibration
Dependent parameters Run 1: RMSE=0.183 Run 2: RMSE=0.434 • Different optimization runs lead to different parameter sets with similar differences Tutorial: Calibration
Dependent parameters Reason for non-unique solution: • The parameters Ekinand m as well as k and m appear only pair-wisely in the displacement function • Only the ratio between Ekinand m as well as k and m can be identified • We keep the value of m as constant General procedure: • Check designs from DOE with almost equal objective values • Or perform multiple global optimization runs • Sensitivity indices quantify the global influence of each input,But: the dependency between input parameters with respect to the minimum objective values can not be identified Tutorial: Calibration
Modify the parametrization 1. 2. 3. 4. 5. • Start a new parametrize workflow • Define workflow name • Create a copy and modify it • Enter original problem file name • Enter new problem file name Tutorial: Calibration
Modify the parametrization 2. 3. 4. • Open the parameter m in the parameter treee • Modify reference value • Set parameter as constant • Close parametrization editor and check inputs Tutorial: Calibration
Evolutionary algorithm (global search) Run 1: RMSE=1.587 Run 2: RMSE=0.287 Run 3: RMSE=0.769 • Different optimization runs lead to similar parameter sets with similar differences • No parameter dependencies Tutorial: Calibration
Gradient-based optimization 2. 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: Calibration
Gradient-based optimization 2. 1. • Decrease size of differentiation interval • Choose best design from EA optimization as start value 2. Tutorial: Calibration
Gradient-based optimization • Local gradient-based optimization gives exact reference values for inputs • Fitting is perfect (almost zero rmse) Tutorial: Calibration
Identification using noisy reference • Measurements are more or less precise • Reference displacement function is disturbed by Gaussian noise with zero mean and standard deviation of 0.1 m • Second objective is used for parameter identification • Again global + local optimization with reduced input parameter set k, D and Ekin Tutorial: Calibration
Identification using noisy reference Evolutionary Algorithm(global search) Tutorial: Calibration