User Tools

Site Tools


Sidebar

optim:start

This is an old revision of the document!


OPTIM: Parameter optimization tool for Lagamine

Objective

This optimization program allows the identification of the values of parameters likely to minimize a function representing the difference between two curves. The program will take a reference curve as an input (an experimental curve for instance) and will attempt to approach this curve with the finite element code Lagamine using different parameters obtained through the Levenberg-Marquardt algorithm.
The optimization process is iterative and stops once a stop criterion is met, such as the stabilization of the objective function for instance.
The code gives the possibility to optimize a set of parameters using several curves for one simulation, or several simulations at a time. All the curves are then concatenated in one global curve for the computation of the objective function.

Description

The objective function to be minimized by the algorith is the following:
$S=\sqrt{\displaystyle\sum_{i=1}^{n_{total}} (u_i^{FE}-u_i^{REF})^2}$
Where:

  • $i$ represents one of the $n_{total}$ points of the global reference curve. If the global curve is constituted of several curves, $n_{total}$ is the sum of the $n$ points of each curve (each curve can have a different number of points). In Optim, the number of points $n$ to be used for each curve is defined by the user (NPOI) in the *.info file. Giving a larger NPOI to a curve gives it more weight in the objective function.
  • $u_i^{FE}$ and $u_i^{REF}$ represent respectively the values of the Finite Element (FE) curve and of the REFerence curve at points $i$ (see figure 2). For a given curve, Optim computes the value $u_i$ by interpolation at points $i$ (represented by the $x_i$ in figure 2). These points correspond to the division of the abscissa range of the curves in NPOI points.

Fig. 2

One should be careful on the range on which the objective function is calculated. This range goes from $x_A$ to $x_F$ where:

  • $x_A=max(x_{init}^{EF},x_{init}^{REF})$
  • $x_A=min(x_{end}^{EF},x_{end}^{REF})$

The objective function is the square root of the sum of the squares of the residuals. The function must however be modified in the case where several curves of different orders of magnitude are used. The residual is then rewritten as:
$res_i=\left(\frac{u_i^{FE}-u_i^{REF}}{u_i^{REF}}\right)$ if $|u_i^{REF}|>tolerance$
$res_i=\left({u_i^{FE}-u_i^{REF}}\right)$ if $|u_i^{REF}|<tolerance$

In order to minimize the objective function, the program needs the derivatives of this function with respect to the parameters $P_j$:
$\frac{\partial S}{\partial P_j}=\frac{\partial S}{\partial u^{EF}}\frac{\partial u^{EF}}{\partial P_j}=\frac{1}{S(P)}{\displaystyle\sum_{i=1}^{n_{total}} res_i \frac{\partial u_i^{EF}}{\partial P_j}}$
Therefore, the only unknowns are the $\frac{\partial u_i^{EF}}{\partial P_j}$ that must be computed by finite difference in the Lagamine code.

optim/start.1560785973.txt.gz · Last modified: 2020/08/25 15:36 (external edit)