Skip to main content
Sandbox Physics

M010 · Measurement

Motion Measurement & Numerical Differentiation

Record simulated camera pixels, recover derivatives using finite differences or a local fit, then inspect noise, aliasing, calibration bias and integration drift.

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

BackgroundCamera pixels are sampled positions, not direct derivatives.

Why it mattersRecord simulated camera pixels, recover derivatives using finite differences or a local fit, then inspect noise, aliasing, calibration bias and integration drift.

Start with the essentials

Focus question
Do more frames always give better acceleration?
One-sentence intuition
Recover only what the acquired samples and calibration support.

Core mathematical model

Declared 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 pixels and an independent comparison reference; it is withheld from the estimator.

Calibrate only the recorded pixel

x^i=uiobs−u^0s^\widehat x_i=\frac{u_i^{\mathrm{obs}}-\widehat u_0}{\widehat s}

Scale is pixels per metre; an origin error offsets position but cancels in exact differences.

Noise enters derivatives

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}

A smaller time step can amplify the same position error.

Local quadratic reconstruction

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}

Only a complete centered window is used; a wider window also suppresses real rapid motion.

An explicit bias accumulates

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 known added bias illustrates linear drift; it is not inferred camera behavior.

Common difficulties

Model and evidence

Typical misconceptionEnough frames make numerical acceleration exact.

Better mental modelMore frames reduce the time step and can amplify pixel noise in derivatives. A wider window suppresses noise but also erases rapid motion. At or below twice the declared sinusoid frequency, aliasing is possible; being above that threshold alone does not guarantee an accurate derivative. No confidence interval is claimed.

Run the experiment

  1. 01

    Acquire first

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

    What to observe: No true derivative is present in the CSV.
  2. 02

    Trade noise for detail

    Compare three-point differences with a wider quadratic fit.

    What to observe: Noise can shrink while rapid motion is lost.
  3. 03

    Find indistinguishable samples

    Try Aliased motion and Stroboscopic rest.

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

    Audit calibration and gaps

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

    What to observe: Analysis settings preserve raw pixels; missing frames stay missing.