<<

Sampling Let’s sample the signal Signal Sampling at a time interval of Δt

Analog Signal

Dr. Christopher M. Godfrey University of North Carolina at Asheville Δt Photo: C. Godfrey

ATMS 320 – Fall 2011 ATMS 320 – Fall 2011

Sampling Let’s sample the signal Sampling Reconstruct the curve at a time interval of Δt from the sampled points

Analog Signal Analog Signal Samples at Δt Samples at Δt

Δt Δt

ATMS 320 – Fall 2011 ATMS 320 – Fall 2011

Sampling High-frequency Sampling components in the curve are sampled poorly „ Given that there can be sampling problems, what Δt sampling interval should be selected in order to fully define the given input signal?

Low-frequency „ We’ll look at a version of the components in the curve are sampled well sampling theorem to answer

Analog Signal this… Samples at Δt ‰ …but first, let’s review some properties of sines and cosines Δt

ATMS 320 – Fall 2011 ATMS 320 – Fall 2011

1 Fourier Analysis Fourier Analysis

„ Fourier analysis shows that any analog signal can be represented perfectly by an infinite sum of sines and cosines

ATMS 320 – Fall 2011 D1

Great attributes of sine functions Sampling Theorem

„ It’s possible to define a sine wave, with unity amplitude, using only two points (more is better)! „ Let’s sample a signal periodically every Δts

„ For a given signal with multiple frequency ‰ Δts is the sampling time interval components, we must find the largest sampling time ‰ fs= 1/ Δts is the sampling frequency interval (Δt ), or lowest sampling frequency (f ) that s s „ Then each of the p samples strung together will allow recovery of the signal without error uniquely define the sampled signal, where ‰ Note that f = 1/(Δt) ‰ Think of f as the # complete cycles per unit time p(t)=p(n Δts) and n is an integer

„ If we know fmax (i.e., the highest frequency of the wave), we can appropriately sample the signal for error-free recovery!

‰ We can figure out fmax using Fourier analysis Δts

ATMS 320 – Fall 2011 D2 ATMS 320 – Fall 2011

Sampling Theorem The For a limited bandwidth signal (bandwidth refers to the range of frequencies contained within a signal) with „ The Nyquist frequency is half the sampling maximum frequency fmax, the sampling frequency fs must be greater than twice the maximum frequency frequency: fmax in order to uniquely reconstruct the signal without : fN = fs/2=1/(2Δts)

fs > 2fmax If the sampled signal contains fmax > fN, aliasing (frequency folding) will occur. The sampled wave will The frequency 2fmax is called the . Used in this context, the Nyquist rate is the lower bound for the appear to have a frequency that is folded to a lower sampling rate necessary for alias-free sampling. The frequency. To completely reconstruct a wave without Nyquist rate is a property of the signal. error, fN must be greater than fmax.

ATMS 320 – Fall 2011 ATMS 320 – Fall 2011

2 The Nyquist Frequency Sampling Example „ Assume that there is some signal with many „ The Nyquist rate is a property of a continuous signal frequency components associated with it ‰ If you want to sample a signal without aliasing, „ We know that the maximum frequency you must sample it with a sampling frequency component of the signal is 5 kHz that is greater than or equal to the Nyquist rate for that signal. „ To comppyletely reconstruct the si gnal, we would need to sample the signal at what „ The Nyquist frequency is a property of a discrete sampling system frequency and time interval?

‰ Any given sampling interval Δts chosen for a Answer: We would need to sample the wave particular sampling system (e.g., radar) at the Nyquist rate, or fs = 2fmax = 10 kHz. corresponds with a particular Nyquist frequency, This corresponds with a Δt of 0.0001 s. The regardless of the properties of the sampled s signal. Nyquist frequency in this case is fs/2 = 5 kHz, so no aliasing will occur. ATMS 320 – Fall 2011 ATMS 320 – Fall 2011

Sampling Aliasing from inadequate sampling

„ Another question: What happens if we sample at a frequency that is less than the Nyquist rate?

‰ Recovery of the original signal is impossible /

‰ Funny things happen with the reconstructed signal…

If we sample close to the actual frequency of the input signal, the output will appear folded back to a lower frequency.

ATMS 320 – Fall 2011 ATMS 320 – Fall 2011

Aliasing from inadequate sampling Aliasing Example

Let’s sample a simple sine wave

If we sample with fs < 2fmax, those original frequencies that are above fN will appear as false low-frequency components of the sampled signal.

ATMS 320 – Fall 2011 ATMS 320 – Fall 2011

3 Aliasing Example Aliasing Example

If we sample it 1.5 times per cycle (fs = 1.5fmax), the re- If we sample it once per cycle (fs = fmax), constructed wave looks like a lower-frequency sine wave

we might think it is constant! Why? Because fN = ½ fs = ¾ fmax < fmax The original wave has a higher frequency than our Nyquist frequency.

ATMS 320 – Fall 2011 ATMS 320 – Fall 2011

Aliasing Example Aliasing Example

Sampled at twice the frequency of the input wave (i.e., fs = 2fmax), the reconstruction results in an even better approximates the original sine wave (if we approximation to the original input signal sample in the right spot).

Why? Because fN = ½ fs = fmax ATMS 320 – Fall 2011 ATMS 320 – Fall 2011

Aliasing from inadequate sampling Aliasing from inadequate sampling Frequency folding „ In general, the aliased output frequency is

± faliased = finput − 2mfN

where:

faliased is the aliased output frequency

finput is the input frequency of the original wave m is an integer

fN is the Nyquist frequency The x-axis shows the input frequency (i.e., the frequency of the original signal) in terms of the Nyquist frequency (which is ± f = f − 2mf determined by the sampling interval). aliased input N

ATMS 320 – Fall 2011 ATMS 320 – Fall 2011

4 Aliasing – Moiré Effect Aliasing – Velocity Folding

ATMS 320 – Fall 2011 ATMS 320 – Fall 2011

Aliasing – Stroboscopic Artifacts

Visit http://www.michaelbach.de/ot/mot_strob/index.html

ATMS 320 – Fall 2011

5