- Examples
This is an old revision of the document!
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.
The objective function to be minimized by the algorithm is the following:
\[S=\sqrt{\displaystyle\sum_{i=1}^{n_{total}} (u_i^{FE}-u_i^{REF})^2}\]
Where:
One should be careful on the range on which the objective function is calculated. This range goes from $x_A$ to $x_F$ where:
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) \text{ if }|u_i^{REF}|>tolerance\]
\[res_i=\left({u_i^{FE}-u_i^{REF}}\right) \text{ 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. To compute these derivatives, Lagamine performs simulations with perturbed values of each parameter $P_j$ to be optimized (see figure 3).
The derivatives can then be estimated as:
\[\frac{\partial u_i^{EF}}{\partial P_j}=\frac{u_i^{EF}(P_j^+)-u_i^{EF}(P_j^-)}{P_j^+-P_j^-}\]
With:
\[ \begin{cases}
P_J^+=(1+PREC_{IA})P_J \\
P_J^-=(1-PREC_{IA})P_J
\end{cases}\]
$PREC_{IA}$ is an input value chosen by the user (see *.ia file); the recommended value is $PREC_{IA}=0.001$.