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.
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
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
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.
To set up and run the tutorial, perform the following steps:
- Opening the Workbench Project
- Connecting a Signal Processing System
- Selecting the Solver Signal File
- Defining the Solver Signal
- Selecting the Reference Signal File
- Defining the Reference Signal
- Defining the Signal Functions
- Completing the Sensitivity Wizard
- Running the Sensitivity Analysis
- Completing the Optimization Wizard
- Running the Simplex Optimization
- Viewing Images in the Post Processor
Start Workbench.
From the menu bar, select
> .Browse to the oscillator_optimization_calibration_workbench folder and select oscillator_apdl.wbpz.
Click
.To save the archive file as a Workbench project file, click
.To update the project, click .
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.
Double-click the Signal Processing cell of the Signal Processing system.
On the ETK tab, click Browse file.
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.
Click
.
From the File format list, ensure is selected and click .
Highlight the text in line 1 (Simulation).
Right-click the selection and select
> from the context menu.Highlight the first number in line 4 (0.00000)
Right-click the selection and select
> from the context menu.Expand Show advanced options.
Under Token, set
Max: 2
.Click
.The signal is displayed in the Responses pane.
You can select the Instant visualization check box to see if the response is extracted correctly.
To open the reference signal file, click the orange folder.
In the Choose a file to open dialog box, browse to the oscillator_optimization_calibration_workbench folder and select oscillator_reference.txt.
Click
.
From the File format list, ensure is selected and click .
Highlight the text in line 1 (Reference).
Right-click the selection and select
> from the context menu.Highlight the first number in line 4 (0.00000).
Right-click the selection and select
> from the context menu.Expand Show advanced options.
Under Token, set
Max: 2
.Click
.The signal is displayed in the Responses pane.
Switch to the Variables tab
Click
.Double-click the ID cell for the new variable, type
error_norm
, and press Enter.Right-click the Expression cell of row 3 (error_norm) and select from the context menu.
In the calculator, switch to the Linear Algebra tab.
Click
.In the brackets, type
Simulation-Reference
.Click
.Drag the error_norm row into the Responses pane to register it as a response.
Click
.To save the current project, from the menu bar, select
> or from the main toolbar, click .Right-click the Signal Processing cell of the Signal Processing system and select from the context menu.
After updating the project, the additional scalar response is displayed in the parameter set.
To start a new sensitivity analysis, in the Workbench Toolbox, double-click the Sensitivity system.
Double-click the range numbers and set the following:
Row Lower Bound Upper Bound k 10 50 m 0.1 5 D 0.01 0.05 Ekin 10 100 Click
.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.
Click
.Change Simulation runtime to short.
Select the Space filling Latin Hypercube Sampling sampling method and leave the number of samples at 100.
Click
.
To save the current project, from the menu bar, select
> or from the main toolbar, click .Right-click the Results cell of the Sensitivity system and select 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).
Drag the Optimization wizard from the Toolbar and drop it onto the DOE cell of the Sensitivity system.
Do not adjust the values in the Parametrize Inputs table.
Click
.Do not adjust or add to the currently displayed values for parameters, responses, and criteria.
Click
.Click
.Select the
optimization method.From the Analysis status list, select .
Click
.The Optimization system is added to the Project Schematic.
To save the current project, from the menu bar, select
> or from the main toolbar, click .Right-click the Results cell of the Optimization system and select from the context menu.
The Simplex converges well to a small signal difference.
Note: This is an optional procedure.
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.
Double-click the Data Send system Setup cell.
In the left pane, select the solver images to copy to the design directory.
Double click the Results cell of the Sensitivity or Optimization systems to view the postprocessing.
In the optiSLang postprocessing Monitoring pane, select
> .Select the image from an arbitrary design directory.
The image of the currently selected design is displayed.