Lecture-3,4
Digital Signal Processing
Md. Rakibul Islam
Lecturer, Dept. of CSE
Varendra University
Today’s Topics
• Concepts of Frequency in Analog and Discrete
signal
Analog and Discrete signal
Analog Signal:
An analog signal is a continuous waveform that varies smoothly over
time.
It can take any value within a given range, and the information it carries
is represented by the amplitude of the signal at any given point in time.
Common examples of analog signals include electrical voltage,
current, and sound waves.
Analog signals are susceptible to noise and interference during
transmission, and their quality can degrade over long distances.
Discrete Signal:
A discrete signal is a type of signal that is represented by a sequence of
distinct values at specific points in time.
Unlike analog signals, discrete signals do not have a continuous range of
values; instead, they have separate, well-defined levels.
Examples of discrete signals include digital signals used in
computers, digital audio recordings, and digital video.
Discrete signals are less susceptible to noise and interference compared
to analog signals, making them more robust in certain applications.
The Concept of Frequency in Analog Signal
Continuous-Time Sinusoidal Signals (Analog
Signals)
– A simple harmonic oscillation is mathematically described by:
𝑥 ( 𝑡 ) = 𝐴𝑐𝑜𝑠 ( Ω 𝑡 + 𝜃 ) − ∞ <𝑡 < ∞
𝑎
Analog signal Phase in rad
Amplitude of the sinusoid Frequency in rad/s
– Instead of , we often use
– Thus,
𝑥 𝑎 ( 𝑡 ) = 𝐴𝑐𝑜𝑠 ( 2 𝜋 𝐹𝑡 +𝜃 ) − ∞ <𝑡 < ∞
The Concept of Frequency in Analog Signal
The above signal is characterized by the following
properties:
– For every fixed value of the frequency F, xa(t) is periodic, i.e.
xa(t+Tp) = xa(t), where Tp = 1/ F is the fundamental period of the
sinusoidal signal.
– Continuous-time sinusoidal signals with distinct (different)
frequencies are themselves distinct.
– Increasing the frequency F results in an increase in the rate of
oscillation of the signal
The Concept of Frequency in Discrete Signal
Discrete-Time Sinusoidal Signals (Digital Signals)
– A discrete-time sinusoidal signal may be expressed as :
𝑥 ( 𝑛 ) = 𝐴𝑐𝑜𝑠 ( 𝜔 𝑛+ 𝜃 ) − ∞ <𝑛< ∞
Discrete signal Phase in rad
Amplitude of the sinusoid Frequency in rad/sample
– where n is an integer variable, called the sample number
– Instead of , we often use
– Thus,
𝑥 ( 𝑛 ) = 𝐴𝑐𝑜𝑠 ( 2 𝜋 𝑓𝑛+ 𝜃 ) − ∞< 𝑛< ∞
The Concept of Frequency in Discrete Signal
𝑥 ( 𝑛 ) = 𝐴𝑐𝑜𝑠 ( 𝜔 𝑛+ 𝜃 ) − ∞ <𝑛< ∞
• Example:
– Consider the above signal with rads/sample ( and phase
The Concept of Frequency in Discrete Signal
𝑥 ( 𝑛 ) = 𝐴𝑐𝑜𝑠 ( 2 𝜋 𝑓𝑛+ 𝜃 ) − ∞< 𝑛< ∞
Properties:
A discrete-time sinusoid is periodic only if its frequency f is a rational
number; i.e., x(n+N) = x(n). Thus,
The above relation is true if and only if there exist an integer k
such that
i.e., ;
Then the fundamental period of the sinusoid is equal to N
Discrete-time sinusoids whose frequencies are separated by an integer
multiple of 2 are identical.
The highest rate of oscillation in a discrete-time sinusoid is attained when
( = (or ( = -) or, equivalently, f = 1/2 (or f = -1/2).
The Concept of Frequency in Discrete Signal
0 = 2
Some Problems and Solutions
Q-1: Draw 1Hz, 2Hz and 4Hz Signals
Some Problems
• Q-2: Determine whether or not each of the
following signals is periodic. In case a signal is
periodic, specify its fundamental period.
(a) xa(t) = 3 cos(5t + /6)
(b) x(n) = 3 cos(5n + /6)
(c) x(n) = cos(n/8) cos(n/8)
(d) x(n) = cos(n/2) - sin(n/8) + 3cos(n/4 + /3)
For Discrete Signal:
For Analog Signal:
Then the fundamental period of the
sinusoid is equal to N
Solution
16
Analog-to-Digital Conversion
Most of the signal are analog such as:
Speech, biological signals, seismic signals, radar signals, sonar signals, and various communications
signals such as audio and video signals.
To process analog signals by digital means, first it is necessary to convert them into
digital form.
This procedure is called analog-to-digital (A/D) conversion, and the corresponding
devices are called A/D converters (ADCs).
Basic parts of A/D converter
Analog-to-Digital Conversion
Sampling of Analog Signal:
The conversion of a continuous-
time (analog) signal into a discrete-
time signal.
By taking "samples" of the
continuous-time signal at discrete-
time instants.
Taking a sample of analog signal
xa(t) at every T seconds (sampling
interval or sampling period)
x(n) = xa(nT), -∞ < n < ∞
We can write, 1/T = Fs
Fs is known as the sampling rate
(samples per second) or the sampling
frequency (hertz)
Analog-to-Digital and Digital-to-Analog Conversion
Relationship between the time variables t and n of continuous-time and discrete-time signals:
These variables are linearly related through the sampling period T or, Fs = 1/T
t = nT = n / Fs
As a consequence, there exists a relationship between the frequency variable F for analog
signals and the frequency variable f for discrete-time signals.
To establish this relationship,
which, when sampled periodically at a rate Fs = 1 / T samples per second, yields
𝑥 𝑎 ( 𝑛𝑇 )=𝑥 ( 𝑛 )= 𝐴𝑐𝑜𝑠 ( 2 𝜋 𝐹𝑛𝑇 + 𝜃 ) = 𝐴𝑐𝑜𝑠
Again, we know that,
( 2 𝜋 𝑛𝐹
𝐹𝑠 )
+ 𝜃 (1)
𝑥 ( 𝑛 ) = 𝐴𝑐𝑜𝑠 ( 2 𝜋 𝑓𝑛+ 𝜃 ) ( 2)
𝐹
Thus, from (1) and (2), we can write: 𝑓=
𝐹𝑠
Therefore f is a relative or normalized frequency.
We can use f to determine the frequency F in hertz only if the sampling frequency Fs is
known. (What will be the rate of Fs?)
We know that, -1/2 < f < 1/2. Thus, -Fs/2 ≤ F ≤ Fs/2. Thus, Fmax ≤ Fs/2
Analog-to-Digital and Digital-to-Analog Conversion
• Any analog signal can be represented as a sum of sinusoids of
different amplitudes, frequencies, and phases, that is,
𝑁
𝑥 𝑎 ( 𝑡 ) =∑ 𝐴𝑖 𝑐𝑜𝑠 ( 2 𝜋 𝐹 𝑖 𝑡 +𝜃𝑖 )
𝑖=1
• Thus, there is a frequency in above signal known as Fmax.
• To avoid the ambiguities resulting from aliasing, we must select the
sampling rate to be sufficiently high. Thus, Fmax ≤ Fs / 2 or Fs > 2Fmax
Sampling Theorem:
If the highest frequency contained in an analog signal xa(t) is Fmax
= B and the signal is sampled at a rate Fs > 2Fmax 2B, then xa(t)
can be exactly recovered from its sample values using the
interpolation function.
The sampling rate F = 2B = 2F is called the Nyquist rate.
Quiz-1
• Q-1: Consider the analog signal
What is the Nyquist rate for this signal?
• Solution:
The frequencies present in the signal above are
F1 =25 Hz, F2 = 150 Hz, F3 = 50Hz
Thus Fmax = 150 Hz , since,
Fs > 2Fmax = 300 Hz
The Nyquist rate is FN = 2Fmax .
Hence, FN = 300 Hz
Quantization of Continuous-Amplitude Signals
• The process of converting a discrete-time continuous-
amplitude signal into a digital signal by expressing each
sample value as a finite (instead of an infinite) number of
digits is called quantization.
• The error introduced in representing the continuous-
valued signal by a finite set of discrete value levels is
called quantization error or quantization noise.
• We denote the quantizer operation on the samples x(n) as
Q[x(n)] and let xq(n) denote the sequence of quantized
samples at the output of the quantizer. Hence
• Then the quantization error is a sequence eq(n) defined as:
Quantization of Continuous-Amplitude Signals
• Consider the following discrete-time signal (Fig(a)):
Fig(b) illustrates the quantization process.
Quantization Error
• Quantization error is illustrated by the following Table:
• If xmin and xmax represent the minimum and maximum values of x(n) and L is the number
of quantization levels. The range xmax – xmin is called the dynamic range of the signal.
• Quantization step size is defined: 𝑥𝑚𝑎𝑥 − 𝑥𝑚𝑖𝑛
∆=
𝐿− 1
Sampling and Quantization of Sinusoidal Signal
Coding of Quantized Samples
• The coding process in an A/D converter assigns a
unique binary number to each quantization level.
• If we have L levels we need at least L different
binary numbers (codes).
• With a word length of b bits we can create 2b
different binary numbers.
• Hence, we have 2b L, or equivalently, b
log2L.
• Thus the number of bits required in the coder is the
smallest integer greater than or equal to log 2 L.
Coding of Quantized Samples
7
6
5
4
3
2
1
0
Next Class
Discrete-Time Signals
Elementary Discrete-Time Signals
Classification of Discrete-Time Signals
Acknowledgement
Professor Dr. Dipankar Das
Department of ICE, RU