0% found this document useful (0 votes)
277 views46 pages

Signal Sampling, Quantization, Binary Encoding: Oleh Albert Sagala

This document discusses signal sampling, quantization, and binary encoding. It begins by explaining that sampling digitizes the domain of a continuous signal while quantization digitizes the range. The objectives are to investigate sampling theory, signal reconstruction, quantization, and converting analog to digital signals. For sampling, the document addresses how samples are obtained, how to reconstruct signals from samples, and sampling conditions. For quantization, it discusses the number of levels, how to choose levels, and mapping values. The document then explains sampling rate, aliasing, reconstruction, uniform and non-uniform quantization, and binary encoding of quantized values.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
277 views46 pages

Signal Sampling, Quantization, Binary Encoding: Oleh Albert Sagala

This document discusses signal sampling, quantization, and binary encoding. It begins by explaining that sampling digitizes the domain of a continuous signal while quantization digitizes the range. The objectives are to investigate sampling theory, signal reconstruction, quantization, and converting analog to digital signals. For sampling, the document addresses how samples are obtained, how to reconstruct signals from samples, and sampling conditions. For quantization, it discusses the number of levels, how to choose levels, and mapping values. The document then explains sampling rate, aliasing, reconstruction, uniform and non-uniform quantization, and binary encoding of quantized values.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 46

Signal Sampling, Quantization, Binary

Encoding

Oleh Albert Sagala


Pertemuan 02, 03
• Often the domain and the range of an original signal x(t) are modeled
as continuous
• The process of digitizing the domain is called sampling and the
process of digitizing the range is called quantization

10/23/2018 Sampling, Quantization and Binary Encoding 2


Objectives
• This chapter investigates the sampling process, sampling theory, and
the signal reconstruction process, signal quantization, and binary
encoding.
• We consider some of the fundamental issues and techniques in
converting between analog and digital signals.

10/23/2018 Sampling, Quantization and Binary Encoding 3


For sampling, three fundamental issues are
1. How are the discrete-time samples obtained from the continuous-
time signal?;
2. How can we reconstruct a continuous-time signal from a discrete
set of samples?
3. Under what conditions can we recover the continuous-time signal
exactly?

10/23/2018 Sampling, Quantization and Binary Encoding 4


For quantization, the three main issues we
consider are
1. How many quantization levels should we choose?;
2. How should the value of the levels be chosen?;
3. How should we map the values of the original signal to one of the
quantization levels?

10/23/2018 Sampling, Quantization and Binary Encoding 5


Sampling of Continuous Signal

10/23/2018 Sampling, Quantization and Binary Encoding 6


Sampling a signal

10/23/2018 Sampling, Quantization and Binary Encoding 7


Sampling rate?
• We have to ensure that samples are collected at a rate high enough
that the original analog signal can be reconstructed or recovered
later. In other words, we are looking for a minimum sampling rate to
acquire a complete reconstruction of the analog signal from its
sampled version.
• If an analog signal is not appropriately sampled, aliasing will occur,
which causes unwanted signals in the desired frequency band.
• The sampling theorem guarantees that an analog signal can be in
theory perfectly recovered as long as the sampling rate is at least
twice as large as the highest-frequency component of the analog
signal to be sampled. The condition is described as

10/23/2018 Sampling, Quantization and Binary Encoding 8


Sampling process

• where p(t) is the pulse


train with a period T
=1/fs.
From spectral analysis, the
original spectrum (frequency components) X( f ) and
the sampled signal spectrum
Xs( f ) in terms of Hz are related as

10/23/2018 Sampling, Quantization and Binary Encoding 9


Sample-and-hold

10/23/2018 Sampling, Quantization and Binary Encoding 10


T-Domain

10/23/2018 Sampling, Quantization and Binary Encoding 11


Reconstructing a Signal

10/23/2018 Sampling, Quantization and Binary Encoding 12


10/23/2018 Sampling, Quantization and Binary Encoding 13
10/23/2018 Sampling, Quantization and Binary Encoding 14
• On the other hand, if the number of
samples is small with respect to the
frequency of the sinusoid then we are
in a situation such as that depicted in
this Figure.

In this case, not only does it seem difficult to reconstruct x(t), but the samples actually appear to fall on a
sinusoid with a lower frequency than the original. Thus, from the samples we would probably reconstruct the
lower frequency sinusoid. This phenomenon is called aliasing, since one frequency appears to be a different
frequency if the sampling rate is too low.
10/23/2018 Sampling, Quantization and Binary Encoding 15
10/23/2018 Sampling, Quantization and Binary Encoding 16
10/23/2018 Sampling, Quantization and Binary Encoding 17
10/23/2018 Sampling, Quantization and Binary Encoding 18
10/23/2018 Sampling, Quantization and Binary Encoding 19
10/23/2018 Sampling, Quantization and Binary Encoding 20
10/23/2018 Sampling, Quantization and Binary Encoding 21
10/23/2018 Sampling, Quantization and Binary Encoding 22
Quantization

10/23/2018 Sampling, Quantization and Binary Encoding 23


10/23/2018 Sampling, Quantization and Binary Encoding 24
10/23/2018 Sampling, Quantization and Binary Encoding 25
10/23/2018 Sampling, Quantization and Binary Encoding 26
10/23/2018 Sampling, Quantization and Binary Encoding 27
Analog-to-Digital Conversion, Digital-to-Analog
Conversion, and Quantization

10/23/2018 Sampling, Quantization and Binary Encoding 28


Three Processes in A/D Conversion
• Sampling: take samples at time nT
• T: sampling period;
• fs = 1/T: sampling frequency
• Quantization: map amplitude values into a set of discrete values kQ
• Q: quantization interval or stepsize
• Binary Encoding
• Convert each quantized value into a binary codeword

10/23/2018 Sampling, Quantization and Binary Encoding 29


How to determine T and Q?
• T (or fs) depends on the signal frequency range
• A fast varying signal should be sampled more frequently!
• Theoretically governed by the Nyquist sampling theorem
• fs > 2 fm (fm is the maximum signal frequency)
• For speech: fs >= 8 KHz; For music: fs >= 44 KHz;
• Q depends on the dynamic range of the signal amplitude and perceptual
sensitivity
• Q and the signal range D determine bits/sample R
• 2^R=D/Q
• For speech: R = 8 bits; For music: R =16 bits; (R: Resolution)
• One can trade off T (or fs) and Q (or R )
• lower R -> higher fs; higher R -> lower fs

10/23/2018 Sampling, Quantization and Binary Encoding 30


Uniform Quantization
• Applicable when the signal is in a
finite range (fmin, fmax)
• The entire data range is divided into
L equal intervals of length Q (known
as quantization interval or
quantization step-size)
• Q=(fmax-fmin)/L
• Interval i is mapped to the middle
value of this interval

10/23/2018 Sampling, Quantization and Binary Encoding 31


Example
• For the following sequence {1.2,-0.2,-0.5,0.4,0.89,1.3…}, Quantize it using a
uniform quantizer in the range of (-1.5,1.5) with 4 levels, and write the
quantized sequence.
• Solution: Q=(fmax-fmin)/L= 3/4=0.75. Quantizer is illustrated below

• Yellow dots indicate the partition levels (boundaries between separate


quantization intervals) Red dots indicate the reconstruction levels (middle
of each interval) 1.2 fall between 0.75 and 1.5, and hence is quantized to
1.125
• Quantized sequence: {1.125,-0.375,-0.375,0.375,1.125,1.125}

10/23/2018 Sampling, Quantization and Binary Encoding 32


Non-Uniform Quantization
• Problems with uniform quantization
• Only optimal for uniformly distributed signal
• Real audio signals (speech and music) are more concentrated near zeros
• Human ear is more sensitive to quantization errors at small values
• Solution
• Using non-uniform quantization
• quantization interval is smaller near zero

10/23/2018 Sampling, Quantization and Binary Encoding 33


Quantization: General Description

10/23/2018 Sampling, Quantization and Binary Encoding 34


Function Representation

10/23/2018 Sampling, Quantization and Binary Encoding 35


Binary Encoding
• Convert each quantized level index into a codeword consisting of
binary bits
• Ex: natural binary encoding for 8 levels:
• 000,001,010,011,100,101,110,111
• More sophisticated encoding (variable length coding)
• Assign a short codeword to a more frequent symbol to reduce average bit rate

10/23/2018 Sampling, Quantization and Binary Encoding 36


Example 1: uniform quantizer
• For the following sequence {1.2,-0.2,-0.5,0.4,0.89,1.3…}, Quantize it using a
uniform quantizer in the range of (-1.5,1.5) with 4 levels, and write the quantized
sequence and the corresponding binary bitstream.
• Solution: Q=3/4=0.75. Quantizer is illustrated below

• Codewords: 4 levels can be represented by 2 bits, 00, 01, 10, 11


• Quantized value sequence: {1.125,-0.375,-0.375,0.375,1.125,1.125}
• Bitstream representing quantized sequence: {11, 01, 01, 10, 11, 11}
10/23/2018 Sampling, Quantization and Binary Encoding 37
Example of a 2-bit flash ADC

10/23/2018 Sampling, Quantization and Binary Encoding 38


10/23/2018 Sampling, Quantization and Binary Encoding 39
10/23/2018 Sampling, Quantization and Binary Encoding 40
10/23/2018 Sampling, Quantization and Binary Encoding 41
10/23/2018 Sampling, Quantization and Binary Encoding 42
10/23/2018 Sampling, Quantization and Binary Encoding 43
10/23/2018 Sampling, Quantization and Binary Encoding 44
10/23/2018 Sampling, Quantization and Binary Encoding 45
Reference
• Chapter 5: Sampling and Quantization-
https://sisu.ut.ee/dev/sites/default/files/imageprocessing/files/digitiz
n.pdf
• Li Tan (2008), Digital Signal Processing : Fundamentals and
Applications, Academic Press: Chapter 2.

10/23/2018 Sampling, Quantization and Binary Encoding 46

You might also like