[go: up one dir, main page]

0% found this document useful (0 votes)
5 views48 pages

NGU CCAS 2.5 Lecture - Week 10 - Sampling

This document covers the fundamentals of sampling continuous-time signals, including the Nyquist theorem, aliasing, and the importance of filtering. It explains how to process signals through sampling, the effects of undersampling, and practical applications in audio equipment. The document emphasizes the need for appropriate sampling rates to avoid distortion and ensure accurate signal reconstruction.

Uploaded by

Omar Osman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views48 pages

NGU CCAS 2.5 Lecture - Week 10 - Sampling

This document covers the fundamentals of sampling continuous-time signals, including the Nyquist theorem, aliasing, and the importance of filtering. It explains how to process signals through sampling, the effects of undersampling, and practical applications in audio equipment. The document emphasizes the need for appropriate sampling rates to avoid distortion and ensure accurate signal reconstruction.

Uploaded by

Omar Osman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Towards

CCAS.2.5 Communications unbounded


Signals and Systems thinking.

SAMPLING

1
Learning Outcomes

2
Learning Outcomes

By the end of this session you should be able to:


• Understand how to process continuous-time signals through
sampling.
• Use the sampling theorem in the discrete-time processing of
continuous-time signals.
• Define the Nyquist frequency and the Nyquist rate.
• Describe aliasing and its effects.
• Appreciate the need for filtering and the importance of
sampling in practical applications.

3
Outline

4
Outline

• Introduction
• Sampling
• Fundamentals
• The Nyquist Theorem
• Aliasing
• Effect of undersampling
• Time-domain view
• Frequency-domain view
• Filtering
• Sampling in practice
• Pulse amplitude modulation (PAM)
5
Introduction

6
Recall CCAS 2.4: Analog-to-digital conversion
• Recall that we looked at the process of analog-to-digital
conversion (ADC) during the module CCAS 2.4.
• We explained that most embedded systems need to interact
with the analogue world and hence require ADC.
• We outlined the ADC process involving sampling, quantization
and encoding (see next slide).
• In the next two lectures, we will discuss these procedures in a
lot more detail and in the context of signal analysis.

7
Recall CCAS 2.4: ADC Basics

Sampling Quantisation Encoding


8
Why convert CT to DT signals?
• Converting a CT signal to a DT sequence allows digital
technologies, geared towards DT signals, to be exploited.
• DT systems are often more flexible and sophisticated compared
to the CT counterparts.
• Hence, we typically convert a CT signal to a DT signal, process it
using DT systems and then convert it back to a CT signal.
• Example:
– Suppose a CT signal was sampled and quantized using an
ADC and then stored in memory.
– The resulting DT sequence would be the sequence of
numbers in successive memory locations.
– A range of sophisticated DSP algorithms could then be
applied to this numeric sequence.
9
Setting the scene – Sampling in audio equipment
• Audio CDs and prerecorded tapes are advertised as having a
44.1 kHz rate. What does this mean?
• This rate actually refers to the sampling rate, that is the number
of samples per second.
• With this 44.1 kHz sampling rate, frequencies of up to 22 kHz
can be captured.
– Thanks to the Nyquist sampling theorem.
– The max frequency of 22 kHz exceeds the 20 kHz specification that is
common for most digital audio equipment.

Questions:
• Why has the specification been set to 20 kHz?
• What would happen if the sampling rate was set to a much
lower rate, say 2 kHz?
10
11

Sampling
Fundamentals

11
Sampling fundamentals – Time-domain view
• The following figure depicts the sampling process in a nutshell.

12
Sampling fundamentals – Time-domain view
• The following figure depicts the sampling process in a nutshell.
• The top (blue lines) subplot depicts the input to the sampling process while
the bottom (green lines) subplot depicts the output of the sampling process.
• The input comprises two waveforms:
– A continuous-time analog signal.
– A discrete-time sampling pulse waveform.
• Multiplying the two input signals yields the sampled version of the input
signal at the output.

• Hence, sampling converts an analog signal into a series of impulses, each


representing the amplitude of the signal at a given (discrete) point in time.
– The more samples (impulses), the more accurate the waveform.
– The number of samples taken defines the shape of the waveform.

13
Sampling fundamentals – Time-domain view
• Mathematically, sampling a CT signal x(t) using a train of impulses (Delta
functions), is expressed as follows:
X
Ts (t) = (t nTs )
n
1
X
1
xs (t) = x(t) Ts (t) = x(t)ejk⌦s t
Ts
<latexit sha1_base64="/2fiM6yNTTla2UeeGPJGlA5OCj0=">AAACmHicbVFdb9MwFHXC1ygfKyBe4MWiYuqQViV9YRKqVAkQ8MRA6zap7iLHuelMHSezb9CiKL+J/8Ib/wY3zcPouJLlo3Puub6+Ny6UtBgEfzz/1u07d+/t3O89ePjo8W7/ydMTm5dGwEzkKjdnMbegpIYZSlRwVhjgWazgNF69X+unP8FYmetjrApYZHypZSoFR0dF/V8shqXUNVxqbgyv3jS9vT3KElDIo/o4ss0Q9+mE2TKLat10yhAPtNP2GVtnX0W2TaJX7tqyTlhquKjDpiXops5qcsCkTrFqzusOtF4K5/UPuqLsawZLHlmKTY+BTq51F/UHwShog94EYQcGpIujqP+bJbkoM9AoFLd2HgYFLmpuUAoFrn5poeBixZcwd1DzDOyibgfb0NeOSWiaG3c00pa97qh5Zm2VxS4z43hht7U1+T9tXmJ6uKilLkoELTYPpaWimNP1lmgiDQhUlQNcGOl6peKCu0mi22XPDSHc/vJNcDIehcEo/DYeTMfdOHbIS/KKDElI3pIp+UyOyIwI77n3zvvgffRf+FP/k/9lk+p7necZ+Sf8738BpaTI7w==</latexit>
k= 1

• Taking the DTFT of the sampled signal, yields:

14
15

Sampling
The Nyquist Theorem

15
The Nyquist Theorem: In plain English
• The sampling theorem, known as the Nyquist Theorem, but
often referred to as the Nyquist-Shannon Theorem…
• … states that:

The sampling frequency 𝒇𝒔 must be at least twice the highest


frequency component 𝒇𝒎 , that is, 𝒇𝒔 ≥ 𝟐𝒇𝒎

• Equivalently, the highest analog frequency can be no greater


than one-half the sampling frequency.
– This is known as the Nyquist frequency.
• If 𝑓# is exactly equal to 2𝑓$ , this is known as critical sampling.
– In practice, the sampling frequency should be much higher than twice
the highest analog frequency. This is known as oversampling.
16
The Nyquist Theorem
• Harry Nyquist was a physicist and
electronic engineer who was born in
Sweden in 1889.
• He emigrated to the US in 1907
where he worked for Bell Labs for 37
years until he retired in 1957.
• One of his famous works was
"Certain topics in Telegraph
Transmission Theory," which was
published in 1928.

17
Why oversampling? – Example
• Consider the following analog sine waveform (black curve)
which we sample at exactly twice its frequency.
– What would happen?

18
Sampling Terminology
• The Nyquist frequency 𝐹! or 𝑓" is defined as the highest frequency
component in our bandlimited signal.
• The sampling frequency 𝐹# or 𝑓$ is defined as the center frequency of our
sampling frequency spectrum.
• The folding frequency is defined to be half the sampling frequency 𝐹# /2, and
hence lies between 𝐹! and 𝐹# .

19
Significance of The Nyquist Theorem
• The sampling theorem allows a bandlimited (BL) time function to be exactly
reconstructed from equally spaced samples provided that the sampling rate
is sufficiently high (obeying the Nyquist frequency).
• This provides a mechanism for exactly representing a bandlimited CT signal
by a sequence of samples, that is, by a DT sequence.
• Mathematically, this is expressed as follows:

• Note that the spectrum of the DT sequence 𝑥 𝑛 = 𝑥(𝑛𝑇) is obtained by


superimposing the copies, also referred to as “images”, of the spectrum
𝑋(𝑗𝛺) of the CT signal, at all integer multiples of the sampling frequency.
– This is shown on the next slide.
20
Significance of The Nyquist Theorem
• The top subplot depicts the
spectrum of a bandlimited
CT signal.

• The middle subplot depicts


a sampled version obeying
the Nyquist condition, in
which the copies do not
overlap.

• The bottom subplot depicts


a sampled version that
violates the Nyquist
condition, in which the
copies overlap, hence
leading to aliasing and
causing distortion. 21
22

Aliasing
Effect of undersampling

22
Aliasing: The effect of undersampling
• The following figure depicts the effect of undersampling that
results in aliasing.
• This occurs when the Nyquist condition is violated.
– As a result of the sampling frequency being less than twice the highest
frequency component in the signal, expressed as: 𝑓$%"&'( < 2𝑓"%) .

23
Aliasing: The effect of undersampling
• The following figure depicts the effect of undersampling that
results in aliasing.
• An alias is an undesirable signal produced when the sampling
frequency is not at least twice the signal frequency.
– It is called an alias (i.e. a false identity) because this signal is posing as
part of the original analog signal when in fact it is not.
• With reference to the figure, the (unfiltered) analog signal
contains frequencies above the sampling frequency spectrum.
– These frequencies overlap into the spectrum of the sampling waveform.
– As a result, the lower frequency components of the sampling waveform
become mixed in with the frequency spectra of the analog waveform.
– This causes interference, known as an aliasing error.

24
25

Aliasing
Time-domain view

25
Aliasing: Time-domain view of undersampling
• Consider the CT analog sine waveforms shown below.

26
Aliasing: Time-domain view of undersampling
• Consider the CT analog sine waveforms shown below.
• Given the location of the DT samples, we observe that more
than one CT sinusoids can be threaded through the samples.
– Furthermore, if all the samples had equal height, they could also
correspond to a DC component (being a sinusoid of zero frequency).
• This means that from the samples alone, there is no clear way of
determining which CT sinusoids were sampled.
• If the sampling theorem is violated, higher frequencies above
𝐹% /2 take on “the alias” of lower frequencies.
– This means that frequencies in the original signal above 𝐹# /2 become
reflected down to frequencies less than half the sampling frequency.

27
28

Aliasing
Frequency-domain view

28
Sampling & Aliasing: Frequency-domain view
• Consider a low-pass signal bandlimited to a max frequency of 𝑓" .
• Recall from Fourier analysis that a CT signal is made up of harmonics, these
being sine waves of different frequencies and amplitudes.

• The left subplot below depicts how such an arbitrary, low-pass, message
signal m(t) may look in the time-domain (TD).
• The right subplot depicts the bandlimited (BL) spectrum M(f) of this message
signal in the frequency-domain.

29
Sampling & Aliasing: Frequency-domain view
• Consider a low-pass signal bandlimited to a max frequency of 𝑓" .
• Suppose now that the CT signal m(t) is sampled with a periodic impulse train.
– Recall that the frequency spectrum of a delta function, is a delta function.

30
Sampling & Aliasing: Frequency-domain view
• Consider a low-pass signal bandlimited to a max frequency of 𝑓" .
• Suppose now that the CT signal m(t) is sampled with a periodic impulse train.
– Recall that the frequency spectrum of a delta function, is a delta function.

• Assuming the Nyquist conditions are met (and as the signal is bandlimited):
• Multiplying the spectrum of our BL signal m(t) by the spectrum of the
periodic impulse train, will periodically replicate the spectrum of the CT
signal at integer multiples of the sampling frequency.
• If the replicated spectrums do not overlap, then we can recover the original
signal perfectly.

31
Sampling without Aliasing present
• The figure below shows how we can calculate the frequency spacing of each
of the copies (images) of the original spectrum.
• It should be evident that the condition for the replicas to not overlap with
each other is 𝒇𝒔 ≥ 𝟐𝒇𝒎 .

32
Sampling with Aliasing present
• The figure below shows how we can calculate the frequency spacing of each
of the copies (images) of the original spectrum.
• It should be evident that the condition for the replicas to not overlap with
each other is 𝒇𝒔 ≥ 𝟐𝒇𝒎 .
• If, however, this condition is violated, the spectra of the replicas will overlap.

33
34

Filtering

34
Preventing aliasing: The need for filtering
• The figure below shows how the spectrum of the analog signal
has been filtered using a low-pass anti-aliasing filter.

35
Preventing aliasing: The need for filtering
• The figure below shows how the spectrum of the analog signal
has been filtered using a low-pass anti-aliasing filter.
• The filter is used to limit the frequency spectrum of the analog
signal for a given sampling frequency.
– The filter must at least eliminate all analog frequencies above the
minimum frequency in the sampling spectrum to avoid aliasing errors.
• This means that to avoid aliasing, all frequency components
&', ',
outside the frequency range [ (
, (] must be removed before
sampling.

36
Preventing aliasing: Higher sampling frequency
• An alternative approach to preventing aliasing without using an
anti-aliasing filter is to use a “sufficiently high” sampling
frequency.
• This “sufficiently high” sampling frequency depends on the
application under consideration.
• Typically, however, it is limited by the hardware constraints of
the ADC converter that follows it.
– That is to say, the ADC will have a hardware specification that will
impose a limit on the maximum sampling rate achievable.

37
Anti-aliasing and reconstruction filters
• It should be evident that for signals that do not satisfy the
band-limited condition, an anti-aliasing filter is required.

• Assuming that the signal is band-limited and the Nyquist


condition is satisfied, the original CT analog signal x(t) can be
reconstructed through ideal low-pass filtering.
• Mathematically, this is expressed as follows:

38
Reconstruction process
• The reconstruction process using a LPF will always generate a
signal that is bandlimited to less than half the sampling
frequency and that matches the given set of samples.
– This will always be the case irrespective of whether the sampling rate
constraint has been adhered to or not.
– The reconstruction filter makes the assumption that the samples also
correspond to a frequency less than half the sampling frequency.

39
Sampling in practice
Pulse amplitude modulation

40
Sampling between domains using CTFT and DTFT

4141
Generating a Pulse Amplitude Modulated signal
• For our original signal m(t), assume that we use a more realistic
pulse train to sample our signal.
– Rather than impulse (delta) functions that are practically non-realizable.
• Consider, for example, a train of rectangular pulses, as shown
below.

42
Generating a Pulse Amplitude Modulated signal
• In such a scenario, our output becomes a train of pulses, the
tops of which follow the original signal, as shown below.

43
Generating a Pulse Amplitude Modulated signal
• In such a scenario, our output becomes a train of pulses, the
tops of which follow the original signal, as shown below.
• The signal generated at this output is known as a pulse-
amplitude-modulated (PAM) signal.
• Note, however, that a PAM signal is not a digital signal.
– While a PAM signal is discrete on the time-axis, it is still continuous on
the amplitude-axis.
– That is to say, a PAM signal, is a discrete analog signal.

• In the next lecture, we will explore how we convert a discrete


analog signal to a digital signal through quantization and
encoding.
44
Summary

45
Summary
• We demonstrated the process for sampling continuous-time
waveforms.
• We explained the rules that must be followed to allow us to
recover a continuous-time signal perfectly.
• We described sampling as the first step in the process used to
generate digital signals.
• We described aliasing and discussed how it can be eliminated.
• We presented an overview of filtering.
• We introduced pulse amplitude modulation (PAM).

46
Reading

47
Essential Reading
• From the textbook “Chaparro & Akan: Signals and systems
using MATLAB”:
– Chapter 1: 1.6
– Chapter 8: 8.1, 8.2

• From the textbook “Manolakis & Ingle: Applied Digital Signal


Processing”:
– Chapter 6: 6.1, 6.3, 6.4

48

You might also like