CHAPTER 50 / Sampling and command paths

Aliasing: when samples tell a different story

Samples taken too slowly also fit a different, slower wave, and the samples alone cannot tell which wave was really there.

THE SHORT ANSWER

Aliasing is the effect in which different continuous signals produce identical samples, so a fast oscillation sampled too slowly looks like a slower one. A sine of frequency f sampled at fs appears at f − round(f/fs)·fs, inside the band up to the Nyquist frequency fs/2. Samples alone cannot reveal the original frequency, so an anti-alias filter must limit the band before sampling.

fN=fs2,falias=f−round⁡ ⁣(ffs)fsf_N=\frac{f_s}{2},\qquad f_{\mathrm{alias}}=f-\operatorname{round}\!\left(\frac{f}{f_s}\right)f_s
WHAT YOU WILL LEARN

Calculate a simple alias and distinguish controller sampling from plot sampling.

Discrete poles described values on a clock. But the same sample values can come from different continuous signals.

Review the previous lesson: The z-transform and discretising a plant
START WITH AN EXAMPLE

First, picture it

A video can make a rotating wheel seem to turn backward. The camera sees only separate snapshots, so different motions can fit them. A sensor sampled too slowly has the same problem: a fast oscillation can look like a slower one.

THE IDEA

Build the idea step by step

Aliasing means different continuous signals share the same samples. If we know the signal contains only frequencies strictly below half the sample rate, ideal reconstruction is possible under the usual sampling assumptions. Without that prior band limit, samples alone cannot establish the original frequency. The lab deliberately shows the true sine and another sine that fits its samples. The second curve is a possible explanation of the samples, not proof of what really happened.

Read the equations

fs=1Ts,fN=fs2f_s=\frac1{T_s},\qquad f_N=\frac{f_s}{2}

The sample rate is the number of samples per second. Half that rate is the Nyquist frequency. Reconstructing a signal requires a band limit strictly below it and appropriate filtering, not just a fast-looking plot.

What the symbols mean

TsT_s
sample interval, seconds
fsf_s
sampling frequency, hertz (samples per second)
fNf_N
Nyquist frequency, hertz
nn
integer sample index

A sine at frequency f gives the same samples as one at f − m·fₛ for any integer m. For 7 Hz sampled at 10 Hz, m = 1 gives −3 Hz.

WORKED EXAMPLE

A 7 Hz wave sampled at 10 Hz

  1. Sample a 7 hertz sine wave ten times per second. The sample interval is 0.1 seconds and the Nyquist frequency is 5 hertz.

    xn=sin⁡(2π 7n/10)x_n=\sin(2\pi\,7n/10)
  2. At integer sample times, subtracting a full cycle per sample leaves the same values. This is a minus 3 hertz sine sequence.

    sin⁡(2π 7n/10)=sin⁡(2π(−3)n/10)\sin(2\pi\,7n/10)=\sin(2\pi(-3)n/10)
  3. A positive-frequency description is a 3 hertz sine with reversed sign. The samples alone cannot tell us which continuous wave was present. An input filter must remove unwanted high frequencies before sampling.

    xn=−sin⁡(2π 3n/10)x_n=-\sin(2\pi\,3n/10)
More detail and model assumptions
A CLOSER LOOK

Exactly two samples per cycle is a trap

Set f=5 Hz, fₛ=10 Hz and phase=0°. Every sample is zero even though the sine has amplitude one. Change phase to 90°: the samples alternate +1 and −1. At the boundary, phase changes what is visible; do not use equality as a practical design margin. Real anti-alias filters need a transition band below half the sampling rate.

TRY IT

Connect the example to the lab

Sample a 7 Hz sine at 10 Hz. Predict the apparent frequency, then increase the sampling rate.

Open this experiment
BE CAREFUL

An anti-alias filter acts before sampling to reduce unwanted high frequencies. Filtering already aliased samples generally cannot tell overlapping frequencies apart. Sampling rate, quantization, and measurement delay are different effects; this bench isolates sampling.

Check your understanding+

A 7 Hz sine sampled at 10 Hz looks like a 3 Hz oscillation. Do those samples prove the source was 3 Hz?

No. Several continuous waves fit those samples. Here the exact alternative is a −3 Hz sine, or a sign-reversed +3 Hz sine. A known input band limit is needed to resolve the ambiguity.
PRACTICE PROBLEMS

Solve these before opening the solutions

Work each problem on paper first. Open the answer to check yours, then the full solution if you need the steps, and mark how it went.

  1. A sensor is sampled at 50 Hz. Find the Nyquist frequency and the apparent frequency, in the principal band, of a 60 Hz sine and of a 35 Hz sine.

    Show answer

    AnswerfN = 25 Hz. 60 Hz appears at +10 Hz. 35 Hz appears at −15 Hz, that is, as a 15 Hz sine with reversed sign.

    fN=25 Hz,60→+10 Hz,35→−15 Hzf_N=25\ \mathrm{Hz},\qquad 60\to+10\ \mathrm{Hz},\qquad 35\to-15\ \mathrm{Hz}
    Show full solution

    Solution

    1. Nyquist frequency.

      fN=502=25 Hzf_N=\frac{50}{2}=25\ \mathrm{Hz}
    2. 60 Hz signal.

      falias=60−round⁡(60/50)⋅50=60−50=10 Hzf_{\mathrm{alias}}=60-\operatorname{round}(60/50)\cdot50=60-50=10\ \mathrm{Hz}
    3. 35 Hz signal.

      falias=35−round⁡(35/50)⋅50=−15 Hz,sin⁡(2π(−15)t)=−sin⁡(2π 15t)f_{\mathrm{alias}}=35-\operatorname{round}(35/50)\cdot50=-15\ \mathrm{Hz},\qquad \sin(2\pi(-15)t)=-\sin(2\pi\,15t)
    4. Both components lie above 25 Hz, so the samples alone cannot reveal their true frequencies. Only an anti-alias filter before the sampler can stop them.

  2. A 20 Hz sine of amplitude 1 is sampled at 40 Hz, starting at t = 0. Write the samples for phase 0° and for phase 30°. What do these samples show about sampling at exactly twice the signal frequency?

    Show answer

    AnswerPhase 0°: every sample is 0. Phase 30°: the samples alternate +0.5, −0.5, … Neither shows the true amplitude 1, and what is seen depends on the phase.

    φ=0: xk=0;φ=30∘: xk=(−1)k(0.5)\varphi=0:\ x_k=0;\qquad \varphi=30^\circ:\ x_k=(-1)^k(0.5)
    Show full solution

    Solution

    1. Sample times are t_k = k/40 s.

      xk=sin⁡(2π⋅20⋅k40+φ)=sin⁡(πk+φ)x_k=\sin\Big(2\pi\cdot20\cdot\frac{k}{40}+\varphi\Big)=\sin(\pi k+\varphi)
    2. Phase 0°.

      φ=0: sin⁡(πk)=0 for every k\varphi=0:\ \sin(\pi k)=0\ \text{for every}\ k
    3. Phase 30°.

      φ=30∘: sin⁡(πk+π6)=(−1)ksin⁡π6=(−1)k(0.5)\varphi=30^\circ:\ \sin\Big(\pi k+\frac{\pi}{6}\Big)=(-1)^k\sin\frac{\pi}{6}=(-1)^k(0.5)
    4. At f = fs/2 the samples land on the same two points of every cycle, so the phase decides what is seen. The sampling condition needs frequencies strictly below fs/2, and practical filters need a margin below that.

  3. Exam level. A motor housing vibrates at 47 Hz with amplitude 0.2 in sensor units. (a) The sensor is read at 60 Hz. At what frequency do the samples appear to oscillate? (b) What is the lowest sampling rate that puts 47 Hz below the Nyquist frequency? (c) A first-order anti-alias filter with a 5 Hz corner is placed before the 60 Hz sampler. What amplitude of the alias remains, and at what apparent frequency?

    Show answer

    Answer(a) 47 − 60 = −13 Hz: a 13 Hz oscillation with reversed sign. (b) Above 94 Hz. (c) The filter passes 1/√(1 + (47/5)²) ≈ 0.106 of the amplitude (−19.5 dB), so about 0.021 remains, still appearing at −13 Hz. The filter reduces the alias but cannot move it.

    falias=−13 Hz,fs>94 Hz,0.2×0.106≈0.021f_{\mathrm{alias}}=-13\ \mathrm{Hz},\qquad f_s>94\ \mathrm{Hz},\qquad 0.2\times0.106\approx0.021
    Show full solution

    Solution

    1. Principal-band alias.

      falias=47−round⁡(47/60)⋅60=−13 Hzf_{\mathrm{alias}}=47-\operatorname{round}(47/60)\cdot60=-13\ \mathrm{Hz}
    2. The samples of the 47 Hz sine and of the sign-reversed 13 Hz sine are identical at every k.

      sin⁡(2π⋅47k60)=sin⁡(2πk−2π⋅13k60)=−sin⁡(2π⋅13k60)\sin\Big(2\pi\cdot47\frac{k}{60}\Big)=\sin\Big(2\pi k-2\pi\cdot13\frac{k}{60}\Big)=-\sin\Big(2\pi\cdot13\frac{k}{60}\Big)
    3. Minimum sampling rate.

      fs>2(47)=94 Hzf_s>2(47)=94\ \mathrm{Hz}
    4. Filter gain at 47 Hz and the remaining amplitude.

      ∣F∣=11+(47/5)2≈0.106 (−19.5 dB),0.2×0.106≈0.021|F|=\frac{1}{\sqrt{1+(47/5)^2}}\approx0.106\ (-19.5\ \mathrm{dB}),\qquad 0.2\times0.106\approx0.021
    5. The filter must act before the sampler. After sampling, the 13 Hz alias overlaps any genuine 13 Hz motion and cannot be separated from it. A faster sampler with the same filter would both move the vibration below the Nyquist frequency and attenuate it.

Mark each exercise after you check your answer. Marks stay in this browser.

KEY TERMS

Terms this lecture teaches

All terms in the glossary →
QUESTIONS STUDENTS ASK

Frequently asked questions

How do I calculate the alias frequency?

Subtract the nearest whole multiple of the sampling rate: f − round(f/fs)·fs. A 7 Hz sine sampled at 10 Hz gives −3 Hz, which looks like a sign-reversed 3 Hz sine, and a 12 Hz sine sampled at 10 Hz gives 2 Hz. Sampling the 7 Hz sine at 20 Hz leaves it at 7 Hz.

Is sampling at exactly twice the signal frequency enough?

No. A 5 Hz sine with zero phase sampled at 10 Hz gives zero at every sample even though its amplitude is one, and with a 90° phase the samples alternate between +1 and −1. The band limit must lie strictly below half the sampling rate, with margin for a real filter's transition band.

Can aliasing be removed by filtering the samples afterward?

Generally no. Once two frequencies produce the same samples, no later processing can tell them apart. The anti-alias filter has to act on the continuous signal before the sampler.

Is the controller sampling period the same as the plot sampling rate?

No. The controller period sets when measurements are read and commands change, which affects the loop's behavior. A plot's sample rate only affects how a recorded trace is displayed, and a smooth-looking plot does not prove the controller saw the fast motion.

Why the next lesson follows

A measured trace is not automatically a trustworthy model. The final lesson uses separate experiments to check a fitted model.

YOUR PROGRESS

Finished the reading and the exercises? Mark the lecture as done to tick it on the syllabus. Progress stays in this browser.

EIGENROOM · https://eigenroom.com/theory/sampling · Updated 2026-11-15