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 2 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 3 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 4 Tutorial: Calibration 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 directory Tutorial: Calibration 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: Calibration Parameterization of the inputs 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: Calibration 3. Parameterization of the inputs 2. 1. 1. Mark value of m in the input file 2. Define m as input parameter 3. Define parameter name 8 Tutorial: Calibration 3. Parameterization of the inputs 1. 1. Open parameter in parameter tree 2. Enter lower and upper bounds (0.1 … 5.0) 3. Repeat procedure for k, D, Ekin 9 Tutorial: Calibration 2. Parameterization of the inputs 10 Tutorial: Calibration Parameterization of the inputs 11 Tutorial: Calibration Parameterization of the output signal 1. 2. 1. Click “open file” icon in parametrize editor 2. Browse for the SLang output file oscillator_signal.txt 3. Choose file type as OUTPUT 12 Tutorial: Calibration 3. Parameterization of the output signal 2. 1. 3. 1. Mark output object string in editor 2. Add string to repeated block marker set 3. Select “set super marker”, set start, increment, end values and “single steps” 13 Tutorial: Calibration Parameterization of the output signal 2. 1. 3. 4. 1. 2. 3. 4. 14 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. 1. Repeat for the displacement column 2. Block marker and vectors appear in parameter tree 15 Tutorial: Calibration Definition of the output signal object 1. 2. 3. 4. 1. 1. 2. 3. 4. 5. 16 Tutorial: Calibration 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 Parameterization of the reference signal 1. 2. 1. Click “open file” icon in parametrize editor 2. Browse for the SLang output file oscillator_reference.txt 3. Choose file type as OUTPUT 17 Tutorial: Calibration 3. Parameterization of the reference signal 2. 1. 3. 1. Mark output object string in editor 2. Add string to repeated block marker set 3. Select “set super marker”, set start, increment, end values and “single steps” 18 Tutorial: Calibration Parameterization of the reference signal 2. 1. 3. 4. 1. 2. 3. 4. 19 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. 1. 2. 3. 4. 20 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. 1. 2. 3. 4. 21 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. 1. Open the reference vectors in the parameter tree 2. Set vectors as active and constant 22 Tutorial: Calibration Definition of the reference signal object 1. 2. 3. 4. 1. 23 1. Create a new signal object 2. Define signal object disp_time_ref and activate and set as constant 3. Choose abscissa reference and define label 4. Add disp_ref and disp_ref_noise as channels 5. Define channel name, label and activate Tutorial: Calibration Definition of difference from reference 2. 1. 2. 1. 1. Create a signal function 2. Add signal function SIG_DIFF_EUCLID as difference between solver output and reference channel 24 Tutorial: Calibration Definition of maximum values in time slots 2. 1. 1. Create new signal functions 2. 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) 25 Tutorial: Calibration Definition of difference from noisy reference 1. 2. 1. Create new signal functions 2. Add signal function SIG_DIFF_EUCLID as difference between solver output and noisy reference channel 26 Tutorial: Calibration Definition of objective functions 2a. 1. 2b. 1. Create new objective function 2. Define objective as difference between solver output and reference channel (second objective using noisy reference) 27 Tutorial: Calibration Parameterization of the problem 1. 2. 1. Close parametrization editor 2. Check overview for inputs 3. Check overview for outputs 28 Tutorial: Calibration Parameterization of the problem 1. 2. 1. Check overview for signals 2. Check overview for objectives 29 Tutorial: Calibration Design Of Experiments (DOE) 2. 1. 2. 3. 1. Start a new DOE workflow 2. Define workflow name and workflow identifier 3. Enter problem file name 30 Tutorial: Calibration Design Of Experiments (DOE) 1. 1. Enter solver call (slang –b oscillator.s) 2. Start DOE evaluation with 100 LHS samples 31 Tutorial: Calibration Design Of Experiments (DOE) 100 samples • • 32 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. 1. 2. 3. 4. 33 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. 1. CoP settings (sample splitting or cross validation) 2. Investigated approximation models 3. Set DCoP (accepted reduction in prediction quality to simplify model) to 0.01 4. Filter settings 34 Tutorial: Calibration Meta-Model of Optimal Prognosis (MOP) 100 samples • • 35 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 36 Tutorial: Calibration Meta-Model of Optimal Prognosis (MOP) 100 samples Full m k 19% 44% 500 samples D Ekin Full - - 72% m k Ekin - 21% - 56% 8% 43% RMSE 45% Max0 99% - 42% - 57% 99% Max2 97% 7% 41% 9% 47% 99% 10% 45% Max4 97% 15% 42% 18% 29% 98% 15% 44% 16% 30% Max6 98% 23% 36% 23% 23% 99% 20% 41% 22% 24% Max8 95% 23% 28% 35% 16% 96% 19% 36% 26% 20% • All inputs are significant for at least some of the output values Identification of all input parameters is generally possible 37 Tutorial: Calibration 27% 53% D - 46% Evolutionary algorithm (global search) 1. 2. 2. 3. 4. 1. 2. 3. 4. 5. 38 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. 1. Choose start population size 2. Keep defaults for Selection, Crossover and Mutation 39 Tutorial: Calibration Evolutionary algorithm (global search) • 40 Global optimization converges to small difference between output and reference Tutorial: Calibration Dependent parameters Run 1: RMSE=0.183 • 41 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 Ekin and m as well as k and m appear only pair-wisely in the displacement function Only the ratio between Ekin and 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 42 Tutorial: Calibration Modify the parametrization 1. 2. 3. 4. 5. 1. 2. 3. 4. 5. 43 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. 1. 2. 3. 4. 44 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 Different optimization runs lead to similar parameter sets with similar differences No parameter dependencies 45 Tutorial: Calibration Run 3: RMSE=0.769 Gradient-based optimization 2. 2. 3. 4. 1. 2. 3. 4. 5. 6. 46 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 1. 1. Decrease size of differentiation interval 2. Choose best design from EA optimization as start value 47 Tutorial: Calibration 2. 2. Gradient-based optimization • • Local gradient-based optimization gives exact reference values for inputs Fitting is perfect (almost zero rmse) 48 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 49 Tutorial: Calibration Identification using noisy reference Evolutionary Algorithm (global search) 50 Tutorial: Calibration Identification using noisy reference Gradient based (local search) • • Measurements errors may reduce the identification quality The accuracy of the identified parameters depends on the number of measurements and the sensitivity of the parameter 51 Tutorial: Calibration
© Copyright 2026 Paperzz