All settings for the optimizer are defined in the input deck file. The syntax of this input deck file is defined by the Input Deck Programming Language which is also used in mmnt or makedevice. A further description of the language features can be found in Appendix A.
Figure F.2: Possible Input Deck Programming Language settings of the lmmin program.
dataset { arraysize = <integer> ; | filename = "<string>" ; } parameters { <string> { nom = <float> ; [ min = <float> ; max = <float> ; ] } [ <string> { nom = <float> ; [ min = <float> ; max = <float> ; ] } ] } [ target { [ trans = "<string>" ; ] } ] optimizer { [ debugfile = "<string>" ; ] [ statfile = "<string>" ; ] [ gradient = <float> ; ] [ tolerance = <float> ; ] [ iotype = "<string>" ; ] [ weight = "<string>" ; ] }
In the parameter section the independent parameter of the optimizer are listed. For each parameter a minimum value (min) maximum value (max) and an initial start value (nom) must be set. The minimum and maximum values of the parameters define the feasible region of the optimization task.
In the dataset section the information concerning the fit data is listed. The optimizer can be used in two modes. In the first mode the optimizer reads an ASCII file filename where the fit data is listed in several columns. In the variables subsection the names of the columns in the datafile are are given. The order of the names in the subsection is the same as the order of the columns in the data file.
In the second mode the subtraction of the simulated data and fit data is not performed in the optimizer and only the residuum vector is returned from a request. In this case the parameter arraysize must be set to the dimension of the residual vector.
In the target section the way the residuum is calculated can be set. There are three ways for the residuum to be calculated (see Table F.1).
Parameter | Description | |
"lin" default | linear residuum | The residuum is the difference of the calculated value and the value from the data-points. |
"log" | logarithmic residuum | The residuum is the difference of the logarithms of the calculated value and the value of the data-points. |
"rel" | relative residuum | The residuum is mapped in a range from -100 to 100 by (F.1). |
An absolute or linear residuum is useful if all the data-points are in the same range. For many applications e.g., fitting MOSFET transfer characteristics the data-points are in a range of several magnitudes. In this case the bigger values implicitly have a higher weight than the smaller data points.
On the other hand when using a logarithmic residuum calculation the small values dominate the least squares. Therefore some kind of relative strategy seems to be useful.
The normal calculation of the relative residuum always gives a
positive number for the result. For the optimizer this asymmetric
scale introduces an undesirable nonlinearity. For this reason a
modified relative residuum algorithm is implemented.
This algorithm
In the optimizer section several parameter of the optimizer behavior can be set (see Table F.2).
Parameter | Description |
tolerance | The optimizer terminates when both the actual and predicted relative reductions in the sum of squares are lower than tolerance. Therefore, tolerance measures the relative error desired in the sum of squares. |
gradient | A variable used in determining a suitable step length for the forward-difference approximation. This approximation assumes that the relative errors in the functions are of the order of gradient. If gradient is less than the machine precision, it is assumed that the relative errors in the functions are of the order of the machine precision. |
debugfile | A debug file where various internal data of the optimizer are printed. If the special files stdout or stderr are set the debug output is written at the output or error stream. If the variable is not set no debug information is produced. |
statfile | A statistics file where various information of the fit error is printed. For the values stdout or stderr the data is written to the output or error stream. No debug information is written if the variable omitted in the input deck. |
iotype | With this variable a selection between a LISP syntax (default) and a plain ASCII syntax ( ascii) can be made. |
weight | If a column for weights is given in the data file the usage of these values for the residuum calculation can be disabled ( no). |
chkptfile | With this variable a file name is assigned where an image of the running program is dumped to if this is supported on this operating system (see Section 4.5.2). Omitting this variable disables this functionality. |
When the optimizer finishes the execution the optimal parameters and a termination information are returned. This termination information indicates whether the optimizer was successful or not (see Table F.3) [34].
Parameter | Description |
0 | Improper input parameters. The size of the parameter vector is greater the size of residual vector or the leading dimension of the Jacobian matrix is lower than the size of the residual vector. |
1 | Both actual and predicted relative reductions in the sum of squares are at most tolerance. |
2 | Relative error between two consecutive iterates is to small. |
3 | Conditions for info = 1 and info = 2 both hold. |
4 | The angle between error vector and any column of the Jacobian is to small. |
5 | Too many evaluations of the target function. |
6 | tolerance is too small. No further reduction in the sum of squares is possible. |
7 | No further improvement in the approximate solution x is possible. |
8 | The error vector is orthogonal to the columns of the Jacobian. |