Signals to learning / 3. From time to samples

Lesson 10 of 40 · Beginner · About 25 minutes

Aliasing and Nyquist

Can different waves produce exactly the same samples?

You will be able to

  • Calculate a folded frequency for a real sinusoid.
  • State the band-limit and filtering assumptions behind reconstruction.

Samples can hide cycles

A sampled complex exponential repeats when you add an integer multiple of fₛ to its frequency. Real sinusoids also have positive/negative-frequency symmetry. The apparent magnitude of a frequency folds into 0 to fₛ/2; the sign and phase must still be considered to match a sine waveform exactly.

A condition, not magic

For an ideal real baseband signal band-limited below B, a rate strictly greater than 2B permits ideal reconstruction under the sampling theorem. Real sensors require an anti-alias filter and a transition band. At exact Nyquist, a sine with zero phase can produce all zero samples; equality is not a safe universal rule.

Nyquist frequency = fₛ/2; reconstruction model: fₛ > 2B

Worked example

A 7 Hz sine sampled at 10 Hz is indistinguishable from a −3 Hz sine at those timestamps, so its apparent frequency magnitude is 3 Hz. A phase-adjusted +3 Hz sine also matches.

A common trap

An aliased component cannot generally be removed after sampling without also removing legitimate signal at the same apparent frequency.

Predict, then experiment

Will a 7 Hz source sampled at 10 Hz appear above or below 5 Hz? Before touching the controls, say or write your prediction.

Interactive experiment

Frequency folding

When does a sampled sinusoid become indistinguishable from a slower one?

Blue is the source, dashed amber is the apparent sinusoid, and circles are samples shared by both. The display covers two seconds.

Your experiment

Use 7 Hz and 10 samples/s, then source 13 Hz. Inspect how source and apparent curves agree at sample markers. Try source 5 Hz and sample rate 10 Hz to expose the phase-sensitive boundary.

Change one parameter at a time. Compare what you observed with your prediction and record an explanation in your notes.

Check your understanding

Try from memory first. Hints and feedback are part of learning, not a penalty. These checks are for self-study, not a graded qualification.

1. Where should an anti-alias filter act during acquisition?
Give me a hint

When is the ambiguity introduced?

2. What apparent frequency magnitude does a 17 Hz tone have at 20 samples/s?

Accepted absolute tolerance: ±0.001 Hz.

Give me a hint

Subtract the sample rate to reach the baseband interval.

Reference answers (after your attempt)
  1. Before sampling — Correct: prevent out-of-band components from folding.
  2. 3Hz — 17 Hz folds to −3 Hz, with magnitude 3 Hz.

Apply it: Budget a transition band

Use paper, your notes, or a local notebook/editor. Code examples are Python 3 starting points to run yourself; this page does not execute code or automatically assess the practical task.

  1. Preserve a signal up to 8 kHz at 24 ksample/s.
  2. Find Nyquist and the available filter transition interval.
  3. Explain why the analogue filter cannot be an infinitely sharp wall.
Reference solution & review criteria

Nyquist is 12 kHz; 8–12 kHz is a 4 kHz transition budget. A real finite-order filter trades attenuation, transition width and phase/delay; unwanted energy must be sufficiently attenuated before sampling.

Your notebook

Notes and progress stay in this browser. They are not sent to the server; ordinary web-server request logs still operate. Export a backup from the course page.

Review list

Completion requires both correct checks and your practical-task acknowledgement.

Go deeper

Sources support further study; the worked examples and questions here are original. Browser experiments are small, disclosed models—not evidence of production-model quality or hardware performance.