---
title: "Motion Measurement & Numerical Differentiation Interactive Lab | Sandbox Physics"
description: "Do more frames always give better acceleration? No."
canonical_url: "https://sandboxphysics.com/labs/motion-measurement/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/motion-measurement/"
last_modified: "2026-10-28"
---

M010 · Measurement

# Motion Measurement & Numerical Differentiation

**Do more frames always give better acceleration?** No. Differencing closely spaced frames magnifies the position noise, and acceleration needs a second difference, which magnifies it again. Widely spaced frames skip over changes in the motion. A local fit across many calibrated frames usually beats both.

Record the pixel positions of a moving object with a simulated camera. Estimate velocity and acceleration with finite differences or a local fit, then see how noise, aliasing, calibration bias and integration drift affect the result.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

The prescribed motion combines drift, constant acceleration and a sinusoidal oscillation. An ideal orthographic camera samples horizontal pixels at exact timestamps; pixel perturbations, rounding and missing targets affect the recovered derivatives.

Physics tutorial

## Motion Measurement & Numerical Differentiation

**Background** A camera records positions at separate moments. It never measures velocity or acceleration directly.

**Why it matters** Velocity and acceleration must be worked out from those samples, and the method you choose decides how much noise and how much detail survive.

Start with the essentials

- **Focus question**: Do more frames always give better acceleration?
- **One-sentence intuition**: You can recover only what the acquired samples and the calibration actually support.

### Core mathematical model

#### The synthetic trajectory

$$
\begin{aligned}x(t)&=x_b+bt+\tfrac12ct^2\\&\quad+A\sin(2\pi ft+\phi)\end{aligned}
$$

This law generates the pixels and a separate reference curve for comparison. The estimator never sees it.

#### Turning recorded pixels into positions

$$
\widehat x_i=\frac{u_i^{\mathrm{obs}}-\widehat u_0}{\widehat s}
$$

The scale is in pixels per metre. An error in the origin shifts every position by the same amount, so it cancels exactly in differences.

#### Noise in finite differences

$$
\begin{aligned}\widehat v_i&=\frac{\widehat x_{i+1}-\widehat x_{i-1}}{2h}\\\widehat a_i&=\frac{\widehat x_{i+1}-2\widehat x_i+\widehat x_{i-1}}{h^2}\end{aligned}
$$

With a smaller time step, the same position error can become a larger derivative error.

#### Local quadratic fit

$$
\begin{aligned}p(s)&=b_0+b_1s+b_2s^2\\e_j&=\widehat x_{i+j}-p(jh)\\\min_{\boldsymbol b}\;&\sum_{j=-r}^r e_j^2\\\widehat v_i&=b_1,\quad\widehat a_i=2b_2\end{aligned}
$$

The fit uses only complete windows centered on each sample. A wider window also suppresses real rapid motion.

#### A known bias builds up as drift

$$
\begin{aligned}\bar v_i&=\tfrac12(\widehat v_i+\widehat v_{i+1})\\\widehat x_{i+1}^{\mathrm{int}}&=\widehat x_i^{\mathrm{int}}+(\bar v_i+\beta_v)h\end{aligned}
$$

The bias is added on purpose and known in advance; it shows how drift grows linearly and is not inferred from the camera.

### Common difficulties

#### More frames are not always better

**Typical misconception** Enough frames make numerical acceleration exact.

**Better mental model** More frames mean a smaller time step, which can amplify pixel noise in the derivatives. A wider window suppresses the noise but also erases rapid motion. At a frame rate at or below twice the stated sinusoid frequency, aliasing is possible; a rate above that does not by itself guarantee an accurate derivative. The Lab gives no confidence interval.

### Run the experiment

1. 01

   #### Acquire first

   Acquire Noisy oscillation; open the raw table and export pixels.

   **What to observe:** The CSV holds no true derivatives.

2. 02

   #### Trade noise for detail

   Compare three-point differences with a wider quadratic fit.

   **What to observe:** The noise can shrink, but rapid motion is lost with it.

3. 03

   #### Find indistinguishable samples

   Try Aliased motion and Stroboscopic rest.

   **What to observe:** Sparse frames cannot uniquely determine the continuous motion.

4. 04

   #### Check calibration and gaps

   Change assumed scale, add integration bias, then try Leaves the sensor.

   **What to observe:** Changing analysis settings leaves the raw pixels untouched, and missing frames stay missing.

Physical conclusion

A smoother estimate is not necessarily a more accurate one.

## Related experiments and articles

Interactive Physics Textbook · Reading path

### Motion, Force and Energy

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **How does a camera measure motion?**](https://sandboxphysics.com/learn/mechanics/measuring-motion-with-a-camera/)

Motion & dynamics · Starter path

## From a falling ball to an orbit

Start by measuring gravity and splitting motion into components. Then add contact forces and collisions, and follow the same laws all the way to an orbit.

[Start here → **Free Fall & Measuring Gravity** Capture a few drops and fit the camera positions to estimate gravitational acceleration. Then add air damping and watch the fit drift from the truth. Observe · 14 min](https://sandboxphysics.com/labs/free-fall/)

1. [1 Free Fall & Measuring Gravity](https://sandboxphysics.com/labs/free-fall/)
2. [2 Projectile Flight Designer](https://sandboxphysics.com/labs/projectile-flight/)
3. [3 Inclined Plane & Friction](https://sandboxphysics.com/labs/inclined-plane/)
4. [4 One-Dimensional Collision Bench](https://sandboxphysics.com/labs/collision-bench/)
5. [5 Mass–Spring Oscillator](https://sandboxphysics.com/labs/mass-spring/)
6. [6 How Orbits Take Shape](https://sandboxphysics.com/labs/orbit/)

[View the full path →](https://sandboxphysics.com/topics/mechanics/#starter-path)
