This information pertains to data collected using any of our ultrasonic motion detectors, rotary motion sensors, the Motion Encoder System, and the Go Direct Sensor Cart.

Logger Pro, the LabQuest app, and Graphical Analysis 4 calculate derivatives numerically.

Depending on the number of points used for derivatives, the derivative and second derivative functions use an odd number of points to estimate the slope of a tangent line. Note that the software does not ever find slopes by successive differences of only two points.

You can set the number of points used for derivatives in Logger Pro, by changing it in the settings for that file, found under the File menu. See How do I adjust the number of points used in derivative calculations?. In the LabQuest app, you can set the number of points in the Settings for the LabQuest app (File > Settings). Graphical Analysis 4 app uses 7 points to find the derivative, and this setting cannot be changed.

The number of points used for finding derivatives has a major impact on the appearance of velocity graphs, which are created based on position and time data from a sensor. Using more points will smooth out irregular features, but will also smear out useful detail if taken too far. The first several points and last several points in a velocity graph will be inaccurate due to this calculation.

If the target is a person, it is helpful to use many (11 to 15) points for derivatives; in contrast, that many points for a ball toss experiment will result in misleading smeared out velocity and acceleration graphs.

The slope itself is calculated as a weighted average of slopes from points on either side of the target point. For example, suppose we have a portion of a data table of (t, x) pairs, and we want the derivative at row i:

t(i-2)     x(i-2)
t(i-1)     x(i-1)
t(i)          x(i)
t(i+1)     x(i+1)
t(i+2)     x(i+2)

for n=3, the derivative at row i is

1011-slope_equation_1.png

That is, the change in x divided by the change in time, using the rows on either side of row i.

for n=5, the additional i+2 and i-2 rows are used:

1011-slope_equation_2.png

That is, the derivative using five rows is the weighted average of the slopes found from the rows just before and after row i, two rows before and after, etc.
For n=5, the weights are 2 and 1. For n=7, the weights are 3, 2 and 1.

The second derivative is the same algorithm applied twice.

See also:
How does Logger Pro calculate velocity and acceleration from photogate data?