Optimization of a Damped Oscillator

This tutorial allows you to complete an optimization 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 optimization goal is to minimize maximum amplitude after five seconds of free vibration.

The restricted damped eigen-frequency as the optimization constraint is:

The mass and stiffness as optimization variables, damping ratio and kinetic energy as the constant is:

Task Description

This tutorial demonstrates how to do the following:

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

  • Define the input and output parameters

  • Perform a sensitivity analysis with respect to mass and stiffness using the global bounds

  • Perform a single objective and constrained optimization by minimizing the maximum amplitude

  • Perform an optimization using the Metamodel of Optimal Prognosis (MOP)

  • Perform an optimization using the Adaptive Metamodel of Optimal Prognosis (AMOP)

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. In row 1 (m), change the lower bound to 0.1 and the upper bound to 5.

  2. In row 2 (k), change the lower bound to 10 and the upper bound to 50.

  3. In rows 3 and 4 (D and Ekin), select the Constant check box.

  4. Click Next.

Selecting the Output File

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

  2. Click Open.

Defining the Response

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

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

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

    The response name is automatically taken from the marker.

  4. To register the value as a response, click Use as response.

    The response is displayed in the Responses pane.

  5. Repeat steps 2-4 for the x_max value.

  6. Click Next.

Defining the Optimization Criteria

  1. To define x_max 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. To define omega_damped as a constraint, drag the row from the Responses table to the Constraint Less icon and let it drop.

  3. In the Limit field, enter 8.

  4. 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 Next.

Creating the Solver Chain Template

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

  2. Click Finish.

  3. 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. Select the Full factorial sampling method and leave the number of samples at 100.

  7. Click Next.

  8. Do not adjust the current additional option settings.

  9. Click Finish.

    The Sensitivity system is displayed in 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 results of the sensitivity analysis are displayed. You can observe:

    • The approximation quality is excellent for both responses

    • The influence of the inputs is contrariwise

Completing the Optimization Wizard using the MOP

  1. Drag the Optimization wizard onto the MOP node 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. Do not adjust the current optimization method settings.

    The gradient based NLPQL is recommended.

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

    The scenery is extended with the optimization and validation workflow.

Running the MOP Optimization

  1. To save the project, click  .

  2. To run the project, click  .

    The optimizer converges within a few iterations. The response, objective, and constraints of the best design are verified. Due to local approximation errors, the constraints of the best design may be violated in the validation solver run. Validation of the best design is very important for the optimization on the MOP .

Adjusting the Optimization

If the validation is not satisfactory (for example, a large discrepancy or a violated constraint), use the following alternative strategies:

  • Change the constraint to provide a safety margin.

  • Append a local re-optimization with a direct solver call, using the best design on MOP as the starting design. The best design can be passed automatically to the new optimization system. However, we do not recommend using an infeasible start design.

  • Improve the metamodel locally by adding a validated best design to the sensitivity design of experiments and build a new metamodel, then repeat the optimization.

Completing the Optimization Wizard using the Adaptive MOP

  1. Drag the Optimization wizard onto the Sensitivity node 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. Do not adjust the current optimization method settings.

    The Adaptive Metamodel of Optimal Prognosis (AMOP) is recommended. All previous designs are considered as start designs.

  8. Click Next.

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

    The AMOP system is connected to the sensitivity system.

Configuring AMOP Settings

  1. Double-click the AMOP system to open the settings.

  2. On the Adaption tab, select the Show advanced settings check box.

  3. In the Maximum number of samples field, enter 45.

  4. Adjust the refinement sliders so the first two are at 0% and the Importance of optimization criteria slider is at 100%

  5. In the Maximum iterations field, enter 10.

  6. To save and close the settings, click OK.

Running the Project and Viewing AMOP Postprocessing

  1. To save the project, click  .

  2. To run the project, click  .

    The AMOP postprocessing is displayed. You can observe:

    • The AMOP with criteria refinement converges in a few iteration steps to the global optimum

    • Validation of best design is performed in every iteration

    • The history plot compares best design approximation and validation