0% found this document useful (0 votes)
16 views28 pages

Sampling Theorem and Quantization Explained

The document explains the concepts of sampling and quantization in signal processing, detailing how continuous-time signals are converted into discrete-time signals through sampling and how these signals are then quantized into binary representations. It emphasizes the importance of the Nyquist sampling theorem to avoid aliasing and outlines the quantization process, including quantization error and coding. Additionally, it provides examples of common audio sample rates and the relationship between sampling rates and signal frequencies.

Uploaded by

carlpriame15
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)
16 views28 pages

Sampling Theorem and Quantization Explained

The document explains the concepts of sampling and quantization in signal processing, detailing how continuous-time signals are converted into discrete-time signals through sampling and how these signals are then quantized into binary representations. It emphasizes the importance of the Nyquist sampling theorem to avoid aliasing and outlines the quantization process, including quantization error and coding. Additionally, it provides examples of common audio sample rates and the relationship between sampling rates and signal frequencies.

Uploaded by

carlpriame15
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

Sampling Theorem & Quantization

Engr. Amor A. Lacara, M. Eng. (ECE)


What is Sampling?

The process of converting a continuous-time


signal into a discrete-time signal is
called sampling. Once the sampling is done, the
signal is defined at discrete instants of time and
the time interval between two successive
sampling instants is called the sampling period.
SAMPLING OFANALOG SIGNAL
Anti-Alias Filter Reconstruction Filter

Analog to Digital Digital to


Analog Digital Signal Analog Analog
Filter Converter Processing Converter Filter
(ADC) (DSP) (ADC)

x(t) x[n] digital/binary y[n] y(t)


SAMPLING OFANALOG SIGNAL
A/D CONVERTER

x(t) x[n]
SAMPLING QUANTIZER CODING

101
100
011
010
001
000
SAMPLING OFANALOG SIGNAL
The ADC is continuously sampled the analog signal x(t) at a sampling rate fs
and fixed sampling interval T, which is defined as the time span between
two sample points.
Analog Signal x(t) Sampled Signal x(nT)

7T 8T 9T 10T 11T 12T ...nthT

0 T 2T 3T 4T 5T

Sampling Rate fs = 1/T


(sample per seconds / Hz)
Sampling Interval T
SAMPLING OFANALOG SIGNAL
Uniform / periodic sampling, sample values are equally spaced from one
another by a fixed sampling interval T which is the type of sampling used
most often in practice.
x[n] =x(nT)

Where x[n] is the discrete time signal or sampled signal obtain by sampling
analog signal x(t) at every T seconds, and n is a positive integer. The
relationship of sampling period Tand sampling rate fs is describe as.
t =nT =n/fs
SAMPLING OFANALOG SIGNAL
Mathematically, consider an analog sinusoidal signal described as
x(t)=Asin(2πft)

When sampled uniformly at sampling rate fs, sampled sinusoidal signal is given by
x[n]=Asin(2πfnT)

If an analog signal is not appropriately sampled, such the sampling is too frequent, then the
DSP will have to process a large amount of data in a much shorter time frame. If the sampling is
too sparse, then important information might be missing in the sampled signal, this is called
aliasing.
SAMPLING OFANALOG SIGNAL

under-sampled

over-sampled
SAMPLING THEOREM
The sampling theorem also called Nyquist sampling theorem or Nyquist
criterion simply stated, criteria require that the sampling frequency be at
least twice the highest frequency (Nyquist frequency) contained in the
signal can be reconstructed exactly without any error or loss of information.

fs >=2*fmax

For example, to sample a speech signal containing frequencies up to 4 kHz,


the minimum sampling rate is chosen to be at least 8 kHz, or 8000 samples
per second; to sample an audio signal with frequencies up to 20 kHz, a
sampling rate with at least 40,000 samples per second or 40 kHz is
required.
The phenomenon in which a high-frequency
component in the frequency spectrum of signal takes
identity of a lower frequency component in the
spectrum of the sampled signal is called aliasing.
Aliasing can occur if any of the following conditions exists −
•The sampling rate is very low.
•The signal is not band-limited to a finite range.

In order to avoid aliasing, it should be ensured that −


•Sampling frequency is greater than twice the maximum
frequency component present in the signal.
•The signal must be band-limited.
SAMPLING THEOREM
Alias signal, f-alias =|fs - f|

Notice that the pattern of the actual samples produces an aliased


sinewave at a lower frequency equal to |fs - f|.
SAMPLING THEOREM
Sine wave with the frequency of 90 Hz is sampled at 100 Hz. Since the
sampling rate of 100 Hz is relatively low compared with the 90-Hz sine wave,
the signal is under sampled. Thus 10 Hz sine wave the aliasing signal occur.
SAMPLING OFANALOG SIGNAL
Common Audio Sample Rates
SAMPLING RATE USES
8 kHz Telephone, walkie-talkie, wireless microphone, etc. Most

16 kHz modern VoIP and VoIP communication products.

44.1 kHz Used by digital audio (video compact disk (VCD), MP3, etc.).
48 kHz The standard audio sampling rate professional digital video/audio.

96 kHz High definition (HD) digital video disk (DVD), Blu-rays audio track.

192 kHz High definition (HD) digital recording software/hardware.


Video Presentations
Sampling Theorem
[Link]

Common Audio Sample Rates


[Link]

Sampling, Aliasing and Nyquist theorem


[Link]

Sampling and Aliasing


[Link]
QUANTIZATION AND CODING
Quantization is the process of converting sampled signal to approximate the
sample’s amplitude to a particular level in terms of N-bit binary
representation called quantization level.

Sample and Hold is a submodule converts independent variable (x-axis


values) from continues to discrete.
Sample

Analog signal x(t) Hold Quantized signal x(nT)


QUANTIZATION AND CODING
Horizontal lines within the range of the quantizer indicate the allowed
levels of quantization. Vertical lines indicate the sampling times. The
staircase signal xq(t) can be obtained by using a S/H circuit. The values
allowed in the digital signal are called the quantization levels, whereas the
distance ∆ between two successive quantization levels is called the
quantization step size or resolution.
QUANTIZATION AND CODING

Sampling and
quantization of an
analog sinusoidal
signal x(t) using a
rectangular grid.

Proakis J. G.
QUANTIZATION AND CODING
The quantization error is a sequence eq[n] defined as the difference between
the quantized value and the actual sample value. Thus
eq[n] =xq[n] - x[n]

The resulting quantized signal xq[n] can be obtain via eliminating excess digits
(truncation) or rounding the resulting number (rounding).

The error of quantizing signal may introduced from distortion of sample


signal called jitter or transient amplitude, and degradation in the signal held
during the conversion called droop may resulted from practical S/H circuit.
QUANTIZATION AND CODING
n x[n] xq[n] truncation xq[n] rounding eq[n] error
(rounding)
0 1.0 1.0 1.0
1 0.9 0.9 0.9 0.0

2 0.81 0.8 0.8 0.0

3 0.729 0.7 0.7 -0.01

4 0.6561 0.6 0.7 -0.029

5 0.59049 0.5 0.6 0.0439

6 0.531441 0.5 0.5 0.00951

7 0.4782969 0.4 0.5 −0.031441


0.0217031
QUANTIZATION AND CODING
• An ADC divides FSR of quantizer into 2^N equal steps or quantization
levels, L.
• Since the quantized sampled value xq[n] is represented by N-bits, it can take only one
of 2^N possible quantization [Link] spacing between quantization
levels L is the quantization steps or resolution, ∆.

• The quantization step/resolution, ∆is defined as


• ∆=(xmax-xmin)/(L-1)=FSL /ADC range

• Where xmax-xmin is the dynamic range, L is the number of quantization level 2^N,where N is
the ADC resolution in bits.
QUANTIZATION AND CODING
The ADC involves reading sample values and assigning the proper binary
code words called coding. Coding is the representation of the quantized
amplitude values of the signal samples in a unique binary number to each
quantization level, whereby the digital signal is generated as a series of bits.

The L levels need at least L different binary numbers. With a word length of N-
bits, it creates 2^Ndifferent binary numbers. This binary number is
represented by N-bits where N is typically 8, 10, 12 and 16. The number of N-
bits required in the coder is
N =log2 L
QUANTIZATION AND CODING
As example, the ADC FSR is +5V with the resolution of 3-bits. The quantizer
levels L is defined by 2^Nwhere N is the number of bits. Thus, it have 3 bits to
represent each of the 8 levels (0 - 7). This method is called unipolar codes.
DECIMAL SCALE +5V FSR BINARY CODE
7 FSR - 1 LSB =+7/8 FSR 4.375V 111
6 +3/4 FSR 3.75V 110
5 +5/8 FSR 3.125V 101
4 +1/2 FSR 2.5V 100
3 +3/8 FSR 1.875V 011
2 +1/4 FSR 1.25V 010
1 1 LSB =+1/8 FSR 0.625V 001
0 0 0V 000
QUANTIZATION AND CODING
The transfer function of an ideal
unipolar 3-bit ADC. The transition
from output code 000 to 001 should
happen as the input analog voltage
reaches 1/2 LSB.

There is a range of quantizer which


1/2 LSB
the ADC will produce a given output 1 LSB
binary code, this range is the
quantization uncertainty and is equal
to 1LSB.
For example, if the signal is converted into
an 8-bit binary number, the range of
numbers is 2^8 or 256 discrete values. If
the analog signal amplitude ranges
between 0.0 and 5.0 V, then the
quantization interval is 5/256 or 0.0195 V.
Video Presentations
Analog and Digital Signals
[Link]

Periodic and Aperiodic


[Link]

Quantization
[Link]

You might also like