Calibration of a Damped Oscillator in Ansys Workbench

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:

In this tutorial, you complete the calibration using the optiSLang extension in Workbench.

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 Ansys Workbench and optiSLang signal processing

  • Define the input parameters

  • Define the output and reference signals

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

  • 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_workbench zip file from here , and extract it to your working directory.

If you do not see an optiSLang section in the Workbench Toolbox, ensure that the Ansys Workbench optiSLang Extension is installed and activated.

Tutorial Steps

Opening the Workbench Project

  1. Start Workbench.

  2. From the menu bar, select File > Open.

  3. Browse to the oscillator_optimization_calibration_workbench folder and select oscillator_apdl.wbpz.

  4. Click Open.

  5. To save the archive file as a Workbench project file, click Save.

  6. To update the project, click  .

Connecting a Signal Processing System

  • Drag the Signal Processing system from the Toolbar and drop it onto the Analysis cell of the Mechanical APDL system.

    The Signal Processing system is added to the Project Schematic.

Selecting the Solver Signal File

  1. Double-click the Signal Processing cell of the Signal Processing system.

  2. On the ETK tab, click Browse file.

  3. In the Choose a file to open dialog box, browse to the oscillator_optimization_calibration_workbench\oscillator_apdl_files\dp0\APDL\ANSYS folder and select oscillator_signal.txt.

  4. 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_workbench 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. Click Add variable.

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

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

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

  6. Click euklidnorm.

  7. In the brackets, type Simulation-Reference.

  8. Click OK.

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

  10. Click OK.

  11. To save the current project, from the menu bar, select File > Save or from the main toolbar, click  .

  12. Right-click the Signal Processing cell of the Signal Processing system and select Update from the context menu.

    After updating the project, the additional scalar response is displayed in the parameter set.

Completing the Sensitivity Wizard

  1. To start a new sensitivity analysis, in the Workbench Toolbox, double-click the Sensitivity system.

  2. Double-click the range numbers and set the following:

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

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

  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 at 100.

  8. Click Finish.

Running the Sensitivity Analysis

  1. To save the current project, from the menu bar, select File > Save or from the main toolbar, click  .

  2. Right-click the Results cell of the Sensitivity system and select Update from the context menu.

    The DOE is created in the background and all designs are calculated.

    The Progress pane displays the status of the update and a progress bar.

    Finally, the MOP is generated and 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. Drag the Optimization wizard from the Toolbar and drop it onto the DOE cell of the Sensitivity system.

  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. Select the Downhill Simplex Method optimization method.

  8. From the Analysis status list, select Preoptimized.

  9. Click Finish.

    The Optimization system is added to the Project Schematic.

Running the Simplex Optimization

  1. To save the current project, from the menu bar, select File > Save or from the main toolbar, click  .

  2. Right-click the Results cell of the Optimization system and select Update from the context menu.

    The Simplex converges well to a small signal difference.

Viewing Images in the Post Processor


Note:  This is an optional procedure.


  1. Drag the Data Send module from the Toolbar and drop it onto the Analysis cell of the Mechanical APDL system.

    The Data Send system is added to the Project Schematic.

  2. Double-click the Data Send system Setup cell.

  3. In the left pane, select the solver images to copy to the design directory.

  4. Double click the Results cell of the Sensitivity or Optimization systems to view the postprocessing.

  5. In the optiSLang postprocessing Monitoring pane, select Edit > External files and processes.

  6. Select the image from an arbitrary design directory.

    The image of the currently selected design is displayed.