Math Bridge: Gesture Sampling and int8 Weights

← Back to Edge AI & ML Lab
Math BridgeEdge & FogStruggle-friendly runway

How can one lab pass sampling and still fail compression?

Keep the accelerometer clock and the int8 weight ruler in separate evidence columns.

Edge Eddie, the guideEdge Eddie guides
The one targetVerify input timing and weight rounding independently.
The chapter case100 Hz, 800 ms wrist wave, max |w| 0.85, weight −0.20.
What it buys youA lab record that says which quantisation passed.

Try this in the TinyML gesture acceptance gate lab, where you change the noise control and see how many gesture windows pass the acceptance threshold.

1. Two errors share one nickname

Temporal aliasing happens when a changing gesture is sampled too slowly. Weight rounding happens when a fixed trained number is parked on the nearest int8 code. One depends on hertz; the other depends on the selected weight range and code count.

Edge Eddie: Same word, different axis, different release test.

2. Name the moves

1

Halve the sample rate100 Hz gives a 50 Hz Nyquist limit.

2

Invert the gesture period800 ms is 0.8 s, so the fundamental is 1/0.8 = 1.25 Hz.

3

Set the int8 scaleq = max|w| / 127.

4

Round the codecode = round(w/q).

5

Reconstruct and compareŵ = code q; error = |ŵ − w|.

3. Work the lab's fixed case

q = 0.85/127 = 0.0066929; round(−0.20/q) = −30

The reconstructed weight is −0.200787, so the error is 0.000787, inside q/2 = 0.00335. Separately, 50/1.25 = 40 gives the wrist-wave fundamental forty-fold room below Nyquist.

4. Read the forty-fold margin honestly

The 1.25 Hz fundamental is far below 50 Hz, but a sharp gesture contains higher harmonics. The margin is a useful first check, not proof that the full motion waveform and sensor front end are alias-free.

5. Keep two acceptance rows

For sampling, record rate, filter, window, mounting, and spectrum. For compression, record calibration range, scale policy, saturation, per-class metrics, confidence thresholds, artifact hash, and target-runtime result.

6. Check yourself

Does the 100 Hz rate determine the int8 weight scale?
Answer: No. Sample rate governs time; max |w| and 127 positive codes govern this scale.
Why must the −0.20 error stay below q/2?
Answer: Nearest-code rounding can move a value by at most half one uniform step unless it clips.
Does one passing round trip approve the model?
Answer: No. Representative accuracy, saturation, thresholds, latency, and target execution still decide.
Honesty boundary.

The equations reproduce the lab's teaching values, not a universal TinyML quantiser.

100 Hz
Lab sensor cadence
0.85
Sketch maximum absolute weight
0.000787
One example's reconstruction error

Go deeper in the lab and validate both the physical input and the complete optimized artifact.