You are on page 1of 14

11/7/2021

Digital Signal Processing


(EE-493)
Week-3 (Lect. 1&2)

Resource Persons:
Prof. Dr. Saad Ahmed Qazi
Dr. Krishan Lal Khatri

Summary of Previous Lecture


• Concepts of frequency in CT signals ‘F in Hz’ and that in DT ‘fd’ in
Cycles/sample and their relationship
• Not DT sinusoid is periodic – only those where fd is a rational number
   
1 1
  fd 
2 2

1
11/7/2021

Analog to Digital Conversion (ADC)


• Sampling: A process to convert a CTCV signal into DTCV signal.
• Quantization: A process to convert a DTCV signal into a DTDV signal.
• Coding: Output will be a bit stream like 0010100011101010….

Sampling of an Analog Signal


Sampling is performed to convert an analog (CT) signal into DT signal. It
is like passing a CT through a switch that turns on an off at constant
frequency.
Mathematically,
𝑥 𝑛 = 𝑥 𝑛𝑇
Where,
𝑛 = 0,±1, ±2, ±3, … .
𝑇 = Sampling Period, which is, the time period of oscillation of the
switch

2
11/7/2021

Sampling of an Analog Signal


The sampling frequency is defined as,
1
𝐹 =
𝑇
It is also called sampling rate and measured in samples/second
Let’s see how 𝑓 is related to 𝐹
Consider an analog sinusoid given by,
𝑥 (𝑡) = Cos(2π𝐹𝑡)
When this signal is samples at sampling frequency 𝐹 ,
𝑥 𝑛𝑇 = 𝑥 𝑛 = Cos 2π𝐹𝑛𝑇

Sampling of an Analog Signal


𝐹
𝑥 𝑛 = Cos2π 𝑛 → (1)
𝐹
Since we know that a DT sinusoid is given by,
𝑥 𝑛 = Cos 2π𝑓 𝑛 → 2

𝐹
𝑓 = → 3
𝐹
𝑐𝑦𝑐𝑙𝑒𝑠
𝑐𝑦𝑐𝑙𝑒𝑠 𝐹( )
𝑓( )= 𝑠𝑒𝑐𝑜𝑛𝑑
𝑠𝑎𝑚𝑝𝑙𝑒 𝑠𝑎𝑚𝑝𝑙𝑒𝑠
𝐹( )
𝑠𝑒𝑐𝑜𝑛𝑑
6

3
11/7/2021

Sampling of an Analog Signal


From Eq. (3),
𝐹 = 𝐹𝑓
Recall,
1 1
− ≤𝑓 ≤
2 2
Thus,
𝐹 𝐹
− ≤𝐹≤
2 2
Since the highest frequency in DT signal is ½, the highest analog frequency
corresponding to a given sampling frequency𝐹 is,
𝐹
𝐹 ≤
2
7

Sampling of an Analog Signal


𝐹
𝐹 ≤
2

⇒ 𝐹 ≥ 2𝐹
This minimum value of 𝐹 , which is at least twice of the highest
frequency in analog signal, is known as Nyquist Frequency or Nyquist
rate. If an analog signal is sampled below Nyquist Frequency, there will
be errors in corresponding DT signal.
This process of errors in DT signal when corresponding analog signal is
sampled at the rate below Nyquist Rate is known as Aliasing
8

4
11/7/2021

Solved Examples in Sampling

Sampling

10

10

5
11/7/2021

Sampling

11

11

Aliasing
It is an effect that causes different signals to become
indistinguishable (or aliases of one another) when sampled.
It also refers to the distortion or artifact that results when the
signal reconstructed from samples is different from original CT
signal

12

12

6
11/7/2021

Aliasing
• Illustration of Aliasing

13

13

Example
Consider 𝑥 𝑡 = 3 cos 100𝜋𝑡 , compute,
a) Minimum Fs required
b) If Fs = 200 Hz, what is DT signal
c) If Fs = 75 Hz, what is DT signal
d) What is the frequency F of an sinusoid that yields samples identical
to those obtained in part (c) ?

14

14

7
11/7/2021

Solution:

15

15

Sampling

16

16

8
11/7/2021

Sampling

17

17

A/D Conversion

Quantizer

18

9
11/7/2021

Quantization
Quantization:
The process of converting a CVDT signal into a digital signal by
expressing each sample value as a finite (instead of infinite)
number of digits is called quantization.
Quantization Error:
It is the error introduced in representing a CV signal by a finite
set of discrete value levels. Also called Quantization Noise

19

Quantization Operator
The quantizing operation on a DT signal 𝑥 𝑛 is denoted as,
𝑥 𝑛 = Q[𝑥 𝑛 ]
Where, 𝑥 𝑛 is a quantized signal

20

10
11/7/2021

Quantization Error
Quantization error is the difference between quantized value and
actual sample value, i.e.

𝑒 𝑛 = 𝑥 𝑛 − 𝑥(𝑛)

21

Quantization Error Example

22

11
11/7/2021

23

Quantization Step: The difference between two successive


quantization levels is called quantization step size, or resolution,
denoted by Δ.
And, in case of rounding
Δ Δ
− ≤𝑒 𝑛 ≤
2 2

24

12
11/7/2021

More about Resolution


Mathematically,

Where,
= Highest level
= lowest level
= Number of quantization levels
= dynamic range

25

Coding
• In the last step, each step is communicated in terms of a binary
number
• For ‘L’ number of levels, you would need
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑖𝑡𝑠 ≥ 𝑙𝑜𝑔 𝐿

26

13
11/7/2021

Exercises
n
Ex 1.13 x ( n )  6.35 cos
is quantized with a resolution (a) Δ=0.1 or (b) Δ=0.2.
10
How many bits are required in the A/D converter in each case?

Ex 1.14 Determine the bit rate and resolution in the sampling of a signal with
dynamic range of 1 volt if Fs is 20 samples/sec and we use an 8-bit A/D converter. What
maximum frequency can be present in the signal?

27

27

Reading
Reading Assignment from DSP Text Book by Proakis, 4th Edition:
• Chapter 1: Introduction
• Section 1.1,
• Section 1.2,
• Section 1.3 except 1.3.3,
• Section 1.4 except 1.4.4, 1.4.5, 1.4.6 and 1.4.7

Examples:
• 1.4.1, 1.4.2, 1.4.3, 1.4.4

• End of Chapter Problems:


• All except 1.15 and 1.16.

28

14

You might also like