Sampling Calculation Audit

Sampling Calculation Audit

See how an 800 hertz vibration can become a false 200 hertz story

foundations
math-foundations
calculation-audit
electronics
beginner
Ada Ada · calculation audit
Start with the unresolved signal

How can an 800 Hz vibration appear to be a 200 Hz wobble?

A bearing really vibrates 800 times each second. The data logger records only 1000 samples each second, then the dashboard reports a clean 200 Hz pattern. Nothing in the bearing slowed down. The false frequency was created by the way the signal was sampled.

Ada will connect that physical failure to two small calculations: the Nyquist limit says which frequencies the clock can represent, and the alias calculation says where an unrepresentable tone can fold.

Companion to Sampling Rate and Aliasing. The voice, bearing, storage, and current examples all come from that chapter.

See the relationship before changing it

The figure reads from left to right. The blue card is highest trusted frequency. The middle card applies this page's rule. The green card is nyquist minimum. Walk the arrows once: set the input, apply the rule, then read the result with its unit.

The retained audit below checks several chapter fixtures. This model keeps those stated values fixed and changes only highest trusted frequency, so the numeric fixture does not switch without explanation.

Highest trusted frequency changes nyquist minimum An input card leads through the rule minimum sample rate = 2 x highest frequency to the nyquist minimum result. INPUT PAGE INPUT APPLY THE RULE predict calculate check units OUTPUT RESULT
Walk the arrows. Sampling at least twice the band edge is the mathematical floor, not an analog-filter guard band.

Derive the baseline in four named moves

  1. 1

    Name the input. The chapter baseline is 3400 Hz.

  2. 2

    Name the relationship. minimum sample rate = 2 x highest frequency

  3. 3

    Substitute with units. 2 x 3,400 = 6,800 samples/s

  4. 4

    Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.

Predict, then change highest trusted frequency

Try Predict the direction of minimum sample rate = 2 x highest frequency. Test another highest trusted frequency, then compare nyquist minimum.

3400 Hz
Chapter baseline
Nyquist minimum

Observe Sampling at least twice the band edge is the mathematical floor, not an analog-filter guard band. Reset highest trusted frequency to 3400 and compare nyquist minimum.

Explain Sampling at least twice the band edge is the mathematical floor, not an analog-filter guard band.

Check yourself

What should you do before trusting a moved-control result?
Answer: Predict its direction, apply the shown relationship, keep the units, and reset to the worked baseline.
What does this small model leave out?
Answer: Only highest trusted frequency moves here. Field effects named in the technical boundary stay fixed.
Try

Move the sample-rate slider through the 1600 samples/s boundary.

Observe

Below the boundary, the reported tone can fold away from the real 800 Hz input.

Explain

Samples are snapshots. Too few snapshots let more than one continuous wave fit the same dots.

One set of dots can tell two different stories

The blue curve is the real 800 Hz input. The teal dots are the only values retained by a 1000 samples/s logger. A slower 200 Hz curve can pass through those same dots, so the stored data alone cannot tell which continuous signal arrived.

Aliasing turns an 800 hertz input into a 200 hertz sampled pattern The upper panel shows a fast blue 800 hertz wave with widely spaced teal sampling dots. The lower panel shows a slower green 200 hertz curve passing through the same sample values. A 500 hertz Nyquist boundary explains why 800 hertz cannot be uniquely represented. Physical input: 800 Hz teal dots: only 1000 samples/s are kept Stored pattern can look like 200 Hz
Read the dots, not just the curves. At 1000 samples/s the Nyquist limit is 500 Hz. Because 800 Hz is above that boundary, the stored sequence can support a false lower-frequency explanation.

Derive a safe voice rate, one move at a time

  1. 1

    Name the highest useful frequency. The chapter’s voice band reaches fmax = 3400 Hz.

  2. 2

    Apply the Nyquist minimum. A sample rate must be at least twice that frequency: fsample,min = 2 × 3400 Hz = 6800 samples/s

  3. 3

    Compare the real clock with the minimum. Telephony uses 8000 samples/s, so the numerical guard band is 8000 − 6800 = 1200 samples/s.

  4. 4

    Express the guard band as a fraction. 1200 / 6800 = 0.176 = 17.6%The percentage has no unit because it is one rate divided by another rate.

That is a mathematical minimum plus numerical margin, not a complete filter design. A real anti-alias filter needs a transition band; equality at 6800 leaves it no room.

Work the false 200 Hz result by hand

Name the boundary: 1000 samples/s has a Nyquist frequency of 1000/2 = 500 Hz. The physical 800 Hz tone is above it.

Choose the nearest sample-rate copy: for this first fold, that is 1 × 1000 Hz.

Take the distance to that copy:

falias = |800 Hz − 1 × 1000 Hz| = |−200 Hz| = 200 Hz

The absolute-value bars mean “distance from zero”, so the reported frequency is positive 200 Hz. The logger did not add random noise; it preserved a consistent but wrong pattern.

Move the clock while the vibration stays at 800 Hz

Try Predict what will happen at 1000, 1600, and 2500 samples/s, then move the slider.

1000 samples/s
Sample rate
Nyquist boundary
Reported tone
800 Hz input

Ready: predict the alias, then calculate.

Observe At 1000 samples/s, the readout is 200 Hz. At 1600, 800 Hz sits exactly on the boundary. At 2500, the 800 Hz component is below the 1250 Hz boundary.

Explain Increasing sample rate moves the Nyquist boundary upward. The physical vibration never changes; only the clock’s ability to distinguish it changes.

Sampling rate also sets a storage and energy pace

Chapter case Named arithmetic Worked result
500 Hz bearing signal Double the highest trusted frequency. 2 × 500 Hz = 1000 samples/s minimum; 2500 samples/s gives 5 samples per cycle.
1 kHz continuous logging, 4 bytes/sample Samples per second × seconds per day × bytes. 1000 × 86,400 × 4 = 345,600,000 bytes/day, about 345.6 MB/day.
Chapter’s ESP32 ADC estimate Base current + current per sample/s. 2 mA + (0.001 mA × 1000) = 3 mA at 1 kHz.

Check yourself

What is the Nyquist frequency at 2500 samples/s?
Answer: 2500/2 = 1250 Hz. An 800 Hz component is below that numerical boundary.
Why can a faster sample clock not recover a signal that was already recorded badly?
Answer: The missing between-sample information was never stored. A later clock cannot determine which continuous wave created the old dots.
Does meeting the Nyquist inequality prove the measurement is accurate?
Answer: No. Filter transition, clock jitter, quantisation, noise, sensor bandwidth, and calibration still matter.
Technical boundaries. The widget models one ideal tone and its nearest sample-rate fold. It does not model anti-alias filter response, multiple tones, aperture jitter, clock drift, quantisation noise, sensor bandwidth, or non-band-limited transients.

What the audit buys you: you can now separate a physical frequency from the frequency a logger is capable of representing—and show exactly where a false 200 Hz result comes from.

Every number above is taken from the companion chapter and re-derived step by step.