[go: up one dir, main page]

0% found this document useful (0 votes)
46 views49 pages

DSP - CH 2 - Signal Sampling and Quantization

The document covers the principles of Digital Signal Processing (DSP) with a focus on signal sampling and quantization. It explains the process of Analog to Digital Conversion (ADC), including sampling, quantization, and the Nyquist-Shannon Sampling Theorem, which states that an analog signal can be perfectly recovered if sampled at a rate at least twice its highest frequency. Additionally, it discusses the importance of anti-aliasing filters and quantization error in ensuring accurate digital representation of analog signals.
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)
46 views49 pages

DSP - CH 2 - Signal Sampling and Quantization

The document covers the principles of Digital Signal Processing (DSP) with a focus on signal sampling and quantization. It explains the process of Analog to Digital Conversion (ADC), including sampling, quantization, and the Nyquist-Shannon Sampling Theorem, which states that an analog signal can be perfectly recovered if sampled at a rate at least twice its highest frequency. Additionally, it discusses the importance of anti-aliasing filters and quantization error in ensuring accurate digital representation of analog signals.
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/ 49

Higher Institute Of Engineering And

Technology In New Damietta

CEE 411 Digital Signal Processing


Chapter 2: Signal Sampling And
Quantization
Dina Reda
Assistant Professor
Electronics and Communications Engineering Dept.,
Higher Institute of Engineering and Technology
1.
Sampling of Continuous
Signals
Basic block diagrams of a DSP system

Analog band-limited Digital Processed Output Analog


input signal signal digtal signal signal output
Analog Reconstruction
ADC DSP DAC
filter filter

2- ADC
The ADC unit samples an analog signal,
quantizes the sampled signal, and encodes the
quantized signal level to a digital signal

3
Analog to Digital Conversion

A/D conversion can be viewed as a three step process

4
Analog to Digital Conversion

A/D conversion can be viewed as a three step process

5
Sample & Hold (Sampler)
● 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.
Sample & Hold (Sampler)

7
Sample & Hold (Sampler)

Signal samples
x (t )

Figure below shows an analog (continuous- Analog signal/continuous-time signal


5
time) signal (solid line) defined at every point Sampling interval T
over the time axis (horizontal line) and
amplitude axis (vertical line). 0
Hence, the analog signal contains an infinite
number of points. −5 nT
0 2T 4T 6T 8T 10T 12T

x (t )
Voltage for ADC

Each sample maintains its voltage level 5 Analog signal


during the sampling interval 𝑻 to give the ADC
enough time to convert it.
0
This process is called sample and hold.

−5 nT
0 2T 4T 6T 8T 10T 12T
Nyquist–Shannon Sampling Theorem

Sampling theorem:
An analog signal can be in theory perfectly recovered as long as the sampling rate is at
least twice larger than the highest frequency of the analog signal to be sampled

Examples:
● To sample a speech signal containing frequencies up to 4 kHz, the minimum
sampling rate is chosen to be at least 8 kHz, or 8,000 samples per second
● For an audio signal with frequencies up to 20 kHz, sample the audio signal at the
sampling rate of at least 40,000 samples per second, or 40 kHz
Nyquist–Shannon Sampling Theorem
Sampling condition is satisfied

1 40 Hz

Voltage
● Sampling condition is satisfied. 0
fmax=40Hz, fs=100 Hz
-1

● Undersampling: 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
Signal aliasing would occur when the Time (sec.)
Sampling condition is not satisfied
sampling condition is not satisfied.
90 Hz 10 Hz
1

fmax=90 Hz, fs=100 Hz

Voltage
0

-1

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
Time (sec.)
Example: For the following analog signal, find the Nyquist sampling rate,
also determine the digital signal frequency and the digital signal

11
Example: Find the sampling frequency of the following signal.

So sampling frequency should be

12
Sampling
The sampled signal xs(t) obtained by sampling the
continuous signal x(t) at a sampling rate of fs samples per
second.

this process can be written as the product of the


continuous signal and the sampling pulses (pulse train):
Time Domain Frequency Domain

14
Time Domain Frequency Domain

1 +
P ( f ) =   ( f − nf s )
T n =−

xs (t ) = x(t ) p (t ) X s ( f ) = X ( f )  P( f )
Where Y ( f )   ( f − fo ) = Y ( f − fo )
1 +
X s ( f ) = X ( f )    ( f − nf s )
T n =−
1 +
=  X ( f − nf s )
T n =−

15
The sampled signal spectrum
1 1 1
X s ( f ) = + X ( f + fs ) + X ( f ) + X ( f − fs ) +
T T T

(A) Original signal spectrum.

(B) Sampled signal spectrum for fs > 2B.

(C) Sampled signal spectrum for fs = 2B.

(D) Sampled signal spectrum for fs < 2B


Sampling

1. 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
2. The half of the sampling frequency = Nyquist frequency (Nyquist limit) =
folding frequency
2.
Signal Reconstruction
SIGNAL RECONSTRUCTION Time Domain

● recovery of analog signal from its sampled signal version.


● First, the digitally processed data y(n) are converted to
the ideal impulse train ys(t), in which each impulse has
its amplitude proportional to digital output y(n), and two
consecutive impulses are separated by a sampling period
of T;
● Second, the analog reconstruction filter is applied to the
ideally recovered sampled signal ys(t) to obtain the
recovered analog signal.
SIGNAL RECONSTRUCTION Frequency Domain

Spectrum of the sampled signal when fs=2fmax

Spectrum of the sampled signal when fs>2fmax

Spectrum of the sampled signal when fs<2fmax


Frequency Domain Recovered signal spectrum
23
24
25
26
Anti-aliasing Lowpass Filter

Anti-aliasing Sample and ADC Digital value


LP filter hold coding
Analog signal spectrum X( f ) Xs( f )
(worst case)

Xa
f fc f fa fc fs f
fs
2
fs − fa
aliasing noise level X a
at f a (image from f s − f a )

In practice, the analog signal to be digitized may contain the other frequency components whose
frequencies are larger than the folding frequency, such as high-frequency noise. To satisfy the sampling
theorem condition, we apply an anti-aliasing filter to limit the input analog signal, so that all the
frequency components are less than the folding frequency (half of the sampling rate).
3.
Analog-to-Digital Conversion,
Digital-to-Analog Conversion,
and Quantization
ADC, DAC, and Quantization

● ADC

x (t ) ADC
Anti- Quantization Digital y (t )
Sample Zeroth- Anti-
aliasing binary signal DAC
and hold order image
filter encoder processor
hold filter
Quantizer

● After the sampling, the discrete time continuous signal still carry infinite information
(can take any value) in terms of amplitude.

● Quantization is the process to reduce infinite information of the amplitude.

● Quantizer do the conversion of discrete time continuous valued signal into a


discrete-time discrete-value signal.

● The value of each signal sample is represented by a value selected from a finite set
of possible values.

30
4-bit Quantizer

31
Quantizer

● The A/D converter chooses a quantization level for each analog sample.

● Number of levels of quantizer is equal to L = 2N

● An N-bit converter chooses among 2N possible quantization levels.

● So 3 bit converter has 8 quantization levels, and 4 bit converter has 16 quantization
levels.

32
Quantizer
The quantization step size or resolution is calculated as:

● Resolution of a quantizer is the distance between two successive quantization levels


● More quantization levels, a better resolution!
● What's the downside of more quantization levels?

● The error caused by representing a continuous-valued signal (infinite set) by a finite


set of discrete-valued levels.

● The larger the number of quantization levels, the smaller the quantization errors.

● The quantization error is calculated as the difference between the quantized level
and the true sample level.

● Most quantization errors are limited in size to half a quantization step Q or Δ .

33
3-bit unipolar quantizer Binary code xq
111 7

110 6

101 5

100 4

011 3

010 2

001 

000 x
0  2 3 4 5 6 7 8
eq
/2 x
− / 2
3-bit bipolar quantizer

Binary code xq
111 3

110 2

101 

100 0 x
−4  −3 −2  −  2 3 4
011 −

010 −2 

001 −3

000 −4 
eq
/2 x
− / 2
36
37
After quantizing the input signal x, the ADC produces binary codes, as illustrated in
Fig. 2.32

38
DAC process

● DAC DAC conversion

Digital signal
Anti- Analog signal
Quantization zeroth-order image
and coding hold filter

Binary code
00001001
01001011
11010010
00001101

Quantization Error
● Suppose a quantizer operation given by Q(.) is performed on
continuous-valued samples x[n] is given by Q(x[n]), then the
quantization error is given by

40
42
5.
Problems
45
46
47
48
Thanks!
Any questions?

You might also like