EC3492 - DIGITAL SIGNAL PROCESSING Notes - by WWW - Notesfree.in
EC3492 - DIGITAL SIGNAL PROCESSING Notes - by WWW - Notesfree.in
in
.in
(2021-22)
Prepared by
e
fre
Mr. R.RADHAKRISHNAN,
Assistant professor
tes
Department of Electronics and Communication
Engineering
No
w.
ww
www.Notesfree.in
www.Notesfree.in
.in
To Master the representation of discrete-time signals in the frequency domain,
using z- transform, discrete Fourier transforms (DFT).
To Understand the implementation of the DFT in terms of the FFT, as well as
some of its applications (computation of convolution sums, spectral analysis).
To learn the basic design and structure of FIR and IIR filters with desired
e
frequency responses and design digital filters.
The impetus is to introduce a few real-world signal processing applications.
fre
To acquaint in FFT algorithms, Multi-rate signal processing techniques and finite
word length effects.
UNIT I:
Introduction to Digital Signal Processing: Introduction to Digital Signal Processing:
tes
Discrete Time Signals & Sequences, Linear Shift Invariant Systems, Stability, and
Causality,
Realization of Digital Filters: Solution of Difference Equations Using Z-Transform,
Realization of Digital Filters - Direct, Canonic forms.
No
UNIT II:
Discrete Fourier Transforms: Properties of DFT. Linear Convolution of Sequences using
DFT. Computation of DFT: Over-lap Add Method, Over-lap Save Method.
Fast Fourier Transforms: Fast Fourier Transforms (FFT) - Radix-2 Decimation-in-Time
and Decimation-in-Frequency FFT Algorithms, Inverse FFT.
w.
UNIT III:
IIR Digital Filters: Analog Filter Approximations - Butterworth and Chebyshev, Design
of IIR Digital filters from Analog Filters, Bilinear Transformation Method.
UNIT IV:
ww
FIR Digital Filters: Characteristics of FIR Digital Filters. Design of FIR Filters: using
Window Techniques, Comparison of IIR & FIR filters.
UNIT V:
Multirate Digital Signal Processing: Introduction, Down sampling, Decimation, Up
sampling, Interpolation, Sampling Rate Conversion, Applications of Multi Rate Signal
Processing..
TEXT BOOKS:
1. Digital Signal Processing, Principles, Algorithms, and Applications: John G. Proakis,
Dimitris G. Manolakis, Pearson Education / PHI, 2007.
2. Discrete Time Signal Processing – A. V. Oppenheim and R.W. Schaffer, PHI, 2009.
3. Fundamentals of Digital Signal Processing – Loney Ludeman, John Wiley, 2009
REFERENCE BOOKS:
www.Notesfree.in
www.Notesfree.in
.in
OUTCOMES
On completion of the subject the student must be able to:
Perform time, frequency and z-transform analysis on signals and systems
e
Understand the inter relationship between DFT and various transforms
Understand the significance of various filter structures and effects of rounding
errors fre
Design a digital filter for a given specification
Understand the fast computation of DFT and Appreciate the FFT processing
Understand the trade-off between normal and multi rate DSP techniques and
finite length word effects
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
1.1 INTRODUCTION
.in
Signals constitute an important part of our daily life. Anything that carries some information
is called a signal. A signal is defined as a single-valued function of one or more independent
variables which contain some information. A signal is also defined as a physical quantity that varies
with time, space or any other independent variable. A signal may be represented in time domain or
frequency domain. Human speech is a familiar example of a signal. Electric current and voltage are
e
also examples of signals. A signal can be a function of one or more independent variables. A signal
may be a function of time, temperature, position, pressure, distance etc. If a signal depends on only
one independent variable, it is called a one- dimensional signal, and if a signal depends on two
fre
independent variables, it is called a two- dimensional signal.
A system is defined as an entity that acts on an input signal and transforms it into an output
signal. A system is also defined as a set of elements or fundamental blocks which are connected
together and produces an output in response to an input signal. It is a cause-and- effect relation
between two or more signals. The actual physical structure of the system determines the exact
relation between the input x (n) and the output y (n), and specifies the output for every input.
tes
Systems may be single-input and single-output systems or multi-input and multi-output systems.
Signal processing is a method of extracting information from the signal which in turn depends
on the type of signal and the nature of information it carries. Thus signal processing is concerned
with representing signals in the mathematical terms and extracting information by carrying out
algorithmic operations on the signal. Digital signal processing has many advantages over analog
No
Digital processing of a signal facilitates the sharing of a single processor among a number of
signals by time sharing. This reduces the processing cost per signal.
Digital implementation of a system allows easy adjustment of the processor characteristics
during processing.
Linear phase characteristics can be achieved only with digital filters. Also multirate processing
ww
is possible only in the digital domain. Digital circuits can be connected in cascade without any
loading problems, whereas this cannot be easily done with analog circuits.
Storage of digital data is very easy. Signals can be stored on various storage media such as
magnetic tapes, disks and optical disks without any loss. On the other hand, stored analog signals
deteriorate rapidly as time progresses and cannot be recovered in their original form.
Digital processing is more suited for processing very low frequency signals such as seismic
signals.
Though the advantages are many, there are some drawbacks associated with processing a
signal in digital domain. Digital processing needs ‘pre’ and ‘post’ processing devices like analog-to-
digital and digital-to-analog converters and associated reconstruction filters. This increases the
complexity of the digital system. Also, digital techniques suffer from frequency limitations. Digital
systems are constructed using active devices which consume power whereas analog processing
algorithms can be implemented using passive devices which do not consume power. Moreover,
active devices are less reliable than passive components. But the advantages of digital processing
techniques outweigh the disadvantages in many applications. Also the cost of DSP hardware is
decreasing continuously. Consequently, the applications of digital signal processing are increasing
rapidly.
www.Notesfree.in
www.Notesfree.in
The digital signal processor may be a large programmable digital computer or a small
microprocessor programmed to perform the desired operations on the input signal. It may also be
a hardwired digital processor configured to perform a specified set of operations on the input
signal.
DSP has many applications. Some of them are: Speech processing, Communication, Biomedical,
Consumer electronics, Seismology and Image processing.
The block diagram of a DSP system is shown in Figure 1.1.
.in
Figure 1.1 Block diagram of a digital signal processing system.
In this book we discuss only about discrete one-dimensional signals and consider only single-
input and single-output discrete-time systems. In this chapter, we discuss about various basic
e
discrete-time signals available, various operations on discrete-time signals and classification of
discrete-time signals and discrete-time systems.
fre
1.2 REPRESENTATION OF DISCRETE-TIME SIGNALS
Discrete-time signals are signals which are defined only at discrete instants of time. For those
signals, the amplitude between the two time instants is just not defined. For discrete- time signal
the independent variable is time n, and it is represented by x (n).
There are following four ways of representing discrete-time signals:
tes
1. Graphical representation
2. Functional representation
3. Tabular representation
4. Sequence representation
No
www.Notesfree.in
www.Notesfree.in
.in
Another example is:
e
1.2.3 Tabular Representation
fre
In this, the sampling instant n and the magnitude of the signal at the sampling instant are represented
in the tabular form. The signal given in section 1.2.1 can be represented in tabular form as follows:
n 2 1 0 1 2 3
tes
x (n) 3 2 0 3 1 2
1.2.4 Sequence Representation
A finite duration sequence given in section 1.2.1 can be represented as follows:
−3,2,0,3,1,2
X(n) = { }
No
𝗍
Another example is:
…2,3,0,1,−2…
X(n) = { 𝗍 }
The arrow mark 𝗍 denotes the n = 0 term. When no arrow is indicated, the first term corresponds
w.
to n = 0.
So a finite duration sequence, that satisfies the condition x(n) = 0 for n < 0 can be represented as:
x(n) = {3, 5, 2, 1, 4, 7}
ww
www.Notesfree.in
www.Notesfree.in
There are several elementary signals which play vital role in the study of signals and systems.
These elementary signals serve as basic building blocks for the construction of more complex
signals. Infact, these elementary signals may be used to model a large number of physical signals,
which occur in nature. These elementary signals are also called standard signals.
The standard discrete-time signals are as follows:
1. Unit step sequence
2. Unit ramp sequence
3. Unit parabolic sequence
4. Unit impulse sequence
5. Sinusoidal sequence
6. Real exponential sequence
.in
7. Complex exponential sequence
e
The step sequence is an important signal used for analysis of many discrete-time systems. It exists
only for positive time and is zero for negative time. It is equivalent to applying a signal whose
amplitude suddenly changes and remains constant at the sampling instants forever after application.
The usefulness of the unit-step function lies in the fact that if we want a sequence to start at
n = 0, so that it may have a value of zero for n < 0, we only need to multiply the given sequence
with unit step function u (n).
tes
The discrete-time unit step sequence u (n) is defined as:
1 𝑓𝑜𝑟 𝑛 ≥ 0
{
U (n) = 0 𝑓𝑜𝑟 𝑛 < 0
The shifted version of the discrete-time unit step sequence u(n – k) is defined as:
1 𝑓𝑜𝑟 𝑛 ≥ 𝑘
No
U (n - k) = {0 𝑓𝑜𝑟 𝑛 < 𝑘
Figure 1.3
ww
Discrete–time (a) Unit step function (b) Shifted unit step function
The discrete-time unit ramp sequence r (n) is that sequence which starts at n = 0 and increases
linearly with time and is defined as:
𝑛 𝑓𝑜𝑟 𝑛 ≥ 0
r(n) = {0 𝑓𝑜𝑟 𝑛 < 0
or r(n) = nu(n)
The graphical representation of r(n) and r(n – 2) is shown in Figure 1.4[(a) and (b)].
Figure 1.4 Discrete–time (a) Unit ramp sequence (b) Shifted ramp sequence.
.in
𝑛2
𝑓𝑜𝑟 𝑛 ≥ 0
P (n) = { 2
0 𝑓𝑜𝑟 𝑛 < 0
2
Or P(n) = 𝑁 u(n)
2
e
The shifted version of the discrete-time unit parabolic sequence p(n – k) is defined as:
(𝑛−𝑘)2
𝑓𝑜𝑟 𝑛 ≥ 𝑘
Or
fre
P(n – k) = {
0
2
2
p(n – k) = (𝑛−𝑘 ) u(n – k)
2
𝑓𝑜𝑟 𝑛 < 𝑘
The graphical representation of p(n) and p(n – 3) is shown in Figure 1.5[(a) and (b)].
tes
No
w.
Figure 1.5 Discrete–time (a) ParaboFic sequence (b) Shifted paraboFic sequence.
𝛿 (𝑛) = {
0 𝑓𝑜𝑟 𝑛 ≠ 0
This means that the unit sample sequence is a signal that is zero everywhere, except at n = 0, where its
value is unity. It is the most widely used elementary signal used for the analysis of signals and systems.
Figure 1.6 Discrete–time (a) Unit sample sequence (b) Delayed unit sample sequence.
www.Notesfree.in
www.Notesfree.in
1 𝑓𝑜𝑟 𝑛 = 𝑘
1. (n) = u(n) – u(n – 1) 2. (n – k) = { 0
𝑓𝑜𝑟 𝑛 ≠ 𝑘
∞
3. X(n) = ∑𝑘=
∞
−∞ 𝑥(𝑘)𝛿 (𝑛 − 𝑘) 4. ∑ 𝑛= −∞ (𝑛)𝛿 (𝑛 − 𝑛0 ) = x(n0)
Relation Between The Unit Sample Sequence And The Unit Step Sequence
The unit sample sequence (n) and the unit step sequence u(n) are related as:
U(n) = ∑𝑚=0
𝑛 𝛿 (𝑚), 𝛿(n) = u(n) – u(n - 1)
.in
Sinusoidal Sequence
The discrete-time sinusoidal sequence is given by
X(n) = A sin (𝜔𝑛 + ∅)
e
Where A is the amplitude, is angular frequency, is phase angle in radians and n is an integer.
All continuous-time sinusoidal signals are periodic, but discrete-time sinusoidal sequences may
tes
or may not be periodic depending on the value of.
For a discrete-time signal to be periodic, the angular frequency must be a rational multiple of 2.
The graphical representation of a discrete-time sinusoidal signal is shown in Figure 1.7.
No
(d)].
www.Notesfree.in
www.Notesfree.in
e .in
Figure 1.8 Discrete-time exponential signal an for (a) a > 1 (b) 0 < a < 1 (c) a < -1 (d) -1 < a < 0.
1.3.7 Complex Exponential Sequence
fre
The discrete-time complex exponential sequence is defined as:
(a) ∑∞
𝑛= −∞ 𝑒 𝛿 (𝑛 − 3)
3𝑛 (b) ∑∞
𝑛= − ∞ 𝛿 (𝑛 − 2) cos 3𝑛
w.
ww
Figure 1.9 complex exponential sequence x(n) = anej(𝜔0 𝑛 + ∅) for (a)a > 1 (b) a < 1.
2
(c ) ∑∞
𝑛= −∞ 𝑛 𝛿 (𝑛 + 4) (d)∑𝑛= −∞ (n – 2)𝑒
2 ∞ 𝑛
(e) ∑𝑛=0
∞ 𝛿 (𝑛 + 1) 4𝑛
Solution:
www.Notesfree.in
www.Notesfree.in
∑ 𝑒3𝑛 𝛿 (𝑛 − 3) = [𝑒3𝑛]=3 = 𝑒9
𝑛=−∞
(a) Given ∑∞𝑛=−∞ (𝑛 − 2) cos 3𝑛
.in
(b) Given ∑𝑛=−∞
∞ 𝑛2 (𝑛 = 4)
1 𝑓𝑜𝑟 𝑛 = −4
We know that (𝑛 = 4) = {
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
∞
e
∑ 2𝛿(𝑛 = 4) = [𝑛2]𝑛=−4 = 16
𝑛=𝑛−∞
(c) Given
We know that
∑𝑛=−∞
∞
fre
(𝑛 − 2)𝑒𝑛
(𝑛 − 2) = {
∞
2
1 𝑓𝑜𝑟 𝑛 = 2
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
2 2
𝑛 2
∑ (𝑛 − 2)𝑒𝑛 = [𝑒 ]=2 = 𝑒2 = 𝑒4
tes
𝑛=−∞
(d) Given ∑∞
𝑛=0 (𝑛 = 1)4𝑛
1 𝑓𝑜𝑟 𝑛 = −1
We know that (𝑛 = 1) = {
0 𝑓𝑜𝑟 𝑛 ≠ −1
∞
No
∑ (𝑛 + 1)4𝑛 = 0
𝑛=0
When we process a sequence, this sequence may undergo several manipulations involving the
independent variable or the amplitude of the signal.
w.
5. Signal addition
6. Signal multiplication
The first three operations correspond to transformation in independent variable n of a signal.
The last three operations correspond to transformation on amplitude of a signal.
1.4.1 Time Shifting
The time shifting of a signal may result in time delay or time advance. The time shifting operation
of a discrete-time signal x(n) can be represented by
y(n) = x(n – k)
This shows that the signal y (n) can be obtained by time shifting the signal x(n) by k units. If k is
positive, it is delay and the shift is to the right, and if k is negative, it is advance and the shift is to
the left.
www.Notesfree.in
www.Notesfree.in
An arbitrary signal x(n) is shown in Figure 1.10(a). x(n – 3) which is obtained by shifting
x(n) to the right by 3 units (i.e. delay x(n) by 3 units) is shown in Figure 1.10(b). x(n + 2) which
is obtained by shifting x(n) to the left by 2 units (i.e. advancing x(n) by 2 units) is shown in
Figure 1.10(c).
.in
Figure 1.10 (a) Sequence x(n) (b) x(n – 3) (c) x(n + 2).
1.4.2 Time Reversal
The time reversal also called time folding of a discrete-time signal x(n) can be obtained by
e
foldingthe sequence about n = 0. The time reversed signal is the reflection of the original
signal. It is obtained by replacing the independent variable n by –n. Figure 1.11(a) shows an
arbitrary discrete-time signal x(n), and its time reversed version x(–n) is shown in Figure 1.11(b).
fre
tes
Figure 1.11[(c) and (d)] shows the delayed and advanced versions of reversed signal x(–n).
The signal x(–n + 3) is obtained by delaying (shifting to the right) the time reversed
signal x(–n) by 3 units of time. The signal x(–n – 3) is obtained by advancing (shifting to the
left) the time reversed signal x(–n) by 3 units of time.
Figure 1.12 shows other examples for time reversal of signals
No
Figure 1.11 (a) Original signal x(n) (b) Time reversed signal x(-n) (c) Time reversed and
delayed
signal x(-n+3) (d) Time reversed and advanced signal x(-n-3).
www.Notesfree.in
www.Notesfree.in
.in
Figure 1.12 Time reversal operations.
e
and then multiplying these sequences element by element to obtain u(n + 2) u(–n + 3) as
shown in Figure 1.13(c).
x(n) = 0
(a) Given
for
fre
n < –2 and n > 3; x(n) = 1
The signal u(n + 4) – u(n – 2) can be obtained by first plotting u(n + 4) as shown in
tes
Figure 1.14(a), then plotting u(n – 2) as shown in Figure 1.14(b), and then subtracting
each element of u(n – 2) from the corresponding element of u(n + 4) to obtain the result
shown in Figure 1.14(c).
No
w.
ww
Figure 1.13 Plots of (a) u(n + 2) (b) u(–n + 3) (c) u(n + 2) u(–n + 3).
www.Notesfree.in
www.Notesfree.in
Figure 1.14 Plots of (a) u(n + 4) (b) u(n – 2) (c) u(n + 4) – u(n – 2).
.in
a > 1, it is amplification and if a < 1, it is attenuation. Hence the amplitude is rescaled. Hence the
name amplitude scaling.
Figure 1.15(a) shows a signal x(n) and Figure 1.15(b) shows a scaled signal y(n) = 2x(n).
e
fre
1.4.1 Time Scaling
tes
Time scaling may be time expansion or time compression. The time scaling of a discrete- time
signal x(n) can be accomplished by replacing n by an in it. Mathematically, it can be expressed as:
y(n) = x(an)
When a > 1, it is time compression and when a < 1, it is time expansion.
Let x(n) be a sequence as shown in Figure 1.16(a). If a = 2, y(n) = x(2n). Then
No
y(0) = x(0) = 1
y(–1) = x(–2) = 3
y(–2) = x(–4) = 0
y(1) = x(2) = 3
y(2) = x(4) = 0
and so on.
w.
y(0) = x(0) = 1
y(2) = x(1) = 2
y(4) = x(2) = 3
y(6) = x(3) = 4
y(8) = x(4) = 0
y(–2) = x(–1) = 2
y(–4) = x(–2) = 3
y(–6) = x(–3) = 4
y(–8) = x(– 4) = 0
We can plot y(n) = x(n/2) as shown in Figure 1.16(c). Here the signal is expanded by 2. All
odd
components in x(n/2) are zero because x(n) does not have any value in between the sampling
instants.
www.Notesfree.in
www.Notesfree.in
e .in
Figure 1.16 Discrete–time s ca l i n g ( a ) P l ot of x ( n ) ( b) P l ot o f x ( 2 n ) ( c) Pl ot of x( n / 2 )
rate.
In discrete-time domain, the sum of two signals x1(n) and x2(n) can be obtained by
tes
adding the corresponding sample values and the subtraction of x2(n) from x1(n) can be obtained
by subtracting each sample of x2(n) from the corresponding sample of x1(n) as illustrated
below.
If x1(n) = {1, 2, 3, 1, 5} and x2(n) = {2, 3, 4, 1, –2}
Then x1(n) + x2(n) = {1 + 2, 2 + 3, 3 + 4, 1 + 1, 5 – 2} = {3, 5, 7, 2, 3}
No
Solution:
(a) The given signal shown in Figure 1.17(a) is:
x(n) = δ (n + 2) + δ (n + 1) + δ(n) + δ(n -1)
0 𝑓𝑜𝑟 𝑛 ≤ −3
x(n) = {1 𝑓𝑜𝑟 − 2 ≤ 𝑛 ≤ 1
0 𝑓𝑜𝑟 𝑛 ≥ 2
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
x(n) = 𝛿(n – 2) + 𝛿 (n – 3) + δ (n – 4) + δ (n – 5)
0 𝑓𝑜𝑟 𝑛 ≤ 1
x(n) = {1 𝑓𝑜𝑟 2≤𝑛≤5
0 𝑓𝑜𝑟 𝑛 ≥ 6
∴ x(n) = u(n – 2) – u(n – 6)
.in
The continuous-time signals are also called analog signals. They are denoted by x (t). They are
continuous in amplitude as well as in time. Most of the signals available are continuous-time
signals.
The signals that are defined only at discrete instants of time are known as discrete-time signals.
The discrete-time signals are continuous in amplitude, but discrete in time. For discrete- time signals,
e
the amplitude between two time instants is just not defined. For discrete-time signals, the
independent variable is time n. Since they are defined only at discrete instants of time, they are
denoted by a sequence x (nT) or simply by x(n) where n is an integer.
fre
Figure 1.18 shows the graphical representation of discrete-time signals. The discrete- time
signals may be inherently discrete or may be discrete versions of the continuous-time signals.
tes
No
A signal which has a definite pattern and repeats itself at regular intervals of time is called a periodic
signal, and a signal which does not repeat at regular intervals of time is called a non-periodic or
aperiodic signal.
A discrete-time signal x(n) is said to be periodic if it satisfies the condition x(n) = x(n + N) for all
integers n.
The smallest value of N which satisfies the above condition is known as fundamental period.
If the above condition is not satisfied even for one value of n, then the discrete-time signal
is aperiodic. Sometimes aperiodic signals are said to have a period equal to infinity.
The angular frequency is given by
2𝜋
𝜔=
𝑁
.in
Fundamental period N = 2𝜋
𝜔
The sum of two discrete-time periodic sequence is always periodic.
e
fre
some examples of discrete-time periodic/non-periodic signals are shown in Figure 1.19.
Figure 1.19 Example of discrete-time: (a) Periodic and (b) Non-periodic signals
tes
EXAMPLE 1.4 Show that the complex exponential sequence x(n) = ej 0n is periodic only if
0/2 is a rational number.
i.e.
i.e. 𝑒𝑗𝜔0 𝑗𝜔 0𝑛
= 𝑒
𝑗𝜔 0𝑛
2𝜋 𝑁
Signals may also be classified as energy signals and power signals. However there are some
signals which can neither be classified as energy signals nor power signals.
The total energy E of a discrete-time signal x(n) is defined as:
www.Notesfree.in
www.Notesfree.in
A signal is said to be an energy signal if and only if its total energy E over the interval (–
∞, ∞) is finite (i.e., 0 < E < ∞). For an energy signal, average power P = 0. Non-periodic signals
which are defined over a finite time (also called time limited signals) are the examples of energy
signals. Since the energy of a periodic signal is always either zero or infinite, any periodic signal
cannot be an energy signal.
A signal is said to be a power signal, if its average power P is finite (i.e., 0 < P < ∞). For a
power signal, total energy E = ∞. Periodic signals are the examples of power signals. Every
bounded and periodic signal is a power signal. But it is true that a power signal is not necessarily a
bounded and periodic signal.
Both energy and power signals are mutually exclusive, i.e. no signal can be both energy
signal and power signal.
.in
The signals that do not satisfy the above properties are neither energy signals nor power
signals. For example, x(n) = u(n), x(n) = nu(n), x(n) = n2u(n).
These are signals for which neither P nor E are finite. If the signals contain infinite energy
and zero power or infinite energy and infinite power, they are neither energy nor power signals.
If the signal amplitude becomes zero as |n| → ∞, it is an energy signal, and if the signal
e
amplitude does not become zero as |n| → ∞, it is a power signal.
Any signal x(n) can be expressed as sum of even and odd components. That is
x(n) = xe(n) + xo(n)
where xe(n) is even components and xo(n) is odd components of the signal.
w.
symmetric signals: cosine sequence is an example of an even signal. Some even signals are
shown in Figure 1.20(a). An even signal is identical to its reflection about the origin. For an even
signal x0(n) = 0.
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
Thus, the product of two even signals or of two odd signals is an even signal, and the
product of even and odd signals is an odd signal.
Every signal need not be either purely even signal or purely odd signal, but every
signal can be decomposed into sum of even and odd parts.
.in
CLASSIFICATIOK OF DISCRETE-TImE SYSTEmS
A system is defined as an entity that acts on an input signal and transforms it into an output
signal. A system may also be defined as a set of elements or functional blocks which are
connected together and produces an output in response to an input signal. The response or
e
output of the system depends on the transfer function of the system. It is a cause and effect
relation between two or more signals.
fre
As signals, systems are also broadly classified into continuous-time and discrete-time
systems. A continuous-time system is one which transforms continuous-time input signals
into continuous-time output signals, whereas a discrete-time system is one which transforms
discrete-time input signals into discrete-time output signals.
For example microprocessors, semiconductor memories, shift registers, etc. are discrete-
time systems.
tes
A discrete-time system is represented by a block diagram as shown in Figure 1.22. An
arrow entering the box is the input signal (also called excitation, source or driving function)
and an arrow leaving the box is an output signal (also called response). Generally, the input
is denoted by x(n) and the output is denoted by y(n).
No
w.
ww
www.Notesfree.in
www.Notesfree.in
The relation between the input x(n) and the output y(n) of a system has the form:
y(n) = Operation on x(n)
Mathematically,
y(n) = T[x(n)]
which represents that x(n) is transformed to y(n). In other words, y(n) is the transformed
version of x(n).
.in
Figure 1.22 BFock diagram of discrete–time system.
e
2. Causal and non-causal systems
3. Linear and non-linear systems
4. Time-invariant and time varying systems
5.
6.
7.
fre
Stable and unstable systems.
Invertible and non-invertible systems
FIR and IIR systems
y(n) = 2x2(n)
In contrast, a system is said to be dynamic or memory system if the response depends upon
past or future inputs or past outputs. A summer or accumulator, a delay element is a discrete-
time system with memory.
For example, the systems defined below are dynamic or memory systems.
w.
y(n) = x(2n)
y(n) = x(n) + x(n – 2)
y(n) + 4y(n – 1) + 4y(n – 2) = x(n)
Any discrete-time system described by a difference equation is a dynamic system.
ww
A purely resistive electrical circuit is a static system, whereas an electric circuit having
inductors and/or capacitors is a dynamic system.
www.Notesfree.in
www.Notesfree.in
A discrete-time LTI system is memoryless (static) if its impulse response h(n) is zero
for n s 0. If the impulse response is not identically zero for n s 0, then the system is called
dynamic system or system with memory.
EXAMPLE 1.12 Find whether the following systems are dynamic or not:
(a) y(n) = x(n + 2) (b) y(n) = x2(n)
.in
(c) y(n) = x(n – 2) + x(n)
Solution:
(a) Given y(n) = x(n + 2)
The output depends on the future value of input. Therefore, the system is dynamic.
e
(b) Given y(n) = x2(n)
(c) Given
fre
The output depends on the present value of input alone. Therefore, the system is
static.
y(n) = x(n – 2) + x(n)
The system is described by a difference equation. Therefore, the system is dynamic.
tes
Causal and Non-causal Systems
A system is said to be causal (or non-anticipative) if the output of the system at any instant
n depends only on the present and past values of the input but not on future inputs, i.e., for
a causal system, the impulse response or output does not begin before the input function is
applied, i.e., a causal system is non anticipatory.
No
Causal systems are real time systems. They are physically realizable.
The impulse response of a causal system is zero for n < 0, since (n) exists only at n = 0,
i.e. h(n) = 0 for n<0
The examples for causal systems are:
y(n) = nx(n)
w.
www.Notesfree.in
www.Notesfree.in
EXAMPLE 1.13 Check whether the following systems are causal or not:
(a) y(n) x(n) x(n 2) (b) y(n) = x(2n)
(c) y(n) = sin[x(n)] (d) y(n) = x(–n)
Solution:
(a) Given y(n) x(n) x(n 2)
.in
For n = –2 y( 2) x( 2) x( 4)
For n = 0 y(0) x(0) x( 2)
For n = 2 y(2) x(2) x(0)
For all values of n, the output depends only on the present and past inputs.
e
Therefore, the system is causal.
(a) Given y(n) x(2n)
For n = –2
For n = 0
For n = 2
fre y( 2)
y(0)
x( 4)
x(0)
y(2) x(4)
For positive values of n, the output depends on the future values of input.
Therefore, the system is non-causal.
tes
(a) Given y(n) sin [x(n)]
For n = –2 y( 2) sin [x( 2)]
For n = 0 y(0) sin [x(0)]
For n = 2 y(2) sin [x(2)]
No
For all values of n, the output depends only on the present value of input. Therefore,
the system is causal.
(d) Given y(n) = x(–n)
For n = –2 y( 2) x(2)
For n = 0 y(0) x(0)
w.
For n = 2 y(2) x( 2)
For negative values of n, the output depends on the future values of input.
Therefore, the system is non-causal.
ww
A system which obeys the principle of superposition and principle of homogeneity is called
a linear system and a system which does not obey the principle of superposition and
homogeneity is called a non-linear system.
Homogeneity property means a system which produces an output y(n) for an input x(n)
must produce an output ay(n) for an input ax(n).
Superposition property means a system which produces an output y1(n) for an input
x1(n) and an output y2(n) for an input x2(n) must produce an output y1(n) + y2(n) for an input
x1(n) + x2(n).
Combining them we can say that a system is linear if an arbitrary input x1(n) produces
an output y1(n) and an arbitrary input x2(n) produces an output y2(n), then the weighted sum
of inputs ax1(n) + bx2(n) where a and b are constants produces an output ay1(n) + by2(n)
which is the sum of weighted outputs.
www.Notesfree.in
www.Notesfree.in
.in
Time-invariance is the property of a system which makes the behaviour of the system
independent of time. This means that the behaviour of the system does not depend on the
time at which the input is applied. For discrete-time systems, the time invariance property is
called shift invariance.
A system is said to be shift-invariant if its input/output characteristics do not change
with time, i.e., if a time shift in the input results in a corresponding time shift in the output
e
as shown in Figure 1.23, i.e.
If T[x(n)] = y(n)
Then fre
T[x(n – k)] = y(n – k)
A system not satisfying the above requirements is called a time-varying system (or shift-
varying system). A time-invariant system is also called a fixed system.
The time-invariance property of the given discrete-time system can be tested as
follows:
tes
Let x(n) be the input and let x(n – k) be the input delayed by k units.
y(n) = T[x(n)] be the output for the input x(n).
M is a positive real finite number. For example a sinewave is a bounded signal. A system is
said to be bounded-input, bounded-output (BIBO) stable, if and only if every bounded input
produces a bounded output. The output of such a system does not diverge or does not grow
unreasonably large.
Let the input signal x(n) be bounded (finite), i.e.,
x (n) ≤ Mx for all n
w.
unbounded output.
It is very important to know about the stability of the system. Stability indicates the
usefulness of the system. The stability can be found from the impulse response of the system
which is nothing but the output of the system for a unit impulse input. If the impulse
response is absolutely summable for a discrete-time system, then the system is stable.
www.Notesfree.in
www.Notesfree.in
where h(n) is the impulse response of the system. This is called BIBO stability criterion.
Proof: Consider a linear time-invariant system with x(n) as input and y(n) as output. The
input and output of the system are related by the convolution integral.
e .in
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
To solve the difference equation, first it is converted into algebraic equation by taking its Z-
transform. The solution is obtained in z-domain and the time domain solution is obtained by
taking its inverse Z-transform. The system response has two components. The source free
response and the forced response. The response of the system due to input alone when the initial
conditions are neglected is called the forced response of the system. It is also called the steady
state response of the system. It represents the component of the response due to the driving
.in
force. The response of the system due to initial conditions alone when the input is neglected is
called the free or natural response of the system. It is also called the transient response of the
system. It represents the component of the response when the driving function is made zero. The
response due to input and initial conditions considered simultaneously is called the total
response of the system. For a stable system, the source free component always decays with time.
In fact a stable system is one whose source free component decays with time. For this reason the
e
source free component is also designated as the transient component and the component due to
source is called the steady state component. When input is a unit impulse input, the response is
fre
called the impulse response of the system and when the input is a unit step input, the response is
called the step response of the system.
Solution:
(a) The natural response is the response due to initial conditions only. So make x(n) = 0. Then
the difference equation becomes3 1
(𝑛) - (𝑦 𝑛 − 1) + 𝑦(𝑛 − 2 ) = 0
4 8
Taking inverse Z-transform on both sides, we get the natural response as:
www.Notesfree.in
www.Notesfree.in
(a) To find the forced response due to a step input, put x(n) = u(n). So we have
We know that the forced response is due to input alone. So for forced response, the
initial conditions are neglected. Taking Z-transform on both sides of the above
equation and neglecting the initial conditions, we have
.in
3 1
y(n) y(n 1) + y (n 2) = u(n) + u(n 1)
4 8
We know that the forced response is due to input alone. So for forced response, the
initial conditions are neglected. Taking Z-transform on both sides of the above
e
equation and neglecting the initial conditions, we have
Y(z)
3
fre
z1Y (z) +
1
z2Y (z) = U(z) + z1U(z) = 4 8
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
.in
e
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
.in
Taking partial fractions of Y(z)/z, we have
e
fre
Taking the inverse Z-transform on both sides, we have the forced response for a
step input.
tes
EXAMPLE 2 (a) Determine the free response of the system described by the difference equation
Solution:
(a) The free response, also called the natural response or transient response is the
response due to initial conditions only [i.e. make x(n) = 0]. So, the difference
equation is:
www.Notesfree.in
www.Notesfree.in
e .in
fre
Taking inverse Z-transform on both sides, we get the free response of the system as:
(a) To determine the forced response, i.e. the steady state response, the initial conditions
tes
are to be neglected.
The given difference equation is:
No
Taking Z-transform on both sides and neglecting the initial conditions, we have
w.
ww
www.Notesfree.in
www.Notesfree.in
Taking inverse Z-transform on both sides, the forced response of the system is:
.in
For step response, x(n) = u(n)
e
The step response of the system is:
y(n)= 2u(n)- 3u(n 1) +u(n 2) -4u(n 3)
EXAMPLE 4
fre
Solve the following difference equation
y(n) + 2y(n- 1) = x(n)
with x(n) = (1/3)n u(n) and the initial condition y(–1) = 1.
tes
Solution: The solution of the difference equation considering the initial condition and input
simultaneously gives the total response of the system.
The given difference equation is:
No
www.Notesfree.in
www.Notesfree.in
.in
Taking inverse Z-transform on both sides, the solution of the difference equation is:
e
fre
EXAMPLE 5 Solve the following difference equation using unilateral Z-transform. with initial
conditions
tes
Solution: The solution of the difference equation gives the total response of the system
(i.e., the sum of the natural (free) response and the forced response)
The given difference equation is:
No
with initial conditions y(–1) = 2 and y(–2) = 4. Taking Z-transform on both sides, we have
w.
ww
www.Notesfree.in
www.Notesfree.in
.in
e
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
e .in
EXAMPLE 6 Using Z-transform determine the response of the LTI system described by
Solution:
fre
y(n) 2r cos y(n 1) + r2 y(n 2) = x(n) to an excitation x(n) = anu(n).
EXAMPLE 7 Determine the step response of an LTI system whose impulse response
h(n) is given by h(n) = anu( n); 0 < a < 1 .
www.Notesfree.in
www.Notesfree.in
.in
EXAMPLE 8 The step response of an LTI system is
e
fre
tes
www.Notesfree.in
www.Notesfree.in
1.2. INTRODUCTION
Systems may be continuous-time systems or discrete-time systems. Discrete-time systems
may be FIR (Finite Impulse Response) systems or IIR (Infinite Impulse Response) systems.
FIR systems are the systems whose impulse response has finite number of samples and IIR
systems are systems whose impulse response has infinite number of samples. Realization of a
discrete-time system means obtaining a network corresponding to the difference equation or
transfer function of the system. In this chapter, various methods of realization of discrete-
time systems are discussed.
.in
To realize a discrete-time system, the given difference equation in time domain is to be
converted into an algebraic equation in z-domain, and each term of that equation is to be
represented by a suitable element (a constant multiplier or a delay element). Then using
adders, all the elements representing various terms of the equation are to be connected to
e
obtain the output. The symbols of the basic elements used for constructing the block diagram
of a discrete-time system (adder, constant multiplier and unit delay element) are shown in
Figure 4.1.
fre
tes
Figure 1.2.1 (a) Adder (b) Constant multiplier and (c) Unit delay element.
Adder: An adder is used to add two or more signals. The output of adder is equal to the
No
EXAMPLE 1.2.1 Construct the block diagram for the discrete-time systems whose input-
output relations are described by the following difference equations:
(a) y(n) = 0.7x(n) + 0.3x (n 1), (b) y(n) = 0.5y(n 1) + 0.8 x(n) + 0.4 x (n 1)
ww
Solution:
(a) Given y(n) = 0.7x(n) + 0.3x (n 1)
The system may be realized by using the difference equation directly or by using
the Z-transformed version of that. The individual terms of the given difference
equation are 0.7x(n) and 0.3x(n – 1). They are represented by the basic elements as
shown in Figure 4.2.
Alternatively
Taking Z-transform on both sides of the given difference equation, we have
Y(z) = 0.7X(z) + 0.3z–1X(z)
The individual terms of the above equation are: 0.7X(z) and 0.3 z1X(z).
www.Notesfree.in
www.Notesfree.in
.in
Figure 1.2.2 BFock diagram representation of (a) 0.7X(z) and (b) 0.3z–1X(z).
e
The input to the system is X(z) [or x(n)] and the output of the system is Y(z) [or
y(n)]. The above elements are connected as shown in Figure 4.3 to get the output
Y(z) [or y(n)].
fre
tes
No
www.Notesfree.in
www.Notesfree.in
The individual terms of the above equations are 0.5y(n 1), 0.8x(n) and 0.4x(n 1).
They are represented by the basic elements as shown in Figure 4.4.
Alternatively
Taking Z-transform on both sides of the given difference equation, we have
Y (z) = 0.5 z1Y (z) + 0.8X(z) + 0.4 z1X(z)
The individual terms of the above equation are :0.5 z 1Y (z), 0.8X(z) and 0.4 z1X(z).
.in
They are represented by the basic elements as shown in Figure 1.2.4.
e
fre
Figure 1.2.4 BFock diagram representation of (a) 0.8X(z) (b) 0.4z–1X(z) and (c) 0.5z–1Y(z).
The input to the system is X(z)[or x(n)] and the output of the system is Y(z)[or y(n)].
tes
The above elements are connected as shown in Figure 4.5 to get the output Y(z)[or y(n)].
No
Figure 1.2.5 Realization of the system described by y(n) = 0.5y(n–1) + 0.8x(n) + 0.4x(n–1).
w.
Discrete-time LTI systems may be divided into two types: IIR systems (those that have
an infinite duration impulse response) and FIR systems (those that have a finite duration
impulse response).
ww
Since this weighted sum involves the present and all the past input samples, we can say that
the IIR system has an infinite memory.
www.Notesfree.in
www.Notesfree.in
A system whose output y(n) at time n depends on the present input and any number of
past values of input and output is called a recursive system. The past outputs are
y(n – 1), y(n – 2), y(n – 3), ...
Hence, for recursive system, the output y(n) is given by
y(n) = F[y(n 1), y(n 2), ..., y(n N ), x(n), x(n 1), ..., x(n M )]
In recursive system, in order to compute y(n0), we need to compute all the previous values
y(0), y(1), y(2), ..., y(n0 – 1) before calculating y(n0). Hence, output of recursive system has
to be computed in order [y(0), y(1), y(2), ... ].
.in
Transfer function of llR SYSTEM
In general, an IIR system is described by the difference equation
e
fre
i.e. in general, IIR systems are those in which the output at any instant of time depends not
only on the present and past inputs but also on the past outputs. Hence, in general, an IIR
system is of recursive type.
On taking Z-transform of the above equation for y(n), we get
tes
The system function or the transfer function of the IIR system is:
No
w.
The above equations for Y(z) and H(z) can be viewed as a computational procedure (or
algorithm) to determine the output sequence y(n) from the input sequence x(n). The
computations in the above equation can be arranged into various equivalent sets of difference
ww
equations with each set of equations defining a computational procedure or algorithm for
implementing the system.
For each set of equations, we can construct a block diagram consisting of delays,
adders and multipliers. Such block diagrams are referred to as realization of the system or
equivalently as structure for realizing the system.
The main advantage of re-arranging the sets of difference equations (i.e. the main
criteria for selecting a particular structure) is to reduce the computational complexity,
memory requirements and finite word length effects in computations.
So the factors that influence the choice of structure for realization of LTI system are:
computational complexity, memory requirements and finite word length effects in computations.
Computational complexity refers to the number of arithmetic operations required to
www.Notesfree.in
www.Notesfree.in
.in
3. Transposed form structure 4. Cascade form structure
5. Parallel form structure 6. Lattice structure
7. Ladder structure
e
1.2.3. Direct Form-I Structure
fre
Direct form-I realization of an IIR system is nothing, but the direct implementation of the
difference equation or transfer function. It is the simplest and most straight forward
realization structure available.
The difference equation governing the behaviour of an IIR system is
tes
The equation for Y(z) [or y(n)] can be directly represented by a block diagram as
shown in Figure 4.6 and this structure is called Direct form-I structure. This structure uses
separate delays (z–1) for input and output samples. Hence, for realizing this structure more
w.
memory is required. The direct form structure provides a direct relation between time domain
and z-domain equations.
The structure shown in Figure 4.6 is called a non-canonical structure because the
number of delay elements used is more than the order of the difference equation.
If the IIR system is more complex, that is of higher order, then introduce an
ww
www.Notesfree.in
www.Notesfree.in
So, the direct form-I structure is in two parts. The first part contains only zeros [that is, the
input components either x(n) or X(z)] and the second part contains only poles [that is, the
output components either y(n) or Y(z)]. In direct form-I, the zeros are realized first and poles
are realized second.
.in
• It lacks hardware flexibility.
• There are chances of instability due to the quantization noise.
e
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
denominator is non unity, then transform it to unity. The systematic procedure is given as
follows:
.in
On taking Z-transform of the above equation and neglecting initial conditions, we get
e
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
The realization of an IIR system represented by these equations in direct form-II is shown in
Figure 1.2.7.
e .in
fre
tes
No
Since the number of delay elements used in direct form-II is the same as that of the
order of the difference equation, direct form-II is called a canonical structure.
w.
The comparison of direct form-I and direct form-II structures is given in Table 4.1
for both the input and output signal samples. for both the input and output signal samples.
For the (M – 1)th or (N – 1)th order IIR system, For the (M – 1)th or (N – 1)th order IIR system,
direct form-I requires M + N – 1 multipliers, direct form-II requires M + N – 1 multipliers,
M + N – 2 adders and M + N – 2 delays. M + N – 2 adders and max [(M – 1), (N – 1)]
delays.
It is also called non-canonical, because it It is called canonical, because it requires a
requires more number of delays. minimum number of delays.
It is not efficient in terms of memory require- It is more efficient in terms of memory require-
ments compared to direct form-II. ments.
Direct form-I can be viewed as two linear Direct form-II can also be viewed as two linear
time-invariant systems in cascade. The first time-invariant systems in cascade. The first
one is non-recursive and the second one one is recursive and the second one non-
recursive. recursive.
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
Figure 1.2.8 (a) Direct form–I structure as cascade of two systems (b) Direct form–I structure after
interchanging the order of cascading.
In Figure 4.8(b), we can observe that the inputs to the delay elements in H1(z) and H2(z)
No
are the same and so the outputs of the delay elements in H1(z) and H2(z) are same. Therefore,
instead of having separate delays for H1(z) and H2(z), a single set of delays can be used. Hence, the
delays can be merged to combine the cascaded systems to a single system. The resultant structure
will be direct form-II structure as that of Figure 1.2.7. The process of converting direct form-I
structure to direct form-II structure is shown in Figure 1.2.9.
w.
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
Figure 1.2.10 (a) General transposed structure realization of IIR system through direct form–I,
(b) General transposed structure realization of IIR system through direct form–II.
The direct form-II realization structure, the recovered realization structure and the transposed
form realization structure of this system are shown in Figure 4.11[(a), (b) and (c) respectively].
No
a1 = 2, a2 = 3, b0 = 4, b1 = 5, b2 = 6
EXAMPLE 1.2.3 Obtain the direct form-I, direct form-II, cascade and parallel form realizations of the
LTI system governed by the equation
w.
ww
www.Notesfree.in
www.Notesfree.in
The direct form-I structure can be obtained from the above equation as shown in Figure 1.2.11
e .in
Figure 1.2.11 Realization of IIR system through direct form–I
www.Notesfree.in
www.Notesfree.in
.in
The above equations for W(z) and Y(z) can be realized by a direct form-II structure as shown in Figure
1.2.13.
e
fre
tes
No
EXAMPLE 1.2.4 Find the direct form-I and direct form-II realizations of a discrete-time
system represented by the transfer function
ww
www.Notesfree.in
www.Notesfree.in
The direct form-I structure of the above equation for Y(z) can be obtained as shown in Figure 1.2.13
e .in
fre
tes
Figure 1.2.13 Realization of IIR system through direct form–I
No
w.
ww
www.Notesfree.in
www.Notesfree.in
The above equations for Y(z) and W(z) can be realized by a direct form-II structure as shown in Figure
1.1.14
e .in
fre
tes
Figure 1.2.14 Realization of IIR system through direct form–II
.
EXAMPLE 1.2.5 Find the digital network in direct and transposed form for the system
described by the difference equation
No
w.
Direct form
The direct form-I digital network can be realized using the above equation for Y(z) as shown
in Figure 1.2.15
ww
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
w.
ww
.
Figure 1.2.16 Realization of IIR system through direct form–II
www.Notesfree.in
www.Notesfree.in
Linear time-invariant discrete-time systems can be classified according to the type of impulse
response. If the impulse response sequence is of finite duration, the system is called a finite
impulse response (FIR) system, and if the impulse response sequence is of infinite duration,
the system is called an infinite impulse response (IIR) system
e .in
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
UNIT II
INTRODUCTION :The DFT of a discrete-time signal x(n) is a finite duration discrete frequency
sequence. The DFT sequence is denoted by X(k). The DFT is obtained by sampling one period of the
Fourier transform X(W) of the signal x(n) at a finite number of frequency points. This sampling is
conventionally performed at N equally spaced points in the period 0 ≤w≤2w or at wk = 2πk/N;
0 ≤ k≤ N – 1. We can say that DFT is used for transforming discrete-time sequence x(n) of finite length
into discrete frequency sequence X(k) of finite length. The DFT is important for two reasons. First it
allows us to determine the frequency content of a signal, that is to perform spectral analysis. The
.in
second application of the DFT is to perform filtering operation in the frequency domain. Let x(n) be a
discrete-time sequence with Fourier transform X(W), then the DFT of x(n) denoted by X(k) is defined
as
The DFT of x(n) is a sequence consisting of N samples of X(k). The DFT sequence starts at k = 0,
e
corresponding to w = 0, but does not include k = N corresponding to w = 2π (since the sample at w = 0
is same as the sample at w = 2 π). Generally, the DFT is defined as
fre
tes
No
EXAMPLE 2.1 (a) Find the 4-point DFT of x(n) = {1, –1, 2, –2} directly.
w.
Solution:
(a) Given sequence is x(n) = {1, –1, 2, –2}. Here the DFT X(k) to be found is N =4-point
and length of the sequence L = 4. So no padding of zeros is required. We know that the DFT
{x(n)} is given by
ww
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
w.
ww
EXAMPLE 2.2 (a) Find the 4-point DFT of x(n) = {1, –2, 3, 2}.
(b) Find the IDFT of X(k) = {1, 0, 1, 0}.
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
w.
ww
EXAMPLE 2.3 Compute the DFT of the 3-point sequence x(n) = {2, 1, 2}. Using the same sequence,
compute the 6-point DFT and compare the two DFTs.
www.Notesfree.in
www.Notesfree.in
e .in
fre
To compute the 6-point DFT, convert the 3-point sequence x(n) into 6-point sequence by
padding with zeros.
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
www.Notesfree.in
www.Notesfree.in
WN is called the IDFT matrix. We may also obtain x directly from the IDFT relation in matrix form,
where the change of index from n to k and the change in the sign of the exponent in e j(2/N)nk lead to
the conjugate transpose of WN. We then have
.in
EXAMPLE 2.4 Find the DFT of the sequence x(n) = {1, 2, 1, 0}
Solution: The DFT X(k) of the given sequence x(n) = {1, 2, 1, 0} may be obtained by solving the
matrix product as follows. Here N = 4.
e
fre
EXAMPLE 2.5 Find the DFT of x(n) = {1, –1, 2, –2}.
Solution: The DFT, X(k) of the given sequence x(n) = {1, –1, 2, –2} can be determined using matrix as
tes
shown below.
No
EXAMPLE 2.6. Find the 4-point DFT of x(n) = {1, –2, 3, 2}.
Solution: Given x(n) = {1, –2, 3, 2}, the 4-point DFT{x(n)} = X(k) is determined using matrix as
shown below.
w.
ww
www.Notesfree.in
www.Notesfree.in
EXAMPLE 2.6 Find the IDFT of X(k)={4, –j2, 0, j2} using DFT.
Solution: Given X(k) = {4, –j2, 0, j2} _ X*(k) = {4, j2, 0, –j2}
The IDFT of X(k) is determined using matrix as shown below.
To find IDFT of X(k) first find X*(k), then find DFT of X*(k), then take conjugate of DFT {X*(k)} and
divide by N.
.in
EXAMPLE 2.7Find the IDFT of X(k) = {4, 2, 0, 4} using DFT.
Solution: Given X(k) = {4, 2, 0, 4}
X*(k) = {4, 2, 0, 4}
e
The IDFT of X(k) is determined using matrix as shown below.
To find IDFT of X(k), first find X*(k), then find DFT of X*(k), then take conjugate of DFT {X*(k)} and
divide by N
fre
tes
Solution: Given X(k) = {1, 0, 1, 0}, the IDFT of X(k), i.e. x(n) is determined using matrix
as shown below.
w.
ww
PROPERTIES OF DFT
Like the Fourier and Z-transforms, the DFT has several important properties that are used to
process the finite duration sequences. Some of those properties are discussed as follows
Periodicity:
If a sequence x(n) is periodic with periodicity of N samples, then N-point DFT of the sequence, X(k) is
also periodic with periodicity of N samples.
Hence, if x(n) and X(k) are an N-point DFT pair, then
www.Notesfree.in
www.Notesfree.in
.in
Linearity
e
fre
tes
No
www.Notesfree.in
www.Notesfree.in
.in
e
Circular Frequency Shift
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
www.Notesfree.in
www.Notesfree.in
.in
e
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
Parseval’s Theorem
Parseval’s theorem says that the DFT is an energy-conserving transformation and allows us
to find the signal energy either from the signal or its spectrum. This implies that the sum of
squares of the signal samples is related to the sum of squares of the magnitude of the DFT
No
samples.
w.
Circular Correlation
ww
www.Notesfree.in
www.Notesfree.in
The DFT supports only circular convolution. When two numbers of N-point sequence are circularly
convolved, it produces another N-point sequence. For circular convolution, one of the sequence should
be periodically extended. Also the resultant sequence is periodic with period N. The linear convolution
of two sequences of length N1 and N2 produces an output sequence of length N1 + N2 – 1. To perform
linear convolution using DFT, both the sequences should be converted to N1 + N2 – 1 sequences by
padding with zeros. Then take N1 + N2 – 1-point DFT of both the sequences and determine the product
of their DFTs. The resultant sequence is given by the IDFT of the product of DFTs. [Actually the
response is given by the circular convolution of the N1 + N2 – 1 sequences]. Let x(n) be an N1-point
sequence and h(n) be an N2-point sequence. The linear convolution of x(n) and h(n) produces a
sequence y(n) of length N1 + N2 – 1. So pad x(n) with N2 – 1 zeros and h(n) with N1 – 1 zeros and make
both of them of length N1 + N2 – 1. Let X(k) be an N1 + N2 – 1-point DFT of x(n), and H(k) be an N1 +
.in
N2 – 1-point DFT of h(n). Now, the sequence y(n) is given by the inverse DFT of the product X(k)
H(k).
y(n) = IDFT {X(k)H(k)}
This technique of convolving two finite duration sequences using DFT techniques is called fast
convolution. The convolution of two sequences by convolution sum formula. This technique of
e
convolving two finite duration sequences using DFT techniques is called fast convolution. The
convolution of two sequences by convolution sum formula.
fre ∞ 𝑥(𝑘)ℎ(𝑛 − 𝑘)
Y(n)=∑−∞
is called direct convolution or slow convolution. The term fast is used because the DFT can be
evaluated rapidly and efficiently using any of a large class of algorithms called Fast Fourier Transform
tes
(FFT). In a practical sense, the size of DFTs need not be restricted to N1 + N2 – 1-point transforms.
Any number L can be used for the transform size subject to the restriction L _ (N1 + N2 – 1). If
L > (N1 + N2 – 1), then y(n) will have zero valued samples at the end of the period.
EXAMPLE 2.1 Find the linear convolution of the sequences x(n) and h(n) using DFT.
No
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
__
The linear convolution of x(n) = {1, 2} and h(n) = {2, 1} is obtained using the tabular
method as shown below.
No
w.
EXAMPLE 2.2 Find the linear convolution of the sequences x(n) and h(n) using DFT.
x(n) = {1, 0, 2}, h(n) = {1, 1}
Solution: Let y(n) be the linear convolution of x(n) and h(n). x(n) is of length 3 and h(n) is
of length 2. So the linear convolution of x(n) and h(n) will produce a 4-sample sequence
(3 + 2 – 1 = 4). To avoid time aliasing, we convert the 2-sample and 3-sample sequences
into 4-sample sequences by padding with zeros.
x(n) = {1, 0, 2, 0} and h(n) = {1, 1, 0, 0}
By the definition of N-point DFT, the 4-point DFT of x(n) is:
www.Notesfree.in
www.Notesfree.in
.in
e
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
e .in
fre
Therefore, the linear convolution of x(n) and h(n) is:
y(n) = x(n) * h(n) = {1, 1, 2, 2}
The linear convolution of x(n) = {1, 0, 2} and h(n) = {1, 1} is obtained using the tabular
method as shown below.
tes
No
OVERLAP-ADD METHOD :
w.
In overlap-add method, the longer sequence x(n) of length L is split into m number of smaller
sequences of length N equal to the size of the smaller sequence h(n). (If required zero padding may be
done to L so that L = mN). The linear convolution of each section (of length N) of longer sequence with
the smaller sequence of length N is performed. This gives an output sequence of length 2N – 1.
ww
In t his method, the last N – 1 samples of each output sequence overlaps with the first N – 1
samples of next section. While combining the output sequences of the various sectioned convolutions,
the corresponding samples of overlapped regions are added and the samples of non-overlapped regions
are retained as such. If the linear convolution is to be performed by DFT (or FFT), since DFT supports
only circular convolution and not linear convolution directly, we have to pad each section of the longer
sequence (of length N) and also the smaller sequence (of length N) with N – 1 zeros before computing
the circular convolution of each section with the smaller sequence. The steps for this fast convolution
by overlap-add method are as follows:
Step 1: N – 1 zeros are padded at the end of the impulse response sequence h(n) which isof length N
and a sequence of length 2N – 1 is obtained. Then the 2N – 1 point FFT is performed and the output
values are stored.
Step 2: Split the data, i.e. x(n) into m blocks each of length N and pad N – 1 zeros to each block to
make them 2N – 1 sequence blocks and find the FFT of each block.
www.Notesfree.in
www.Notesfree.in
Step 3: The stored frequency response of the filter, i.e. the FFT output sequence obtained
in Step 1 is multiplied by the FFT output sequence of each of the selected block in
Step 2.
Step 4: A 2N – 1 point inverse FFT is performed on each product sequence obtained in Step 3.
Step 5: The first (N – 1) IFFT values obtained in Step 4 for each block, overlapped with the last N – 1
values of the previous block. Therefore, add the overlapping values and keep the non-overlapping
values as they are. The result is the linear convolution of x(n) and h(n).
OVERLAP-SAVE METHOD
In overlap-save method, the results of linear convolution of the various sections are obtained
using circular convolution. Let x(n) be a longer sequence of length L and h(n) be a smaller
sequence of length N. The regular convolution of sequences of length L and N has L + N – 1
.in
samples. If L > N, we have to zero pad the second sequence h(n) to length L. So their linear
convolution will have 2L – 1 samples. Its first N – 1 samples are contaminated by
wraparound and the rest corresponds to the regular convolution. To understand this let L =
12 and N = 5. If we pad N by 7 zeros, their regular convolution has 23 (or 2L – 1) samples
with 7 trailing zeros (L – N = 7). For periodic convolution, 11 samples (L – 1 = 11) are
e
wrapped around. Since the last 7 (or L – N) are zeros only, first four samples (2L – 1) – (L)
– (L – N) = N – 1 = 5 – 1 = 4 of the periodic convolution are contaminated by wraparound.
This idea is the basis of overlap-save method. First, we add N – 1 leading zeros to the longer
fre
sequence x(n) and section it into k overlapping (by N – 1) segments of length M. Typically
we choose M = 2N. Next, we zero pad h(n) (with trailing zeros) to length M, and find the periodic
convolution of h(n) with each section of x(n). Finally, we discard the first N – 1 (contaminated)
samples from each convolution and glue (concatenate) the results to give the required convolution.
Step 1: N zeros are padded at the end of the impulse response h(n) which is of length N and a sequence
tes
of length M = 2N is obtained. Then the 2N point FFT is performed
and the output values are stored.
Step 2: A 2N point FFT on each selected data block is performed. Here each data block begins with the
last N – 1 values in the previous data block, except the first data
block which begins with N – 1 zeros.
Step 3: The stored frequency response of the filter, i.e. the FFT output sequence obtained in Step 1 is
multiplied by the FFT output sequence of each of the selected blocks
No
obtained in Step 2.
Step 4: A 2N point inverse FFT is performed on each of the product sequences obtained in
Step 3.
Step 5: The first N – 1 values from the output of each block are discarded and the remaining values are
stored. That gives the response y(n).
In either of the above two methods, the FFT of the shorter sequence need be found only once, stored,
w.
and reused for all subsequent partial convolutions. Both methods allow online implementation if we
can tolerate a small processing delay that equals the time required for each section of the long sequence
to arrive at the processor
2.2 INTRODUCTION
The N-point DFT of a sequence x(n) converts the time domain N-point sequence x(n) to a
frequency domain N-point sequence X(k). The direct computation of an N-point DFT requires
N x N complex multiplications and N(N – 1) complex additions. Many methods were
developed for reducing the number of calculations involved. The most popular of these is the
Fast Fourier Transform (FFT), a method developed by Cooley and Turkey. The FFT may be
defined as an algorithm (or a method) for computing the DFT efficiently (with reduced
number of calculations). The computational efficiency is achieved by adopting a divide and
conquer approach. This approach is based on the decomposition of an N-point DFT into
www.Notesfree.in
www.Notesfree.in
successively smaller DFTs and then combining them to give the total transform. Based on
this basic approach, a family of computational algorithms were developed and they are
collectively known as FFT algorithms. Basically there are two FFT algorithms; Decimation- in-
time (DIT) FFT algorithm and Decimation-in-frequency (DIF) FFT algorithm. In this chapter,
we discuss DIT FFT and DIF FFT algorithms and the computation of DFT by these methods.
N 1
X (K ) x(n)e j2nk/N , K 0,1, 2,....N 1 where
.in
n0
Let WN be the complex valued phase factor, which is an Nth root of unity given by
WN e j 2 nk / N
e
Thus,
X(k) becomes,
X (K )
N 1
x(n)W N
nk
, K 0,1, 2,.... N 1
fre
n0
tes
Similarly, IDFT is written as
x(n) X (K )WN nk , n 0,1, 2,.... N 1
N 1
n0
From the above equations for X(k) and x(n), it is clear that for each value of k, the direct
computation of X(k) involves N complex multiplications (4N real multiplications) and N – 1
No
complex additions (4N – 2 real additions). Therefore, to compute all N values of DFT, N2
complex multiplications and N(N – 1) complex additions are required. In fact the DFT and
IDFT involve the same type of computations.
If x(n) is a complex-valued sequence, then the N-point DFT given in equation for X(k)
can be expressed as
X(k) = XR(k) + jXI(k)
w.
ww
www.Notesfree.in
www.Notesfree.in
The direct computation of the DFT needs 2N2 evaluations of trigonometric functions, 4N2
real multiplications and 4N(N – 1) real additions. Also this is primarily inefficient as it
cannot exploit the symmetry and periodicity properties of the phase factor WN, which are
Symmetry property W Nk N /2 W NK
Periodicity property WN W N
kN K
FFT algorithm exploits the two symmetry properties and so is an efficient algorithm for DFT
computation.
.in
By adopting a divide and conquer approach, a computationally efficient algorithm can
be developed. This approach depends on the decomposition of an N-point DFT into
successively smaller size DFTs. An N-point sequence, if N can be expressed as N = r1r2r3, ..., rm.
where r1 = r2 = r3 = ... = rm, then N = rm, can be decimated into r-point sequences. For each r-
point sequence, r-point DFT can be computed. Hence the DFT is of size r. The number r is
called the radix of the FFT algorithm and the number m indicates the number of stages in
e
computation. From the results of r-point DFT, the r2-point DFTs are computed. From the
results of r2-point DFTs, the r3-point DFTs are computed and so on, until we get rm-point
fre
DFT. If r = 2, it is called radix-2 FFT.
N
Given sequence x(n) : x(0), x(1), x(2),.....x( 1) ....x(N 1)
ww
Even indexed sequence f1 (n) x(2n) : x(0), x(2), x(4), ....... x(N 2)
Odd indexed sequence f2 (n) x(2n 1) : x(1), x(3), x(5), ....... x(N 1)
We know that the transform X(k) of the N-point sequence x(n) is given by
N 1
X (K ) x(n)WN nk , K 0,1, 2, .... N 1
n0
Breaking the sum into two parts, one for the even and one for the odd indexed values, gives
www.Notesfree.in
www.Notesfree.in
N /21 N 1
X (K ) , K 0,1, 2, .... N 1.
x(n)W
nk
x(n)W nk
N N
n0 nN /2
N / 21 N 1
X (K )
x(n)W
nk
x(n)W nk
W N nk
N N
neven nodd
When n is replaced by 2n, the even numbered samples are selected and when n is replaced by
2n + 1, the odd numbered samples are selected. Hence,
N / 21 N / 21
X (K ) x(2n 1)W N (2n1)k
n0
x(2n)W
N
2nk
n0
.in
2nk
W 2nk (W 2 )nk
2
e j N W nk and W (2n1)k (W k )W nk
N N N /2 N N N /2
We can write
e
N / 21 N / 21
X (K ) f (n)W nk W k
f (n)W nk
1 N /2 N 2 N /2
F (K )
N / 21
f (n)W & F (K )
fre
n0
f
nk
(n) W nk
1 1 N /2 2 2 N /2
n0 n0
X (k) F (K ) W k
F (K ),...k 0,1, 2, 3, .... N 1
tes
1 N 2
The implementation of this equation for X(k) is shown in the following Figure . This first step in
the decomposition breaks the N-point transform into two (N/2)-point transforms and the k WN
provides the N-point combining algebra. The DFT of a sequence is periodic with period given by
the number of points of DFT. Hence, F1(k) and F2(k) will be periodic with period N/2.
No
F1 (k N / 2) F1 (K), &F2 (k N / 2) F2 (K )
F1 (k N / 2) F1 (K), &F2 (k N / 2) F2 (K )
(k N / 2)
In addition, the phase factor WN (WNk )
X (K ) F (k N / 2) W k
F (K N / 2)
1 N 2
The implementation using the periodicity property is also shown in following Figure
ww
Figure 2.1 Illustration of flow graph of the first stage DIT FFT algorithm for N = 8.
Having performed the decimation in time once, we can repeat the process for each of the
www.Notesfree.in
www.Notesfree.in
sequences f1(n) and f2(n). Thus f1(n) would result in two (N/4)-point sequences and f2(n) would
result in another two (N/4)-point sequences.
e .in
fre
tes
No
Figure 2.4 Illustration of complete flow graph obtained by combining all the three stages for N = 8.
The x(n) in bit reversed order is decimated into 4 numbers of 2-point sequences as
shown below.
(i) x(0) and x(4)
(ii) x(2) and x(6)
(iii) x(1) and x(5)
(iv) x(3) and x(7)
Using the decimated sequences as input, the 8-point DFT is computed. Figure 7.5 shows the
three stages of computation of an 8-point DFT.
The computation of 8-point DFT of an 8-point sequence in detail is given below. The 8-
point sequence is decimated into 4-point sequences and 2-point sequences as shown below.
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
(a) (b) (c)
Figure 7.6 (a)–(c) Flow graphs for implementation of first, 2nd and 3rd stages of computation.
No
Butterfly Diagram
Observing the basic computations performed at each stage, we can arrive at the following
conclusions:
(i) In each computation, two complex numbers a and b are considered.
(ii) The complex number b is multiplied by a phase factor WkN.
w.
(iii) The product bWkNis added to the complex number a to form a new complex number A.
(i) The product bWk N is subtracted from complex number a to form new complex
number B.
The above basic computation can be expressed by a signal flow graph shown in Figure 7.7.
The signal flow graph is also called butterfly diagram since it resembles a butterfly.
ww
Figure 7.7 Basic butterfFy diagram or fFow graph of radix–2 DI† FF†.
The complete flow graph for 8-point DIT FFT considering periodicity drawn in a way
to remember easily is shown in Figure 7.8. In radix-2 FFT, N/2 butterflies per stage are
required to represent the computational process. In the butterfly diagram for 8-point DFT
shown in Figure 7.8, for symmetry, W 20 , W4 0 and W8 0 are shown on the graph eventhough they
are unity. The subscript 2 indicates that it is the first stage of computation. Similarly,
subscripts 4 and 8 indicate the second and third stages of computation.
www.Notesfree.in
www.Notesfree.in
Figure 7.8 †he signal flow graph or butterfly diagram for 8–point radix–2 DIT FFT.
.in
DECIMATION IN FREQUENCY (DIF) RADIX-2 FFT
In decimation in frequency algorithm, the frequency domain sequence X(k) is decimated. In
this algorithm, the N-point time domain sequence is converted to two numbers of N/2-point
e
sequences. Then each N/2-point sequence is converted to two numbers of N/4-point
sequences. This process is continued until we get N/2 numbers of 2-point sequences. Finally,
fre
the 2-point DFT of each 2-point sequence is computed. The 2-point DFTs of N/2 numbers of 2-
point sequences will give N-samples, which is the N-point DFT of the time domain sequence.
Here the equations for N/2-point sequences, N/4-point sequences, etc., are obtained by
decimation of frequency domain sequences. Hence this method is called DIF.
To derive the decimation-in-frequency form of the FFT algorithm for N, a power of 2,
we can first divide the given input sequence x(n) = {x(0), x(1), x(2), x(3), x(4), x(5), x(6),
tes
x(7) into the first half and last half of the points so that its DFT X(k) is
N 1 N / 21 N 1
X (K ) x(n)WN nk x(n)W N
nk
W N nk x(n)W nk N
n0 n0 n N / 2
No
N / 21 N / 21
x(n)W
N
nk
W N nk
x(n N / 2)W
n N / 2
N
(n N / 2)k
n0
It is important to observe that while the above equation for X(k) contains two summations
over N/2-points, each of these summations is not an N/2-point DFT, since WNnk rather than
nk N/2
W
w.
N / 21 N / 21
X (K )
x(n N / 2)W
nk
x(n)W nk
W N ( N / 2)k
N N
n0 n0
N
nk
(1)nk x(n )W
ww
N / 21
x(n)W
nk
N
N
n0 2
N nk
N / 21 x(n) (1) x(n ) W
nk
2 N
n0
Let us split X(k) into even and odd numbered samples. For even values of k, the X(k) can be
written as
N
X (2K ) N / 21 x(n) (1)2k x(n )W
2nk
N
n0 2
N
N / 21 x(n) x(n ) W nk
2 N
n0
N
X (2K 1) N / 21 x(n) (1)2k1 x(n )W (2k 1)n
2 N
n0
N
N / 21 x(n) x(n ) W nk
2 N
WN /2 nk
n0
The above equations for X(2k) and X(2k + 1) can be recognized as N/2-point DFTs. X(2k) is
the DFT of the sum of first half and last half of the input sequence, i.e. of
{x(n) + x(n + N/2)} and X(2k + 1) is the DFT of the product W n with the difference of first
N
n
half and last half of the input, i.e. of {x(n) x(n + N/2)}WN .
.in
If we define new time domain sequences, u1(n) and u2(n) consisting of N/2-samples, such that
e
fre
then the DFTs U1(k) = X(2k) and U2(k) = X(2k + 1) can be computed by first forming the
sequences u1(n) and u2(n), then computing the N/2-point DFTs of these two sequences to
tes
obtain the even numbered output points and odd numbered output points respectively. The
procedure suggested above is illustrated in Figure 7.9 for the case of an 8-point sequence.
No
w.
ww
Figure 7.9 FFow graph of the DIF decomposition of an N–point DF† computation into two N/2–point
DF† computations N = 8.
www.Notesfree.in
www.Notesfree.in
Now each of the N/2-point frequency domain sequences, U1(k) and U2(k) can be decimated
into two numbers of N/4-point sequences and four numbers of new N/4-point sequences can be
obtained from them.
Let the new sequences be v11(n), v12(n), v21(n), v22(n). On similar lines as discussed
above, we can get
e .in
fre
tes
This process is continued till we get only 2-point sequences. The DFT of those 2-point
sequences is the DFT of x(n), i.e. X(k) in bit reversed order.
The third stage of computation for N = 8 is shown in Figure 7.11.
No
Observing the basic calculations, each stage involves N/2 butterflies of the type shown
w.
in Figure 7.12.
The butterfly computation involves the following operations:
(i) In each computation two complex numbers a and b are considered.
(ii) The sum of the two complex numbers is computed which forms a new complex
number A.
ww
(iii) Subtract the complex number b from a to get the term (a – b). The difference term
(a – b) is multiplied with the phase factor or twiddle factor W Nn to form a new
complex number B.
The signal flow graph or butterfly diagram of all the three stages together is shown in Figure
7.13.
e .in
Figure 7.13 SignaF fFow graph or butterfFy diagram for the 8–point radix–2 DIF FF† aFgorithm.
Figure 7.14 (a)–(c) †he first, second and third stages of computation of 8–point DF† by Radix–2 DIF FF†.
e .in
fre
tes
The term inside the square brackets in the above equation for x(n) is same as the DFT
computation of a sequence X*(k) and may be computed using any FFT algorithm. So we can
say that the IDFT of X(k) can be obtained by finding the DFT of X*(k), taking the conjugate
of that DFT and dividing by N. Hence, to compute the IDFT of X(k) the following procedure
can be followed
1. Take conjugate of X(k), i.e. determine X*(k).
No
EXAMPLE 1 Draw the butterfly line diagram for 8-point FFT calculation and briefly explain.
Use decimation-in-time algorithm.
Solution: The butterfly line diagram for 8-point DIT FFT algorithm is shown in following
Figure
ww
www.Notesfree.in
www.Notesfree.in
.in
Figure : Butterfly Fine diagram for 8–point DIT FFT algorithm for N = 8.
e
Solution: The 8-point radix-2 DIF FFT algorithm
1. It involves 3 stages of computation. The input to the first stage is the input time sequence
fre
x(n) in normal order. The output of first stage is the input to the second stage and the
output of second stage is the input to the third stage. The output of third stage is the 8-
point DFT in bit reversed order.
2. In DIF algorithm, the frequency domain sequence X(k) is decimated.
tes
3. In this algorithm, the N-point time domain sequence is converted to two numbers of N/2-
point sequences. Then each N/2-point sequence is converted to two numbers of N/4-point
sequences. Thus, we get 4 numbers of N/4, i.e. 2-point sequences.
4. Finally, the 2-point DFT of each 2-point sequence is computed. The 2-point DFTs of N/2
number of 2-point sequences will give N-samples which is the N-point DFT of the time
No
domain sequence. The implementation of the 8-point radix-2 DIF FFT algorithm is shown
in Figure 7.16.
w.
ww
Figure 7.16 Butterfly Fine diagram for 8–point radix–2 DIF FFT algorithm.
www.Notesfree.in
www.Notesfree.in
EXAMPLE 7.4 What is FFT? Calculate the number of multiplications needed in the calculation
of DFT using FFT algorithm with 32-point sequence.
Solution: The FFT, i.e. Fast Fourier transform is a method (or algorithm) for computing
the DFT with reduced number of calculations. The computational efficiency is achieved by
adopting a divide and conquer approach. This approach is based on the decomposition of an N-
point DFT into successively smaller DFTs. This basic approach leads to a family of efficient
computational algorithms known as FFT algorithms. Basically there are two FFT algorithms. (i)
DIT FFT algorithm and (ii) DIF FFT algorithm. If the length of the sequence N = 2 m, 2
indicates the radix and m indicates the number of stages in the computation. In radix-2 FFT, the
N-point sequence is decimated into two N/2-point sequences, each N/2-point sequence is
decimated into two N/4-point sequences and so on till we get two point sequences. The DFTs
of two point sequences are computed and DFTs of two 2-point sequences are combined into
DFT of one 4-point sequence, DFTs of two 4-point sequences are combined into DFT of one 8-
.in
point sequence and so on till we get the N-point DFT.
The number of multiplications needed in the computation of DFT using FFT algorithm
N 32
with N = 32-point sequence is = log N = log 25 = 80 .
2 2
2 2
The number of complex additions
e
= N log2 N = 32 log2 32 = 32 log2 25 = 160
EXAMPLE 7.5 Explain the inverse FFT algorithm to compute inverse DFT of a 8-point
Solution:
fre
DFT. Draw the flow graph for the same.
The IDFT of an 8-point sequence {X(k), k = 0, 1, 2, ..., 7} is defined as
tes
No
w.
ww
The term inside the square brackets in the RHS of the above expression for x(n) is the 8- point DFT
of X *(k). Hence, in order to compute the IDFT of X(k) the following procedure can be followed:
1. Given X(k), take conjugate of X (k) i.e. determine X *(k).
2. Compute the DFT of X*(k) using radix-2 DIT or DIF FFT, [This gives 8x*(n)]
www.Notesfree.in
www.Notesfree.in
e .in
fre
Figure 7.18 Computation of 8–point DF† of X*(k) by radix–2, DI† FF†.
From Figure 7.18, we get the 8-point DFT of X*(k) by DIT FFT as
tes
8x*(n) = {8x* (0), 8x*(1), 8x* (2), 8x* (3), 8x*(4), 8x* (5), 8x* (6), 8x* (7)}
1 * * * * * * * * *
x(n) = {8x (0), 8x (1), 8x (2), 8x (3), 8x (4), 8x (5), 8x (6), 8x (7)}
8
No
EXAMPLE 7.11 Compute the DFT of the sequence x(n) = {1, 0, 0, 0, 0, 0, 0, 0} (a) directly,
(b) by FFT.
Solution: (a) Direct computation of DFT
The given sequence is x(n) = {1, 0, 0, 0, 0, 0, 0, 0}. We have to compute 8-point DFT. So
N = 8.
N 1 2 N 1 7
DFT {x(n)} = X(k) = x(n) e j nk x(n) Wnk = x(n) Wnk
w.
N =
N 8
n 0 n 0 n 0
ww
www.Notesfree.in
www.Notesfree.in
= (1) (1) + (0) (W8 1) + (0)W8 2 + (0) W8 3 + (0)W8 4 + (0)W 58 + (0)W 68+ (0)W 78= 1
X(k) = 1 for all k
X(0) = 1, X(1) = 1, X(2) = 1, X(3) = 1, X(4) = 1, X(5) = 1, X(6) = 1, X(7) = 1
X(k) = {1, 1, 1, 1, 1, 1, 1, 1}
(b) Computation by FFT. Here N = 8 = 23
The computation of 8-point DFT of x(n) = {1, 0, 0, 0, 0, 0, 0, 0} by radix-2 DIT FFT
algorithm is shown in Figure 7.31. x(n) in bit reverse order is
.in
xr(n) = {x(0), x(4), x(2), x(6), x(1), x(5), x(3), x(7)}
= {1, 0, 0, 0, 0, 0, 0, 0}
For DIT FFT input is in bit reversed order and output is in normal order.
From Figure 7.31, the 8-point DFT of the given x(n) is X(k) = {1, 1, 1, 1, 1, 1, 1, 1}
e
EXAMPLE 7.12 An 8-point sequence is given by x(n) = {2, 2, 2, 2, 1, 1, 1, 1}.
Compute the 8-point DFT of x(n) by
(a) Radix-2 DIT FFT algorithm
(b) Radix-2 DIF FFT algorithm
fre
Also sketch the magnitude and phase spectrum.
tes
No
w.
= {2, 2, 2, 2, 1, 1, 1, 1}
The given sequence in bit reversed order is
xr(n) = {x(0), x(4), x(2), x(6), x(1), x(5), x(3), x(7)}
= {2, 1, 2, 1, 2, 1, 2, 1}
For DIT FFT, the input is in bit reversed order and the output is in normal order. The
computation of 8-point DFT of x(n), i.e. X(k) by Radix-2 DIT FFT algorithm is shown in
Figure 7.32.
www.Notesfree.in
www.Notesfree.in
e .in
fre
Figure 7.33 Computation of 8–point DF† of x(n) by radix–2 DIF FF† aFgorithm.
From Figure 7.33, we observe that the 8-point DFT in bit reversed order is
tes
Xr (k) = {X(0), X(4), X(2), X(6), X(1), X(5), X(3), X(7)}
= {12, 0, 0, 0, 1 j2.414, 1 + j0.414, 1 j0.414, 1 + j2.414}
The 8-point DFT in normal order is
No
www.Notesfree.in
www.Notesfree.in
The magnitude and phase spectrum are shown in Figures 7.34(a) and (b).
e .in
EXAMPLE 7.13
fre
Figure 7.34 (a) Magnitude spectrum, (b) Phase spectrum.
= {2, 1, 2, 1, 2, 1, 2, 1}
For DIT FFT computation, the input sequence must be in bit reversed order and the output
No
From Figure 7.35, we get the 8-point DFT of x(n) as X(k) = {12, 0, 0, 0, 4, 0, 0, 0}
ww
www.Notesfree.in
www.Notesfree.in
EXAMPLE 7.14 Compute the DFT for the sequence x(n) = {1, 1, 1, 1, 1, 1, 1, 1}.
Solution: The given sequence is x(n) = {x(0), x(1), x(2), x(3), x(4), x(5), x(6), x(7)}
= {1, 1, 1, 1, 1, 1, 1, 1}
The computation of 8-point DFT of x(n), i.e. X(k) by radix-2, DIT FFT algorithm is shown
in Figure 7.36.
The given sequence in bit reversed order is
xr(n) = {x(0), x(4), x(2), x(6), x(1), x(5), x(3), x(7)}
= {1, 1, 1, 1, 1, 1, 1, 1}
.in
For DIT FFT, the input is in bit reversed order and output is in normal order.
e
fre
tes
Figure 7.36 Computation of 8–point DF† of x(n) by radix–2, DI† FF†.
From Figure 7.36, we get the 8-point DFT of x(n) as X(k) = {8, 0, 0, 0, 0, 0, 0, 0}.
No
w.
ww
www.Notesfree.in
www.Notesfree.in
EXAMPLE 7.15 Given a sequence x(n) = {1, 2, 3, 4, 4, 3, 2, 1}, determine X(k) using
DIT FFT algorithm.
Solution: The given sequence is x(n) = {x(0), x(1), x(2), x(3), x(4), x(5), x(6), x(7)}
= {1, 2, 3, 4, 4, 3, 2, 1}
The computation of 8-point DFT of x(n), i.e. X(k) by radix-2, DIT FFT algorithm is shown
in Figure 7.37. For DIT FFT, the input is in bit reversed order and the output is in normal
order.
The given sequence in bit reverse order is
xr(n) = {x(0), x(4), x(2), x(6), x(1), x(5), x(3), x(7)} = {1, 4, 3, 2, 2, 3, 4, 1}
e .in
fre
tes
Figure 7.37 Computation of 8–point DF† of x(n) by radix–2, DI† FF†.
EXAMPLE 7.16 Given a sequence x(n) = {0, 1, 2, 3, 4, 5, 6, 7}, determine X(k) using
DIT FFT algorithm.
Solution: The given sequence is x(n) = {x(0), x(1), x(2), x(3), x(4), x(5), x(6), x(7)}
= {0, 1, 2, 3, 4, 5, 6, 7}
w.
The computation of 8-point DFT of x(n), i.e. X(k) by radix-2, DIT FFT algorithm is shown
in Figure 7.38. For DIT FFT, the input is in bit reversed order and output is in normal order.
The given sequence in bit reverse order is
xr(n) = {x(0), x(4), x(2), x(6), x(1), x(5), x(3), x(7)}
= {0, 4, 2, 6, 1, 5, 3, 7}
ww
www.Notesfree.in
www.Notesfree.in
.in
Figure 7.38 Computation of 8–point DF† of x(n) by radix–2, DI† FF†.
e
X(k) = {28, 4 + j9.656, 4+ 4+ 4 j1.656, 4 j4, j9.656}
j4, j1.656, 4, 4
EXAMPLE 7.18
X(k) = {4, 1
fre
Find the IDFT of the sequence
j2.414, 0, 1 j0.414, 0, 1 + j0.414, 0, 1 + j2.414}
using DIF algorithm.
tes
Solution: The IDFT x(n) of the given 8-point sequence X(k) can be obtained by finding
X*(k), the conjugate of X(k), finding the 8-point DFT of X*(k), using DIF algorithm to get
No
w.
ww
www.Notesfree.in
www.Notesfree.in
8x*(n), taking the conjugate of that to get 8x(n) and then dividing the result by 8 to get x(n).
For DIF algorithm, input X *(k) must be in normal order. The output will be in bit reversed
order for the given X(k).
e .in
fre
Figure 7.42 Computation of 8–point DF† of X*(k) by radix–2 DIF FF†.
X(k) = {7, 0.707 j0.707, j, 0.707 j0.707, 1, 0.707 + j0.707, 0.707 + j0.707}
j,
using DIT algorithm.
Solution: The IDFT x(n) of the given sequence X(k) can be obtained by finding X*(k), the
conjugate of X(k), finding the 8-point DFT of X*(k) using radix-2 DIT FFT algorithm to get
w.
8x*(n), taking the conjugate of that to get 8x(n) and then dividing by 8 to get x(n). For DIT
FFT, the input X*(k) must be in bit reverse order. The output 8x*(n) will be in normal order.
For the given X(k).
www.Notesfree.in
www.Notesfree.in
The 8-point DFT of X*(k) using radix-2, DIT FFT algorithm is computed as shown in
Figure 7.43.
e .in
Figure 7.43 Computation of 8–point DF† of X*(k) by radix–2, DI† FF†.
Solution: The IDFT x(n) of the given sequence X(k) can be obtained by finding X*(k), the
conjugate of X(k), finding the 8-point DFT of X*(k) using DIF algorithm to get 8x*(n) taking
the conjugate of that to get 8x(n) and then dividing the result by 8 to get x(n). For DIF
algorithm, the input X*(k) must be in normal order and the output 8x*(n) will be in bit
No
reversed order.
For the given X(k)
X*(k) = {12, 0, 0, 0, 4, 0, 0, 0}
The 8-point DFT of X*(k) using radix-2, DIF FFT algorithm is computed as shown in Figure
7.44.
w.
8xr (n) = {16, 16, 16, 16, 8, 8, 8, 8}* = {16, 16, 16, 16, 8, 8, 8, 8}
ww
1
x(n) = {16, 8, 16, 8, 16, 8, 16, 8} = {2, 1, 2, 1, 2, 1, 2, 1}
www.Notesfree.in
www.Notesfree.in
.in
e
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
UNIT-III
IIR DIGITAL FILTERS
Introduction
.in
Filters are of two types—FIR and IIR. The types of filters which make use of feedback
connection to get the desired filter implementation are known as recursive filters. Their impulse
response is of infinite duration. So they are called IIR filters. The type of filters which do not
employ any kind of feedback connection are known as non-recursive filters. Their impulse
response is of finite duration. So they are called FIR filters. IIR filters are designed by
e
considering all the infinite samples of the impulse response. The impulse response is obtained
by taking inverse Fourier transform of ideal frequency response. There are several techniques
available for the design of digital filters having an infinite duration unit impulse response. The
fre
popular methods for such filter design uses the technique of first designing the digital filter in
analog domain and then transforming the analog filter into an equivalent digital filter because the
analog filter design techniques are well developed. Various methods of transforming an analog
filter into a digital filter and methods of designing digital filters are discussed.
tes
Requirements for transformation
The system function describing an analog filter may be written as
M
Y (s) bk sk
H (s) = = k0
No
a N
X(s)
ak sk
k
where {ak} and {bk} are filter coefficients.
The impulse response of these filter coefficients is related to Ha(s) by the Laplace
transform.
w.
The analog filter having the rational system function Ha(s) is expressed by a linear constant
coefficient differential equation.
N M
dk y(t) dk x(t)
ak dtk
= dtk
bk
k 0 k0
www.Notesfree.in
www.Notesfree.in
where x(t) is the input signal and y(t) is the output of the filter.
The above three equivalent characterizations of an analog filter leads to three alternative
methods for transforming the analog filter into digital domain. The restriction on the design is
that the filters should be realizable and stable.
For stability and causality of analog filter, the analog transfer function should satisfy
the following requirements:
.in
1. The Ha(s) should be a rational function of s, and the coefficients of s should be real.
2. The poles should lie on the left half of s-plane.
3. The number of zeros should be less than or equal to the number of poles.
For stability and causality of digital filter, the digital transfer function should satisfy the
following requirements:
e
1. The H(z) should be a rational function of z and the coefficients of z should be real.
2. The poles should lie inside the unit circle in z-plane.
fre
3. The number of zeros should be less than or equal to the number of poles.
We know that the analog filter with transfer function Ha(s) is stable if all its poles lie
in the left half of the s-plane. Consequently for the conversion technique to be effective, it
should possess the following desirable properties:
tes
1. The imaginary axis in the s-plane should map into the unit circle in the z-plane.
Thus, there will be a direct relationship between the two frequency variables in the two
domains.
2. The left half of the s-plane should map into the interior of the unit circle centered at
the origin in z-plane. Thus, a stable analog filter will be converted to a stable digital
filter.
No
The physically realizable and stable IIR filter cannot have a linear phase. For a filter to
have a linear phase, the condition to be satisfied is h(n) = h(N – 1 – n) where N is the length
of the filter and the filter would have a mirror image pole outside the unit circle for every
pole inside the unit circle. This results in an unstable filter. As a result, a causal and stable
IIR filter cannot have linear phase. In the design of IIR filters, only the desired magnitude
response is specified and the phase response that is obtained from the design methodology is
w.
accepted.
The comparison of digital and analog filters is given below.
1. It operates on digital samples (or sampled 1. It operates on analog signals (or actual
version) of the signal. signals).
2. It is governed (or defined) by linear 2. It is governed (or defined) by linear differ-
difference equations. ential equations.
3. It consists of adders, multipliers, and delay 3. It consists of electrical components like
elements implemented in digital logic resistors, capacitors, and inductors.
(either in hardware or software or both).
4. In digital filters, the filter coefficients are 4. In analog filters, the approximation problem
designed to satisfy the desired frequency is solved to satisfy the desired frequency
response. response.
www.Notesfree.in
www.Notesfree.in
.in
registers used to store the filter coefficients. Hence by increasing the register bit
length (in hardware) the performance characteristics of the filter like accuracy,
dynamic range, stability and frequency response tolerance, can be enhanced.
3. The digital filters are programmable. Hence the filter coefficients can be changed
any time to implement adaptive features.
e
4. A single filter can be used to process multiple signals by using the techniques of
multiplexing.
invariant transformation method. However the IIR filter design using these methods is
appropriate only for the design of low-pass filters and band pass filters whose resonant
frequencies are small. These techniques are not suitable for high-pass or band rejects filters. The
limitation is overcome in the mapping technique called the bilinear transformation. This
transformation is a one-to-one mapping from the s-domain to the z-domain. That is, the bilinear
transformation is a conformal mapping that transforms the imaginary axis of s-plane into the unit
ww
circle in the z-plane only once, thus avoiding aliasing of frequency components. In this mapping,
all points in the left half of s-plane are mapped inside the unit circle in the z-plane, and all points
in the right half of s-plane are mapped outside the unit circle in the z-plane. So the
transformation of a stable analog filter results in stable digital filter. The bilinear transformation
can be obtained by using the trapezoidal formula for the numerical integration.
b
Let the system function of the analog filter be Ha (s) =
s+a
The differential equation describing the above analog filter can be obtained as:
Y (s) b s
H (s) = =
a +a
X(s)
www.Notesfree.in
www.Notesfree.in
.in
The trapezoidal rule for numeric integration is expressed as:
e
Therefore, we get fre
Taking z-transform, we get
tes
T T
Y (z)[1 z1] + a 1
[1 + z ] Y (z) = b [1 + z 1 ] X(z)
2 2
Therefore, the system function of the digital filter is:
No
Comparing this with the analog filter system function Ha(s) we get
w.
This is the relation between analog and digital poles in bilinear transformation. So to convert
an analog filter function into an equivalent digital filter function, just put
The general characteristic of the mapping z = esT may be obtained by putting s = and expressing the
complex variable z in the polar form as in the above equation for s.
Thus,
www.Notesfree.in
www.Notesfree.in
Since s = , we get
.in
And
e
From the above equation for , we observe that if r < 1 then σ < 0 and if r > 1, then σ >
fre
0, and if r = 1, then σ = 0. Hence the left half of the s-plane maps into points inside
the unit circle in the z-plane, the right half of the s-plane maps into points outside the unit
circle in the z-plane and the imaginary axis of s-plane maps into the unit circle in the z-plane.
This transformation results in a stable digital system.
The above relation between analog and digital frequencies shows that the entire range in Ω
is mapped only once into the range –π ≤ ω ≤ π . The entire negative imaginary axis in the s-
plane (from Ω = – ∞ to 0) is mapped into the lower half of the unit circle in z-plane (from
ω = –π to 0) and the entire positive imaginary axis in the s-plane (from Ω= α to 0) is
mapped into the upper half of unit circle in z-plane (from ω = 0 to +π ).
But as seen in Figure 1, the mapping is non-linear and the lower frequencies in analog
domain are expanded in the digital domain, whereas the higher frequencies are
www.Notesfree.in
www.Notesfree.in
.in
Figure 1 Mapping between Ω and ω in bilinear transformation.
e
frequency warping. fre
compressed. This is due to the nonlinearity of the arctangent function and usually known as
frequencies, the analog filter transfer function is designed, and then it is transformed to digital
filter transfer function.
This effect of warping on the phase response can be explained by considering an analog
filter with linear phase response as shown in Figure 2(b). The phase response of corresponding
digital filter will be nonlinear.
w.
ww
Figure 2 The warping effect on (a) magnitude response and (b) phase response.
It can be stated that the bilinear transformation preserves the magnitude response of an
analog filter only if the specification requires piecewise constant magnitude, but the phase
response of the analog filter is not preserved. Therefore, the bilinear transformation can be used
only to design digital filters with prescribed magnitude response with piecewise constant
values. A linear phase analog filter cannot be transformed into a linear phase digital filter
www.Notesfree.in
www.Notesfree.in
EXAMPLE 1
.in
into a digital IIR filter by using bilinear transformation. The digital IIR filter is having a
resonant frequency of ω r =π/2.
Solution: From the transfer function, we observe that Ω c = 3. The sampling period
T can be determined using the equation:
e
fre
Using the bilinear transformation, the digital filter system function is:
tes
No
w.
ww
EXAMPLE 2
Convert the analog filter with system function
Ha (s) = s + 0.5
(s + 0.5)2 + 16
into a digital IIR filter using the bilinear transformation. The digital filter should have a
resonant frequency of ω r =π/2.
Solution: From the system function, we observe that Ω c = 4. The sampling period T can be
www.Notesfree.in
www.Notesfree.in
i.e.
.in
Using the bilinear transformation, the digital filter system function is:
e
fre
tes
No
EXAMPLE 3
w.
and T = 0.5 s
To obtain H(z) using the bilinear transformation in Ha(s) , replace s by
www.Notesfree.in
www.Notesfree.in
e .in
EXAMPLE 4
fre
tes
Obtain H(z) from Ha(s) when T = 1 s and
Solution: Given
and T = 1 s.
To get H(z) using the bilinear transformation, put
w.
ww
www.Notesfree.in
www.Notesfree.in
e .in
EXAMPLE 5
Given T = 1 s,
w.
ww
www.Notesfree.in
www.Notesfree.in
EXAMPLE 6
A digital filter with a 3 dB bandwidth of 0.4 is to be designed from the
analog filter whose system response is:
.in
Solution: We know that
e
Here the 3 dB bandwidth ωc = 0.4
fre
The system response of the digital filter is given by
tes
No
w.
EXAMPLE 7
The normalized transfer function of an analog filter is given by
ww
Convert the analog filter to a digital filter with a cutoff frequency of 0.6, using the bilinear
transformation.
Solution: The prewarping of analog filter has to be performed to preserve the magnitude
response. For this the analog cutoff frequency is determined using the bilinear transformation,
and the analog transfer function is unnormalized using this analog cutoff frequency. Then the
analog transfer function is converted to digital transfer function using the bilinear transformation.
Given that, digital cutoff frequency, ωc = 0.6 π rad/s. Let T = 1s.
In the bilinear transformation,
Analog cutoff frequency
www.Notesfree.in
www.Notesfree.in
.in
The digital filter system function H(z) is obtained by substituting
e
Ha(s). Here T = 1. Therefore, the digital filter transfer function is:
fre
tes
No
The magnitude response of low-pass filter in terms of gain and attenuation are shown
in Figure 1.
ww
(a ) (b)
Figure 3 Magnitude response of low–pass filter (a) Gain vs ω and (b) Attenuation vs ω.
Let ω1 = Passband frequency in rad/s.
ω2 = Stopband frequency in rad/s.
Let the gain at the passband frequency ω1 be A1 and the gain at the stopband frequency
ω2 be A2, i.e.
www.Notesfree.in
www.Notesfree.in
The filter may be expressed in terms of the gain or attenuation at the edge frequencies.
Let α1 be the attenuation at the passband edge frequency ω1, and α 2 be the attenuation at the
stopband edge frequency ω2.
.in
2
The maximum value of normalized gain is unity, so A1 and A2 are less than 1 and α1
and α2 are greater than 1. In Figure 1, A1 is assumed as 1/ 2 and A2 is assumed as 0.1.
e
Hence α 1 =1.421 = and α 2 = 1/0.1 = 10.
Another popular unit that is used for filter specification is dB. When the gain is
positive dB.
fre
expressed in dB, it will be a negative dB. When the attenuation is expressed in dB, it will be a
Figure 4 Magnitude response of low–pass filter (a) dB–Gain vs ω and (b) dB–attenuation vs ω.
Sometimes the specifications are given in terms of passband ripple and stopband
ripple In this case, the dB gain and attenuation can be estimated as follows:
www.Notesfree.in
www.Notesfree.in
If the ripples are specified in dB, then the minimum passband ripple is equal to k1 and
the negative of maximum passband attenuation is equal to k2.
.in
Butterworth IIR digital filter, first an analog Butterworth filter transfer function is determined
using the given specifications. Then the analog filter transfer function is converted to a digital
filter transfer function using either impulse invariant transformation or bilinear
transformation
e
Analog Butterworth filter
fre
The analog Butterworth filter is designed by approximating the ideal frequency response
using an error function. The error function is selected such that the magnitude is maximally
flat in the passband and monotonically decreasing in the stopband. (Strictly speaking the
magnitude is maximally flat at the origin, i.e., at = 0, and monotonically decreasing with
increasing ).
The magnitude response of low-pass filter obtained by this approximation is given by
tes
No
increases. However, the phase response of the Butterworth filter becomes more nonlinear with
increasing N.
ww
e .in
fre
These two equations can be written in the form
tes
And
No
Assuming equality we can obtain the filter order N and the 3 dB cutoff frequency
Dividing the first equation by the second, we have
w.
If N is not an integer, the value of N is chosen to be the next nearest integer. Also we can get
www.Notesfree.in
www.Notesfree.in
A1 in dB is given by
A1 dB = –20 log A1
A1 dB
i.e. log A1 =
20
.in
or
i.e.
e
fre
tes
Similarly
No
w.
and is given by
ww
In fact,
www.Notesfree.in
www.Notesfree.in
Where
.in
If (where is the 3 dB cutoff frequency of the low-pass filter) is replaced by sn, then the
e
normalized Butterworth filter transfer function is given by
fre
tes
Step 3 Decide the order N of the filter. The order N should be such that
Choose N such that it is an integer just greater than or equal to the value obtained above.
www.Notesfree.in
www.Notesfree.in
.in
Step 5 Determine the transfer function of the analog filter.
Let Ha(s) be the transfer function of the analog filter. When the order N is even,
for unity dc gain filter, Ha(s) is given by
e
fre
When the order N is odd, for unity dc gain filter, Ha(s) is given by
tes
The coefficient bk is given by
Step 6 Using the chosen transformation, transform the analog filter transfer function Ha(s)
to digital filter transfer function H(z).
Step 7 Realize the digital filter transfer function H(z) by a suitable structure.
www.Notesfree.in
www.Notesfree.in
n
The transfer function of the above equation will have 2N poles which are given by the
roots of the denominator polynomial. It can be shown that the poles of the transfer function
.in
symmetrically lie on a unit circle in s-plane with angular spacing of .
For a stable and causal filter the poles should lie on the left half of the s-plane. Hence
the desired filter transfer function is formed by choosing the N-number of left half poles.
When N is even, all the poles are complex and exist in conjugate pairs. When N is odd, one
of the pole is real and all other poles are complex and exist as conjugate pairs. Therefore,
the transfer function of Butterworth filters will be a product of second order factors.
e
The poles of the Butterworth polynomial lie on a circle, whose radius is . To
determine the number of poles of the Butterworth filter and the angle between them we use
the following rules.
fre
• Number of Butterworth poles = 2N
• Angle between any two poles = 360°/(2N)
If the order of the filter N is even, then the location of the first pole is at w.r.t. the
positive real axis, with the angle measured in the counter-clockwise direction. The location
tes
of the subsequent poles are respectively, at
No
If the order of the filter N is odd, then the location of the first pole is on the X-axis. The
location of subsequent poles are at θ , 2θ , ..., (360 –θ ) with the angle measured in the counter-
clockwise direction.
If is the angle of a valid pole w.r.t. the X-axis, then the pole and its conjugate are
located at .
w.
3. The magnitude response approaches the ideal response as the value of N increases.
4. The magnitude is maximally flat at the origin.
5. The magnitude is monotonically decreasing function of
6. At the cutoff frequency fic, the magnitude of normalized Butterworth filter is 1/
2 . Hence the dB magnitude at the cutoff frequency will be 3 dB less than the
maximum value.
EXAMPLE 8
Design a Butterworth digital filter using the bilinear transformation. The
specifications of the desired low-pass filter are:
with T = 1 s
www.Notesfree.in
www.Notesfree.in
Solution: The Butterworth digital filter is designed as per the following steps.
From the given specification, we have
e .in
Step 3
fre
Determination of the order of the filter N
tes
No
Step 5 Determination of the transfer function of the analog Butterworth filter Ha(s)
where
www.Notesfree.in
www.Notesfree.in
For N = 3, we have
where
.in
Step 6 Conversion of Ha(s) into H(z)
Since bilinear transformation is to be used, the digital filter transfer function is
e
fre
tes
No
EXAMPLE 9
Design a low-pass Butterworth digital filter to give response of 3 dB or less for
frequencies upto 2 kHz and an attenuation of 20 dB or more beyond 4 kHz. Use the bilinear
transformation technique and obtain H(z) of the desired filter.
Solution: The specifications of the desired filter are given in terms of dB attenuation and
frequency in Hz. First the gain is to be expressed as a numerical value and frequency in rad/s.
w.
www.Notesfree.in
www.Notesfree.in
.in
Step 3 Order of the filter
e
fre
tes
Unnormalized
w.
www.Notesfree.in
www.Notesfree.in
e .in
EXAMPLE 10 fre
Design a low-pass Butterworth filter using the bilinear transformation
method for satisfying the following constraints:
Passband: 0–400 Hz Stopband: 2.1– 4 kHz
tes
Passband ripple: 2 dB Stopband attenuation: 20 dB
Sampling frequency: 10 kHz
Solution: Given
an1d A1= 10 k1 = 10 2/20 = 0.794
/20
α1 = 2 dB, k1 = –2 dB
α2 = 20 dB, k2 = –20 dB A 2 = 10 k2 /20 = 10 20/20 = 0.1
No
f
ww
www.Notesfree.in
www.Notesfree.in
e .in
Step 4 The cutoff frequency
fre
tes
(4915.788)2
=
s2 + 1.414 4915.788 s + (4915.788)2
w.
2.416 107
=
s2 + 6950.92 s + 2.416 107
Step 6 Digital transfer function H(z)
ww
www.Notesfree.in
www.Notesfree.in
EXAMPLE 11
A digital low-pass filter is required to meet the following specifications.
.in
Passband attenuation ≤ 1 dB Passband edge = 4 kHz
Stopband attenuation 40 dB Stopband edge = 8 kHz
Sampling rate = 24 kHz
The filter is to be designed by performing the bilinear transformation on an analog
system function. Design the Butterworth filter.
e
Solution: Given α1 = 1 dB, k1 = –1 dB and A1 = 10k1/20 = 10 1/20 = 0.8912
fre
= 40 dB, k2 = – 40 dB
α2
ω1 =
and A2 = 10k2 = 1040/20 = 0.01
Since fs = 24 kHz, normalized angular frequencies are:
2 πf1
= 2π
/20
4000
= 1.047 rad/s
f1 = 4 kHz, fs 24000
tes
ω 2=
2πf2 = 2π 8000 = 2.094 rad/s
f2 = 8 kHz, fs 24000
The Butterworth filter is designed as follows:
Step 1 Type of transformation
Bilinear transformation is already specified.
No
www.Notesfree.in
www.Notesfree.in
.in
Step 5 Analog filter transfer function Ha(s)
e
fre
tes
EXAMPLE 12
Design a digital IIR low-pass filter with passband edge at 1000 Hz and stopband edge at
1500 Hz for a sampling frequency of 5000 Hz. The filter is to have a passband ripple of 0.5 dB
and a stopband ripple below 30 dB. Design a Butterworth filter using the bilinear transformation.
Solution: Given fs = 5000 Hz, the normalized frequencies are given as:
www.Notesfree.in
www.Notesfree.in
.in
Step 3 Order of the filter N
e
fre
tes
Step 4 The cutoff frequency
No
www.Notesfree.in
www.Notesfree.in
.in
EXAMPLE 13
Determine the order of a Butterworth low-pass filter satisfying the
following specifications:
fp = 0.10 Hz, αp = 0.5 dB
e
fs = 0.15 Hz, αs = 15 dB; f = 1 Hz
Solution: Given
αp = α1 = 0.5 dB,
fre
fp = 0.10 Hz, ωp = ω1 = 2 π fp = 2π (0.1) = 0.2π
fs = 0.15 Hz, ωs = ω2 = 2π fs = 2π (0.15) = 0.30π
k1 = –0.5 dB, so A1 = 10k1/20 = 100.5/20 = 0.944
αs = α 2 = 15 dB, k2 = –15 dB, so A2 = 10k2 /20 = 1015/20 = 0.177
tes
1 1
f = 1 Hz, T= = = 1s.
f 1
1. The type of transformation is not specified. Let us use bilinear transformation.
No
2. 3.
w.
ww
3.
6.16 7
So the order of the low-pass Butterworth filter is N = 7.
www.Notesfree.in
www.Notesfree.in
.in
monotonic in the passband and equiripple in the stopband. The type-2 magnitude response is
also called inverse Chebyshev response. The type-1 design is discussed.
The magnitude response of type-1 Chebyshev low-pass filter is given by
e
fre
Where ε is attenuation constant given by
A1 is the gain at the passband edge frequency ω1 and Chebyshev polynomial of the first kind
tes
of degree N given by
The frequency response of Chebyshev filter depends on order N. The approximated response
approaches the ideal response as the order N increases. The phase response of the Chebyshev filter
is more nonlinear than that of the Butterworth filter for a given filter length
N. The magnitude response of type-1 Chebyshev filter is shown in Figure 6.
w.
ww
(a) (b)
Figure 6 Magnitude response of type–I Chebyshev filter.
The design parameters of the Chebyshev filter are obtained by considering the low-pass
filter with the desired specifications as given below.
www.Notesfree.in
www.Notesfree.in
.in
Assuming equality in the above equation, the expression for ε is
e
fre
The order of the analog filter, N can be determined from the inequality for
tes
No
w.
Choose N to be the next nearest integer to the value given above. The values of and
are determined from ω1 and ω2 using either impulse invariant transformation or bilinear
transformation.
The transfer function of Chebyshev filters are usually written in the factored form as
ww
given below.
When N is even,
www.Notesfree.in
www.Notesfree.in
.in
For even values of N and unity dc gain filter, the parameter Bk are evaluated using the
equation:
e
fre
For odd values of N and unity dc gain filter, the parameter Bk are evaluated using the
equation:
tes
Poles of a NORMALIZED Chebyshev filter
The transfer function of the analog system can be obtained from the equation for the
magnitude squared response as:
No
The normalized poles in the s-domain can be obtained by equating the denominator of
the above equation to zero, i.e., N n
to zero.
The
ww
The solution to the above expression gives us the 2N poles of the filter given by
The unnormalized poles, s’n can be obtained from the normalized poles as shown below.
www.Notesfree.in
www.Notesfree.in
The normalized poles lie on an ellipse in s-plane. Since for a stable filter all the poles
should lie in the left half of s-plane, only the N poles on the ellipse which are in the left half of s-
plane are considered.
For N even, all the poles are complex and exist in conjugate pairs. For N odd, one pole is
real and all other poles are complex and occur in conjugate pairs.
.in
Step 1 Choose the type of transformation.
(Bilinear or impulse invariant transformation)
Step 2 Calculate the attenuation constant .
e
Step 3
fre
Calculate the ratio of analog edge frequencies
For bilinear transformation,
.
tes
where
www.Notesfree.in
www.Notesfree.in
.in
For even values of N and unity dc gain filter, find such that
e
For odd values of N and unity dc gain filter, find such that
fre
(It is normal practice to take B0 = B1 = B2 = ... = Bk)
tes
Step 7 Using the chosen transformation, transform Ha(s) to H(z), where H(z) is
the transfer function of the digital filter.
[The high-pass, band pass and band stop filters are obtained from low-
pass filter design by frequency transformation].
No
EXAMPLE 14
ww
0.707 H( ω ) 1, 0 ω 0.2π
www.Notesfree.in
www.Notesfree.in
H( ω ) 0.1, 0.5π ω π
Solution: Given
A1 = 0.707, ω1 = 0.2π
A2 = 0.1, ω2 = 0.5π
T = 1 s and bilinear transformation is to be used. The low-pass Chebyshev IIR digital filter is
designed as follows:
.in
Step 1 Type of transformation
Here bilinear transformation is to be used.
Step 2 Attenuation constant
e
Step 3
fre
Ratio of analog edge frequencies, .
Since bilinear transformation is to be used,
tes
www.Notesfree.in
www.Notesfree.in
e .in
For N even,
fre
tes
That is B1 = c1 x 0.707 = 0.707 x 0.707 = 0.5.
Therefore, the system function is:
No
On simplifying, we get
w.
www.Notesfree.in
www.Notesfree.in
EXAMPLE 15
Determine the system function H(z) of the lowest order Chebyshev IIR
digital filter with the following specifications:
3 dB ripple in passband 0 ≤ω ≤ 0.2 π
25 dB attenuation in stopband 0.45π ≤ ω≤ π
Solution: Given
α1 = 3 dB, k1 = 3dB and hence A1 = 10k1/20 = 103/20 = 0.707
.in
α2 = 25 dB, k2 = 25dB and hence A2 = 10k2 /20 = 1025/20 = 0.0562
ω 1 = 0.2π and ω2 = 0.45π
Let T = 1 and bilinear transformation is used
e
Attenuation constant
Order of filter
No
w.
ww
www.Notesfree.in
www.Notesfree.in
e .in
For N odd
fre
tes
No
EXAMPLE 16
The specification of the desired low-pass filter is:
H ( ω ) 0.15; 0.5π ω π
Design a Chebyshev digital filter using the bilinear transformation.
Solution: Given
A1 = 0.9, ω 1 = 0.3 π
A2 = 0.15, ω 2 = 0.5 π
www.Notesfree.in
www.Notesfree.in
.in
Step 4 Order of the filter N
e
fre
So order of the filter is N = 3. Let T = 1 s.
tes
Step 5 Analog cutoff frequency
No
When k = 1,
www.Notesfree.in
www.Notesfree.in
.in
When s = 0
e
Let Ha(0) = 1,
Let B0 = B1, B2 =
fre
1.935 B0B1 = 1
1
= 0.516 or B = 0.718
0 0
1.935
tes
B0 = B1 = 0.86
= 0.744
No
www.Notesfree.in
www.Notesfree.in
EXAMPLE 17
Determine the system function of the lowest order Chebyshev digital
filter that meets the following specifications.
2 dB ripple in the passband 0 ≤ω ≤ 0.25 π
Atleast 50 dB attenuation in stopband 0.4π ≤ω ≤ π
Solution: Given
Ripple in passband = 2 dB, i.e. k1 = –2 dB A1 = 10k1/20 = 102/20 = 0.794
.in
A1 = 0.794, ω1 = 0.25π
A2 = 0.003, ω2 = 0.4π
The Chebyshev filter is designed as per the following steps:
e
Step 1 Type of transformation
Let us choose bilinear transformation.
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
w.
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
EXAMPLE 18
Determine the lowest order of Chebyshev filter that meets the following
specifications:
w.
60 dB attenuation, so α2 = 60 dB or k2 = – 60 dB
Step 1 Bilinear transformation is to be used.
Step 2 Attenuation constant
www.Notesfree.in
www.Notesfree.in
.in
So the lowest order of the filter is N = 14.
e
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
UNIT-IV
FIR DIGITAL FILTERS
.in
INTRODUCTION
e
A filter is a frequency selective system. Digital filters are classified as finite duration unit
impulse response (FIR) filters or infinite duration unit impulse response (IIR) filters,
fre
depending on the form of the unit impulse response of the system. In the FIR system, the
impulse response sequence is of finite duration, i.e., it has a finite number of non-zero terms.
The IIR system has an infinite number of non-zero terms, i.e., its impulse response sequence is
of infinite duration. IIR filters are usually implemented using recursive structures (feedback-
poles and zeros) and FIR filters are usually implemented using non-recursive structures (no
feedback-only zeros). The response of the FIR filter depends only on the present and past input
tes
samples, whereas for the IIR filter, the present response is a function of the present and past
values of the excitation as well as past values of the response.
Advantages of FIR filter over IIR filters:
1. FIR filters are always stable.
2. FIR filters with exactly linear phase can easily be designed.
No
FIR filters are employed in filtering problems where linear phase characteristics within the
pass band of the filter are required. If this is not required, either an FIR or an IIR filter may be
employed. An IIR filter has lesser number of side lobes in the stop band than an FIR filter
with the same number of parameters. For this reason if some phase distortion is tolerable,
an IIR filter is preferable. Also, the implementation of an IIR filter involves fewer
parameters, less memory requirements and lower computational complexity.
N 1
where h(n) is the impulse response of the filter. The frequency response [Fourier transform of
h(n)] is given by
www.Notesfree.in
www.Notesfree.in
N 1
H( ω ) = h(n) e j n
n0
which is periodic in frequency with period 2 , i.e.,
H( ω ) = H( ω + 2k ), k = 0, 1, 2, ...
Since H(ω ) is complex it can be expressed as
.in
where H(ω ) is the magnitude response and (ω) is the phase response
e
fre
For FIR filters with linear phase, we can define
We have
N 1
N 1
This gives us
N 1
n0
N 1
i.e.
N 1
www.Notesfree.in
www.Notesfree.in
i.e.
N 1
.in
This shows that FIR filters will have constant phase and group delays when the impulse
response is symmetrical about α= (N – 1)/2.
The impulse response satisfying the symmetry condition h(n) = h(N – 1 – n) for odd and even
values of N is shown in Figure 1. When N = 9, the centre of symmetry
of the sequence occurs at the fourth sample and when N = 8, the filter delay is2 3 1 samples.
e
fre
tes
No
(a) (b)
Figure 1 Impulse response sequence of symmetrical sequences for (a) N odd (b) N even.
w.
If only constant group delay is required and not the phase delay, we can write
θ(ω ) = β – αω
Now, we have
ww
This gives
www.Notesfree.in
www.Notesfree.in
e .in
Cross multiplying and rearranging, we get
fre
If β = π/2, the above equation can be written as:
tes
This shows that FIR filters have constant group delay τ g and not constant phase delay when
the impulse response is antisymmetrical about α= (N – 1)/2.
The impulse response sa3t2isfying the antisymmetry condition is shown in Figure 2. When
N = 9, the centre of antisymmetry occurs at fourth sample and when N = 8, the centre of
w.
antisymmetry occurs at samples. From Figure 2, we find that h[(N – 1)/2] = 0 for
antisymmetric odd sequence.
ww
a b
Figure 2 Impulse response sequence of antisymmetric sequences for (a) N odd (b) N even.
www.Notesfree.in
www.Notesfree.in
EXAMPLE 1 The length of an FIR filter is 7. If this filter has a linear phase, show that
is satisfied
.in
Solution: The length of the filter is 7. Therefore, for linear phase,
e
The condition for symmetry when N is odd, is h(n) = h(N – 1 – n).
fre
Therefore, the filter coefficients are h(0) = h(6), h(1) = h(5), h(2) = h(4) and h(3).
tes
EXAMPLE 2
The following transfer function characterizes an FIR filter (N = 9).
Determine the magnitude response and show that the phase and group delays are constant.
w.
e .in
fre
Thus, the phase delay and the group delay are the same and are constants.
infinite duration. A finite duration impulse response h(n) can be obtained by truncating the
infinite duration impulse response hd(n) to N-samples. Now, take Z-transform of h(n) to get
H(z). This H(z) corresponds to a non-causal filter. So multiply this H(z) by z–(N–1)/2 to get the
transfer function of realizable causal filter of finite duration.
In window method, we begin with the desired frequency response specification Hd(ω )
ww
and determine the corresponding unit sample response hd(n). The hd(n) is given by the
inverse Fourier transform of Hd(ω ). The unit sample response hd(n) will be an infinite
sequence and must be truncated at some point, say, at n = N – 1 to yield an FIR filter of
length N. The truncation is achieved by multiplying hd (n) by a window sequence w(n). The
resultant sequence will be of length N and can be denoted by h(n). The Z-transform of h(n)
will give the filter transfer function H(z). There have been many windows proposed like
Rectangular window, Triangular window, Hanning window, Hamming window, Blackman
wndow and Kaiser window that approximate the desired characteristics.
In frequency sampling method of filter design, we begin with the desired frequency
response specification H d(ω), and it is sampled at N-points to generate a sequence H̃ (k)
which corresponds to the DFT coefficients. The N-point IDFT of the sequence H̃ (k) gives
the impulse response of the filter h(n). The Z-transform of h(n) gives the transfer function
H(z) of the filter.
In optimum filter design method, the weighted approximation error between the desired
frequency response and the actual frequency response is spread evenly across the pass band
and evenly across the stop band of the filter. This results in the reduction of maximum error.
The resulting filter have ripples in both the pass band and the stop band. This concept of
www.Notesfree.in
www.Notesfree.in
.in
h(n) (usually h(n) is an N-point sequence) or if H̃ (k) is determined, then take
N-point inverse DFT to get h(n).
4. Take Z-transform of h(n) to get H(z), where H(z) is the transfer function of the
digital filter.
5. Choose a suitable structure and realize the filter.
e
Design OF FIR Filters using Windows
fre
The procedure for designing FIR filter using windows is:
1. Choose the desired frequency response of the filter Hd(ω).
2. Take inverse Fourier transform of Hd(ω ) to obtain the desired impulse response
hd(n).
tes
3. Choose a window sequence w(n) and multiply hd(n) by w(n) to convert the infinite
duration impulse response to a finite duration impulse response h(n).
4. The transfer function H(z) of the filter is obtained by taking Z-transform of h(n).
Rectangular Window
No
The weighting function (window function) for an N-point rectangular window is given by
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
The frequency spectrum for N = 31 is shown in Figure 3. The spectrum WR(ω ) has two
features that are important. They are the width of the main lobe and the side lobe amplitude.
The frequency response is real and its zero occurs when ω = 2k /N where k is an integer.
The response for between –2π /N and 2π /N is called the main lobe and the other lobes are
called side lobes. For rectangular window the width of main lobe is 4π /N. The first side lobe
will be 13 dB down the peak of the main lobe and the roll off will be at 20 dB/decade. As the
No
window is made longer, the main lobe becomes narrower and higher, and the side lobes become
more concentrated around ω= 0, but the amplitude of side lobes is unaffected. So increase in
length does not reduce the amplitude of ripples, but increases the frequency when rectangular
window is used.
If we design a low-pass filter using rectangular window, we find that the frequency
response differs from the desired frequency response in many ways. It does not follow quick
w.
transitions in the desired response. The desired response of a low-pass filter changes abruptly
from pass band to stop band, but the actual frequency response changes slowly. This region
of gradual change is called filter’s transition region, which is due to the convolution of the
desired response with the window response’s main lobe. The width of the transition region
depends on the width of the main lobe. As the filter length N increases, the main lobe
ww
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
Figure 3 (a) Rectangular window sequence, (b) Magnitude response of rectangular window,
(c) Magnitude response of Now-pass filter approximated using rectangular window.
In magnitude response of triangular window, the side lobe level is smaller than that of
the rectangular window being reduced from –13 dB to –25 dB. However, the main lobe
width is now 8 /N or twice that of the rectangular window.
The triangular window produces a smooth magnitude response in both pass band and
stop band, but it has the following disadvantages when compared to magnitude response
www.Notesfree.in
www.Notesfree.in
The raised cosine window multiplies the central Fourier coefficients by approximately unity
and smoothly truncates the Fourier coefficients toward the ends of the filter. The smoother
ends and broader middle section produces less distortion of hd(n) around n = 0. It is also
called generalized Hamming window.
.in
The window sequence is of the form:
Hanning W i ndow
The Hanning window function is given by
e
fre
The width of main lobe is 8 /N, i.e., twice that of rectangular window which results in
doubling of the transition region of the filter. The peak of the first side lobe is –32 dB
relative to the maximum value. This results in smaller ripples in both pass band and stop
band of the low-pass filter designed using Hanning window. The minimum stop band
tes
attenuation of the filter is 44 dB. At higher frequencies the stop band attenuation is even
greater. When compared to triangular window, the main lobe width is same, but the
magnitude of the side lobe is reduced, hence the Hanning window is preferable to triangular
window.
Hamming Window
No
In the magnitude response for N = 31, the magnitude of the first side lobe is down about 41dB
from the main lobe peak, an improvement of 10 dB relative to the Hanning window. But this
improvement is achieved at the expense of the side lobe magnitudes at higher frequencies,
which are almost constant with frequency. The width of the main lobe is 8 /N. In the magnitude
response of low-pass filter designed using Hamming window, the first side lobe peak is –51 dB,
which is –7 dB lesser with respect to the Hanning window filter. However, at higher
frequencies, the stop band attenuation is low when compared to that of Hanning window.
Because the Hamming window generates lesser oscillations in the side lobes than the Hanning
window for the same main lobe width, the Hamming window is generally preferred.
www.Notesfree.in
www.Notesfree.in
Blackman Window
The Blackman window function is another type of cosine window and given by the equation
.in
In the magnitude response, the width of the main lobe is 12π /N, which is highest among
windows. The peak of the first side lobe is at –58 dB and the side lobe magnitude decreases with
frequency. This desirable feature is achieved at the expense of increased main lobe width.
However, the main lobe width can be reduced by increasing the value of N. The side lobe
attenuation of a low-pass filter using Blackman window is –78 dB.
e
Table 1 gives the important frequency domain characteristics of some window functions.
Type of
window
Approximate
fre
transition
width of main lobe
Minimum stop
band attenuation
(dB)
Peak of first
side lobe
(dB)
Rectangular 4π /N –21 –13
tes
Bartlett 8π /N –25 –25
Hanning 8π /N – 44 –31
Hamming 8 π /N –51 – 41
Blackmann 12π /N –78 –58
No
EXAMPLE 3
Design an ideal low-pass filter with N = 11 with a frequency response
w.
www.Notesfree.in
www.Notesfree.in
e .in
fre
Assuming the window function,
tes
No
We have
Therefore, the designed filter coefficients are given as
w.
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
w.
ww
www.Notesfree.in
www.Notesfree.in
.in
multirate processing to achieve this are decimation and interpolation. Decimation is for
reducing the sampling rate and interpolation is for increasing the sampling rate. There are
many cases where multi-rate signal processing is used. Few of them are as follows:
1. In high quality data acquisition and storage systems
2. In audio signal processing
e
3. In video
4. In speech processing
5.
6.
1.
In transmultiplexers
fre
For narrow band filtering
The various advantages of multirate signal processing are as follows:
Computational requirements are less.
2. Storage for filter coefficients is less.
tes
3. Finite arithmetic effects are less.
4. Filter order required in multirate application is low.
5. Sensitivity to filter coefficient lengths is less.
While designing multi-rate systems, effects of aliasing for decimation and pseudoimages
for interpolators should be avoided.
No
5.1 SAMPLING
A continuous-time signal x(t) can be converted into a discrete-time signal x(nT) by sampling
it at regular intervals of time with sampling period T. The sampled signal x(nT) is given by
w.
SANPLING THEOREM
ww
Sampling theorem states that a band limited signal x(t) having finite energy, which has no
spectral components higher than fh hertz can be completely reconstructed from its samples
taken at the rate of 2fh or more samples per second.
The sampling rate of 2fh samples per second is the Nyquist rate and its reciprocal 1/2fh
is the Nyquist period.
www.Notesfree.in
www.Notesfree.in
y(n) = x(Dn)
.in
x(2n) is obtained by keeping every second sample of x(n) and x(3n) is obtained by keeping
every 3rd sample of x(n) and removing other samples.
If the input signal x(n) is not band limited, then there will be overlapping of spectra at
the output of the down sampler. This overlapping of spectra is called aliasing which is
undesirable. This aliasing problem can be eliminated by band limiting the input signal by
e
inserting a low-pass filter called anti-aliasing filter before the down sampler. The anti-
aliasing filter and the down sampler together is called decimator. The decimator is also known
as sub sampler, down sampler or under sampler. Decimation (sampling rate compression) is
fre
the process of decreasing the sampling rate by an integer factor D by keeping every Dth
sample and removing D – 1 in between samples.
Figure 10.2 shows the signal x(n) and its down sampled versions by a factor of 2 and 3.
x(n) 2 3 3 3
2 2
tes
1 1 1 1
0 1 2 3 4 5 6 7 8 9 n
(a)
3 3
x(2n)
2
1 1
No
0 1 2 3 4 n
(b)
x(3n)
1 1 1 1
0 1 2 3 n
(c)
w.
Figure 5.2 Plots of (a) x(n), (b) x(2n) and (c) x(3n).
The block diagram of the decimator is shown in Figure 5.3. The decimator comprises two
blocks such as anti-aliasing filter and down sampler. Here the anti-aliasing filter is a low-pass
filter to band limit the input signal so that aliasing problem is eliminated and the down sampler
is used to reduce the sampling rate by keeping every Dth sample and removing D – 1 in
ww
betweensamples.
www.Notesfree.in
www.Notesfree.in
Let us derive the spectrum of a down sampled signal x(Dn) and compare it with the
spectrum of input signal x(n). The Z-transform of the signal x(n) is given by
.in
The down sampled signal y(n) is obtained by multiplying the sequence x(n) with a periodic
train of impulses p(n) with a period D and then leaving out the D – 1 zeros between each
pair of samples. The periodic train of impulses is given by
e
fre
The discrete Fourier series representation of the signal p(n) is given by
tes
Multiplying the sequence x(n) with p(n) yields
x’(n) = x(n)p(n)
No
If we leave D – 1 zeros between each pair of samples, we get the output of down
sampler
y(n) = x’(nD) = x(nD) p(nD)
w.
= x(nD)
The Z-transform of the output sequence is given by
ww
www.Notesfree.in
www.Notesfree.in
e .in
From the above relation we find that if the Fourier transform of the input signal x(n) of a
fre
down sampler is X(W), then the Fourier transform Y(W) of the output signal y(n) is a sum of
D uniformly shifted and stretched versions of X(W) scaled by a factor 1/D.
If the spectrum of the original signal X(W) is band limited to = π/d, as shown in
Figure 5.4(a), the spectrum being periodic with period 2 , the spectrum of the down sampled
signal Y(W) is the sum of all the uniformly shifted and stretched versions of X(W) scaled by a
tes
factor 1/D as shown in Figure 5.4(b). In every interval of 2 in addition to the original spectrum
we find D – 1 equally spaced replica.
No
w.
ww
Figure 5.4 Spectrum of (a) input, (b) output, and (c) normalized output.
www.Notesfree.in
www.Notesfree.in
e .in
Figure 5.5 (a) Input spectrum, (b) aliased output spectrum.
fre
The signal obtained after filtering is given by
tes
For example, consider a factor of D down sampler, then
No
w.
The second term X(–W /2) is simply obtained by shifting the first term X(W ) to the right by
an amount of 2π
ww
www.Notesfree.in
www.Notesfree.in
5.4 UP SAMPLING
Increasing the sampling rate of a discrete-time signal is called up sampling. The sampling
rate of a discrete-time signal can be increased by a factor I by placing I – 1 equally spaced
zeros between each pair of samples.
.in
and the symbol for up sampler is shown in Figure 5.6.
e
Figure 5.6 Up sampler
fre
tes
Usually an anti-imaging filter is to be kept after the up sampler to remove the
unwanted images developed due to up sampling. The anti-imaging filter and the up sampler
together is called interpolator. Interpolation is the process of increasing the sampling rate by
an integer factor I by interpolating I – 1 new samples between successive values of the signal.
Figure 5.7 shows the signal x(n) and its two-fold up-sampled signal y1(n) and the
No
www.Notesfree.in
www.Notesfree.in
Figure 5.7 (a) Input signal x(n), (b) Output of 2 fold up sampler yf(n) = x(n/2), (c) Output of interpolator
y2(n) = x(n/2).
e .in
fre
tes
No
w.
where W = 2πfT . The spectra of the signal w(n) contains the images of base band placed at
the harmonics of the sampling frequency ±2 /I, ±4 /I. To remove the images an anti-
imaging filter is used. The ideal characteristics of low-pass filter is given by
ww
www.Notesfree.in
www.Notesfree.in
ANTI-IMAGING Filter
The low-pass filter placed after the up sampler to remove the images created due to up
sampling is called the anti-imaging filter.
e .in
fre
Figure 5.9 Spectrum of (a) X( ) and (b) X(3 ).
EXAMPLE 10.1 Show that the up sampler and down sampler are time-variant systems.
tes
Solution: Consider a factor of I up sampler defined by
No
w.
www.Notesfree.in
www.Notesfree.in
Solution: Given that x(n) = u(n) is the unit step sequence and is defined as:
.in
y(n) = x(Dn) = x(3n)
It is obtained by considering only every third sample of x(n). The output signal
y(n) is shown in Figure 5.10(b).
(ii) Signal with interpolation factor 3.
e
The interpolated signal is given by
fre
The output signal y(n) is shown in Figure 5.10(c). It is obtained by inserting two
zeros between two consecutive samples.
x(n) = u(n)
tes
1
n
0 1 2 3 4 5 6 7 8 9
(a)
No
y(n) = x(3n)
0 1 2 3 n
w.
(b)
y(n) = x(n/3)
1
n
ww
0 1 2 3 4 5 6 7 8 9
(c)
Figure 5.10 Plots of (a) x(n)=u(n), (b) x(3n) and (c) x(n/3).
EXAMPLE 5.3 Consider a ramp sequence and sketch its interpolated and decimated
versions with a factor of 3.
Solution: The ramp sequence is denoted as r(n) and defined as
The graphical representation of unit ramp signal is shown in Figure 5.11(a). The
www.Notesfree.in
www.Notesfree.in
e .in
fre
tes
No
Figure 5.11 Plots of (a) r(n) = nu(n), (b) y(n) = r(3n) and (c) y(n) = r(n/3).
w.
ww
www.Notesfree.in
www.Notesfree.in
n
e.i
fre
Figure 5.12 Plots of (a) x(n) = sin n u(n), (b) y(n) = sin 2n u(n) and (c) y(n) = sin (n /2)u(n).
tes
5.5 SAMPLIKG RATE CONVERSION
In some applications sampling rate conversion by a non-integer factor may be required. For example
transferring data from a compact disc at a rate of 44.1 kHz to a digital audio tape at 48 kHz. Here the
sampling rate conversion factor is 48/44.1, which is a non-integer.
A sampling rate conversion by a factor I/D can be achieved by first performing interpolation by
No
factor I and then performing decimation by factor D. Figure 5.19(a) shows the cascade configuration of
interpolator and decimator. The anti-imaging filter Hu(z) and the anti-aliasing filter Hd(z) are operated at
the sampling rate, hence can be replaced by a simple low-pass filter with transfer function H(z) as
shown in Figure 5.19(b), where the low-pass
w.
ww
www.Notesfree.in
www.Notesfree.in
n
e.i
Figure 5.20 Cascading of D = 2 and l = 3.
fre
tes
Figure 5.21 Cascading of l = 3 and D = 2.
No
w.
ww
www.Notesfree.in
www.Notesfree.in
n
This shows that the cascading of up sampler and down sampler is not interchangeable when D
e.i
and I are not co-prime, i.e., when D and I have a common factor.
fre
1. Implementation of a narrow band low-pass filter. A narrow band low-pass filter is
characterized by a narrow pass band and a narrow transition band. It requires a very large
number of coefficients. Due to high value of N, it is susceptive to finite word length effects.
In addition, the number of computations and memory locations required are very high. To
overcome these problems multi- rate approach is used in implementing a narrow band low-pass
filter. Figure 10.67 shows the cascading stage of a decimator and interpolator. The filters h1(n)
tes
and h2(n) in the decimator and interpolator are low-pass filters. The input signal is first passed
through a low-pass filter. The sampling frequency F of the input sequence x(n) is first reduced
by a factor D and then raised by the same factor D and then again low-pass filtering is
performed.
No
To meet the desired specifications of a narrow band LPF, the filters h1(n) and h2(n) should be identical
with the same pass band ripple p/2 and the same stop band ripple s.
w.
2. Filter banks. Filter banks are usually classified into two types:
(i) Analysis filter bank and (ii) Synthesis filter bank
The D-channel analysis filter bank is shown in Figure 10.68. It consists of D sub-filters. All the sub-
filters are equally spaced in frequency and each have the same bandwidth. The spectrum of the input
signal lies in the range 0 ≤ ≤ . The filter bank splits the signal into a number of sub-bands each having
a bandwidth π /D. The filter H0(z) is a low-pass filter, H1(z) to HD–2(z) are band pass and HD–1(z) is high-
pass. As the spectrum of the signal is band limited to π /D, the sampling rate can be reduced by a
factor D. The down sampling moves all the pass band signals to a base band 0 ≤ w ≤ π /D.
www.Notesfree.in
www.Notesfree.in
n
e.i
Figure 5.25 Analysis filter bank
fre
signals are applied to filters Gd (z) and finally added to get the output signal
X̂ (z). The filters G 0 (z) to G D–1 (z) have the same characteristics as the analysis filters H 0(z) to
HD–1(z).
tes
No
By combining the analysis filter bank of Figure 5.25 and the synthesis filter bank of Figure 5.27, we
can obtain a D-channel sub-band coding filter bank shown in Figure5.27 . The analysis filter bank
splits the broad band input signal x(n) into D non-overlapping frequency band signals X0(z), X1(z),
..., XD–1(z) of equal bandwidth. These outputs are coded
and transmitted. The synthesis filter bank is used to reconstruct output signal X̂ (z) which should
approximate the original signal. Sub-band coding is very much used in speech signal
ww
processing.
www.Notesfree.in