Manual Curve Fitting and Modeling

The Model dialog allows you to adjust the chosen equation so that it comes as close as possible to your data. Each equation has a general form with a set of coefficients that you can adjust.

To apply a manual curve fit or model to your data, follow these steps:

  1. On the graph, select the data on which you want to fit a curve. If you don't select an area, the curve will be fitted to the entire range of data displayed in the graph.
  2. Choose Model from the Analyze menu. Note: You can also apply a manual curve fit or model in the Curve Fit dialog. Click the Curve Fit button in the toolbar and select Manual.
  3. Select an equation for the curve. Common functions, such as linear, exponential, inverse, and polynomial are included in the list. The active graph will now display the curve. If you select a polynomial equation you will be able to adjust the degree. If you select the variable power and Nth inverse, you will be able to adjust the power. Note: If you do an experiment that requires an equation not found on the curve fit list, you can enter the equation by clicking Define Function.... If you save the file, the custom equation will appear in the list when you open the file again.
  4. Adjust the the coefficients and/or exponents. You can try new fits by changing either the equation or the range of data selected on the graph. The Root Mean Square Error* is adjusted and displayed on the dialog. When the fit seems appropriate, click OK. The function and the Curve Fit box, which includes the curve fit information will be displayed. To edit the properties of the Curve Fit box, double-click the box.
  5. You can adjust the parameters of a Manual fit after it has been drawn on the graph. Click a parameter name in the Curve Fit box to select it. An arrow next to the parameter name will appear. Use the up and down cursor keys to increase or decrease the value. Use the left and right cursor keys to increase or decrease the step size by which the value is changed the value. You can also click the value and type in a new value. Double-clicking the box will open a dialog where you are able to change all of the parameter values at once. For linear fits, select Enable Line Drag to make a Movable Linear Fit.
  6. If you want to exclude points from the fit, select the point or points you want to exclude in the data table, and choose Strike Through Data Cells from the Edit menu. Then return to the Curve Fit dialog to perform a new fit. The selected data points will not be graphed nor used in the curve fit.

* The Root Mean Square Error is a measure of how far away, on average, the data points are from the fitted curve. RMSE is in the units of the y-axis.

A tutorial covering curve fitting in general is available. To access it, choose Open from the File menu. Open the Experiments folder, then the Tutorials folder.

The Model Dialog

Create Calculated Column

Check Create Calculated Column to create a column in the data table that contains the y-values of the fitted function at each value for the x-axis. When you check Create Calculated Column, other options will be displayed. Check Plot Column to have the new column plotted on the graph. Check Show Curve Fit to have the Curve Fit box displayed on the graph.

Once a calculated column has been plotted on the graph, you can adjust the variables by adding a Parameter Control from the Insert menu.


General Equation

Select an equation to fit to the data, then click Try Fit if you are doing an automatic fit.

Time Offset

When Time Offset is checked, the "t" variable in the equation will change to "(t–t0)". An offset, t0, equal to the time of the left edge of the currently selected region, will be used. You can adjust the selection in the active graph in the Curve Fit dialog.

This option may be useful if you want to apply a curve fit to a section of data that does not coincide with the time that data collection started. For example, suppose you start data collection and then toss a ball above a Motion Detector at t=3.2 seconds. When data collection is complete, you can select the position data starting at t=3.2 seconds. If you check Time Offset and then perform a Quadratic fit, the linear coefficient can be correctly interpreted as the velocity at t=3.2 seconds and the additive term can correctly be interpreted as the position at t=3.2 seconds. If Time Offset is not checked, the linear coefficient and additive constant cannot be interpreted in that way.

Define Function...

You can define and add customized mathematical functions to the general equation list. Click Define Function and type in the function in the box. Up to six parameters can be used in the equation. Note: If you save the file with a function you have defined, the custom equation will appear in the list when you open the file again.

Delete Function

Delete added functions by selecting the function and clicking Delete Function. Built-in functions cannot be deleted.

Power

If an equation with a variable or power, such as A*x^n (Variable Power), is selected, the Power box will be displayed and available for editing.


Coefficients

The coefficients can be adjusted individually to improve the fit of the function to the data. Either type in a new value, or use the + and buttons to step the value of the parameter up and down.

Depending on the coefficients initially chosen, a function may not fall within the graph window. In this case it may be difficult to adjust the coefficients to achieve a good fit. You may want to calculate the necessary values to force the function to pass through one data point (often the y-intercept) and begin with these values.

Click the Delta button to set a value by which to increase or decrease the coefficient value when clicking the + and buttons to the right of the coefficients.


See Also: