Point MSE
A composite MSE (Mean Square Error) function is used in order to apply parameter identification with simple target values.
Working Directory and Extraction of necessary files
- Create a working directory in the desired location, e.g. Point_MSE.
- Extract all the files for the Point-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. point_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.
- Push the OK button to proceed.
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 ).
- The input file foam1.k is shown below for reference.
*KEYWORD *PARAMETER rYMod,7e5 rYield,15e2 *CONTROL TERMINATION
Extract 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.
Histories Review
- The defined responses can be reviewed in the Histories tab under the History definitions. Necessary changes can be made by selecting the choice.
- To delete a HIstory definition click on the cross button (denoted as X).
- Additional responses can be added from the choice available under the Add new list as earlier.
Responses for Optimization
- The various responses required for the analysis
Add First Response
- Select the Responses tab.
- Select the suitable response type from the various option available from the list under Add new. For the first response select the option EXPRESSION, which represents an interface to define mathematical expressions using previously defined entities.
A separate window emerges named, Edit response. This enables the user to define the response in suitable steps.
Define force response at 2 ms
- Type in the label F1_1 for response Name.
- Enter an algebraic expression: Force(0.002). This evaluates the history Force you defined before at t=0.002.
- Push the OK button to create a new response.
- The Edit response tab closes and returns to the main page of the Responses tab in the Stage Case1 window.
- Applying the same steps the user can add the required responses at the time intervals 4 ms, 6 ms and 8 ms.
Responses Review
- The defined responses can be reviewed in the tab of the Responses under the Response definition. Necessary changes can be made by selecting the choice.
- To delete a Response definition click on the cross button (denoted as X).
- Additional responses 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 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 <<>>.
- 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.
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 Yeild 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.
- Select the OK button to proceed.
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.
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 Standard Composite for the type of composite under the list for Add new.
A separate window named as Composites shall open.
Add Composite
- Enter the Name for composite as MSE.
- Select the option MSE for the options under Composite function type.
- Add F1_1, F2_1, F3_1 and F4_1 as the Composite components.
Define Composite components
- Set the Target for the various Composite components as per the problem description
Composite Component | Target |
---|---|
F1_1 | 10000 |
F2_1 | 13000 |
F3_1 | 15000 |
F4_1 | 17000 |
The composite is calculated as a weighted sum of the defined components
- Select the OK button to proceed.
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.
- To delete a Composite definition click on the cross button (denoted as X).
- Additional Composite 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 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 5.
- 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 simulaiton point for which the log file is desired.
- Click on the View log button.
- A new window open containg 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 Metamodel the item Surface.
- Slide to the last iteration.
- Select the Setup tab.
- Set the Objective 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 any of the Responses (in this case F1_1).
→ Good approximation: low distance between black line and green points. The RMS Err, Sqrt PRESS and R-sq presented at the top of the plot presents good accuracy.
-
With the same procedure the user may find the RMS Error, R² and SPRESS Residual of the other responses:
|
RMS Error |
R2 |
SPRESS Residual |
F1_1 |
9.2 (0.09%) |
1 |
22.6 (0.22%) |
F2_1 |
48.8 (0.38%) | 1 | 104 (0.817%) |
F3_1 |
7.36 (0.05%) | 1 | 16.7 (0.113%) |
F4_1 |
198 (1.14%) | 1 | 661 (3.79%) |
Optimization History
- Alternatively the accuracy of the response forces at various time intervals 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 Responses (in this case F1_1).
→ Good approximation of optima: The computed values (red points) almost coincide with the predicted values (black line).
- With the same procedure the user may view the convergence of the other responses which has been presented in an animation shown below :
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 reach the bounds of the constraint and 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 6.
- 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 ls_opt 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 6 (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 6
===========================================================
------------------------------------------------------------
95% Confidence intervals for individual optimal parameters
------------------------------------------------------------
Name Value Confidence
Interval
Lower Upper
------------------------------------------------------------
YMod 1139081.27 -7390438.1 9668600.66
Yield 993.367499 816.545662 1170.18934
------------------------------------------------------------
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).
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
ANOVA
- 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, since this is the only iteration that uses the whole design space.
- Select Linear ANOVA in the new window.
- From Response select F1_1.
- The user has the choice to Sort the plot by selecting the checkbox in the setup menu (default).
- To compare multiple plots for sensitivities of the input variables Yield and YMod on the various responses F2_1, F3_1 and F4_1, the user can select the split option at the task bar and repeat the previous steps.
→ It is clearly evident that the variable Yield is more sensitive compared to the variable YMod for all the responses.
→ Observe : The main objective of the problem description; viz. MSE is not available in the options list because ANOVA measure is not computed for composites.
GSA/Sobol
- We can slide to observe the sensitivity of results at each iteration. In this case for Iteration 1, since this is the only iteration that uses the whole design space.
- Select GSA/Sobol in the new window.
- From Composite select MSE.
- The user has the choice to Sort the plot by selecting the checkbox in the setup menu (default).
- To compare multiple plots for sensitivities of the input variables Yield and YMod on the various entries, the user can select the split option at the task bar and repeat the previous steps.
- The viewer allows the user to select multiple responses for sensitivity analysis to get the influence of the variables on e.g. the whole problem or a load case using the following steps:
- Create a new plot area similar to step 5. Then select the option Multi.
- Select the necessary responses or MSE. In this case selections made are the responses and MSE.
- The plot describes the cumulative plot on a single graph w.r.t. the variables. This is only availabe for GSA, not for ANOVA, since GSA values are normalized.
Comparision of ANOVA and GSA/Sobol
ANOVA is a linear sensitivity measure, whereas GSA is a nonlinear sensitivity measure. Both are evaluated on the metamodel. Since linear metamodels are used here, the variable ranking is the same for both sensitivity measures.