Calibration of a Damped Oscillator

This tutorial allows you to complete a calibration of a single degree-of-freedom system excited with initial kinetic energy.

The equation of motion of free vibration is:

The un-damped and damped eigen-frequency is

The time-dependent displacement function is:

Problem Definition

The goal is the identification of the input parameters m, k, D, and Ekin to optimally fit a reference displacement function.

The objective function is the sum of squared errors between the reference and the calculated displacement function values

Task Description

This tutorial demonstrates how to do the following:

  • Generate a solver chain using text-based input and output

  • Define the input parameters

  • Define the output and reference signals and signal evaluation

  • Perform a sensitivity analysis of signal extraction terms using the global bounds

  • Re-evaluate the sensitivity analysis with other signal evaluations

  • Complete a single, objective, unconstrained optimization by minimizing the sum of squared errors over all time steps

Preparation

Before you start the tutorial, download the oscillator_optimization_calibration zip file from here , and extract it to your working directory.

Tutorial Steps

Creating a New Project

  1. Start optiSLang.

  2. Create a new empty project.

Starting the Solver Wizard

  1. From the Wizards pane, drag the Solver wizard to the Scenery pane and let it drop.

  2. From the solver list, click Common text based.

Selecting the Input File

  1. In the Select input file dialog box, browse to the oscillator_optimization_calibration folder and select oscillator.s.

  2. Click Open.

Defining the Input Parameters

  1. In the text editor, highlight lines 26-30

  2. Click AutoParametrize.

    All possible values are marked.

  3. Change the parameter name to m.

  4. To register the parameter, click Add.

  5. Repeat this procedure for parameters k, D, and Ekin.

  6. Click Next.

Editing the Parameter Properties

  1. Double-click the range numbers and set them to the following:

    RowLower BoundUpper Bound
    m0.15
    k1050
    D0.010.05
    Ekin10100
  2. Click Next.

Selecting the Solver Signal File

  1. In the Choose a file to open dialog box, browse to the oscillator_optimization_calibration folder and select oscillator_signal.txt.

  2. Click Open.

Defining the Solver Signal

  1. From the File format list, ensure Plain text file is selected and click OK.

  2. Highlight the text in line 1 (Simulation).

  3. Right-click the selection and select define marker > use "Simulation" as marker from the context menu.

  4. Highlight the first number in line 4 (0.00000)

  5. Right-click the selection and select define location > from marker "Simulation" repeated from the context menu.

  6. Expand Show advanced options.

  7. Under Token, set Max: 2.

  8. Click Use as response.

    The signal is displayed in the Responses pane.

    You can select the Instant visualization check box to see if the response is extracted correctly.

Selecting the Reference Signal File

  1. To open the reference signal file, click the orange folder.

  2. In the Choose a file to open dialog box, browse to the oscillator_optimization_calibration folder and select oscillator_reference.txt.

  3. Click Open.

Defining the Reference Signal

  1. From the File format list, ensure Plain text file is selected and click OK.

  2. Highlight the text in line 1 (Reference).

  3. Right-click the selection and select define marker > use "Reference" as marker from the context menu.

  4. Highlight the first number in line 4 (0.00000)

  5. Right-click the selection and select define location > from marker "Reference" repeated from the context menu.

  6. Expand Show advanced options.

  7. Under Token, set Max: 2.

  8. Click Use as response.

    The signal is displayed in the Responses pane.

Defining the Signal Functions

  1. Switch to the Variables tab

  2. In row 2 (Reference), double-click the Base path mode cell and select Absolute from the drop-down list.

  3. Click Add variable.

  4. Double-click the ID cell for the new variable, type error_norm, and press Enter.

  5. Right-click the Expression cell of row 3 (error_norm) and select Open Calculator from the context menu.

  6. In the calculator, switch to the Linear Algebra tab.

  7. Click euklidnorm.

  8. In the brackets, type Simulation-Reference.

  9. Click OK.

  10. Drag the error_norm row into the Responses pane to register it as a response.

  11. Click Next.

Defining the Optimization Criteria

  1. To define error_norm as a minimization objective, drag the row from the Responses table to the Objective Minimize icon and let it drop.

    The new criterion is displayed in the Criteria table.

  2. Click Next.

Importing the Solver Call Files

  1. To the right of the Absolute path field, click the orange folder.

  2. Browse to the oscillator_optimization_calibration folder and select oscillator.bat for Windows systems or oscillator.sh for Linux systems.

  3. Click Open.

  4. Click Import.

  5. Click Next.

Creating the Solver Chain Template

  1. Select the Create a template from solver chain check box.

  2. In the Template name field, enter oscillator_signal

  3. Click Finish.

  4. The template is displayed in the Templates pane and the system is displayed in the Scenery pane.

Saving and Running the Project

  1. To save the project, click  .

  2. Browse to the location to save the project and type a project name in the File name field.

  3. Click Save.

  4. To run the project, click  .

  5. To review the result, double-click the oscillator template and switch to the Result designs tab.

Completing the Sensitivity Wizard

  1. From the Wizards pane, drag the Sensitivity wizard to the head of the oscillator system and let it drop.

  2. Do not adjust the values in the Parametrize Inputs table.

  3. Click Next.

  4. Do not adjust or add to the currently displayed values for parameters, responses, and criteria.

  5. Click Next.

  6. Change Simulation runtime to short.

  7. Select the Space filling Latin Hypercube Sampling sampling method and leave the number of samples as recommended.

  8. Click Next.

  9. Review the settings for Tested metamodels.

    To set Tested metamodels to Polynomial + Deep Feed Forward Network, an Enterprise license is required. Alternatively, set it to All internal metamodels if the license is not available.

  10. Deactivate signal type responses.

    For the approximation of signal type responses, see the Signal Metamodel of Optimal Prognosis tutorial.

  11. Click Finish.

    The sensitivity system is displayed on the Scenery pane.

Running the Sensitivity Analysis

  1. To save the project, click  .

  2. To start the sensitivity analysis, click  .

    The bar on top of the sensitivity system displays the progress of the analysis. The message log displays the sequence of events.

    The signal data is displayed.

    You can observe that there is a highly non-linear relationship between input parameters and the error norm and significant influence of mass (m) and spring constant (k).

Completing the Optimization Wizard

  1. From the Wizards pane, drag the Optimization wizard to the head of the Sensitivity system and let it drop.

  2. Do not adjust the values in the Parametrize Inputs table.

  3. Click Next.

  4. Do not adjust or add to the currently displayed values for parameters, responses, and criteria.

  5. Click Next.

  6. Click Manual optimizer selection.

  7. From the Analysis status list, select Preoptimized.

  8. Select the Downhill Simplex Method optimization method.

  9. Click Next.

  10. Leave the additional optional settings at the default and click Finish.

    The Simplex system is connected to the Sensitivity system.

Running the Simplex Optimization

  1. To save the project, click  .

  2. To run the project, click  .

    The Simplex converges well to a small signal difference.