Skip to main content
Sandbox Physics

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 modelMotion Measurement & Numerical Differentiation
Selected timeReady\text{Ready}
Reference positionReady\text{Ready}
Reference signed velocityReady\text{Ready}
Reference signed accelerationReady\text{Ready}
Sampling statusReady\text{Ready}
Acquired framesReady\text{Ready}
Tracked framesReady\text{Ready}
Valid derivative estimatesReady\text{Ready}
Raw position RMS errorReady\text{Ready}
Velocity RMS errorReady\text{Ready}
Acceleration RMS errorReady\text{Ready}
Last segment integration minus raw positionReady\text{Ready}
Assumed camera scaleReady\text{Ready}
Assumed origin columnReady\text{Ready}

Physics tutorial

Motion Measurement & Numerical Differentiation

BackgroundA camera records positions at separate moments. It never measures velocity or acceleration directly.

Why it mattersVelocity 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

x(t)=xb+bt+12ct2+Asin⁡(2πft+ϕ)\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

x^i=uiobs−u^0s^\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

v^i=x^i+1−x^i−12ha^i=x^i+1−2x^i+x^i−1h2\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

p(s)=b0+b1s+b2s2ej=x^i+j−p(jh)min⁡b  ∑j=−rrej2v^i=b1,a^i=2b2\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

vˉi=12(v^i+v^i+1)x^i+1int=x^iint+(vˉi+βv)h\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 misconceptionEnough frames make numerical acceleration exact.

Better mental modelMore 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.

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. ArticleHow does a camera measure motion?
FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy