0% found this document useful (0 votes)
110 views51 pages

MSP - Lecture - 2 and 3 PDF

The document discusses signal sampling and quantization. It covers analog to digital conversion which involves sampling, quantizing, and encoding an analog signal into digital form. It discusses the Nyquist-Shannon sampling theorem which establishes that a signal must be sampled at least twice the highest frequency to avoid aliasing. It also covers concepts like anti-aliasing filters, under-sampling, over-sampling, and the effects of sampling in the time and frequency domains.

Uploaded by

Batool Herzallah
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)
110 views51 pages

MSP - Lecture - 2 and 3 PDF

The document discusses signal sampling and quantization. It covers analog to digital conversion which involves sampling, quantizing, and encoding an analog signal into digital form. It discusses the Nyquist-Shannon sampling theorem which establishes that a signal must be sampled at least twice the highest frequency to avoid aliasing. It also covers concepts like anti-aliasing filters, under-sampling, over-sampling, and the effects of sampling in the time and frequency domains.

Uploaded by

Batool Herzallah
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/ 51

SIGNAL SAMPLING AND

QUANTIZATION

DR SAMEER HASAN
Course assessment

Exam/evaluation Date Grade


Midterm exam 15-Nov (5:00 – 6:00 pm) 30
Quizzes and HWs TBD 20
Final exam TBD 50

Email Subject: MSP_HW_1


MSP_Quiz_1

2
Overview
• Digital Signal Processing System
• Analog to Digital Conversion
• Nyquist–Shannon Sampling Theorem
• Aliasing
• Sampling Effect in Time Domain
• Sampling Effect in Frequency Domain
• Anti Aliasing Filter
• Under-sampling
• Sampling of Band Limited Signals
• Over-sampling
• Digital to Analog Conversion
Analog vs. Digital Signal Processing

Analog input Signal x(t) Analog output Signal y(t)


Analog
Signal Processor

Analog Signal Processing

Analog input Analog output


Signal x(t) Signal y(t)
A/D Digital D/A
converter Signal Processor converter

Digital Signal Processing


4
Typical Digital Signal Processing System

5
Analog to Digital Conversion
A/D conversion can be viewed as a three-step process

6
Analog to Digital Conversion
A/D conversion can be viewed as a three-step process

7
Analog to Digital Conversion
Sample & Hold (Sampler)

• Analog signal is continuous in time and continuous in


amplitude.

• It means that it carries infinite information of time and infinite


information of amplitude.

• Analog (continuous-time) signal has some value defined at


every time instant, so it has infinite number of sample points.

8
Analog to Digital Conversion
Sample & Hold (Sampler)

• It is impossible to digitize an infinite number of points.

• The infinite points cannot be processed by the digital signal


(DS) processor or computer, since they require an infinite
amount of memory and infinite amount of processing power
for computations.

• Sampling is the process to reduce the time information or


sample points.

9
Analog to Digital Conversion
Sample & Hold (Sampler)

• The first essential step in analog-to-digital (A/D) conversion is


to sample an analog signal.

• This step is performed by a sample and hold circuit, which


samples at regular intervals called sampling intervals.

• Sampling can take samples at a fixed time interval.

• The length of the sampling interval is the same as the


sampling period, and the reciprocal of the sampling period is
the sampling frequency fs.
10
Analog to Digital Conversion
Sample & Hold (Sampler)

HW?
11
Analog to Digital Conversion
Sample & Hold (Sampler)

• After a brief acquisition time, during which a sample is


acquired, the sample and hold circuit holds the sample steady
for the remainder of the sampling interval.
• The hold time is needed to allow time for an A/D converter to
generate a digital code that best corresponds to the analog
sample.
• If x(t) is the input to the sampler, the output is x(nT), where T
is called the sampling interval or sampling period.
• After the sampling, the signal is called “discrete time
continuous signal” which is discrete in time and continuous in
amplitude.
12
Analog to Digital Conversion
Sample & Hold (Sampler)

13
Analog to Digital Conversion
Sample & Hold (Sampler)
Figure below shows an analog (continuous-time) signal (solid
line) defined at every point over the time axis (horizontal line)
and amplitude axis (vertical line).
Hence, the analog signal contains an infinite number of points.

14
Analog to Digital Conversion
Sample & Hold (Sampler)
• Each sample maintains its voltage level during the sampling
interval to give the ADC enough time to convert it.
• This process is called sample and hold.

15
Nyquist–Shannon Sampling Theorem

The sampling theorem guarantees that an analogue signal can be


perfectly recovered as long as the sampling rate is at least twice
as large as the highest-frequency component of the analogue
signal to be sampled.

16
Nyquist–Shannon Sampling Theorem

17
Nyquist–Shannon Sampling Theorem

Examples

18
Nyquist–Shannon Sampling Theorem
Example: For the following analog signal, find the Nyquist sampling
rate, also determine the digital signal frequency and the digital
signal

19
Nyquist–Shannon Sampling Theorem

Example: Find the sampling frequency of the following signal.

So sampling frequency should be

20
Nyquist–Shannon Sampling Theorem

Exercise

Determine the Nyquist sampling rate of a signal


x(t) = 3sin(5000t + 17o)

21
Aliasing

22
Aliasing
How many hertz can the human eye see?

• Most don't notice unless it is under 50 or 60 Hz.

• Generally, people notice when the frame-rate is less than the


refresh rate of the display.

• Depending on the type of CRT, you couldn't see flicker at 30


Hz or you could still see it at 120 Hz.

23
Aliasing
• When the minimum sampling rate is not respected, distortion
called aliasing occurs.

• Aliasing causes high frequency signals to appear as lower


frequency signals.

• To be sure aliasing will not occur, sampling is always preceded


by low pass filtering.

• The low pass filter, called the anti-aliasing filter, removes all
frequencies above half the selected sampling rate.

24
Aliasing
• Figure illustrates sampling a 40 Hz sinusoid
• The sampling interval between sample points is T = 0.01 second,
and the sampling rate is thus fs = 100 Hz.
• The sampling theorem condition is satisfied

25
Aliasing
• Figure illustrates sampling a 90 Hz sinusoid
• The sampling interval between sample points is T = 0.01 second,
and the sampling rate is thus fs = 100 Hz.
• The sampling theorem condition is not satisfied

26
Aliasing

27
Sampling Effect in Time Domain

Example of Aliasing in the time domain


of various sinusoidal signals ranging
from 10 kHz to 80 kHz with a sampling
frequency Fs = 40 kHz.

28
Time & Frequency Domains
• There are two complementary signal descriptions.
• Signals seen as projected onto time or frequency domains.

29
Time & Frequency Domains

30
Frequency Range of Analog & Digital Signals

• For analog signals, the frequency range is from -∞ Hz to ∞ Hz

• For digital signals, the frequency range is from 0 Hz to Fs/2 Hz

31
Sampling theorem in the frequency domain

In practice this can help us to:

1. Design the anti-aliasing filter (a lowpass filter that will reject


high frequencies that cause aliasing) to be applied before
sampling,

2. And the anti-image filter (a reconstruction lowpass filter that


will smooth the recovered sample-and-hold voltage levels to
an analog signal) to be applied after the digital-to-analog
conversion (DAC)

32
Sampling theorem in the frequency domain

33
Sampling theorem in the frequency domain

Fourier series

Fourier Transform
Original spectrum

Shifted versions (replicas)


34
Sampling theorem in the frequency domain

35
36
 If applying a lowpass reconstruction filter to obtain exact reconstruction of the
original signal spectrum, the following condition must be satisfied:

Shannon sampling theorem

Summary:

 Sampling theorem establishes a minimum sampling rate for sampling a


given band limited analog signal with the highest frequency component of
fmax

 If the sampling condition is satisfied, then the analog signal can be


recovered via its sampled values

 The half of the sampling frequency = Nyquist frequency (Nyquist limit) =


folding frequency

37
Example:

Solution: Amplitude = 5, f = 1 kHz


a- Since the analog signal is sinusoid with a peak value of 5 and frequency of 1000 Hz, we can
write the sine wave using Euler’s identity:

The Fourier series coefficients

38
Review of Fourier series and FT

Considering a real signal x(t) (x(t) is not a


complex function) 39
The spectrum of original frequency:

b- After the analog signal is sampled at the rate of 8000 Hz, the sampled signal spectrum
and its replicas centered at the frequencies ±kfs, each with the scaled amplitude being 2.5/T

Must be removed, since they convey no additional information


40
Signal Reconstruction

41
42
The two-sided amplitude
spectrum for the sinusoid
44
Design of the Anti-Aliasing Filter
• Anti-aliasing filters are analog filters.

• They process the signal before it is sampled.

• In most cases, they are also low-pass filters unless band-pass


sampling techniques are used.

45
Design of the Anti-Aliasing Filter

The shape of each replica in the sampled


signal spectrum is the same as that of the
anti-aliasing filter magnitude frequency
response.

 To control the aliasing noise level:

 A higher-order lowpass filter (i.e. Butterworth filter)


 Increasing the sampling rate. 46
Example: Butterworth Filter
• The Butterworth magnitude frequency response with an order of n is given by:

• For a second-order Butterworth lowpass filter with the unit gain, the transfer
function and its magnitude frequency response are given by:

47
Practicality: Second-order unit-gain Sallen-Key
lowpass filter

48
49
Assuming a sampling rate of 8000 Hz is used, and the anti-aliasing filter is a second-order
Butterworth lowpass filter with a cutoff frequency of 3.4 kHz:

(a) Determine the percentage of aliasing level at the cutoff frequency.


(b) Determine the percentage of aliasing level at the frequency of 1000 Hz

50
Assuming a sampling rate of 16,000 Hz is used, and the anti-aliasing filter is a second-order
Butterworth lowpass filter with a cutoff frequency of 3.4 kHz:

51

You might also like