History MSE
In this example time history curves are used to calibrate directly experiment vs. simulation curves.
Working Directory and Extraction of necessary files
- Create a working directory in the desired location, e.g. history_MSE.
- Extract all the files for the History-based Mean Square Error (Windows / Linux) into the working directory.
Project Details
- Select the Working Directory of the LS-OPT project.
- Select a suitable name for the file under Filename (e.g. history_mse). The extension .lsopt is appended by LS-OPT.
- Description of the main task can e.g. be a suitable name for Problem Description ( in this case, Parameter Identification, optional) .
- Input the name of the Author (optional).
- Choose a suitable name under the Initial Sampling name and Initial Stage name (e.g. Case1).
- Press the Create button to initiate the formation of the input file.
- The main GUI window of LS-OPT opens.
Home Screen Process Flowchart
-
Select the Task icon.
A window Task selection shall open.
Define the Main Task
- Select the radio button Optimization for the selection of the main task.
- The selection of the strategy is made to Sequential with Domain Reduction (SRSM). The optimization is performed in an iterative process then.
- To study the Global Sensitivities for the input parameters remember to select the radio .
- The user has a choice to Do verification run by selecting the option. This will run an additional simulation using the optimal parameter values found on the metamodel to check the quality of the result.
- Push the OK button to proceed.
Home Screen Process Flowchart
- Select the Case1 box.
A window Stage Case1 shall open.
Define Input File Name and Command
- Select the Setup tab.
- For Command specify the LS-DYNA executable ls-dyna (This name can be different on your computer). On Windows, the command has to be specified using the absolute path.
- For Input File browse for the parameterized file foam1.k. Parameters in LS-DYNA input files can be definied using *PARAMETER or the LS-OPT parameter format <<>>, see Parameters tab.
- For efficient usage of the computing power from the machine, choice on handling the number of concurrent jobs can be made suitably in this section. (E.g., if the machine has 4CPUs, and to run each job on a single CPU : Units per job = 1, Global limit = 4).
The parameters located in the selected Input File can be visualized in the adjoining tab Parameters.
Design Parameters.
- Select the Parameters tab.
- The first design parameter of the objective function located in the input file foam1.k is displayed ( Young's modulus E (YMod) of the foam material ).
- The second design parameter of the objective function located in the input file foam1.k is displayed ( Yield stress Y (Yield) of the foam material ).
Extract First History
- Select the Histories tab.
- Select the suitable History definition from the available LS-DYNA output interfaces available from the list under Add new, in this case select the option RCFORC.
A separate window emerges named, New history. This enables the user to define the history in suitable steps.
Define z-slave-force on interface 1
- Enter the label Force as History name.
- Enter 1 for the Interface ID.
- Select Z slave force for the Component.
- Select OK to proceed.
- This will extract the Z-slave history Force from the binary LS-DYNA output database RCFORC.
- The New history tab closes and returns to the main page of the HIstories tab in the Stage Case1 window.
Add Second History
For additional history definitions from the available LS-DYNA output interfaces available from the list under Add new, select the option NODOUT.
Define z-displacement of node 296
- Enter the label Disp1 as History name.
- For Component select Displacement.
- For Direction select Z Component.
- Type in the node ID: 296.
- Select OK to add the history definition.
This will extract the Z-component of the displacement at node ID 296 from the binary LS-DYNA output database NODOUT.
Add Third History
For additional history definitions, from the available LS-DYNA output interfaces, select the option Crossplot available from the list under Add new.
Define crossplot for -Disp1 and Force
- Type in F_vs_d as History Name.
- For z(t) type in -Disp1 (negative Disp1).
- For F(t) type in Force.
- Select OK to add the history definition.
This will generate the force vs. displacement curve.
Add File History
- Select the option File Histories.
A separate window emerges named, File Histories.
Define a history through a text file
- To define a file history for use as target curve select the option Add new.
- Type in File1 as History Name.
- Push the Browse button to find the file Test1.txt from your working directory (see below).
- Select OK to add the file history.
0.36168 10162 0.72562 12964 1.0903 14840 1.4538 17672
*Test1.txt file includes data for 'Displacement' vs. 'Force Resultant'.
History Review
- The defined histories can be reviewed in the tab of the Histories under the History definition. Necessary changes can be made by selecting the choice.
- To delete a History definition click on the cross button (denoted as X).
- Additional histories can be added from the choice available under the Add new list as earlier.
- Select the OK button to proceed.
Home Screen Process Flowchart
- Select the Setup box.
A window Problem global setup shall open.
Define the Parameters.
- Select the Parameter Setup tab. The variables are already defined in the input file foam1.k (shown below) .
- For Type of YMod switch the menu to Continuous.
- Enter 500000 for the Minimum of the variable.
- Enter 2000000 for the Maximum of the variable.
- For Type of Yield switch the menu to Continuous.
- Enter 500 for the Minimum of the variable.
- Enter 2000 for the Maximum of the variable.
*KEYWORD *PARAMETER rYMod,7e5 rYield,15e2 *CONTROL TERMINATION
Stage Matrix
- Select the Stage Matrix tab.
- You find a matrix of parameters vs. stages, and symbols that visualize if parameters are found in input files.
Sampling Matrix
- Select the Sampling Matrix tab.
- If you don't want to use a parameter as variable for a respective sampling, the variables can be switched off here. The parameters are treated as constants then.
- Select the OK button to proceed.
Home Screen Process Flowchart
- Select the Sampling Case1 box.
A window Sampling Case1 shall open.
Define Metamodel Settings
- Select the Sampling Metamodel Settings tab.
- For Metamodel select from the list Polynomial.
- For Order of the Polynomial model we take Linear.
- Make sure that the Point Selection is set to D-Optimal, which is recommended.
Define Metamodel Features
- Select the Features tab.
- Select Approximate Histories.
- Amoung the several choice available for History Approximation Type select Linear.
- Select the OK button to proceed.
The history approximations (metamodels) are used to calculate the History match composite, see Composites.
Build Metamodels
- To review the Metamodel properties for optimization, select the Build Metamodels box.
A window Sampling Case1 shall open which is the same as in the Sampling box. It's displayed twice in the main GUI to visualize the flowchart of the optimization process.
Home Screen Process Flowchart
- Select the Add (denoted as +) located in the control bar.
- Select the option Add Composite from the list.
A window Composites shall open.
Composite Definition
- Select the option History Match for the type of composite under the list for Add new.
A separate window named as History matching composites shall open.
Define Composite
- Enter the Name for composite as MSE.
- Select the option Mean Square Error for the options from Algorithm.
- For Target curve select FILE1.
- For Computed curve select F_vs_d.
- The selection of Regression points is kept at From target curve (default).
- Select OK to add the composite definition.
- The main difference between the above mentioned algorithm has been explained in details on this page.
Composites Review
- The defined composite can be reviewed in the main page of the Composites under the Composite definition. Necessary changes can be made by selecting the choice.
- Select OK to continue.
Home Screen Process Flowchart
- Select the Optimization box.
A window Algorithms shall open.
Add Objective
- Select the Objectives tab.
- From Composites select MSE as the objective.
Define Objective
- For Weight leave the default 1. If you have several objective functions, you may assign weight to each one according to their importance.
Optimization Algorithm.
- Select the Algorithms tab. Here, the algorithm used for the optimization on the metamodel can be selected.
- Make sure that the radio button for Adaptive Simulated Annealing (ASA) is selected and Switch to LFOP is checked. These are the default settings.
- Select the OK button to proceed.
Home Screen Process Flowchart
-
Select the Termination criteria icon.
A window Termination criteria shall open.
Define the Termination criteria
- Retail the (default) selection of the radio button on Design AND Objective AND Metamodel Accuracy for the choice of Tolerance Required for Termination.
- Several Tolerance parameters (Design, Objective, Response) are retained to their default values.
- Change the Maximum number of Iterations to 3.
- Push the OK button to proceed.
Run LS-Opt.
- Select the Run button from the Control Bar.
- Push Normal Run for execution.
- The user can get information on the status of the current iteration during execution.
- At every stage the user has an option to view the progress of the program execution by selecting the LED on the Case1 tab.
As seperate window Progress opens up.
Progress
- The progress bar gives information on the status and several other details of the optimization progress.
- Underneath the status, the user has the option to view various plots of the computed values during execution vs the simulation time.
View Log
- Select the simulation point for which the log file is desired.
- Click on the View log button.
- A new window opens containing the solver output, in this case the LS-DYNA output.
- Select the Dismiss button to close the window and proceed.
-
To view the status of the program during execution, observe the grey LED's at every stage of the process flow. Succesful completion of every stage is marked by turning respective LED green.
-
The iterations count at the taskbar can be altered to observe the activities at various iterations.
After completion of the program execution the user can view the results.
Home Screen Process Flowchart
- The results can be viewed by selecting the view button on the task bar. A seperate window of LS-OPT Viewer opens up.
LS-OPT Viewer
- Select under Simulations the item Histories.
Plot Setup
- Select the Setup tab.
- Select all for the iterations setup.
- Plot co-ordinate selections for Y-axis made as F_vs_d.
- Select File1 to plot the test data together with the simulation results.
- Choose Iterations for the Color entities.
- Select the Options tab.
- Make an additional selections for Only optimal.
Plot
- The 2-D plot clearly shows the optimal simulation curves at different iterations for the crossplot of Force1 and -Disp1.
- The crosses (denoted as x) mark out the "experimental" result stored in FILE1 in order to compare themself with the simulation result. We can see, they are well-matched at the last iteration shown in red.
Plots at different iterations
- At different iterations we can visualize the reduction of the Mean Square Error as the curves tend to coincide with the "experiamental" result stored in FILE1.
We can plot the several surface plots of the metamodel we've built. For example, we want to see a surface plot of the objective function MSE with respect to the variables YMod and Yield, do it as following:
New Plot
- To view a new plot select the plot button on the task bar. A seperate window of LS-OPT Viewer opens up.
LS-OPT Viewer
- Select under Metamodel the item Surface.
- Slide to the last iteration.
- Select the Setup tab.
- Set MSE as the z-coordinate, the variables YMod and Yield as the x-coordinate and y-coordinate, respectively.
- Choose Predicted value. A purple cross will appear somewhere on the surface. You can move it by changing the values of the variables YMod and Yield. The predicted value for the selected parameter combination is displayed.
- Click Center on Opt. to locate the cross at the optimal point.
- Select the Points tab.
- Make the selection for Iterations at Current.
- Pick Predicted Optimum and Computed Optimum.
Note that the surface plot for MSE shows a quadratic surface, although we used linear polynomials. The reason is that MSE is defined as a composite expression that is calculated using the metamodels of the components, and the expression is of quadratic order.
- We rotate the plot with the mouse by pressing Ctrl at the meantime. We can change the surface plot for each iteration (at step 2.) and visualize the effect of domain reduction (as shown below).
Fig. Effect of domain reduction on optimization process
What is the approximation error of the result?
The approximation error indicators (predict the metamodel accuracy of the results) can be visualized in the LS-OPT Viewer.
New Plot
- To view a new plot select the plot button on the task bar. A seperate window of LS-OPT Viewer opens up.
LS-OPT Viewer
- Select under Metamodel the item Accuracy.
- From Entity select the Objective MSE.
→ Good approximation: low distance between black line and green points.
Optimization History
- Alternatively the accuracy of the optimal MSE values at various iterations can be studied under a Optimization History plot.
New Plot
- To view a new plot select the plot button on the task bar. A seperate window of LS-OPT Viewer opens up.
LS-OPT Viewer
- Select under Optimization the item History.
- From Setup tab, select any of the select the Objective MSE..
→ Good approximation of optima: The computed values (red points) almost coincide with the predicted values (black line).
New Plot
- To view a new plot select the plot button on the task bar. A seperate window of LS-OPT Viewer opens up.
LS-OPT Viewer
- Choose History under the category Optimization.
- We can choose from the left side the entities we want to observe.
1. Select Variable → Yield
Fig. 1(a) shows:
- The optimization history of the variable Yield.
- The development of the variable value of the optimum (red line)
- How the range of Yield (set from 2000 to 500 at the beginning) decreases after every iteration (blue lines).
- This variable is important (see Sensitivities) to minimize the objective, and seems to be converged.
Fig. 1(a)
1. Select Variable → YMod
Fig. 1(b) shows:
- The optimization history of the variable YMod.
- The development of the optimal variable value (red line)
- How the range of YMod (set to 2000000 to 500000 at the beginning) decreases after every iteration (blue lines).
- This variable is rather insignificant (see Sensitivities) and therefor differs between the iteration without affecting the objective.
Fig. 1(b)
1. Select Objective → MSE
Fig. 1(c) shows:
- The predicted result (black line) of the optimal objective MSE for every iteration.
- The computed result (red points) of the optimal objective MSE for every iteration.
- The convergence trend of the MSE objective.
Fig. 1(c)
New Plot
- To view a new plot select the plot button on the task bar. A seperate window of LS-OPT Viewer opens up.
LS-OPT Viewer
- Choose Variables under the category Optimization.
- Drag the Iteration to 4.
- The Variable selection for YMod and Yield are already selected by default.
- The user can view the Confidence Intervals and other bounds by double clicking on the respective bar plots.
-
Alternatively the Confidence Intervals can be found in the lsopt_report file. The user can access the file by the following steps:
LS-OPT GUI
- Select the Files menu located in the control bar.
- Select the option Summary Report from the list.
A seperape file shall open, search for the term Confidence Interval at Iteration 4 (see file below).
The file lsopt_report is located in the working directory and can also be opened using any text editor.
=========================================================
C O N F I D E N C E I N T E R V A L S
ITERATION 4
===========================================================
------------------------------------------------------------
95% Confidence intervals for individual optimal parameters
------------------------------------------------------------
Name Value Confidence
Interval
Lower Upper
------------------------------------------------------------
YMod 686454.726 -12020126 13393035.3
Yield 1013.14097 833.937943 1192.34399
------------------------------------------------------------
Which variable appears to be the most important?
The significance of a variable for a response can be illustrated with ANOVA (analysis of variance) or GSA/Sobol (global sensitivity analysis). In this case, only GSA is available, since ANOVA is only calculated for responsesn, not for composites.
New Plot
- To view a new plot select the plot button on the task bar. A seperate window of LS-OPT Viewer opens up.
LS-OPT Viewer
GSA/Sobol
- Restart the LS-OPT Viewer and select under Metamodel the item Sensitivity
- We can slide to observe the sensitivity of results at each iteration. In this case for Iteration 1.
- Select MSE from the Composite.
- Select Sort for the variables.
→ For the composite MSE the variable Yield is more important, while the variable YMod is rather insignificant.
→ Similar observation can be made for the composite MSE2 by selecting the option.
View Sensitivity on Surface Plot
- The same inference can be draw from the surface plot which clearly depicts that the variable YMod (fig. right side) makes neglible change in the value of the MSE.
- Where as a similar plot with the variable Yield varies proves the sensitivity on the objective MSE.
- For problems with more parameters, only sections of the metamodels can be displayed, hence sensitivites are not always that obvious.