DM2003 provides several curve fitting tools available in Process|Fitting submenu, including Linear, Manual and NLSF fitters, where NLSF stands for non-linear least-square fitting. DM2003 implements one of the most popular and effective NLSF algorithms, namely Levenberg-Marquardt algorithm, that can be thought of as a trust-region modification of the well-known Gauss-Newton algorithm.
First you should plot data to be fitted because this tool works only with active plot series; then select appropriate menu item to load NLSF Fitter HTML application into the Browser window. When source data will be plotted in a new temporary data window, you are ready to start interactive fitting procedure. It includes following steps:
Type desirable fitting expression or select previous input from the drop-down list. This expression must be composed from internal functions (see expression syntax for more details), operators and following parameters: cx (independent variable), p1, p2...p26. Then click "Update" button to display parameters table (number of parameters determined by the expression).
In the parameters table, enter initial values of the fitting parameters. You may verify parameter values before start fitting session: click "Update" button to update fit curve and see how fit curve conforms source data. Please keep in mind that the result of your fitting session critically depends on the initial values of parameters because usually your expression will have a lot of local minima that can prevent fitter to find absolute minimum. Probably you will have to select parameter values manually before start fitting. When ready, click "Fit" button and wait while fitter finishes calculation (it may take a lot of time for slow computers and long expressions). Fitting progress is displayed in the status line.
You may also fix one or more fitting parameters (by checking appropriate flags), so that their values will not be fitted and remain constant. Parameter deviations are displayed near parameter values. In addition, you may use plot selector tool to restrict fitting data range. Repeat this step until you get satisfactory results. If problems persist, try to change fitting options (step 4) or try another fitting model (step 1).
One good practice is so-called "partial fitting": you fix some parameters and find others in the region where fixed parameters are not important (using point selector tool); then release fixed parameters and fix those you just have found, change fitting area and repeat the procedure.
When you click OK button, you may save fitting results in several ways. Available options are: copy best fit curve to the new plot series in the source window, add fitting results to the Notes window or add parameter set to the selected worksheet.
Additionally, there's a set of options that allows you to have full control over the fitting process:
Convergence thresholds determine whether fitting iterations should be stopped if parameters or Chi-square changes between iterations are less then threshold values
Maximal number of iterations determines how many Levenberg-Marquardt iterations will be performed when user clicks "Fit" button
Derivative delta is very important parameter. When you define expression to be fitted as a simple string, NLSF fitter calculates derivatives numerically, by parsing expression string to compute function values and using this parameter as dX. In some cases incorrect values of dX may cause arithmetic overflow or underflow, or another errors. Try to change this parameter if fitter stops work with error messages.
Fitted curve may have weight. When X and Y columns are copied from series properties, column containing weight data should be selected from this list. Notice that actual data copying will be performed when user clicks "Fit" button
NLSF fitter is available via OLE Automation (see IDMApplication2 interface for more details). This feature allows you to create powerful automatic routines for initial parameter evaluation and batch fitting.