Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
8 views

Module 2 Note

Uploaded by

Chibuzor Egbo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Module 2 Note

Uploaded by

Chibuzor Egbo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

DIGITAL SIGNAL PROCESSING

ICE 517
MODULE 2
DIGITAL PROCESSING OF ANALOG
SIGNALS
Lecturer(s): Dr. A.A Adewale, Engr. Akua Collins
Learning Outcomes
 Define the following terms:
 Sampling, Sampling theorem, Quantization, Quantization noise,
Aliasing, Coding, Folding frequency,
 Draw the block diagram of the basic parts of an Analog-to-Digital
(A/D) Converter
 Solve problems involving folding frequency, conversion of analog
signals into digital signals, aliasing, resolution, quantization,
sampling rate and sampling frequency.
Analog-to-Digital & Digital-to-Analog
Conversion
 To process analog signals digitally, it must first be converted into
digital signals.
 The process of converting analog signals into digital signals is called
analog-to-digital conversion (this is carried out by the analog-to-
digital converter)
 The process of converting analog signals into digital signals follows
the following order:
 Sampling: This is the process of obtaining ‘samples’ of a
continuous-time (analog signal) at discrete-time instants.
A continuous time signal 𝑥𝑎 𝑡 , can be converted to discrete time
signal 𝑥(𝑛) by sampling. Hence 𝑥𝑎 𝑡 and 𝑥(𝑛) are related as
𝑥𝑎 𝑡 = 𝑥𝑎 𝑛𝑇 = 𝑥(𝑛)
Where T is the “sampling interval”, n= 0, 1,2,3…….
Sampling Analog Signals

 Sampling, for most part is done uniformly or periodically. The sampled


signal is represented thus:
𝑥 𝑛 = 𝑥𝑎 𝑛𝑇 , −∞ < 𝑛 < ∞
𝑥 𝑛 → Discrete-time signal obtained by taking samples of the analog signal
𝑥𝑎 𝑡 at regular intervals of time (in seconds).

𝑇 → Sampling period or sample interval (second)


1
𝐹𝑠 = → Sampling rate (samples/second) or (hertz)
𝑇

𝑛
𝑡 = 𝑛𝑇 =
𝐹𝑠
t → 𝐶𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠 − 𝑡𝑖𝑚𝑒
𝑇 → 𝑆𝑎𝑚𝑝𝑙𝑒 𝑖𝑛𝑡𝑒𝑟𝑣𝑎𝑙
𝑛 → 𝑆𝑎𝑚𝑝𝑙𝑒 𝑛𝑢𝑚𝑏𝑒𝑟
𝟏
Sampling rate 𝑭𝒔 =
𝒔𝒂𝒎𝒑𝒍𝒊𝒏𝒈 𝒊𝒏𝒕𝒆𝒓𝒗𝒂𝒍 𝑻

𝟏
𝑭𝒔 is also called sampling frequency. Since 𝒕 = 𝒏𝑻 and 𝑭𝒔 = , it
𝑻
𝒏
implies that 𝒕 = 𝒏𝑻 =
𝑭𝒔

 Quantization: This is the process of converting the sampled signal


(which is a discrete-time and continuous-valued signal) into a
discrete-time and discrete-valued (digital) signal.
 The quantizer converts the continuous amplitude signal to discrete
amplitude signal. Each sample is represented by fixed number of
digits in the processor, these digits determine the discrete amplitude
levels.
 Coding: Here, each sample (quantized) is represented by a b-bit
binary sequence or a unique binary code.
Relationship between frequency variable 𝑭 Ω for analog
signals and frequency variable 𝒇 (𝝎) for discrete-time signals

𝑥𝑎 𝑡 = 𝐴𝑐𝑜𝑠(2𝜋𝐹𝑡 + 𝜃)

When analog signal 𝑥𝑎 𝑡 is sampled at a rate:


1 𝑠𝑎𝑚𝑝𝑙𝑒𝑠
𝐹𝑠 =
𝑇 𝑠𝑒𝑐𝑜𝑛𝑑

2𝜋𝑛𝐹
𝑥𝑎 𝑛𝑇 ≡ 𝑥 𝑛 = 𝐴𝑐𝑜𝑠 2𝜋𝐹𝑛𝑇 + 𝜃 = 𝐴𝑐𝑜𝑠( + 𝜃)
𝐹𝑠

∴ Normalized Frequency (𝑓) of a discrete-time signal will be:


𝐹
𝑓= (1)
𝐹𝑠
• Where F- Frequency of continuous time signal
• 𝐹𝑠 - Sampling frequency
1
• Recall; 2𝜋𝑓 = 𝜔; 2𝜋𝐹 = Ω; 𝐹𝑠 =
𝑇
𝜔 Ω
∴ = ×𝑇
2𝜋 2𝜋

𝜔 = Ω𝑇 ……………………….. (2)
• Where
Ω → Frequency of continuous-time signal
𝜔 → Frequency of discrete-time signal
NOTE: The frequency (𝑓) is sometimes called the “relative or
normalized frequency”.
• Thus the frequency (𝐹) of the continuous-time signal can be
determined if the sampling frequency (𝐹𝑠 ) and the normalized or
relative frequency (𝑓) are known.
NOTE:
The sampling of a continuous-time signal;

𝑥𝑎 𝑡 = 𝐴𝑐𝑜𝑠 Ω𝑡 + 𝜃 = 𝐴𝑐𝑜𝑠 2𝜋𝐹𝑡 + 𝜃 ;

At a rate of:

1
𝐹𝑠 = ;
𝑇

Yields the discrete-time signal:

𝑥 𝑛 = 𝐴𝑐𝑜𝑠 𝜔𝑛 + 𝜃 = 𝐴𝑐𝑜𝑠(2𝜋𝑓𝑛 + 𝜃)

FOLDING FREQUENCY (𝐹𝑓𝑜𝑙𝑑 ) is the highest frequency of an analog signal


that can be sampled without any distortion (Aliasing). Folding frequency is also called
Nyquist frequency. At this frequency analog signals can be exactly reconstructed.
𝐹𝑠
𝐹𝑓𝑜𝑙𝑑 =
2
Where; 𝐹𝑠 → Sampling frequency
The term arises because reconstructed aliased frequencies are said to “fold” around
half the sampling frequency
Aliasing
Aliasing is a common problem in Digital Signal
Processing (DSP) that occurs when a continuous-
time signal is sampled at a rate lower than twice
its highest frequency component. This causes the
high-frequency components to appear as lower-
frequency ones, and distorting the original signal

Aliasing is an effect that causes different


signals to become indistinguishable from each other.
It happens when a signal is sampled at less than
double the highest frequency contained in the signal.
• To avoid aliasing
(i) Sampling must be done at greater than twice the
highest frequency of the continuous time signal
(ii) Pass the signal through a low pass filter or anti-
aliasing filter
The Sampling Theorem
Most analog signals can be represented as a sum of sinusoids of different amplitudes,
frequencies and phases as shown below:
𝑁

𝑥𝑎 𝑡 = ෍ 𝐴𝑖 cos 2𝜋𝐹𝑖 𝑡 + 𝜃𝑖
𝑖=1
𝑁 → 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡𝑠
To avoid the problem of aliasing, a sampling rate must be at least double of the
maximum or highest frequency
∴ 𝐹𝑠 ≥ 2𝐹𝑚𝑎𝑥
𝐹𝑠 = 𝑆𝑎𝑚𝑝𝑙𝑖𝑛𝑔 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦
𝐹𝑚𝑎𝑥 = 𝐻𝑖𝑔ℎ𝑒𝑠𝑡 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡 𝑖𝑛 𝑡ℎ𝑒 𝑎𝑛𝑎𝑙𝑜𝑔 𝑠𝑖𝑔𝑛𝑎𝑙

Sampling Theorem States that An analog signal can be completely represented in


its samples and exactly reconstructed or recovered back if the sampling frequency
𝑭𝒔 ≥ 𝟐𝑭𝒎𝒂𝒙
When the sampling rate 𝑭𝒔 = 𝟐𝑭𝒎𝒂𝒙 = 𝟐𝑩 it is called the “Nyquist rate”.
𝟏 𝟏
Where 𝑭𝒎𝒂𝒙 = B Nyquist interval = =
𝟐𝑩 𝟐𝑭𝒎𝒂𝒙
Can every sine wave be reconstructed from
its samples?
EXAMPLE 1
• Consider the anaolog signal
𝑥𝑎 𝑡 = 3𝑐𝑜𝑠 100𝜋𝑡
(i) Determine the minimum sampling rate required to
avoid aliasing
(ii) Suppose that the signal is sampled at the rate of 𝐹𝑆 =
20𝐻𝑧 . What is the discrete-time signal obtained after
samling
(iii) Suppose that the signal is sampled at the rate of
𝐹𝑆 = 75𝐻𝑧 . What is the discrete-time signal obtained
after sampling
𝐹𝑆
(iv) What is the frequency 0 < 𝐹 < of a sinusoid
2
that yields samples identical to those obtained in (iii)
• 𝑥𝑎 𝑡 = 𝐴𝑐𝑜𝑠 2𝜋𝐹𝑡
(1) 𝑥𝑎 𝑡 = 3𝑐𝑜𝑠 100𝜋𝑡 , 𝐹𝑆 ≥ 100 𝐻𝑧
(2) 𝑥𝑎 𝑡 = 𝑥𝑎 𝑛𝑇 = 𝐴𝑐𝑜𝑠 2𝜋𝐹𝑛𝑇
𝜋
• x 𝑛 = 3𝑐𝑜𝑠 𝑛
2
(3) 𝑥𝑎 𝑡 = 𝑥𝑎 𝑛𝑇 = 𝐴𝑐𝑜𝑠 2𝜋𝐹𝑛𝑇 (
50 4
• x 𝑛 = 3𝑐𝑜𝑠 2𝜋𝑛 × = 3𝑐𝑜𝑠 𝜋𝑛
75 3
2𝜋 2𝜋
3𝑐𝑜𝑠 (2𝜋 − )𝑛 = 3𝑐𝑜𝑠 𝑛
3 3
(4) 𝐹𝑆 = 75𝐻𝑧
Sinusiod which yields samples identical to
2𝜋 1
3𝑐𝑜𝑠 𝑛 . Note f =
3 3
𝐹 1
• 𝑓= , F = 𝑓 × 𝐹𝑆 = × 75 = 25 Hz
𝐹𝑆 3
• 𝑥𝑎 𝑡 = 𝐴𝑐𝑜𝑠 2𝜋𝐹𝑡 = 3𝑐𝑜𝑠 2𝜋 × 25𝑡
• 𝑥𝑎 𝑡 = 3𝑐𝑜𝑠 50𝜋𝑡
• Therefore 50 Hz is an alias of 25 Hz

EXAMPLE 2 : Consider the analog signal 𝑥𝑎 𝑡 =


3𝑐𝑜𝑠 50𝜋𝑡 + 10𝑠𝑖𝑛 300𝜋𝑡 − 𝑐𝑜𝑠 100𝜋𝑡
What is the Nyquist rate for this signal
EXAMPLE 3 : Consider the analog signal 𝑥𝑎 𝑡 =
3𝑐𝑜𝑠 2000𝜋𝑡 + 5𝑠𝑖𝑛 6000𝜋𝑡 +
10𝑐𝑜𝑠 12000𝜋𝑡
(1) What is the Nyquist rate of this signal
(2) Assuming signal is sampled using a sampling
rate 𝐹𝑆 = 5000 samples per second. What is the
discrete-time signal obtained after sampling
(3) what is the analog signal that can be
reconstructed from the samples if we use an
ideal interpolation
Quantization
 The process of converting a discrete-time continuous-amplitude
signal into a digital signal by expressing each sample value as a
finite (instead of infinite) number of digits is called quantization.
 The error introduced in representing the continuous-valued signal
by a finite set of discrete value is called “quantization error” or
“quantization noise”
Mathematically,
𝑥𝑞 𝑛 = 𝑄 𝑥 𝑛 ------------------------------ 1
𝑥𝑞 𝑛 → 𝑞𝑢𝑎𝑛𝑡𝑖𝑧𝑒𝑑 𝑠𝑎𝑚𝑝𝑙𝑒𝑑
𝑄𝑥 𝑛 → Quantization operation (on discrete-time,
continuous-amplitude signal
 The quantization error 𝑒𝑞 (𝑛) is a sequence represented by:

𝑒𝑞 𝑛 = 𝑥𝑞 𝑛 − 𝑥 𝑛
Example of a quantization process
Quantization and Encoding of
𝑥 𝑛 = 10(0.9)𝑛 into four digits
 Parameters
1 1
𝐹𝑠 = = = 1𝐻𝑧
𝑇 1
Number of samples 𝑛 = 10
 To quantize, we either discard (truncate) or round up (rounding)
e.g Truncate:
Real value = 7.29
Quantized value = 7
Round up:
Real value = 5.9049
Quantized value = 6
• Rounding and truncation were used to quantize the discrete-time
signals in the illustration in the previous slide.
• NOTE:
1) The values allowed in the digital signal are called
“quantization levels”.
2) The difference between (∆) two quantization levels is
called “quantization step” or ‘resolution”.
∆ ∆
But 𝑒𝑞 (𝑛) has the range (− ≤ 𝑒𝑞 (𝑛) ≤ )
2 2
This means that the quantization error [𝑒𝑞 (𝑛)] cannot be
greater than half the quantization step (∆).
𝑋𝑚𝑎𝑥 −𝑋𝑚𝑖𝑛
∴ Quantization step (∆) =
𝐿−1
𝑋𝑚𝑎𝑥 − 𝑋𝑚𝑖𝑛 (Maximum & minimum values of
𝑥 𝑛 𝐿 → 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 Quantization levels
For example:
𝑋𝑚𝑎𝑥 = 1; 𝑋𝑚𝑖𝑛 = 0; 𝐿 = 11
1−0 1
∴ ∆= = = 0.1
11 − 1 10
NOTE: 𝑋𝑚𝑎𝑥 − 𝑋𝑚𝑖𝑛 is called the “dynamic range”
Coding

 The coding process in an A/D converter gives a unique


binary number to each quantization level.
 If there are “L” levels, L different binary numbers are
needed to represent all quantized samples.
Therefore if ‘b’ bits are used to represent each sample,
then 2𝑏 different values can be coded.
∴ 2𝑏 ≥ 𝐿
𝑏𝐿𝑜𝑔22 ≥ 𝑙𝑜𝑔2 𝐿
𝑏𝑎𝑠𝑒 2 𝑠𝑖𝑛𝑐𝑒 𝑐𝑜𝑑𝑖𝑛𝑔 𝑖𝑠 𝑎 𝑠𝑒𝑟𝑖𝑒𝑠 𝑜𝑓 1(𝑠 𝑎𝑛𝑑 0(𝑠))
𝑏 = 𝑙𝑜𝑔2 𝐿
From example given:
𝐿 = 11
∴ 𝑏 ≥ 𝐿𝑜𝑔211
but: 2𝑥 = 11
𝐿𝑜𝑔11
𝑥=
𝐿𝑜𝑔2
𝑥 = 3.45
23.45
∴ 𝑏 ≥ 𝐿𝑜𝑔2
𝑏 ≥ 3.45
𝑏 ≥ 4𝑏𝑖𝑡𝑠
Digital-to-Analog Conversion
 The simplest D/A converter is the zero-order hold. It holds the
value of one sample until the next one is received.
 Linear interpolation techniques can also be used to connect
consecutive samples with straight lines.
 One of the most practical ways to convert digital signals to analog
signals is by passing interpolated signals through a low pass filter
(post-filter or smoothing filter).
TUTORIAL QUESTIONS
 A signal 𝑥𝑎 𝑡 = 10𝑐𝑜𝑠2𝜋 1000 𝑡 + 5𝑐𝑜𝑠2𝜋 5000𝑡 is to be
sampled
(1) Calculate the signal’s Nyquist rate?
(2) Do you think this signal will be reconstructed from its samples, if
sampled at 4𝑘𝐻𝑧. Justify your answer
 A digital communication link carries binary coded representing
samples of an input signal 𝑥𝑎 𝑡 = 6𝑐𝑜𝑠200𝜋𝑡 + 5 cos 400𝜋𝑡 . The
link is operated at 10,000 bits/sec and each input sample is quantized
into 1024 different voltage levels.
(1) Calculate the sampling and folding frequency
(2) Compute the Nyquist rate
(3) What is the resolution?
 Mathematically show that:
∆2
1. The Mean-Square Error power (𝑃𝑞 ) =
12
3
2. The Signal-to-Quantization noise ratio (SQNR) = (2𝑏 )
2
3. The Signal-to-Quantization noise ratio in decibels (dB) = 1.76 +
6.02𝑏

You might also like