Library / Control engineering / CTL-24
Control engineering
Aliased frequency after sampling
Apparent frequency of a sinusoid after sampling, which differs from its true frequency when that is above half the sample rate.
- Ref
- CTL-24
- Rev
- v1
- Field
- Control engineering
- Result
- falias [Hz]
Sampling at fs cannot tell a frequency f from f − k·fs for any whole number k. A signal above the Nyquist limit fs/2 is therefore folded back to an apparent frequency between 0 and fs/2, given by |f − fs·round(f/fs)|. The folded component is indistinguishable from a real low-frequency signal once the signal is sampled.
Apparent frequency of a sinusoid after sampling, which differs from its true frequency when that is above half the sample rate. Anything above fs/2 folds back to a lower frequency and cannot be told apart from a genuine signal there.
Calculator
- Nyquist frequency, fs/250 Hz
- Minimum sample rate for this signal, 2f260 Hz
- Signal frequency as a multiple of the Nyquist limit2.6
What drives the result
Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.
- A 130 Hz signal sampled at 100 Hz appears at 30 Hz and cannot be told apart from a genuine 30 Hz signal. The Nyquist limit is 50 Hz, and the signal is 2.6 times above it.
- Exactly twice the signal frequency is only the theoretical minimum sample rate. In a control loop the sample rate also depends on the bandwidth, the computation delay and the phase margin, so it is usually many times the bandwidth, with an analogue anti-alias filter before the converter.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing (Hz) | Local step | Change in result |
|---|---|---|---|---|---|---|
| fs Sample rate | 50 to 400 Hz | 1.667 | 130 | 128.3 | +10% | −33.3 % |
| f True signal frequency | 10 to 400 Hz | 0 | 49 | 49 | +10% | +43.3 % |
Sweep of True signal frequency
| True signal frequency (Hz) | Apparent frequency (Hz) |
|---|---|
| 10 | 10 |
| 58.75 | 41.25 |
| 107.5 | 7.5 |
| 156.3 | 43.75 |
| 205 | 5 |
| 253.8 | 46.25 |
| 302.5 | 2.5 |
| 351.3 | 48.75 |
| 400 | 0 |
Sweep one variable
Variables and how each one contributes
Apparent frequency
What the equation gives you. Everything else feeds it.
True signal frequency
The true frequency of the signal in Hz. The apparent frequency rises with f until f reaches half the sample rate (50 Hz at the defaults), then falls as f passes it and folds back. At the default the true frequency 130 Hz appears at 30 Hz.
Sample rate
The sample rate in Hz (samples per second). A higher sample rate moves the Nyquist limit up and can bring the signal back below it, in which case it is shown at its true frequency. Raising it by 10 % (to 110) moves the result by −33.3 %, from 30 to 20 Hz.
Worked example with the values above
- Number of sample rates: f/fs = 130 / 100 = 1.3, which rounds to 1.
- Folded difference: f − fs × 1 = 130 − 100 = 30.
- falias = 30 Hz.
Assumptions and limits
- Ideal uniform sampling at a constant rate, of a signal made of one sinusoid.
- A signal that is not strictly band-limited needs an analogue anti-alias filter, since the condition fs > 2fmax cannot otherwise be met.
Common mistakes
- Assuming a digital filter can remove aliasing afterwards. Once folded, the signal cannot be separated from a real one.
- Taking the sample rate equal to twice the highest frequency as enough. Practical loops need a wider margin.
Statistics and uncertainty
Any noise above fs/2 folds into the measured band, so a broadband sensor noise with a fixed density has its power over all the aliased bands added into the band that is kept. This is why an analogue low-pass filter ahead of the converter is needed: once noise is folded, it cannot be removed by a digital filter.
Where it is used
- Choosing a sample rate and anti-aliasing filter for sensors and digital controllers.
- Explaining unexpected low-frequency oscillations in sampled data.
Maths you need
- Sampling: taking values at intervals of 1/fs
- Frequency and period: f = 1 / T