0% found this document useful (0 votes)
60 views644 pages

DSP Notes

The document provides an overview of Digital Signal Processing, focusing on the classification and properties of signals, including continuous and discrete signals, and their representations. It discusses the role of systems in processing signals and introduces the Discrete-Time Fourier Series (DTFS) for periodic signals. Key concepts such as even and odd signals, periodicity, and the evaluation of Fourier coefficients are also covered.

Uploaded by

akashmoibnk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views644 pages

DSP Notes

The document provides an overview of Digital Signal Processing, focusing on the classification and properties of signals, including continuous and discrete signals, and their representations. It discusses the role of systems in processing signals and introduces the Discrete-Time Fourier Series (DTFS) for periodic signals. Key concepts such as even and odd signals, periodicity, and the evaluation of Fourier coefficients are also covered.

Uploaded by

akashmoibnk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 644

Digital Signal Processing

Indian Institute of Information Technology


Allahabad (IIITA), Prayagraj-211015

Dr. Ramesh Kumar Bhukya, Ph.D. (IIT Guwahati),


Assistant Professor,
Department of Electronics and Communication Engineering,
Indian Institute of Information Technology Allahabad,
Deoghat, Jhalwa, Prayagraj-211015, Uttar Pradesh, India.
Email ID: [email protected]
SIGNAL Processing
 Signals may have to be transformed in order to
Amplify or filter out embedded information
 Detect patterns
 Prepare the signal to survive a transmission channel
Prevent interference with other signals sharing a medium
Undo distortions contributed by a transmission channel
Compensate for sensor deficiencies
Find information encoded in a different domain

 To do so, we also need


 Methods to measure, characterize, model and simulate
transmission channels
 Mathematical tools that split common channels and
transformations into easily manipulated building blocks.
Signal Processing
 Flow of Information

 Measured quantity that varies with time (or position)

 Electrical signal received from a transducer


(Microphone, Thermometer, Accelerator, antenna, etc.)

 Electrical signal that controls a process

Continuous-time Signals: Voltage, Current, Temperature, Speed, …


Discrete-time Signals: Daily minimum / maximum temperature, Lap
intervals in races, Sampled continuous signals, …

 Note: Electronics (unlike optics) can only deal easily with time-dependent
signals, therefore spatial signals such as images, are typically first
converted into a time signal with a scanning process (TV, Fax, etc..)
Signal Processing
A Signal is a function of one or more variables that conveys
information about some (usually physical) phenomenon.

For a function f, in the expression f(𝒕𝟏 , 𝒕𝟐 ,…, 𝒕𝒏 ), each of the


{𝒕𝒌 } is called an independent variable, while the function value
itself is referred to as a dependent variable.

Some examples of signals include:


 A voltage or current in an electronic circuit
 The position, velocity, or acceleration of an object
 A force or torque in a mechanical system
 A flow rate of a liquid or gas in a chemical process
 A digital image, digital video, or digital audio
 A stock market index
Signal Processing (Classification of Signals)
Number of independent variables (i.e., dimensionality):
 A signal with one independent variable is said to be one
dimensional (e.g., audio signal)
 A signal with more than one independent variable is said to be
multi-dimensional (e.g., image)
 Continuous or discrete independent variables:
 A signal with continuous independent variables is said to be
continuous time (CT) (e.g., voltage waveform)
 A signal with discrete independent variable is said to be discrete
time (DT) (e.g., stock market index)
 Continuous or discrete dependent variable:
 A signal with a continuous dependent variable is said to be
continuous valued (e.g., voltage waveform)
 A signal with a discrete dependent variable is said to be discrete
valued (e.g., digital image)
Classification of Signals
 A continuous-valued CT signal is said to be analog (e.g.,
voltage waveform)
 A discrete-valued DT signal is said to be digital (e.g., digital
audio)
 Graphical Representation of signals (CT and DT Signal)

 Functional Representation of signals (CT and DT Signal)

 Tabular Representation of signals (CT and DT Signal)

 Sequence Representation of signals (CT and DT Signal)


Signal Processing
 A system is an entity that processes one or more input signals in order to produce
one or more output signals

 Classification of systems
 Number of inputs:
 A system with one input is said to be single input (SI).
 A system with more than one input is said to be multiple input (MI).
 Number of outputs:
 A system with one output is said to be single output (SO).
 A system with more than one output is said to be multiple output (MO).
 Types of signals processed:
 A system can be classified in terms of the types of signals that it
processes.
 Consequently, terms such as the following (which describe signals) can
also be used to describe systems:
 One-dimensional and multi-dimensional
 Continuous-time and discrete-time
 Analog and digital
Signals
 A CT signal is called a function.
 A DT signal is called a sequence.

 Although, strictly speaking, a sequence is a special case of a function (where the


domain of the function is the integers), we will use the term function
exclusively to mean a function that is not a sequence.

 The 𝑛𝑡ℎ element of a sequence x is denoted as either x(n) or 𝑥𝑛 .

 Strictly speaking, an expression like “f(t)” means the value of the function f
evaluated at the point t.

 Unfortunately, engineers often use an expression like “f(t)” to refer to the


function f (rather than the value of f evaluated at the point t ), and this sloppy
notation can lead to problems (e.g., ambiguity) in some situations.

 In contexts where sloppy notation may lead to problems, one should be careful
to clearly distinguish between a function and its value.
Properties of Signals
 Even Signals
 A function x is said to be even if it satisfies
x(t)= x(-t) for all t.
 A sequence x is said to be even if it satisfies
x(n)= x(-n) for all n.
 Geometrically, the graph of an even signal is symmetric about the origin.

 Odd signals
 A function x is said to be odd if it satisfies
x(t)=- x(-t) for all t.
 A sequence x is said to be odd if it satisfies
x(n)=- x(-n) for all n.
 Geometrically, the graph of an odd signal is anti-symmetric about the origin.

 Periodic Signals
 A function x is said to be periodic with period T (or T-periodic) if, for
some strictly-positive real constant T, the following condition holds:
x(t)=x(t+T) for all t.
Properties of Signals
1 2𝜋
 A T-periodic function x is said to have frequency and angular frequency .
𝑇 𝑇

 Periodic Signals
 A sequence x is said to be periodic with period N (or N-periodic) if, for
some strictly-positive real constant N, the following condition holds:
x(n)=x(n+N) for all n.
1
 An N-periodic sequence x is said to have frequency and angular
𝑁
2𝜋
frequency .
𝑁
 A function/sequence that is not periodic is said to be aperiodic.
Discrete-Time Fourier Series (DTFS)
 A discrete-time signal 𝑥(𝑛) is periodic with period 𝑁 if
𝑥 𝑛 =𝑥 𝑛+𝑁
 The set of all discrete-time complex exponential signals that are periodic with
period 𝑁 is given by

𝜙𝑘 𝑛 = ⅇ 𝑗𝑘𝜔0𝑛 = ⅇ 𝑗𝑘 2𝜋Τ𝑁 𝑛

 The discrete-time periodic signal 𝑥(𝑛) can be represented by a summation of


complex exponential 𝜙𝑘 𝑛 of the form

𝑥 𝑛 = ෍ 𝑋𝑘 𝜙𝑘 𝑛 = ෍ 𝑋𝑘 ⅇ 𝑗𝑘𝜔0𝑛 = ෍ 𝑋𝑘 ⅇ 𝑗𝑘 2𝜋Τ𝑁 𝑛

𝑘 𝑘 𝑘
 The discrete-time exponentials whose frequencies are separated by 2𝜋 (or
integer multiples of 2𝜋) are identical.
𝜙0 𝑛 = ⅇ 𝑗0 2𝜋Τ𝑁 𝑛 = 𝜙𝑁 𝑛 = ⅇ 𝑗𝑁 2𝜋Τ𝑁 𝑛

𝜙1 𝑛 = ⅇ 𝑗 2𝜋Τ𝑁 𝑛 = 𝜙𝑁+1 𝑛 = ⅇ 𝑗(𝑁+1) 2𝜋Τ𝑁 𝑛


Discrete-Time Fourier Series (DTFS)
 In general
𝜙𝑘 𝑛 = 𝜙𝑘+𝑁 𝑛
 The Fourier series of a periodic signal 𝑥 𝑛 consists of only 𝑁 harmonics and can
be expressed as
𝑘0 +𝑁−1

𝑥 𝑛 = ෍ 𝑋𝑘 ⅇ 𝑗𝑘𝜔0𝑛
𝑘=𝑘0
 Where 𝑘0 is arbitrary. Since 𝑘0 is arbitrary, we can use the notation

𝑥 𝑛 = ෍ 𝑋𝑘 ⅇ 𝑗𝑘𝜔0𝑛
𝑘=𝑁

 Evaluation of DTFS Coefficients


 To determine the Fourier series coefficients 𝑋𝑘 , we replace the summation
variable 𝑘 by m on the right side and multiply both sides by ⅇ −𝑗𝜔0𝑘𝑛

𝑥 𝑛 ⅇ −𝑗𝜔0𝑘𝑛 = ෍ 𝑋𝑚 ⅇ 𝑗𝜔0 𝑚−𝑘 𝑛

𝑚=𝑁
Discrete-Time Fourier Series (DTFS)
 Then, we sum over the values of 𝑛 in [0, 𝑁 − 1] to get
𝑁−1
𝑁−1

෍ 𝑥 𝑛 ⅇ −𝑗𝜔0 𝑘𝑛 = ා ෍ 𝑋𝑚 ⅇ 𝑗𝜔0 𝑚−𝑘 𝑚

𝑛=0 𝑚= 𝑁
𝑛=0

 By interchanging the order of summation, we can write


𝑁−1 𝑁−1

෍ 𝑥 𝑛 ⅇ −𝑗𝜔0𝑘𝑛 = ා 𝑋𝑚 ෍ ⅇ 𝑗𝜔0 𝑚−𝑘 𝑚

𝑛=0 𝑛=0
𝑚= 𝑁

𝑁−1
 We know that 1 − 𝛼 𝑁
෍ 𝛼𝑛 =
1−𝛼
𝑛=0
 For 𝛼 = 1, we have
𝑁−1

෍ 𝛼𝑛 = 𝑁
𝑛=0
Discrete-Time Fourier Series (DTFS)
 If 𝑚 − 𝑘 is not an integer of N (i.e., (𝑚 − 𝑘) ≠rN for r=0, ±1, ±2, …),
we can let α = 𝑋𝑚 ⅇ 𝑗𝜔0 𝑚−𝑘 𝑛
𝑁−1 𝑗2𝜋/𝑁 𝑚−𝑘 𝑁
1 − ⅇ 𝑗𝜔0 𝑚−𝑘 𝑁 = 1 − ⅇ =0
෍ ⅇ 𝑗𝜔0 𝑚−𝑘 𝑛 = 𝑗𝑤 𝑚−𝑘 1 − ⅇ 𝑗2𝜋/𝑁(𝑚−𝑘)
1−ⅇ 0
𝑛=0

 If 𝑚 − 𝑘 is an integer multiple of 𝑁, 𝑁−1

෍ ⅇ 𝑗𝜔0 𝑚−𝑘 𝑛 =𝑁
𝑛=0

 Combining above equations, we write


𝑁−1

෍ ⅇ 𝑗𝜔0 𝑚−𝑘 𝑛 = 𝑁𝛿 𝑚 − 𝑘 − 𝑟𝑁
𝑛=0
 Where 𝛿 𝑚 − 𝑘 − 𝑟𝑁 is the unit sample occurring at 𝑚 = 𝑘 + 𝑟𝑁. We yields
𝑁−1

෍ 𝑥 𝑛 ⅇ −𝑗𝜔0𝑘𝑛 = ෍ 𝑋𝑚 𝑁𝛿 𝑚 − 𝑘 − 𝑟𝑁
𝑛=0 𝑚= 𝑁
Discrete-Time Fourier Series (DTFS)
 The nonzero value in the sum corresponds to 𝑚 = 𝑘, and the right hand side
equation evaluates to 𝑁𝑋𝑘
𝑁−1
1
𝑋𝑘 = ෍ 𝑥 𝑛 ⅇ −𝑗𝜔0𝑘𝑛
𝑁
𝑛=0
 Because each of the terms in the summation is periodic with 𝑁, the summation
can be taken over any 𝑁 successive values of 𝑛.

𝑥 𝑛 = ෍ 𝑋𝑘 ⅇ 𝑗𝑘𝜔0𝑛
𝑘=𝑁
and
1
𝑋𝑘 = ෍ 𝑥 𝑛 ⅇ −𝑗𝑘𝜔0𝑛
𝑁
𝑛=𝑁
 Magnitude and Phase Spectrum of Discrete-Time Periodic
Signals (Fourier Spectra)
 In general, the Fourier coefficients 𝑋𝑘 , are complex, and theycan be
represented in the polar form as
𝑋𝑘 = 𝑋𝑘 ⅇ 𝑗∠𝑋𝑘
Discrete-Time Fourier Series (DTFS)
 The spectrum of the discrete-time periodic signal, in contrast, is band limited
and has at most 𝑁 components
 The DTFS coefficients 𝑋𝑘 are periodic with period 𝑁, i.e.,
𝑋𝑘+𝑁 = 𝑋𝑘
 Proof
1
𝑋𝑘 = ෍ 𝑥 𝑛 ⅇ −𝑗𝑘𝜔0𝑛
𝑁
𝑛=𝑁
1
𝑋𝑘+𝑁 = ෍ 𝑥 𝑛 ⅇ − 𝑗 𝑘 + 𝑁 𝜔0 𝑛
𝑁
𝑛= 𝑁
1
= ෍ 𝑥 𝑛 ⅇ −𝑗𝑘𝜔0𝑛 ⅇ −𝑗 2𝜋/𝑁 𝑁𝑛
𝑁
𝑛= 𝑁

1
= ෍ 𝑥 𝑛 ⅇ −𝑗𝑘𝜔0𝑛 ⅇ −𝑗 2𝜋 𝑛
𝑁
𝑛= 𝑁

1
= ෍ 𝑥 𝑛 ⅇ −𝑗𝑘𝜔0𝑛
𝑁
𝑛= 𝑁
𝑋𝑘+𝑁 = 𝑋𝑘
Discrete-Time Fourier Series (DTFS)
 Properties of DTFS
 Similarities between the properties of discrete-time and continuous-time Fourier
series.
 To indicate the relationship between a periodic signal and its Fourier series
coefficients.

 Linearity
 If x(n) and y(n) denote two periodic signals with period N, and

𝑥 𝑛 ⟷ 𝑋𝑘 𝑦 𝑛 ⟷ 𝑌𝑘
Then
𝑧 𝑛 = 𝑎𝑥 𝑛 + 𝑏𝑦 𝑛 ↔ 𝑍𝑘 = 𝑎𝑋𝑘 + 𝑏𝑌𝑘
 Proof The Fourier series coefficients of z(n) is given by

1 −𝑗𝑘𝜔 𝑛
1
𝑍𝑘 = ෍ 𝑧 𝑛 ⅇ 0 = ෍ 𝑎𝑥 𝑛 + 𝑏𝑦 𝑛 ⅇ −𝑗𝑘𝜔0𝑛
𝑁 𝑁
𝑛= 𝑁 𝑛=(𝑁)

1 −𝑗𝑘𝜔 𝑛
1
𝑎 ෍ 𝑥 𝑛 ⅇ 0 +𝑏 ෍ 𝑦 𝑛 ⅇ −𝑗𝑘𝜔0𝑛
𝑁 𝑁
𝑛= 𝑁 𝑛= 𝑁
𝒁𝒌 = 𝒂𝑿𝒌 + 𝒃𝒀𝒌
Discrete-Time Fourier Series (DTFS)
 Time Shifting
 When a time shift is applied to a periodic signal x(n), the period N of the signal is
preserved. If
𝑥 𝑛 ⟷ 𝑋𝑘
Then 𝑦 𝑛 = 𝑥(𝑛 − 𝑛0) ⟷ 𝑌𝑘 = 𝑋𝑘ⅇ −𝑗𝑘𝜔0𝑛0

 When a signal is shifted in time, the magnitudes of its Fourier series coefficients
remain unaltered. That is, |𝑌𝑘 |=𝑋𝑘 |.

 Proof By definition,
𝑁−1 𝑁−1
1 1 1
𝑌𝑘 = ෍ 𝑦 𝑛 ⅇ −𝑗𝑘𝜔0𝑛 = ෍ 𝑦 𝑛 ⅇ −𝑗𝑘𝜔0𝑛 = ෍ 𝑥 𝑛 − 𝑛0 ⅇ −𝑗𝑘𝜔0𝑛
𝑁 𝑁 𝑁
𝑛= 𝑁 𝑛=0 𝑛=0

A change of variables is performed by letting 𝑚 = (𝑛 − 𝑛0 ), which also yields (𝑚→-


− 𝑛0 ) as (𝑛 → 0), and (𝑚→(𝑁 − 1 − 𝑛0 )) as (𝑛→(𝑁 − 1)). Therefore,
𝑁−1−𝑛0
1
𝑌𝑘 = ෍ 𝑥 𝑚 ⅇ −𝑗𝑘𝜔0 𝑚+𝑛0
𝑁
𝑚=−𝑛0
Discrete-Time Fourier Series (DTFS)
 Time Shifting
𝑁−1−𝑛0
Proof 1
𝑌𝑘 = ෍ 𝑥 𝑚 ⅇ −𝑗𝑘𝜔0 𝑚 ⅇ −𝑗𝑘𝜔0 𝑛0
𝑁
𝑚=−𝑛0

𝑌𝑘 = 𝑋𝑘 ⅇ −𝑗𝑘𝜔0𝑛0 𝑌𝑘 = 𝑋𝑘
 Frequency Shifting
 If
𝑥 𝑛 ⟷ 𝑋𝑘
 Then 𝑦 𝑛 = ⅇ 𝑗𝑀𝜔0𝑛 𝑥 𝑛 ↔ 𝑌𝑘 = 𝑋𝑘−𝑀
𝑁−1
Proof By definition, 1 1
𝑦𝑘 = ෍ 𝑦 𝑛 ⅇ −𝑗𝑘𝜔0𝑛 = ෍ 𝑦 𝑛 ⅇ −𝑗𝑘𝜔0𝑛
𝑁 𝑁
𝑛=𝑁 𝑛=0

𝑁−1
1 𝑁−1
= ෍ ⅇ 𝑗𝑀𝜔0𝑛 𝑥 𝑛 ⅇ −𝑗𝑘𝜔0𝑛 1
𝑁 = ෍ 𝑥 𝑛 ⅇ −𝑗 𝑘−𝑀 𝜔0 𝑛 = 𝑋𝑘−𝑀
𝑛=0 𝑁
𝑛=0

 A frequency shift corresponds to multiplication in time domain by a complex


sinusoid whose frequency is equal to the time shift.
Discrete-Time Fourier Series (DTFS)
 Time Reversal
 If 𝑥 𝑛 ⟷ 𝑋𝑘
 Then 𝑦 𝑛 = 𝑥(−𝑛) ⟷ 𝑌𝑘 = 𝑋 −𝑘
𝑁⋅1
Proof 1 1
𝑌𝑘 = ෍ 𝑦 𝑛 ⅇ −𝑗𝑘𝜔 0 𝑛 = ෍ 𝑦 𝑛 ⅇ −𝑗𝑘𝜔0𝑛
𝑁 𝑁
𝑛=𝑁 𝑛=0

𝑁⋅1 𝑁⋅1
1 1
= ෍ 𝑥 −𝑛 ⅇ −𝑗𝑘𝜔0 𝑛 = ෍ 𝑥 𝑚 ⅇ −𝑗(−𝑘)𝜔0𝑚 = 𝑋−𝑘
𝑁 𝑁
𝑛=0 𝑚=−(𝑁−1)

 An interesting consequence of the time-reversal property is that if x(n) is even


then its Fourier series coefficients are also even, i.e., if 𝑥 −𝑛 = 𝑥 𝑛
then 𝑋 =𝑋−𝑘 𝑘

 Similarly, if x(n) is odd, then its Fourier series coefficients, i.e., if 𝑥 −𝑛 = −𝑥 𝑛


then 𝑋−𝑘 = −𝑋𝑘

 The time reversal applied to a discrete-time signal results in a time reversal of the
corresponding sequence of Fourier series coefficients.
Discrete-Time Fourier Series (DTFS)
 Time Scaling
 If 𝑥 𝑛 ⟷ 𝑋𝑘
 Then 1
𝑦 𝑛 = 𝑥 𝑚 𝑛 ↔ 𝑌𝑘 = X
𝑚 k
1
 The Fourier series coefficients𝑌𝑘 = Xk are also periodic with period 𝑚𝑁.
𝑚
Proof The Fourier series coefficients of 𝑦 𝑛 = 𝑥 𝑚 𝑛 are given by

𝑚(𝑁−1)
1 1 −𝑗𝑘
𝜔
𝑛
𝑌𝑘 = ෍ 𝑦 𝑛 ⅇ 𝑚
𝑚𝑁
𝑛=0
𝑚(𝑁−1)
1 1 −𝑗𝑘
𝜔
𝑛
𝑌𝑘 = ෍ 𝑥 𝑛 ⅇ 𝑚
𝑚𝑁 𝑚
𝑛=0
𝑚(𝑁−1)
1 1 −𝑗𝑘
𝜔
𝑛
𝑌𝑘 = ෍ 𝑥 𝑛/𝑚 ⅇ 𝑚
𝑚𝑁
𝑛=0
𝑛
 A change of variables is performed by letting 𝑟 = , which also yields 𝑟 = 0 as
𝑚
𝑛 = 0 and 𝑟 = 𝑁 − 1 as 𝑛 = 𝑚 𝑁 − 1 . Therefore,

1 1 1
𝑌𝑘 = σ(𝑁−1)
𝑟=0 𝑥 𝑟 ⅇ
−𝑗𝑘𝜔𝑟 = 𝑋
𝑚𝑁 𝑚 𝑘
Discrete-Time Fourier Series (DTFS)
 Periodic Convolution

 If 𝑥 𝑛 ⟷ 𝑋𝑘 𝑦 𝑛 ⟷ 𝑌𝑘
 Then 𝑧 𝑛 =𝑥 𝑛 ⊛𝑦 𝑛 = ෍ 𝑥 𝑟 𝑦 𝑛 − 𝑟 ↔ 𝑍𝑘 = 𝑁𝑋𝑘 𝑌𝑘
𝑟= <𝑛>
Proof
For periodic signals with the same period, a special form of convolution,
known as periodic convolution, is defined as
1 1
𝑍𝑘 = σ𝑛= <𝑁> 𝑧 𝑛 ⅇ −𝑗𝑘𝜔𝑛 = σ (σ𝑟= <𝑁> 𝑥 𝑟 𝑦 𝑛 − 𝑟 ) ⅇ −𝑗𝑘𝜔𝑛
𝑁 𝑁 𝑛= <𝑁>

1
𝑍𝑘 = σ𝑟= <𝑁> 𝑥(𝑟)( σ𝑛= <𝑁> 𝑦 𝑛 − 𝑟 ⅇ −𝑗𝑘𝜔𝑛 )
𝑁

 From the time shifting property, i.e., if 𝑦 𝑛 ↔ 𝑌𝑘


then 𝑦 𝑛 − 𝑟 ↔ 𝑌𝑘ⅇ −𝑗𝑟𝜔𝑛

1
We have 𝑍𝑘 = 𝑁 σ𝑟= <𝑁> 𝑥 𝑟 ⅇ −𝑗𝑟𝜔𝑛 𝑌𝑘 = 𝑁𝑋𝑘 𝑌𝑘
𝑁
 The convolution in time transform to multiplication of the frequency
domain representations.
Discrete-Time Fourier Series (DTFS)
 Multiplication
 If 𝑥(𝑛) and 𝑦(𝑛) denote two periodic signals with period 𝑁, and
𝑥 𝑛 ⟷ 𝑋𝑘 𝑦 𝑛 ⟷ 𝑌𝑘
 Then 𝑧 𝑛 = 𝑥 𝑛 𝑦 𝑛 ↔⟷ 𝑍𝑘 = σ𝑟= <𝑁> 𝑋𝑟𝑌𝑘 − 𝑟

Proof
Consider the signal 𝑧(𝑛),
𝑍(𝑛) = x n y 𝑛 = ෍ Xrⅇ 𝑗𝑟𝜔𝑛 ෍ 𝑌𝑚 ⅇ 𝑗𝑚𝜔𝑛
𝑟= <𝑁> 𝑚= <𝑁>

𝑧 𝑛 = ෍ Xr ෍ 𝑌𝑚 ⅇ 𝑗 𝑚+𝑟 𝜔𝑛
𝑟= <𝑁> 𝑚= <𝑁>

 A change of variables is performed by letting 𝑘 = 𝑚 + 𝑟, which also yields


𝑚 = 𝑘 − 𝑟 , (𝑘 → r) as (m→ 0), and [𝑘 → (𝑟 + 𝑁 − 1)] as [𝑚 → (𝑁 − 1)].
Therefore,

z(n) = σ𝑘 <𝑁>(σ𝑟= <𝑁> Xr Y 𝑘 − 𝑟)ⅇ 𝑗𝑘𝜔𝑛 = σ𝑘<𝑁> 𝑍𝑘 ⅇ 𝑗𝑘𝜔𝑛

Thus, 𝑍𝑘 = σ𝑟= <𝑁> 𝑋𝑟𝑌𝑘 − 𝑟


Discrete-Time Fourier Series (DTFS)
 First Difference
 If 𝑥(𝑛) and 𝑦(𝑛) denote two periodic signals with period 𝑁, and
𝑥 𝑛 ⟷ 𝑋𝑘 𝑦 𝑛 ⟷ 𝑌𝑘
 Then 𝑦 𝑛 = 𝑥 𝑛 − 𝑥 𝑛 − 1 ↔ 𝑌𝑘 = 1 − ⅇ −𝑗𝑘𝜔 𝑋𝑘

Proof
 Given 𝑥 𝑛 ⟷ 𝑋𝑘
 Using the time-shifting property, we get
𝑥 𝑛 − 1 ↔ 𝑋𝑘ⅇ −𝑗𝑘𝜔
 Now, using the linearity property, we get
𝑥 𝑛 − 𝑥 𝑛 − 1 ↔ 𝑋𝑘 − 𝑋𝑘ⅇ −𝑗𝑘𝜔
𝑥 𝑛 − 𝑥 𝑛 − 1 ↔ 𝑋𝑘(1 − ⅇ −𝑗𝑘𝜔 )

 Running Sum or Accumulation


 If 𝑥(𝑛) and 𝑦(𝑛) denote two periodic signals with period 𝑁, and
𝑥 𝑛 ⟷ 𝑋𝑘 𝑦 𝑛 ⟷ 𝑌𝑘
1
 Then 𝑦 𝑛 = σ𝑛−∞ 𝑥 𝑘 ↔ 𝑌𝑘 = 𝑋𝑘 , 𝑘 ≠ 0
1−𝑒 −𝑗𝑘𝜔
Discrete-Time Fourier Series (DTFS)
 Running Sum or Accumulation
Proof

 Consider the running sum


𝑛

𝑦 𝑛 = ෍ 𝑥 𝑘
𝑘=−∞

𝑦 𝑛 = 𝑥 𝑛 + σ𝑛−1
𝑘=−∞ 𝑥(𝑘)

𝑦 𝑛 =𝑥 𝑛 +𝑦 𝑛−1

𝑦 𝑛 −𝑦 𝑛−1 =𝑥 𝑛
𝑌𝑘 − 𝑌𝑘 ⅇ −𝑗𝑘𝜔 = 𝑋𝑘
1
𝑌𝑘 = 𝑋
1 − ⅇ −𝑗𝑘𝜔 𝑘

 The discrete-time Fourier series coefficient 𝑌𝑘 of the running sum 𝑦 𝑛 =


σ𝑛𝑘=−∞ 𝑥 𝑘 is finite-valued and periodic only if 𝑋0=0.
Discrete-Time Fourier Series (DTFS)
 Conjugation and Conjugate Symmetry
 If x(n) and y(n) denote two periodic signals with period N, and
𝑥 𝑛 ⟷ 𝑋𝑘 𝑦 𝑛 ⟷ 𝑌𝑘
 Then 𝑦 𝑛 = 𝑥 ∗ 𝑛 ↔ 𝑌𝑘 = 𝑋 ∗ −𝑘

Proof
1 −𝑗𝑘𝑤0 𝑛 =
1
𝑌𝑘= 𝑁 ෍ 𝑦(𝑛)ⅇ ෍ 𝑥 𝑛 (𝑛)ⅇ −𝑗𝑘𝑤0𝑛
𝑁
𝑛=<𝑁> 𝑛=<𝑁>
∗ ∗
1 1
= ෍ 𝑥(𝑛)ⅇ 𝑗𝑘𝑤0𝑛 = ෍ 𝑥(𝑛)ⅇ −𝑗(−𝑘)𝑤0 𝑛
𝑁 𝑁
𝑛=<𝑁> 𝑛=<𝑁>

= (𝑋−𝑘 )∗ = 𝑋−𝑘 ∗
 Case I If 𝑥(𝑛) is real, i.e., if
𝑥∗ 𝑛 = 𝑥 𝑛
 Then
𝑋 ∗ −𝑘 = 𝑋𝑘

 Therefore, 𝑋−𝑘 = 𝑋 ∗ 𝑘
 That is, if 𝑥(𝑡) is real and even, then so are its Fourier series coefficients.
Discrete-Time Fourier Series (DTFS)
 Conjugation and Conjugate Symmetry
 Case II If 𝑥(𝑛) is real and odd, then its Fourier series coefficients are purely
imaginary and odd.
𝑋−𝑘 = 𝑋 ∗ 𝑘 = −𝑋𝑘
 Case III Even and odd decomposition of real signals: If x(n) is real and
𝑥 𝑛 ↔ 𝑋𝑘
Then 𝑥𝑒 𝑛 = 𝜀 𝑥(𝑛) ↔ 𝑅ⅇ 𝑋𝑘
1.
 The even part of a signal 𝑥(𝑛) is defined as
1
𝑥𝑒 𝑛 = [𝑥 𝑛 + 𝑥 −𝑛 ]
2
Proof
 Using the linearity property, we get
1
𝑥𝑒 𝑛 ↔ 2Re{𝑋𝑘 }
2
𝑥𝑒 𝑛 ↔ Re{𝑋𝑘 }
1
𝑥𝑒 𝑛 ↔ 𝑋𝑘 + 𝑋−𝑘
2
1
And finally, we get 𝑥𝑒 𝑡 ↔ 𝑋𝑘 + 𝑋 ∗ 𝑘
2
Discrete-Time Fourier Series (DTFS)
 Conjugation and Conjugate Symmetry
 Case III Even and odd decomposition of real signals: If x(n) is real and
𝑥 𝑛 ↔ 𝑋𝑘

Then 𝑥𝑜 𝑛 = 𝑂 𝑥(𝑛) ↔ 𝑗𝐼𝑚 𝑋𝑘

2.
 The odd part of a signal 𝑥(𝑛) is defined as
1
𝑥𝑜 𝑛 ↔ [𝑥 𝑛 − 𝑥 −𝑛 ]
2
Proof
 Using the linearity property, we get
1
𝑥𝑜 𝑛 ↔ 𝑋𝑘 − 𝑋−𝑘
2

1
𝑥𝑜 𝑛 ↔ 𝑋𝑘 − 𝑋 ∗ 𝑘
2

1
And finally, we get 𝑥𝑜 𝑛 ↔ 2jIm{𝑋𝑘 }
2
Discrete-Time Fourier Series (DTFS)
 Parseval’s Relation
 If 𝑥(𝑛) is periodic signal with the same period 𝑁, and
1
𝑥 𝑛 ↔ 𝑋𝑘 Then σ𝑛= 𝑁 𝑥(𝑛) 2 = σ𝑛= 𝑁 𝑋𝑘 2
𝑁
Proof
 Consider the LHS of the equation, we have
1 1
෍ 𝑥(𝑛) = ෍ 𝑥(𝑛)𝑥 ∗ (𝑛)
2
𝑁 𝑁
𝑛= 𝑁 𝑛= 𝑁

1
= ෍ 𝑥(𝑛) ෍ 𝑋𝑘 ⅇ 𝑗𝑘𝑤𝑜𝑛
𝑁
𝑛= 𝑁 𝑛= 𝑁
1
= ෍ 𝑥(𝑛) ෍ 𝑋 ∗ 𝑘 ⅇ −𝑗𝑘𝑤𝑜𝑛
𝑁
𝑛= 𝑁 𝑛= 𝑁
1
= ෍ 𝑋∗𝑘 ෍ 𝑥(𝑛)ⅇ −𝑗𝑘𝑤𝑜𝑛
𝑁
𝑛= 𝑁 𝑛= 𝑁

= ෍ 𝑋 ∗ 𝑘 𝑋𝑘
𝑛= 𝑁

= ෍ 𝑋𝑘 2

𝑛= 𝑁
Discrete-Time Fourier Series (DTFS)
 Systems with Periodic Inputs
 The response of an LTI system to a sinusoidal input leads to a characterization of
system behavior that is termed the frequency response of the system.

 The impulse response of a system be h(n) and the input be x(n)=ⅇ 𝑖𝑤0𝑛 , then the
convolution integral gives the output as
𝑦 𝑛 =ℎ 𝑛 ∗𝑥 𝑛
∞ ∞

= ෍ ℎ 𝑚 𝑥(𝑛 − 𝑚) = ෍ ℎ(𝑚)ⅇ 𝑗𝑤𝑜(𝑛−𝑚)


𝑚=−∞ 𝑚=−∞

= ෍ ℎ(𝑚)ⅇ −𝑗𝑤𝑜𝑚 ⅇ 𝑗𝑤𝑜𝑛


𝑚=−∞
𝑦 𝑛 = 𝐻(ⅇ 𝑗𝑤𝑜 )ⅇ 𝑗𝑤𝑜𝑛

𝑤ℎⅇ𝑟ⅇ → 𝐻(ⅇ 𝑗𝑤𝑜 ) = ෍ ℎ(𝑚)ⅇ −𝑗𝑤𝑜𝑚


𝑚=−∞
𝑗𝑤𝑜
 In polar form 𝐻 ⅇ 𝑗𝑤𝑜 = 𝐻(ⅇ 𝑗𝑤𝑜 ) ⅇ ∠𝐻(𝑒 )

𝑗 𝑤𝑜 𝑡+∠𝐻 𝑒 𝑗𝑤𝑜
 Phase response 𝑦 𝑛 = 𝐻 ⅇ 𝑗𝑤𝑜 ⅇ
Discrete-Time Fourier Series (DTFS)
 Systems with Periodic Inputs
𝑗𝑤𝑜
 In polar form 𝐻 ⅇ 𝑗𝑤𝑜 = 𝐻(ⅇ 𝑗𝑤𝑜 ) ⅇ ∠𝐻(𝑒 )

𝑗 𝑤𝑜 𝑡+∠𝐻 𝑒 𝑗𝑤𝑜
 Phase response 𝑦 𝑛 = 𝐻 ⅇ 𝑗𝑤𝑜 ⅇ

 By representing arbitrary signals as weighted superposition's of Eigen functions,


we transform the operation of convolution to multiplication.
𝑥 𝑛 = ෍ 𝑋𝑘 ⅇ 𝑗𝑘𝑤𝑜𝑛
𝑘= 𝑁
 Then, the output of the system is given by
𝑦 𝑛 = ෍ 𝑋𝑘 𝐻(ⅇ 𝑗𝑘𝑤𝑜 )ⅇ 𝑗𝑘𝑤𝑜𝑛 = ෍ 𝑌𝑘 ⅇ 𝑗𝑘𝑤𝑜𝑛
𝑘= 𝑁 𝑘= 𝑁
2𝜋
Where, 𝑤𝑜 = and 𝑌𝑘 = 𝑋𝐾 𝐻(ⅇ 𝑗𝑘𝑤𝑜 )
𝑁
Discrete-Time Fourier Transform (DTFT)
 DTFT
 The discrete-time aperiodic signal is treated in the same way as the continuous-
time case, i.e., as an extension of the DTFS to the case of periodic signal as 𝑁 → ∞

 Consequently, the frequency axis is a continuum.

 The synthesis equation is now an integral, but still restricted to 𝑤 ∈ −𝜋, 𝜋 .

 Fourier Transform Representation of Aperiodic Discrete-Time Signals

 The discrete-time Fourier Series (DTFS) representation of a periodic signal 𝑥(𝑛) (with
period N and frequency 𝜔0=2𝜋𝑁
) can be written as

𝑥 𝑛 = ෍ 𝑋𝑘ⅇ 𝑗𝑘𝜔0𝑛
𝑘=<𝑁>
1
Substituting 𝑋𝑘 = σ𝑚= <𝑁> 𝑥(𝑚)ⅇ −𝑗𝑘𝜔0𝑚 in the DTFS definition, we obtain
𝑁
1
𝑥 𝑛 = σ𝑘= <𝑁>( σ𝑚= <𝑁> 𝑥(𝑚)ⅇ −𝑗𝑘𝜔0𝑚 )ⅇ 𝑗𝑘𝜔0𝑛
𝑁
or
𝜔0
𝑥 𝑛 = ෍ (෍ 𝑥(𝑚)ⅇ −𝑗𝑘𝜔0𝑚 )ⅇ 𝑗𝑘𝜔0𝑛
𝑘= <𝑁> 𝑚= <𝑁> 2𝜋
Discrete-Time Fourier Transform (DTFT)
 FT Representation of Aperiodic Discrete-Time Signals

 Since the inner and outer summation is over any arbitrary range of 𝑚 of width 𝑁
𝑁
−1 𝜔0
𝑥 𝑛 = σ𝑘0+𝑁−1
𝑘=𝑘0 ( σ 2
𝑚=−𝑁/2
𝑥(𝑚)ⅇ −𝑗𝑘𝜔0𝑚 ) ⅇ 𝑗𝑘𝜔0𝑛 for 𝑁 even
2𝜋
𝑁−1
𝜔0
𝑥 𝑛 = σ𝑘0+𝑁−1
𝑘=𝑘0 (σ
2
𝑁−1 𝑥(𝑚)ⅇ
−𝑗𝑘𝜔0𝑚 ) ⅇ 𝑗𝑘𝜔0𝑛 for 𝑁 odd
𝑚=− 2𝜋
2
 The fundamental period 𝑁 → ∞. The inner summation covers an infinite range.
The outer summation approaches an integral in 𝑤 = 𝑘𝑤0 that covers a range of
𝑘0 ≤ 𝑘 ≤ 𝑘0 + 𝑁 − 1
𝑘0 ≤ 𝑘 < 𝑘0 + 𝑁
𝜔
𝑘0 ≤ < 𝑘0 + 𝑁
𝜔0
𝑘0𝜔0 ≤ 𝜔 < 𝑘0𝜔0 + 𝑁𝜔0
𝑘0𝜔0 ≤ 𝜔 < 𝑘0𝜔0 + 2𝜋

1
 Therefore, 𝑥 𝑛 =
2𝜋
‫(׬‬σ∞
𝑚=−∞ 𝑥(𝑚)ⅇ
−𝑗𝜔𝑚 )ⅇ 𝑗𝜔𝑛 ⅆ𝜔

1
 Denoting the summation by 𝑋 ⅇ 𝑗𝜔 , 𝑥 𝑛 = ‫׬‬ 𝑋(ⅇ 𝑗𝜔 )ⅇ 𝑗𝜔𝑛 ⅆ𝜔
2𝜋
Where 𝑗𝜔 ∞
𝑋(ⅇ ) = σ𝑚=−∞ 𝑥(𝑚)ⅇ −𝑗𝜔𝑚
Discrete-Time Fourier Transform (DTFT)
 FT Representation of Aperiodic Discrete-Time Signals

 The 𝑥 𝑛 usually referred to as the synthesis equation, because it synthesizes


an arbitrary signal from its complex exponential components.

1
𝑥 𝑛 = න( ෍ 𝑥(𝑚)ⅇ −𝑗𝜔𝑚 )ⅇ 𝑗𝜔𝑛 ⅆ𝜔
2𝜋
𝑚=−∞
𝟏
 Denoting the summation by 𝑋 ⅇ 𝑗𝜔 , 𝒙 𝒏 = ‫׬‬ 𝑿(𝒆𝒋𝝎 )𝒆𝒋𝝎𝒏 ⅆ𝝎
𝟐𝝅

 On the other hand, 𝑋(ⅇ 𝑗𝜔 ) is referred to as the analysis equation, because it


analyses how much of each complex exponential signal is present in the original
signal.
𝑿(𝒆𝒋𝝎 ) = σ∞ 𝒎=−∞ 𝒙(𝒎)𝒆
−𝒋𝝎𝒎

 We call 𝑋(ⅇ 𝑗𝜔 ) the discrete-time Fourier transform (DTFT) of 𝑥 𝑛 , and 𝑥 𝑛 the


inverse discrete-time Fourier transform (IDTFT) of 𝑋(ⅇ 𝑗𝜔 ) .
 This nomenclature can be represented as,
_
𝑋 ⅇ 𝑗𝜔 = 𝐷𝑇𝐹𝑇 𝑥 𝑛 = ℱ 𝑥 𝑛 𝑎𝑛ⅆ 𝑥 𝑛 = 𝐼𝐷𝑇𝐹𝑇 𝑋 ⅇ 𝑗𝜔 = ℱ 1 𝑋 ⅇ 𝑗𝜔
 DT Fourier Transform pair.
𝑥 𝑛 ↔ 𝑋 ⅇ 𝑗𝜔
Discrete-Time Fourier Transform (DTFT)
 FT Representation of Aperiodic Discrete-Time Signals

 The Fourier transform 𝑋(ⅇ 𝑗𝜔 ) is a complex function of the real variable 𝑤 and can
be written in rectangular form as .
𝑿 𝒆𝒋𝝎 = 𝑿𝑹 𝒆𝒋𝝎 + 𝒋𝑿𝑰 𝒆𝒋𝝎
where 𝑋𝑅 ⅇ 𝑗𝜔 and 𝑋𝐼 ⅇ 𝑗𝜔 are, respectively, the real and imaginary parts of
𝑋 ⅇ 𝑗𝜔
1 ∗
𝑋𝑅 ⅇ 𝑗𝜔 = [𝑋 ⅇ 𝑗𝜔 + 𝑋 ⅇ 𝑗𝜔 ]
2
1 ∗
𝑋𝐼 ⅇ 𝑗𝜔 = [𝑋 ⅇ 𝑗𝜔 − 𝑋 ⅇ 𝑗𝜔 ]
2𝑗

where 𝑋 ⅇ 𝑗𝜔 denotes the complex conjugate of 𝑋 ⅇ 𝑗𝜔 .

 The Fourier transform 𝑋 ⅇ 𝑗𝜔 can be alternatively be expressed in the polar form


𝑋 ⅇ 𝑗𝜔 = |𝑋 ⅇ 𝑗𝜔 |ⅇ 𝑗𝜃(𝜔)
where 𝜃 𝜔 = ∠𝑋 ⅇ 𝑗𝜔

 The relation between the rectangular and polar forms of 𝑋(ⅇ 𝑗𝜔 ) follows as
𝑋𝑅 ⅇ 𝑗𝜔 = |𝑋 ⅇ 𝑗𝜔 |cos(𝜃 𝜔 )
𝑋𝐼 ⅇ 𝑗𝜔 = |𝑋 ⅇ 𝑗𝜔 |sin(𝜃 𝜔 )
Discrete-Time Fourier Transform (DTFT)
 FT Representation of Aperiodic Discrete-Time Signals
𝑋 ⅇ 𝑗𝜔 = √(𝑋𝑅2 ⅇ 𝑗𝜔 + 𝑋𝐼2 ⅇ 𝑗𝜔 )
𝑗𝜔 −1
𝑋𝐼 ⅇ 𝑗𝜔
𝜃 𝜔 = ∠𝑋 ⅇ = tan [ ]
𝑋𝑅 ⅇ 𝑗𝜔

 Thus, for a real signal, it follows that


𝑿 𝒆−𝒋𝝎 = √(𝑿𝑹𝟐 𝒆−𝒋𝝎 + 𝑿𝑰𝟐 𝒆−𝒋𝝎 )
𝑿 𝒆−𝒋𝝎 = √(𝑿𝑹𝟐 𝒆𝒋𝝎 + 𝑿𝑰𝟐 𝒆𝒋𝝎 )
𝑿 𝒆−𝒋𝝎 = 𝑿 𝒆𝒋𝝎

 The magnitude spectrum 𝑿 𝒆−𝒋𝝎 is an even function of 𝑤. Likewise, for a real


signal, we note from that as

𝑋𝐼 𝑒 −𝑗𝜔 𝑋𝐼 𝑒 𝑗𝜔 𝑋𝐼 𝑒 𝑗𝜔
∠𝑋 ⅇ −𝑗𝜔 = −1
tan [ ]= −1
tan [− ] = −1
−tan [ ] = −∠𝑋 ⅇ 𝑗𝜔
𝑋𝑅 𝑒 −𝑗𝜔 𝑋𝑅 𝑒 𝑗𝜔 𝑋𝑅 𝑒 𝑗𝜔

∠𝑋 ⅇ −𝑗𝜔 = −∠𝑋 ⅇ 𝑗𝜔

The phase spectrum ∠𝑋 ⅇ 𝑗𝜔 is an odd function of 𝑤.


Discrete-Time Fourier Transform (DTFT)
 Periodicity of DTFT
 The DTFT is a periodic function in 𝑤 with a period 2𝜋. That is
𝑋 ⅇ 𝑗(𝜔+2𝜋) = 𝑋 ⅇ 𝑗𝜔
Proof: By definition,

𝑋 ⅇ 𝑗𝜔 = ෍ 𝑥(𝑛)ⅇ −𝑗𝜔𝑛
𝑛=−∞
 For any integer k, we have

𝑋 ⅇ 𝑗(𝜔+2𝜋𝑘) = ෍ 𝑥(𝑛)ⅇ −𝑗 𝜔+2𝜋𝑘 𝑛

𝑛=−∞
= σ𝑛=−∞ 𝑥(𝑛)ⅇ −𝑗2𝜋𝑘𝑛 ⅇ −𝑗𝜔𝑛

= σ∞𝑛=−∞ 𝑥(𝑛)ⅇ
−𝑗𝜔𝑛 = 𝑋 ⅇ 𝑗𝜔

 We have used the fact that ⅇ −𝑗2𝜋𝑘𝑛 = 1. Hence 𝑋 ⅇ 𝑗𝜔 is periodic with period 2𝜋.

 However, this property is a consequence of the fact that frequency range for any
discrete-time signal is unique over the frequency interval of (−𝜋, 𝜋) or (0,
2𝜋), and any frequency outside this interval is equivalent to a frequency within this
interval.
Discrete-Time Fourier Transform (DTFT)
 Convergence of DTFT
 An infinite series may or may not converge. The Fourier transform 𝑋 ⅇ 𝑗𝜔 of 𝑥(𝑛) is
said to exist if the series converges in some sense.
𝐾

𝑋𝐾 ⅇ 𝑗𝜔 = ෍ 𝑥(𝑛)ⅇ −𝑗𝜔𝑛
𝑛=−𝐾
 The partial sum of the weighted complex exponentials. Then, for uniform
convergence of 𝑋 ⅇ 𝑗𝜔 ,
lim 𝑋 ⅇ 𝑗𝜔 − 𝑋𝐾 ⅇ 𝑗𝜔 =0
𝐾→∞
lim 𝑋𝐾 ⅇ 𝑗𝜔 = 𝑋 ⅇ 𝑗𝜔
𝐾→∞
 Uniform convergence is guaranteed if x(n) is absolutely summable. Indeed, if

෍ |𝑥 𝑛 | < ∞
𝑛=−∞
|X(ⅇ 𝑗𝜔 | = |σ𝑛=−∞ 𝑥(𝑛)ⅇ −𝑗𝜔𝑛 | =
∞ ≤ σ∞ 𝑛=−∞ 𝑥 𝑛 ||ⅇ −𝑗𝜔𝑛 |
|X(ⅇ 𝑗𝜔 )| ≤ σ𝑛=−∞ ∞ |x(n)|< ∞
 Some sequences are not absolutely summable, but they are square summable,
σ∞ ∞
𝑛=−∞ |𝑥 𝑛 | ≤ (σ𝑛=−∞ |𝑥 𝑛 |)
2 2

 For such sequences, we can impose a mean-square convergence condition:


𝜋
lim ‫׬‬−𝜋 |𝑋 (ⅇ 𝑗𝜔 )- 𝑋𝐾 ⅇ 𝑗𝜔 |2dw = 0
𝐾→∞
Discrete-Time Fourier Transform (DTFT)
 Gibbs Phenomenon
 Consider a finite energy signals of Fourier transform 𝑋 ⅇ 𝑗𝜔 of 𝑥(𝑛) is
1 |𝜔] ≤ ⅆ𝜔𝑐
𝑋 ⅇ 𝑗𝜔 = ቊ
0 𝜔𝑐 < 𝜔 ≤ 𝜋
 The inverse DTFT of 𝑋 ⅇ 𝑗𝜔 is given by

1 1 𝑤
𝑥(𝑛) = 𝑋 ⅇ 𝑗𝜔 ⅇ 𝑗𝜔𝑛 ⅆ𝜔 = ‫ 𝑐 𝑤׬‬ⅇ 𝑗𝜔𝑛 ⅆ𝜔
2𝜋 2𝜋 𝑐
1 𝑒𝑗𝑤𝑛 𝜔𝑐 sin(𝜔𝑐𝑛)
= | = 𝑛 ≠ 0
2𝜋 𝑗𝑛 −𝜔𝑐 𝑛𝜋

 For 𝑛 = 0, the inverse Fourier transform expression reduces to


1 𝜋 1 𝜔 𝜔
𝑥(0) = ‫׬‬−𝜋 𝑋 ⅇ 𝑗𝜔 ⅆ𝜔 = ‫׬‬−𝜔𝑐 1 ⅆ𝜔 = 𝑐
2𝜋 2𝜋 𝑐 𝜋
𝜔𝑐
𝑛=0
𝜋
Hence 𝑋 ⅇ 𝑗𝜔 = ൞sin(𝜔𝑐𝑛)
𝑛≠ 0
𝑛𝜋
sin(𝜔𝑐𝑛) sin(𝜔𝑐𝑛) −𝑗𝜔𝑛
𝑥 𝑛 = −∞<𝑛<∞ || σ∞
−∞ 𝑥(𝑛)ⅇ
−𝑗𝜔𝑛 = σ∞
−∞ ⅇ
𝑛𝜋 𝑛𝜋
𝐾
sin(𝜔𝑐𝑛) −𝑗𝜔𝑛
𝑋𝑘 ⅇ 𝑗𝜔 = ෍ ⅇ
𝑛𝜋
𝑛=−𝐾
Discrete-Time Fourier Transform (DTFT)
 Properties of Discrete-time Fourier Transform
 Fourier transform possesses a number of important properties that are useful for
developing conceptual insights into the transform and into the relationship between
the time-domain and frequency-domain representations of a signal.

 Linearity
 The relationship between a discrete-time sequence 𝑥(𝑛) and its Fourier transform
𝑋 ⅇ 𝑗𝜔
𝑥(𝑛) ↔ 𝑋 ⅇ 𝑗𝜔
If 𝑥1(𝑛) ↔ 𝑋1 ⅇ 𝑗𝜔 and 𝑥2(𝑛) ↔ 𝑋2 ⅇ 𝑗𝜔
then 𝑎𝑥1(𝑛) + 𝑏𝑥2(𝑛) ↔ 𝑎𝑋1 ⅇ 𝑗𝜔 + 𝑏𝑋2 ⅇ 𝑗𝜔
Proof

ℱ 𝑎𝑥1(𝑛) + 𝑏𝑥2(𝑛) = ෍ 𝑎𝑥1(𝑛) + 𝑏𝑥2(𝑛) ⅇ −𝑗𝜔𝑛


𝑛=−∞

= 𝑎 σ∞
𝑛=−∞ 𝑥1(𝑛)ⅇ
−𝑗𝜔𝑛 + 𝑏 σ∞
𝑛=−∞ 𝑥2(𝑛)ⅇ
−𝑗𝜔𝑛

= 𝑎𝑋1 ⅇ 𝑗𝜔 + 𝑏𝑋2 ⅇ 𝑗𝜔
Discrete-Time Fourier Transform (DTFT)
 Properties of Discrete-time Fourier Transform
 The relationship between the time-domain and frequency-domain representations of
a signal.
 Time Shifting
 The relationship between a discrete-time sequence 𝑥(𝑛) and its Fourier transform
𝑋 ⅇ 𝑗𝜔
If 𝑥(𝑛) ↔ 𝑋 ⅇ 𝑗𝜔
then 𝑥(𝑛 − 𝑛0) ↔ 𝑋 ⅇ 𝑗𝜔 ⅇ −𝑗𝜔𝑛0
Proof The Fourier transform of 𝑥(𝑛 − 𝑛0) is

ℱ 𝑥(𝑛 − 𝑛0) = ෍ 𝑥(𝑛 − 𝑛0) ⅇ −𝑗𝜔𝑛


𝑛=−∞
Let 𝑛 − 𝑛0 = 𝑚

ℱ 𝑥(𝑛 − 𝑛0) = ⅇ −𝑗𝜔𝑛0 ෍ 𝑥(𝑚) ⅇ −𝑗𝜔𝑚 = 𝑋 ⅇ 𝑗𝜔 ⅇ −𝑗𝜔𝑛0


𝑚=−∞
 When a signal is shifted in time, the magnitude of its DTFT remains unaltered.
𝑗𝜔
ℱ 𝑥(𝑛) = 𝑋 ⅇ 𝑗𝜔 = |𝑋 ⅇ 𝑗𝜔 | ⅇ 𝑗∠𝑋 𝑒
Then ℱ 𝑥(𝑛 − 𝑛0) = 𝑋1 ⅇ 𝑗𝜔 ⅇ −𝑗𝜔𝑛0 = |𝑋 ⅇ 𝑗𝜔 | ⅇ 𝑗∠𝑋 𝑒 𝑗𝜔 −𝜔𝑛0
Discrete-Time Fourier Transform (DTFT)
 Properties of Discrete-time Fourier Transform
 The relationship between the time-domain and frequency-domain representations of
a signal.
 Frequency Shifting
 The relationship between a discrete-time sequence 𝑥(𝑛) and its Fourier transform
𝑋 ⅇ 𝑗𝜔
If 𝑥(𝑛) ↔ 𝑋 ⅇ 𝑗𝜔
then 𝑥 𝑛 ⅇ 𝑗𝑛𝜔0 ↔ 𝑋 ⅇ 𝑗 𝜔−𝜔0
Proof The Fourier transform of 𝑥 𝑛 ⅇ 𝑗𝑛𝜔0 is

ℱ 𝑥(𝑛)ⅇ 𝑗𝑛𝜔0 = ෍ 𝑥 𝑛 ⅇ 𝑗𝑛𝜔0 ⅇ −𝑗𝜔𝑛


𝑛=−∞

= ෍ 𝑥 𝑛 ⅇ −𝑗(𝜔−𝜔0)𝑛
𝑛=−∞
= 𝑋 ⅇ 𝑗 𝜔−𝜔0

 Hence, a frequency shift corresponds to multiplication in time domain by a complex


sinusoid whose frequency is equal to the frequency shift.
Discrete-Time Fourier Transform (DTFT)
 Properties of Discrete-time Fourier Transform
 The relationship between the time-domain and frequency-domain representations of
a signal.
 Time Reversal
 The relationship between a discrete-time sequence 𝑥(𝑛) and its Fourier transform
𝑋 ⅇ 𝑗𝜔
If 𝑥(𝑛) ↔ 𝑋 ⅇ 𝑗𝜔
then 𝑦 𝑛 = 𝑥 −𝑛 ⟷ 𝑌 ⅇ 𝑗𝜔 = 𝑋 ⅇ −𝑗𝜔
Proof By definition,
∞ ∞

𝑌 ⅇ 𝑗𝜔 = ෍ 𝑦 𝑛 ⅇ −𝑗𝜔𝑛 = ෍ 𝑥 −𝑛 ⅇ −𝑗𝜔𝑛
𝑛=−∞ 𝑛=−∞
 Substituting 𝑚 = −𝑛 into the equation, we obtain
∞ ∞

𝑌 ⅇ 𝑗𝜔 = ෍ 𝑥 𝑚 ⅇ 𝑗𝜔𝑚 = ෍ 𝑥 𝑚 ⅇ −𝑗(−𝜔)𝑛 = 𝑋 ⅇ −𝑗𝜔


𝑛=−∞ 𝑛=−∞

 If 𝑥(𝑛) is even, then its Fourier transform is also even


𝑥 𝑛 = 𝑥 −𝑛 ↔ 𝑋 ⅇ 𝑗𝜔 = 𝑋 ⅇ −𝑗𝜔
 If 𝑥(𝑛) is odd, then so is its Fourier transform, that is
𝑥 𝑛 = −𝑥 −𝑛 ↔ 𝑋 ⅇ 𝑗𝜔 = −𝑋 ⅇ −𝑗𝜔
Discrete-Time Fourier Transform (DTFT)
 Properties of Discrete-time Fourier Transform
 The relationship between the time-domain and frequency-domain representations of
a signal.
 Time Expansion
 Let 𝑚 be a positive integer and define the signal
𝑛
𝑥 𝑚 𝑛 =𝑥 if 𝑛 is a multiple of 𝑚
𝑚
=0 if 𝑛 is not a multiple of 𝑚
𝑦 𝑛 =𝑥 𝑚 𝑛 ↔ 𝑌 ⅇ 𝑗𝜔 = 𝑋 ⅇ 𝑗𝑚𝜔
Proof By definition, ∞
∞ ∞
𝑛 −𝑗(𝜔)𝑛
𝑌 ⅇ 𝑗𝜔 = ෍ 𝑦 𝑛 ⅇ −𝑗𝜔𝑚 = ෎𝑥 𝑚 𝑛 ⅇ −𝑗(𝜔)𝑛 = ෍ 𝑥 ⅇ
𝑚
𝑛=−∞ 𝑛=−∞
𝑛=−∞
 A change of variables is performed by letting 𝑟 = 𝑚
𝑛
, which also yields 𝑟 = −∞ as 𝑛 =
− ∞, and r = ∞ as 𝑛 = ∞. Therefore,

𝑦 ⅇ 𝑗𝜔 = ෍ 𝑥 𝑟 ⅇ −𝑗𝜔𝑚𝜏 = 𝑋 ⅇ 𝑗𝑚𝜔
𝑟=−∞
 The signal spread out and slowed down in time by taking 𝑚 > 1, its Fourier transform
is compressed.
Discrete-Time Fourier Transform (DTFT)
 Properties of Discrete-time Fourier Transform
 The relationship between the time-domain and frequency-domain representations of
a signal.
 Differentiation in Time Domain
 The discrete-time parallel to the differentiation property of the continuous-time
Fourier transform involves the use of the first-difference operation.
If 𝑥(𝑛) ↔ 𝑋 ⅇ 𝑗𝜔
Then 𝑦 𝑛 = 𝑥 𝑛 − 𝑥 𝑛 − 1 ↔ 𝑌 ⅇ 𝑗𝜔 = 1 − ⅇ −𝑗𝜔 𝑋 ⅇ 𝑗𝜔
Proof Given that 𝑥 𝑛 = 𝑋 ⅇ 𝑗𝜔
𝑥 𝑛 − 1 ↔ 𝑋 ⅇ 𝑗𝜔 ⅇ −𝑗𝜔
 Using the time-shifting property, we get

 Now, using the linearity property, we get


𝑥 𝑛 − 𝑥 𝑛 − 1 ↔ 𝑋 ⅇ 𝑗𝜔 − 𝑋 ⅇ 𝑗𝜔 ⅇ −𝑗𝜔

𝑥 𝑛 − 𝑥 𝑛 − 1 ↔ 1 − ⅇ −𝑗𝜔 𝑋 ⅇ 𝑗𝜔

 A common use of this property is in situations where evaluation of the Fourier


transform is easier for the first difference than for the original sequence.
Discrete-Time Fourier Transform (DTFT)
 Properties of Discrete-time Fourier Transform
 The relationship between the time-domain and frequency-domain representations of
a signal.
 Differentiation in Frequency Domain
If 𝑥(𝑛) ↔ 𝑋 ⅇ 𝑗𝜔
Then ⅆ𝑋 ⅇ 𝑗𝜔 or ⅆ𝑋 ⅇ 𝑗𝜔
−𝑗𝑛𝑥 𝑛 ↔ 𝑛𝑥 𝑛 ↔ 𝑗
ⅆ𝜔 ⅆ𝜔
Proof By definition,

𝑋 ⅇ 𝑗𝜔 = ෍ 𝑥 𝑛 ⅇ −𝑗𝜔𝑛
𝑛=−∞

 Differentiating both sides with respect to 𝑤, we obtain



ⅆ𝑋 ⅇ 𝑗𝜔 ⅆ𝑋 ⅇ 𝑗𝜔
= ෍ [−𝑗𝑛𝑥 𝑛 ] ⅇ − 𝑗𝜔𝑛 = 𝐹 −𝑗𝑛𝑥 𝑛
ⅆ𝜔 ⅆ𝜔
𝑛=−∞
 Therefore, Multiplying both sides by 𝑗, we get
ⅆ𝑋 ⅇ 𝑗𝜔
−𝑗𝑛𝑥 𝑛 ↔
ⅆ𝜔
ⅆ𝑋 ⅇ 𝑗𝜔
𝑛𝑥 𝑛 ↔ 𝑗
ⅆ𝜔
Discrete-Time Fourier Transform (DTFT)
 Properties of Discrete-time Fourier Transform
 The relationship between the time-domain and frequency-domain representations of
a signal.
 Convolution Property
 The relationship between a discrete-time sequence 𝑥(𝑛) and its Fourier transform
𝑋 ⅇ 𝑗𝜔
𝑥(𝑛) ↔ 𝑋 ⅇ 𝑗𝜔
If 𝑥1(𝑛) ↔ 𝑋1 ⅇ 𝑗𝜔 and 𝑥2(𝑛) ↔ 𝑋2 ⅇ 𝑗𝜔
then 𝑥1 𝑛 ∗ 𝑥2 𝑛 ↔ 𝑋1 ⅇ 𝑗𝜔 ∗ 𝑋2 ⅇ 𝑗𝜔

 The Fourier transform maps the convolution of two signals into the product of their
Fourier transforms.
Proof The Fourier transform of 𝑥1 𝑛 ∗ 𝑥2 𝑛 is ∞

𝐹 𝑥𝑙 𝑛 ∗ 𝑥2 𝑛 = ෍ 𝑥1 𝑛 ∗ 𝑥2 𝑛 ⅇ −𝑗𝜔𝑛
𝑛=−∞

= ෌𝑛=−∞ σ∞𝑚=−∞ 𝑥1 𝑚 𝑥2 𝑛 − 𝑚 ⅇ
−𝑗𝜔𝑛

 By interchanging the order of summation, ∞ ∞

𝐹 𝑥, 𝑛 ∗ 𝑥2 𝑛 = ෎ 𝑥1 𝑚 ෍ 𝑥2 𝑛 − 𝑚 ⅇ −𝑗𝜔𝑛
𝑛=−∞
𝑚=−∞
Discrete-Time Fourier Transform (DTFT)
 Convolution Property
 The relationship between a discrete-time sequence 𝑥(𝑛) and its Fourier transform
𝑋 ⅇ 𝑗𝜔
If 𝑥1(𝑛) ↔ 𝑋1 ⅇ 𝑗𝜔 and 𝑥2(𝑛) ↔ 𝑋2 ⅇ 𝑗𝜔
then 𝑥 𝑛 ∗ 𝑥 𝑛 ↔ 𝑋 ⅇ 𝑗𝜔 ∗ 𝑋 ⅇ 𝑗𝜔
1 2 1 2

Proof The Fourier transform of 𝑥1 𝑛 ∗ 𝑥2 𝑛 is



𝐹 𝑥, 𝑛 ∗ 𝑥2 𝑛 = ෎ 𝑥1 𝑚 ෍ 𝑥2 𝑛 − 𝑚 ⅇ −𝑗𝜔𝑛
𝑛=−∞
𝑚=−∞
 Applying the time-shifting property, the bracketed term is 𝑋2 ⅇ 𝑗𝜔 ⅇ −𝑗𝜔𝑚 . Substituting
this into this equation yields ∞

𝐹 𝑥, 𝑛 ∗ 𝑥2 𝑛 = ෍ 𝑥1 𝑚 𝑋2 ⅇ 𝑗𝜔 ⅇ −𝑗𝜔𝑚
𝑚=−∞

= 𝑋2 ⅇ 𝑗𝜔 ෍ 𝑥1 𝑚 ⅇ −𝑗𝜔𝑚
𝑚=−∞
𝐹 𝑥𝑙 𝑛 ∗ 𝑥2 𝑛 ↔ 𝑋2 ⅇ 𝑗𝜔 ∗ 𝑋1 ⅇ 𝑗𝜔 ↔ 𝑋1 ⅇ 𝑗𝜔 ∗ 𝑋2 ⅇ 𝑗𝜔
 Therefore,
𝑥1 𝑛 ∗ 𝑥2 𝑛 ↔ 𝑋1 ⅇ 𝑗𝜔 ∗ 𝑋2 ⅇ 𝑗𝜔
Discrete-Time Fourier Transform (DTFT)
 Accumulation Property
 The relationship between a discrete-time sequence 𝑥(𝑛) and its Fourier transform
𝑋 ⅇ 𝑗𝜔 𝑥(𝑛) ↔ 𝑋 ⅇ 𝑗𝜔
∞ ∞
then 1
෍ 𝑥 𝑘 ↔ 𝑋 ⅇ 𝑗𝜔 + 𝜋𝑋 ⅇ 𝑗0 ෍ 𝛿 𝜔 − 2𝜋𝑚
1 − ⅇ −𝑗𝜔
𝑘=−∞ 𝑚=−∞
Proof Convolving a signal 𝑥 𝑛 with a unit step function 𝑢(𝑛), we obtain

𝑥 𝑛 ∗𝑢 𝑛 = ෍ 𝑥 𝑘 𝑢 𝑛−𝑘
𝑘=−∞

1 𝑛−𝑘 ≥0 →𝑘 ≤𝑛
 Since 𝑢 𝑛 − 𝑘 = ቊ
0 𝑛−𝑘 <0 →𝑘 >𝑛

𝑥 𝑛 ∗𝑢 𝑛 = ෍ 𝑥 𝑘
𝑘=−∞
 Now we can prove the accumulation property of the Fourier transform.
∞ ∞

෍ 𝑥 𝑘 =𝑥 𝑛 ∗𝑢 𝑛 𝐹[ ෍ 𝑥 𝑘 ] = 𝐹[𝑥 𝑛 ∗ 𝑢 𝑛 ]
𝑘=−∞ 𝑘=−∞
Discrete-Time Fourier Transform (DTFT)
 Accumulation Property
∞ ∞

෍ 𝑥 𝑘 =𝑥 𝑛 ∗𝑢 𝑛 𝐹[ ෍ 𝑥 𝑘 ] = 𝐹[𝑥 𝑛 ∗ 𝑢 𝑛 ]
𝑘=−∞ 𝑘=−∞

 Using the convolution property, we obtain


𝐹 ෍ 𝑥 𝑘 = 𝑋 ⅇ 𝑗𝜔 𝑈 ⅇ 𝑗𝜔
𝑘=−∞
1
= 𝑋 ⅇ 𝑗𝜔 + 𝜋 σ∞
𝑚=−∞ 𝛿 𝜔 − 2𝜋𝑚
1−𝑒 −𝑗𝜔
1
= 𝑋 ⅇ 𝑗𝜔 𝑋 ⅇ 𝑗𝜔 + 𝜋𝑋 ⅇ 𝑗𝜔 σ∞
𝑚=−∞ 𝛿 𝜔 − 2𝜋𝑚
1−𝑒 −𝑗𝜔

1
= 𝑋 ⅇ 𝑗𝜔 −𝑗𝜔
𝑋 ⅇ 𝑗𝜔 + 𝜋𝑋 ⅇ 𝑗0 ෍ 𝛿 𝜔 − 2𝜋𝑚
1−ⅇ
𝑚=−∞
 Therefore,
∞ ∞
1
𝐹 ෍ 𝑥 𝑘 ↔ 𝑋 ⅇ 𝑗𝜔 −𝑗𝜔
𝑋 ⅇ 𝑗𝜔 + 𝜋𝑋 ⅇ 𝑗0 ෍ 𝛿 𝜔 − 2𝜋𝑚
1−ⅇ
𝑘=−∞ 𝑚=−∞
Discrete-Time Fourier Transform (DTFT)
 Multiplication (Modulation or Windowing) Property

 The relationship between a discrete-time sequence 𝑥(𝑛) and its Fourier transform
𝑋 ⅇ 𝑗𝜔
If 𝑥1(𝑛) ↔ 𝑋1 ⅇ 𝑗𝜔 and 𝑥2(𝑛) ↔ 𝑋2 ⅇ 𝑗𝜔
then 1
𝑥1 𝑛 𝑥2 𝑛 = න 𝑋1 ⅇ 𝑗𝜃 𝑋2 ⅇ 𝑗 𝜔−𝜃 ⅆ𝜃
2𝜋
2𝜋
Proof The Fourier transform of 𝑥1 𝑛 𝑥2 𝑛 is given by

𝐹 𝑥1 𝑛 𝑥2 𝑛 = ෍ 𝑥1 𝑛 𝑥2 𝑛
𝑛=−∞

1
= න 𝑋1 ⅇ 𝑗𝜃 𝑋2 ⅇ 𝑗 𝜔−𝜃 ⅆ𝜃
2𝜋
2𝜋

1
=ා න 𝑋1 ⅇ 𝑗𝜃 𝑋2 ⅇ 𝑗 𝜃𝑛 ⅆ𝜃 𝑥2 𝑛 ⅇ −𝑗𝜔𝑛
2𝜋
2𝜋
𝑛=−∞
Discrete-Time Fourier Transform (DTFT)
 Multiplication (Modulation or Windowing) Property

Proof The Fourier transform of 𝑥1 𝑛 𝑥2 𝑛 is given by


𝐹 𝑥1 𝑛 𝑥2 𝑛 = ෍ 𝑥1 𝑛 𝑥2 𝑛 1
= න 𝑋1 ⅇ 𝑗𝜃 𝑋2 ⅇ 𝑗 𝜔−𝜃 ⅆ𝜃
𝑛=−∞ 2𝜋
2𝜋

1
=ා න 𝑋1 ⅇ 𝑗𝜃 𝑋2 ⅇ 𝑗 𝜃𝑛 ⅆ𝜃 𝑥2 𝑛 ⅇ −𝑗𝜔𝑛
2𝜋
2𝜋
𝑛=−∞

 Applying the frequency-shifting property, the bracketed term is 𝑋2 ⅇ 𝑗 𝜔−𝜃 .


Substituting this into the equation yields

1 1
= ඲ 𝑋1 ⅇ 𝑗𝜃 ෍ 𝑥2 𝑛 ⅇ 𝑗𝜃𝑛 ⅇ −𝑗𝜔𝑛 ⅆ𝜃 = න 𝑥1 ⅇ 𝑗𝜃 𝑥2 ⅇ 𝑗 𝜔−𝜃 ⅆ𝜃
2𝜋 2𝜋
𝑛=−∞ 2𝜋
2𝜋
1
 Therefore, 𝑥1 𝑛 𝑥2 𝑛 ↔ [𝑋1 ⅇ 𝑗𝜔 ⊛ 𝑋2 ⅇ 𝑗𝜔 ]
2𝜋
Discrete-Time Fourier Transform (DTFT)
 Conjugation and Conjugate Property
 If 𝑥 𝑛 = 𝑋 ⅇ 𝑗𝜔
∗ ∗
 Then 𝑥 𝑛 =𝑋 ⅇ −𝑗𝜔


Proof The Fourier transform of 𝑥 𝑛 is given by
∞ ∞ ∗

𝐹 𝑥∗ 𝑛 = ෍ 𝑥 ∗ 𝑛 ⅇ −𝑗𝜔𝑛 = ෍ 𝑥 𝑛 ⅇ 𝑗𝜔𝑛
𝑛=−∞ 𝑛=−∞

∞ ∗

= ෍ 𝑥 𝑛 ⅇ −𝑗 −𝜔 𝑛

𝑛=−∞

𝐹 𝑥∗ 𝑛 = 𝑋 ⅇ −𝑗𝜔 = 𝑋 ∗ ⅇ −𝑗𝜔

 Case I If is real, that is, if 𝑥∗ 𝑛 = 𝑥 𝑛 Then 𝐹 𝑥∗ 𝑛 =𝐹 𝑥 𝑛

 Then 𝑋 ∗ ⅇ −𝑗𝜔 = 𝑋 ⅇ 𝑗𝜔 𝑋 ⅇ −𝑗𝜔 = 𝑋 ∗ ⅇ 𝑗𝜔 (conjugate symmetric)


 The DTFT of a real signal is conjugate symmetric
Discrete-Time Fourier Transform (DTFT)
 Conjugation and Conjugate Property
 If 𝑥 𝑛 = 𝑋 ⅇ 𝑗𝜔
∗ ∗
 Then 𝑥 𝑛 = 𝑋 ⅇ −𝑗𝜔

 Case I If 𝑥 𝑛 is real and even, that is, if 𝑥 𝑛 = 𝑥 ∗ 𝑛 = x −𝑛


𝐹 𝑥∗ 𝑛 =𝐹 𝑥 𝑛 = 𝐹 𝑥 −𝑛
𝑋 ∗ ⅇ −𝑗𝜔 = 𝑋 ⅇ 𝑗𝜔 == 𝑋 ⅇ −𝑗𝜔
 Then 𝑋 ⅇ 𝑗𝜔 = 𝑋 ∗ ⅇ 𝑗𝜔 = 𝑋 ⅇ −𝑗𝜔 (real and even)
 The DTFT of a real signal 𝑋 ⅇ 𝑗𝜔 is real and even
Discrete-Time Fourier Transform (DTFT)
 Parseval’s Relation
 Let 𝑥 𝑛 be an energy signal and if 𝑥 𝑛 ↔ 𝑋 ⅇ 𝑗𝜔

∞ 2 1 2
 Then 𝐸𝑥 = ෌𝑛=−∞ 𝑥 𝑛 = ‫׬‬ 𝑋 ⅇ 𝑗𝜔 d𝜔
2𝜋

Proof: Consider the left-hand side equation, we have


∞ ∞

1
E𝑥 = ා |𝑥 𝑛 |2 = ා 𝑥 𝑛 𝑥 ∗ 𝑛 = ෎ 𝑥(𝑛) න 𝑋 ⅇ 𝑗𝜔 ⅇ 𝑗𝜔𝑛 d𝜔
2𝜋 2𝜋
𝑛=−∞
𝑛=−∞ 𝑛=−∞

1
=෍ 𝑥 𝑛 ධ 𝑋∗ ⅇ 𝑗𝜔 ⅇ −𝑗𝜔𝑛 d𝜔
𝑛=−∞ 2𝜋 2𝜋

1 ∞
= ධ 𝑋∗ ⅇ 𝑗𝑤 ෌𝑛=−∞ 𝑥(𝑛)ⅇ −𝑗𝜔𝑡 d𝜔
2𝜋 2𝜋


2
1 1 2
෍ 𝑥 𝑛 = න 𝑋 ∗ ⅇ 𝑗𝜔 𝑋 ⅇ 𝑗𝜔 d𝜔 = න 𝑋 ⅇ 𝑗𝑤 d𝜔
2𝜋 2𝜋
𝑛=−∞ 2𝜋 2𝜋
Discrete-Time Fourier Transform (DTFT)
 Fourier Transform of Periodic Signals
 The signal 𝑥 𝑛 has the DTFT representation
𝑥 𝑛 = ෍ 𝑋𝑘 ⅇ 𝑗𝑘𝜔0𝑛
𝑘= 𝑁

Proof: Taking Fourier Transform on both sides, we get


𝐹𝑥 𝑛 = 𝐹 ෍ 𝑋𝑘 ⅇ 𝑗𝑘𝜔0 𝑛
〈𝑁〉

𝑋 ⅇ 𝑗𝜔 = ෍ 𝑋𝑘 𝐹 ⅇ 𝑗𝑘𝜔0 𝑛
𝐾=〈𝑁〉
𝑗𝑤0 𝑛 σ𝑚=∞
Using ⅇ ↔ 𝑚=−∞ 2𝜋𝛿(𝑤− 𝑤0 − 2𝜋𝑚)
𝐹 ⅇ 𝑗𝑘𝜔0 𝑛 = 2𝜋𝛿 𝜔 − 𝑘𝜔0 , 0 ≤ 𝜔 ≤ 2𝜋
𝑋 ⅇ 𝑗𝜔 = ෍ 𝑋𝑘 2𝜋𝛿 𝜔 − 𝑘𝜔0 , 0 ≤ 𝜔 ≤ 2𝜋
𝑘=〈𝑁〉

𝑋(ⅇ 𝑗𝜔 ) = 2𝜋 ෍ 𝑋𝑘 𝛿 𝜔 − 𝑘𝜔0 , 0 ≤ 𝜔 ≤ 2𝜋
𝑘=〈𝑁〉
Since the DTFT is periodic with period 2𝜋. 𝑁𝑤0 = 2𝜋. Thus, 𝑋(ⅇ 𝑗𝜔 ) can be compactly

𝑋 ⅇ 𝑗𝜔 = 2𝜋 ෍ 𝑋𝑘 𝛿 𝜔 − 𝑘𝜔0
𝑘=−∞
Discrete-Time Fourier Transform (DTFT)
 Signal Transmission Through Linear Time-invariant Systems
 The signal 𝑥 𝑛 and 𝑦 𝑛 are the input and output of a linear time-invariant systems
(LTI) system with impulse response ℎ(𝑛), then
𝑦 𝑛 =𝑥 𝑛 ∗ℎ 𝑛
 Application of the time convolution property yields
𝐹 𝑦 𝑛 =𝐹 𝑥 𝑛 ∗𝐹 ℎ 𝑛

𝑌 ⅇ 𝑗𝜔 = 𝑋 ⅇ 𝑗𝜔 𝐻 ⅇ 𝑗𝜔

𝑗𝜔
𝑌 ⅇ 𝑗𝜔
𝐻 ⅇ =
𝑋 ⅇ 𝑗𝜔

𝑒 𝑗𝜔 𝑗𝜔 𝑒 𝑗𝜔
𝑦 ⅇ 𝑗𝜔 ⅇ 𝑗∠𝑦 = 𝑋 ⅇ 𝑗𝜔 ⅇ 𝑗∠𝑥𝑒 𝐻 ⅇ 𝑗𝜔 ⅇ 𝑗∠𝐻

𝑦 ⅇ 𝑗𝜔 = 𝑥 ⅇ 𝑗𝜔 𝐻 ⅇ 𝑗𝜔
∠𝑌 ⅇ 𝑗𝜔 = ∠𝑋 ⅇ 𝑗𝜔 + ∠𝐻 ⅇ 𝑗𝜔
 Response to Complex Exponentials
𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ 𝑛 = σ∞
𝑚=−∞ ℎ 𝑚 𝑥 𝑛 − 𝑚
∞ ∞
𝑦(𝑛)=෌𝑚=−∞ ℎ 𝑚 ⅇ 𝑗𝜔0 𝑛−𝑚 𝑦 𝑛 = ෌𝑚=−∞ ℎ 𝑚 ⅇ −𝑗𝜔0 𝑚 ⅇ 𝑗𝜔0 𝑛

𝑦 𝑛 = 𝐻 ⅇ 𝑗𝜔0 ⅇ 𝑗𝜔0 𝑛 𝐻 ⅇ 𝑗𝜔0 = ෌𝑚=−∞ ℎ 𝑚 ⅇ −𝑗𝜔0 𝑚
𝑒 𝑗𝜔0
𝐻 ⅇ 𝑗𝜔0 = 𝐻 ⅇ 𝑗𝜔0 ⅇ 𝑗∠𝐻 = 𝐻 ⅇ 𝑗𝜔0 ⅇ 𝑗𝜃 𝜔0
Discrete-Time Fourier Transform (DTFT)
 Response to Sinusoidal Signal
 The signal 𝑥 𝑛 be the input to the linear time-invariant systems (LTI) system be
𝑥 𝑛 = 𝐴 cos 𝜔0 𝑛 , −∞ < 𝑛 < ∞
𝐴 𝐴
𝑥 𝑛 = ⅇ 𝑗𝜔0 𝑛 + ⅇ −𝑗𝜔0 𝑛
2 2
 Due to the linearity, the response 𝑦(𝑛) to the input 𝑥(𝑛) is given by
𝐴 𝐴
𝑦 𝑛 = 𝐻 ⅇ 𝑗𝜔0 ⅇ 𝑗𝜔0 𝑛 + 𝐻 ⅇ −𝑗𝜔0 ⅇ 𝑗𝜔0 𝑛
2 2
𝑦(𝑛) = 𝐴 𝐻 ⅇ −𝑗𝜔0 cos[ 𝜔0 𝑛 + 𝐻 ⅇ 𝑗𝜔0 ]
𝐿

𝑥 𝑛 = ෍ 𝐴𝑖 cos 𝜔𝑖 𝑛 + 𝜙𝑖 , − ∞ < 𝑛 < ∞


𝑖=1
 The input to the system consists of an arbitrary linear combination of sinusoidal signals of the
form
𝐿

𝑦 𝑛 = ෍ 𝐴𝑖 𝐻 ⅇ 𝑗𝜔𝑖 cos 𝜔𝑖 𝑛 + 𝜙𝑖 + 𝜃 𝜔𝑖 , −∞ < 𝑛 < ∞


𝑖=1
 Response to Causal Exponential Sequence
𝑥 𝑛 = ⅇ 𝑗𝜔0 𝑛 𝑢(𝑛)

𝑦 𝑛 = ℎ 𝑛 ∗ 𝑥 𝑛 = ෍ℎ 𝑚 𝑥 𝑛 − 𝑚
𝑚
Discrete-Time Fourier Transform (DTFT)
 Response to Causal Exponential Sequence
𝑥 𝑛 = ⅇ 𝑗𝜔0 𝑛 𝑢(𝑛)

𝑦 𝑛 = ℎ 𝑛 ∗ 𝑥 𝑛 = ෍ℎ 𝑚 𝑥 𝑛 − 𝑚
𝑚

∞ 𝑛

෍ ℎ 𝑚 ⅇ 𝑗𝜔0 𝑛−𝑚
𝑢 𝑛 − 𝑚 = ෍ ℎ 𝑚 ⅇ −𝑗𝜔0 𝑚 ⅇ 𝑗 𝜔0 𝑛
𝑚=0 𝑚=0

∞ ∞ ∞

෍ ℎ 𝑚 ⅇ −𝑗𝜔0 𝑚 ⅇ 𝑗𝜔0 𝑛 + ෍ ℎ 𝑚 ⅇ −𝑗𝜔0 𝑚 ⅇ 𝑗𝜔0 𝑛 − ෍ ℎ 𝑚 ⅇ −𝑗𝜔0 𝑚 ⅇ 𝑗𝜔0 𝑛


𝑚=0 𝑚=𝑛+1 𝑚=𝑛+1

𝑦 𝑛 = 𝐻 ⅇ 𝑗𝜔0 ⅇ 𝑗𝜔0 𝑛 − ෍ ℎ 𝑚 ⅇ −𝑗𝜔0 𝑚 ⅇ 𝑗𝜔0 𝑛 , 𝑛>0


𝑚

𝑦𝑡𝑟 𝑛 = − ෍ ℎ 𝑚 ⅇ −𝑗𝜔0 𝑚 ⅇ 𝑗𝜔0 𝑛


𝑚=𝑛+1

∞ ∞ ∞

𝑦𝑡𝑟 𝑛 = ෍ ℎ 𝑚 ⅇ −𝑗𝜔0 𝑚−𝑛


≤ ෍ ℎ 𝑚 ≤ ෍ ℎ 𝑚
𝑚=𝑛+1 𝑚=𝑛+1 𝑚=0
Linear and Non-linear Phase
Consider a discrete-time LTI system with impulse response ℎ(𝑛) and
frequency response 𝐻 ⅇ 𝑗𝑤 .
A signal 𝑥(𝑛) with Fourier transform X ⅇ 𝑗𝑤 be applied to the input of the
system.
A signal 𝑦(𝑛) with Fourier transform Y ⅇ 𝑗𝑤 denote the output of the system.
 In distortion less transmission, the input 𝑥(𝑛) and the output 𝑦(𝑛) satisfy
the condition
𝒚 𝒏 = 𝑮𝒙 𝒏 − 𝒏ⅆ
o Where the constant G accounts for a change in amplitude and the
constant 𝒏ⅆ accounts for a delay in transmission.
𝒀 𝒆𝒋𝝎 = 𝐆𝐗 𝒆𝒋𝝎 𝒆−𝒋𝝎𝒏ⅆ
𝒀(𝒆𝒋𝝎 ) 𝒋𝝎 = 𝑮𝒆−𝒋𝝎𝒏ⅆ
= 𝑯 𝒆
𝑿(𝒆𝒋𝝎 )
The magnitude response 𝐻(ⅇ 𝑗𝜔 ) must be a constant. 𝐻(ⅇ 𝑗𝜔 ) = 𝐺
The phase response ∠𝐻 ⅇ 𝑗𝜔 must be a linear function of 𝑤 with slope -𝑛𝑑
and intercept zero.
∠𝐻 ⅇ 𝑗𝜔 = −w𝑛𝑑
Phase Delay and Group Delay
Phase delay: The time delay experienced by a single-frequency signal (i.e., a
sinusoidal signal) when the signal passes through a system is referred to as
the system phase delay and is defined as
∠𝑯 𝒆𝒋𝝎 𝜽 𝒘
𝝉𝒑 𝒘 = − =−
𝒘 𝒘
Assume that the input signal is a single frequency signal
𝐴 𝑗 𝑤 𝑛+𝜃 𝐴 −𝑗(𝑤 𝑛+𝜃)
𝑥 𝑛 = 𝐴𝑐𝑜𝑠 𝑤𝑜 𝑛 + 𝜃 = ⅇ 𝑜 + ⅇ 𝑜
2 2
The system frequency response is
𝑗𝜔
𝐻 ⅇ 𝑗𝜔 = 𝐻(ⅇ 𝑗𝜔 ) ⅇ ∠𝐻 𝑒
Then, the system output signal is given by
𝐴 𝑗𝜔 𝑗 𝜔0 𝑛+𝜃+∠𝐻 𝑒 𝑗𝜔0 𝐴 −𝑗𝜔 −𝑗 𝜔0 𝑛+𝜃−∠𝐻 𝑒 −𝑗𝜔0
𝑦(𝑛) = 𝐻 ⅇ 0 ⅇ + 𝐻 ⅇ 0 ⅇ
2 2
Since
𝐻 ⅇ 𝑗𝜔0 = 𝐻 ⅇ −𝑗𝜔0 and ∠𝐻 ⅇ 𝑗𝜔0 = −∠𝐻 ⅇ −𝑗𝜔0
Therefore, we get
𝐴 𝑗𝜔 𝑗 𝜔0 𝑛+𝜃+∠𝐻 𝑒 𝑗𝜔0 𝐴 𝑗𝜔 −𝑗 𝜔0 𝑛+𝜃+∠𝐻 𝑒 𝐽𝜔0
𝑦(𝑛) = 𝐻 ⅇ 0 ⅇ + 𝐻 ⅇ 0 ⅇ
2 2
Phase Delay and Group Delay
𝒚(𝒕) = 𝑨 𝑯 𝒆𝒋𝝎𝟎 𝒄𝒐𝒔 𝝎𝟎 𝒏 + ∠𝑯 𝒆𝒋𝝎𝟎 + 𝜽
∠𝑯 𝒆𝒋𝝎𝟎
𝒚(𝒕) = 𝑨 𝑯 𝒆𝒋𝝎𝟎 𝒄𝒐𝒔 𝝎𝟎 𝒏 + +𝜽
𝝎𝟎

𝒚 𝒏 = 𝑨 𝑯 𝒆𝒋𝝎𝟎 𝒄𝒐𝒔 𝝎𝟎 𝒏 − 𝝉𝒑 𝝎𝟎 +𝜽
Where
∠𝑯 𝒆𝒋𝝎𝟎 𝜽 𝝎𝟎
𝝉𝒑 (𝝎)ቚ = 𝝉𝒑 𝝎𝟎 = − =−
𝝎=𝝎𝟎 𝝎𝟎 𝝎𝟎
 Group delay: When the input signal contains many sinusoidal components
with different frequencies that are not harmonically related, each component
will go through different phase delays when processed by a frequency-selective
LTI system, and the signal delay is determined using a different parameter
called the group delay
ⅆ∠𝑯 𝒆𝒋𝝎 ⅆ𝜽(𝝎)
𝝉𝒈 (𝝎) = − =−
ⅆ𝝎 ⅆ𝝎
Phase Delay and Group Delay
 The group delay by using a single-frequency modulating and carrier signals
with zero phase for simplicity.
 The input signal (Double-side band suppressed carrier i.e., DSB-SC
modulated signal) is given by
𝑺 𝒏 = 𝑨 𝒄𝒐𝒔 𝒘𝒎 𝒏 𝒄𝒐𝒔(𝒘𝒄 𝒏)
 The cosine-product trigonometric identity to rewrite the input signal as
𝑨 𝑨 𝑨 𝑨
𝑺 𝒏 = 𝐜𝐨𝐬[(𝒘𝒄 + 𝒘𝒎 )𝒏] + 𝐜𝐨𝐬[(𝒘𝒄 − 𝒘𝒎 )𝒏] = 𝐜𝐨𝐬 𝒘𝟏 𝒏 + 𝐜𝐨𝐬 𝒘𝟐 𝒏
𝟐 𝟐 𝟐 𝟐
Where, 𝒘𝟏 = 𝒘𝒄 + 𝒘𝒎
and 𝒘𝟐 = 𝒘𝒄 − 𝒘𝒎

 The system output signal is given by


𝑨 𝑨
𝒚 𝒏 = 𝑯 𝒆𝒋𝒘𝟏 𝐜𝐨𝐬 𝒘𝟏 𝒏 + ∠𝑯 𝒆𝒋𝒘𝟏 + 𝑯 𝒆𝒋𝒘𝟐 𝐜𝐨𝐬 𝒘𝟐 𝒏 + ∠𝑯 𝒆𝒋𝒘𝟐
𝟐 𝟐
𝑨 𝑨
𝒚 𝒏 = 𝐜𝐨𝐬 𝒘𝟏 𝒏 + 𝜽(𝒘𝟏 + 𝐜𝐨𝐬 𝒘𝟐 𝒏 + 𝜽(𝒘𝟐
𝟐 𝟐

 Where 𝜽(𝒘𝟏 ) and 𝜽(𝒘𝟐 ) are the phase shifts produced by the system
frequencies 𝒘𝟏 and 𝒘𝟐 , respectively.
Phase Delay and Group Delay
 The equivalently, we can express 𝑦(𝑛) as
𝐴 𝜃 𝜔1 + 𝜃 𝜔2 𝜃 𝜔1 − 𝜃 𝜔2
𝑦(𝑛) = cos 𝜔𝑐 𝑛 + 𝜔𝑚 𝑛 + +
2 2 2
𝐴 𝜃 𝜔1 +𝜃 𝜔2 𝜃 𝜔1 −𝜃 𝜔2
+ cos 𝜔𝑐 𝑛 − 𝜔𝑚 𝑛 + −
2 2 2
𝐴 𝜃 𝜔1 +𝜃 𝜔2 𝜃 𝜔1 −𝜃 𝜔2
= cos 𝜔𝑒 𝑛 + + 𝜔𝑚 𝑛 +
2 2 2
𝐴 𝜃 𝜔1 +𝜃 𝜔2 𝜃 𝜔1 −𝜃 𝜔2
+ cos 𝜔𝑐 𝑛 + − 𝜔𝑚 𝑛 +
2 2 2
𝜃 𝑤1 + 𝜃 𝑤2 𝜃 𝑤1 − 𝜃 𝑤2
𝑦 𝑛 = Acos 𝑤𝑐 𝑛 + cos 𝑤𝑚 𝑛 +
2 2

𝜃 𝜔1 + 𝜃 𝜔2 𝜃 𝜔1 − 𝜃 𝜔2
𝑦(𝑛) = 𝐴cos 𝜔𝑐 𝑛 + cos 𝜔𝑚 𝑛+
2𝜔𝑐 2𝜔𝑚

𝑦(𝑛) = 𝐴cos 𝜔𝑐 𝑛 − 𝜏𝑝 𝜔𝑐 cos 𝜔𝑚 𝑛 − 𝜏𝑔 𝜔𝑐


Phase Delay and Group Delay
 comparing the output signal 𝑦(𝑛) with the input signal 𝑠(𝑛), we make following
observations:
 The carrier component at frequency 𝑤𝑐 in 𝑦(𝑛) lags its counterpart in 𝑠(𝑛) by
𝜃 𝜔1 +𝜃 𝜔2
, which represents a time delay
2𝜔𝑐
𝜃 𝜔1 + 𝜃 𝜔2 𝜃 𝜔1 + 𝜃 𝜔2
𝜏𝑝 𝜔𝑐 = − =−
2𝜔𝑐 𝜔1 + 𝜔2
 The modulating signal component at frequency 𝜔𝑚 in 𝑦(𝑛) lags its counterpart in
𝜃 𝜔1 −𝜃 𝜔2
𝑠(𝑛) by , which represents a time delay
2𝜔𝑐
𝜃 𝜔1 − 𝜃 𝜔2 𝜃 𝜔1 − 𝜃 𝜔2
𝜏𝑔 𝜔𝑐 = − =−
2𝜔𝑚 𝜔1 − 𝜔2
 The approximate phase response 𝜃(𝑤) in the vicinity of 𝑤 = 𝑤𝑐 by the two-term
Taylor expansion
ⅆ𝜃(𝜔)
𝜃(𝜔) = 𝜃 𝜔𝑐 + ቤ 𝜔 − 𝜔𝑐
ⅆ𝜔 𝜔=𝜔
𝑐
 Evaluating 𝜃 𝜔1 and 𝜃 𝜔2 , we obtain
ⅆ𝜃(𝜔)
𝜃 𝜔1 = 𝜃 𝜔𝑐 + ቤ 𝜔1 − 𝜔𝑐
ⅆ𝜔 𝜔=𝜔
𝑐
𝑑𝜃(𝜔)
and 𝜃 𝜔2 = 𝜃 𝜔𝑐 + ቚ 𝜔2 − 𝜔𝑐
𝑑𝜔 𝜔=𝜔𝑐
Properties of Discrete-time Fourier Transform

 Evaluating 𝜃 𝜔1 and 𝜃 𝜔2 , we obtain


ⅆ𝜃(𝜔)
𝜃 𝜔1 = 𝜃 𝜔𝑐 + ቤ 𝜔1 − 𝜔𝑐
ⅆ𝜔 𝜔=𝜔
𝑐
𝑑𝜃(𝜔)
and 𝜃 𝜔2 = 𝜃 𝜔𝑐 + ቚ 𝜔2 − 𝜔𝑐
𝑑𝜔 𝜔=𝜔𝑐
 Now, from above equations, we obtain
𝜃 𝜔𝑐
𝜏𝑝 𝜔𝑐 = −
𝜔𝑐
𝑑𝜃(𝜔) 𝑑∠𝐻(𝜔)
 Similarly, 𝜏𝑔 𝜔𝑐 = − ቚ =− ቚ
𝑑𝜔 𝜔=𝜔𝑐 𝑑𝜔 𝜔=𝜔𝑐

 Energy Spectral Density


 Parseval’s theorem relates the total signal energy in a signal 𝑥 𝑛 to its Fourier
transform through
∞ 1
𝜋
1 2 2 2
𝐸𝑥 = ෍ |𝑥(𝑛)|2 = න 𝑋 ⅇ 𝑗𝜔 ⅆ𝜔 = න 𝑋 ⅇ 𝑗𝜔 ⅆ𝑓
2𝜋 −𝜋 −
1
𝑛=−∞ 2
 Hence, energy spectral density of the signal x(n) and is denoted by 𝛹𝑥 ⅇ 𝑗𝜔 as
2
𝛹𝑥 ⅇ 𝑗𝜔 = 𝑋 ⅇ 𝑗𝜔
Properties of Discrete-time Fourier Transform
 Relationship between Input and Output Energy Spectral
Densities of an LTI System
 Consider an LTI system with frequency response 𝐻 ⅇ 𝑗𝜔 , input signal
𝑥 𝑛 output signal y 𝑛 .
 If 𝑥 𝑛 and y 𝑛 are energy signals, then their energy spectral densities
2 2
are 𝛹𝑥 ⅇ 𝑗𝜔 = 𝑋 ⅇ 𝑗𝜔 and 𝛹𝑥 ⅇ 𝑗𝜔 = 𝑌 ⅇ 𝑗𝜔 , respectively. Since we
know that
𝑌 ⅇ 𝑗𝜔 = 𝐻 ⅇ 𝑗𝜔 𝑋 ⅇ 𝑗𝜔
It follows that
2 2
𝑌 ⅇ 𝑗𝜔 = 𝐻 ⅇ 𝑗𝜔 𝑋 ⅇ 𝑗𝜔
2 2 2
𝑌 ⅇ 𝑗𝜔 = 𝐻 ⅇ 𝑗𝜔 𝑋 ⅇ 𝑗𝜔
2
𝛹𝑦 ⅇ 𝑗𝜔
= 𝐻 𝛹𝑥 ⅇ 𝑗𝜔ⅇ 𝑗𝜔
 Relation of ESD to Autocorrelation
 The autocorrelation function 𝑅𝑥𝑥 (𝜏) of a real energy signal is defined as

𝑅𝑥𝑥 (𝑚) = ෍ 𝑥(𝑛)𝑥(𝑛 − 𝑚)


𝑛=−∞
𝑅𝑥𝑥 (𝑚) = 𝑥(𝑚) ∗ 𝑥(−𝑚)
Properties of Discrete-time Fourier Transform

 Relation of ESD to Autocorrelation


 The autocorrelation function 𝑅𝑥𝑥 (𝜏) of a real energy signal is defined as

𝑅𝑥𝑥 (𝑚) = ෍ 𝑥(𝑛)𝑥(𝑛 − 𝑚)


𝑛=−∞
𝑅𝑥𝑥 (𝑚) = 𝑥(𝑚) ∗ 𝑥(−𝑚)
 Taking the Fourier transform of this equation, we have
ℱ 𝑅𝑥𝑧 (𝑚) = 𝑋 ⅇ 𝑗𝜔 𝑋 ⅇ −𝑗𝜔 = 𝑋 ⅇ 𝑗𝜔 𝑋 ∗ ⅇ 𝑗𝜔
2
ℱ 𝑅𝑥𝑥 (𝑚) = 𝑋 ⅇ 𝑗𝜔
ℱ 𝑅𝑥𝑥 (𝑚) = 𝛹𝑥 ⅇ 𝑗𝜔
𝑅𝑥𝑥 (𝑚) ⟷ 𝛹𝑥 ⅇ 𝑗𝜔
 Power Spectral Density
 Power spectral density (PSD) has the same relation to power signals as ESD has
to energy signals.
𝑥(𝑛) − 𝑁 ≤ 𝑛 ≤ 𝑁
𝑥𝑁 𝑛 = ቊ
0 otherwise
 Using Parseval’s theorem, we have

2
1 𝜋 2
𝐸𝑥𝑁 = ෍ 𝑥𝑁 (𝑛) = න 𝑋𝑁 ⅇ 𝑗𝜔 ⅆ𝑤
2𝜋 −𝜋
𝑛=−∞
Properties of Discrete-time Fourier Transform

 Power Spectral Density


 Power spectral density (PSD) has the same relation to power signals as ESD has
to energy signals.
𝑥(𝑛) − 𝑁 ≤ 𝑛 ≤ 𝑁
𝑥𝑁 𝑛 = ቊ
0 otherwise
 Using Parseval’s theorem, we have

2
1 𝜋 2
𝐸𝑥𝑁 = ෍ 𝑥𝑁 (𝑛) = න 𝑋𝑁 ⅇ 𝑗𝜔 ⅆ𝑤
2𝜋 −𝜋
𝑛=−∞
 Substituting the value of 𝑥𝑁 𝑛 , we obtain
𝜋
1 2
σ𝑁 2
𝑛=−∞ | 𝑥(𝑛)| = න 𝑋𝑁 ⅇ 𝑗𝜔 ⅆ𝜔
2𝜋 −𝜋
𝑁
1 2
1 1 𝜋 2
𝑙𝑖𝑚 ෍ |𝑥(𝑛)| = 𝑙𝑖𝑚 න 𝑋𝑁 ⅇ 𝑗𝜔 ⅆ𝜔
𝑁→∞ 2𝑁 + 1 𝑁→∞ 2𝑁 + 1 2𝜋 −𝜋
𝑛=−𝑁
2
1 1 𝜋 𝑋𝑁 𝑒 𝑗𝜔
𝑙𝑖𝑚 σ𝑁
𝑛=−𝑁 |𝑥(𝑛)|2 = ‫ 𝑚𝑖𝑙 ׬‬2𝑁+1 ⅆ𝜔
𝑁→∞ 2𝑁+1 2𝜋 −𝜋 𝑁→∞
𝑁 𝜋 2
1 1 𝑋𝑁 ⅇ 𝑗𝜔
𝑃𝑥 = 𝑙𝑖𝑚 ෍ |𝑥(𝑛)|2 = න 𝑙𝑖𝑚 ⅆ𝜔
𝑁→∞ 2𝑁 + 1 2𝜋 −𝜋 𝑁→∞ 2𝑁 + 1
𝑛=−𝑁
Properties of Discrete-time Fourier Transform
 Power Spectral Density
 Substituting the value of 𝑥𝑁 𝑛 , we obtain
𝑁 2
1 2
1 𝜋 𝑋𝑁 ⅇ 𝑗𝜔
𝑃𝑥 = 𝑙𝑖𝑚 ෍ |𝑥(𝑛)| = න 𝑙𝑖𝑚 ⅆ𝜔
𝑁→∞ 2𝑁 + 1 2𝜋 −𝜋 𝑁→∞ 2𝑁 + 1
𝑛=−𝑁
 The left-hand side of this represents the average power 𝑃𝑥 of the signal 𝑥 𝑛 .
Therefore,
1 𝜋
𝑃𝑥 = න 𝐺𝑥 ⅇ 𝑗𝜔 ⅆ𝜔
2𝜋 −𝜋
2
𝑋𝑁 𝑒 𝑗𝜔
Where 𝐺𝑥 ⅇ 𝑗𝜔 = 𝑙𝑖𝑚
𝑁→∞ 2𝑁+1
 Relationship between Input and Output Power Spectral Densities of an
LTI System
 Consider an LTI System with frequency response 𝐻 ⅇ 𝑗𝑤 , input 𝑥𝑁 𝑛 , and
output 𝑦𝑁 𝑛 .
𝑌𝑁 ⅇ 𝑗𝑤 = 𝐻 ⅇ 𝑗𝑤 𝑋𝑁 ⅇ 𝑗w
It follows as
2 2
𝑌𝑁 ⅇ 𝑗𝜔 = 𝐻 ⅇ 𝑗𝑤 𝑋𝑁 ⅇ 𝑗𝜔
2 2 2
𝑌𝑁 ⅇ 𝑗𝜔 = 𝐻 ⅇ 𝑗𝜔 𝑋𝑁 ⅇ 𝑗𝜔
2 2
𝑌𝑁 ⅇ 𝑗𝜔 2 𝑋𝑁 ⅇ 𝑗𝜔
𝑙𝑖𝑚 = 𝐻 ⅇ 𝑗𝜔 𝑙𝑖𝑚
𝑁→∞ 2𝑁 + 1 𝑁→∞ 2𝑁 + 1
𝑗𝜔 𝑗𝜔 2 𝑗𝜔
Properties of Discrete-time Fourier Transform
 Relation of PSD to Autocorrelation
 The autocorrelation function 𝑅𝑥𝑥 𝑚 of a power signal is defined as
𝑁
1
𝑅𝑥𝑥 𝑚 = 𝑙𝑖𝑚 ෍ 𝑥 𝑛 𝑥 𝑛−𝑚
𝑁→∞ 2𝑁 + 1
𝑛=−𝑁

1
= 𝑙𝑖𝑚 ෍ 𝑥𝑁 𝑛 𝑥𝑁 𝑛 − 𝑚
𝑁→∞ 2𝑁 + 1
𝑛=−∞
1
𝑅𝑥𝑥 𝑚 = 𝑙𝑖𝑚 𝑥𝑁 𝑚 ∗ 𝑥𝑁 −𝑚
𝑁→∞ 2𝑁 + 1
 Taking the Fourier transform of the equation, we obtain
1
ℱ 𝑅𝑥𝑥 (𝑚) = 𝑙𝑖𝑚 𝑋𝑁 ⅇ 𝑗𝜔 𝑋𝑁 ⅇ −𝑗𝜔
𝑁→∞ 2𝑁 + 1
1
= 𝑙𝑖𝑚 𝑋𝑁 𝑐 𝑗𝜔 𝑋𝑁∗ ⅇ 𝑗𝜔
𝑁→∞ 2𝑁 + 1
1 2
ℱ 𝑅𝑥𝑥 𝑚 = 𝑙𝑖𝑚 𝑋𝑁 ⅇ 𝑗𝜔
𝑁→∞ 2𝑁 + 1
ℱ 𝑅𝑥𝑥 (𝑚) = 𝐺𝑥 ⅇ 𝑗𝜔
𝑅𝑥𝑥 (𝑚) ⟷ 𝐺𝑥 ⅇ 𝑗𝜔
 Thus, the autocorrelation function 𝑅𝑥𝑥 𝑚 and PSD makes a Fourier transform
pair.
Thank you so much for your Kind Attention
UNIT - 1: Discrete Fourier Transforms
(DFT)[1, 2, 3, 4, 5]

Dr. Manjunatha. P
[email protected]

Professor
Dept. of ECE

J.N.N. College of Engineering, Shimoga

September 11, 2014


DSP Syllabus Introduction

Digital Signal Processing: Introduction [1, 2, 3, 4]

Slides are prepared to use in class room purpose, may be used as a


reference material
All the slides are prepared based on the reference material
Most of the figures/content used in this material are redrawn, some
of the figures/pictures are downloaded from the Internet.
I will greatly acknowledge for copying the some the images from the
Internet.
This material is not for commercial purpose.
This material is prepared based on Digital Signal Processing for
ECE/TCE course as per Visvesvaraya Technological University (VTU)
syllabus (Karnataka State, India).
Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4, September
5] 11, 2014 2 / 91
DSP Syllabus

DSP Syllabus

PART - A

UNIT - 1: Discrete Fourier Transforms (DFT)


Frequency domain sampling and reconstruction of discrete time signals.
DFT as a linear transformation, its relationship with other transforms. 7 Hours

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4, September


5] 11, 2014 3 / 91
Introduction The concept of frequency in continuous and discrete time signals

The concept of frequency in continuous and discrete time signals


Continuous Time Sinusoidal Signals
The concept of frequency is closely related to specific type of motion called harmonic
oscillation which is directly related to the concept of time.
A simple harmonic oscillation is mathematically described by:

xa (t) = Acos(Ωt + θ), −∞<t <∞

The subscript a is used with x(t) to denote an analog signal. A is the amplitude, Ω is the
frequency in radians per second(rad/s), and θ is the phase in radians. The Ω is related by
frequency F in cycles per second or hertz by

Ω = 2πF

xa (t) = Acos(2πFt + θ), −∞<t <∞

Figure 1: Example of an analog sinusoidal signal


Cycle and Period
The completion of one full pattern waveform is called a cycle. A period is defined as the
amount of time required to complete one full cycle.
Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4, September
5] 11, 2014 4 / 91
Introduction The concept of frequency in continuous and discrete time signals

Complex exponential signals


xa (t) = Ae j(Ωt+θ)
where
e ±jφ = cosφ ± jsinφ

A j(Ωt+θ) A
xa (t) = Acos(Ωt + θ) = e + e −j(Ωt+θ)
2 2
As time progress the phasors rotate in opposite directions with angular ±Ω frequencies
radians per second.
A positive frequency corresponds to counterclockwise uniform angular motion, a negative
frequency corresponds to clockwise angular motion.

Figure 2: Representation of cosine function by phasor

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4, September


5] 11, 2014 5 / 91
Introduction Discrete Time Sinusoidal Signals

Discrete Time Sinusoidal Signals


A discrete time sinusoidal may expressed as
x(n) = Acos(ωn + θ), −∞<t <∞
where n is an integer variable called the sample number.
A is the amplitude, ω is the frequency in radians per sample(rad/s), and θ is the phase in
radians.
The ω is related by frequency f cycles per sample by
ω = 2πf
x(n) = Acos(2πfn + θ), −∞<t <∞
A discrete time signal x(n) is periodic with period N(N > 0) if and only if

x(n + N) = x(n) for all n

Figure 3: Discrete signal

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4, September


5] 11, 2014 6 / 91
Introduction Discrete Time Sinusoidal Signals

Periodic and aperiodic (non-periodic) signals.


A periodic signal consists a continuously repeated pattern. Signal is periodic if it exhibits
periodicity i.e.
x(t + T ) = x(t) for all t
It has a property that it is unchanged by a time shift of T.
An aperiodic signal changes constantly without exhibiting a pattern or cycle that repeats
over the time.

Figure 4: Periodic signals


Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4, September
5] 11, 2014 7 / 91
Introduction Discrete Time Sinusoidal Signals

Periodic and aperiodic (non-periodic) signals.

Figure 5: Periodic signal Figure 6: Periodic discrete time signal

Figure 8: Periodic discrete time

Figure 7: Periodic discrete time signal

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4, September


5] 11, 2014 8 / 91
Introduction Discrete Time Sinusoidal Signals

Periodic and aperiodic (non-periodic) signals.

Figure 10: Aperiodic discrete time


Figure 9: Aperiodic signals signals

Figure 11: Aperiodic discrete time signals


Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4, September
5] 11, 2014 9 / 91
Introduction Discrete Time Sinusoidal Signals

Periodic and aperiodic (non-periodic) signals.

Figure 12: Aperiodic (random) signal

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 10 / 91
Fourier series

Fourier series

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 11 / 91
Fourier series Fourier series

Sinusoidal functions are wide applications in Engineering and they are easy to generate.
Fourier has shown that periodic signals can be represented by series of sinusoids with
different frequency.
A signal f (t) is said to be periodic of period T if f (t) = f (t + T ) for all t.
Periodic signals can be represented by the Fourier series and non periodic signals can be
represented by the Fourier transform.
For example square wave pattern can be approximated with a suitable sum of a
fundamental sine wave plus a combination of harmonics of this fundamental frequency.
Several waveforms that are represented by sinusoids are as shown in Figure 14. This sum
is called a Fourier series.
The major difference with respect to the line spectra of periodic signals is that the spectra
of aperiodic signals are defined for all real values of the frequency variable ω.

Figure 13: Square Wave from


Fourier Series Figure 14: Waveforms from Fourier Series
Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September
5] 11, 2014 12 / 91
Fourier series Fourier series

Fourier analysis: Every composite periodic signal can be represented with a series of sine
and cosine functions with different frequencies, phases, and amplitudes.
The functions are integral harmonics of the fundamental frequency f of the composite
signal.
Using the series we can decompose any periodic signal into its harmonics.


X ∞
X
f (θ) = a0 + an cos(nθ) + bn sin(nθ)
n=1 n=1

where
Z2π
1
a0 = f (θ)dθ

0
Z2π
1
an = f (θ)cos(nθ)dθ
π
0
Z2π
1
bn = f (θ)sin(nθ)dθ
π
0

Line spectra, harmonics


The fundamental frequency f0 = 1/T . The Fourier series coefficients plotted as a function
of n or nf0 is called a Fourier spectrum.
Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September
5] 11, 2014 13 / 91
Fourier series Fourier series

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 14 / 91
Fourier series Fourier series

Figure 15: Square Wave


1
Z 2π
an = f (θ) cos nθdθ

A when 0 < θ < π π 0
f (θ) = Z π Z 2π 
−A when π < θ < 2π 1
= A cos nθdθ + (−A) cos nθdθ
π 0 π
f (θ + 2π) = f (θ) 1

sin nθ π

1

sin nθ 2π

= −A + A =0
π n 0 π n π

1
Z 2π
a0 = f (θ)dθ
2π 0
1
Z π Z 2π 
= f (θ)dθ + f (θ)dθ
2π 0 π
1
Z π Z 2π 
= Adθ + (−A)dθ = 0
2π 0 π

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 15 / 91
Fourier series Fourier series

1
Z 2π
bn = f (θ) sin nθdθ
π 0
1
Z π Z 2π 
= A sin nθdθ + (−A) sin nθdθ
π 0 π
cos nθ π cos nθ 2π
   
1 1
= −A + A
π n 0 π n π
A
= [− cos nπ + cos 0 + cos 2nπ − cos nπ]

A
= [1 + 1 + 1 + 1]

4A
= when n is odd

A
bn = [− cos nπ + cos 0 + cos 2nπ − cos nπ]

A
= [−1 + 1 + 1 − 1]

= 0 when n is even
 
4A 1 1 1
sin θ + sin 3θ + sin 5θ + sin 7θ + · · ·
π 3 5 7

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 16 / 91
Fourier series Fourier series

 
4A 1 1 1
sin θ + sin 3θ + sin 5θ + sin 7θ + · · ·
π 3 5 7

Figure 16: Square Wave from Fourier


Series Figure 17: Square Wave from Fourier
Series

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 17 / 91
Fourier series Fourier series

Fundamental sinusoidal signal


1

0.5

sin(θ)
0

−0.5

clc;clear all; close all; −1


0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05

f=100;%Fundamental frequency 100 Hz θ


Reconstructed square wave by Fourier
1
t=0:.00001:.05; 0.5

xsin = sin(2*pi*f*t);

f (θ)
0

x1 = sin(2*pi*f*t); −0.5

−1
x3 = (1/3)*sin(3*2*pi*f*t); 0 0.005 0.01 0.015 0.02 0.025
θ
0.03 0.035 0.04 0.045 0.05

x5 = (1/5)*sin(5*2*pi*f*t);
x7 = (1/7)*sin(7*2*pi*f*t); Figure 18: Square Wave
x=x1+x3+x5+x7;
subplot(2,1,1)
plot(t,xsin,’linewidth’,2);
xlabel(’\theta’,’fontsize’,16)
ylabel(’sin(\theta)’,’fontsize’,16)
title(’Fundamental sinusoidal signal’)
subplot(2,1,2)
plot(t,x,’linewidth’,2);
xlabel(’\theta’,’fontsize’,16)
ylabel(’f (\theta)’,’fontsize’,16)
title(’Reconstructed square wave by Fourier ’)

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 18 / 91
Fourier series Fourier series

t when − T4 ≤ t ≤ T4

f (t) =
−t + T2 when T4 ≤ t ≤ 3T
4

Figure 19: Triangular Wave

2
Z T
2πn

bn = f (t) sin T
t dt
T 0
4
Z T /2
2πn

= f (t) sin T
t dt
T 0
4
Z T /4 4
Z T /4 
T

2πn 2πn
 
= t sin T
t dt + −t + sin T
t dt
T 0 T 0 2
"  2 #
4 T πn

= 2 sin 2
T 2πn
2T
sin πn

= 2
2π 2 n2
= 0 when n is even
       
2T 2π 1 6π 1 10π
sin t − sin t + sin t − · · ·
π2 T 32 T 52 T
Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September
5] 11, 2014 19 / 91
Fourier series Fourier series

Figure 20: Square Wave[6] Figure 21: Sawtooth Signal[6]

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 20 / 91
Fourier series Fourier series

The Exponential (Complex) Form of Fourier Series


X ∞
X
f (θ) = a0 + an cos nθ + bn sin nθ
n=1 n=1

e jθ + e −jθ e jθ − e −jθ
cosθ = sinθ =
2 2j

an cos nθ + bn sin nθ =

e jnθ + e −jnθ e jnθ − e −jnθ


= an + bn
2 2j
e jnθ + e −jnθ e jnθ − e −jnθ
= an − jbn
2 2
   
an − jbn an + jbn
= jnθ
e + e −jnθ
2 2

   
an − jbn an + jbn
let cn = c−n =
2 2

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 21 / 91
Fourier series Fourier series

an cos nθ + bn sin nθ = cn e jnθ + c−n e −jnθ


In exponential Fourier series only one
integral has to be calculated and it is
∞   simpler integration.
X
f (θ) = c0 + cn e jnθ + c−n e −jnθ
n=1

X
= cn e jnθ
n=−∞

where
 
an − jbn
cn =
2

The coefficient cn can be evaluated as.


Z π Z π
1 j
cn = f (θ) cos nθdθ − f (θ) sin nθdθ
2π −π 2π −π
Z π
1
= f (θ) (cos nθ − j sin nθ)dθ
2π −π
Z π
1
= f (θ)e −jnθ dθ
2π −π
Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September
5] 11, 2014 22 / 91
Fourier series Fourier series

Figure 22: Square Wave[6] Figure 23: Sawtooth Signal[6]


Find the
e frequency
y componen nts of a siggnal buried
d in noise. Consider data
d sample ed at
1000 Hzz. Form a signal consissting of 50 Hz and 1200 Hz sinusooids and co
orrupt the signal
s
Example with random noise.

Find the spectrum of the following signal:


f=0.25+2sin(2π5k)+sin(2π12.5k)+1.5sin(2π20k)+0.5sin(2π35k)
>> N=256; % number of samples
>> T=1/128; % sampling frequency=128Hz
>> k=0:N-1; time=k*T;
>> f=0.25+2*sin(2*pi*5*k*T)+1*sin(2*pi*12.5*k*T)+…
+1.5*sin(2*pi*20*k*T)+0.5*sin(2*pi*35*k*T);
>> plot(time,f); title('Signal sampled at 128Hz');
>> F=fft(f);
>> magF=abs([F(1)/N,F(2:N/2)/(N/2)]);
>> hertz=k(1:N/2)*(1/(N*T));
>> stem(hertz,magF), title('Frequency components');

Figure 24: Square Wave[6] Figure 25: Sawtooth Signal[6]

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 23 / 91
Fourier series Fourier series

5
4
3
2
1
0
-1 0 200 400 600
0 800 1000 1200 14
400
-2
-3
-4
-5

Figure 27: Sawtooth Signal[6]

Figure 26: Square Wave[6]

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 24 / 91
Fourier Transform

Fourier Transform

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 25 / 91
Fourier Transform Fourier Transform

The Fourier transform is a generalization of the Fourier series representation of functions.


The Fourier series is limited to periodic functions, while the Fourier transform can be used
for a larger class of functions which are not necessarily periodic. S
Sinusoidal functions are wide applications in Engineering and they are easy to generate.
Fourier has shown that periodic signals can be represented by series of sinusoids with
different frequency.
A signal f (t) is said to be periodic of period T if f (t) = f (t + T ) for all t.
Periodic signals can be represented by the Fourier series and non periodic signals can be
represented by the Fourier transform.
For example square wave pattern can be approximated with a suitable sum of a
fundamental sine wave plus a combination of harmonics of this fundamental frequency.
Several waveforms that are represented by sinusoids are as shown in Figure 14. This sum
is called a Fourier series.
The major difference with respect to the line spectra of periodic signals is that the spectra
of aperiodic signals are defined for all real values of the frequency variable ω.

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 26 / 91
Fourier Transform Fourier Transform


X when θ = π
f (θ) = cn e jnθ
n=−∞ 2πt T
π= ⇒ t=
T 2
where

1
Z π
cn = f (θ)e −jnθ dθ ∞
2π −π
X
f (t) = cn e jnωt
n=−∞

θ = ωt
ω is the angular velocity in radians per
1
Z T /2
second.
cn = f (t)e −jnωt dt
T −T /2
ω = 2πf and θ = 2πft

2π 2π
θ= t and dθ = dt
T T
when θ = −π

2πt T
−π = ⇒ t=−
T 2

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 27 / 91
Fourier Transform Fourier Transform

Relationship from Fourier series to Fourier Transform


 
∞ Z T /2
∞ 1  X −jωt  jωt
f (t) = f (t)e dt e ∆ω
X
f (t) = cn e jnωt 2π ω=−∞ −T /2
n=−∞

P R
T ⇒ ∞ ∆ω ⇒ dω and ⇒
1
Z T /2
cn = f (t)e −jnωt dt
T 1
Z ∞ Z ∞ 
−T /2
f (t) = f (t)e(−jωt) dt e(jωt) dω
2 −∞ −∞
As T approaches infinity
ω approaches zero
and n becomes meaningless 1
Z ∞
nω ⇒ ω ω ⇒ ∆ω f (t) = F (ω)e(jωt) dω
2π 2 −∞
T ⇒ ∆ω

ω
Z ∞

f (t) =
X
cω e jωt F (ω) = f (t)e(−jωt) dt
−∞
n=−ω

∆ω
Z T /2
cω = f (t)e −jωt dt
2π −T /2

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 28 / 91
Fourier Transform Fourier Transform

Figure 28: Rectangular Pulse


Figure 29: Sinc Function

Z1/2
1 1/2
F (ω) = exp(−jωt)dt = [exp(−jωt)]−1/2
−jω
−1/2
1
= [exp(−jω/2) − exp(jω/2)]
−jω
1 exp(jω/2) − exp(−jω/2)
=
(ω/2) 2j
sin(ω/2)
=
(ω/2)
sinx
= sinc(ω/2) since it is form
x

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 29 / 91
Fourier Transform Fourier Transform

Figure 30: Exponential


Figure 31: Gaussian

Z∞
F (ω) = exp( − at) exp(−jωt)dt
0
Z∞ Z∞
= exp(−at − jωt)dt = exp(−[a + jω]t)dt
0 0
−1 −1
= exp(−[a + jω]t)|+∞
0 = [exp(−∞) − exp(0)]
a + jω a + jω
−1
= [0 − 1]
a + jω
1
=
a + jω

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 30 / 91
Fourier Transform Fourier Transform

Z∞
δ(t) exp(−iω t) dt = exp(−iω [0]) = 1
−∞

Z∞
1 exp(−iω t) dt = 2π δ(ω)
−∞

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 31 / 91
Fourier Transform Fourier Transform

Z∞
F {exp(iω0 t)} = exp(iω0 t) exp(−i ω t) dt
−∞

Z∞
= exp(−i [ω − ω0 ] t) dt
−∞

= 2π δ(ω − ω0 )

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 32 / 91
Fourier Transform Fourier Transform

Z∞
F {cos(ω0 t)} = cos(ω0 t) exp(−j ω t) dt
−∞
Z∞
1
= [exp(j ω0 t) + exp(−j ω0 t)] exp(−j ω t) dt
2
−∞
Z∞ Z∞
1 1
= exp(−j [ω − ω0 ] t) dt + exp(−j [ω + ω0 ] t) dt
2 2
−∞ −∞
= π δ(ω − ω0 ) + π δ(ω + ω0 )

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 33 / 91
Fourier Transform Fourier Transform

Figure 32: A signal with four different frequencies

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 34 / 91
Fourier Transform Fourier Transform

Figure 33: A signal with four different frequency components at four different time intervals

Figure 34: Each peak corresponds to a frequency of a periodic component

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 35 / 91
Discrete Fourier Transform (DFT)

Discrete Fourier Transform (DFT)

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 36 / 91
Discrete Fourier Transform (DFT)

Many applications demand the processing of signals in frequency domain.


The analysis of signal frequency, periodicity, energy and power spectrums can be analyzed
in frequency domain.
Frequency analysis of discrete time signals is usually and most conveniently performed on
a digital signal processor.

Applications of DFT:
Spectral analysis
Convolution of signals
Partial differential equations
Multiplication of large integers
Data compression

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 37 / 91
Discrete Fourier Transform (DFT) Summary of FS and FT

Fourier Series is

X ∞
X
x(θ) = a0 + an cos(nθ) + bn sin(nθ)
n=1 n=1


1
R
where a0 = 2π
x(θ)dθ
0

Z2π Z2π
1 1
an = x(θ)cos(nθ)dθ bn = x(θ)sin(nθ)dθ
π π
0 0

The Exponential (Complex) Form


∞ Z π
X 1
x (θ) = cn e jnθ where cn = x(θ)e −jnθ dθ
n=−∞
2π −π

∞ Z T /2
X 1
x(t) = cn e jnωt where cn = x(t)e −jnωt dt
n=−∞
T −T /2

Fourier Transform pair is


Z ∞ 1
Z ∞
X (ω) = f (t)e (−ωt) dt and x(t) = X (ω)e (jωt) dω
−∞ 2 −∞

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 38 / 91
Discrete Fourier Transform (DFT) Summary of FS and FT

Time Domain Frequency Domain Transform


Continuous Periodic Discrete nonperiodic Fourier series
Continuous nonperiodic Continuous nonperiodic Fourier Transform
Discrete nonperiodic Continuous nonperiodic Sequences Fourier Transform
Discrete periodic Discrete periodic Discrete Fourier Transform

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 39 / 91
Discrete Fourier Transform (DFT) Summary of FS and FT

The Fourier Series for Continuous time Periodic Signals



ck e j2πnft
P
Synthesis Equation x(t) =
k=−∞

1
x(t)e −j2πnft dt
R
Analysis Equation cn = T
−∞

The Fourier Transform for Continuous Time Aperiodic Signals



X (F )e j2πFt dF
R
Synthesis Equation (Inverse transform) x(t) =
−∞

x(t)e −j2πFt dt
R
Analysis Equation (Direct transform) X (F ) =
−∞

The Fourier Series for Discrete time Periodic Signals


N−1
ck e j2πkn/N
P
Synthesis Equation x(n) =
k=0
N−1
1
x(n)e −j2πkn/N
P
Analysis Equation ck = N
n=0

The Fourier Transform of Discrete Time Aperiodic Signals



1
X (F )e j2πF1 t dF
R
Synthesis Equation (Inverse transform) x(n) = 2π
−∞

x(n)e −j2πkn/N
P
Analysis Equation (Direct transform) X (ω) =
n=−∞

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 40 / 91
Discrete Fourier Transform (DFT) Summary of FS and FT

DFT transforms the time domain signal samples to the frequency domain components.

Signal
Amplitude

Amplitude
Signal Spectrum

Time Frequency

Figure 35: Discrete Fourier Transform

Signal Types of Transforms Example Waveform


Continuous and periodic Fourier Series sine wave
Continuous and aperiodic Fourier Series
Discrete and periodic Fourier Series
Discrete and aperiodic Fourier Series

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 41 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Need For Frequency Domain Sampling


In practical application, signal processed by computer has two main characteristics: It
should be Discrete and Finite length
But nonperiodic sequences Fourier Transform is a continuous function of ω, and it is a
periodic function in ω with a period 2π.
So it is not suitable to solve practical digital signal processing.
Frequency analysis on a discrete-time signal x(n) is achieved by converting time domain
sequence to an equivalent frequency domain representation, which is represented by the
Fourier transform X (ω) of the sequence x(n).
Consider an aperiodic discrete time signal x(n) and its Fourier transform is


X
X (ω) = x(n)e −jωn
n=−∞

The Fourier transform X (ω) is a continuous function of frequency and it is not a


computationally convenient representation of the sequence.
To overcome the processing, the spectrum of the signal X (ω) is sampled periodically in
frequency at a spacing of δω radians between successive samples.
The signal X (ω) is periodic with period 2π and take N equidistant samples in the interval
0 ≤ ω ≤ 2π with spacing δ = 2π/N .

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 42 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Figure 36: Frequency domain


sampling
Figure 37: Frequency domain
sampling

To Determine The Value Of N

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 43 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Now consider ω = 2πk/N


  ∞
2π X
X k = x(n)e −j2πkn/N k = 0, 1, 2, . . . N − 1
N n=−∞

  −1 N−1
2π X X
X k = ··· + x(n)e −j2πkn/N + x(n)e −j2πkn/N
N n=−N n=0
2N−1
X
+ x(n)e −j2πkn/N + · · ·
n=N

X lN+N−1
X
= x(n)e −j2πkn/N
n=−∞ n=lN

By changing the index in the inner summation from n to n − lN and interchanging the
order of summation
 
  N−1 ∞
2π X X 2π
X k =  x(n − lN) e −j N k(n−lN)
N n=0 n=−∞
 
N−1 ∞
X X 2π
=  x(n − lN) e −j N kn e −j2πkl
n=0 n=−∞

e −j2πkl = 1 ∵ both k and l integers


Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September
5] 11, 2014 44 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

 
  N−1 ∞
2π X X
X k =  x(n − lN) e −j2πkn/N k = 0, 1, 2, . . . N − 1
N n=0 n=−∞


X
Let xp (n) = x(n − lN)
n=−∞

The term xp (n) is obtained by the periodic repetition of x(n) every N samples hence it is
a periodic signal. This can be expanded by Fourier series as

N−1
X
xp (n) = ck e j2πkn/N n = 0, 1, · · · N − 1
k=0

where ck is the fourier coefficients expressed as

N−1
1 X
ck = xp (n)e −j2πkn/N k = 0, 1, · · · N − 1
N n=0

Upon comparing
 
1 2π
ck = X k k = 0, 1, · · · N − 1
N N

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 45 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

N−1  
1 X 2π
xp (n) = X k e j2πkn/N n = 0, 1, · · · N − 1
N k=0 N

xp (n) is the reconstruction of the periodic signal from the spectrum X (ω) (IDFT).
The equally spaced frequency samples X 2π

N
k = 0, 1, · · · N − 1 do not uniquely
represent the original sequence when x(n) has infinite duration. When x(n) has a finite
duration then xp (n) is a periodic repetition of x(n) and xp (n) over a single period is

x(n) 0≤n ≤L−1
xp (n) =
0 L≤n ≤N −1

For the finite duration sequence of length L the Fourier transform is:
L−1
X
X (ω) = x(n)e −jωn 0 ≤ ω ≤ 2π
n=0

When X (ω) is sampled at frequencies ωk = 2πk/N k = 0, 1, 2, . . . N − 1 then


  L−1 N−1
2πk X X
X (k) = X = x(n)e −j2πkn/N = x(n)e −j2πkn/N
N n=0 n=0

The upper index in the sum has been increased from L − 1 to N − 1 since x(n)=0 for n ≥ L
Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September
5] 11, 2014 46 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

DFT and IDFT expressions are


DFT expressions is

N−1
X
X (k) = x(n)e −j2πkn/N k = 0, 1, . . . N − 1
n=0

IDFT expressions is

N−1  
1 X 2π
xp (n) = X k e j2πkn/N n = 0, 1, · · · N − 1
N k=0 N

If xp (n) is evaluated for n = 0, 1, 2 . . . N − 1 then xp (n) = x(n)

N−1
1 X
x(n) = X (k) e j2πkn/N n = 0, 1, · · · N − 1
N k=0

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 47 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

DFT as a Linear Transformation

N−1
X 2π kn
X (k) = x(n)e −j N k = 0, 1, . . . N − 1
n=0

Let

WN = e −j N is called twiddle factor

N−1
X
X (k) = x(n)WNnk for k = 0, 1.., N − 1
x=0

 
1 1 1 1 ... 1
X (0) x(0)
   
 1 W W2 W3 ... W N−1 
X (1)     x(1)
1 W2 W2 W4 ... W 2(N−1)
 
   
X (2) x(2)
 
   
= W3 W6 W9 W 3(N−1) .
 
1 ...
. ..
 
   
..
 
  .  
.
..
   
x(N − 1)
 
X (3)
1 W N−1 W N−2 W N−3 ... W (N−1)(N−1)

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 48 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Periodicity property of WN

WN = e −j N

Let us consider for N=8


2π π
W8 = e −j 8 1 = e −j 4

π
kn W8kn = e − 4 kn Result
0 W80 = e 0 Magnitude 1 Phase 0
π π
1 W81 = e −j 4 1 = e −j 4 Magnitude 1 Phase −π/4
2 −j π 2 −j π
2 W8 = e 4 = e 2 Magnitude 1 Phase −π/2
−j π 3 −j3 π
3 3
W8 = e 4 = e 4 Magnitude 1 Phase −3 π4
4 −j π 4 −jπ
4 W8 = e 4 = e Magnitude 1 Phase −π
π π
5 W85 = e −j 4 5 = e −j3 5 Magnitude 1 Phase −5π/4
π π
6 W86 = e −j 4 6 = e −j3 2 Magnitude 1 Phase −3π/2
7 −j π 7 −j7 π
7 W8 = e 4 = e 4 Magnitude 1 Phase −7π/4
8 −j π 8 −j2π
8 W8 = e 4 = e Magnitude 1 Phase −2π W88 = W80
π π
9 W89 = e −j 4 9 = e −j(2π+ 4 ) Magnitude 1 Phase (−2π + π/4) W89 = W81
π π
10 W810 = e −j 4 10 = e −j(2π 2 ) Magnitude 1 Phase (−2π +π/2) W810 = W82
π 3π
11 W811 = e −j 4 11 = e −j2π+ 4 W811 = W83

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 49 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Imaginary
part of WN
W85 = W813 = .. W86 = W814 = .. = j
1 1
=− +j W87 = W815 = ..
2 2
1 1
= +j
2 2

Real part
W84 = W812 = .. of WN
W80 = W88 = .. = 1
= −1

W83 = W811 = ..
W81 = W89 = ..
1 1
=− −j 1 1
2 2 W82 = W810 = .. = − j = −j
2 2

Figure 38: Periodicity of WN and its values

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 50 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Imaginary
part of WN
W43 = j = W47 = W411

Real part
W42 = −1 = W46 W40 = 1 = W44 of WN

= W410 = W48

W41 = − j = W45 = W49

Figure 39: Periodicity of WN and its values

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 51 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find Discrete Fourier Transform (DFT) of x(n) = [2 3 4 4]


Solution:

N−1
X 2π nk
X (k) = x(n)e −j N for k = 0, 1.., N − 1
n=0

π π π
e −j 2 = cos − jsin = −j e −jπ = cos(π) − jsin(π) = −1
2 2
3π 3π 3π
e −j 2 = cos − jsin =j e −j2π = cos(2π) − jsin2(π) = 1
2 2

for k=0,1,2,3
3
x(n)e 0 = 2e 0 + 3e 0 + 4e 0 + 4e 0 = [2 + 3 + 4 + 4] = 13
P  
X (0) =
n=0
3 2πn
x(n)e −j = 2e 0 + 3e −jπ/2 + 4e −jπ + 4e −j3π/2 = [2 − 3j − 4 + 4j] = [−2 + j]
P  
X (1) = 4
n=0
3 −j4πn
= 2e 0 + 3e −jπ + 4e −j2π + 4e −j3π = [2 − 3 + 4 − 4] = [−1 − 0j] = −1
P  
X (2) = x(n)e 4
n=0
3 −j6πn
= 2e 0 + 3e −j3π/2 + 4e −j3π + 4e −j9π/2 = [2 + 3j − 4 − 4j][−2 − j]
P  
X (3) = x(n)e 4
n=0
The DFT of the sequence x(n) = [2 3 4 4] is [13, -2+j, -1, -2-j]

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 52 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find Discrete Fourier Transform (DFT) of x(n) = [2 3 4 4]

N−1
X 2π nk
X (k) = x(n)e −j N for k = 0, 1.., N − 1
n=0

Matlab code for the DFT equation is:


clc; clear all; close all
xn=[2 3 4 4]
N=length(xn);
n=0:N-1;
k=0:N-1;
WN=exp(-1j*2*pi/N);
nk=n’*k;
WNnk=WN.^nk;
Xk=xn*WNnk
Matlab code using FFT command
clc; clear all; close all
xn=[2 3 4 4]
y=fft(xn)

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 53 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find DFT for a given a sequence x(n) for 0 ≤ n ≤ 3 where


x(0) = 1, x(1) = 2, x(2) = 3, x(3) = 4

Solution:
x(n) = [1 2 3 4]
for k=0,1,2,3
3
x(n)e 0 = 4e 0 + 2e 0 + 3e 0 + 4e 0 = [1 + 2 + 3 + 4] = 10
P  
X (0) =
n=0
3 2πn
x(n)e −j = 1e 0 + 2e −jπ/2 + 2e −jπ + 4e −j3π/2 = [1 − j2 − 3 + j4] = [−2 + j2]
P  
X (1) = 4
n=0
3 −j4πn
= 1e 0 + 2e −jπ + 3e −j2π + 4e −j3π = [1 − 2 + 3 − 4] = [−1 − 0j] = −2
P  
X (2) = x(n)e 4
n=0
3 −j6πn
= 1e 0 + 2e −j3π/2 + 3e −j3π + 4e −j9π/2 = [1 + 2j − 3 − 4j][−2 − j2]
P  
X (3) = x(n)e 4
n=0

The DFT of the sequence x(n) = [1 2 3 4] is [10, − 2 + j2, − 2, − 2 − j2]

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 54 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find 8 point DFT for a given a sequence x(n) = [1, 1, 1, 1] assume imaginary part is zero. Also
calculate magnitude and phase

Solution:
x(n) = [1 1 1 1]
The 8 point DFT is of length 8. Append zeros at the end of the sequence. x(n) = [1 1 1 1 0 0 0
0]

 1 1 1 1 1 1 1 1
X (0) x(0)
    
 X (1)   1 W81 W82 W83 W84 W85 W86 W87   x(1) 
X (2)   1 W82 W84 W86 W88 W810 W812 W814 x(2)
     
   
X (3)   1 W83 W86 W89 W812 W815 W818 W821 x(3)
     
= =
   
X (4)   1 W84 W88 W812 W816 W820 W824 W828 x(4)
 
   
X (5)   1 W85 W810 W815 W820 W825 W830 W835 x(5)
     
   
 X (6)   1 W86 W812 W818 W824 W830 W836 W842   x(6) 
X (7) 1 W87 W814 W821 W828 W835 W842 W849 x(7)

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 55 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

W80 = W88 = W816 = W824 = W840 ... = 1


W81 = W89 = W817 = W825 = W833 ... = √1 − j √1
2 2
W82 = W810 = W818 = W826 = W834 ... = −j
W83 = 11 19 27 35
W8 = W8 = W8 = W8 ... = − √ − j √1 1
2 2
W84 = W812 = W820 = W828 = W836 ... = −1
W85 = 13 21 29 37
W8 = W8 = W8 = W8 ... = − √ + j √ 1 1
2 2
W86 = W814 = W822 = W830 = W838 ... = j
W87 = 15 23 31
W8 = W8 = W8 = W8 ... =39 √1 +j √1
2 2

1 1 1 1 1 1 1 1
 
X (0) 1
   
 1 √1 − j √1 −j − √1 − j √1 −1 − √1 + j √1 j 1
√ + j √1 
 X (1)   2 2 2 2 2 2 2 2   1 

X (2)
 
 1 −j −1 j 1 −j −1 j 
  1 
 
− √1 − j √1 1 − j √1 1 + j √1 − √1 + j √1
 

X (3)
  1 j √ 1 √ −j  
1 

2 2 2 2 2 2 2 2
 
= =
 
X (4) 1 −1 1 −1 1 −1 1 −1  0 
    
 
− √1 + j √1 1 + j √1 1 − j √1 − √1 − j √1
 

 X (5) 
  1 −j √ −1 √ j   0 
 
 2 2 2 2 2 2 2 2 
 X (6)  
 1 j −1 −j 1 j −1 −j


 0 
X (7) 1 0
1 √ + j √1 j − √1 + j √1 −1 − √1 − j √1 −j √1 − j √1
2 2 2 2 2 2 2 2

 4  0
XR (0) 4 XI (0)
     
√ √
 1 − j(1 + 2)   XR (1)  1   XI (1)   −(1 + 2) 
 0  0
 XR (2) 0 XI (2)
     
 √      √ 
 1 + j(1 − 2)  XR (3) 1 XI (3)   (1 − 2)
       
=  and
    
 0  XR (4) 0 XI (4)  0
    
√ 
 X (5)
   √ 
 1 − j(1 − 2)
 
  R

 1 


 XI (5)   −(1 − 2)
 

 X (6) 0 XI (6)
0 0
      
√ R √
1 + j(1 + 2) XR (7) 1 XI (7) (1 + 2)

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 56 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find DFT for a given a sequence x(n) = [2 3 4 4]

Solution:      
X (0) 1 1 1 1 2
 X (1)   1
= W W2 W 3  3 
  =  
 X (2)   1 W2 W4 W6   4 
X (3) 1 W3 W6 W9 4

2π 2π π
WN = e − N = e− 4 = e − 2 = −j
W 2 = −j 2 = −1, W 3 = −j 3 = j
Using the property of periodicity of W W p = W P+r .N = j with basic period N = 4
W 4 = W 4−4 = W 0 = 1, W 6 = W 6−4 = W 2 = −1, W 9 = W 9−2.4 = W 1 = −j
      
X (0) 1 1 1 1 2 13
 X (1)   1 −j −1 j 
 3
   −2 + j 
 X (2)  = 
   = 
1 −1 1 −1   4   −1 
X (3) 1 j −1 −j 4 −2 − j

The DFT of the sequence x(n) = [2 3 4 4] is [13, − 2 + j, − 1, − 2 − j]

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 57 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find DFT for a given a sequence x(n) = [1 2 3 4]

Solution:      
X (0) 1 1 1 1 1
 X (1)   1
= W W2 W 3  2 
  =  
 X (2)   1 W2 W4 W6   3 
X (3) 1 W3 W6 W9 4

2π 2π π
WN = e − N = e− 4 = e − 2 = −j
W 2 = −j 2 = −1, W 3 = −j 3 = j
Using the property of periodicity of W W p = W P+r .N = j with basic period N = 4
W 4 = W 4−4 = W 0 = 1, W 6 = W 6−4 = W 2 = −1, W 9 = W 9−2.4 = W 1 = −j
      
X (0) 1 1 1 1 1 10
 X (1)   1 −j −1 j 
 2
   −2 + 2j 
 X (2)  = 
   = 
1 −1 1 −1   3   −2 
X (3) 1 j −1 −j 4 −2 − 2j

The DFT of the sequence x(n) = [1 2 3 4] is [10, − 2 + j2, − 2, − 2 − j2]

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 58 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Inverse DFT: Find the IDFT for X (k) = [10, − 2 + j2, − 2, − 2 − j2]

N−1
1 X 2π
x(n) = X (k)e N kn for n = 0, 1.., N − 1
N k=0

N−1
1 X 2π
x(n) = X (k)W ∗kn for n = 0, 1.., N − 1 where W∗ = e N
N k=0

N−1
1 X
x(0) = X (k)e j0 = X (0)e j0 + X (1)e j0 + X (2)e j0 + X (3)e j0
4 k=0
1
= (10 + (−2 + j2) − 2 + (−2 − j2)) = 1
4

N−1
1 X kπ π 3π
x(1) = X (k)e j 2 = X (0)e j0 + X (1)e j 2 + X (2)e jπ + X (3)e j 2
4 k=0
1
= (X (0) + jX (1) − X (2) − jX (3)
4
1
= (10 + j(−2 + j2) − (−2) − j(−2 − j2)) = 2
4

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 59 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

N−1
1 X kπ
x(2) = X (k)e j 2 = X (0)e j0 + X (1)e jπ + X (2)e j2π + X (3)e j3π
4 k=0
1
= (X (0) − X (1) + X (2) − X (3)
4
1
= (10 − (−2 + j2) + (−2) − (−2 − j2)) = 3
4

N−1
1 X kπ3 3π 9π
x(1) = X (k)e j 2 = X (0)e j0 + X (1)e j 2 + X (2)e j3π + X (3)e j 2
4 k=0
1
= (X (0) − jX (1) − X (2) + jX (3)
4
1
= (10 − j(−2 + j2) − (−2) + j(−2 − j2)) = 4
4

Matlab command used to calculate the Inverse DFT is ifft

x=[10 -2+j2 -2 -2-j2]


y=ifft(x)

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 60 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find the Discrete Fourier Transform of the following signal: x(n), n = 0,1,2,3 = [1, 1, -1, -1].
Solution:
N=4 The matrix notation is

X = T .f

where T is matrix of the transform with elements Tkn = WNkn k, n = 0, 1.., N −1


      
X (0) 1 1 1 1 1 0
 X (1)   1 −j −1 j    2 − 2j
 1
 
 = = 
 X (2)   1 −1 1 −1   −1   0 
X (3) 1 j −1 −j −1 2 + 2j

The DFT of the sequence x(n) = [1 1 -1 -1] is [0, 2 − j2, 0, 2 + j2]

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 61 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find the Inverse Discrete Fourier Transform of the following signal: x(n), n = 0,1,2,3 = [0, 2-2j,
0, 2+2j].
Solution:
The IDFT of the discrete signal X(k)is x(n):
N = 4 and W4 = e −π/2

N−1
1 X 2π
x(n) = X (k)WN−kn for n = 0, 1.., N − 1 where W = e− N
N k=0

N=4 The matrix notation is


   
1 1 1 1 1 1 1 1
 1 −j −1 j   1 j −1 −j 
[WN ] =  1 −1
 [WN∗ ] =  
1 −1   1 −1 1 −1 
1 j −1 −j 1 −j −1 j
      
x(0) 1 1 1 1 0 1
 x(1)  1  1 j −1 −j   2 − 2j   1 
   
 x(2)  = N   =  −1 
   
1 −1 1 −1   0
x(3) 1 −j −1 j 2 + 2j −1

The IDFT of the sequence X (k) = [0, 2 − j2, 0, 2 + j2] is [1 1 -1 -1]

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 62 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find DFT for a given a sequence x[0]=1, x[1]=2, x[2]=2, x[3]=1, x[n]=0 otherwise: x =
[1,2,2,1]

Solution:
x(n) = [1 2 2 1]
for k=0,1,2,3
3
x(n)e 0 = 1e 0 + 2e 0 + 2e 0 + 1e 0 = [1 + 2 + 2 + 1] = 6
P  
X (0) =
n=0
3 2πn
x(n)e −j = 1e 0 + 2e −jπ/2 + 2e −jπ + 1e −j3π/2 = [1 − j2 − 2 + j1] = [−1 − j1]
P  
X (1) = 4
n=0
3 −j4πn
= 1e 0 + 2e −jπ + 2e −j2π + 1e −j3π = [1 − 2 + 2 − 1] = [0] = 0
P  
X (2) = x(n)e 4
n=0
3 −j6πn
= 1e 0 + 2e −j3π/2 + 2e −j3π + 1e −j9π/2 = [1 + 2j − 2 − 1j][−1 + j1]
P  
X (3) = x(n)e 4
n=0

The DFT of the sequence x(n) = [1 2 2 1] is [6, − 1 − j1, 0, − 1 + j1]

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 63 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find IDFT for a given a sequence X[0]=6, X[1]=-1-j1, X[2]=0, X[3]=-1+j1, X[n]=0 otherwise:
x = [6, − 1 − j1, 0, − 1 + j1]

Solution:
x(n) = [6, − 1 − j1, 0, − 1 + j1]
for k=0,1,2,3
3
X (0) = 14 x(n)e 0 = 6e 0 + (−1 − j1)e 0 + 0e 0 + (−1 + j1)e 0 = 14 [6−1−j1+0−1+j1] = 1
P  
n=0
3 2πn
1
x(n)e j = 6e 0 + (−1 − j1)e jπ/2 + 0e jπ + (−1 + j1)e j3π/2 =
P  
X (1) = 4
4
n=0
1
4
[6− j + 1 + j + 1] = [2]
3 j4πn
X (2) = 14 x(n)e 4 = 6e 0 + (−1 − j1)e jπ + 0e j2π + (−1 + j1)e j3π =
P  
n=0
1
4
[6+ (−1 − j1)(j) + 0 + (−1 + j)(−j)] = 14 [6 − j1 + 1 + 0 + 1 + j] = [2]
3 −j6πn
X (3) = 14 x(n)e 4 = 6e 0 + (−1 − j1)e j3π/2 + 0e j3π + (−1 + j1)e j9π/2 =
P  
n=0
1
4
[6 + (−1 − j1)(−j) + 0 + (−1 + j)(j)] = 14 [6 + j1 − 1 + 0 − 1 − j] = [1]

The IDFT of the sequence [6, − 1 − j1, 0, − 1 + j1] is x(n) = [1 2 2 1]

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 64 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Continuous Time Fourier Transform (CTFT)


Z∞
X (jω) = x(t)e −jωt dt
−∞

Z∞
1
x(t) = X (jω)e jωt dω

−∞

Discrete Time Fourier Transform (DTFT)



X
X (e jω ) = x(n)e −jωn
−∞
Z
1
x(n) = X (e jω )e jωn dω

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 65 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Unit sample δ(n) 


1 for n = 0
x(n) =
0 for n 6= 0

N−1
X 2π nk
X (k) = x(n)e −j N

x=0
N−1
X
= x(0)e 0 = 1 × 1 = 1
x=0

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 66 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find the N Point DFT of x(n) = an for 0 ≤ n ≤ N − 1

N−1
X 2π nk
X (k) = x(n)e −j N

x=0
N−1 N−1
X 2π nk X 2πk
= an e −j N = (ae −j N )n
x=0 x=0

N−1
!
1 − aN e −j2πk X aN1 − aN2 +1
X (k) = Using series expansion ak =
1 − ae −j2πk /N k=0
1−a

e −j2πk =1

1 − aN
X (k) =
1 − ae −j2πk /N

x[n] = (0.5)n u[n] 0 ≤ n ≤ 3

1 − (0.5)4 0.9375
X (k) = =
1 − 0.5e −j2πk /4 1 − 0.5e −jπ/2k

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 67 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find the 4 Point DFT of x(n) = cos( nπ


4
)

Solution:
x(0) = cos(0) = 1
x(1) = cos( 1π
4
) = 0.707
x(2) = cos( 2π
4
)=0
x(3) = cos( 3π
4
) = −0.707
      
x(0) 1 1 1 1 1 1
 x(1)  1  1 −j −1 j 
  0.707
   1 − j1.414 
 x(2)  = N
   = 
 1 −1 1 −1   0   1 
x(3) 1 j −1 −j −0.707 1 + j1.414

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 68 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

If the length of x[n]


√ is N=4, and
√ if its 8-point
√ DFT is:
√ X8 [k]
k = 0..7 = [5, 3 − 2j, 3, 1 − 2j, 1, 1 + 2j, 3, 3 + 2j] , find the 4 point DFT of the signal
x[n].
Solution:
The samples of Xs [k] are eight equally spaced samples from the frequency spectrum of
the signal x[n]:
More precisely, they are samplesfrom the spectrum for the following frequencies:
ωT = 0, π4 , π2 , 3π , π 5π , 3π , 7π

4 4 2 4
With 4-point DFT of x[n] we get 4 samples from the spectrum of x[n]: ωT = 0, π2 , π, 3π
 
2
By comparing the two sets of frequencies:
X4 [0] = X (e j0 ) = Xs [0] = 5
X4 [1] = X (e jπ/2 ) = Xs [2] = 3
X4 [2] = X (e jπ ) = Xs [4] = 1
X4 [3] = X (e j3π/2 ) = Xs [6] = 3

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 69 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find the Fourier Transform of the sequence



1 0≤n≤4
x[n] =
0 else

  ∞
X
X e jw = x [n] e −jwn
n=−∞

  sin (5ω/2)
X e jω = e −j2ω
sin (ω/2)
Consider a causal sequence x[n] where;

x[n] = (0.5)n u[n]

Its DTFT X e jw can be obtained as




  ∞
X ∞
X
X e jw = (0.5)n u[n]e −jwn = (0.5)n (1)e −jwn
n=−∞ n=0

∞ 
X n 1
= 0.5e jw =
n=0
1 − 0.5e −jw

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 70 / 91
Discrete Fourier Transform (DFT) Discrete Fourier Transform (DFT)

Find the N Point DFT of x(n) = 4 + cos 2 ( 2πn


N
)

Solution:
x(0) = 4 + cos 2 (0) = 5
x(1) = 4 + cos 2 ( 2π1
10
) = 4.6545
x(2) = 4 + cos 2 ( 2π2
10
) = 4.09549
x(3) = 4 + cos 2 ( 2π3
10
) = 4.09549
x(4) = 4 + cos 2 ( 2π4
10
) = 4.09549
x(5) = 4 + cos 2 ( 2π5
10
)=5
x(6) = 4 + cos 2 ( 2π6
10
) = 4.6545
x(7) = 4 + cos 2 ( 2π7
10
) = 4.09549
x(8) = 4 + cos 2 ( 2π8
10
) = 4.09549
x(9) = 4 + cos 2 ( 2π9
10
) = 4.6545
x(n) = x(N − n)
Cosine function is even function
x(n) = x(−n)
N−1  
X 2πkn
X (k) = x(n)cos 0≤k ≤N −1
n=0
N

N−1
X   
2πn 2πkn
X (k) = 4 + cos 2 ( ) cos 0≤k ≤N −1
n=0
N N

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 71 / 91
Relationship of the DFT to other Transforms Relationship of the DFT to other Transforms

Relationship of the DFT to other Transforms

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 72 / 91
Relationship of the DFT to other Transforms Relationship of the DFT to other Transforms

Relationship to the Fourier series coefficients of periodic sequence


DFT expression is
N−1
X
X (k) = x(n)e −j2πkn/N k = 0, 1, . . . N − 1 (1)
n=0

IDFT expression is
N−1
1 X
x(n) = X (k)e j2πkn/N n = 0, 1, · · · N − 1 (2)
N k=0

Fourier series is
N−1
X 2π nk
xp (n) = ck e j N −∞≤n ≤∞ (3)
k=0

Fourier series coefficients are expressed as:


N−1
1 X 2π
ck = xp (n)e −j N nk k = 0, 1.., N − 1 (4)
N k=0

By comparing X (k) and ck fourier series coefficients has the form of a DFT.
x(n) = xp (n) 0 ≤ n ≤ N − 1
X (k) = Nck 0≤n ≤N −1
Fourier series has the form of an IDFT
Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September
5] 11, 2014 73 / 91
Relationship of the DFT to other Transforms Relationship of the DFT to other Transforms

Relationship to the Fourier transform of an aperiodic sequence (DFT and DTFT)


Fourier transform X (ω)


X
X (ω) = x(n)−jωn −∞≤n ≤∞ (5)
n=−∞


X 2π nk
X (k) = X (ω|ω=2πk/N ) = x(n)−j N −∞≤n ≤∞ (6)
n=−∞

DFT coefficients are expressed as:


X
xp (n) = x(n − lN) (7)
n=−∞

xp (n) is determined by aliasing x(n) over the interval 0 ≤ n ≤ N − 1. The finite duration
sequence 
xp (n) 0 ≤ n ≤ N − 1
x̂(n) =
0 Otherwise

The relation between x̂(n) and x(n) exist when x(n) is of finite duration
x(n) = x̂(n) 0≤n ≤N −1

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 74 / 91
Relationship of the DFT to other Transforms Relationship of the DFT to other Transforms

Relationship to the Z Transform


Z transform of the sequence x(n) is


X
X (z) = x(n)z −n (8)
n=−∞

Sample X(z) at N equally spaced points on the unit circle. These points will be

Zk = e j2πk/N k = 0, 1, · · · N − 1 (9)


X
X (z)|zk = e j2πk/N = x(n)e −j2πkn/N (10)
n=−∞

If x(n) is causal and has N number of samples then



X
X (z)|zk = e j2πk/N = x(n)e −j2πkn/N (11)
n=0

This is equivalent to DFT X(k)

X (k) = X (z)|zk = e j2πk/N (12)

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 75 / 91
Relationship of the DFT to other Transforms Relationship of the DFT to other Transforms

Parseval’s Theorem
Consider a sequence x(n) and y(n)

DFT
x(n) ↔ X (k)

DFT
y (n) ↔ Y (k)
N−1 N−1
X 1 X
x(n)y ∗ (n) = X (k)Y ∗ (k) (13)
n=0
N k=0

When x(n)=y(n)
N−1 N−1
X 1 X
|x(n)|2 = |X (k)|2 (14)
n=0
N k=0

This equation give the energy of finite duration sequence it terms of its frequency
components

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 76 / 91
Problems and Solutions on DFT Problems and Solutions on DFT

1

2
−2≤n ≤2
Determine the DFT of the sequence for N=8, h(n) =
0 otherwise
Plot the magnitude and phase response for N=8
Solution:  

1 1 1 1 1
h(n) = , , , ,
2 2 2 2 2
 

Consider a sequence x(n) and its DFT is


DFT
x(n) ↔ X (k)

DFT
xp (n) ↔ X (k)
where xp (n) is the periodic sequence of x(n) in this example x(n) is of h(n) and is of
 

1 1 1 1 1 
h(n) = , , , ,

 2 2 2 2 2 

There are 5 samples in h(n) append 3 zeros to the right side of the sequence h(n)
 

1 1 1 1 1 

h(n) = , , , , , 0, 0, 0
2 2 2 2 2
 

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 77 / 91
Problems and Solutions on DFT Problems and Solutions on DFT

DFT DFT
The DFT of h(n) and hp (n) is h(n) ↔ H(k) hp (n) ↔ H(k)

h( n )
1
2

-2 -1 0 1 2 3 4 5 n

h p (n ) These are new


sequences x(n)

-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 n

Figure 40: Plot of h(n) and hp (n)

The value of h(n) from the Figure is represented as



hp (n) 0 ≤ n ≤ N − 1
h(n) =
0 Otherwise
Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September
5] 11, 2014 78 / 91
Problems and Solutions on DFT Problems and Solutions on DFT

The new sequence h(n) from hp (n) is


 

1 1 1 
1 1
h(n) = , , , 0, 0, 0, ,
2 2 2
 2 2

 1 1 1 1 1 1 1 1
X (0) x(0)
    
 X (1)   1 W81 W82 W83 W84 W85 W86 W87   x(1) 
X (2)   1 W82 W84 W86 W88 W810 W812 W814 x(2)
     
   
X (3)   1 W83 W86 W89 W812 W815 W818 W821 x(3)
     
= =
   
X (4)   1 W84 W88 W812 W816 W820 W824 W828 x(4)
 
   
X (5)   1 W85 W810 W815 W820 W825 W830 W835 x(5)
     
   
 X (6)   1 W86 W812 W818 W824 W830 W836 W842   x(6) 
X (7) 1 W87 W814 W821 W828 W835 W842 W849 x(7)

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 79 / 91
Problems and Solutions on DFT Problems and Solutions on DFT
|H(k)|
Magnitude

2.5
W80 = W88 = W816 = W824 = W840 ... = 1

2
W81 = W89 = W817 = W825 = W833 ... = √1 − j √1

1 1.5
2 2
W82 = W810 = W818 = W826 = W834 ... = −j

.5
W83 = W811 = W819 = W827 = W835 ... = − √1 − j √1
2 2

0
W84 = W812 = W820 = W828 = W836 ... = −1 0 1 2 3 4 5 6 7 k

W85 = W813 = W821 = W829 = W837 ... = − √1 + j √1 180 Phase of H(k)


2 2
W86 = W814 = W822 = W830 = W838 ... = j 90
0 1 2 3 4 5 6 7 k
W87 = W815 = W823 = W831 = W839 ... = √1 + j √1
2 2
-90

-180

1 1 1 1 1 1 1 1
 
 1 
X (0)
 
1 √1 − j √1 −j − √1 − j √1 −1 − √1 + j √1 j 1
√ + j √1 2
 1
 
X (1)  2 2 2 2 2 2 2 2  
 
1 −j −1 j 1 −j −1 j  2
 1
  
X (2)
    
− √1 − j √1 1 − j √1 1 + j √1 − √1 + j √1  2
 

X (3)
  1 j √ 1 √ −j  
2 2 2 2 2 2 2 2 = 0
   
=
  
X (4) 1 −1 1 −1 1 −1 1 −1  0
   
 
− √1 + j √1 1 + j √1 1 − j √1 − √1 − j √1
   

 X (5) 
  1 −j √ −1 √ j   0 
 2 2 2 2 2 2 2 2  
 1

 X (6)  
1 j −1 −j 1 j −1 −j
 
  2
X (7) 1 1
1 √ + j √1 j − √1 + j √1 −1 − √1 − j √1 −j √1 − j √1 2
2 2 2 2 2 2 2 2

2.5 2.5∠0
   
 1.207   1.207∠0 
−0.5  0.5∠ − 180
   
  
−0.207  0.207∠ − 180
   
=
  
0.5  0.5∠0
 
  

 −0.207 

 0.207∠ − 180



 −0.5   0.5∠ − 180 
1.207 1.207∠0
Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September
5] 11, 2014 80 / 91
Problems and Solutions on DFT Problems and Solutions on DFT

The unit sample response of the first order recursive filter is given as h(n) = an u(n)
i) Determine the Fourier transform H(ω)
ii) DFT H(k) of h(n)
iii) Relationship between H(ω) and H(k)


X
H(ω) = h(n)e −jωn
n=−∞


X
= an u(n)e −jωn
n=−∞

X n
= (ae −jω) ∵ u(n) = 0 for n < 0
n=0

N−1
(
X N for a = 1
ak = 1−aN
1−a
for a 6= 1
k=0

(ae −jω )0 − (ae −jω )∞+1 1


H(ω) = =
1 − ae −jω 1 − ae −jω

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 81 / 91
Problems and Solutions on DFT Problems and Solutions on DFT

The DFT of h(n) and hp (n) is


DFT DFT
h(n) ↔ H(k) hp (n) ↔ H(k)
where hp (n) is related as

X
hp (n) = h(n − lN)
l=−∞

Consider l=-p
−∞
X ∞
X
hp (n) = h(n + pN) hp (n) = h(n + pN)
l=∞ l=−∞

N point DFT H(k) in terms of hp (n) is

N−1
X 2π kn
H(k) = h(n)e −j N

n=0

 
N−1 ∞
X X 2π kn
H(k) =  h(n + pN) e −j N

n=0 n=−∞

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 82 / 91
Problems and Solutions on DFT Problems and Solutions on DFT

 
N−1 ∞
X X 2π kn
H(k) =  a (n+pN)
u(n + pN) e −j N

n=0 n=−∞
N−1 ∞
" #
X X 2π kn
= a (n+pN)
e −j N ∵ u(n) = 0 for n < 0
n=0 n=0
N−1 ∞
" #
X X 2π kn
= an apN e −j N

n=0 n=0

Interchanging the summations

∞ N−1
X X 2π kn
H(k) = apN an e −j N

n=0 n=0

N
X 1 − aN
ak =
k=0
1−a

∞ ∞
X X p 1 − (aN )∞+1 1
apN = aN = =
p=0 p=0
1 − aN 1 − aN

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 83 / 91
Problems and Solutions on DFT Problems and Solutions on DFT

N−1 N−1
X 2π kn X 2π k)n (ae −j2πk/N )0 − (ae −j2πk/N )N
an e −j N = (ae −j N =
n=0 n=0
1 − (ae −j2πk/N )

N−1
X 2π k)n 1 − aN e −j2πk 1 − aN
(ae −j N = −j2πk/N
= ∵ e −j2πk = 1
n=0
1 − (ae ) 1 − (ae −j2πk/N )

1 1 − aN
H(k) =
1 − aN 1 − (ae −j2πk/N )
1
=
1 − (ae −j2πk/N )

1 1
H(ω) = = and H(k) =
1 − ae −jω 1 − (ae −j2πk/N )

H(k) = H(ω)|ω=2πk/N

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 84 / 91
Problems and Solutions on DFT Problems and Solutions on DFT

Compute the DFT of the following finite length sequence of length N x(n) = u(n) − u(n − N)
u(n)
Unit step sequence u(n)

0 1 2 3 4 N-3 N-2 N-1 N N+1 N+2 … n

u(n-N)
Unit step sequence delayed by N samples

0 1 2 3 4 N-3 N-2 N-1 N N+1 N+2 … n

x(n)=u(n)-u(n-N)

Subtraction of u(n-N) from u(n)

0 1 2 3 4 N-3 N-2 N-1 N N+1 N+2 … n

Figure 41: Generation of x(n) = u(n) − u(n − N)

The value of x(n) as shown in Figure is represented as



1 0≤n ≤N −1
x(n) =
0 Otherwise
Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September
5] 11, 2014 85 / 91
Problems and Solutions on DFT Problems and Solutions on DFT

DFT expression is

N−1
X
X (k) = x(n)e −j2πkn/N k = 0, 1, . . . N − 1
n=0
N−1
X
= 1e −j2πkn/N
n=0
N−1
"N−1 #
X X 1 − aN
= (e −j2πk/N )n (1) ak =
n=0 k=0
1−a

1 − e −j2πk 1−1
X (k) = = −j2πk/N = 0
e −j2πk/N e
When k=0 From the expression (1)

N−1
X
X (k) = (1)n = N
n=0


0 when k 6= 0
X (k) =
N when k = 0

X (k) = Nδ(k)

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 86 / 91
Problems and Solutions on DFT Problems and Solutions on DFT

7 7
|X (k)|2
P P
If x(n)=[1,2,0,3,-2, 4,7,5] evaluate the following i) X(0) ii) X(4) iii) X (k) iv)
k=0 k=0

X(0) is
N−1
X
X (k) = x(n)e −j2πkn/N
n=0

with k=0 and N=8

N−1
X
X (0) = x(n) = 1 + 2 + 0 + 3 − 2 + 4 + 7 + 5 = 20
n=0

X(4) is
N−1
X
X (k) = x(n)e −j2πkn/N
n=0

with k=4 and N=8

N−1
X N−1
X N−1
X
X (4) = x(n)e −j2π4n/8 = x(n)e −jπn = x(n)(−1)n
n=0 n=0 n=0

X (4) == 1 − 2 + 0 − 3 − 2 − 4 + 7 − 5 = −8

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 87 / 91
Problems and Solutions on DFT Problems and Solutions on DFT

7
P
iii) X (k)
k=0
We Know the IDFT expression as
N−1
1 X
x(n) = X (k)e j2πkn/N
N n=0

With n=0 and N=8 it becomes

N−1
1 X
x(0) = X (k)
8 n=0

N−1
X
∴ X (k) = 8x(0) = 8 × 1 = 8
n=0

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 88 / 91
Problems and Solutions on DFT Problems and Solutions on DFT

7
|X (k)|2 is
P
The value of
k=0
The expression for Parseval’s theorem is

N−1 N−1
X 1 X
|x(n)|2 = |X (k)|2
n=0
N k=0

7
|X (k)|2 is related as
P
k=0
N−1 N−1
X 1 X
|x(n)|2 = |X (k)|2
n=0
N k=0

N=8 Then
7 7
X 1X
|x(n)|2 = |X (k)|2
n=0
8 k=0

7
X 7
X
|X (k)|2 = 8 |x(n)|2 = 8[1 + 4 + 0 + 9 − 4 + 4 + 49 + 25] = 864
k=0 n=0

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 89 / 91
Thank You

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 90 / 91
References

J. G. Proakis and D. G. Monalakis, Digital signal processing Principles Algorithms &


Applications, 4th ed. Pearson education, 2007.
Oppenheim and Schaffer, Discrete Time Signal Processing. Pearson education, Prentice
Hall, 2003.
S. K. Mitra, Digital Signal Processing. Tata Mc-Graw Hill, 2004.

L. Tan, Digital Signal Processing. Elsivier publications, 2007.

J. S. Chitode, Digital signal processing. Technical Pulications.

B. Forouzan, Data Communication and Networking, 4th ed. McGraw-Hill, 2006.

Dr. Manjunatha. P (JNNCE) UNIT - 1: Discrete Fourier Transforms (DFT)[1, 2, 3, 4,September


5] 11, 2014 91 / 91
UNIT - 2: Properties of Discrete Fourier Transforms
(DFT)[?, ?, ?, ?]

Dr. Manjunatha. P
[email protected]

Professor
Dept. of ECE

J.N.N. College of Engineering, Shimoga

September 14, 2014


DSP Syllabus Introduction

Digital Signal Processing: Introduction [?, ?, ?, ?]

Slides are prepared to use in class room purpose, may be used as a


reference material
All the slides are prepared based on the reference material
Most of the figures/content used in this material are redrawn, some
of the figures/pictures are downloaded from the Internet.
This material is not for commercial purpose.
This material is prepared based on Digital Signal Processing for
ECE/TCE course as per Visvesvaraya Technological University (VTU)
syllabus (Karnataka State, India).

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?, ?]
14, 2014 2 / 49
DSP Syllabus

DSP Syllabus

PART - A

UNIT - 2: Properties of Discrete Fourier Transforms (DFT)


Properties of DFT.
Multiplication of two DFTs- the circular convolution.
Additional DFT properties
Use of DFT in linear filtering,
Overlap-save and overlap-add method. 7 Hours

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?, ?]
14, 2014 3 / 49
Properties of Discrete Fourier Transform (DFT)

Properties of Discrete Fourier Transform (DFT)

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?, ?]
14, 2014 4 / 49
Properties of Discrete Fourier Transform (DFT)

Periodicity
DFT
x(n) ↔ X (k)
if
x(n + N) = x(n)
Then
X (k + N) = X (k)
N−1
X 2π kn
X (k) = x(n)e −j N

n=0

N−1 N−1
X 2π (k+N)n X 2π kn
X (k + N) = x(n)e −j N = x(n)e −j2πn e −j N

n=0 n=0

N−1
X 2π kn
X (k + N) = x(n)e −j N = X (k) since e −j2πn = 1
n=0

Hence we note that X(k+N) = X(k)


This tells us that DFT is periodic with period N. This is known as the cyclical property of
DFT.

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?, ?]
14, 2014 5 / 49
Properties of Discrete Fourier Transform (DFT)

Linearity
DFT
x1 (n) ↔ X1 (k)
DFT
x2 (n) ↔ X2 (k)

DFT
ax1 (n) + bx2 (n) ↔ aX1 (k) + bX2 (k)

Proof

N−1
X
X (k) = ax1 (n) + bx2 (n)WNkn
n=0
N−1
X N−1
X
= ax1 (n)WNkn + bx2 (n)WNkn
n=0 n=0
= aX1 (k) + bX2 (k)

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?, ?]
14, 2014 6 / 49
Properties of Discrete Fourier Transform (DFT)

Circular Symmetries Of a Sequence


Consider sequence x(n) and its DFT is X(K). When IDFT taken it get periodic sequence xp (n)

X
xp (n) = x(n − lN)
l=−∞

x(n) and xp (n) are related by



xp (n) for 0 ≤ n ≤ N − 1
x(n) =
0 otherwise
0
let xp (n) shifted by k units to the right then xp (n)

0
xp (n) = xp (n − k)

X
= x(n − k − lN)
l=−∞
 0
0 xp (n) for 0 ≤ n ≤ N − 1
x (n) =
0 otherwise

0
x (n) = x(n − k − lN)
= x(n − k, modulo N)
= x((n − k))N

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?, ?]
14, 2014 7 / 49
Properties of Discrete Fourier Transform (DFT)

x ( n)
0≤n≤3
5
4 The sequence
x(n)

Amplitude
2

0 1 2 3 n

Amplitude
xp (n)
The sequence
x(n)
5 5 5
4 4 4
3 3 3
2 2 2

-4 -3 -2 -1 0 1 2 3 4 5 6 7 n

Amplitude
x 'p (n) = x p (n − 2)
The sequence
x(n)
5 5 5
4 4 4
3 3
2 2

-2 -1 0 1 2 3 4 5 6 7

The sequence
x(n) circularly
shifted by two
samples

5 4
3
Amplitude

0 1 2 3 4 n

Figure 1: Circular shift of a sequence

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?, ?]
14, 2014 8 / 49
Properties of Discrete Fourier Transform (DFT)

0
x (n) = x((n − k))N
0
Consider x (n) with k=2 and N=4 then
0
x (n) = x((n − 2))4
0 0
x (0) = x(−2)4 = x(2) x (1) = x(−1)4 = x(3)
0 0
x (2) = x(0)4 = x(0) x (3) = x(1)4 = x(1)
These shifting operations are as shown in Figures
x(1)=4 x(1)=5

x(2)=3 x(0)=5 x(2)=4 x(0)=2

x(3)=2 x(n) x(3)=3 x(n-1)

x(1)=2 x(1)=3

x(2)=5 x(0)=3 x(2)=2 x(0)=4

x(3)=4 x(n-2) x(3)=5 x(n-3)

Figure 2: Circular shift of a sequence

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?, ?]
14, 2014 9 / 49
Properties of Discrete Fourier Transform (DFT)

The circularly shifting in clockwise is represented by x((n + 1))4 and is as shown in Figure

x(2)=3

x(3)=2
x(1)=4

x(0)=5 X((n+1))4

Figure 3: Circular shift of a sequence

The circularly folded sequence is represented by x((−n))4 and is as shown in Figure

x(1)=4 Folded sequence x(3)=2


( x(n) is plotted in clockwise)

x(2)=3 x(0)=5 x(2)=3 x(0)=5

x(3)=2 x(n) x(1)=4 x((-n))4

Figure 4: Folded sequence

x((−n))N = x(N − n) 0≤n ≤N −1

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 10 / 49
Properties of Discrete Fourier Transform (DFT) Symmetry Property

Symmetry Property
Let the sequence x(n) be of complex valued and is expressed as
x(n) = xR (n) + jxI (n)
Its DFT is
X (k) = XR (k) + jXI (k)

N−1
X 2π kn
X (k) = x(n)e −j N

n=0
N−1
X 2π kn
= [xR (n) + jxI (n)]e −j N

n=0
N−1     
X 2π 2π
= [xR (n) + jxI (n)] cos kn − jsin kn
n=0
N N
N−1
X    
2π 2π
= xR (n)cos kn + jxI (n)sin kn
n=0
N N
N−1
X    
2π 2π
−j xR (n)sin kn − xI (n)cos kn
n=0
N N

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 11 / 49
Properties of Discrete Fourier Transform (DFT) Symmetry Property

X (k) = XR (k) + jXI (k) real and imaginary parts of X (k) is

N−1
X    
2π 2π
XR (k) = xR (n)cos kn + xI (n)sin kn
n=0
N N

N−1
X    
2π 2π
XI (k) = − xR (n)sin kn − xI (n)cos kn
n=0
N N

x(n) = xR (n) + jxI (n) real and imaginary parts of sequence x(n) is

N−1     
1 X 2π 2π
xR (n) = XR (k)cos kn − XI (k)sin kn
N k=0 N N

N−1     
1 X 2π 2π
xI (n) = XR (k)sin kn + XI (k)cos kn
N k=0 N N

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 12 / 49
Properties of Discrete Fourier Transform (DFT) Symmetry Property

Real and even sequence


If x(n) = x(N − n) then its DFT becomes

N−1  
X 2π
X (k) = x(n)cos kn
n=0
N

Real and even sequence


If x(n) = −x(N − n) then its DFT becomes

N−1  
X 2π
X (k) = −j x(n)sin kn
n=0
N

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 13 / 49
Properties of Discrete Fourier Transform (DFT) Symmetry Property

Symmetry property of real value of x(n)


N−1
X
X (k) = x(n)e −j2πkn/N
n=0

Let k = N − k :
N−1
X N−1
X
X (N − k) = x(n)e −j2π(N−k)n/N = x(n)e j2πkn/N e −j2πn
n=0 n=0

But e −j2πn = 1 for n = 0, 1, 2, ...


Therefore

N−1
X
X (N − k) = x(n)e j2πkn/N = X ∗ (k) complex conjugate of X (k)
n=0

X (N − k) = X ∗ (k)

When N is even, |Xk| is symmetric about N/2.


The phase, Xk, has odd symmetry about N/2.

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 14 / 49
Properties of Discrete Fourier Transform (DFT) Symmetry Property

The first five points of the eight point DFT of a real valued sequence are {0.25, 0.125 - j0.3018,
0, 0.125 - j0.0518, 0} Determine the remaining three points
X(0)=0.25 X(1)=0.125 - j0.3018, X(2)=0, X(3)=0.125 - j0.0518, X(4)=0}
The remaining three points X(5), X(6) and X(7) are determined using symmetry property
X (N − k) = X ∗ (k)
X (8 − k) = X ∗ (k)
By taking complex conjugate on both sides
X ∗ (8 − k) = X (k)
X (k) = X ∗ (8 − k)
For k=5
X (5) = X ∗ (8 − 5) = X ∗ (3)
But X (3) = 0.125 − j0.0518 and X ∗ (3) = 0.125 + j0.0518 = X (5)
For k=6
X (6) = X ∗ (8 − 6) = X ∗ (2)
But X (2) = 0 and X ∗ (2) = 0 = X (6)
For k=7
X (7) = X ∗ (8 − 7) = X ∗ (1)
But X (1) = 0.125 − j0.3018 and X ∗ (1) = 0.125 + j0.3018 = X (7)
Hence The remaining the DFTs are {0.125 + j0.0518, 0, 0.125 + j0.3018}

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 15 / 49
Properties of Discrete Fourier Transform (DFT) Symmetry Property

The first five points of the eight point DFT of a real valued sequence are {0.25, -j0.3018, 0, 0,
0.125-j0.0518} Determine the remaining three points
X(0)=0.25 X(1)=-j0.3018, X(2)=0, X(3)=0, X(4)=0.125-j0.0518}
The remaining three points X(5), X(6) and X(7) are determined using symmetry property
X (N − k) = X ∗ (k)
X (8 − k) = X ∗ (k)
By taking complex conjugate on both sides
X ∗ (8 − k) = X (k)
X (k) = X ∗ (8 − k)
For k=5
X (5) = X ∗ (8 − 5) = X ∗ (3)
X (3) = 0 X ∗ (3) = 0
For k=6
X (6) = X ∗ (8 − 6) = X ∗ (2)
X (2) = 0 X ∗ (2) = 0
For k=7
X (7) = X ∗ (8 − 7) = X ∗ (1)
X (1) = −j0.3018 X ∗ (1) = +j0.3018
Hence the remaining the DFTs are {0.25, −j0.3018, 0, 0.125 − j0.0518, 0, 0, j0.3018}

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 16 / 49
Properties of Discrete Fourier Transform (DFT) Symmetry Property

Circular Shift
Circular shift of x(n) can be defined:

xm (n) = x((n + m))N RN (n)

Xm (k) = DFT [xm (n)] = DFT [x((n + m))N RN (n)] = WN−mk X (k)

DFT [x((n + m))N RN (n)] = DFT [x̃(n + m)RN (n)]


= DFS[x̃(n + m)]RN (k)

= WN−mk X̃ (k)RN (k)

= WN−mk X (k)

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 17 / 49
Properties of Discrete Fourier Transform (DFT) Symmetry Property

Shift of a sequence
DFS
x̃ [n] ↔ X̃ [k]
DFS
x̃ [n − m] ↔ WNkm X̃ [k]

WN = e −j(2π/N)
DFS
WN−nl x̃ [n] ↔ X̃ [k − l]

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 18 / 49
Properties of Discrete Fourier Transform (DFT) Symmetry Property

Circular Frequency Shift


DFT
x(n) ↔ X (k)

then
DFT
x(n)e j2πn/N ↔ X ((k − l))N
Shifting the frequency components of DFT circularly is equivalent to multiplying the time
domain sequence by e j2πn/N

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 19 / 49
Properties of Discrete Fourier Transform (DFT) Circular Correlation

Circular Correlation
DFT
x(n) ←−
−→ X (k)
N

DFT
y (n) ←−
−→ Y (k)
N

DFT
−→= R̃xy (k) = X (k)Y ∗ (k)
r̃xy (l) ←−
N

where rxy (l) is the circular cross correlation which is given as


N−1
X
r̃xy (l) = x(n)y ∗ ((n − l))N
n=0

Multiplication of DFT one sequence and conjugate DFT of another sequence is equivalent
to circular cross correlation of these two sequences in time domain

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 20 / 49
Properties of Discrete Fourier Transform (DFT) Circular Correlation

Proof:
N−1
X
r̃xy (l) = x(n)y ∗ ((n − l))N
n=0

y ∗ ((n − l))N can be written as y ∗ ((−[l − n]))N


N−1
X
r̃xy (l) = x(n)y ∗ ((−[l − n]))N
n=0

Based on circular convolution the above equation can be written as

r̃xy = x(l) N y ∗ (−l)

DFT {rxy (l)} = DFT {x(l)}DFT {y ∗ (−l)}

R̃xy (k) = X (k)DFT {y ∗ (−l)}

N−1
X 2π kl
DFT {y ∗ (−l)} = y ∗ (−l)e −j N

l=0

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 21 / 49
Properties of Discrete Fourier Transform (DFT) Circular Correlation

let n = −l
when l = 0 n = 0 and
when l = N − 1 n = −(N − 1)
−(N−1)
X 2π kN
DFT {y ∗ (−l)} = y ∗ (n)e j N

n=0

N−1
X 2π kN
DFT {y ∗ (−l)} = y ∗ (n)e j N

l=0
"N−1 #∗
X 2π nk
= y (n)e −j N

n=0
= [Y (k)]∗ = [Y ∗ (k)]

R̃xy = X (k)Y ∗ (k)

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 22 / 49
Properties of Discrete Fourier Transform (DFT) Complex Conjugate Properties

Complex Conjugate Properties


DFT
x(n) ↔ X (k)
then
DFT
x ∗ (n) ↔ X ∗ ((−k))N = X ∗ (N − k)
and
DFT
x ∗ ((−n))N = x ∗ (N − k) ↔ X ∗ (k)

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 23 / 49
Properties of Discrete Fourier Transform (DFT) Complex Conjugate Properties

N−1
X 2π kn
DFT {x ∗ (n)} = x ∗ (n)e −j N

n=0

2πnN
ej N =1

N−1
X 2π kn 2πnN
DFT {x ∗ (n)} = x ∗ (n)e −j N ej N

n=0

N−1
X 2π kn 2πnN
DFT {x ∗ (n)} = x ∗ (n)e −j N ej N

n=0
N−1
X 2πn (N−k)
= x ∗ (n)e j N

n=0
"N−1 #∗
X 2πn (N−k)
= x(n)e −j N

n=0
= [X (N − k)]∗ = [X ∗ (N − k)]

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 24 / 49
Properties of Discrete Fourier Transform (DFT) Time Reversal of a sequence

Time Reversal of a sequence


DFT
x(n) ⇔ X (k)

DFT
x((−n))N = x(N − n) = ↔ X ((−k))N = X (N − k)

Proof
If the sequence is circularly folded its DFT is also circularly folded.

x((−n))N = x(N − n)
N−1
X 2π kn
DFT {x(N − n)} = x(N − n)e −j N

n=0

Let m=N-n then the summation limits are


n=0 m=N
n=N-1 m=N-N+1=1
1
X 2π k(N−m)
DFT {x(N − n)} = x(m)e −j N

m=N

x(N − n) is circular and DFT is periodic. The summation is performed from 0 to N-1 i.e
for N samples. If the index is changed from (0+N) to (N-1+N). The limits are same

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 25 / 49
Properties of Discrete Fourier Transform (DFT) Time Reversal of a sequence

N−1 N−1
X 2π k(N−m) X
DFT {x(N − n)} = x(m)e −j N = x(m)e −j2πk e −j2πkm/N
m=0 m=0
N−1
X
= x(m)e j2πkm/N
m=0

Multiply RHS by e −j2πm ∵ e −j2πm = 1

N−1
X
DFT {x(N − n)} = x(m)e −j2πkm/N e −j2πm
m=0
N−1
X
= x(m)e −j2πm(N−k)/N
m=0

DFT {x(N − n)} = X (N − k)


DFT is periodic over period N

DFT {x(N − n)} = X (N − k)


= X ((−k))N

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 26 / 49
Properties of Discrete Fourier Transform (DFT) Circular Correlation

Multiplication Of Two Sequences


DFT
x(n) ←−
−→ X (k)
N

DFT
y (n) ←−
−→ Y (k)
N

Then
DFT 1
y (n)y (n) ←−
−→ X (k) N Y (k)
N N
Multiplication of two sequences in time domain is equivalent to circular convolution of their
DFTs in frequency domain

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 27 / 49
Circular Convolution Circular Convolution

Circular Convolution

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 28 / 49
Circular Convolution Circular Convolution

For two finite-duration sequences x1 (n) and (x2 (n) both of length N, with DFTs X1 (k)
and X2 (k)
DFT DFT
x1 (n) ↔ X1 (k) and x2 (n) ↔ X2 (k)
Then
X1 (k)X2 (k) = x1 (n) N x2 (n)
Consider X3 (k)
X3 (k) = X1 (k)X2 (k)
Now consider x3 (m) is an IDFT of X3 (k) and is represented as
N−1
1 X 2π
x3 (m) = X3 (k)e j N km
N k=0

N−1
1 X 2π
x3 (m) = X1 (k)X2 (k)e j N km
N k=0

N−1 N−1 N−1


" #
1 X X 2π X 2π 2π
x3 (m) = x1 (n)e −j N kn x2 (l)e −j N kl e j N km
N k=0 n=0 l=0

N−1 N−1
"N−1 #
j 2π
X X X
k(m−n−l)
x3 (m) = x1 (n) x2 (l) e N

n=0 l=0 k=0

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 29 / 49
Circular Convolution Circular Convolution

N−1 N−1
"N−1 #
X X X 2π k(m−n−l)
x3 (m) = x1 (n) x2 (l) ej N

n=0 l=0 k=0


N−1
(
X N for a = 1
ak = 1−aN
1−a
for a 6= 1
k=0
when (m-n-l)=N,2N,3N,.... multiple of N then a=1
because 2π 2π
e j N kN = e j N 2kN .... = 1

N−1
X 2π k(m−n−l)
ej N =N when (m − n − l) is multiple ofN
K =0
N−1
X 2π k(m−n−l) 1 − e j2πk(m−n−l)
ej N = 2π k(m−n−l)
when (m − n − l) is not multiple of N
K =0 1 − ej N

e j2πk(m−n−l) = 1
N−1
X 2π k(m−n−l) 1−1
ej N = =0 when (m − n − l) is not multiple of N
j 2π k(m−n−l)
K =0 1−e N

N−1 
X 2π k(m−n−l) N when (m − n − l) is not multiple of N
ej N =
0 otherwise
k=0
Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,
September
?, ?,14,
?] 2014 30 / 49
Circular Convolution Circular Convolution

N−1 N−1
1 X X
x3 (m) = x1 (n) x2 (l)N when (m − n − l) is not multiple of N
N n=0 l=0
N−1
X N−1
X
= x1 (n) x2 (l)
n=0 l=0

(m-n-l) is multiple of N i.e., (m-n-l)=pN where p is some integer it may positive or


negative

m − n − l = −pN Then l = m − n + pN

N−1
X
x3 (m) = x1 (n)x2 (m − n + pN)
n=0
x2 (m − n + pN) represents x2 shifted circularly by n samples

x2 (m − n + pN) = x2 (m − n, mpdulo N)
x2 (m − n + pN) = x2 ((m − n))N

N−1
X
x3 (m) = x1 (n)x2 ((m − n))N m = 0, 1, . . . N − 1
n=0

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 31 / 49
Circular Convolution Circular Convolution

Circular convolution of x1 (n) x2 (n)is represented by x1 (n) N x2 (n) and is given by


N−1
X
x3 (m) = x1 (n) N x2 (n) = x1 (n)x2 ((m − n))N m = 0, 1, . . . N − 1
n=0

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 32 / 49
Circular Convolution Circular Convolution

N−1
X
x3 (m) = x1 (n) N x2 (n) = x1 (n)x2 ((m − n))N m = 0, 1, . . . N − 1
n=0

x1 =[4 3 5 2] and x2 =[3 4 1 2]


x1 (n) = 4 3 5 2
x2 (−n) = 3 2 1 4
P3
x3 (0) = x1 (n)x2 (−n)4 = 12 +6 +5 +8 =31
x=0

x1 (n) = 4 3 5 2
x2 (1 − n) = 4 3 2 1
P3
x3 (1) = x1 (n)x2 (1 − n)4 = 16 +9 +10 +2 =37
x=0
x1 (n) = 4 3 5 2
x2 (2 − n) = 1 4 3 2
P3
x3 (2) = x1 (n)x2 (2 − n)4 = 4 +12 +15 +4 =35
x=0

x1 (n) = 4 3 5 2
x2 (−n) = 2 1 4 3
3
P
x3 (3) = x1 (n)x2 (3 − n)4 = 8 +3 +20 +6 =37
x=0

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 33 / 49
Circular Convolution Circular Convolution

x1 =[4 3 5 2] and x2 =[3 4 1 2]


x2(3)=2 x2(0)=3

3x2=6 3x3=9
x1(1)=3 x1(1)=3

x2(2)=1 x1(2)=5 x1(0)=4 x2(0)=3 x2(3)=2 x1(2)=5 x1(0)=4 x2(1)=4

5x1=5 4x3=12 5x2=10 4x4=16

x1(n) x2((-n))4 x1(n) x2((1-n))4

x1(3)=2 x1(3)=2
2x4=8 2x1=2

x2(1)=4 x2(2)=1

x2(2)=1
x2(1)=4
3x1=3
3x4=12 x1(1)=3
x1(1)=3

x2(1)=4 x2(3)=2
x1(2)=5 x1(0)=4
x2(0)=3 x1(2)=5 x1(0)=4 x2(2)=1 4x2=8
5x4=20
5x3=15 4x1=4 x1(n) x2((3-n))4

x1(n) x2((2-n))4
x1(3)=2
x1(3)=2 2x3=6
2x2=4
x2(0)=3
x2(3)=2

Figure 5: Circular shift of a sequence


Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,
September
?, ?,14,
?] 2014 34 / 49
Circular Convolution Circular Convolution
Using matrix approach for circular convolution

N−1
X
x3 (m) = x1 (m)x2 (m − n), 0≤m ≤N−1
n=0

y (n) = h(n) N x(n), 0≤m ≤N−1

N−1
X
y (m) = x(n)h(m − n), 0≤m ≤N−1
n=0

y (0) = x(0)h(0) + x(1)h(−1) + x(2)h(−2) + . . . + x(N − 2)h(−(N − 2)) + x(N − 1)h(−(N − 1))
= x(0)h(0) + x(1)h(N − 1) + x(2)h(N − 2) + . . . x(N − 2)h(2) + x(N − 1)h(1)

y (1) = x(0)h(1) + x(1)h(0) + x(2)h(N − 2) + . . . + x(N − 2)h(3) + x(N − 1)h(2)


= x(0)h(0) + x(1)h(N − 1) + x(2)h(N − 2) + . . . x(N − 2)h(2) + x(N − 1)h(1)

y (N − 1) = x(0)h(N − 1) + x(1)h(N − 2) + x(2)h(N − 3) + . . . + x(N − 2)h(1) + x(N − 1)h(0)

 y (0)   x(0) 
h(0) h(N − 1) h(N − 2) ··· h(2) h(1)
 
 y (0) x(1)
h(1) h(0) h(N − 1) h(3) h(2)
  
 y (0)     x(2) 
h(2) h(1) h(0) h(4) h(3)
     
 . = = .
     

 .     . 
 .   h(N − 2) h(N − 3) h(N − 4) h(0) h(N − 1)   . 
y (N − 2) x(N − 2)
   
h(N − 1) h(N − 2) h(N − 3) h(1) h(0)
y (N − 2) x(N − 1)

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 35 / 49
Circular Convolution Circular Convolution

x=[4 3 5 2] and h=[3 4 1 2]


The first row of h matrix is obtained by folding the h(n) i.e, [2, 1, 4, 3]and shift circularly
right once it becomes [3, 2, 1, 4]
Similarly shift circularly right once to get second row of h matrix and continue for the
remaining rows of h matrix.
      
y (0) 3 2 1 4 4 12 + 6 + 5 + 8 = 31
 y (1)   4 3 2 1 
 3
   16 + 9 + 10 + 2 = 37 
 = = 
 y (2)   1 4 3 2  5   4 + 12 + 15 + 4 = 35 
y (3) 2 1 4 3 2 8 + 3 + 20 + 6 = 37

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 36 / 49
Circular Convolution Circular Convolution
Using DFT and IDFT method

First determine the DFT of the given sequences and multiply both the DFTs i,e.,

Y (k) = X (k).H(k)

Use IDFT to find the y(n) i.e. convolved sequence

y (n) = IDFT (X (k).H(k))

      
X (0) 1 1 1 1 4 14
 X (1)   1 −j −1 j 
 3

 =  −1 − 1j
  
 X (2)  =  1
   
−1 1 −1   5   4 
X (3) 1 j −1 −j 2 −1 + 1j
      
X (0) 1 1 1 1 3 10
 X (1)   1 −j −1 j 
 4

 =  2 − 2j
  
 X (2)  =  1
   
−1 1 −1   1   −2 
X (3) 1 j −1 −j 2 (2 + 2j)

Y (k) = X (k).H(k)
       
Y (0) 14 × 10 140 140
 =  (−1 − 1j) × (2 − 2j)  =  (−1 − 1j) × (2 − 2j)  =  −4 
 Y (1)       

 Y (2)   4 × (−2)   −8   −8 
Y (3) (−1 + 1j)(2 + 2j) (−1 + 1j)(2 + 2j) −4

y (n) = IDFT (X (k).H(k))


      
y (0) 1 1 1 1 140 31
 y (1)  1  1 j −1 −j   −4   37 
 y (2)  = 4
    =  
 1 −1 1 −1   −8   35 
y (3) 1 −j −1 j −4 37

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 37 / 49
Circular Convolution Circular Convolution

%--------------------------------------------------------------------------
% GENERALAZED CIRCULAR CONVOLUTION COMPUTING CODE IN MATLAB WITHOUT
% USING MATLAB BUILTIN FUNCTION [cconv(a,b,n)]
%--------------------------------------------------------------------------
clc; clear all; close all;
x=[4 3 5 2]
h=[3 4 1 2]

N1=length(x);%To find the length of the sequence


N2=length(h);%To find the length of the sequence
N=max(N1,N2);

a=[x, zeros(1,N2)]%Padding zeros to make sequence length


b=[h, zeros(1,N1)]%Padding zeros to make sequence length

for i=1:N
y(i)=0;
for j=1:N
k=i-j+1;
if(k<=0)
k=k+N;
end
y(i)=y(i)+a(j)*b(k);
end
end
y
y1=cconv(x,h, N)% This is to verify the result
subplot(3,1,1); stem(x);
xlabel(’------------->n’);ylabel(’Sequence x[n]’);
subplot(3,1,2);stem(h);
xlabel(’------------->n’);ylabel(’Sequence h[n]’);
subplot(3,1,3); stem(y);
xlabel(’------------->n’);ylabel(’Y[n]’);title(’Convolution without using "conv" function’);

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 38 / 49
Circular Convolution Circular Convolution

% -----------------------------------------------------------------
% Program for Circular Convolution using DFT & IDFT of equal length
%------------------------------------------------------------------
% 1. Define the sequence x1 and x2
% 2. Take DFT of x1 and x2 i.e., X1=DFT(x1) & X2=DFT(x2)
% 3. Multiply X1 & X2
% 4. Take IDFT for the resultant.
%------------------------------------------------------------------
clc; clear all; close all;
% Let us define the input sequence x1 & x2
x1 = input(’Enter the first sequence:’);
x2 = input(’Enter the second sequence:’);
%Now let us take DFT of x1 and x2 i.e., X1=DFT(x1) & X2=DFT(x2)
X1 = fft(x1)
X2 = fft(x2)
% Now let us multiply X1 & X2
Y = X1.*X2
% Now let us take IDFT for the resultant
y = ifft(Y)
% Now let us plot this result
subplot(5,2,1); stem(x1); title(’First Sequence’);
subplot(5,2,2); stem(x2); title(’Second Sequence’);
subplot(5,2,3); stem(abs(X1)); title(’Magnitude of DFT of Sequence x1’);
subplot(5,2,4); stem(abs(X2)); title(’Magnitude of DFT of Sequence x2’);
subplot(5,2,5); stem(angle(X1)); title(’Angle of DFT of Sequence x2’);
subplot(5,2,6); stem(angle(X2)*pi/180); title(’Angle of DFT of Sequence x2’);
subplot(5,2,7); stem(abs(Y)); title(’Magnitude of multiplied o/p of X1 & X2 = Y’);
subplot(5,2,8); stem(angle(Y)); title(’Angle of multiplied o/p of X1 & X2 = Y’);
subplot(5,2,9); stem(abs(y)); title(’Magnitude of IDFT of Sequence Y’);
subplot(5,2,10); stem(angle(y)); title(’Angle of IDFT of Sequence Y’);

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 39 / 49
Circular Convolution Circular Convolution

Let x(n) be the sequence x(n) = δ(n) + 2δ(n − 2) + δ(n − 3)


(i) Find the 4 point DFT of x(n)
(ii) If y (n) is the 4 point circular convolution with itself find y (n) and the four point DFT
Y(K)
Solution:
x(n) = δ(n) + 2δ(n − 2) + δ(n − 3)
x(0) = δ(0) + 2δ(0 − 2) + δ(0 − 3) = 1 + 0 + 0 = 1
x(1) = δ(1) + 2δ(1 − 2) + δ(1 − 3) = 0 + 0 + 0 = 0
x(2) = δ(2) + 2δ(2 − 2) + δ(2 − 3) = 0 + 2 + 0 = 2
x(3) = δ(3) + 2δ(3 − 2) + δ(3 − 3) = 0 + 0 + 1 = 1
The 4 point DFT x(n) can be obtained by matrix method

X [N] = [WN ]x(n)

      
X (0) 1 1 1 1 1 4
 X (1)   1 −j −1 j 
 0
   −1 + j 
 X (2)  = 
   = 
1 −1 1 −1   2   2 
X (3) 1 j −1 −j 1 −1 − j

The DFT of the sequence x(n) = [1 0 2 1] is [4, − 1 + j, 2, = 1 − j]

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 40 / 49
Circular Convolution Circular Convolution

The circular convolution of x(n) with itself Y (n)


DFT
Y (n) = x(n) ~ x(n) ←−−− ⇐⇒ X (k).X (k) = Y (k)

     
4 4 16
 −1 + j   −1 + j   −j2 
 . = 
 2   2   4 
−1 − j −1 − j j2

Determine the y (n) by taking IDFT of Y (k)


     

x(0) 1 1 1 1 16 1
= 1 1 −1 −j 
  −j2
 x(1)   j    0 
 = 
 x(2)  4  1 −1 1 −1   4   2 
x(3) 1 −j −1 j j2 1

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 41 / 49
Circular Convolution Circular Convolution

Let x(n) be the sequence x(n) = 2δ(n) + δ(n − 1) + δ(n − 3) Find the sequence
y (n) = x(n) 5 x(n) i.e. 5 point circular convolution of x(n) with itself
Solution:
x(n) = 2δ(n) + δ(n − 1) + δ(n − 3)
x(0) = 2δ(0) + δ(0 − 1) + δ(0 − 3) = 2 + 0 + 0 = 2
x(1) = 2δ(1) + δ(1 − 1) + δ(1 − 3) = 0 + 1 + 0 = 1
x(2) = 2δ(2) + δ(2 − 1) + δ(2 − 3) = 0 + 0 + 0 = 0
x(3) = 2δ(3) + δ(3 − 1) + δ(3 − 3) = 0 + 0 + 1 = 1
x(n) = [2, 1, 0, 1]
The 5 point circular convolution is achieved by appending zero at the end of the sequence
x(n) i.e., x(n) = [2 1 0 1 0]
Using Matrix approach
x=[2 1 0 1 0] folded sequence is =[0 1 0 1 2]
Then shift circularly right once it becomes [2 0 1 0 1]

y (0) 2 0 1 0 1 2 4+0+0+0+0=4
      
 y (1)   1 2 0 1 0  1   2 + 2 + 0 + 1 + 0 = 5 
 y (2)  =  0 1 2 0 1  0  =  0 + 1 + 0 + 0 + 0 = 1
      

 y (3)   1 0 1 2 0  1   2 + 0 + 0 + 2 + 0 = 4 
y (4) 0 1 0 1 2 0 0+1+0+1+0=2

y (n) = x(n) 5 x(n) is [4 5 1 4 2]

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 42 / 49
Circular Convolution Circular Convolution

k=0 k=1 k=2 k=3 k=4


n=0 W50 W50 W50 W50 W50
n=1 W50 W51 W52 W53 W54
n=2 W50 W51 W54 W54 W58
n=3 W50 W53 W56 W59 W512
n=4 W50 W54 W58 W512 W516

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 43 / 49
Circular Convolution Circular Convolution

Compute the circular convolution between the following sequences using DFT and IDFT method
x(n) = {1, 2, 3, 4} y (n) = {−1, −2, −3, −4} x(n) and y (n) are periodic sequences with period
↑ ↑
N=4.
The 4 point DFT x(n) can be obtained by matrix method

X [N] = [WN ]x(n)

      
X (0) 1 1 1 1 1 10
 X (1)   1
 = −j −1 j 
 2
   −2 + j2
=


 X (2)   1 −1 1 −1   3   −2 
X (3) 1 j −1 −j 4 −2 − j2

The DFT of the sequence x(n) = [1 2 3 4] is [10, − 2 + j2, − 2, − 2 − j2]


      
Y (0) 1 1 1 1 −1 −10
 Y (1)   1 −j −1   −2
j     2 − j2 
 Y (2)  = 
   = 
1 −1 1 −1   −3   2 
Y (3) 1 j −1 −j −4 2 + j2

The DFT of the sequence y (n) = [1 0 2 1] is [−10, 2 − j2, 2, 2 + j2]

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 44 / 49
Circular Convolution Circular Convolution

The circular convolution of x(n) with itself Y (n)


DFT
Z (n) = x(n) ~ x(n) ←−−− ⇐⇒ X (k).X (k) = Z (k)

     
10 10 −100
 −2 + j2   2 − j2   j8 
 . = 
 −2   2   −4 
−2 − j2 2 + j2 −j8

Determine the y (n) by taking IDFT of Y (k)


      
Z (0) 1 1 1 1 −100 −26
= 1 1 −1 −j 
 Z (1)  j   −28 
  j8
 
 = 
 Z (2)  4  1 −1 1 −1   −4   −26 
Z (3) 1 −j −1 j −j8 −20

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 45 / 49
Circular Convolution Circular Convolution

Evaluate circular convolution y (n) = x(n) N x(n) where x(n) = u(n) − u(n − 4) and
h(n) = u(n) − u(n − 3) assuming N=8 show your calculations by int0 approximate usage of
equations and relevant sketches. Plot y(n). (ii) Verify the result using DFT and IDFT method
u(n)
u(n)
Unit step sequence u(n)
Unit step sequence u(n)

0 1 2 3 4 5 6 7 8 9 10 11 n
0 1 2 3 4 5 6 7 8 9 10 11 n
u(n-4)
u(n-3)
Unit step sequence u(n) delayed by 4 samples Unit step sequence u(n) delayed by 3 samples

0 1 2 3 4 5 6 7 8 9 10 11 n
0 1 2 3 4 5 6 7 8 9 10 11 n
x(n)=u(n-u(n-4)
h(n)=u(n-u(n-3)
x(n) is generated by subtracting u(n) by u(n-4)
h(n) is generated by subtracting u(n) by u(n-3)

0 1 2 3 4 5 6 7 8 9 10 11 n
0 1 2 3 4 5 6 7 8 9 10 11 n

Figure 6: Sequence x(n)=u(n)+u(n-4) Figure 7: Sequence h(n)=u(n)+u(n-3)

y(n)
4

Sketch of convolved sequence h(n)


3
2
1
0

0 1 2 3 4 5 6 n

Figure 8: Convolved Sequence y(n)


Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,
September
?, ?,14,
?] 2014 46 / 49
Circular Convolution Circular Convolution

Using Matrix approach

y (n) = x(n) 8 h(n)

x(n) = [1, 1, 1, 1] and h(n) = [1, 1, 1]


The 8 point circular convolution is achieved by appending zero at the end of the sequence
x(n) i.e., x(n) = [1, 1, 1, 1, 0, 0, 0, 0] and h(n) = [1, 1, 1, 0, 0, 0, 0, 0]
The first row of h matrix is obtained by folding the h(n) i.e, [0, 0, 0, 0, 0, 0, 1, 1, 1]and
shift circularly right once it becomes [1, 0, 0, 0, 0, 0, 1, 1]
Similarly shift circularly right once to get second row of h matrix and continue for the
remaining rows of h matrix.

y (0) 1 0 0 0 0 0 1 1 1 1
      
 y (1)   1 1 0 0 0 0 0 1  1   2 
y (2) 1 1 1 0 0 0 0 0 1 3
      
      
y (3) 0 1 1 1 0 0 0 0 1 3
      
= =
      
y (4) 0 0 1 1 1 0 0 0 0 2
  
      
y (5) 0 0 0 1 1 1 0 0 0 1
      
      
 y (6)   0 0 0 0 1 1 1 0  0   0 
y (7) 0 0 0 0 0 1 1 1 0 0

The convolved sequence is y (n) = [1, 2, 3, 3, 2, 1, 0, 0]

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 47 / 49
Circular Convolution Circular Convolution

If X(k)is the DFT the 


sequence x(n)determine  the N point DFT of the sequence
xc (n) = x(n)cos 2πln
N
and xs (n) = x(n)sin 2πln
N
for 0 ≤ n ≤ N − 1) in terms of X(k)
 
2πln 1  j2πln j2πln 
xc (n) = x(n)cos = x(n) e N + e− N
N 2

N−1
X j2πkn
Xc (k) = xc (n)e − N

n=0

N−1
1 X  j2πln j2πln  j2πkn
Xc (k) = x(n) e N + e − N e− N
2 n=0
N−1 N−1
1 X j2πln j2πkn 1 X j2πln j2πkn
= x(n)e N e − N + x(n)e − N e − N
2 n=0 2 n=0

DFT DFT
x(n)e j2πn/N ↔ X ((k − l))N = x(n)e −j2πn/N ↔ X ((k + l))N

1 1
Xc (k) = X ((k − l))N + X ((k + l))N
2 2

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 48 / 49
Circular Convolution Circular Convolution

 
2πln 1  j2πln j2πln 
xs (n) = x(n)sin = x(n) e N − e− N
N 2j

N−1
X j2πkn
Xs (k) = xs (n)e − N

n=0

N−1
1 X  j2πln j2πln  j2πkn
Xs (k) = x(n) e N − e − N e− N
2j n=0
N−1 N−1
1 X j2πln j2πkn 1 X j2πln j2πkn
= x(n)e N e − N − x(n)e − N e − N
2j n=0 2j n=0

DFT DFT
x(n)e j2πn/N ↔ X ((k − l))N = x(n)e −j2πn/N ↔ X ((k + l))N

1 1
Xc (k) = X ((k − l))N − X ((k + l))N
2j 2j

Dr. Manjunatha. P (JNNCE) UNIT - 2: Properties of Discrete Fourier Transforms (DFT)[?,


September
?, ?,14,
?] 2014 49 / 49
UNIT - 5: Analog Filter Design

Dr. Manjunatha. P
[email protected]

Professor
Dept. of ECE

J.N.N. College of Engineering, Shimoga

November 11, 2016


Unit 5 Syllabus Introduction

Analog Filter Design:[1, 2, 3, 4]

Slides are prepared to use in class room purpose, may be used as a


reference material
All the slides are prepared based on the reference material
Most of the figures/content used in this material are redrawn, some
of the figures/pictures are downloaded from the Internet.
This material is not for commercial purpose.
This material is prepared based on Digital Signal Processing for
ECE/TCE course as per Visvesvaraya Technological University (VTU)
syllabus (Karnataka State, India).

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 2 / 69
Unit 5 Syllabus

Unit 5: Analog Filter Design:

PART - B-Unit 5: Analog Filter Design:

Characteristics of commonly used analog filters


Butterworth and Chebyshev filters
Analog to analog frequency transformations.

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 3 / 69
IIR Filter Design Introduction

Magnitude Characteristic of filters

Figure 1: Magnitude response of a LPF,HPF,BPF,BSF,

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 4 / 69
IIR Filter Design Introduction

Magnitude Characteristic of lowpass filter


The magnitude response can be expressed as

1 − δp ≤ |H(jΩ)| ≤ 1 for 0 ≤ Ω ≤ Ωp
Magnitude =
0 ≤ |H(jΩ) ≤ δs for |Ω| ≥ Ωs

Figure 2: Magnitude response of a LPF


Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 5 / 69
IIR Filter Design Introduction

H(Ω) cannot have an infinitely sharp cutoff from passband to stopband, that is H(Ω)
cannot drop from unity to zero abruptly.
It is not necessary to insist that the magnitude be constant in the entire passband of the
filter. A small amount of ripple in the passband is usually tolerable.
The filter response may not be zero in the stopband, it may have small nonzero value or
ripple.
The transition of the frequency response from passband to stopband defines transition
band.
The passband is usually called bandwidth of the filter.
The width of transition band is Ωs − Ωp where Ωp defines passband edge frequency and
Ωs defines stopband edge frequency.
The magnitude of passband ripple is varies between the limits 1 ± δp where δp is the ripple
in the passband
The ripple in the stopand of the filter is denoted as δp
Ωp = Passband edge frequency in rad/second Ωs = Stopband edge frequency in rad/second
ωp = Passband edge frequency in rad/sample ωs = Stopband edge frequency in rad/sample
Ap = Gain at passband edge frequency As = Gain at stopband edge frequency
ωp ωs
Ωp = and Ωs =
T T
1
where T = fs
= Sampling frequency

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 6 / 69
Butterworth Filter Design

Butterworth Filter Design

The magnitude frequency re-


sponse of Butterworth filter is

1 Properties of
|H(jΩ)|2 =   2N 
1 + ΩΩ
c

Figure 3: Frequency response of


Butterworth low pass filter

butterworth filter
|HN (jΩ)|2 |Ω=0 = 1 for all N
|HN (jΩ)|2 |Ω=Ωc = 0.5 for all finite N
|HN (jΩ)||Ω=Ωc = √1 = 0.707 20log |H(jΩ)||Ω = Ωc = −3.01 dB
2
|HN (jΩ)|2 is a monotonically decreasing function of for Ω
|HN (jΩ)|2 approaches to ideal response as the value of N increases
The filter is said to be normalized when cut-off frequency Ωc = 1 rad/sec.
From normalized transfer function LPF, HPF, BPF BSF can be obtained by suitable
transformation to the normalized LPF specification.
Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 7 / 69
Butterworth Filter Design

|HN (jΩ)|2 = HN (jΩ)HN (−jΩ) =   1  


2N
1+ ΩΩ
c
For normalized Butterworth lowpass filter Ωc = 1
1
HN (jΩ)HN (−jΩ) = h i
1 + (Ω)2N
s
Let s = jΩ ∴ Ω = j
1
HN (s)HN (−s) =  2N
s
1+ j

The poles of are determined by equating the denominator to zero


 2N
s
1+ =0
j
1
s = (−1) 2N j
-1 can be written as e jπ(2k+1) where k = 0, 1 . . . and j = e jπ/2
(2k+1)
sk = e jπ 2N e jπ/2 k = 0, 1 . . . 2N − 1
The poles are placed on a unit circle with radius unity and are placed at angles

sk = 1 N k = 0, 1 . . . 2N − 1 when N is odd
π kπ
= 1 2N
+ N k = 0, 1 . . . 2N − 1 when N is even

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 8 / 69
Butterworth Filter Design
N=1 ∴ k=0,1 j
S-plane
kπ Unit circle
Sk = 1
s1
N
s0

S0 = 1 0, S1 = 1 π

The poles lying on left half of s plane is


LHP of H1(s) RHP of H1(-s)
1 1 1
HN (s) = Q = =
(s − sk ) (s − (s1 )) (s + 1) Figure 4: Poles of H1 (s)H1 (−s)
LHP
———————————————————————————————————————
N=2 ∴ k=0,1,2,3 N is Even

π kπ
Sk = 1 2N
+ N jΩ
S-plane
s1
π 3π Unit circle s0
S0 = 1 4, S1 = 1 4
5π 7π
S2 = 1 σ
4 , S3 = 1 4

The poles lying on left half of s plane is s2 s3


LHP of H2(s) RHP of H2(-s)
1 1
HN (s) = =
Figure 5: Poles of H2 (s)H2 (−s)
Q
[s − sk ] [s − (s1 )][s − (s2 )]
LHP
1
=
[s − (−0.707 + j0.707)][s − (−0.707 − j0.707)]
Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 9 / 69
Butterworth Filter Design

1
H2 (s) =
[s + 0.707 − j0.707][s + 0.707 + j0.707]
1
=
[s + 0.707]2 − [j0.707]2
1
=
s 2 + 20.707s + (0.707)2 + (0.707)2
1
=
s 2 + 1.414s + 1
———————————————————————————————————–
Determine the poles of lowpass Butterworth filter for N=3. Sketch the location of poles on s
plane and hence determine the normalized transfer function of lowpass filter.
Solution:

s2 S-plane
Unit circle s1
N=3 ∴ k=0,1,2,3,4,5
N is Odd s3 s0
Sk = 1 kπ σ
N
π 2π
S0 = 1 0, S1 = 1 3, S2 = 1 3
s5
s4
4π 5π
S3 = 1 π, S4 = 1 3 , S5 = 1 3
Left half poles of H3(s) Right half poles of H3(-s)

Figure 6: Poles of H3 (s)H3 (−s)


Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 10 / 69
Butterworth Filter Design

The poles lying on left half of s plane is

1 1
HN (s) = Q =
[s − sk ] [s − (s2 )][s − (s3 )][s − (s4 )]
LHP
1
H3 (s) =
[s − (−0.5 + j0.866)][s − (−1)][s − (−0.5 − j0.866)]
1
=
[s + 1][s + 0.5 − j0.866][s + 0.5 + j0.866)]
1 1
= =
[s + 1][(s + 0.5)2 − (j0.866)2 ]] (s + 1)(s 2 + s + 1)

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 11 / 69
Butterworth Filter Design

The poles are distributed on unit circle in the s plane


They are distributed half on the left half plane and half on the right half plane.
1 1
HN (s) = Q =
(s − sk ) BN (s)
LHP

Table 1: Normalized Butterworth Polynomial


Order N Butterworth Polynomial
1 s+1 √
2 s 2 + 2s + 1
3 (s 2 + s + 1)(s + 1)
4 (s 2 + 0.76536s + 1)(s 2 + 1.84776s + 1)
5 (s + 1)(s 2 + 0.6180s + 1)(s 2 + 1.6180s + 1)

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 12 / 69
Butterworth Filter Design

Design of Lowpass Butterworth Filter


The transfer function of normalized Butterworth lowpass filter is given by
1 1
HN (s) = Q =
(s − sk ) BN (s)
LHP

where BN (s) is nth order normalized Butterworth polynomial


The lowpass Butterworth filter has to meet the following frequency domain specifications

Kp ≤ 20log |H(jΩ)| ≤ 0 for all Ω ≤ Ωp


20log |H(jΩ)| ≤ Ks for all Ω ≥ Ωs
Kp =Attenuation at passband frequency Ωp in dB
Ks =Attenuation at stopband frequency Ωs in dB
Gain in dB

20 log H a ( jω )

0
KP

Ks
Ω
ΩP ΩS

Figure 7: LPF specifications


Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 13 / 69
Butterworth Filter Design
The magnitude frequency response is

1
|H(jΩ)| = 
 2N  12

1+ Ωc  2N
ΩP −Kp
= 10 10 −1 (1)
Ωc
Taking 20 log on both sides
  Ω = Ωs and K = Ks
 1  "  2N #
20 log |H(jΩ)| = 20 log  
  ΩS
 2N  12 KS = −10 log 1 +

Ωc
 
1 + ΩΩ
c

"  2N # 12 
ΩS
2N
−KS
Ω = 10 10 −1 (2)
= −20 log 1 +
Ωc Ωc
"  2N #
Ω Dividing Equation 1 by Equation
= −10 log 1 +
Ωc 2

 2N −Kp
Ω = Ωp and K = Kp Ωp 10 10 −1
= −KS
" # ΩS 10 10 −1
 2N
ΩP
Kp = −10 log 1 +
Ωc

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 14 / 69
Butterworth Filter Design

−Kp
 
 
Ωp 10 10 − 1 
2N log = log 
−KS
ΩS 10 10 − 1
" −K #
p
10 10 −1
log −KS
10 10 −1
N= h
Ωp
i
2log ΩS

where N is the order of the filter


The cutoff frequency ΩC is
Ωp
ΩC =   1
−Kp 2N
10 10 −1

OR
ΩS
ΩC =   1
−KS 2N
10 10 − 1

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 15 / 69
Butterworth Filter Design

Design steps for Butterworth Lowpass Filter


From the given specifications
1 Determine the order of the Filter using

−Kp
" #
10 10 −1
log −KS
10 10 −1
N= h i

2log Ωp
S

2 Determine the cutoff frequency ΩC using


Ωp Ωs
ΩC =   1 OR ΩC =   1
−Kp 2N −Ks 2N
10 10 − 1 10 10 − 1

3 Determine the transfer function of normalized Butterworth filter by


1 1
HN (s) = Q =
(s − sk ) BN (s)
LHP

4 From analog lowpass to lowpass frequency transformation, find the desired transfer
function by substituting the following

Ha (s) = HN (s)|s→ s
ΩC

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 16 / 69
Butterworth Filter Design

Design an analog Butterworth low pass filter to meet the following specifications T=1 second

0.707 = ≤ |H(e jω )| ≤ 1; for 0 ≤ ω ≤ 0.3π


= |H(e jω )| ≤ 0.2; for .75π ≤ ω ≤ π

Solution:
Passband edge frequency ωp = 0.3π rad/sample
Stopband edge frequency ωs = 0.75π rad/sample
ω
Passband edge analog frequency Ωp = 1p = 0.3π
1
= 0.3π rad/second
Stopband edge analog frequency Ωs = ω1s = 0.75π
1
= 0.75π rad/second
Kp =20log(0.707)=-3.01 dB, Ks =20log(0.2)=-13.97 dB,
The order of the filter is

Gain in dB
20 log H a ( jω )
−Kp
" #
10 10 −1
log −KS
10 10 −1 0
N = h i
Ω K P = −3.01dB
2log Ωp
S
3.01
 
10 10 −1 K s = −13.97dB
log 13.97
 1

10 10 −1 log 24 Ω
=  0.3π  = ΩP = 0.9425 rad/sec ΩS = 2.356 rad/sec
2log 0.75π
2 × (−0.398)
−1.38 Figure 8: LPF specifications
= = 1.7336 ' 2
−0.796
Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 17 / 69
Butterworth Filter Design
OR
N=2 ∴ k=0,1,2,3 N is Even
For even N
π + kπ
Sk = 1 2N N
N
2
Y 1
H(sn ) = S0 = 1 π
4 , S1 = 1 3π
4
k=1
s 2 + bk s + 1

S2 = 1 4 , S3 = 1 7π
4

The poles lying on left half of s plane


h i
(2k−1)π
where bk = 2sin 2N
N=2 1 1
HN (s) = =
k = N2 = 22 = 1 Q
[s − sk ] [s − (s1 )][s − (s2 )]
LHP
k=1 h i
(2−1)π 1
bk = 2sin 2×2 =1.4142 =
[s − (−0.707 + j0.707)][s − (−0.707 − j0.707)]
1 1
H(sn ) = =
s 2 + 1.4142s + 1 s 2 + 1.4142s + 1

Ωs jΩ
Ωc = −ks 1 S-plane
(10 10 − 1) 2N Unit circle s1
s0
2.3562
= 13.97 1 σ
(10 10 − 1) 4
= 1.0664 rad/sec s2 s3
LHP of H2(s) RHP of H2(-s)

Figure 9: Poles of H2 (s)H2 (−s)


Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 18 / 69
Butterworth Filter Design

Unnomalized transfer function, H(s)

Ha (s) = H2 (s)|s→ s
Ωc

= H2 (s)|s→ s
1.0644
1
=
s2
Ωc 2
+ 1.4142 Ωs + 1
c
1
=
s 2 +1.4142Ωc s+Ωc 2
Ω2c

Ω2c
=
s2 + 1.4142Ωc s + Ωc 2
1.06442
=
s 2 + 1.4142 × 1.0644s + 1.06442
1.133
=
s 2 + 1.5047s + 1.133

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 19 / 69
Butterworth Filter Design

Design an analog Butterworth low pass filter to meet the following specifications T=1 second

0.9 = ≤ |H(e jω )| ≤ 1; for 0 ≤ ω ≤ 0.35π


= |H(e jω )| ≤ 0.275; for .7π ≤ ω ≤ π

Solution:
Passband edge frequency ωp = 0.35π rad/sample
Stopband edge frequency ωs = 0.7π rad/sample
ω
Passband edge analog frequency Ωp = 1p = 0.35π
1
= 0.35π rad/second
Stopband edge analog frequency Ωs = ω1s = 0.7π
1
= 0.7π rad/second
Kp =20log(0.9)=-0.9151 dB, Ks =20log(0.2)=-11.2133 dB,
The order of the filter is

Gain in dB
" −Kp
# 20 log H a ( jω )
10 10 −1
log −KS
10 10 −1 0
N = h i
Ω K P = −0.915dB
2log Ωp
S
0.9151
 
10 10 −1 K s = −11.213dB
log 11.213
 0.234 
10 10 −1 log 12.21 Ω
=  0.35π  = ΩP = 1.0996 rad/sec ΩS = 2.1991 rad/sec
2log 0.7π
2 × (−0.301)
−1.717 Figure 10: LPF specifications
= = 2.852 ' 3
−0.602
Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 20 / 69
Butterworth Filter Design
For odd N=3

N−1 OR
2 N=3 ∴ k=0,1,2,3,4,5 N is Even
1 Y 1
H(sn ) =
(s + 1) k=1 s 2 + bk s + 1 π + kπ
Sk = 1 2N N

S0 = 1 π S1 = 1 3π
h i
(2k−1)π 4 ,
where bk = 2sin 2N
4

N=3 S2 = 1 5π
4 , S3 = 1 7π
4
k = N−1
2
= 3−1
2
=1 The poles lying on left half of s plane
k=1 h i
(2−1)π
bk = b1 = 2sin 2×3 =1 1 1
HN (s) = Q =
[s − sk ] [s − (s1 )][s − (s2 )]
LHP

1 1
H(sn ) = =
[s − (−0.707 + j0.707)][s − (−0.707 − j0.707)]
(s + 1)(s 2
+ s + 1)
1
=
s 3 + 2s 2 + 2s + 1

S-plane
Unit circle s1
s0

Ωs σ
Ωc = −ks 1
(10 10 − 1) 2N
s2 s3
2.2 2.2 LHP of H2(s)
= 11.21 1
= RHP of H2(-s)

(10 − 1)
10 6 1.515
= 1.45 rad/sec
Figure 11: Poles of H2 (s)H2 (−s)
Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 21 / 69
Butterworth Filter Design

Unnomalized transfer function, H(s) and Ωc = 1.45 rad/sec

1
Ha (s) = H3 (s)|s→ s = |s→ s
Ωc s 3 + 2s 2 + 2s + 1 Ωc

= H3 (s)|s→ s
Ωc

1
=
s3 2
Ωc 3
+ 2 Ωs 2 + 2 Ωs + 1
c c
1
=
s 3 +2Ωc s 2 +2Ω2c s+Ω3c
Ω3c

Ω3c
=
s 3 + 2Ωc s 2 + 2Ω2c s + Ω3c
1.453
=
s 3 + 2 × 1.45s 2 + 2 × 1.452 s + 1.453
3.048
=
s 3 + 2.9s 2 + 4.205s + 3.048

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 22 / 69
Butterworth Filter Design

Design an analog Butterworth low pass filter to meet the following specifications T=1 second

0.8 = ≤ |H(e jω )| ≤ 1; for 0 ≤ ω ≤ 0.2π


= |H(e jω )| ≤ 0.2; for .32π ≤ ω ≤ π

Solution:
Passband edge frequency ωp = 0.2π rad/sample
Stopband edge frequency ωs = 0.32π rad/sample
ω
Passband edge analog frequency Ωp = 1p = 0.35π
1
= 0.6283 rad/second
Stopband edge analog frequency Ωs = ω1s = 0.7π
1
= 1.0053 rad/second
Kp =20log(0.8)=-1.9 dB, Ks =20log(0.2)=-13.97 dB,
The order of the filter is

Gain in dB
20 log H a ( jω )
−Kp
" #
10 10 −1
log −KS
10 10 −1 0
N = h i
Ω K P = −1.9dB
2log Ωp
S
1.9
 
10 10 −1 K s = −13.97dB
log 13.97
 0.548 
10 10 −1 log 24 Ω
=  0.6283  = ΩP = 0.6283 rad/sec ΩS = 1.0053 rad/sec
2log 1.0053
2 × (−0.204)
−1.641 Figure 12: LPF specifications
= = 4.023 ' 4
−0.408
Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 23 / 69
Butterworth Filter Design

For Even N=4


N
2
Y 1
H(sn ) =
k=1
s 2 + bk s + 1
h i
(2k−1)π
where bk = 2sin 2N
N=4
k = N2 = 42 = 2
k=1 h i
(2−1)π
bk = b1 = 2sin 2×4 =0.7654
k=2 h i
(4−1)π
bk = b2 = 2sin 2×4 =1.8478

1
H(sn ) =
(s 2 + 0.764s + 1)(s 2 + 1.8478s + 1)
1
=
s 4 + 2.6118s 3 + 3.4117s 2 + 2.6118s + 1

Ωs
Ωc = −ks 1
(10 10 − 1) 2N
1.0053 1.0053
= 13.97 1
=
(10 10 − 1) 8 1.4873
= 0.676 rad/sec

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 24 / 69
Butterworth Filter Design

Unnomalized transfer function, H(s) and Ωc = 0.676 rad/sec

1
Ha (s) = H4 (s)|s→ s = |s→ s
Ωc s 4 + 2.6118s 3 + 3.4117s 2 + 2.6118s + 1 Ωc

= H4 (s)|s→ s
Ωc

1
=
s4 3 2
Ωc 4
+ 2.6118 Ωs 3 + 3.4117 Ωs 2 + 2.6118 Ωs + 1
c c c
1
=
s 4 +2.6118Ωc s 3 +3.4117Ω2c s 2 +2.6118Ω3c s+Ω4c
Ω4c

Ω4c
=
s 4 + 2.6118Ωc s 3 + 3.4117Ω2c s 2 + 2.6118Ω3c s + Ω4c
0.6764
=
s 4 + 1.7655s 3 + 1.559s 2 + 0.8068s + 0.2088
0.2088
=
s 4 + 1.7655s 3 + 1.559s 2 + 0.8068s + 0.2088

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 25 / 69
Butterworth Filter Design

Design an analog Butterworth low pass filter which has -2 dB attenuation at frequency 20
rad/sec and at least -10 dB attenuation at 30 rad/sec.
Solution:
Passband edge analog frequency Ωp = 20 rad/second
Stopband edge analog frequency Ωs = 30 rad/second
Kp =-2 dB, Ks =-10 dB,
The order of the filter is

Gain in dB
20 log H a ( jω )
−Kp
" #
10 10 −1
log −KS
10 10 −1 0
N = h i
Ω K P = −1.9dB
2log Ωp
S
2
 
10 10 −1 K s = −13.97dB
log 10
 0.584 
10 10 −1 log 9 Ω
= = ΩP = 0.6283 rad/sec ΩS = 1.0053 rad/sec
2log 20
 
30
2 × (−0.176)
−1.1878 Figure 13: LPF specifications
= = 3.374 ' 4
−0.352

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 26 / 69
Butterworth Filter Design

For Even N=4


N/2
Y 1
H(sn ) =
k=1
sn2 + bk sn + 1
h i
(2k−1)π
where bk = 2sin 2N
N=4
k = N2 = 42 = 2
k=1 h i
(2−1)π
bk = b1 = 2sin 2×4 =0.7654
k=2 h i
(4−1)π
bk = b2 = 2sin 2×4 =1.8478

1
H(sn ) =
(s 2 + 0.764s + 1)(s 2 + 1.8478s + 1)
1
=
s 4 + 2.6118s 3 + 3.4117s 2 + 2.6118s + 1

Ωs
Ωc = −ks 1
(10 10 − 1) 2N
30 30
= 10 1
=
(10 10 − 1) 8 1.316
= 22.795 rad/sec

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 27 / 69
Butterworth Filter Design

Unnomalized transfer function, H(s) and Ωc = 22.795 rad/sec

1
Ha (s) = H4 (s)|s→ s = |s→ s
Ωc s 4 + 2.6118s 3 + 3.4117s 2 + 2.6118s + 1 22.795

1
=
s4 3 2
Ωc 4
+ 2.6118 Ωs 3 + 3.4117 Ωs 2 + 2.6118 Ωs + 1
c c c
1
=
s 4 +2.6118Ωc s 3 +3.4117Ω2c s 2 +2.6118Ω3c s+Ω4c
Ω4c

Ω4c
=
s4 + 2.6118Ωc s3 + 3.4117Ω2c s 2 + 2.6118Ω3c s + Ω4c
22.7954
=
s4 + 59.535s 3
+ 1772.76s 2 + 30935.611s + 22.7954
22.7954
=
s + 59.535s + 1772.76s 2 + 30935.611s + 22.7954
4 3

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 28 / 69
Problems Problems

A Butterworth low pass filter has to meet the following specifications


i) passband gain KP =1 dB at ΩP =4 rad/sec
ii) Stop band attenuation greater than or equal to 20 dB at Ωs =8 rad/sec
Determine the transfer function Ha (s) of the lowest order Butterworth filter to meet the above
the specifications
Solution:
Ωp =4 rad/sec, Ωs =8 rad/sec,

Gain in dB
Kp =-1 dB, Ks =-20 dB, 20 log H a ( jω )
The order of the filter is
0
−Kp
" #
10 10 −1 K P = −1dB
log −KS
10 10 −1
N = h i

2log Ωp K P = −20dB
S
Ω
1 ΩP = 4 rad/sec ΩS = 8 rad/sec
 
10 10 −1
log 20
=
10 10
4
−1
= 4.289 ' 5 Figure 14: LPF specifications
2log 8

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 29 / 69
Problems Problems

Sk = 1∠θk k = 0, 1 . . . 2N − 1
For odd N θk is
πk
θk =
N

Unit circle S-plane
S0 = 1 0=1 0= s3 s2
S1 = 1 π
36◦ = 0.809 + j0.588 s4
5 =1 s1

S2 = 1 5 =1
72◦ = 0.309 + j0.951 s5 s0
3π σ
S3 = 1 5 =1
108◦ = −0.309 + j0.951 s6
4π s9
S4 = 1 5 =1
144◦ = −0.809 − j0.588
S5 = 1 π =1180◦ = −1 s7 s8
6π Left half poles of H5(s) Right half poles of H5(-s)
S6 = 1 5 = 1 216◦ = −0.809 − j0.588

S7 = 1 5 = 1 252◦ = −0.309 − j0.951

S8 = 1 5 = 1 288◦ = 0.309 − j0.951

S9 = 1 5 = 1 324◦ = −0.809 − j0.588

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 30 / 69
Problems Problems

1
H5 (s) = Q
(s − sk )
LHPonly
1
=
(s − s3 )(s − s4 )(s − s5 )(s − s6 )(s − s7 )
1
=
(s − 0.309 + j0.951)(s + 0.809 + j0.588)(s + 1)
(s + 0.809 − j0.588)(s + 0.309 + j0.951)
1
=
[(s − 0.309)2 + (0.951)2 ][(s + 0.809)2 + (0.588)2 ](s + 1)
1
=
[(s 2 + 0.618s + 1)(s 2 + 1.618s + 1)(s + 1)
1
=
s 5 + 3.236s 4 + 5.236s 3 + 5.236s 2 + 3.236s + 1

Ωp
Ωc = −kp
= 4.5784 rad/sec
1
(10 10 − 1) 2N

Ha (s) = H5 (s)|s→ s
4.5787

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 31 / 69
Problems Problems

Ha (s) = H5 (s)|s→ s
Ωc

= H5 (s)|s→ s
4.5787
1
= s s s
( 4.5787 )5 + 3.236( 4.5787 )4 + 5.236( 4.5787 )3 +
s 2 s
5.236( 4.5787 ) + 3.236( 4.5787 ) + 1
2012.4
=
s 5 + 14.82s 4 + 109.8s 3 + 502.6s 2 + 1422.36s + 2012.4

Verification

2012.4
Ha (jΩ) =
(jΩ)5 + 14.82(jΩ)4 + 109.8(jΩ)3 + 502.6(jΩ)2 + 1422.3(jΩ) + 2012.4
2012.4
=
(14.82Ω4 − 502.6Ω2 + 2012.4) + j(Ω5 − 109.8Ω3 + 1422.3Ω)
2012.4
|Ha (jΩ)| = p
(14.82Ω4 − 502.6Ω2 + 2012.4)2 + j(Ω5 − 109.8Ω3 + 1422.3Ω)2
20 log |Ha (jΩ)|4 = −1 dB
20 log |Ha (jΩ)|8 = −24 dB

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 32 / 69
Analog Filter Design Chebyshev Filter Design

Chebyshev Filter Design

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 33 / 69
Chebyshev Filter Design

The magnitude frequency response of Chebyshev filter is


1
|H(jΩ)|2 = h  i

1+ 2 Tn2 Ωp

Properties of Chebyshev filter


If Ω)p = 1 rad/sec then it is called as type-I normalized Chebyshev lowpass filter.
HN (jΩ)|2 |Ω=0 = 1 for all N
|H(j0)| = 1 for odd N and |H(j0)| = √ 1 2 for even N
1+
The filter has uniform ripples in the passband and is monotonic outside the passband.
The sum of the number of maxima and minima in the passband equals the order of the
filter.

H ( jω ) H ( jω )
Gain

Gain
1 1
1 δp 1 δp
1+ ε 2 1+ ε 2

δs δs
Ω Ω
ΩP ΩS ΩP ΩS

(a) N Odd (b) N Even

Figure 15: Magnitude frequency response of LPF for Chebyshev


Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 34 / 69
Chebyshev Filter Design

Order of the Filter

Kp Gain or Magnitude at passband in normal value(without dB) for frequency Ωp


Ks Gain or Magnitude at passband in normal value(without dB) for frequency Ωs
" 1 #
(1/Ks2 )−1 2
cosh−1 (1/Kp2 )−1
N1 =  
Ωs
cosh−1 Ωp

Kp Gain or Magnitude at passband in dB for frequency Ωp


Ks Gain or Magnitude at passband in dB for frequency Ωs
h
0.1Ks
i1 
cosh−1 100.1Kp −1
2
10 −1
N1 =  
Ωs
cosh−1 Ω
p

Chose the order of the filter N > N1

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 35 / 69
Chebyshev Filter Design

Normalized Chebyshev lowpass filter transfer function

When N is Even When N is odd

N N−1
2 2
Y Bk B0 Y Bk
H(sn ) = H(sn ) =
k=1
s 2 + bk s + ck s + c0 k=1 s 2 + bk s + ck
h i h i
(2k−1)π (2k−1)π
where bk = 2yN sin 2N
, ck = yN2 + cos 2 2N
c0 = yN
"
 1 # N1 " 1 #− N1 
1 1 2 1 1 2 1
yN = +1 + − +1 + 
2 2  2 

1
where  = (1/Kp2 ) − 1 2


When N is Even the values of parameter Bk are evaluated using


1
H(sn )|s=0 = 1
(1 + 2 ) 2
When N is odd the values of parameter Bk are evaluated using

H(sn )|s=0 = 1

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 36 / 69
Chebyshev Filter Design

Design steps for Chebyshev filter:

From the given specifications


1 Determine the order of the Filter
2 Determine the Normalized Chebyshev lowpass filter transfer function
3 From analog lowpass to lowpass frequency transformation, find the desired transfer
function by substituting the following

Ha (s) = HN (s)|s→ s
ΩC

where ΩC = ΩP

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 37 / 69
Chebyshev Filter Design

Jan 2013, June 2015: Design a Chebyshev IIR analog low pass filter that has -3.0 dB frequency
100 rad/sec and stopband attenuation 25 dB or grater for all radian frequencies past 250
rad/sec
Solution:
Passband ripple Kp =-3.0 dB or in normal value is Kp = 10Kp /20 = 10−3/20 = 0.707
Stopband ripple Ks =25.0 dB or in normal value is Ks = 10Ks /20 = 10−25/20 = 0.056
Passband edge frequency =100 rad/sec Stopband edge frequency =250 rad/sec

" 1 #
(1/Ks2 )−1 2
cosh−1 (1/Kp2 )−1
H ( jω )

Gain
N1 =  
Ωs
cosh−1 Ωp 1
" # 1 δp
i1
(1/0.0562 )−1
h
2
cosh−1 1+ ε 2
(1/0.7072 )−1
= 250

cosh−1 100
 1 δs
−1 317
cosh 1
2
cosh−1 [17.8] Ω
= = ΩP ΩS
cosh−1 (2.5) cosh−1 [2.5]
3.57 Figure 16: LPF specifications
= = 2.278 ' 3
1.566

N=3

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 38 / 69
Chebyshev Filter Design

When N is odd
B0 Bk
H(sn ) = × 2
s + c0 s + b1 s + c1
N−1
2
B0 Y Bk
H(sn ) = 1
s + c0 k=1 s 2 + bk s + ck

(1/Kp2 ) − 1 2  =
1
(1/0.7072 ) − 1 2 = 1

=
N=3 k = N−1
2
= 3−1
2
= 1
——————————————————————————————————–

"
 1 # N1 " 1 #− N1 
1 1 2 1 1 2 1
yN = +1 + − +1 + 
2 2  2 
"
 1 # 13 " 1 #− 31 
1 1 2 1 1 2 1
= +1 + − +1 + 
2 12 1 12 1

1 h 1
i1 h 1
i− 1 
3 3
= (2) 2 + 1 − (2) 2 + 1
2
1h 1 1
i 1
= [1.414 + 1] 3 − [1.414 + 1]− 3 = [1.341 − 0.745] ' 0.298
2 2
h i
(2k−1)π
C0 = yN = 0.298 k=1 bk = 2 × yN sin 2×N

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 39 / 69
Chebyshev Filter Design

k=1 h i
(2−1)π
b1 = 2 × 0.298sin 2×3 = 0.298
k=2
B0 B1
H(sn ) = × 2
s + c0 s + b1 s + c1

h
(2k−1)π
i B0 B1
ck = yN2 + cos 2 2N
H(sn ) = ×
s + 0.298 s 2 + 0.298s + 0.838
k=1
When N is odd the values of parameter Bk

(2 − 1)π
 are evaluated using
c1 = 0.2982 + cos 2
2×3 H(sn )|s=0 = 1
2 π
h i
= 0.088 + cos
6
" # B0 B1
1 + cos( 2π
6
) H(sn ) = =1
= 0.088 + 0.298 × 0.838
2
= 0.088 + 0.75 = 0.838 B0 B1 = 0.25
B0 = B1
B02 = 0.25

B0 = 0.25 = 0.5

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 40 / 69
Chebyshev Filter Design

B0 B1
H(sn ) = × 2
s + 0.298 s + 0.298s + 0.838
0.25
H(sn ) =
s 3 + 0.596s 2 + 0.926s + 0.25
Unnomalized transfer function, H(s) and Ωp = 100 rad/sec

0.25
Ha (s) = H3 (s)|s→ s = |s→ s
Ωp s 3 + 0.596s 2 + 0.926s + 0.25 Ωp

= H3 (s)|s→ s
Ωp

0.25
=
s3 2
Ωp 3
+ 0.596 Ωs 2 + 0.926 Ωs + 0.25
p p

0.25
=
s 3 +0.596Ωp s 2 +0.926Ω2c s+0.25Ω3p
Ω3p

0.25 × Ω3p
=
s3 + 0.596Ωp s 2 + 0.926Ω2c s + 0.25Ω3p
0.25 × 1003
=
s3 + 0.596 × 100s 2
+ 0.926 × 1002 s + 0.25 × 1003
0.25 × 1003
=
s + 59.6s + 926s + 0.25 × 1003
3 2

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 41 / 69
Chebyshev Filter Design

Design a Chebyshev IIR low pass filter that has to meet the following specifications
i) passband ripple ≤0.9151 dB and passband edge frequency 0.25π rad/sec
ii) Stopband attenuation ≥12.395 dB and Stopband edge frequency 0.5π rad/sec
Solution:
Passband ripple Kp =0.9151 dB
or in normal value is Kp = 10Kp /20 = 10−9151/20 = 0.9
Stopband ripple Ks =12.395 dB
or in normal value is Ks = 10Ks /20 = 10−12.395/20 = 0.24
Passband edge frequency 0.25π=0.7854 rad/sec
Stopband edge frequency 0.5π =1.5708rad/sec

" 1 #
(1/Ks2 )−1 2
cosh−1 (1/Kp2 )−1
N1 =  
Ωs
cosh−1 Ωp
" #
i1
(1/0.242 )−1
h
2
cosh−1 (1/0.92 )−1
=
cosh−1 1.5708

0.7854
−1 16.3611
 1
cosh 0.2346
2
cosh−1 [8.35] 2.8118
= 1.5708
= = = 2.135 ' 3
cosh−1 [2]

cosh−1 0.7854
1.3169

N=3
Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 42 / 69
Chebyshev Filter Design

When N is odd
B0 Bk
H(sn ) = × 2
s + c0 s + bk s + ck
N−1
2
B0 Y Bk
H(sn ) =
s + c0 k=1 s 2 + bk s + ck
1
(1/Kp2 ) − 1 2

 =
N=3 k = N−1
2
= 3−1
2
=1 =
 1
(1/0.92 ) − 1 2 = 0.4843
——————————————————————————————————–

"
 1 # N1 " 1 #− N1 
1 1 2 1 1 2 1
yN = +1 + − +1 + 
2 2  2 
"
 1 # 13 " 1 #− 13 
1 1 2 1 1 2 1
= +1 + − +1 + 
2 0.48432 0.4843 0.48432 0.4843

1 h 1
i1 h 1
i− 1 
3 3
= (5.2635) 2 + 2.064 − (5.2635) 2 + 2.064
2
1h 1 1
i 1
= [2.294 + 2.064] 3 − [2.294 + 2.064]− 3 = [1.6334 − 0.6122] ' 0.5107
2 2
h i
(2−1)π
C0 = yN = 0.5107 k=1 bk = 2 × 0.5107sin 2×3
= 0.5107

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 43 / 69
Chebyshev Filter Design

h i
(2k−1)π
ck = yN2 + cos 2 2N
B0 B1
H(sn ) = ×
k=1 s + 0.5107 s 2 + 0.5107s + 1.0108

 When N is odd the values of parameter Bk


2 (2 − 1)π
2 are evaluated using
ck = 0.5107 + cos
2×3
2 π H(sn )|s=0 = 1
h i
2
= 0.5107 + cos
6
" 2π
#
2
1 + cos( 6
)
= 0.5107 +
2 B0 B1
H(sn ) = = 1.9372B0 B1 = 1
= 0.2608 + 0.75 = 1.0108 0.5107 × 1.0108

B0 B1 1
H(sn ) = × 2 B0 B1 = = 0.5162
s + c0 s + bk s + ck 1.9372
B0 = B1
B02 = 0.5162
B0 B1 √
H(sn ) = × 2
s + 0.5107 s + b1 s + c1 B0 = 0.5162 = 0.7185

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 44 / 69
Chebyshev Filter Design

B0 B1 0.7185 0.7185
H(sn ) = × 2 = × 2
s + 0.5107 s + 0.5107s + 1.0108 s + 0.5107 s + 0.5107s + 1.0108
0.5162
H(sn ) =
s 3 + 1.0214s 2 + 1.2716s + 0.5162
Unnomalized transfer function, H(s) and Ωp = 0.7854 rad/sec

0.5162
Ha (s) = H3 (s)|s→ s = |s→ s
Ωp s 3 + 1.0214s 2 + 1.2716s + 0.5162 Ωp

0.5162
=
s3 2
Ωp 3
+ 1.0214 Ωs 2 + 1.2716 Ωs + 0.5162
p p

0.5162
=
s 3 +1.0214Ωp s 2 +1.2716Ω2p s+Ω3p
Ω3p

Ω3p
=
s3 + 1.0214Ωp s2 + 1.2716Ω2p s + Ω3p
0.5162 × 0.78543
=
s 3 + 1.0214 × 0.7854s 2 + 1.2716 × 0.78542 s + 0.78543
0.250
=
s 3 + 0.80229s 2 + 0.7844s + 0.2501

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 45 / 69
Chebyshev Filter Design

Design a Chebyshev IIR low pass filter that has to meet the following specifications
i) passband ripple ≤1.0 dB and passband edge frequency 1 rad/sec
ii) Stopband attenuation ≥15.0 dB and Stopband edge frequency 1.5 rad/sec

Solution:
Passband ripple Kp =1.0 dB or in normal value is Kp = 10Kp /20 = 10−1/20 = 0.891
Stopband ripple Ks =15.0 dB or in normal value is Ks = 10Ks /20 = 10−15/20 = 0.177
Passband edge frequency =1 rad/sec Stopband edge frequency =1.5rad/sec

" 1 #
(1/Ks2 )−1 2
cosh−1 (1/Kp2 )−1
H ( jω )

Gain
N1 =  
Ωs
cosh−1 Ωp 1
" # 1 δp
h 2 i1
(1/0.177 )−1 2
cosh−1 1+ ε 2
(1/0.8912 )−1
= 1.5

cosh−1 1.0
1 δs
−1 31.0

cosh 0.26
2
cosh−1 [11.0] Ω
= = ΩP ΩS
cosh−1 (1.5) cosh−1 [1.5]
3.08 Figure 17: LPF specifications
= = 3.2 ' 4
0.96

N=4
Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 46 / 69
Chebyshev Filter Design

When N is Even B1 B2
H(sn ) = × 2
N s 2 + b1 s + c1 s + b2 s + c2
2
Y Bk
H(sn ) =
k=1
s 2 + bk s + ck
1
(1/Kp2 ) − 1 2

 =
N 4
N=4 k = 2
= 2
=2 1
(1/0.8912 ) − 1 2 = 0.51

=
——————————————————————————————————–

"
 1 # N1 " 1 #− N1 
1 1 2 1 1 2 1
yN = +1 + − +1 + 
2 2  2 
"
 1 # 41 " 1 #− 14 
1 1 2 1 1 2 1
= +1 + − +1 + 
2 0.512 0.51 0.512 0.51

1 h 1
i1 h 1
i− 1 
4 4
= (4.84) 2 + 1.96 − (4.84) 2 + 1.96
2
1h 1 1
i 1
= [2.2 + 1.96] 4 − [2.2 + 1.96]− 4 = [1.428 − 0.7] ' 0.364
2 2
h i
(2k−1)π
C0 = yN = 0.364 k=1 bk = 2 × yN sin 2×N

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 47 / 69
Chebyshev Filter Design

k=1 h i
(2−1)π
b1 = 2 × 0.364sin 2×4 = 0.278
k=2 h i
(2×2−1)π
b2 = 2 × 0.364sin 2×4
= 0.672
h i
2 2 (2k−1)π
ck = yN + cos 2N
k=2
k=1
 
(2 × 2 − 1)π
c2 = 0.3642 + cos 2
 
(2 − 1)π
c1 = 0.3642 + cos 2 2×4
2×4  

2 π = 0.132 + cos 2
h i
= 0.132 + cos 8
8 " #
1 + cos( 6π )
" #
1 + cos( 2π
8
) = 0.132 + 8
= 0.132 + 2
2
= 0.132 + 0.853 = 0.132 + 0.146 = 0.278
= 0.132 + 0.853 = 0.985

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 48 / 69
Chebyshev Filter Design

B1 B2
H(sn ) = × 2
s 2 + b1 s + c1 s + b2 s + c2

B1 B2
H(sn ) = ×
s 2 + 0.278s + 0.985 s 2 + 0.672s + 0.278
When N is odd the values of parameter Bk
are evaluated using

1 1
H(sn )|s=0 = = = 0.89
(1 + 2 )1/2 (1 + 0.512 )1/2

B1 B2
H(sn ) = = 0.89
0.985 × 0.278

B1 B2 = 0.244
B1 = B2
B12 = 0.244

B1 = 0.264 = 0.493

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 49 / 69
Chebyshev Filter Design

B1 B2 0.493 0.493
H(sn ) = × = 2 ×
s 2 + 0.278s + 0.985 s 2 + 0.672s + 0.278 s + 0.278s + 0.985 s 2 + 0.672s + 0.278

0.243
H(sn ) =
s 4 + 0.95s 3 + 1.45s 2 + 1.434s + 0.2738
Unnomalized transfer function, H(s) and Ωp = 1.0 rad/sec

0.243
Ha (s) = H4 (s)|s→ s = |s→ s
Ωp s 4 + 0.95s 3 + 1.45s 2 + 1.434s + 0.2738 1

0.263
=
s 4 + 0.95s 3 + 1.45s 2 + 1.434s + 0.2738

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 50 / 69
Chebyshev Filter Design

July 2014, Dec 2014 Design a Chebyshev IIR low pass filter that has to meet the following
specifications
i) passband ripple ≤2 dB and passband edge frequency 1 rad/sec
ii) Stopband attenuation ≥20 dB and Stopband edge frequency 1.3 rad/sec
Solution:
Passband ripple Kp =2 dB
or in normal value is Kp = 10Kp /20 = 10−2/20 = 0.7943
Stopband ripple Ks =12.395 dB
or in normal value is Ks = 10Ks /20 = 10−20/20 = 0.1
Passband edge frequency 1 rad/sec
Stopband edge frequency 1.3 rad/sec

" 1 #
(1/Ks2 )−1 2
cosh−1 (1/Kp2 )−1
N1 =  
Ωs
cosh−1 Ωp
" #
i1
(1/0.12 )−1
h
2
cosh−1 (1/0.79432 )−1
=
cosh−1 1.3

1.0
−1 99.0
 1
cosh 0.585
2
cosh−1 [13.00] 3.256
= 1.3
= = = 4.3 ' 5
cosh−1 [1.3]

cosh−1 1.0
0.756

N=5
Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 51 / 69
Chebyshev Filter Design

When N is odd
B0 B1 B2
H(sn ) = × ×
s + c0 s 2 + b1 s + c1 s 2 + b2 s + c2
N−1
2
B0 Y Bk
H(sn ) =
s + c0 k=1 s 2 + bk s + ck
1
(1/Kp2 ) − 1

 = 2

N−1 5−1 1
N=5 k = = =2 2 = (1/0.79432 ) − 1 2 = 0.7648
2

——————————————————————————————————–

"
 1 # N1 " 1 #− N1 
1 1 2 1 1 2 1
yN = +1 + − +1 + 
2 2  2 
"
 1 # 51 " 1 #− 51 
1 1 2 1 1 2 1
= +1 + − +1 + 
2 0.76482 0.7648 0.76482 0.7648

1 h 1
i1 h 1
i− 1 
5 5
= (2.71) 2 + 1.307 − (2.71) 2 + 1.307
2
1h 1 1
i 1
= [1.646 + 1.307] 5 − [1.646 + 1.307]− 5 = [1.241 − 0.805] ' 0.218
2 2
h i h i
(2k−1)π (2−1)π
C0 = yN = 0.218 bk = 2 × yN sin 2×N
k=1 b1 = 2 × 0.218sin 2×5
= 0.134

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 52 / 69
Chebyshev Filter Design

k=2 h i
(4−1)π
b2 = 2 × 0.218sin 2×5 = 0.352
h
(2k−1)π
i k=2
ck = yN2 + cos 2 2N  
(4 − 1)π
k=1 c2 = 0.2182 + cos 2
2×5
 

(2 − 1)π
 3π
c1 = 0.2182 + cos 2 = 0.047 + cos 2
2×5 10
" #
2 π 1 + cos( 2×3π )
h i
= 0.047 + cos = 0.047 + 10
10 2
" #
1 + cos( 2π
10
) = 0.047 + 0.345 = 0.392
= 0.047 +
2
= 0.047 + 0.904 = 0.951
————————————————————–

B0 B1 B2
H(sn ) = × 2 × 2
s + c0 s + b1 s + c1 s + b2 s + c2
B0 B1 B2
H(sn ) = × 2 × 2
s + 0.218 s + 0.134s + 0.951 s + 0.352s + 0.392
When N is odd the values of parameter Bk are evaluated using

H(sn )|s=0 = 1

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 53 / 69
Chebyshev Filter Design

When N is odd the values of parameter Bk are evaluated using

H(sn )|s=0 = 1

B0 B1 B2
H(sn ) = = 12.3B0 B1 B2 = 1
0.218 × 0.951 × 0.392

1
B0 B1 B2 = = 0.081
12.3

3 1
B0 = B1 = B2 Then B03 = 0.081 B0 = 0.081 = 0.081 3 = 0.432
0.432 0.432 0.432
H(sn ) = × 2 × 2
s + 0.218 s + 0.134s + 0.951 s + 0.352s + 0.392
0.081
H(sn ) =
s 5 + 0.7048s 4 + 1.496s 3 + 0.689s 2 + 0.456s + 0.081
Unnomalized transfer function, H(s) and Ωp = 1 rad/sec
Hence
0.081
H(sn ) = 5
s + 0.7048s 4 + 1.496s 3 + 0.689s 2 + 0.456s + 0.081

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 54 / 69
Chebyshev Filter Design

Dec 2014: Design A Chebyshev I low pass filter that has to meet the following specifications
i) passband ripple ≤2 dB and passband edge frequency 1 rad/sec
ii) Stopband attenuation ≥20 dB and Stopband edge frequency 1.3 rad/sec
Solution:
Ωp =1 rad/sec, Ωs =1.3 rad/sec,
Kp =–2 dB, Ks =–20 dB,
H ( jω )

Gain
 
1
Kp = 20 log √ = −2 1
1 + 2 1 δp
=0.76478 1+ ε 2

1
δp = 1 − √ = 0.20567
1 + 2 δs
Ω
ΩP ΩS
Ks = 20 log δs = −20
δs =0.1 Figure 18: LPF specifications
s
(1 − δp )−2 − 1 The order of the filter is
d= = 0.077
δs−2 − 1
1
cosh−1

d
N=  = 4.3 ' 5
Ωp 1 cosh−1 1
K = = = 0.769 K
Ωs 1.3

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 55 / 69
Chebyshev Filter Design

√ !1
N
√ !− 1
N
1 1+ 1 + 2 1 1+ 1 + 2
a= − = 0.21830398
2  2 

√ !1
N
√ !− 1
N
1 1+ 1 + 2 1 1+ 1 + 2
b= + = 1.0235520
2  2 
h π i h πi
Ωk = b cos (2k − 1) = b cos (2k − 1)
2N 10
h π i h πi
σk = −a sin (2k − 1) = −a sin (2k − 1)
2N 10
where k = 1, 2, . . . 2N i.e., k = 1, 2, . . . 10
The poles those are lie on left half of the s plane is

k σk Ωk
1 -0.0674610 0.9734557
2 -0.1766151 0.6016287
3 -0.2183083 0
4 -0.1766151 -0.6016287
5 -0.0674610 -0.9734557

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 56 / 69
Chebyshev Filter Design

KN KN
H5 (s) = Q =
(s − sk ) (s − s1 )(s − s2 )(s − s3 )(s − s4 )
LHPonly
KN
=
(s + 0.067461 − j0.9734557)(s + 0.067461 + j0.9734557)
(s + 0.1766151 − j0.6016287)(s + 0.1766151 + j0.6016287)(s + 0.2180383)
KN
=
(s 2 + 0.134922s + 0.95215)(s 2 + 0.35323s + 0.393115)(s + 0.2183083)
KN
=
s 5 + 0.70646s 4 + 1.4995s 3 + 0.6934s 2 + 0.459349s + 0.08172
N is odd KN = bo =0.08172
0.08172
H5 (s) =
s 5 + 0.70646s 4 + 1.4995s 3 + 0.6934s 2 + 0.459349s + 0.08172
Verification
0.08172
Ha (jΩ) =
(jΩ)5 + 0.70646(jΩ)4 − 1.49(jΩ)3 − 0.693(jΩ)2 + 0.4593(jΩ) + 0.08172
0.08172
|Ha (jΩ)| = p
(.7064Ω4 − .693Ω2 + .0817)2 + j(Ω5 − 1.499Ω3 + .4593Ω)2
20 log |Ha (jΩ)|1 = −2 dB
20 log |Ha (jΩ)|1 .3 = −24.5 dB

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 57 / 69
Analog Filter Design Analog to analog frequency transformations

Analog to analog frequency transformations

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 58 / 69
Analog Filter Design Analog to analog frequency transformations

Design steps for highpass filter:


From the given specifications
Ωp
1 Determine stopband frequency of the normalized lowpass filter by Ωs = 0
Ωs
2 Determine the order of the Filter using
−Kp
" #
10 10 −1
log −KS
10 10 −1
N= h i

2log Ωp
S

3 Determine the cutoff frequency ΩC using


Ωs Ωp
ΩC =   1 OR ΩC =   1
−Ks 2N −Kp 2N
10 10 − 1 10 10 −1

4 Determine the transfer function of normalized Butterworth filter by


1 1
HN (s) = Q =
(s − sk ) BN (s)
LHP

5 From analog lowpass to high frequency transformation, find the desired transfer function
by substituting the following
Ha (s) = HN (s)| Ωp
s→ Ω S
c

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 59 / 69
Analog Filter Design Analog to analog frequency transformations

Design a Butterworth analog highpass filter that will meet the following specifications
i) Maximum passband attenuation gain 2 dB
ii) Passband edge frequency=200 rad/sec
iii) Minimum stopband attenuation =20 dB
iv) Stopband edge frequency=100 rad/sec
Determine the transfer function Ha (s) of the lowest order Butterworth filter to meet the above
the specifications
Solution:

Gain in dB
20 log H a ( jω )
Gain in dB

20 log H a ( jω )

0
0 K P = −2dB
K P = −2 dB

K s = −20dB
K s = −20 dB Ω
Ω ΩP = 1 ΩS = 2
ΩP = 100 rad/sec Ωu = 200 rad/sec

Figure 20: normalized LPF


Figure 19: HPF specifications specifications

Ωp 200 The order of the filter is


ΩS = = =2
Ω0 S 100 " −Kp
#
10 10 −1
log −KS
ΩS = 2 Ωp = 1 10 10 −1
N= h i

= 3.7 ' 4
2log Ωp
S
Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 60 / 69
Analog Filter Design Analog to analog frequency transformations

For Even N=4


N
2
Y 1
H(sn ) =
k=1
s 2 + bk s + 1
h i
(2k−1)π
where bk = 2sin 2N
N=4
k = N2 = 42 = 2
k=1 h i
(2−1)π
bk = b1 = 2sin 2×4 =0.7654
k=2 h i
(4−1)π
bk = b2 = 2sin 2×4 =1.8478

1
H(sn ) =
(s 2 + 0.7654s + 1)(s 2 + 1.8478s + 1)
1
=
s 4 + 2.6118s 3 + 3.4117s 2 + 2.6118s + 1

Ωs
Ωc = −ks 1
(10 10 − 1) 2N
2 2
= 20 1
=
(10 10 − 1) 8 1.776
= 1.126 rad/sec

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 61 / 69
Analog Filter Design Analog to analog frequency transformations

1
Ha (s) =
(s 2 + 0.7654s + 1)(s 2 + 1.8478s + 1)
Ha (s) = Hp (s)| Ωp
s→ Ω s
c
= H4 (s)|s→ 200
1.126s
= H4 (s)|s→ 177.62
s

s4
=
(s 2 + 135.95s + 31548.86)(s 4 + 328.206s + 31548.86)

Verification

Ω4
Ha (jΩ) =
[(34980.7521 − Ω2 )
+ j1431.1464Ω]
[(34980.7521 − Ω2 ) + j1431.1464Ω]
Ω4
|Ha (jΩ)| = p
[(34980.7521 − Ω2 )2 + (1431.1464Ω)2 ]
p
[(34980.7521 − Ω2 )2 + (1431.1464Ω)2 ]
20 log |Ha (jΩ)|Ω=200 = −2 dB
20 log |Ha (jΩ)|Ω=100 = −21.83 dB

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 62 / 69
Analog Filter Design Analog to analog frequency transformations

Design a Butterworth analog bandpass filter that will meet the following specifications
i) a -3.0103 dB upper and lower cutoff frequency of 50 Hz and 20 KHz
ii) a Stopband attenuation of atleast 20 dB at 20 Hz and 45 KHz and
iii) Monotonic frequency response.
Solution:

Gain in dB
20 log H a ( jω )
20 log H a ( jΩ)
Gain in dB

0 0
K P = −2dB

KP
K s = −20dB
Ω
ΩP = 1 ΩS = 2

Ks
Ω
Figure 22: normalized LPF
Ω1 Ωl Ωu Ω2 specifications
Figure 21: HPF specifications

−Ω2 l + Ωl Ωu
A= = 2.51
Ωl (Ωu − Ωl )
Ω1 = 2π × 20 = 125.663rad/sec
Ω2 = 2π × 45 × 103 = 2.827 × 105 rad/sec −Ω2 2 − Ωl Ωu
B= = 2.25
Ωu = 2π × 20 × 103 = 1.257 × 105 rad/sec Ω2 (Ωu − Ωl )
Ωl = 2π × 50 × 103 = 314.159 × rad/sec ΩS = Min[|A|, |B|] = 2.25

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 63 / 69
Analog Filter Design Analog to analog frequency transformations

The order of the filter is


−Kp
" #
10 10 −1
log −KS
10 10 −1 jΩ
N= h i

= 2.83 ' 3
S-plane
2log Ωp s2
S Unit circle s1

For odd N=3 s3 s0


σ
N−1
2
1 Y 1 s5
H(sn ) =
(s + 1) k=1 s 2 + bk s + 1 s4
Left half poles of H3(s) Right half poles of H3(-s)
h i
(2k−1)π
where bk = 2sin 2N
N=3
k = N−1
2
= 3−1
2
=1
k=1 h i Ha (s) = H3 (s)| s 2 +Ω Ω
u l
(2−1)π s→ s(Ω −Ω
bk = b1 = 2sin 2×3 =1 u l)
= H3 (s)| 2 7
s→ s +3.949×105
s(1.2538×10 )
1
H(sn ) =
(s + 1)(s 2 + s + 1)
1
=
s 3 + 2s 2 + 2s + 1

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 64 / 69
Analog Filter Design Analog to analog frequency transformations
1
Let H(s) = s 2 +s+1 represent the transfer function of LPF with passband of 1 rad/sec. Use
frequency transformation to find the transfer functions of the following analog filters
i) A lowpass filter with a passband of 10 rad/sec
ii) A highpass filter with a cutoff frequency of 1 rad/sec
iii) A highpass filter with a cutoff frequency of 10 rad/sec
iv) A bandpass filter with a passband of 10 rad/sec and a center frequency of 100
rad/sed
v) A bandstop filter with a stopband of 2 rad/sec and a center frequency of 10
rad/sed
Solution: Lowpass to highpass transformation
1
H(s) =
(s 2 + s + 1)

Ha (s) = H3 (s)|s→ s
10
1 100
= =
s 2 s s 2 + 10s + 100
 
10
+ 10
+1

Lowpass to highpass transformation

10
Ha (s) = H3 (s)| Ω =
s→ Ω ps 1s
c

1 s2
= =
10 2 10 s 2 + 10s + 100
 
5
+ s
+1
Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 65 / 69
Analog Filter Design Analog to analog frequency transformations

Lowpass to bandpass transformation

s 2 + Ωu Ωl s + Ω20
s→ =
s(Ωu − Ωl ) s + B0

where Ω0 = Ωu Ωl and B0 = Ωu Ωl

Ha (s) = H(s)| 2 4
s→ s +10×10
10s

100s 2
= =
s4 + 10s 3 + 20100s 2 + 104 s + 108

Lowpass to bandstop transformation

s(Ωu − Ωl ) sB0
s→ = 2
s 2 + Ωu Ωl s + Ω2

Ha (s) = H(s)|s→ 2s
s 2 +100

(s 2 + 100)2
= =
s4 + 2s 3 + 204s 2 + 200s + 104

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 66 / 69
Analog Filter Design Analog to analog frequency transformations

Table 2: Comparison between Butterworth and Chebyshev Filter


Butterworth Filter Chebyshev Filter
1 The magnitude frequency response is The magnitude frequency response
montonically decreasing has ripples in passband or stopband
2 The poles lie on a circle in the s plane The poles lie on an ellipse in the s
plane
3 For a given frequency specifications For a given frequency specifications
the number of poles are more the number of poles are less
4 For a given order N the width of the For a given order N the width of the
transition band is more transition band is less
5 Only few parameters has to be calcu- A large number of parameters has to
lated to determine the transfer func- be calculated to determine the transfer
tion function

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 67 / 69
Analog Filter Design Analog to analog frequency transformations

Table 3: Comparison between IIR and FIR Filter


IIR Filter FIR Filter
1 Linear characteristic cannot be Linear characteristic can be achieved
achieved
2 The impulse response cannot be di- The impulse response can be di-
rectly converted to digital filter trans- rectly converted to digital filter trans-
fer function fer function
3 It is recursive filter and may be stable It may be recursive or non recursive
or unstable filter and recursive filter are stable
4 The specifications include the desired The specifications include the desired
characteristics for magnitude response characteristics for both magnitude and
only phase response
5 The design involves design of analog The digital filter can be directly de-
filter and then transforming analog to signed to achieve the desired specifi-
digital filter cations.

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 68 / 69
References

J. G. Proakis and D. G. Monalakis, Digital signal processing Principles Algorithms &


Applications, 4th ed. Pearson education, 2007.
Oppenheim and Schaffer, Discrete Time Signal Processing. Pearson education, Prentice
Hall, 2003.
S. K. Mitra, Digital Signal Processing. Tata Mc-Graw Hill, 2004.

L. Tan, Digital Signal Processing. Elsivier publications, 2007.

Dr. Manjunatha. P (JNNCE) UNIT - 5: Analog Filter Design November 11, 2016 69 / 69
Design of FIR Filters

Elena Punskaya
www-sigproc.eng.cam.ac.uk/~op205

Some material adapted from courses by


Prof. Simon Godsill, Dr. Arnaud Doucet,
Dr. Malcolm Macleod and Prof. Peter Rayner

68
FIR as a class of LTI Filters

Transfer function of the filter is

Finite Impulse Response (FIR) Filters:


N = 0, no feedback

69
FIR Filters

Let us consider an FIR filter of length M (order N=M-1, watch out!


order – number of delays)

70
FIR filters

Can immediately obtain the impulse response, with x(n)= δ(n)

The impulse response is of finite length M, as required

Note that FIR filters have only zeros (no poles). Hence
known also as all-zero filters

FIR filters also known as feedforward or


non-recursive, or transversal
71
FIR Filters

Digital FIR filters cannot be derived from analog filters –


rational analog filters cannot have a finite impulse
response.

Why bother?

1. They are inherently stable


2. They can be designed to have a linear phase
3. There is a great flexibility in shaping their magnitude
response
4. They are easy and convenient to implement

Remember very fast implementation using FFT?

72
FIR Filter using the DFT

FIR filter:

Now N-point DFT (Y(k)) and then N-point IDFT (y(n)) can be used
to compute standard convolution product and thus to perform
linear filtering (given how efficient FFT is)

73
Linear-phase filters

The ability to have an exactly linear phase response is the one


of the most important of FIR filters

A general FIR filter does not have a linear phase response but
this property is satisfied when

four linear phase filter types

74
Linear-phase filters – Filter types

Some observations:

• Type 1 – most versatile

• Type 2 – frequency response is always 0 at


ω=π – not suitable as a high-pass

• Type 3 and 4 – introduce a π/2 phase shift,


frequency response is always 0 at ω=0 - – not
suitable as a high-pass

75
FIR Design Methods

• Impulse response truncation – the simplest


design method, has undesirable frequency
domain-characteristics, not very useful but
intro to …

• Windowing design method – simple and


convenient but not optimal, i.e. order
achieved is not minimum possible

• Optimal filter design methods

76
Back to Our Ideal Low- pass Filter Example

77
Approximation via truncation

78
Approximated filters obtained by truncation

M M

transition band

M M

M
79
Window Design Method

To be expected …
Truncation is just pre-multiplication by a rectangular window
This is not very clever
– obviously one
introduces a delay

spectrum convolution

80
Rectangular Window Frequency Response

81
Window Design Method

M
M M

M N M

82
Magnitude of Rectangular Window Frequency Response

83
Truncated Filter

84
Truncated Filter

85
Ideal Requirements

Ideally we would like to have


• small – few computations
• close to a delta Dirac mass for
to be close to

our ideal low-pass filter

These two requirements are conflicting!


86
Increasing the dimension of the window
M M

M M

• The width of the main lobe decreases as M increases


M
87
Conflicting Ideal Requirements

88
Solution to Sharp Discontinuity of Rectangular Window

Use windows with no abrupt discontinuity in their time-


domain response and consequently
low side-lobes in their frequency response.

In this case, the reduced ripple comes at the expense


of a wider transition region but this

However, this can be compensated for by increasing


the length of the filter.

89
Alternative Windows –Time Domain

Many alternatives have been proposed, e.g.


• Hanning
• Hamming
• Blackman

90
Windows –Magnitude of Frequency Response

91
Summary of Windows Characteristics

We see clearly that a wider transition region (wider main-lobe)


is compensated by much lower side-lobes and thus less ripples.

92
Filter realised with rectangular/Hanning windows

Back to our ideal filter

realised with Hanning window


realised with
rectangular window

M=16 M=16
There are much less ripples for the Hanning window but
that the transition width has increased
93
Filter realised with Hanning windows

realised with Hanning window realised with Hanning window


M=16 M=40

Transition width can be improved by increasing the size of the


Hanning window to M = 40
94
Windows characteristics

• Fundamental trade-off between main-lobe


width and side-lobe amplitude

• As window smoother, peak side-lobe


decreases, but the main-lobe width increases.

• Need to increase window length to achieve


same transition bandwidth.

95
Specification necessary for Window Design Method

ωc - cutoff frequency
δ - maximum passband
ripple
Δω – transition bandwidth
Δωm – width of the window
mainlobe

Response must not enter shaded regions


96
Key Property 1 of the Window Design Method

97
Key Property 2 of the Window Design Method

98
Key Property 3 of the Window Design Method

99
Key Property 4 of the Window Design Method

100
Key Property 5 of the Window Design Method

101
Passband / stopband ripples

Passband / stopband ripples are often expressed in dB:

passband ripple = 20 log10 (1+δp ) dB,


or peak-to-peak passband ripple ≅ 20 log10 (1+2δp) dB;
minimum stopband attenuation = -20 log10 (δs ) dB.

Example: δp= 6% peak-to-peak passband ripple ≅ 20 log10 (1+2δp) = 1dB;

δs = 0.01 minimum stopband attenuation = -20 log10 (δs) = 40dB.

The band-edge frequencies ωs and ωp are often called corner frequencies,


particularly when associated with specified gain or attenuation (e.g. gain =
-3dB).

102
Summary of Window Design Procedure

• Ideal frequency response has infinite impulse response

• To be implemented in practice it has to be


– truncated
– shifted to the right (to make is causal)

• Truncation is just pre-multiplication by a rectangular window


– the filter of a large order has a narrow transition band
– however, sharp discontinuity results in side-lobe
interference independent of the filter’s order and
shape Gibbs phenomenon

• Windows with no abrupt discontinuity can be used to reduce


Gibbs oscillations (e.g. Hanning, Hamming, Blackman) 103
Summary of the Key Properties of the Window
Design Method
1. Equal transition bandwidth on both sides of the ideal cutoff
frequency.
2. Equal peak approximation error in the pass-band and stop-
band.
3. Distance between approximation error peaks is
approximately equal to the width of the window main-lobe.
4. The width of the main-lobe is wider than the transition band.
approximation error peaks

5. Peak
transition approximation error
bandwidth is determined by the
window shape,
mainlobe independent of the
width filter order.

104
Summary of the windowed FIR filter design
procedure

1. Select a suitable window function

2. Specify an ideal response Hd(ω)

3. Compute the coefficients of the ideal filter hd(n)

4. Multiply the ideal coefficients by the window function to


give the filter coefficients

5. Evaluate the frequency response of the resulting filter


and iterate if necessary (typically, it means increase M if
the constraints you have been given have not been
satisfied)
105
Step by Step Windowed Filter Design Example

Design a type I low-pass filter according to


the specification
passband frequency
ωp =0.2π
ωs =0.3π stopband frequency

δ1 =0.01
δ2 =0.01

106
Step 1. Select a suitable window function

Choosing a suitable window function can be done with the aid of


published data such as

The required peak error spec δ2 = 0.01, i.e. -20log10 (δs ) = - 40 dB


Hanning window
Main-lobe width ωs- ωp = 0.3π 0.2π = 0.1π, i.e. 0.1π = 8π / M
filter length M ≥ 80, filter order N ≥ 79
Type-I filter have even order N = 80
although for Hanning window first and last ones are 0 so only 78 in reality 107
Step 2 Specify the Ideal Response

Property 1: The band-edge frequency of the ideal response


if the midpoint between ωs and ωp

ωc = (ωs + ωp)/2 = (0.2π+0.3π)/2 = 0.25π

1 if |ω| ≤ 0.25π
0 if 0.25π < |ω|< π
our ideal low-pass filter
frequency response

108
Step 3 Compute the coefficients of the ideal filter

• The ideal filter coefficients hd are given by the Inverse


Discrete time Fourier transform of Hd(ω)

• Delayed impulse response (to make it causal)


N

• Coefficients of the ideal filter

40
40
109
Step 3 Compute the coefficients of the
ideal filter

• For our example this can be done analytically, but in


general (for more complex Hd (ω) functions) it will be
computed approximately using an N-point Inverse
Fast Fourier Transform (IFFT).

• Given a value of N (choice discussed later), create a


sampled version of Hd (ω):

Hd(p) = Hd(2πp/N), p=0,1,...N-1.

[ Note frequency spacing 2π/N rad/sample ]

110
Step 3 Compute the coefficients of the
ideal filter
If the Inverse FFT, and hence the filter coefficients, are to be purely real-
valued, the frequency response must be conjugate symmetric:
Hd(-2πp/N) = Hd* (2πp/N) (1)

Since the Discrete Fourier Spectrum is also periodic, we see that


Hd(-2πp/N) = Hd(2π - 2πp/N) = Hd(2π(N-p)/N) (2)

Equating (1) & (2) we must set Hd(N-p) = Hd* (p) for p = 1, ..., (N/2-1).

The Inverse FFT of Hd*(p) is an N-sample time domain function h´(n).


For h´(n) to be an accurate approximation of h(n), N must be made large
enough to avoid time-domain aliasing of h(n), as illustrated below.
111
Time domain aliasing
Consider FFT and IFFT

The relationship (2) provides the reconstruction of the periodic signal


xn however it does not imply that we can recover xn from the samples.
For sequence xn of finite duration L this is only possible if N ≥ L

112
Step 4 Multiply to obtain the filter coefficients

• Coefficients of the ideal filter

40
40

• Multiplied by a Hamming window function

113
Step 5 Evaluate the Frequency Response and Iterate

The frequency response is computed as the DFT of the filter coefficient


vector.

If the resulting filter does not meet the specifications, one of the following
could be done
• adjust the ideal filter frequency response (for example, move the
band edge) and repeat from step 2
• adjust the filter length and repeat from step 4
• change the window (and filter length) and repeat from step 4

114
Matlab Implementation of the Window Method

Two methods FIR1 and FIR2

B=FIR2(N,F,M)

Designs a Nth order FIR digital filter


F and M specify frequency and magnitude breakpoints
for the filter such that plot(N,F,M)shows a plot of
desired frequency
The frequencies F must be in increasing order between
0 and 1, with 1 corresponding to half the sample rate.
B is the vector of length N+1, it is real, has linear phase
and symmetric coefficients
Default window is Hamming – others can be specified
115
Multi-band Design

116
Frequency sampling method

117
FIR Filter Design Using Windows

FIR filter design based on windows is simple and robust,


however, it is not optimal:
• The resulting pass-band and stop-band parameters
are equal even though often the specification is more
strict in the stop band than in the pass band
unnecessary high accuracy in the pass band

• The ripple of the window is not uniform (decays as we


move away from discontinuity points according to
side-lobe pattern of the window)

by allowing more freedom in the ripple behaviour


we may be able to reduce filter’s order and hence
its complexity
118
FIR Design by Optimisation: Least-Square Method

We now present a method that approximates the desired frequency response by a linear-phase FIR
amplitude function according to the following optimality criterion.

The integral of the weighted square frequency-domain error is given by

ε 2 = ∫E2(ω)dω

and we assume that the order and the type of the filter are known. Under this assumptions designing
the FIR filter now reduces to determining the coefficients that would minimise ε 2 .
119
Recall Our Example

Design a type I low-pass filter according to specification

passband frequency
ωp =0.2π
ωs =0.3π stopband frequency

δ1 =0.1 But assume the


pass-band
δ2 =0.01 tolerance of 0.1

The filter designed using window method cannot benefit from this
relaxation, however, a least-square method design gives N = 33
(compared to N = 80).
120
Least-Square Design of FIR Filters

• Meeting the specification is not guaranteed a-priori,


trial and error is often required. It might be useful to
set the transition bands slightly narrower than
needed, and it is often necessary to experiment with
the weights

• Occasionally the resulting frequency response may


be peculiar. Again, changing the weights would help
to resolve the problem

121
Equiripple Design

The least-square criterion of minimising


ε 2 = ∫E2(ω)dω

is not entirely satisfactory.

A better approach is to minimize the maximum


error at each band

ε = maxω |E(ω)|

122
Equiripple Design

The method is optimal in a sense of minimising the maximum


magnitude of the ripple in all bands of interest, the filter order is
fixed

It can be shown that this leads to an equiripple filter – a filter which


amplitude response oscillates uniformly between the tolerance
bounds of each band

123
Equiripple Design

Many ripples achieve maximum


Passband
Permitted amplitude

Overall and passband-only frequency response of length 37


minimax filter

124 124
Remez method

• There exists a computational procedure known as the


Remez method to solve this mathematical
optimization problem.

• There are also exist formulae for estimating the


required filter length in the case of lowpass,
bandpass and narrow transition bandwidths.
However, these formulae are not always reliable so it
might be necessary to iterate the procedure so as to
satisfy the design constraints.

125
Equiripple Design: Weights

The weights can be determined in advance from a minimax specification.


For example, if a simple lowpass filter has a requirement for the passband
gain to be in the range 1-∂p to 1+∂p, and the stopband gain to be less than
∂s, the weightings given to the passband and stopband errors would be ∂s
and ∂p respectively.
The detailed algorithm is beyond the (time!) constraints of this module.

126 126
Equiripple Design: Example

Obtain the coefficients of an FIR lowpass digital filter to meet these


specifications:
passband edge frequency 1.625 kHz
passband pk-to-pk ripple <1 dB
transition width 0.5 kHz
stopband attenuation >50 dB
sampling frequency 8 kHz

The passband ripple corresponds to ±6%, while the stopband attenuation


is 0.32%, hence the weighting factors are set to 0.32 and 6.
Using the relevant length estimation formula gives order N=25.8 hence
N=26 was chosen, i.e. length =27. This proved to be substantially too
short, and it was necessary to increase the order to 36 (length 37) to meet
the specifications. 127
Equiripple Design: Matlab
b = remez(n,f,m) designs an nth order FIR digital filter and returns the filter
coefficients in length n+1 vector b.
Vectors f and m specify the frequency and magnitude breakpoints [as for FIR2].
b = remez(n,f,m,w) uses vector w to specify weighting in each of the pass or stop
bands in vectors f and m.
Note again the frequency normalisation, where 1.0 equals half the sample rate.
The call which finally met this filter specification was:
h = remez(36,[0 1.625 2 4]/4, [1 1 0 0], [0.32 6]);
The resulting frequency response is as shown previously:

128 128
The Parks-McClellan Remez exchange algorithm

The computational procedure the optimization problem is by


Remez

The algorithm in common use is by Parks and McClellan.

The Parks-McClellan Remez exchange algorithm is widely


available and versatile.

Important: it designs linear phase (symmetric) filters or


antisymmetric filters of any of the standard types
129 129
Linear Symmetric Filters
The frequency response of the direct form FIR filter may be rearranged by grouping the
terms involving the first and last coefficients, the second and next to last, etc.:

and then taking out a common factor exp( -jMΩ/2):

If the filter length M+1 is odd, then the final term in curly brackets above is the single term
bM/2, that is the centre coefficient ('tap') of the filter.
130
Symmetric impulse response

Symmetric impulse response: if we put bM = b0, bM-1 = b1, etc., and note that exp(jθ)
+exp(-jθ) = 2cos(θ), the frequency response becomes

This is a purely real function (sum of cosines) multiplied by a linear phase term, hence
the response has linear phase, corresponding to a pure delay of M/2 samples, ie half the
filter length.
A similar argument can be used to simplify antisymmetric impulse responses in terms of a
sum of sine functions (such filters do not give a pure delay, although the phase still has a
linear form π/2-mΩ/2)

131 131
Implementation of symmetric FIR filters

The symmetric FIR filters of length N can be implemented using the folded delay line
structure shown below, which uses N/2 (or (N+1)/2) multipliers rather than N

132 132
Limitations of the algorithm
Linear phase in the stopbands is never a real requirement, and in some
applications strictly linear phase in the passband is not needed either.

The linear phase filters designed by this method are therefore longer than
optimum non-linear phase filters.

However, symmetric FIR filters of length N can be implemented using the folded
delay line structure shown below, which uses N/2 (or (N+1)/2) multipliers rather
than N, so the longer symmetric filter may be no more computationally intensive
than a shorter non-linear phase one.

133 133
Further options for FIR filter design

More general non-linear optimisation (least squared error or minimax) can of course
be used to design linear or non-linear phase FIR filters to meet more general frequency
and/or time domain requirements.

Matlab has suitable optimisation routines.

134 134
UNIT - 7: FIR Filter Design

Dr. Manjunatha. P
[email protected]

Professor
Dept. of ECE

J.N.N. College of Engineering, Shimoga

October 25, 2016


Unit 7 Syllabus Introduction

FIR Filter Design:[1, 2, 3, 4]

Slides are prepared to use in class room purpose, may be used as a


reference material
All the slides are prepared based on the reference material
Most of the figures/content used in this material are redrawn, some
of the figures/pictures are downloaded from the Internet.
This material is not for commercial purpose.
This material is prepared based on Digital Signal Processing for
ECE/TCE course as per Visvesvaraya Technological University (VTU)
syllabus (Karnataka State, India).

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 2 / 94
Unit 7 Syllabus

Unit 7: FIR Filter Design:

PART-B-Unit 7: FIR Filter Design:

Introduction to FIR Filters


Design of FIR Filters using
1 Rectangular window
2 Hamming window
3 Hanning window
4 Bartlet window
5 Kaiser window
Design of FIR Filter using frequency sampling technique.

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 3 / 94
FIR Filter Design Introduction

Advantages of the FIR digital filter


Relatively easy to design and computationally more efficient.
FIR filters are implemented in hardware or software.
The phase response is linear. Linear phase property implies that the phase is a linear
function of the frequency. FIR filter output is delayed by the same amount of time for all
frequencies, thereby eliminating the phase distortion (Group delay).
FIR filters are always stable i.e. for a finite input, the output is always finite.
In linear phase, for the filter of length N the number of operations are of the order of N/2.
Disadvantages of the FIR digital filter (compared to IIR filters)
They require more memory and/or calculation to achieve a given filter response
characteristic. Also, certain responses are not practical to implement with FIR filters.
For a desired frequency response, with tight constraints on the passband, transition band
and the stopband, a FIR filter may have large number of coefficients, thereby have more
arithmetic operations and hardware components.

An LTI system is causal iff


Input/output relationship: y [n] depends only on current and past input signal values.
Impulse response: h[n] = 0 for n < 0
System function: number of finite zeros ≤ number of finite poles.

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 4 / 94
FIR Filter Design Introduction

An ideal lowpass filter is given by


H d ( e jω )
 1
1 |ω| ≤ ωc
H(ω) =
0 ωc < |ω| ≤ π

−π −ωc 0 ωc π ω
The impulse response is given by
Figure 1: Ideal low pass filter
Zωc ( ωc
1 π
n=0
h(n) = H(ω)e jωn dω = ωc sin(ωc n)
2π π ωc n
n 6= 0
−ωc

Paley-Wiener Theorem:
If h(n) has finite energy and h(n) = 0 for n < 0
then

| ln |H(ω)||dω < ∞ Figure 2: Unit sample response
−π

H(ω) can be zero at some frequencies. but it cannot be zero over any finite of
frequencies, since the integral then becomes infinite.
H(ω) cannot be exactly zero over any band of frequencies. (Except in the trivial case where h[n]
= 0.) Furthermore, |H(ω)| cannot be flat (constant) over any finite band.

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 5 / 94
FIR Filter Design Introduction

Magnitude Characteristic of FIR filter


The magnitude response can be expressed as

1 − δ1 ≤ |H(ω)|1 + δ1 for 0 ≤ ω ≤ ωp
Magnitude =
0 ≤ |H(ω)δ2 for ωs ≤ ω ≤ π

Approximate formula for order N is


δ1 ‐‐Passband ripple
−10log10 (δ1 δ2 ) − 15 δ2 ‐‐ Stopband ripple
N= ωp‐‐Passband edge frequency
14∆f ωs‐‐Stopband edge frequency
ω −ω
where ∆f = s2π p = fs − fp
Approximate formula for order N is

N=k
ωs − ωp
The width of the main lobe is
N = k 2π
M
Figure 3: Magnitude Specification of FIR

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 6 / 94
FIR Filter Design Introduction

Ideal filters are noncausal, hence physically unrealizable for real time signal processing
applications.
Causality implies that the frequency response characteristic H(ω) of the filter cannot be
zero, except at finite set of points in the frequency range. And also H(ω) cannot have an
infinitely sharp cutoff from passband to stopband, that is H(ω) cannot drop from unity to
zero abruptly.
It is not necessary to insist that the magnitude be constant in the entire passband of the
filter. A small amount of ripple in the passband is usually tolerable.
The filter response may not be zero in the stopband, it may have small nonzero value or
ripple.
The transition of the frequency response from passband to stopband defines transition
band.
The passband is usually called bandwidth of the filter.
The width of transition band is ωs − ωp where ωp defines passband edge frequency and ωs
defines stopband edge frequency.
The magnitude of passband ripple is varies between the limits 1 ± δ1 where δ1 is the ripple
in the passband
The ripple in the stopand of the filter is denoted as δ2

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 7 / 94
FIR Filter Design FIR Filter Design

FIR Filter Design

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 8 / 94
FIR Filter Design FIR Filter Design

An FIR system does not have feedback. Hence y (n − k) term is absent in the system. FIR
output is expressed as
M
X
y (n) = bk x(n − k)
k=0

If there are M coefficients then


M−1
X
y (n) = bk x(n − k)
k=0

The coefficients are related to unit sample response as



bn for 0≤n ≤M −1
h(n) =
0 otherwise

Expanding the summation


y (n) = b0 x(n) + b1 x(n − 1) + b2 x(n − 2) + . . . b(M−1) x(n − M + 1)

Since h(n) = bn then y(n) is


M−1
X
y (n) = h(k)x(n − k)
k=0

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 9 / 94
FIR Filter Design Symmetric and Antisymmetric FIR Filters

Symmetric and Antisymmetric FIR Filters Linear Phase


FIR structure

Linear phase is a property of a filter, where the phase response of the filter is a linear
function of frequency. The result is that all frequency components of the input signal are
shifted in time (usually delayed) by the same constant amount, which is referred to as the
phase delay. And consequently, there is no phase distortion due to the time delay of
frequencies relative to one another.
Linear-phase filters have a symmetric impulse response.
The FIR filter has linear phase if its unit sample response satisfies the following condition:

h(n) = h(M − 1 − n) n = 0, 1, 2, . . . , N − 1

The Z transform of the unit sample response is given as

M−1
X
H(z) = h(n)z −n
n=0

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 10 / 94
FIR Filter Design Symmetric and Antisymmetric FIR Filters

Symmetry: h(n)=h(M-1-n) Odd M Symmetry: h(n)=h(M-1-n) Even M


h[n] h[n]

-2 -1 0 1 2 3 4

-2 -1 0 1 2 3 4
0 1 2 3 4 5 6 7 8 n 0 1 2 3 4 5 6 7 8 n

Center of Symmetry Center of Symmetry

Antisymmetry: h(n)=-h(M-1-n) Odd M Antisymmetry: h(n)=-h(M-1-n) Even M


h[n] h[n]
-2 -1 0 1 2 3 4

-2 -1 0 1 2 3 4
0 1 2 3 4 5 6 7 8 n 0 1 2 3 4 5 6 7 8 n

Center of Symmetry
Center of Symmetry

Figure 4: Symmetric and antisymmetric responses

The unit sample response of FIR filter is symmetric if h(n) = h(M − 1 − n)


The unit sample response of FIR filter is antisymmetric if h(n) = −h(M − 1 − n)
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 11 / 94
FIR Filter Design Symmetric and Antisymmetric FIR Filters

Frequency response of Linear Phase FIR Filter: Symmetric with M=odd


M−1
X
H(z) = h(n)z −n Symmetry: h(n)=h(M-1-n) Odd M Sy
h[n] h
n=0

-2 -1 0 1 2 3 4

-2 -1 0 1 2 3 4
Symmetric impulse response with M=odd Then
h(n) = h(M − 1 − n) and (z = e jω )

    (M−3)/2 0 1 2 3 4 5 6 7 8 n
M −1 M−1 X h i
H(z) = h z 2 + h(n) z −n + z −(M−1−n)
2 n=0 Center of Symmetry

M−3 Antisymmetry: h(n)=-h(M-1-n) Odd M An


    2
M −1 −jω M−1 X h h[n]
i h[
H(e jω ) = h e 2 + h(n) e −jωn + e −jω(M−1−n)
2 n=0

-2 -1 0 1 2 3 4

-2 -1 0 1 2 3 4
M−1 M−1 M−1 M−1
e −jωn = e −jωn e jω( 2
)
e −jω( 2
)
= e jω( 2
−n)
.e −jω( 2
)

−jω( M−1 −jω( M−1 M−1 M−1


e −jω(M−1−n) = e −jω(M−1) e jωn = e 2
)
.e 2
)
e jωn = 0e −jω( ) −jω(
1 2 3 24 5.e6 7 8 2n
−n)

    M−1   
−jω M−1 jω −n −jω M−1 −n
e −jωn + e −jω(M−1−n) = e 2 e 2 +e 2 Center of Symmetry

   
−jω M−1 M −1
= e 2 2cosω −n
2

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 12 / 94
FIR Filter Design Symmetric and Antisymmetric FIR Filters

M−3
2
M − 1 −jω( M−1 ) X
H(e jω
) = h( )e 2 + h(n)[e −jωn + e −jω(M−1−n) ]
2 n=0
M−3
    2    
M −1 −jω M−1 X M −1
−jω M−1
= h e 2 + h(n)e −n2 2cosω
2 n=0
2
 M−3

    2  
−jω M−1 M − 1 X M − 1
= e 2
h +2 h(n)cos ω −n 
 
2 n=0
2

H(ω) = |H(ω)|e j∠H(ω)

M−3
  2  
M −1 X M −1
|H(ω)| = h +2 h(n)cos ω −n
2 n=0
2

  
 −ω M−1 for |H(ω)| > 0
2
∠H(ω) =  
 −ω M−1 + π for |H(ω)| < 0
2

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 13 / 94
FIR Filter Design Symmetric and Antisymmetric FIR Filters

Frequency response of Linear Phase FIR Filter: Symmetric with M=Even


 
M −1
  2  
−jω M−1  X M −1
H(ω) = e 2
2 h(n)cos ω −n 

n=0
2
Symmetry: h(n)=h(M-1-n) Odd M Symmetry: h(n)=h(M-1-n) Even M
h[n] h[n]

-2 -1 0 1 2 3 4

-2 -1 0 1 2 3 4
H(ω) = |H(ω)|e j∠H(ω)

M −1
2  0 1 2 3 4 5
6 7 8 n 0 1 2 3 4 5 6 7 8 n
X M −1
|H(ω)| = 2 h(n)cos ω −n
n=0
2
Center of Symmetry Center of Symmetry
  
 −ω M−1 for |H(ω)| > 0
Antisymmetry: h(n)=-h(M-1-n) Odd M Antisymmetry: h(n)=-h(M-1-n) Even M
2
∠H(ω) =   h[n] h[n]
 −ω M−1 + π for |H(ω)| < 0
2
-2 -1 0 1 2 3 4

-2 -1 0 1 2 3 4
0 1 2 3 4 5 6 7 8 n 0 1 2 3 4 5 6 7 8 n

Center of Symmetry
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter
CenterDesign
of Symmetry October 25, 2016 14 / 94
FIR Filter Design Design of linear-phase FIR filters using windows

Design of linear-phase FIR filters using windows

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 15 / 94
FIR Filter Design

Design steps for Linear Phase FIR Filter (Fourier Series method)
1 Based on the desired frequency response specification Hd (e jω ) determine the
corresponding unit sample response hd (n).


X
Hd (e jω ) = hd (n)e −jωn
n=0

2 Obtain the impulse response hd (n) for the desired frequency response Hd (ω) by evaluating
the inverse Fourier transform.

1
Z π
hd (n) = Hd (e jω )e jωn dω
2π −π

3 In general the sample response hd (n) is infinite in duration and must be truncated at
some point to get an FIR filter of length M. Truncation is achieved by multiplying hd (n)
by window function.
h(n) = hd (n)w (n)
where w (n) is window function
4 Obtain the H(z) for h(n) by taking z transform
5 Obtain the magnitude response |H(e jω )| and phase response θ(ω)|

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 16 / 94
FIR Filter Design

Low-pass filter is used to eliminate high-frequency fluctuations (eg. noise filtering,


demodulation, etc.)
High-pass filter is used to follow small-amplitude high-frequency perturbations in presence
of much larger slowly-varying component (e.g. recording the electrocardiogram in the
presence of a strong breathing signal)
Band-pass is used to select a required modulated carrier signal (e.g. radio)
Band-stop filter is used to eliminate single-frequency (e.g. mains) interference (also
known as notch filtering)

H d (ω ) H d (ω )

1 1

ω ω
0 ωp π 0 ωp π
Low pass Filter High pass Filter

H d (ω ) H d (ω )

1 1

ω π
ω
0 ω1 ω2 π 0 ω1 ω2 ω3 ω4
Band pass Filter Band stop pass Filter

Figure 5: Frequency response characteristic of different types of filters


Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 17 / 94
FIR Filter Design

Different Types of Windows


Rectangular:
Hanning
Hamming:
Blackman:
Bartlett (Triangular) Window
Kaiser window

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 18 / 94
FIR Filter Design Window Design Techniques

Rectangular window
wR (n)

This is the simplest window function


but provides the worst performance
from the viewpoint of stopband 0 1 2 3 4 5 6 M-1
n

attenuation.
The width of main lobe is 4π/N Figure 6: Rectangular window


1 for n = 0, 1, M − 1
ωR (n) =
0 otherwise

Magnitude response of rectangular


window is

| sin( ωM
2
)|
|WR (ω)| =
| sin( ω2 )|

Figure 7: Rectangular window


Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 19 / 94
FIR Filter Design Window Design Techniques

Bartlett (Triangular) Window


wT (n)

n
0 1 2 3 4 5 6 M-1

Figure 8: Bartlett window


Bartlett Window is also Triangular
window.
The width of main lobe is 8π/M
M−1
2|n − 2
|
ωT (n) = 1 −
M −1

Figure 9: Bartlett window

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 20 / 94
FIR Filter Design Window Design Techniques

Hanning window

This is a raised cosine window function given by:


  
1 2πn
w (n) = 1 − cos
2 M −1
 
2π 2π
W (ω) ≈ 0.5WR (ω) + 0.25 WR (ω − ) + WR (ω + )
M M

The width of main lobe is: M

wH (n)

n
0 1 2 3 4 5 6 M-1

Figure 10: Hanning window


Figure 11: Hanning window

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 21 / 94
FIR Filter Design Window Design Techniques

Hamming window
This is a modified version of the raised cosine window
  
2πn
w (n) = 0.54 − 0.46 cos
M −1
 
2π 2π
W (ω) ≈ 0.54WR (ω) + 0.23 WR (ω − ) + WR (ω + )
M M

The width of main lobe is: M

wH (n)

n
0 1 2 3 4 5 6 M-1

Figure 12: Hamming window


Figure 13: Hamming window

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 22 / 94
FIR Filter Design Window Design Techniques

Blackman window
This is a 2nd -order raised cosine window.
    
2πn 4πn
w (n) = 0.42 − 0.5 cos + 0.08 cos
M −1 M −1

2π 2π
 
W (ω) ≈ 0.42WR (ω) + 0.25 WR (ω − M
) + WR (ω + M
)
+0.04 WR (ω − 4π ) + WR (ω + 4π

M M
)

The width of main lobe is: 12π


M
wT (n)

n
0 1 2 3 4 5 6 M-1

Figure 14: Blackman window Figure 15: Blackman window

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 23 / 94
FIR Filter Design Window Design Techniques

Kaiser window
This is one of the most useful and optimum windows.
r !
 2
2n
I0 β 1− 1− M−1
w (n) =
I0 (β)
Where I0 (X ) is the modified zero-order Bessel function, and is a parameter that can be chosen
to yield various transition widths and stop band attenuation. This window can provide different
transition widths for the same N.

β = 0 → rectangularwindow
β = 5.44 → Hammingwindow
β = 8.5 → Blackmanwindow

wH (n)

n
0 1 2 3 4 5 6 M-1

Figure 16:
Dr. Manjunatha. P Kaiser windowUNIT - 7: FIR Filter DesignFigure 17: Kaiser
(JNNCE) window
October 25, 2016 24 / 94
FIR Filter Design Window Design Techniques

Table 1: Window and its functions


Window name Window Function

1 for 0 ≤ n ≤ M − 1
Rectangular ωR (n) =
0 otherwise
2|n− M−1
2
|
Triangular ωT (n) = 1 − M−1
(Bartlet) h  i
2πn
Hamming w (n) = 0.54 − 0.46 cos N−1
h  i
2πn
Hanning w (n) = 0.5 − 0.5 cos N−1
h    i
2πn 4πn
Blackman w (n) = 0.42 − 0.5 cos N−1 + 0.08 cos N−1

Table 2: Summary of window function characteristics


Window Transition Min. stopband Peak value
name width of main attenuation of side lobe
lobe

Rectangular M+1
-21 dB -21 dB

Hanning M
-44 dB -31 dB

Hamming M
-53 dB -41 dB

Bartlett M
-25 dB -25 dB
12π
Blackman M
-74 dB -57 dB
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 25 / 94
FIR Filter Design Window Design Techniques

Gibbs Phenomenon
The magnitude of the frequency response H(ω) is as shown in Figure. Large oscillations
or ripples occur near the band edge of the filter. The oscillations increase in frequency as
M increases, but they do not dimmish in amplitude.
These large oscillations are due to the result of large sidelobes existing in the frequency
characteristic W (ω) of the rectangular window.
The truncation of the Fourier series is known to introduce ripples in the frequency
response characteristic H(ω) due to the nonuniform convergence of the Fourier series at a
discontinuity.
The oscillatory behavior near the band edge of the filter is called the Gibbs Phenomenon.
To alleviate the presence of large oscillations in both the passband and the stopband
window function is used that contains a taper and decays toward zero gradually .

Figure 19: LPF designed with Hamming,


Figure 18: LPF designed with Hanning and Blackman window M=61
rectangular window M=61 and 101
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 26 / 94
FIR Filter Design Low Pass FIR Filter Design

Design a LPF using rectangular window for the desired frequency response of a low pass filter
given by ωc = π2 rad/sec, and take M=11. Find the values of h(n). Also plot the magnitude
response.
Solution:

H d (e jω )
1
 e −jωτ − ωc ≤ ω ≤ ωc


Hd (e ) = 0 − π ≤ ω ≤ −ωc
0 ωc ≤ ω ≤ π

ω
−π −
π
0 π π
M −1 2 2
τ = =5
2
 −jωτ Figure 20: Frequency response of LPF
e − ωc ≤ ω ≤ ωc
Hd (e jω ) =
0 Otherwise
By taking inverse Fourier transform
" # ωc
Z π 1 e jω(n−τ )
1 hd (n) =
hd (n) = Hd (e jω )e jωn dω 2π j(n − τ )
2π −π −ωc

1
Z ωc 1 h i
= e −jωτ e jωn dω = e jωc (n−τ )
− e −jωc (n−τ )
2π −ωc 2jπ(n − τ )
" #
e jωc (n−τ ) − e −jωc (n−τ )
Z ωc
1 1
= e jω(n−τ ) dω =
2π −ωc π(n − τ ) 2j

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 27 / 94
FIR Filter Design Low Pass FIR Filter Design

sin [ωc (n − τ )] π(2−5)


hd (n) = sin
π(n − τ ) hd (2) = 2
= −0.106
π(2 − 5)
π M−1
for n 6= 5 and ωc = 2
, τ = 2
=5 π(3−5)
sin 2
hd (3) = =0
h
π(n−5)
i π(3 − 5)
sin [ωc (n − 5)] sin 2 π(4−5)
hd (n) = = sin 2
π(n − 5) π(n − 5) hd (4) = = .318
π(4 − 5)
π(5−5)
for n=5 hd (n) = 00 . Using L Hospital’s Rule sin 2
hd (5) = = .5
π(5 − 5)
sin Bθ π(6−5)
lim =B sin 2
θ→0 θ hd (6) = = .318
π(6 − 5)
π π(7−5)
sin 2
(n − 5) π/2 sin 2
lim = = 0.5 hd (7) = = 0.0
n→5 π(n − 5) π π(7 − 5)
π(8−5)
where π = 3.1416 sin 2
hd (8) = = −.106
π(8 − 5)
π(0−5)
sin 2 π(9−5)
hd (0) = = 0.0637 sin 2
π(0 − 5) hd (9) = =0
π(9 − 5)
π(1−5)
sin 2 π(10−5)
hd (1) = =0 sin 2
π(1 − 5) hd (10) = = .063
π(10 − 5)
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 28 / 94
FIR Filter Design Low Pass FIR Filter Design

The given window is rectangular window



1 for 0 ≤ n ≤ 10
ω(n) =
0 Otherwise
This is rectangular window of length M=11. h(n) = hd (n)ω(n) = hd (n) for 0 ≤ n ≤ 10
M−1
X 10
X
H(z) = h(n)z −n = h(n)z −n
n=0 n=0

The impulse response is symmetric with M=odd=11


M−3
  2
M −1 M−3 X
H(z) = h z 2 + h(n)[z −n + z (M−1−n) ]
2 n=0

= h(5)z −5 + h(0)[z −0 + z −10


] + h(1)[z −1 + z −9 ] + h(2)[z −2 + z −8 ] +
−3 −7 −4
= +h(3)[z +z ] + h(4)[z + z −6 ]

M−3
  2  
M −1 X M −1
|H(e jω )| = h +2 h(n)cos ω −n
2 n=0
2
4
X
= h(5) + 2 h(n)cos ω(5 − n)
n=0
= h(5) + 2h(0)cos 5ω + 2h(1)cos 4ω + 2h(2)cos 3ω + 2h(3)cos 2ω + 2h(4)cos ω
= 0.5 + 0.127cos 5ω − 0.212cos 3ω + 0.636cos ω
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 29 / 94
FIR Filter Design Low Pass FIR Filter Design

|H(e jω )| = 0.5 + 0.127cos 5ω − 0.212cos 3ω + 0.636cos ω

|H(e jω )|dB = 20log |H(e jω )| 10

ω |H(e jω )| |H(e jω )|dB


−10
0 1.0151 -0.44
0.1π 0.9808 -0.17

|H(ejw)|dB
−20
0.2π 0.9535 -0.41
0.3π 1.0758 0.63 −30

0.4π 0.9952 -0.04


−40
0.5π 0.5 -6.02
0.6π 0.0048 -46.37 −50
0.7π 0.0758 -22.41
0.8π 0.0467 -26.65 −60
0 0.5 1 1.5 2 2.5 3 3.5
0.9π 0.0192 -34.35 ω, 0 to π in radians
1.0π 0.0512 -25.74
Figure 21: Frequency response of LPF

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 30 / 94
FIR Filter Design Low Pass FIR Filter Design

The desired frequency response of low pass filter is given by


− 3π ≤ ω ≤ 3π
 −j3ω
e
Hd (e jω ) = 3π
4 4
0 4
≤ |ω| ≤ π
Determine the frequency response of the FIR if Hamming window is used with N=7 June-2015,
Dec-2014, June-2012
Solution:

M −1
τ = =3
2

Z π
1
hd (n) = Hd (e jω )e jωn dω
2π −π H d (e jω )
Z ωc 1
1
= e −jωτ e jωn dω
2π −ωc
ω
Z ωc
1 3π 3π
= e jω(n−τ ) dω −π − 0 π
2π −ωc 4 4
" # ωc
1 e jω(n−τ )
=
2π j(n − τ )
−ωc
sinωc (n − τ )
hd (n) =
" #
1 e jωc (n−τ ) − e −jωc (n−τ ) π(n − τ )
=
π(n − τ ) 2j

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 31 / 94
FIR Filter Design Low Pass FIR Filter Design

 
3π(0−3)
sin 4
hd (0) = = 0.075
π(0 − 3)
 
3π(1−3)
sin 4
hd (1) = = −0.159
π(1 − 3)
3π M−1
n 6= 3 ωc = τ = =3
 
4 2 3π(2−3)
sin 4
hd (2) = = 0.225
h
3π(n−3)
i π(2 − 3)
sin 4  
hd (n) = 3π(3−3)
sin
π(n − 3) 4
hd (3) = = 0.75
π(3 − 3)
for n=3 hd (n) = 00 . Using L Hospital’s Rule
 
3π(4−3)
sin 4
hd (4) = = 0.225
sin
 3π
(n − 3)
 π(4 − 3)
4 3π/4
lim = = 0.75 
3π(5−3)

n→3 π(n − 3) π sin 4
hd (5) = = −0.159
π(5 − 3)
 
3π(6−3)
sin 4
hd (6) = = 0.075
π(6 − 3)

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 32 / 94
FIR Filter Design Low Pass FIR Filter Design

The given window is Hamming window

 
2πn
w (n) = 0.54 − 0.46cos
M −1 To calculate the value of h(n)
 
0
ω(0) = 0.54 − 0.46cos = 0.08 h(n) = hd (n)w (n)
6
 

ω(1) = 0.54 − 0.46cos = .31
6
  h(0) = hd (0)w (0) = 0.075 × 0.08 = 0.006

ω(2) = 0.54 − 0.46cos = .77 h(1) = hd (1)w (1) = −0.159 × 0.31 = −0.049
6
  h(2) = hd (2)w (2) = 0.225 × 0.77 = 0.173

ω(3) = 0.54 − 0.46cos =1 h(3) = hd (3)w (3) = 0.750 × 1 = 0.750
6
 
8π h(4) = hd (4)w (4) = 0.225 × 0.77 = 0.173
ω(4) = 0.54 − 0.46cos = 0.77 h(5) = hd (5)w (5) = −0.159 × 0.31 = −0.049
6
h(6) = hd (6)w (6) = 0.075 × 0.08 = 0.006
 
10π
ω(5) = 0.54 − 0.46cos = .31
6
 
12π
ω(6) = 0.54 − 0.46cos = .08
6

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 33 / 94
FIR Filter Design Low Pass FIR Filter Design

The frequency response is symmetric with M=odd=7


M−3
  2  
jω M −1 X M −1
|H(e )| = h +2 h(n)cos ω −n
2 n=0
2
2
X
= h(3) + 2 h(n)cos ω(3 − n) = h(3) + 2h(0)cos 3ω + 2h(1)cos 2ω + 2h(2)cos ω
n=0
= 0.75 + 0.012cos 3ω − 0.098cos 2ω + 0.346cos ω

|H(e jω )|dB = 20log |H(e jω )| 2

ω |H(e jω )| |H(e jω )|dB


−2
0 1.0100 0.0864
0.1π 1.0068 0.0592

|H(ejw)|dB
−4
0.2π 0.9959 -0.0354
0.3π 1.9722 -0.2445 −6

0.4π 0.9265 -0.6631


−8
0.5π 0.8480 -1.4321
0.6π 0.7321 -2.7089 −10
0.7π 0.5883 -4.6077
0.8π 0.4435 -7.0620 −12
0 0.5 1 1.5 2 2.5 3 3.5
0.9π 0.3346 -9.5095 ω, 0 to π in radians
1.0π 0.2940 -10.6331
Figure 22: Frequency response of LPF
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 34 / 94
FIR Filter Design Low Pass FIR Filter Design

Matlab code
clc; clear all; close all;
M= input(’enter the value of M:’);
omega= input(’enter the value of omega:’);
tau=(M-1)/2 ;
for n=0:M-1;
% c(n+1)=.5-.5*cos((2*pi*n)/(M-1));
c(n+1)=.54-.46*cos((2*pi*n)/(M-1));
if n==tau
h(n+1)=omega/pi;
else
h(n+1)=sin(omega*(n-tau))/(pi*(n-tau));
end
end
h
c
for n=1:M
y=h(n)*c(n)’
end

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 35 / 94
FIR Filter Design Low Pass FIR Filter Design

clc; clear all; close all;


range=0;
%M= input(’enter the value of M:’);
for omega=0:.1*pi:pi
range=range+1;
H_omega=abs(0.75+.012*cos(3*omega)-.098*cos(2*omega)+.346*cos(omega));
%H_omega=abs(0.25+.45*cos(omega)+.318*cos(2*omega));
H_indB(range)=20*log10(H_omega)
end
omega=0:.1*pi:pi;
i=1:range;
plot(omega, H_indB(i),’linewidth’,2 )
xlabel(’\omega, 0 to \pi in radians’,’fontsize’,13)
ylabel(’ |H(e^{jw})|_{dB}’,’fontsize’,13)

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 36 / 94
FIR Filter Design Low Pass FIR Filter Design

Determine the filter coefficients hd (n) for the desired frequency response of a low pass filter
given by
for − π4 ≤ ω ≤ π4
 −2jω
e
Hd (e jω ) =
0 for π4 ≤ |ω| ≤ −π
If we define the new filter coefficients by hd (n) = hd (n)ω(n) where

1 for 0 ≤ n ≤ 4
ω(n) =
0 otherwise

Determine h(n) and also the frequency response H(e jω ) July-2013, July-2011
Solution:
π H d (e jω )
Z
1
hd (n) = Hd (e jω )e jωn dω 1
2π −π

1
Z π/4
= e −j2ω e jωn dω π ω
2π −π/4 −π − 0 π π
4 4
1
Z π/4
= e jω(n−2) dω
2π −π/4
" #π/4
1 e jω(n−2) 1 h π π
i
= hd (n) = e j 4 (n−2) − e −j 4 (n−2)
2π j(n − 2) 2jπ(n − 2)
−π/4 " π π #
1 e j 4 (n−2) − e −j 4 (n−2)
=
π(n − 2) 2j

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 37 / 94
FIR Filter Design Low Pass FIR Filter Design

The given window function is



1 for 0 ≤ n ≤ 4
n 6= 2 ω(n) =
π(n−2) 0 Otherwise
sin 4
hd (n) =
π(n − 2) This is rectangular window of length M=5.
In this case h(n) = hd (n) for 0 ≤ n ≤ 4
for n=2 hd (n) = 00 . Using L Hospital’s Rule

π n hd (n) n hd (n)
sin 4
(n − 2) π/4
lim = = 0.25 0 0.159091 3 0.224989
n→2 π(n − 2) π 1 0.224989 4 0.159091
2 0.25

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 38 / 94
FIR Filter Design Low Pass FIR Filter Design

The frequency response is symmetric with M=odd=5


M−3
  2  
jω M −1 X M −1
|H(e )| = h +2 h(n)cos ω −n
2 n=0
2
1
X
= h(2) + 2 h (2 − n) cos ωn = h(2) + 2h(0)cos 2ω + 2h(1)cos ω
n=0
= 0.25 + 0.318cos 2ω + 0.45cos ω

|H(e jω )|dB = 20log |H(e jω )| 10

ω |H(e jω )| |H(e jω )|dB


−10
0 1.0180 0.1550
0.1π 0.9352 -0.5815

|H(ejw)|dB
−20
0.2π 0.7123 -2.9464
0.3π 0.4162 -7.6132 −30

0.4π 0.1318 -17.6023


−40
0.5π 0.0680 -23.3498
0.6π 0.1463 -16.6936 −50
0.7π 0.1128 -18.9561
0.8π 0.0158 -36.0322 −60
0 0.5 1 1.5 2 2.5 3 3.5
0.9π 0.0793 -22.0154 ω, 0 to π in radians
1.0π 0.1180 -18.5624
Figure 23: Frequency response of LPF
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 39 / 94
FIR Filter Design Low Pass FIR Filter Design

Design the symmetric FIR lowpass filter whose desired frequency response is given as

e −jωτ

for |ω| ≤ ωc
Hd (ω) =
0 Otherwise

The length of the filter should be 7 and ωc = 1 radians/sample. Use rectangular window.

Solution:
Desired frequency response Hd (ω)
Length of the filter M=7 H d (e jω )
1
Cut-off frequency ωc = 1 radians/sample.
Unit sample response is defined as
Z π ω
1 −π π
hd (n) = Hd (e jω )e jωn dω −1 0 1
2π −π
Given Hd (ω) is Figure 24: Frequency response of
LPF
e −ωτ

for − 1 ≤ ω ≤ 1
Hd (ω) =
0 Otherwise

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 40 / 94
FIR Filter Design Low Pass FIR Filter Design

Z 1 Determine the value of τ


1
hd (n) = e −ωτ e jωn dω
2π −1 M −1
τ = =3
1
Z 1 2
jω(n−τ )
= e dω

(
−1 sin(n−3)
π(n−3)
for n 6= τ
" #1 hd (n) = 1
1 e ω(n−τ ) π
for n = τ
=
2π j(n − τ )
−1 This is rectangular window of length M=7.
sin(n − τ ) In this case h(n) = hd (n).w (n) = hd (n)
= for n 6= τ
π(n − τ )
n h(n) n h(n)
for n = τ hd (n) = 00 . Using L Hospital’s 0 0.015 4 0.2678
Rule 1 0.1447 5 0.14472
sin(n − τ ) 1 2 0.2678 6 0.15
lim =
n→τ π(n − τ ) π 3 0.3183

Thus hd (n) is
This is the unit sample response of required
(
sin(n−τ ) FIR filter. The filter is symmetric and satis-
for n 6= τ
hd (n) = π(n−τ ) fies h(n) = h(M − 1 − n)
1
π
for n = τ

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 41 / 94
FIR Filter Design Low Pass FIR Filter Design

Design the FIR filter using Hanning window


Solution:For M=7

2πn
ω(n) = 0.5(1 − cos )
M −1
2πn
ω(n) = 0.5(1 − cos )
6
To calculate the value of h(n)

h(n) = hd (n)w (n)

ω(0) = 0.0
2π h(0) = hd (0)w (0) = 0.01497 × 0 = 0
ω(1) = 0.5(1 − cos ) = .25
6 h(1) = hd (1)w (1) = 0.014472 × 0.25 = 0.03618

ω(2) = 0.5(1 − cos ) = .75 h(2) = hd (2)w (2) = 0.26785 × 0.75 = 0.20089
6
6π h(3) = hd (3)w (3) = 0.31831 × 1 = 0.31831
ω(3) = 0.5(1 − cos )=1 h(4) = hd (4)w (4) = 0.26785 × 0.75 = 0.20089
6
8π h(5) = hd (5)w (5) = 0.14472 × 0.25 = 0.03618
ω(4) = 0.5(1 − cos ) = .75
6 h(6) = hd (6)w (6) = 0.014497 × 0.0 = 0
10π
ω(5) = 0.5(1 − cos ) = .25
6
12π
ω(6) = 0.5(1 − cos )=0
6

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 42 / 94
FIR Filter Design Low Pass FIR Filter Design

Design a lowpass digital filter to be used in an A/D Hz D/A structure that will have a -3 dB
cut-off at 30 π rad/sec and an attenuation of 50 dB at 45 π rad/sec. The filter is required to
have linear phase and the system will use sampling rate of 100 samples/second.

Solution:
3 dB cut-off at 30 π rad/sec
ωc = 30πrad/sec
Sampling frequency FSF = 100 Hz
Stopband attenuation of 50 dB at 45 π rad/sec
As =50 dB for ωs = 45πrad/sec H d (e jω )
ω = FΩ 1
sf

ω1 =
Ω1
=
30π
= 0.3π rad/sample ω
Fsf 100 −π −0.3π 0 0.3π π
Ω2 45π
ω2 = = = 0.45π rad/sample Figure 25: Frequency response of LPF
Fsf 100

3 dB attenuation at ω1 = 0.3π rad/sample


50 dB attenuation at ω2 = 0.45π rad/sample

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 43 / 94
FIR Filter Design Low Pass FIR Filter Design

Type of window is
The stopband attenuation of 50 dB
e −jωτ

is provided by the Hamming window for − ωc ≤ ω ≤ ωc
Hd (ω) =
which of -53 dB. Hence Hamming win- 0 Otherwise
dow is selected for the given specifica-
tions. τ = (M − 1)/2 = 55 − 1/2 = 27
To determine the order of the filter ωc = 0.3π
The width of the main lobe in Ham-
1
Z ωc
ming window is 8πM hd (n) = e −jωτ e jωn dω
2π −ωc
2π 8π Z 0.3π
k = 1
M M = e jω(n−27) dω
2π −0.3π
8π " #0.3π
M= 1 e ω(n−27)
ω2 − ω1 =
2π j(n − 27)
The order of the filter M is: −0.3π
sin[ωc (n − 27)]
8π = for n 6= 27
M= = 53.33 π(n − 27)
0.45π − 0.3π
when n = 27
Assume linear phase FIR filter of odd
length Hence select next odd integer ωc
hd (n) = = 0.3
length of 55. π

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 44 / 94
FIR Filter Design Low Pass FIR Filter Design

n h(n) n h(n)
The selected window is Hamming M=27 0 0.0 28 0.2567
1 0.0 29 0.1495
2 -0.0012 30 0.0319
  3 0.0 31 -0.0445
2πn 4 0.0 32 -0.0588
w (n) = 0.54 − 0.46cos 5 0.0021 33 - 0.0278
M −1 6 0.0023 34 0.012
 πn 
7 0.0 35 0.0308
= 0.54 − 0.46cos 8 -0.0036 36 0.0220
18 9 -0.0052 37 -0.0
10 -0.0021 38 -0.0157
The value of h(n) 11 0.0048 39 -0.0156
12 0.0098 40 -0.0043
13 0.0069 41 0.0069
h(n) = hd (n)w (n) 14 -0.0043 42 0.0098
15 -0.0156 43 0.0048
16 -0.0157 44 -0.0021
for M= 27 17 0.0 45 -0.0052
18 0.0220 46 -0.0036
19 -0.0308 47 0.0
sin[0.3π(n − 27)] h  πn i
20 -0.0120 48 0.0023
h(n) = 0.54 − 0.46cos
π(n − 27) 18 21 -0.0278 49 0.0021
22 -0.0588 50 0.0
23 -0.0445 51 0.0
for n 6= 27 24 0.0319 52 -0.0012
25 0.1495 53 0.0
h  πn i 26 0.2567 54 0.0
h(n) = 0.3 0.54 − 0.46cos 27 0.3
18

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 45 / 94
FIR Filter Design Low Pass FIR Filter Design

An analog signal contains frequencies upto 10 KHz. The signal is sampled at 50 KHz. Design
an FIR filter having linear phase characteristic and transition band of 5 KHz. The filter should
provide minimum 50 dB attenuation at the end of transition band.

Solution:
3 dB cut-off at 30 π rad/sec
Ωp = 2π × 10 × 103 rad/sec
Ωs = 2π × (10 + 5) × 103 rad/sec
Sampling frequency FSF = 100 Hz
Stopband attenuation of 50 dB at 45 π rad/sec
As =50 dB for ωs = 45πrad/sec H d (e jω )
1
ω = FΩ
sf

Ωp 2π × 10 × 103 ω
ωp = = = 0.4π −π −0.5π 0 0.5π π
Fsf 50 × 103
Ωs 2π × (10 + 5) × 103 Figure 26: Frequency response of LPF
ωs = = = 0.6π
Fsf 50 × 103

ωp = 0.4π rad/sample
ωs = 0.6π rad/sample

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 46 / 94
FIR Filter Design Low Pass FIR Filter Design

Type of window is
e −jωτ

The stopband attenuation of 50 dB for − ωc ≤ ω ≤ ωc
Hd (ω) =
is provided by the Hamming window 0 Otherwise
which of -53 dB. Hence Hamming win-
dow is selected for the given specifica- τ = (M − 1)/2 = 41 − 1/2 = 20
tions. ωc = ωp + ∆ω = 0.4π + 0.2π
2 2
To determine the order of the filter ωc = 0.5π
The width of the main lobe in Ham-
ming window is 8πM 1
Z ωc
hd (n) = e −jωτ e jωn dω
2π 8π 2π −ωc
k = Z 0.5π
M M 1
= e jω(n−20) dω
2π −0.5π

M≥ " #0.5π
ωs − ωp 1 e ω(n−27)
=
2π j(n − 20)
The order of the filter M is: −0.5π
sin[ωc (n − 20)]
8π = for n 6= 20
M≥ ≥ 40 π(n − 20)
0.6π − 0.4π
when n = 20
Assume linear phase FIR filter of odd
length Hence select next odd integer ωc 0.5π
length of 41. hd (n) = = = 0.5
π π

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 47 / 94
FIR Filter Design Low Pass FIR Filter Design

n h(n) n h(n)
The selected window is Hamming M=41
0 0.0 21 0.3148
1 -0.00146 22 0.0

2πn
 2 0.0 23 -0.1
w (n) = 0.54 − 0.46cos 3 -0.00247 24 0.0
M −1
  4 0 25 0.055
2πn 5 -0.00451 26 0.0
= 0.54 − 0.46cos
40 6 0.0 27 -0.0337
7 0.0079 28 0.0
The value of h(n) 8 0.0 29 0.0213
9 -0.0136 30 0.0
h(n) = hd (n)w (n) 10 0.0 31 -0.0136
11 0.002135 32 0.0
for M= 41 n 6= 20 12 0.0 33 0.0079
13 -0.03375 34 0
   14 0.0 35 -0.0045
sin[0.5π(n − 20)] 2πn
h(n) = 0.54 − 0.46cos 15 0.05504 36 0.0
π(n − 20) 20 16 0.0 37 0.0024
17 -0.1006 38 0.0
for n = 20 18 0.0 39 -0.0014
   19 0.3148 40 0.0
2πn 20 0.5
h(n) = 0.5 0.54 − 0.46cos
20

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 48 / 94
FIR Filter Design Low Pass FIR Filter Design

Design an FIR filter (lowpass) using rectangular window with passband gain of 0 dB, cutoff
frequency of 200 Hz, sampling frequency of 1 kHz. Assume the length of the impulse response
as 7.
Solution:
Fc = 200 Hz, Fs = 1000 Hz,
fc = FFc 1000
200
= 0.2cycles/sample
s
ωc = 2π ∗ fc = 2π × 0.2 = 0.4πrad H d (e jω )
1
M=7

ω
e −jωτ π

Hd (ω) =
for − ωc ≤ ω ≤ ωc −π −0.4π 0 0.4π
0 Otherwise
Figure 27: Frequency response of LPF
τ = (M − 1)/2 = 7 − 1/2 = 3
ωc = 0.4π
when n 6= 3
1
Z ωc
hd (n) = e −jωτ e jωn dω
2π −ωc sin[0.4π(n − 3)]
0.4π
hd (n) =
π(n − 3)
Z
1
= e jω(n−3) dω
2π −0.4π
" #0.4π when n = 3
1 e ω(n−3)
= 0.4π
2π j(n − 3) hd (n) = = 0.4
−0.4π
π

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 49 / 94
FIR Filter Design Low Pass FIR Filter Design

Determine the value of h(n)


Since it is rectangular window h(n) = w (n) = hd (n) = h(n)
For M=7
n h(n) n h(n)
0 -0.062341 4 -0.062341
1 0.093511 5 0.093511
2 0.302609 6 0.302609
3 0.4

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 50 / 94
FIR Filter Design Low Pass FIR Filter Design

Using rectangular window design a lowpass filter with passband gain of unity, cutoff frequency of
1000 Hz, sampling frequency of 5 kHz. The length of the impulse response should be 7.
DEC:2013,DEC:2012

Solution:
Fc = 1000 Hz, Fs = 5000 Hz,
fc = FFc 5000
1000
= 0.2cycles/sample
s
ωc = 2πfc = 2 × π × 0.2 = 0.4πrad
M=7
The filter specifications (ωc and M=7) are similar to the previous example. Hence same filter
coefficients are obtained.
h(0)=-0.062341, h(1)=0.093511, h(2)=0.302609
h(3)=0.4, h(4)=0.302609, h(5)=0.093511, h(6)=-0.062341

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 51 / 94
FIR Filter Design Low Pass FIR Filter Design

Design a normalized linear phase FIR low pass filter having phase delay of τ = 4 and at least 40
dB attenuation in the stopband. Also obtain the magnitude/frequency response of the filter.

Solution: The linear phase FIR filter is nor-


malized means its cut-off frequency is of ωc = H d (e jω )
1rad/sample 1
The length of the filter with given τ is related by

M −1 ω
τ = −π −1 0 1 π
2

For τ = 4 M=9
Figure 28: Frequency response of
LPF
Desired unit sample response hd (n) is

1
Z ωc when n 6= 4
hd (n) = e −jωτ e jωn dω
2π −ωc
sin[(n − 4)]
1
Z1 hd (n) =
= e jω(n−4) dω π(n − 4)
2π −1
" #1 when n = 4
1 e ω(n−4)
=
2π j(n − 4) 1
Z 1 ω 1
−1
hd (n) = 1dω = =
2π −1 π π

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 52 / 94
FIR Filter Design Low Pass FIR Filter Design

for n = 0 to 8

h(n) = hd (n)w (n)


  
sin(0 − 4) π0
h(0) = 0.5 − 0.5cos = 0.0000
The stopband attenuation required for π(0 − 4) 4
  
this filter is 40 dB. From the table the sin(1 − 4) π1
h(1) = 0.5 − 0.5cos = 0.0022
Hanning window satisfies this require- π(1 − 4) 4
ment. The Hanning window function sin(2 − 4)
  

given by: h(2) = 0.5 − 0.5cos = 0.0724
π(2 − 4) 4
  
sin(3 − 4) 3π
  h(3) = 0.5 − 0.5cos = 0.2286
2πn π(3 − 4) 4
w (n) = 0.5 − 0.5cos
M −1 sin(4 − 4)
  

h(4) = 0.5 − 0.5cos = 0.3183
π(4 − 4) 4
for n 6= 4 and M = 9   
sin(5 − 4) 5π
h(5) = 0.5 − 0.5cos = 0.2286
sin(n − 4) h  πn i π(5 − 4) 4
h(n) = 0.5 − 0.5cos   
π(n − 4) 4 sin(6 − 4) 6π
h(6) = 0.5 − 0.5cos = 0.0724
π(6 − 4) 4
for n=4 sin(7 − 4)
  

h(7) = 0.5 − 0.5cos = 0.0022
1
  
π4 1 π(7 − 4) 4
h(n) = 0.5 − 0.5cos = sin(8 − 4)
  

π 4 π h(8) = 0.5 − 0.5cos = 0.0000
π(8 − 4) 4

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 53 / 94
FIR Filter Design Low Pass FIR Filter Design

The frequency response is symmetric with M=odd=9


M−3
  2  
jω M −1 X M −1
|H(e )| = h +2 h − n cos ω
2 n=0
2
3
X
= h(4) + 2 h(n)cos ω (4 − n)
n=0
= h(4) + 2h(0)cos 4ω + 2h(1)cos 3ω + 2h(2)cos 2ω + 2h(3)cos ω
= 0.3183 + 0.044cos 3ω + 0.1448cos 2ω + 0.4572cos ω
|H(e jω )| dB = 20log |H(e jω )| 10

ω |H(e jω )| |H(e jω )|dB


−10
0 1.0180 0.1550
0.1π 0.9352 -0.5815

|H(ejw)|dB
−20
0.2π 0.7123 -2.9464
0.3π 0.4162 -7.6132 −30

0.4π 0.1318 -17.6023


−40
0.5π 0.0680 -23.3498
0.6π 0.1463 -16.6936 −50
0.7π 0.1128 -18.9561
0.8π 0.0158 -36.0322 −60
0 0.5 1 1.5 2 2.5 3 3.5
0.9π 0.0793 -22.0154 ω, 0 to π in radians
1.0π 0.1180 -18.5624
Figure 29: Frequency response of LPF
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 54 / 94
FIR Filter Design High Pass FIR Filter Design

Design a HPF using Hamming window. Given that cutoff frequency the filter coefficients hd (n)
for the desired frequency response of a low pass filter given by ωc = 1rad/sec, and take M=7.
Also plot the magnitude response.
Solution:  −jωτ
 e − π ≤ ω ≤ −ωc

Hd (e ) = e −jωτ ωc ≤ ω ≤ −π
0 − ωc ≤ ω ≤ ωc

M −1
τ = =3
2
e −jωτ

− π ≤ −ω ≤ ωc
Hd (e jω ) =
0 Otherwise
H d ( e jω )
1

1
Z π
hd (n) = Hd (e jω )e jωn dω
2π −π −ωc ωc π ω
−π 0
Z −ωc Z π
1 jω(n−τ ) jω(n−τ )
= [ e dω + e dω
2π −π ωc
" #−ωc " #π
1 e jω(n−τ ) 1 e jω(n−τ )
= +
2π j(n − τ ) 2π j(n − τ )
−π ωc
" #
1 e −jωc (n−τ ) − e −jπ(n−τ ) + e jπ(n−τ ) − e jωc (n−τ )
=
π(n − τ ) 2j

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 55 / 94
FIR Filter Design High Pass FIR Filter Design

" #
e jπ(n−τ ) − e −jπ(n−τ ) − e jωc (n−τ ) − e −jωc (n−τ )

1
hd (n) =
π(n − τ ) 2j
1
= [sinπ(n − τ ) − sinωc (n − τ ]
π(n − τ )
1
τ = 3 ωc = 1 hd (n) = π(n−3) [sinπ(n − 3) − sin(n − 3)]
when n = τ using L Hospital rule
 
1 sinπ(n − 3) sinωc (n − 3) 1 1
hd (n) = − = [π − ωc ] = [π − 1]
π (n − 3) (n − 3) π π
The given window function is Hamming window. In this case h(n) = hd (n)ω(n)) for 0 ≤ n ≤ 6
 
2πn
w (n) = 0.54 − 0.46cos
M −1
  
1 2πn
h(n) = [sinπ(n − 3) − sin(n − 3)] × 0.54 − 0.46cos
π(n − 3) M −1

n h(n) n h(n)
0 -0.00119 4 -0.00119
1 -0.00448 5 -0.00448
2 -0.2062 6 -0.2062
3 0.6816

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 56 / 94
FIR Filter Design High Pass FIR Filter Design

The magnitude response of a symmetric FIR filter with M=odd is


(M−3)
  2  
jω M −1 X M −1
|H(e )| = h +2 h(n)cosω −n
2 n=0
2

For M=7

2
X
|H(e jω )| = h (3) + 2 h(n)cosω(3 − n)
n=0
= h (3) + 2h(0)cos3ω + 2h(1)cos2ω + 2h(2)cosω
= 0.6816 − 0.000238cos3ω − 0.0896cos2ω − 0.4214cosω

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 57 / 94
FIR Filter Design Band Pass FIR Filter Design

Design the bandpass linear phase FIR filter having cut off frequencies of ωc1 = 1rad/sample and
ωc2 = 2rad/sample. Obtain the unit sample response through following window.

1 for 0 ≤ n ≤ 6
ω(n) =
0 Otherwise

Solution:
H d ( e jω )
1
e −jωτ ωc1 ≤ |ωc | ≤ ωc2

Hd (ω) =
0 Otherwise
−π −ωc 2 −ωc1 0 ωc 1 ωc 2 π ω

1
Z π
hd (n) = Hd (ω)e jωn dω
2π −π
"Z #
1 −ωc1 Z ωc2
−jωτ jωn −jωτ jωn
= e e dω + e e dω
2π −ωc2 ωc1
"Z #
1 −ωc1 Z ωc2
= e jω(n−τ ) + e jω(n−τ ) dω
2π −ωc2 ωc1
" #−ωc " #ωc 
1  e jω(n−τ ) 1
e jω(n−τ ) 2
= + 
2π (n − τ ) (n − τ )
−ωc2 ωc1

sinωc2 (n − τ ) − sinωc1 (n − τ )
= for n 6= τ
π(n − τ )
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 58 / 94
FIR Filter Design Band Pass FIR Filter Design

sinωc2 (n − τ ) − sinωc1 (n − τ )
hd (n) =
π(n − τ )
ωc2 − ωc1
= for n = τ
π

( sinωc2 (n−τ )−sinωc1 (n−τ )


π(n−τ )
for n 6= τ
hd (n) = ωc2 −ωc1
π
for n=τ

The linear phase FIR filter is normalized means its n h(n) n h(n)
cut-off frequency is of ωc = 1rad/sample 0 -0.044 4 0.0215
The length of the filter with given τ is related by 1 -0.165 5 0.265
2 0.215 6 -0.044
M −1 7−1 3 0.3183
τ = = =3
2 2

and ωc2 = 2 rad/sample ωc = 1rad/sample


(
sin2(n−3)−sin(n−3)
π(n−τ )
for n 6= 3
hd (n) = 1
π
for n = 3 for

The given window is rectangular hence

h(n) = hd (n)w (n) = hd (n)


Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 59 / 94
FIR Filter Design Band Pass FIR Filter Design

For n=0,1,2..6 estimate the FIR filter coefficients h(n).


For M=7 The magnitude response of the FIR filter is given by

M−3
  2  
M −1 X M −1
H(ω) = h +2 h(n)cos ω −n
2 n=0
2

2
X
H(ω) = h(3) + 2 h(n)cos ω (n − 3)
n=0

Estimate the H(ω) by substituting the required values in the above equation.

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 60 / 94
FIR Filter Design Band Pass FIR Filter Design

Design an ideal bandpass filter having frequency response


π 3π
Hd e (jω)
≤ |ω| ≤ for
4 4
Use rectangular window with N=11 in your design

Solution:
H d ( e jω )
1
e −jωτ ω

c1 ≤ |ωc | ≤ ωc2
Hd (ω) =
0 Otherwise
−π −ωc 2 −ωc1 0 ωc 1 ωc 2 π ω

1
Z π
hd (n) = Hd (ω)e jωn dω
2π −π
"Z #
1 −ωc1 Z ωc2
−jωτ jωn −jωτ jωn
= e e dω + e e dω
2π −ωc2 ωc1
"Z #
1 −ωc1 Z ωc2
= e jω(n−τ ) + e jω(n−τ ) dω
2π −ωc2 ωc1
" #−ωc " #ωc 
1  e jω(n−τ ) 1
e jω(n−τ ) 2
= + 
2π (n − τ ) (n − τ )
−ωc2 ωc1

sinωc2 (n − τ ) − sinωc1 (n − τ )
= for n 6= τ
π(n − τ )
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 61 / 94
FIR Filter Design Band Pass FIR Filter Design

sinωc2 (n − τ ) − sinωc1 (n − τ )
hd (n) =
π(n − τ )
ωc 2 − ωc 1
= for n = τ
π
( sinωc2 (n−τ )−sinωc1 (n−τ )
π(n−τ )
for n 6= τ
hd (n) = ωc2 −ωc1
π
for n = τ for
The length of the filter with given τ is related by

M −1 11 − 1
τ = = =5
2 2
π 3π
and ωc2 = 4
rad/sample ωc = 4
rad/sample
h i h i
 3π(n−5) π(n−5)
sin 4
−sin 4
for n 6= 5

hd (n) = π(n−5)
3π − π
4 4

π
for n = 5 for

The given window is rectangular hence

h(n) = hd (n)w (n) = hd (n)

For n=0,1,2..10 estimate the FIR filter coefficients h(n).


Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 62 / 94
FIR Filter Design Band Pass FIR Filter Design

Design a BPF using Hanning window with M=7. Given that lower cutoff frequency
ωc1 = 2rad/sec and ωc2 = 3rad/sec.
Solution:
 −jωτ
 e for − ωc2 ≤ ω ≤ −ωc1

Hd (e )= e −jωτ for ωc1 ≤ ω ≤ ωc2
0 for − ωc − ωc1 ω ≤ ωc1

M −1
τ = =3
2

The inverse transform of the Hd (e ω ) is H d ( e jω )


1

1
Z π
−π −ωc 2 −ωc1 ωc 1 ωc 2 π ω
hd (n) = Hd (e jω )e jωn dω 0
2π −π
Z −ωc1 Z ωc2
1 jω(n−τ )
= [ e dω + e jω(n−τ ) dω
2π −ωc2 ωc1
" #−ωc1 " #ωc1
1 e jω(n−τ ) 1 e jω(n−τ )
= +
2π j(n − τ ) 2π j(n − τ )
−ωc2 ωc2
1
= [sinωc2 (n − τ ) − sinωc1 (n − τ ]
π(n − τ )

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 63 / 94
FIR Filter Design Band Pass FIR Filter Design

τ = M−12
= 7−1
2
=3
ωc1 = 2 rad/sec ωc2 = 3 rad/sec
for n 6= 3

1
hd (n) = [sin3(n − 3) − sin2(n − 3)]
π(n − 3)
n h(n) n h(n)
for n = τ 0 0 4 0
  1 0.0189 5 0.0189
1 sinωc2 (n − τ ) sinωc1 (n − τ ) 2 -0.01834 6 -0.01834
hd (n) = lim − lim
π n→τ (n − τ ) n→τ (n − τ ) 3 0.3183

1 1
hd (n) = [ωc2 − ωc1 ] =
π π
The given window function is Hanning window

2πn
ω(n) = 0.5 − 0.5cos 0≤n ≤M −1
M −1
This is rectangular window of length M=11. In this case h(n) = hd (n)ω(n) = hd (n)
for 0 ≤ n ≤ 6   
sin3(n − τ ) − sin2(n − τ ) 2πn
h(n) = 0.5 − 0.5cos
π(n − 3) M −1

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 64 / 94
FIR Filter Design Band Pass FIR Filter Design

M−1
X 6
X
H(z) = h(n)z −n = h(n)z −n
n=0 n=0

= h(0) + h(1)z −1 + h(2)z −2 + h(3)z −3 + h(4)z −4 + h(5)z −5 + h(6)z −6


= 0 + 0.0189z −1 − 0.1843z −2 + 0.3183z −3 − 0.1834z −4 + 0.0189z −5 + 0
The magnitude response of a symmetric FIR filter with M=odd is
  (M−1)/2  
M −1 X M −1
|H(e jω )| = h + 2h − n cosωn
2 n=1
2
For M=7
3
X
|H(e jω )| = h (3) + 2h (3 − n) cosωn
n=1

3
X
|H(e jω )| = h (3) + 2h (3 − n) cosωn
n=1
5
X
= h(3) + 2h (5 − n) cosωn
n=1
= h(3) + 2h(2)cosω + 2h(1)cos2ω + 2h(0)cos3ω
= 0.3183 − 0.3668cosω + 0.0378cos2ω
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 65 / 94
FIR Filter Design Bandstop FIR Filter Design

Design a bandstop filter to reject the frequencies from 2 to 3 rad/sec using rectangular window
with M=5. Find the frequency response.

Solution:
H d ( e jω )
 −jωτ
 e for − π ≤ ω ≤ −ωc2 1
 −jωτ

jω e for − ωc1 ≤ ω ≤ ωc1
Hd (e ) =

 e −jωτ for ωc2 ≤ ω ≤ π
0 for ωc1 ≤ |ω| ≤ ωc2 −ωc 2 −ωc1 ωc 1 ωc 2 ω

−π 0 π

1
Z π
hd (n) = Hd (e jω )e jωn dω
2π −π
Z −ωc2 Z ωc1 Z π
1 jω(n−τ )
= [ e dω + e jω(n−τ ) dω + e jω(n−τ ) dω
2π −π −ωc1 ωc2
" #−ωc2 " #ωc1 " #π
1 e jω(n−τ ) 1 e jω(n−τ ) 1 e jω(n−τ )
= + +
2π j(n − τ ) 2π j(n − τ ) 2π j(n − τ )
−π −ωc1 ωc2
1
= [sinωc1 (n − τ ) + sinπ(n − τ − sinωc2 (n − τ ]
π(n − τ )

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 66 / 94
FIR Filter Design Bandstop FIR Filter Design

The inverse transform of the Hd (e ω ) is


M−1 5−1
τ = 2
= 2
= 2 ωc1 = 2 rad/sec ωc2 = 3 rad/sec

1
hd (n) = [sin2(n − 2) + sinπ(n − 2) − sin3(n − 2)] for n 6= 2
π(n − 2)

for n = τ
 
1 sinωc1 (n − τ ) sinπ(n − τ ) sinωc2 (n − τ )
hd (n) = lim + lim − lim
π n→τ (n − τ ) n→τ (n − τ ) n→τ (n − τ )

1 1
hd (n) = [ωc1 + π − ωc2 ] = [π − 1]
π π
The given window function is Rectangular window

ω(n) = 1 0≤n ≤M −1

This is rectangular window of length M=5.


In this case h(n) = hd (n)ω(n) = hd (n) for 0 ≤ n ≤ 4
1
hd (n) = [sin2(n − 2) + sinπ(n − 2) − sin3(n − 2)] for n 6= 2
π(n − 2)

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 67 / 94
FIR Filter Design Bandstop FIR Filter Design

 
sin2(0 − 2) + sinπ(0 − 2) − sin3(0 − 2)
n = 0 h(0) = = −0.0759
π(0 − 2)
 
sin2(1 − 2) + sinπ(1 − 2) − sin3(1 − 2)
n = 1 h(1) = = 0.2445
π(1 − 2)
1
n = 2 h(2) = [π − 1] = 0.6817
π
 
sin2(3 − 2) + sinπ(3 − 2) − sin3(3 − 2)
n = 3 h(3) = = 0.2445
π(3 − 2)
 
sin2(4 − 2) + sinπ(4 − 2) − sin3(4 − 2)
n = 4 h(4) = = −0.0759
π(4 − 2)

M−1
X 4
X
H(z) = h(n)z −n = h(n)z −n
n=0 n=0

= h(0) + h(1)z −1 + h(2)z −2 + h(3)z −3 + h(4)z −4


= −0.0759 + 0.2445z −1 + 0.6817z −2 + 0.2445z −3 − 0.0759z −4

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 68 / 94
FIR Filter Design Bandstop FIR Filter Design

The magnitude response of a symmetric FIR filter with M=odd is


  (M−1)/2  
M −1 X M −1
|H(e jω )| = h + 2h − n cosωn
2 n=1
2

For M=5
2
X
|H(e jω )| = h (2) + 2h (2 − n) cosωn
n=1

3
X
|H(e jω )| = h (3) + 2h (3 − n) cosωn
n=1
= h(2) + 2h(1)cosω + 2h(0)cos2ω
= 0.6817 + 2(0.2445)cosω + 2h(−0.0759)cos2ω
= 0.6817 + 0.4890cosω − 0.1518cos2ω

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 69 / 94
FIR Filter Design FIR Filter Design Using Kaiser Window

FIR Filter Design Using Kaiser Window


The Kaiser window is parametric and its bandwidth as well as its sidelobe energy can be
designed.
Mainlobe bandwidth controls the transition characteristics and sidelobe energy affects the
ripple characteristics.
The Kaiser window function is given by
" r #
  2
2n
I0 α 1− M−1
wk (n) =
I0 (α)
where M is the order of the filter, I0 (x) is a zeroth Bessel function of the first kind

∞  
X 1  x k
I0 (x) = 1+
k=1
k! 2
0.25x 2 (0.25x 2 )2 (0.25x 2 )3
= 1+ + + +
(1!)2 (2!)2 (3!)2

α = 0 if A < 21
= 0.5842(A − 21)0.4 + 0.07886(A − 21) if 21 ≤ A ≤ 50 dB
= 0.1102(A − 8.7)) if A > 50 dB

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 70 / 94
FIR Filter Design FIR Filter Design Using Kaiser Window

H (ω ) δ1 Passband ripple
1 + δ1 δ 2 Stopband ripple
A P
1
1 − δ1 Ideal
LPF
A S
Gain

δ2
ωP ωC ωS ω
Passband Transition
Stopband
band
Figure 30: Frequency response of LPF

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 71 / 94
FIR Filter Design FIR Filter Design Using Kaiser Window

Kaiser Window Design Equations


1 Determine ideal frequency response

1 for |ω| ≤ ωc
Hd (e jω ) =
0 for ωc ≤ |ω| ≤ π

where ωc = 12 (ωp + ωs )
2 Chose δ such that the actual passband ripple, Ap is equal to or less than the specified
passband ripple Ãp , and the actual minimum stopband attenuation A is equal or greater
than the specified minimum stop attenuation Ãs

δ = min(δp , δs )
0.05Ãp
10 −1
where δp = and δs = 10−0.05Ãs
100.05Ãp +1
3 The actual stopband attenuation is

A = −20log10 δ

4 The parameter α is

 0 for A ≤ 21
α= 0.5842(A − 21)0.4 + 0.07886(Aa − 21) for 21 < A ≤ 50
0.1102(A − 8.7) for A > 50

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 72 / 94
FIR Filter Design FIR Filter Design Using Kaiser Window

5 The value of M is found by


A − 7.95
M≥
14.36∆f
∆ω ωs −ωp
where ∆f = 2π
= 2π
and ∆ω is the width of transition band
6 Obtain impulse response by multiplying Kaiser window function

h(n) = hd (n)wk (n)

7 Obtain the causal finite impulse response


8 The system function is given by

M−1
X
H(z) = h(n)z −n
n=0

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 73 / 94
FIR Filter Design FIR Filter Design Using Kaiser Window

Design a lowpass filter with a cutoff frequencies from wc = π4 ∆ω = 0.02π and a stopband
ripple δs = 0.01. Use Kaiser window
Solution: 
1 for |ω| ≤ ωc
Hd (e jω ) =
0 for ωc ≤ |ω| ≤ π
A = −20log δs = −20log (0.01) = 40 dB
The inverse transform of the Hd (e jω ) is

1
Z π α = 0.5842(A − 21)0.4 + 0.07886(A − 21)
hd (n) = Hd (e jω )e jωn dω
2π −π = 0.5842(40 − 21)0.4 + 0.07886(40 − 21)
Z ωc
1 = 3.4
= e jωn dω
2π −ωc

1 e jωn c

0.02π
= ∆f = = 0.01
2π jn −ωc 2π
1 h jωc n i
= e − e −jωc n A − 7.95
2jπn M≥ ≥ 223.189 ' 225
14.36∆f
1 e jωc n − e −jωc n
 
= 225 − 1
πn 2j τ = = 112
sinωc n 2
=
πn

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 74 / 94
FIR Filter Design FIR Filter Design Using Kaiser Window

" r #
 2
2n
I0 α 1− M−1
wk (n) = 0≤n ≤M −1
I0 (α)
 q 
2n 2

I0 3.4 1 − 224
wk (n) = 0≤n ≤M −1
I0 (3.4)
 q 
2n 2

I0 3.4 1 − 224
1
h(n) = hd × wk (n) = [sinωc n] ×
πn I0 (3.4)
where
0 ∆ω 0.02π
ωc = ωc + = 0.25π + = 0.26π
2 2

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 75 / 94
FIR Filter Design FIR Filter Design Using Kaiser Window

Find an expression for the impulse response h(n) of a linear phase lowpass FIR filter using Kaiser
window to satisfy the following magnitude response specifications for the equivalent analog
filter.
Stopband attenuation: 40 dB
Passband ripple: 0.01 dB
Transition width: 1000 π rad/sec
Ideal cutoff frequency: 2400 π rad/sec
Sampling frequency: 10 KHz

Solution:

x(t ) x ( n) y ( n) y (t )
A/D Filter D/A

A = −20log δs = 40 dB
∆Ω 1000π
log δs = −2 ⇒ δs = 0.01 ∆ω = = = 0.1π rad
fs 10 × 103
20log (1 + δp ) = 0.01
0.1π
∆f = = 0.05
log (1 + δp ) = 0.0005 2π
δp = 0.00115 A − 7.95 58.8 − 7.95
M≥ ≥ = 70.82 ' 71
14.36∆f 14.36 × 0.05
δmin(δp , δs ) = 0.00115
71 − 1
A = −20log (0.00115) = 58.8 dB τ = = 35
2
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 76 / 94
FIR Filter Design FIR Filter Design Using Kaiser Window

The attenuation is 58.8 dB then the parameter α is 


1 for |ω| ≤ ωc
Hd (e jω ) =
0 for ωc ≤ |ω| ≤ π
α = 0.1102(A − 8.7)
= 0.1102(58.8 − 8.7) ' 5.5 The inverse transform of the
Hd (e jω ) is
 q 
2n 2

I0 5.5 1 − Z π
70 1
wk (n) = hd (n) = Hd (e jω )e jωn dω
I0 (5.5) 2π −π
Z ωc
1
= e jωn dω
1 2π −ωc
ωc = Ωc × T = 2400π × ω
1 e jωn c

10 × 103 =
= 0.24π 2π jn −ωc
1 h jωc n i
= e − e −jωc n
2jπn
0 ∆ω
ω c = ωc + 1 e jωc n − e −jωc n
 
2 =
0.1π πn 2j
= 0.24π + = 0.29π sinωc n
2 =
πn
 q 
2n 2

I0 5.48 1 − 224
1
h(n) = hd × wk (n) = [sinωc (n − τ )] ×
π(n − τ ) I0 (5.5)

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 77 / 94
FIR Filter Design FIR Filter Design Using Kaiser Window

Find an expression for the impulse response h(n) of a linear phase Design a lowpass FIR filter
satisfying the following specifications using Kaiser window
αp ≤ 0.1 dB αs ≥ 44 dB
ωp = 20 rad/sec ωs = 30 rad/sec ωsf = 100 rad/sec
Solution: 
1 for |ω| ≤ ωc
Hd (e jω ) =
0 for ωc ≤ |ω| ≤ π
∆ω = ωs − ωp = 10rad/sec
The inverse transform of the Hd (e jω ) is 1
ωc = (ωp + ωs ) = 25rad/sec
Z π 2
1
hd (n) = Hd (e jω )e jωn dω 25 π
2π −π ωc (in discrete and radian) = (2π) = rad
Z ωc 100 2
1
= e jωn dω
2π −ωc δs = 10−0.05As = 10−0.05×44 = 6.3096 × 10−3

1 e jωn c 100.05Ap − 1 100.05×0.1 − 1

= δp = 0.05A
= = 5.7563×10−3
2π jn −ωc 10 p +1 100.05×0.1 + 1
1 h jωc n
δ = min(δp , δs ) = 5.7563 × 10−3
i
= e − e −jωc n
2jπn
sinωc n A = −20log10 (δ) = 44.797dB
=
πn

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 78 / 94
FIR Filter Design FIR Filter Design Using Kaiser Window

α = 0.5842(A − 21)0.4 + 0.07886(A − 21)


= 0.5842(44.797 − 21)0.4 + 0.07886(44.797 − 21)
= 3.9524
∆ω 10
∆f = = = 0.1
ωsf 100
A − 7.95 44.797 − 7.95
M≥ ≥ ≥ 25.66 ' 27
14.36∆f 14.36 × 0.1
27 − 1
τ = = 13
2
" r #
 2
2n
I0 α 1− M−1
wk (n) = 0≤n ≤M −1
I0 (α)
 q 
2n 2

I0 3.9524 1 − 27
wk (n) = 0≤n ≤M −1
I0 (3.9524)
 q 
2n 2

I0 3.9524 1 − 27
1
h(n) = hd × wk (n) = [sinωc n] ×
πn I0 (3.9524)

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 79 / 94
FIR Filter Design FIR Filter Design Using Kaiser Window

Design a high pass digital satisfying the following specifications using Kaiser window
Passband cut-off frequency fp = 3200Hz Stopband cut-off frequency fs = 1600Hz
Passband ripple αp ≤ 0.1dB Stopband ripple αs ≥ 40dB
Sampling frequency F = 10000Hz
Solution: 
0 for |ω| ≤ ωc
Hd (e jω ) =
1 for ωc ≤ |ω| ≤ π
∆ω = ωp − ωs = 3200π rad/sec
The inverse transform of the Hd (e jω ) is
1
ωc = (ωp + ωs ) = 4800π rad/sec
1
Z −ωc Z π  2
hd (n) = e jωn dω + e jωn dω
2π −π ωc 4800
ωc (discrete, radian) = (2π) = 0.48πrad
" −ωc π # 20000
e jωn e jωn

1
= +
2π jn −π jn ωc δs = 10−0.05As = 10−0.05×40 = 0.01
1 h i
= e −jωc n − e −jπn + e jπn − e jωc n
2jπn
sinπn − sinωc n 100.05Ap −1 100.05×0.1−1
= δp = = = 0.005756
πn 100.05A p +1 100.05×0.1+1

ωp = 2πfp = 6400π rad/sec δ = min(δp , δs ) = 5.756 × 10−3

ωs = 2πfs = 3200π rad/sec A = −20log10 (δ) = 44.797dB

ωsf = 2πF = 20000π rad/sec


Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 80 / 94
FIR Filter Design FIR Filter Design Using Kaiser Window

α = 0.5842(A − 21)0.4 + 0.07886(A − 21)


= 0.5842(44.797 − 21)0.4 + 0.07886(44.797 − 21)
= 3.9524
∆ω 3200π
∆f = = = 0.16
ωsf 20000π
A − 7.95 44.797 − 7.95
M≥ ≥ ≥ 16.03 ' 17
14.36∆f 14.36 × 0.16
17 − 1
τ = =8
2
" r #
 2
2n
I0 α 1− M−1
wk (n) = 0≤n ≤M −1
I0 (α)
 q 
2n 2

I0 3.9524 1 − 17
wk (n) = 0≤n ≤M −1
I0 (3.9524)
 q 
2n 2

I0 3.9524 1 − 27
sinπn − sinωc n
h(n) = hd × wk (n) = ×
πn I0 (3.9524)

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 81 / 94
Design of FIR system Frequency Sampling for FIR Filters

Design of FIR filter using Frequency Sampling


With necessary mathematical analysis explain the frequency sampling
technique of FIR filter design

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 82 / 94
Design of FIR system Frequency Sampling for FIR Filters
In this method a set of M equally spaced
samples in the interval (0, 2π)are taken in
the desired frequency response Hd (ω).
The continuous frequency ω is replaced by


ω = ωk = k k = 0, 1, . . . M − 1
M
2π k 2π k
| H d (ω ) | ωk = =
M 17
K=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

The discrete time Fourier transform (DTFT)


is ω
4π 8π π π 20π 3π 30π

17 17 2 17 2 17
H(k) = Hd (ω)|ω=ωk
  θ (ω )
2π ω
= Hd k k = 0, 1, . . . M − 1
M 16π (k − 17)
θk = −
16π k 17
θ k = −8ωk = −
17

The inverse M point DFT (IDFT) h(n) is Magnitude frequency response is


symmetric about π, while ideal phase
M−1 response is antisymmetric about π
1 X
h(n) = H(k)e jωn
M n=0
M−1
1 X 2πkn
= H(k)e j M n = 0, 1, . . . M − 1
M n=0

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 83 / 94
Design of FIR system Frequency Sampling for FIR Filters

For the FIR filter to be realizable the coefficients h(n) must be real. This is possible if all
complex terms appear in complex conjugate pairs. Consider the term
H(M − k)e j2πn(M−k)/M

H(M − k)e j2πn(M−k)/M = H(M − k)e j2πn e −j2πkn/M

H(M − k)e j2πn(M−k)/M = H(M − k)e −j2πkn/M ∵ e j2πn = cos(2πn) + jsin(2πn) = 1

substituting the |H(M − k)| = |H(k)|

H(M − k)e j2πn(M−k)/M = H(k)e −j2πkn/M

The term H(k)e −j2πkn/M is complex conjugate of H(k)e j2πkn/M .


Hence H(M − k)e j2πn(M−k)/M is complex conjugate of H(k)e −j2πkn/M

H(M − k) = H ∗ (k)

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 84 / 94
Design of FIR system Frequency Sampling for FIR Filters

If H(M − k) = H ∗ (k) then h(n)

P
!
1 X h i
h(n) = H(0) + 2 Re H(k)e j2πkn/M
M k=1

where P is  M−1
2
if M is odd
P= M
2
− 1 if M is even

This equation is used to compute the coefficients of FIR filter.


H(z) is
M−1
X
H(z) = h(n)z −n
n=0

M−1
X
H(ω) = h(n)e −jωn
n=0

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 85 / 94
Design of FIR system Frequency Sampling for FIR Filters

Design a lowpass FIR filter using frequency sampling technique having cut-off frequency of π/2
rad/sample. The filter should have linear phase and length of 17.
Solution:
The Ideal LPF frequency response Hd (ω)
for the linear phase is
2π k 2π k
ωk = =
(  
−jω M−1 | H d (ω ) |
Hd (ω) = e 2 0 ≤ ω ≤ π2 K=0 1 2 3 4 5 6 7 8
M
9
17
10 11 12 13 14 15 16 17
π
0 2
≤ω≤π

ω
e −j8ω 0 ≤ ω ≤ π2 8π π 30π

4π π 20π 3π 2π
Hd (ω) = π 17 2 17
0 2
≤ω≤π 17 17 2

θ (ω )
2πk 2πk
To sample put ω = M
= 17 ω
16π (k − 17)
θk = −
16π k 17
( 2πk θ k = −8ωk = −
e −j 17
8
0 ≤ 2πk ≤ π2 17
Hd (ω) = π
17
2πk
0 2
≤ 17
≤ π
The range of k is
2πk
17
= π2 k = 17 4
'4
2πk 17
= π k = ' 8
( 16πk
e −j 17 0 ≤ k ≤ 17 17 2
Hd (ω) = 17
4
0 4
≤ k ≤ 17
2

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 86 / 94
Design of FIR system Frequency Sampling for FIR Filters

The value of h(n)is given by


 M−1

2
1  X h i
j2πkn/M 
h(n) = H(0) + 2 Re H(k)e 
M k=1

The range of k is 0 ≤ k ≤ 17 8
!
4 1 X h
j2πkn/17
i
k is an integer. = 1+2 Re H(k)e
Hence the range is 0 ≤ k ≤ 4 17 k=1
Similarly 17
4
≤ k ≤ 17
2
= 4.25 ≤ k ≤ 8.5
The range 5 ≤ k ≤ 8 |H(k)| = 1 0≤k≤4

 1 0≤k≤4
4
!
|H(k)| = 0 5≤k≤8 1 X h 16πk
i

1 13 ≤ k ≤ 16 h(n) = 1+2 Re e −j 17 e j2πkn/17
17 k=1
4
!
1 X h i
= 1+2 Re e j2πk(n−8)/17
17 k=1
4  !
1 X 2πk(n − 8)
= 1+2 cos
17 k=1
17

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 87 / 94
Design of FIR system Frequency Sampling for FIR Filters

Determine the impulse response h(n) of a filter having desired frequency response
 
(M−1)ω
(
−j
Hd (w ) = e 2 0 ≤ |ω| ≤ π2
π
0 2
≤ω≤π

M=7 use frequency sampling approach.


Solution:
The Ideal LPF frequency response Hd (ω) is
2π k 2π k
(   | H d (ω ) | ωk = =
−jω M−1 M 7
Hd (ω) = e 2 0 ≤ ω ≤ π2 K=0 1 2 3 4 5 6 7
π
0 2
≤ω≤π
ω
2π π 4π 6π π 8π 10π 3π 12π
e −j3ω 0 ≤ ω ≤ π2 2π

Hd (ω) = 7 2 7 7 7 7 2 7
π
0 2
≤ω≤π
θ (ω )
2πk 2πk ω
To sample put ω = M
= 7
6π (k − 7)
θk = −
6π k 7
θ k = −3ωk = −
( 2πk
e −j 7
3
0 ≤ 2πk ≤ π2 7
Hd (ω) = π
7
2πk
0 2
≤ 7
≤ π
The range of k is
2πk
= π2 k = 74 ' 1
(
−j 6πk
e 7 0 ≤ k ≤ 74 7
Hd (ω) = 2πk
0 7
≤ k ≤ 72 7
= π k = 72 ' 3
4

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 88 / 94
Design of FIR system Frequency Sampling for FIR Filters
The value of h(n)is given by

The range of k is 0 ≤ k ≤ 74
 M−1

2
k is an integer. 1  X h i
h(n) = H(0) + 2 Re H(k)e j2πkn/M 

Hence the range is 0 ≤ k ≤ 1 M k=1
Similarly 74 ≤ k ≤ 72 = 1.75 ≤ k ≤ 3.5
The range 2 ≤ k ≤ 3 3
!
1 X h i
= 1+2 Re H(k)e j2πkn/7

 1 0≤k≤1 7 k=1
|H(k)| = 0 2≤k≤3
1 k=6

|H(k)| = 1 0≤k≤1

1
!
n h(n) n h(n) 1 X h 6πk
i
h(n) = 1+2 Re e −j 7 e j2πkn/7
0 -0.1146 4 321 7 k=1
1 0.0793 5 0.0793 1
!
2 0.321 6 -0.1146 1 X h
j2πk(n−3)/7
i
= 1+2 Re e
3 0.4283 7 k=1
1  !
1 X 2πk(n − 3)
= 1+2 cos
7 k=1
7
Determine the filter coefficients h(n) obtained by frequency sampling Hd (w ) given by
(
e −j3ω 0 ≤ |ω| ≤ π
2
Hd (w ) = π ≤ ω ≤ π
0 2

Also obtain the frequency response H(w ). Take N=7. DEC 2011
Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 89 / 94
Design of FIR system Frequency Sampling for FIR Filters

Proakis Exercise 8.6


Determine the filter coefficients h(n) of a linear phase FIR of length M=15 which has symmetric
unit impulse response and the frequency response that satisfies the coefficients.
  
2π 1 k = 0, 1, 2, 3
H k =
15 0 k = 4, 5, 6, 7

Solution:
2π k 2π k
ωk = =

 1 0≤k≤3 | H d (ω ) | M 15
|H(k)| = 0 4 ≤ k ≤ 11 K=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

1 12 ≤ k ≤ 14

ω
4π 6π π π 18π 3π 28π

15 15 2 15 2 15
 14 θ (ω )
− 15 πk 0≤k≤7
θ(k) = ω
14π − 1415
πk = − 14
15
π(k − 15) 8 ≤ k ≤ 14
14π (k − 15)
θk = −
14π k 15
θ k = −7ωk = −
15

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 90 / 94
Design of FIR system Frequency Sampling for FIR Filters

The value of h(n)is given by


 M−1

2
1  X h i
j2πkn/M 
h(n) = H(0) + 2 Re H(k)e 
M k=1

7
! n h(n) n h(n)
1 X h
j2πkn/7
i
0 -0.05 8 0.3188
= 1+2 Re H(k)e
15 k=1
1 0.041 9 0.034
2 0.066 10 -0.108
3 -0.036 11 -0.036
|H(k)| = 1 0≤k≤3 4 -0.108 12 0.066
5 0.034 13 0.041
3
!
1 X h 17πk
i 6 0.3188 14 -0.05
h(n) = 1+2 Re e −j 15 e j2πkn/15 7 0.466
715 k=1
3
!
1 X h i
= 1+2 Re e j2πk(n−7)/15
15 k=1
3  !
1 X 2πk(n − 7)
= 1+2 cos
15 k=1
15

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 91 / 94
Design of FIR system Frequency Sampling for FIR Filters

Proakis Exercise 8.7


Determine the filter coefficients h(n) of a linear phase FIR of length M=15 which has symmetric
unit impulse response and the frequency response that satisfies the coefficients.



  1 k = 0, 1, 2, 3
H k = 0.4 k = 4
15 
0 k = 5, 6, 7

Solution:
1 0≤k≤3

2π k 2π k
ωk = =

 0.4 k = 4 | H d (ω ) |


M 15
|H(k)| = 0 5 ≤ k ≤ 10 K=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

0.4 k = 11
 0.4
0.4



1 12 ≤ k ≤ 14 ω
4π 6π π π 18π 3π 28π

15 15 2 15 2 15

θ (ω )
14 ω

− 15 πk 0≤k≤7
θ(k) = 14
− 15 π(k − 15) 8 ≤ k ≤ 14 14π (k − 15)
θk = −
14π k 15
θ k = −7ωk = −
15

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 92 / 94
Design of FIR system Frequency Sampling for FIR Filters

The value of h(n)is given by


 M−1

2
1  X h i
j2πkn/M 
h(n) = H(0) + 2 Re H(k)e 
M k=1

7
!
1 X h i n h(n) n h(n)
j2πkn/7
= 1+2 Re H(k)e 0 -0.0143 8 0.313
15 k=1 1 -0.002 9 -0.0181
2 0.04 10 -0.091
|H(k)| = 1 0 ≤ k ≤ 3 3 0.0122 11 0.0122
|H(k)| = 0.4 k = 4&11 4 -0.091 12 0.04
5 -0.0181 13 -0.002
3
! 6 0.313 14 -0.0143
1 X h 17πk
i
7 0.520
h(n) = 1+2 Re e −j 15 e j2πkn/15
715 k=1
3
!
1 X h
j2πk(n−7)/15
i h
j2π4(n−7)/15
i
= 1+2 Re e + 2Re 0.4e
15 k=1
3    !
1 X 2πk(n − 7) 8π(n − 7)
= 1+2 cos + 0.8cos
15 k=1
15 15

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 93 / 94
References

J. G. Proakis and D. G. Monalakis, Digital signal processing Principles Algorithms &


Applications, 4th ed. Pearson education, 2007.
Oppenheim and Schaffer, Discrete Time Signal Processing. Pearson education, Prentice
Hall, 2003.
S. K. Mitra, Digital Signal Processing. Tata Mc-Graw Hill, 2004.

L. Tan, Digital Signal Processing. Elsivier publications, 2007.

Dr. Manjunatha. P (JNNCE) UNIT - 7: FIR Filter Design October 25, 2016 94 / 94
UNIT - 8: Implementation of Discrete-time
Systems[?, ?, ?, ?]

Dr. Manjunatha. P
[email protected]

Professor
Dept. of ECE

J.N.N. College of Engineering, Shimoga

October 18, 2016


Unit 8 Syllabus Introduction

Implementation of discrete-time systems::


[?, ?, ?, ?, ?, ?]

Slides are prepared to use in class room purpose, may be used as a


reference material
All the slides are prepared based on the reference material
Most of the figures/content used in this material are redrawn, some
of the figures/pictures are downloaded from the Internet.
This material is not for commercial purpose.
This material is prepared based on Digital Signal Processing for
ECE/TCE course as per Visvesvaraya Technological University (VTU)
syllabus (Karnataka State, India).

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?, ?,


October
?] 18, 2016 2 / 151
Unit 8 Syllabus Introduction

Unit 8: Implementation of Discrete-time Systems:

PART - B

Realization of FIR system


Direct form structure of FIR system
Linear phase FIR structure
Cascade form structure for FIR system
Frequency sampling structure for FIR system
Lattice structure for FIR system
Realization of IIR system
Direct form structure for IIR system
1 Direct form-I structure of IIR system
2 Direct form-II structure of IIR system
Cascade form structure for IIR system
Parallel form structure for IIR system
Lattice structure of IIR system
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?, ?,
October
?] 18, 2016 3 / 151
Implementation of Discrete-time Systems Introduction

Implementation of Discrete-time Systems


System: A system is a physical device which consists of interrelated and interdependent elements
which process the input signal and transform into output signal. Example: Filters, Amplifiers.
x1 (n) y1 (n)
System

Linearity: x2 (n)
System
y2 ( n)

If input x1 (n) produces response y1 (n)


and if x2 (n) produces response y2 (n) and
ax1 (n) + bx2 (n) = ay1 (n) + by2 (n) then the ax1 (n) + bx2 (n) ay1 (n) + by2 (n)
system is called Linear system. System

Figure 1: Linearity
Time invariance: A system is said to be time invariant if its behavior and characteristics does
not change with time.
If input x(n) produces response y (n) then if x(n − n0 ) produces response y (n − n0 ), then the
system is called as time invariant
Causality: A system is causal if the output depends only on present and past, but not future
inputs. All memoryless systems are causal.

y [n] = x[n] + x[n − 1] + x[n − 2] . . .

Some of the examples for such analog systems are Oscillator, regulated power supply.,,
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?, ?,
October
?] 18, 2016 4 / 151
Realization of FIR system Realization of FIR system

Digital filters are discrete Linear Time Invariant (LTI) systems and described by difference
equations and are implemented in hardware or software.
The discrete time sytems can be of finite impulse response (FIR) or infinite impulse
response IIR type.
A FIR filter is a filter whose impulse response is of finite duration, because it settles to
zero in finite time, because there is no feedback in the FIR system.
The basic components of discrete-time system are, delay element, multiplier, and adder. The
details of these components and their symbols with its input output relationship is as shown in
Figure 2.

x ( n) y (n) = x (n − 1)
Z −1

Delay Element

x ( n) y (n) = ax(n)
a

Multiplier
x1 (n)
y (n) = x1 (n) + x2 (n)
x2 (n)
+
Adder

Figure 2: Basic Elements


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?, ?,
October
?] 18, 2016 5 / 151
Realization of FIR system Realization of FIR system

Realization of FIR system


The difference equation is a formula for computing an output sample at time n based on past
and present input samples and past output samples in the time domain. The general, causal,
LTI difference equation is as follows:

y (n) = b0 x(n) + b1 x(n − 1) + . . . bk x(n − k) − a1 y (n − 1) − a2 y (n − 2) . . . − ak y (n − k)


M
X N
X
= bk x(n − k) − ak y (n − k)
k=0 k=1

where x is the input signal, y is the output signal ak and bk are called the coefficients.
The second term in this equation is usually termed as feedback for the system. This is the
equation used to represent Infinite Impulse Response (IIR) system.
If the feedback term is absent then this equation is used to represent Finite Impulse
Response (FIR) system.
XM
y (n) = bk x(n − k)
k=0

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?, ?,


October
?] 18, 2016 6 / 151
Realization of FIR system Realization of FIR system

LTI systems are represented by the following difference equation.


N
X M
X
y (n) = − ak y (n − k) + bk x(n − k)
k=1 k=0

By taking z-transform on both sides


N
X M
X
Y (z) = − ak z −k Y (z) + bk z −k X (z)
k=1 k=0

N M
" #
X X
Y (z) 1 + ak z −k = bk z −k X (z)
k=1 k=0

The system function H(z) is defined as


Y (z)
H(z) =
X (z)

M
−k
P
bk z
k=0
H(z) =
N
ak z −k
P
1+
k=1

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?, ?,


October
?] 18, 2016 7 / 151
Realization of FIR system Realization of FIR system

An FIR system does not have feedback. Hence y (n − k) term is absent in the system. FIR
output is expressed as
M
X
y (n) = bk x(n − k)
k=0

If there are M coefficients then


M−1
X
y (n) = bk x(n − k)
k=0

By taking z-transform on both sides


M
X
Y (z) = bk z −k X (z)
k=0

System function H(z) is defined as


M−1
Y (z) X
H(z) = = bk z −k
X (z) k=0

By taking inverse z transform



bn for 0≤n ≤M −1
h(n) =
0 otherwise
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?, ?,
October
?] 18, 2016 8 / 151
Realization of FIR system Direct form Structure of FIR System

Direct form Structure of FIR System


Structures in which the multiplier coefficients are precisely the coefficients of the transfer
function are called direct form structure.
Since h(n) = bn then y(n) is
M−1
X
y (n) = h(k)x(n − k)
k=0

Expanding the summation

y (n) = h(0)x(n) + h(1)x(n − 1) + h(2)x(n − 2) + . . . h(M − 1)x(n − M + 1)

x ( n)
Z-1 Z-1 Z-1 Z-1
h(M-1)
h(0) h(1) h(2) h(M-2)
h( M − 1) x(n − M + 1)
h(1) x( n − 1) h(2) x( n − 2)
x(n)h(0)
+ + x(n)h(0) + + + M −1
x(n)h(0)
+ h(1) x(n − 1) y ( n) = ∑ h( k ) x( n − k )
+ h(1) x(n − 1) k =0
+ h(2) x(n − 2)

Figure 3: Direct form realization of FIR system

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?, ?,


October
?] 18, 2016 9 / 151
Realization of FIR system Direct form Structure of FIR System

Realize a direct form FIR filter for the following impulse response.
1 1 1
h(n) = δ(n) + δ(n − 1) − δ(n − 2) + δ(n − 4) + δ(n − 3)
2 4 2

Solution: h(n) = δ(n) + 12 δ(n − 1) − 14 δ(n − 2) + 12 δ(n − 3) + δ(n − 4)

1 −1 1 1
H(z) = 1 + z − z −2 + z −3 + z −4
2 4 2

 
1 1 1
Y (z) = X (z)H(z) = 1 + z −1 − z −2 + z −3 + z −4 X (z)
2 4 2
1 −1 1 −2 1 −3
= X (z) + z X (z) − z X (z) + z X (z) + z −4 X (z)
2 4 2
1 1 1
y (n) = x(n) + x(n − 1) − x(n − 2) + x(n − 3) + x(n − 4)
2 4 2

x ( n) x( n − 1) x(n − 2) x( n − 3) x(n − 4)
Z-1 Z-1 Z-1 Z-1

h(0) = 1 1 −1 1 h(4) = 1
h(1) = h(2) = h(3) =
2 4 2
y(n)
+ + + +

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 10 / 151
Realization of FIR system Direct form Structure of FIR System

DEC-2010 EE
Realize the system function H(z) = 1 + 32 z −1 + 54 z −2 + 95 z −3 + 19 z −4 using direct form II
Solution:
3 4 5 1
H(z) = 1 + z −1 + z −2 + z −3 + z −4
2 5 9 9

 
3 4 5 1
Y (z) = X (z)H(z) = 1 + z −1 + z −2 + z −3 + z −4 X (z)
2 5 9 9
3 −1 4 −2 5 −3 1
= X (z) + z X (z) + z X (z) + z X (z) + z −4 X (z)
2 5 9 9
3 4 5 1
y (n) = x(n) + x(n − 1) + x(n − 2) + x(n − 3) + x(n − 4)
2 5 9 9

x ( n)
Z-1 Z-1 Z-1 Z-1

h(0) = 1 3 4 5 1
h(1) = h(2) = h(3) = h(4) =
2 5 9 9
y(n)
+ + + +

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 11 / 151
Realization of FIR system Direct form Structure of FIR System

June 2012 EC
A FIR filter is given by y (n) = x[n] + 25 x[n − 1] + 34 x[n − 2] + 13 x[n − 3] draw the direct form.
Solution:

x ( n)
Z-1 Z-1 Z-1

h(0) = 1 2 3 1
h(1) = h(2) = h(3) =
5 4 3
y(n)
+ + +

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 12 / 151
Realization of FIR system Direct form Structure of FIR System

Determine a direct form realization for the following linear phase filters

h(n) = [1, 2, 3, 4, 3, 2, 1]

Solution:
H(z) = 1 + 2z −1 + 3z −2 + 4z −3 + 3z −4 + 2z −5 + 1z −6 ]

X (z)H(z) = 1 + 2z −1 + 3z −2 + 4z −3 + 3z −4 + 2z −5 + 1z −6 X (z)
 
Y (z) =
= X (z) + 2z −1 X (z) + 3z −2 X (z) + 4z −3 X (z) + 3z −4 X (z) + 2z −5 X (z) + 1z −6 X (z)
y (n) = x(n) + 2x(n − 1) + 3x(n − 2) + 4x(n − 3) + 3x(n − 4) + 2x(n − 5) + 1x(n − 6)

x ( n)
Z-1 Z-1 Z-1 Z-1 Z-1 Z-1

h(0) = 1 h(1) = 2 h(2) = 3 h(3) = 4 h(4) = 3 h(5) = 2 h(6) = 1

y(n)
+ + + + + +

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 13 / 151
Realization of FIR system Direct form Structure of FIR System

Determine a direct form realization for the following linear phase filters

h(n) = [1, 2, 3, 3, 2, 1]

Solution:
H(z) = 1 + 2z −1 + 3z −2 + 3z −3 + 2z −4 + 1z −5 ]

X (z)H(z) = 1 + 2z −1 + 3z −2 + 3z −3 + 2z −4 + 1z −5 X (z)
 
Y (z) =
= X (z) + 2z −1 X (z) + 3z −2 X (z) + 3z −3 X (z) + 2z −4 X (z) + 1z −5 X (z)
y (n) = x(n) + 2x(n − 1) + 3x(n − 2) + 3x(n − 3) + 2x(n − 4) + 1x(n − 5)+

x ( n)
Z-1 Z-1 Z-1 Z-1 Z-1

h(0) = 1 h(1) = 2 h(2) = 3 h(3) = 3 h(4) = 2 h(5) = 1

y(n)
+ + + + +

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 14 / 151
Realization of FIR system Direct form Structure of FIR System

For the following FIR filter system function sketch a direct form

H(z) = 1 + 2.88z −1 + 3.4048z −2 + 1.74z −3 + 0.4z −4

Solution:

x ( n)
Z-1 Z-1 Z-1 Z-1

h(0) = 1 h(1) = 2.88 h(2) = 3.4048 h(3) = 1.74 h(4) = 0.4

y(n)
+ + + +

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 15 / 151
Realization of FIR system Direct form Structure of FIR System

Realize direct form FIR filter with impulse response h(n) is given
h(n) = 4δ(n) + 5δ(n − 1) + 6δ(n − 2) + 7δ(n − 3). With input x(n) = [1, 2, 3] calculate output
y (n)
Solution:
h(n) = 4δ(n) + 5δ(n − 1) + 6δ(n − 2) + 7δ(n − 3)
H(z) = 4 + 5z −1 + 6z −2 + 7z −3

X (z)H(z) = 4 + 5z −1 + 6z −2 + 7z −3 X (z)
 
Y (z) =
= 4X (z) + 5z −1 X (z) + 6z −2 X (z) + 7z −3 X (z)
y (n) = 4x(n) + 5x(n − 1) + 6x(n − 2) + 7x(n − 3)

x ( n)
3

2 x ( n) x( n − 1) x(n − 2) x(n − 3)
Z-1 Z-1 Z-1

h(0) = 4 h(1) = 5 h(2) = 6 h(3) = 7


1
y(n)
n + + +
0 1 2 3

Figure 4: Input x(n) to the FIR filter


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 16 / 151
Realization of FIR system Direct form Structure of FIR System

y (n) = 4x(n) + 5x(n − 1) + 6x(n − 2) + 7x(n − 3)


y (0) = 4x(0) + 5x(0 − 1) + 6x(0 − 2) + 7x(0 − 3) = 4 × 1 = 4
y (1) = 4x(1) + 5x(0) = 4 × 2 + 5 × 1 = 13
y (2) = 4x(2) + 5x(1) + 6x(0) = 4 × 3 + 5 × 2 + 6 × 1 = 28
y (3) = 4x(3) + 5x(2) + 6x(1) + 7x(0) = 4 × 0 + 5 × 3 + 6 × 2 + 7 × 1 = 34
y (4) = 4x(4) + 5x(3) + 6x(2) + 7x(1) = 0 + 0 + 6 × 3 + 7 × 2 = 32
y (5) = 4x(5) + 5x(4) + 6x(3) + 7x(2) = 0 + 0 + 0 + 7 × 3 = 21

y (n) = [4, 13, 28, 34, 32, 21]


y ( n)
34 32
28
21
x ( n) x( n − 1) x(n − 2) x(n − 3)
13 Z-1 Z-1 Z-1

4 h(0) = 4 h(1) = 5 h(2) = 6 h(3) = 7


n
y(n)
0 1 2 3 4 5 + + +
Figure 5: Output y(n) of the FIR
filter

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 17 / 151
Realization of FIR system Direct form Structure of FIR System

June 2015 Obtain the direct form realization of linear phase FIR system given by

2 −1 15 −2
H(z) = 1 + z + z
3 8

Solution:

x ( n)
Z-1 Z-1

h(0) = 1 2 15
h(1) = h(2) =
3 8
y(n)
+ +

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 18 / 151
Realization of FIR system Linear Phase FIR structure

Linear Phase FIR structure


Linear phase is a property of a
filter, where the phase response
of the filter is a linear function
of frequency. The result is that Symmetry: h(n)=h(M-1-n) Odd M Symmetry: h(n)=h(M-1-n) Even M

all frequency components of the h[n] h[n]

input signal are shifted in time

-2 -1 0 1 2 3 4

-2 -1 0 1 2 3 4
(usually delayed) by the same
constant amount, which is
referred to as the phase delay. 0 1 2 3 4 5 6 7 8 n 0 1 2 3 4 5 6 7 8 n

And consequently, there is no


phase distortion due to the time Center of Symmetry Center of Symmetry

delay of frequencies relative to Antisymmetry: h(n)=-h(M-1-n) Odd M Antisymmetry: h(n)=-h(M-1-n) Even M


one another. h[n] h[n]

Linear-phase filters have a


-2 -1 0 1 2 3 4

-2 -1 0 1 2 3 4
symmetric impulse response.
The FIR filter has linear phase if
0 1 2 3 4 5 6 7 8 n 0 1 2 3 4 5 6 7 8 n
its unit sample response satisfies
the following condition: Center of Symmetry
Center of Symmetry

h(n) = h(M−1−n) n = 0, 1, 2, . . . , M−1

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 19 / 151
Realization of FIR system Linear Phase FIR structure
M−1
h(n)z −n
P
The Z transform of the unit sample response is expressed as H(z) =
n=0
For even M h(n) = h(M − 1 − n)
M/2−1 h i
X
H(z) = h(n) z −n + z −(M−1−n)
n=0

The system expression is


Y (z)
H(z) =
X (z)

M/2−1
Y (z) X h i
= h(n) z −n + z −(M−1−n)
X (z) n=0

M/2−1 h i
X
Y (z) = h(n) z −n + z −(M−1−n) X (z)
n=0

By expanding the summation


h i h i
Y (z) = h(0) 1 + z −(M−1) X (z) + h(1) z −1 + z −(M−2) X (z) + . . .
h i
+ h(M/2 − 1) z −(M/2−1) + z −(M/2) X (z)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 20 / 151
Realization of FIR system Linear Phase FIR structure

By taking inverse z transform

y (n) = h(0)[x(n) + x(n − (M − 1))] + h(1)[x(n − 1) + x(n − (M − 2))] + . . .


+ h(M/2 − 1)x [n − (M/2 − 1)] + x [n − (M/2)]

By considering M=8 then y (n) is

y (n) = h(0)[x(n) + x(n − 7)] + h(1)[x(n − 1) + x(n − 6)] + . . .


+ h(2){x(n − 2) + x(n − 5)} + h(3){x(n − 3) + x(n − 4)}

x( n) x( n − 1) x(n − 2) x(n − 3)
Z-1 Z-1 Z-1

Z-1
+ + + +

Z-1 Z-1 Z-1


x( n − 7) x(n − 6) x( n − 5) x( n − 4)
h(0) h(1) h(2) h(3)
x(n − 1)
y ( n)
+ + +

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 21 / 151
Realization of FIR system Linear Phase FIR structure

For Odd M h(n) = h(M − 1 − n)


    (M−3)/2
M −1 − M−1 X h i
H(z) = h z 2 + h(n) z −n + z −(M−1−n)
2 n=0

Y (z)
H(z) =
X (z)

    (M−3)/2
Y (z) M −1 − M−1 X h i
=h z 2 + h(n) z −n + z −(M−1−n)
X (z) 2 n=0

    (M−3)/2
M −1 − M−1 X h i
Y (z) = h z 2 X (z) + h(n) z −n + z −(M−1−n) X (z)
2 n=0

By expanding the summation


   M−1 
M −1 −
h i
Y (z) = h z 2 X (z) + h(0) 1 + z −(M−1) X (z)
2
h i
= +h(1) z −1 + z −(M−2) X (z) + . . .

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 22 / 151
Realization of FIR system Linear Phase FIR structure

By taking inverse z transform


   
M −1 M −1
y (n) = h x n− + h(0)[x(n) + x(n − (M − 1))] +
2 2
+ h(1)[x(n − 1) + x(n − (M − 2))] + . . .
     
M −3 M −3 M +1
+ h x n− +x n−
2 2 2

for M=9

y (n) = h(4)x(n − 4) + h(0)[x(n) + x(n − 8)] + h(1)[x(n − 1) + x(n − 7)] + . . .


+ h(2){x(n − 2) + x(n − 6)} + h(3){x(n − 3) + x(n − 5)}

x ( n) x( n − 1) x(n − 2) x( n − 3) x(n − 4)
Z-1 Z-1 Z-1 Z-1

+ + + +

Z-1 Z-1 Z-1 Z-1


x(n − 8) x(n − 7) x( n − 6) x(n − 5)
h(0) h(1) h(2) h(3) h(4)
x( n − 1)
y ( n)
+ + +

Figure 7: Linear phase FIR structure


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 23 / 151
Realization of FIR system Linear Phase FIR structure

Realize a linear phase FIR filter with the following impulse response. Give necessary equations
h(n) = δ(n) + 12 δ(n − 1) − 41 δ(n − 2) + δ(n − 4) + 12 δ(n − 3)
Solution: h(n) = {1, 21 , −1/4, 12 , 1}. Here M=5 h(0) = h(4), h(1) = h(3)
1 1 1
h(n) = δ(n) + δ(n − 1) − δ(n − 2) + δ(n − 3) + δ(n − 4)
2 4 2
1 1 1
H(z) = 1 + z −1 − z −2 + z −3 + z −4
2 4 2
 
1 1 1
Y (z) = X (z)H(z) = 1 + z −1 − z −2 + z −3 + z −4 X (z)
2 4 2
1 −1 1 −2 1 −3
Y (z) = X (z) + z X (z) − z X (z) + z X (z) + z −4 X (z)
2 4 2
1 1 1
y (n) = x(n) + x(n − 1) − x(n − 2) + x(n − 3) + x(n − 4)
2 4 2
1 1
y (n) = [x(n) + x(n − 4)] + [x(n − 1) + x(n − 3)] − x(n − 2)
2 4

x ( n) x( n − 1) x(n − 2)
Z-1 Z-1

+ +

Z-1 Z-1
x(n − 4) x(n − 3)
h(0)=1 h(1)=1/2 h(3)=-1/4

y ( n)
+ +

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 24 / 151
Realization of FIR system Linear Phase FIR structure

DEC 2010,2011, 2012 Realize a linear phase FIR filter having the following impulse response
h(n) = δ(n) + 14 δ(n − 1) − 81 δ(n − 2) + 14 δ(n − 3) + δ(n − 4)
Solution: h(n) = {1, 14 , −1/8, + 14 , 1}. Here M=5 h(0) = h(4), h(1) = h(3)
1 1 1
h(n) = δ(n) + δ(n − 1) − δ(n − 2) + δ(n − 3) + δ(n − 4)
4 8 4
1 1 1
H(z) = 1 + z −1 − z −2 + z −3 + z −4
4 8 4
 
1 1 1
Y (z) = X (z)H(z) = 1 + z −1 − z −2 + z −3 + z −4 X (z)
4 8 4
1 −1 1 −2 1 −3
Y (z) = X (z) + z X (z) − z X (z) + z X (z) + z −4 X (z)
4 8 4
1 1 1
y (n) = x(n) + x(n − 1) − x(n − 2) + x(n − 3) + x(n − 4)
4 8 4
1 1
y (n) = [x(n) + x(n − 4)] + [x(n − 1) + x(n − 3)] − x(n − 2)
4 8

x ( n) x( n − 1) x(n − 2)
Z-1 Z-1

+ +

Z-1 Z-1
x(n − 4) x(n − 3)
1 1
1 −
4 8
y ( n)
+ +
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 25 / 151
Realization of FIR system Linear Phase FIR structure

May 2010 Realize a linear phase FIR filter having the following impulse response
h(n) = δ(n) − 14 δ(n − 1) + 21 δ(n − 2) + 12 δ(n − 3) − 14 δ(n − 4) + δ(n − 5)
Solution: h(n) = {1, − 41 , 12 , 12 , − 14 , 1}. Here M=6 h(0) = h(5), h(1) = h(4), h(2) = h(3)
1 1 1 1
h(n) = δ(n) − δ(n − 1) + δ(n − 2) + δ(n − 3) − δ(n − 4) + δ(n − 5)
4 2 2 4
1 1 1 1
H(z) = 1 − z −1 + z −2 + z −3 − z −4 + z −5
4 2 2 4
 
1 1 1 1
Y (z) = X (z)H(z) = 1 − z −1 + z −2 + z −3 − z −4 + z −5 X (z)
4 2 2 4
1 −1 1 −2 1 −3 1
Y (z) = X (z) − z X (z) + z X (z) + z X (z) − z −4 X (z) + z −5 X (z)
4 2 2 4
1 1 1 1
y (n) = x(n) − x(n − 1) + x(n − 2) + x(n − 3) − x(n − 4) + x(n − 5)
4 2 2 4
1 1
y (n) = [x(n) + x(n − 5)] − [x(n − 1) + x(n − 4)] + [x(n − 2) + x(n − 3)]
4 2

x ( n) x(n − 1) x(n − 2)
Z-1 Z-1

+ + + Z-1

-1 -1
Z Z
x( n − 5) x(n − 4) x(n − 3)
1 1 1
− 2
4
y ( n)
+ + +

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 26 / 151
Realization of FIR system Linear Phase FIR structure

May 2010
Obtain the direct form Realization of linear phase FIR system given by
H(z) = 1 + 23 z −1 + 15
8
z −2 + 32 z −3 + z −4
Solution: h(n) = {1, 3 , 15/8, 23 , 1}. Here M=5 h(0) = h(4), h(1) = h(3)
2

2 −1 15 −2 2
H(z) = 1+ z + z + z −3 + z −4
3 8 3
 
2 15 −2 2
Y (z) = X (z)H(z) = 1 + z −1 + z + z −3 + z −4 X (z)
3 8 3
2 −1 15 −2 2 −3
Y (z) = X (z) + z X (z) + z X (z) + z X (z) + z −4 X (z)
3 8 3
2 15 2
y (n) = x(n) + x(n − 1) + x(n − 2) + x(n − 3) + x(n − 4)
3 8 3
2 15
y (n) = [x(n) + x(n − 4)] + [x(n − 1) + x(n − 3)] + x(n − 2)
3 8

x ( n) x( n − 1) x(n − 2)
Z-1 Z-1

+ +

Z-1 Z-1
x(n − 4) x(n − 3)
2 15
1
3 8
y ( n)
+ +
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 27 / 151
Realization of FIR system Linear Phase FIR structure

Realize the following system function by linear phase FIR structure


2 2
H(z) = z + 1 + z −1
3 3

Solution:
2
H(z) = 1 + (z + z −1 )
3
 
2
Y (z) = X (z)H(z) = 1 + (z + z −1 ) X (z)
3
2
Y (z) = X (z) + (z + z −1 )X (z)
3
2
y (n) = x(n) + [x(n − 1) + x(n + 1)]
3

x ( n)
+ y ( n)
2
x( n + 1) 3
Z +

Z-1
x( n − 1)

Figure 8: Linear phase FIR structure


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 28 / 151
Realization of FIR system Linear Phase FIR structure

Realize the following system function by linear phase FIR structure


z −1 z −2
H(z) = 1 + + + z −3
4 4

Solution:
1 −1
H(z) = 1 + (z + z −2 ) + z −3
4
 
1
Y (z) = X (z)H(z) = 1 + (z −1 + z −2 ) + z −3 X (z)
4
1 −1
= X (z) + (z X (z) + z −2 X (z)) + z −3 X (z)
4
1
y (n) = [x(n) + x(n − 3)] + [x(n − 1) + x(n − 2)]
4

x( n) x( n − 1)
Z-1

Z-1
+ +

Z-1
x(n − 3) x( n − 2)
h(0)=1 1
h(1) =
4
y ( n)
+

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 29 / 151
Realization of FIR system Linear Phase FIR structure

Realize the following system function by linear phase FIR structure: h(n) = [1, 2, 3, 4, 3, 2, 1]
Solution:
H(z) = 1 + 2z −1 + 3z −2 + 4z −3 + 3z −4 + 2z −5 + 1z −6

X (z)H(z) = 1 + 2z −1 + 3z −2 + 4z −3 + 3z −4 + 2z −5 + 1z −6 X (z)
 
Y (z) =
= X (z) + 2z −1 X (z) + 3z −2 X (z) + 4z −3 X (z) + 3z −4 X (z) + 2z −5 X (z) + 1z −6 X (z)
y (n) = x(n) + 2x(n − 1) + 3x(n − 2) + 4x(n − 3) + 3x(n − 4) + 2x(n − 5) + 1x(n − 6)
y (n) = 1[x(n) + x(n − 6)] + 2[x(n − 1) + x(n − 5)] + 3[x(n − 2) + x(n − 4)] + 4x(n − 3)

x ( n) x( n − 1) x(n − 2) x( n − 3)
Z-1 Z-1 Z-1

+ + +

Z-1 Z-1 Z-1


x(n − 6) x(n − 5) x(n − 4)
1 2 3 4

y ( n)
+ + +

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 30 / 151
Realization of FIR system Linear Phase FIR structure

Realize a direct form for the following linear phase filters

h(n) = [1, 2, 3, 3, 2, 1]

Solution:
H(z) = 1 + 2z −1 + 3z −2 + 3z −3 + 2z −4 + 1z −5 ]

X (z)H(z) = 1 + 2z −1 + 3z −2 + 3z −3 + 2z −4 + 1z −5 X (z)
 
Y (z) =
= X (z) + 2z −1 X (z) + 3z −2 X (z) + 3z −3 X (z) + 2z −4 X (z) + 1z −5 X (z)
y (n) = x(n) + 2x(n − 1) + 3x(n − 2) + 3x(n − 3) + 2x(n − 4) + 1x(n − 5)
y (n) = 1[x(n) + x(n − 5)] + 2[x(n − 1) + x(n − 4)] + 3[x(n − 2) + x(n − 3)]

x ( n) x(n − 1) x(n − 2)
Z-1 Z-1

Z-1
+ + +
Z-1 Z-1
x( n − 5) x(n − 4) x(n − 3)
1 2 3
y ( n)
+ + +

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 31 / 151
Realization of FIR system Frequency Sampling for FIR Systems

Frequency Sampling for FIR Systems

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 32 / 151
Realization of FIR system Frequency Sampling for FIR Systems

Frequency sampling realization is used when an FIR filter is to operate on some desired
frequency.
The desired frequency may be defined and this reduces the complexity of the system.
Consider a frequency ω

ωk = k k = 0, 1, . . . M − 1
M

where ωk is the frequency at discrete points.


Let the unit sample response of FIR system be h(n). The fourier transform of the h(n) is
defined as
M−1
X
H(ω) = h(n)e −jωn
n=0


H(ω) at ω= ωk = M
k
  M−1
2π X
H(ωk ) = H k = h(n)e −j2πkn/M
M n=0

H(ωk ) is also written as H(k) and defined as


M−1
X
H(k) = h(n)e −j2πkn/M k = 0, 1, . . . M − 1
n=0

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 33 / 151
Realization of FIR system Frequency Sampling for FIR Systems

This equation represents the M point DFT of h(n) and it is defined as


M−1
1 X
h(n) = H(k)e j2πkn/M n = 0, 1, . . . M − 1
M n=0

z transform is defined as
M−1
X
H(z) = h(n)z −n
n=0

substituting the value of h(n)


M−1 M−1
!
X 1 X
H(z) = H(k)e j2πkn/M z −n
n=0
M n=0

Interchanging the order of summations in the above equation


M−1 M−1
!n
X 1 X j2πk/M −1
H(z) = H(k) e z
n=0
M n=0

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 34 / 151
Realization of FIR system Frequency Sampling for FIR Systems

The geometric series formula is

N
X 1 − aN+1
an =
n=0
1−a

Using the formula where a = e 2πkn/M z −1

M−1 M
X 1 1 − e j2πk/M z −1
H(z) = H(k)
k=0
M 1 − e j2πk/M z −1
M−1
X 1 1 − e j2πk z −M
= H(k)
k=0
M 1 − e j2πk/M z −1

e j2πk = cos(2πk) + jsin(2πk) = 1

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 35 / 151
Realization of FIR system Frequency Sampling for FIR Systems

M−1
X 1 1 − z −M
H(z) = H(k)
k=0
M 1 − e j2πk/M z −1
M−1
1 − z −M X H(k)
H(z) =
M k=0
1 − e j2πk/M z −1

The equation can be considered as multiplication of two systems and defined as

H(z) = H1 (z).H2 (z)

where

1 − z −M
H1 (z) =
M

M−1
X H(k)
H2 (z) =
k=0
1 − e j2πk/M z −1

H1 (z) and H2 (z) are realized independently. H(z) is obtained by multiplication of H1 (z)
and H2 (z).
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 36 / 151
Realization of FIR system Frequency Sampling for FIR Systems

M−1
1 − z −M X H(k)
H(z) = j2πk/M z −1
M k=0
1 − e

Realization
of H2(z)

+ +
H(0)

Z-1
Realization
1
of H1(z)

+ +
H(1)
1
x ( n) M Z-1
+ e j 2π / M
-
Z-M + +
H(2)

Z-1
e j 4π / M

+ + y ( n)
H(M-1)

-1
Z
e j 2π ( M −1)/ M

Figure 9: Frequency sampling FIR structure

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 37 / 151
Realization of FIR system Frequency Sampling for FIR Systems

Determine the transfer function H(z) of an FIR filter to implement


h(n) = δ(n) + 2δ(n − 1) + δ(n − 2). Using frequency sampling technique

Solution:
h(0) = 1, h(1) = 2, h(2) = 1 The DFT of h(n)
M−1
X
H(k) = h(n)e −j2πkn/M
n=0
With M=3
2
X
H(k) = h(n)e −j2πkn/3
n=0

2
X
H(k) = h(n)e −j2πkn/3
n=0

= h(0) + h(1)e −j2πk/3 + h(2)e −j4πk/3


k=0,1,2

H(0) = 1+2+1=4
H(1) = 1 + 2e −j2π/3 + e −j4π/3 = −0.5 − j0.866 = e −j2π/3
H(2) = 1 + 2e −j4π/3 + e −j8π/3 = −0.5 − j0.866 = e −j2π/3

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 38 / 151
Realization of FIR system Frequency Sampling for FIR Systems

The system function is


M−1
1 − z −M X H(k)
H(z) = 2πk/M z −1
M k=0
1 − e

For M=3

2
1 − z −3 X H(k)
H(z) = 2πk/3 z −1
3 k=0
1 − e
1−z −3 
H(0) H(1) H(2)

= −1
+ −j2π/3 −1
+ −j4π/3 −1
3 1−z 1−e z 1−e z
= H1 (z) × H2 (z)

where

1 − z −3
H1 (z) =
3
" #
4 e −j2π/3 e −j4π/3
H2 (z) = + +
1 − z −1 1 − e −j2π/3 z −1 1 − e −j4π/3 z −1

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 39 / 151
Realization of FIR system Frequency Sampling for FIR Systems

+ +
4

Z-1
1 1
x ( n) 3 y ( n)
+ + +
e − j 2π /3
Z-3 Z-1
j 2π /3
e

+ +
e − j 4π /3

Z-1
j 4π /3
e

Figure 10: Frequency sampling FIR structure

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 40 / 151
Realization of IIR system Realization of IIR system

Realization of IIR system


Direct form structure for IIR system
1 Direct form-I structure of IIR system
2 Direct form-II structure of IIR system

Cascade form structure for IIR system


Parallel form structure for IIR system
Lattice structure of IIR system

An Infinite Impulse Response (IIR) filters are digital filters with infinite impulse response.
Unlike FIR filters, they have the feedback (a recursive part of a filter) and are known as
recursive digital filters therefore.
IIR filters are computationally more efficient than FIR filters as they require fewer
coefficients due to the fact that they use feedback.
If the coefficients deviate from their true values then the feedback can make the filter
unstable.

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 41 / 151
Realization of IIR system Realization of IIR system
LTI systems are represented by the following
difference equation.

N M
X X The general expression of an IIR
y (n) = − ak y (n − k) + bk x(n − k) filter can be expressed as follows:
k=1 k=0
M
−k
P
bk z
By taking z-transform on both sides k=0
H(z) =
N
ak z −k
P
N
X M
X 1+
Y (z) = − ak z −k Y (z) + bk z −k X (z) k=1

k=1 k=0
M
X
" N
# M
H1 (z) = bk z −k
X X
−k −k k=0
Y (z) 1 + ak z = bk z X (z)
k=1 k=0 1
H2 (z) =
N
ak z −k
P
The system function H(z) is defined as 1+
k=1

M
P
bk z −k H(z) = H1 (z).H2 (z)
Y (z) k=0
H(z) = =
X (z) N
ak z −k
P
1+
k=1

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 42 / 151
Realization of IIR system Direct form-I Structure of IIR System

Direct form Structure of IIR System


Structures in which the multiplier coefficients are precisely the coefficients of the transfer
function are called direct form structure.
The direct form structures for H1 (z) H2 (z) are

M
X
H1 (z) = bk z −k y1 (n)
x ( n) b0
k=0 +
= b0 + b1 z −1 + . . . bM z −M
Z-1
b1
H1 (z) is defined as +

Y1 (z) Z-1
H1 (z) =
X1 (z) b2
+
−1 −M
Y1 (z) = b0 X1 (z)+b1 z X1 (z)+. . . bM z X1 (z)

Z-1
bM
Its inverse z transform is

y1 (n) = b0 x1 (n)+b1 x1 (n−1)+. . . bM x1 (n−M)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 43 / 151
Realization of IIR system Direct form-I Structure of IIR System
H2 (z) is the all pole system and is given by

1 y2 ( n)
H2 (z) = x2 ( n)
N +
z −k
P
1+ ak
k=1
Z-1
-a1
+
H2 (z) is also expressed in terms of system function
Z-1
Y2 (z) 1 -a2
H2 (z) = =
X2 (z) N +
ak z −k
P
1+
k=1
N
X
Y2 (z)[1 + ak z −k ] = X2 (z)
k=1 Z-1
-aN
N
X
Y2 (z) = − ak z −k Y2 (z) + X2 (z)
k=1
Expanding the above function

Y2 (z) = −a1 z −1 Y2 (z) − a2 z −2 Y2 (z) − a3 z −3 Y2 (z) + . . . − aN z −N Y2 (z) + X2 (z)


Its inverse z transform is
y2 (n) = −a1 y2 (n − 1) − a2 y2 (n − 2) − a3 y2 (n − 3) − . . . − aN y2 (n − N) + x2 (n)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 44 / 151
Realization of IIR system Direct form-I Structure of IIR System

x(n) = x1 (n) Y1 ( z ) y1 (n) = x2 (n) Y2 ( z ) y 2 ( n) = y ( n )


H1 ( z ) = H 2 ( z) =
X1 ( z) X 2 ( z)

Figure 11: Direct form I realization of IIR system

x(n) = x1 (n) b0 y1 (n) x (n) y 2 (n ) = y (n )


+ 2
+

Z-1 Z-1
b1 -a1
+ +

Z-1 Z-1
b2 -a2
+ +

-1
Z Z-1
b3 -a3
+ +

bM-1 -aN-1
+ +
Z-1 Z-1
bM -aN

All zero system All pole system

Figure 12: Direct form I realization of IIR system


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 45 / 151
Realization of IIR system Direct form II structure for IIR system

Direct form-II Structure of IIR System


Direct form II is also called as canonic form because the number delay elements is same as
the order of difference equation.
M
−k
P
bk z
k=0
H(z) =
N
ak z −k
P
1+
k=1

Y (z) Y (z) W (z) W (z) Y (z)


H(z) = = = = H1 (z).H2 (z)
X (z) X (z) W (z) X (z) W (z)
W (z) 1
H1 (z) = =
X (z) N
ak z −k
P
1+
k=1

N
X
W (z)[1 + ak z −k ] = X (z)
k=1
N
X
W (z) = X (z) − ak z −k W (z)
k=1

= X (z) − a1 z −1 W (z) − a2 z −2 W (z) − − . . . aN z −N W (z)


w (n) = x(n) − a1 w (n − 1) − a2 w (n − 2) − . . . − aN w (n − N)
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 46 / 151
Realization of IIR system Direct form II structure for IIR system

M
Y (z) X
H2 (z) = = bk z −k
W (z) k=0

M
X
Y (z) = bk z −k W (z)
k=0

= b0 W (z) + b1 z −1 W (z) + b2 z −2 W (z) + . . . + bM z −M W (z)

By inverse z transform

y (n) = b0 w (n) + b1 w (n − 1) + b2 w (n − 2) + . . . + bM w (n − M)

w( n ) b0 y ( n)
x ( n) w( n ) +
+
Z-1
Z-1 b1
-a1 +
+
Z-1
Z-1 b2
-a2 +
+
Z-1

-aN Z-1
bM

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 47 / 151
Realization of IIR system Direct form II structure for IIR system

x ( n) W ( z) w(n) Y ( z) y ( n)
H1 ( z ) = H 2 (z) =
X ( z) W ( z)

Figure 13: Cascade connection of H1 (z) H2 (z)

x( n) w( n ) b0 y ( n) x( n) w( n ) b0 y ( n)
+ + + +

Z-1 Z-1 Z-1


-a1 b1 -a1 b1
+ + + +
-1 -1
Z Z
Z-1
-a2 b2
+ + -a2 b2
+ +
-1 -1
Z Z
-a3 b3 Z -1
-a3 b3
+ +
+ +

-aN-1 bM-1
+ + -aN-1 bM-1
+ +
Z-1 Z-1
-aN bM
Z-1
-aN bM
All zero system All pole system

Figure 14: Direct form-II Structure Figure 15: Direct form-II Structure

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 48 / 151
Realization of IIR system Direct form II structure for IIR system

A difference equation describing a filter is given below

3 1 1
y (n) − y (n − 1) + y (n − 2) = x(n) + x(n − 1)
4 8 2

Draw the direct form I and direct form II structures

Solution:
3 1 1
y (n) = y (n − 1) − y (n − 2) + x(n) + x(n − 1)
4 8 2

1 y ( n) x ( n) w( n ) 1 y ( n)
x ( n)
+ + + +

3 Z-1
Z-1 3 Z-1 1
0.5 4
4 2
+ + +

1 Z-1
− 1 Z-1
8 −
8

Figure 16: Direct form-I Figure 17: Direct form-II

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 49 / 151
Realization of IIR system Direct form II structure for IIR system

[July 2013]:
y (n) = −0.1y (n − 1) + 0.2y (n − 2) + 3x(n) + 3.6x(n − 1) + 0.6x(n − 2)obtain the the direct
form I and direct form II structures

Solution:

y (n) = −0.1y (n − 1) + 0.2y (n − 2) + 3x(n) + 3.6x(n − 1) + 0.6x(n − 2)

x ( n) 3 y (n)x(n) w( n ) 3 y ( n)
+ + + +

Z-1 Z-1 Z-1


3.6 −0.1 -0.1 3.6
+ + + +

Z-1 Z-1 Z-1


0.6 0.2
0.2 0.6

Figure 18: Direct form-I Figure 19: Direct form-II

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 50 / 151
Realization of IIR system Direct form II structure for IIR system

June 2010 EC
Obtain direct form I and direct form II for the system described by

y (n) = −0.1y (n − 1) + 0.72y (n − 2) + 0.7x(n) − 0.252x(n − 2)

Solution:
y (n) = −0.1y (n − 1) + 0.72y (n − 2) + 0.7x(n) − 0.252x(n − 2)

x ( n) 0.7 y ( n) x ( n) w( n ) 0.7 y ( n)
+ + + +

Z-1 Z-1 Z-1


−0.1 -0.1
x( n − 1) y (n − 1)
+ +
-1
Z
-0.252 Z-1 Z-1
x(n − 2) 0.72 y ( n − 2) 0.72 -0.252

Figure 20: Direct form-I Figure 21: Direct form-II

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 51 / 151
Realization of IIR system Direct form II structure for IIR system

A system is represented by transfer function H(z) is given by

4z 2
H(z) = 3 + 1
− 1
z− 2
z− 4

(i) Does this H(z) represent a FIR or IIR filter ? Why ?


(ii) Give a difference equation realization of this system using direct form I
(iii) Draw the block diagram for the direct form II canonic realization, and give the
governing equations for implementation
Solution:

4z 2 4z 2
H(z) = 3+ 1
− 1
=3+ −
z− 2
z− 4
z − 0.5 z − 0.25
7z 2 − 5.25z + 1.375
=
z 2 − 0.75z + 0.125

(i): By observing the system function it has numerator of polynomial of order 2 as well as
denominator of polynomial of order 2. The system function has poles as well zeros, hence it
represents IIR filter.

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 52 / 151
Realization of IIR system Direct form II structure for IIR system

(ii): Direct form I

7z 2 − 5.25z + 1.375 7 − 5.25z −1 + 1.375z −2 Y (Z )


H(z) = = =
z 2 − 0.75z + 0.125 1 − 0.75z −1 + 0.125z −2 X (Z )

Y (Z )[1 − 0.75z −1 + 0.125z −2 ] = 7X (Z ) − 5.25z −1 X (Z ) + 1.375z −2 X (Z )

y (n) − 0.75y (n − 1) + 0.125y (n − 2) = 7x(n) − 5.25x(n − 1) + 1.375x(n − 2)

y (n) = 0.75y (n − 1) − 0.125y (n − 2) + 7x(n) − 5.25x(n − 1) + 1.375x(n − 2)

x ( n) 7 y ( n)
+ +

Z-1 Z-1
-5.25
0.75
+ +

Z-1 Z-1
1.375 -1.25

Figure 22: Direct form-I Structure

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 53 / 151
Realization of IIR system Direct form II structure for IIR system

(iii): Direct form II canonic realization

7 − 5.25z −1 + 1.375z −2 Y (z)


H(z) = =
1 − 0.75z −1 + 0.125z −2 X (z)

Y (z) W (z) 7 − 5.25z −1 + 1.375z −2


H(z) = =
W (z) X (z) 1 − 0.75z −1 + 0.125z −2

1
H(z) = H1 (z).H2 (z) = [7 − 5.25z −1 + 1.375z −2 ]
1 − 0.75z −1 + 0.125z −2

W (z) 1
H1 (z) = =
X (z) 1 − 0.75z −1 + 0.125z −2
x( n) w( n )
+
W (z)[1 − 0.75z −1 + 0.125z −2 ] = X (z)
Z-1
0.75
+
W (z) = X (z)+0.75z −1 W (z)−0.125z −2 W (z)
Taking inverse z transform Z-1
-1.25

w (n) = x(n) + 0.75w (n − 1) − 0.125w (n − 2)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 54 / 151
Realization of IIR system Direct form II structure for IIR system

Y (z)
H2 (z) = = 7 − 5.25z −1 + 1.375z −2
W (z) w( n ) 7 y ( n)
+

Y (z) Z-1
= 7 − 5.25z −1 + 1.375z −2 -5.25
W (z)
+
Y (z) = 7W (z) − 5.25z −1 W (z) + 1.375z −2 W (z)
Z-1
Taking inverse z transform 1.375

y (n) = 7w (n) − 5.25w (n − 1) + 1.375w (n − 2) Figure 23: Direct form of H2 (z)

x( n) w( n ) 7 y ( n) x( n) w( n ) 7 y ( n)
+ + + +

Z-1 Z-1 Z-1


-5.25 0.75 -5.25
0.75
+ + + +

Z-1 Z-1 Z-1


-1.25 1.375
-0.125 1.325

Figure 24: Realization of H(z) = H1 (z).H2 (z) Figure 25: Direct form-II, canonic form

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 55 / 151
Realization of IIR system Direct form II structure for IIR system

2012 DEC, 2012 June


Obtain the direct form II (canonic) realization for the following system.

(z − 1)(z 2 + 5z + 6)(z − 3)
H(z) =
(z 2 + 6z + 5)(z 2 − 6z + 8)

x ( n) w( n ) y ( n)
+ +
Solution:
Z-1
(z − 1)(z 2 + 5z + 6)(z − 3) 1
H(z) = +
(z 2 + 6z + 5)(z 2 − 6z + 8)
(z 2 − 4z + 3)(z 2
+ 5z + 6) Z-1
= 23
(z 2 + 6z + 5) + (z 2 − 6z + 8) -11
+ +
z 4 + z 3 − 11z 2 − 9z + 18
=
z 4 − 23z 2 + 18z + 40 Z-1
1 + z −1 − 11z −2 − 9z −3 + 18z −4 −18 -9
= + +
1 − 23z −2 + 18z −3 + 40z −4 -1
Z
−40 18

Figure 26: Direct form-II

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 56 / 151
Realization of IIR system Direct form II structure for IIR system

2011 July
Obtain the direct form II realizations of the following system.
(1 + z −1 )
H(z) = 1 −1
(1 − 4
z )(1 − z −1 + 12 z −2 )
Solution:

(1 + z −1 )
H(z) = 5 −1
(1 − 4
z + 34 z −2 − 18 z −3 )
1 (1 + z −1 )
= 5 −1 3 −2 1 −3
× = H1 (z) × H2 (z)
(1 − 4
z + 4
z − 8
z ) 1

W (z) 1
H1 (z) = =
X (z) (1 − 45 z −1 + 34 z −2 − 81 z −3 )
5 −1 3 1
W (z)[1 − z + z −2 − z −3 ] = X (z)
4 4 8

5 −1 3 1
W (z) = X (z) + z W (z) − z −2 W (z) + z −3 W (z)
4 4 8
5 3 1
w (n) = x(n) + w (n − 1) − w (n − 2) + w (n − 3)
4 4 8
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 57 / 151
Realization of IIR system Direct form II structure for IIR system

H2 (z) = (1 + z −1 )

Y (z)
H2 (z) = = (1 + z −1 )
W (z)
Y (z) = W (z) + z −1 W (z)
y (n) = w (n) + w (n − 1)

x( n) w( n ) 1 y ( n)
y ( n)
x( n)
+
w(n) 1
+ + +

5 5
Z-1 Z-1 Z-1 -1
4 4
+ -1 +
3 Z-1 Z-1
− 3
4 −
4

1 Z-1
8 1 Z-1
8

Figure 27: Direct form-II


Figure 28: Direct form-II

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 58 / 151
Realization of IIR system Direct form II structure for IIR system

June 2010 EE

Realize the following system function in direct form I

1 + 15 z −1
H(z) = 1 −1
(1 − 2
z + 13 z −2 )(1 + 14 z −1 ) x ( n) 1
+ +
y ( n)

Solution: Z-1 1 Z-1


5 −
4 y (n − 1)
x(n − 1)
+
1 + 51 z −1
H(z) = 5 Z-1
(1 − 12 z −1 + 13 z −2 )(1 + 41 z −1 ) 24 y ( n − 2)
+
Y (z) 1 + 15 z −1
H(z) = =
X (z) (1 − 14 z −1 + 5 −2
24
z + 1 −3
12
z ) −
1 Z-1
12 y (n − 3)

Figure 29: Direct form-I

1 −1 5 −2 1 −3
Y (z) − z Y (z) + z Y (z) − z Y (z) = X (z) + 5z −1 X (z)
4 24 12
By taking inverse Z transform on both sides
1 5 1
y (n) − y (n − 1) + y (n − 2) − y (n − 3) = x(n) + 5x(n − 1)
4 24 12
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 59 / 151
Realization of IIR system Direct form II structure for IIR system
8Z 3 −4Z 2 +11Z −2
Obtain direct form II for the system described by H(z) = [December 2010 EC]
(Z − 14 )(Z 2 −Z + 21 )

Solution:
x ( n) w( n ) 8 y ( n)
+ +

Z-1
1.25
-4
8Z 3 − 4Z 2 + 11Z − 2 Y (z) + +
H(z) = =
(Z − 14 )(Z 2 − Z + 12 ) X (z)
Z-1
8Z 3 − 4Z 2 + 11Z − 2 -0.75 11
= + +
Z − 1.25Z 2 + 0.75Z − 0.125
3

8 − 4Z −1 + 11Z −2 − 2Z −3 Z-1
=
1 − 1.25Z −1 + 0.75Z −2 − 0.125Z −1 0.125 -2

Figure 30: Direct form-II


By taking inverse Z transform on both sides

y (n) − 1.25y (n − 1) + 0.75y (n − 2) − 0.125y (n − 3) = 8x(n) − 4x(n − 1) + 11x(n − 2) − 2x(n − 3)

y (n) = 8x(n) − 4x(n − 1) + 11x(n − 2) − 2x(n − 3) + 1.25y (n − 1) − 0.75y (n − 2) + 0.125y (n − 3)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 60 / 151
Realization of IIR system Direct form II structure for IIR system

Obtain direct form II for the system described by

(z − 1)(z − 2)(z + 1)z


H(z) =
[z − ( 12 + j 12 )][z − ( 12 − j 12 )](z − 4j )(z + 4j )

[December 2010 EC]


Solution:

Y (z) (Z 2 − 1)(Z 2 − 2Z )
H(z) = =
X (z) (Z 2 − Z + 12 )(Z 2 + 1
16
)
Z4 − 2Z 3 − Z2 + 2Z
= 9 2 1 1
Z4 − Z3 + 16
Z − 16 Z + 32
1− 2Z −1 − Z −2 + 2Z −3
=
9 −2 1 −3 1 −4
1 − Z −1 + 16
− 16
Z + 32
Z

By taking inverse Z transform on both sides

9 1 1
y (n) − y (n − 1) + y (n − 2) − y (n − 3) + y (n − 4) = x(n) − 2x(n − 1) − x(n − 2) + 2x(n − 3)
16 16 32
9 1 1
y (n) = x(n) − 2x(n − 1) − x(n − 2) + 2x(n − 3) + y (n − 1) − y (n − 2) + y (n − 3) − y (n − 4)
16 16 32
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 61 / 151
Realization of IIR system Direct form II structure for IIR system

x ( n) w( n ) 1 y ( n)
x ( n) 1 y ( n) + +
+ +
Z-1 Z-1
1 Z-1 1
-2 y (n − 1) -2
+ + + +
x(n − 1)
9 Z-1
Z-1 −
16 y ( n − 2) 9 Z-1
-1 −
x( n − 2) + + 16 -1
+ +
Z-1 1 Z-1
2
16 y ( n − 3) 1 Z-1
x(n − 3) + 16 2
+
1 Z-1
− 1 Z -1
32 −
y (n − 4) 32

Figure 31: Direct form-I Figure 32: Direct form-II

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 62 / 151
Realization of IIR system Direct form II structure for IIR system

Realize direct form-I and form -II for linear time invariant system which is described by the
following input output relation
2y (n) − y (n − 2) − 4y (n − 3) = 3x(n − 2)

Solution:

y (n) = 0.5y (n − 2) + 2y (n − 3) + 1.5x(n − 2)

x ( n) w( n ) y ( n)
+
x ( n) y ( n)
+
Z-1

Z-1 Z-1

Z-1 Z-1
Z-1 0.5
1.5 0.5 1.5
+ +

Z-1 Z-1
2 2

(a) Direct form-I (b) Direct form-II

Figure 33: Realization of IIR systems

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 63 / 151
Realization of IIR system Direct form II structure for IIR system

Realize direct form-I and form -II for system given by


z −1 − 3z −2
H(z) =
(10 − z −1 )(1 + 0.5z −1 + 0.5z −2 )
Solution:
z −1 − 3z −2 z −1 − 3z −1
H(z) = =
(10 − z −1 )(1+ 0.5z −1 −2
+ 0.5z ) (10 + 4z −1 + 4.5z −2 − 0.5z −3 )
Y (z) 0.1z −1 − 0.3z −1
=
X (z) (1 + 0.4z −1 + 0.45z −2 − 0.05z −3 )
By taking inverse z transform on both sides
y (n) + 0.4y (n − 1) + 0.45y (n − 2) − 0.05y (n − 3) = 0.1x(n − 1) − 0.3x(n − 2)
y (n) = −0.4y (n − 1) − 0.45y (n − 2) + 0.05y (n − 3) + 0.1x(n − 1) − 0.3x(n − 2)

x ( n) w( n )
+
x ( n) y ( n)
+
Z-1
−0.4 y ( n)
0.1
Z-1
0.1 −0.4
Z-1 + +
+ +
Z-1 Z-1
Z-1 −0.45
−0.45 -0.3
-0.3
+ +

Z-1 Z-1
0.05
0.05

(a) Direct form-I (b) Direct form-II


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 64 / 151
Realization of IIR system Cascade Form Structure

Cascade Form Structure

M
−k
P
bk z
k=0 b0 + b1 z −1 + b2 z −2 + bM z −M
H(z) = =
N 1 + a1 z −1 + a2 z −2 + aN z −N
ak z −k
P
1+
k=1

The system can be factored into a cascade of second order subsystems such that H(z) can be
expressed as
K
Y
H(z) = H1 (z) × H2 (z) × H3 (z) . . . × Hk (z) = Hk (z)
k=1
where K is the integer part of (N+1)/2 and Hk (z) has the general form
bk0 + bk1 z −1 + bk2 z −2
Hk (z) =
1 + ak1 z −1 + ak2 z −2

x(n) = x1 (n) y1 (n) = x2 (n) y2 (n) = x3 (n) yk −1 (n) = y k ( n) = y ( n )


H1(z) H2(z) Hk(z)
xk (n)

Figure 35: Cascade realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 65 / 151
Realization of IIR system Cascade Form Structure
In cascade each Hk (z) are represented as

Yk (z)
Hk (z) =
Xk (z)
yk −1 (n) = x(n) w( n ) bk 0 yk (n) = xk +1 (n)
Wk (z) Yk (z) + +
=
Xk (z) Wk (z)
Z-1
− ak 1 bk1
= Hk1 (z).Hk2 (z) + +

where Hk1 (z) and Hk2 (z) defined as − ak 2


Z -1
bk 2

Wk (z) 1 Figure 36: Cascade realization


Hk1 (z) = =
Xk (z) 1 + ak1 z −1 + ak2 z −2

Hk2 (z) = bk0 + bk1 z −1 + bk2 z −2

wk (n) = −ak1 wk (n − 1) − ak2 wk (n − 2) + −yk−1 (n)


yk (n) = bk0 wk (n) + bk1 wk (n − 1) + bk2 wk (n − 2)
yk−1 (n = xk (n)
yk (n) = xk+1 (n)
y0 (n) = x(n)
y (n) = xk (n)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 66 / 151
Realization of IIR system Cascade Form Structure

June 2010 EE
Realize the following system function in cascade form

1 + 15 z −1
H(z) = 1 −1
(1 − 2
z + 31 z −2 )(1 + 14 z −1 )

Solution:
1 1 + 51 z −1
H(z) = H1 (z) × H2 (z) = 1 −1
.
(1 + 4
z ) (1 − 12 z −1 + 31 z −2 )

x( n) 1 y ( n)
+ + +
b20

Z-1 1 1
1 Z-1
− 2 5
4
+ −a
−a11 1 21 b21

3
Z-1
−a22

Figure 37: Cascade realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 67 / 151
Realization of IIR system Cascade Form Structure

Realize the following system function in cascade form

1 − 12 z −1
H(z) = 1 −1 1 −2
(1 − 4
z + 2
z )(1 − 51 z −1 + 16 z −2 )

Solution:
1 1 − 21 z −1
H(z) = H1 (z) × H2 (z) = 1 −1 1 −2
.
(1 − 5
z + 6
z ) (1 − 14 z −1 + 12 z −2 )

x ( n) 1 y ( n)
+ + +

Z-1 1 1
1 Z-1 −
5 4 2
+ +
1

2
Z-1 Z-1
1

6

Figure 38: Cascade realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 68 / 151
Realization of IIR system Cascade Form Structure

Realize the following system function in cascade form

1 + 13 z −1
H(z) =
(1 − 15 z −1 )(1 − 43 z −1 + 18 z −2 )

Solution:
1 1 + 31 z −1
H(z) = H1 (z) × H2 (z) = 1 −1
×
(1 − 5
z ) (1 − 34 z −1 + 81 z −2 )

x ( n) 1 y ( n)
+ + +

1 Z-1 3 1
Z-1
5 4 3
+
1

8
Z-1

Figure 39: Cascade realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 69 / 151
Realization of IIR system Cascade Form Structure

The transfer function of a discrete system is given as follows

1 − z −1
H(z) =
(1 − 0.2z −1 − 0.15z −2 )

Draw the cascade realization


Solution:
1
H(z) = H1 (z) × H2 (z) = (1 − z −1 )
(1 − 0.2z −1 − 0.15z −2 )

H2 (z)
x ( n) H1 ( z ) 1 y ( n)
+ +

Z-1 0.2 Z-1


-1
+
0.15
Z-1

Figure 40: Cascade realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 70 / 151
Realization of IIR system Cascade Form Structure

December 2010 EE
Draw the cascade realization for the following system

y (n) = 0.75y (n − 1) − 0.125y (n − 2) + 6x(n) + 7x(n − 1) + x(n − 2)

Solution:

Y (z) = 0.75z −1 Y (z) − 0.125z −2 Y (z) + 6X (z) + 7z −1 X (z) + z −2 X (z)

Y (z) 6 + 7z −1 + z −2
H(z) = =
X (z) 1 − 0.75z −1 + 0.125z −2
a = 1, b = −0.75, c = 0.125
Roots of the quadratic equation for
Y (z) 6+ 7z −1
+ z −2 ax 2 +qbx + c = 0 are
H(z) = = −b± b 2 −4ac
X (z) 1 − 0.75z −1 + 0.125z −2 2a

6z 2 + 7z + 1
=
p
0.75 ± 0.752 − 4(0.125)
z2 − 0.75z + 0.125 =
2
(6z + 1)(z + 1) √
= 0.75 ± 0.0625 0.75 ± 0..25
(z − 0.5)(z − 0.25) = =
2 2
(6 + z −1 )(1 + z −1 ) = ⇒ 0.5, 0.25
= = H1 (z) × H2 (z)
(1 − 0.5z −1 )(1 − 0.25z −1 )

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 71 / 151
Realization of IIR system Cascade Form Structure

6 + z −1
H1 (z) =
1 − 0.5z −1

(1 + z −1 )
H2 (z) =
(1 − 0.25z −1 )

H2 (z)
x ( n) H1 ( z ) 6 1 y ( n)
+ + + +

Z-1 Z-1
0.5 1 0.25 1

Figure 41: Cascade realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 72 / 151
Realization of IIR system Cascade Form Structure

A system function is specified by its transfer function H(z) given by


(z − 1)(z − 2)(z + 2)z
H(z) =
[z − ( 12 + j 12 )][z − ( 12 − j 12 )](z − 4j )(z + 4j )
Realize the cascade of two biquadratic sections.
Solution:
(z − 1)(z − 2)(z + 2)z
H(z) =
[z − ( 12 + j 12 )][z − ( 21 − j 12 )](z − 4j )(z + 4j )
z 2 − 3z + 2 z 2 + 2z
= × 2
z 2 − z + 0.5 z + 0.0625
1 − 3z −1 + 2z −2 1 + 2z −1
= −1 −2
×
1−z + 0.5z 1 + 0.0625z −2
= H1 (z) × H2 (z)

x ( n) 1 1 y ( n)
+ + + +

Z-1 Z-1
1 -3 2
+ +
−0.0625
Z-1
Z-1
-0.5 2

Figure 42: Cascade realization


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 73 / 151
Realization of IIR system Cascade Form Structure

Obtain the cascade realization of the following system. The system should have two biquadratic
sections. [EC December 2012]
(z − 1)(z 2 + 5z + 6)(z − 3)
H(z) =
(z 2 + 6z + 5)(z 2 − 6z + 8)

Solution:
(z − 1)(z 2 + 5z + 6)(z − 3)
H(z) =
(z 2 + 6z + 5)(z 2 − 6z + 8)
z 2 − 4z + 3 z 2 + 5z + 6
= 2
× 2
z + 6z + 5 z − 6z + 8
1 − 4z −1 + 3z −2 1 + 5z −1 + 6z −2
= ×
1 + 6z −1 + 5z −2 1 − 6z −1 + 8z −2

x ( n) 1 1 y ( n)
+ + + +

Z-1 Z-1
-6 6
-4 5
+ + + +

Z-1 Z-1
-5 3 -8 6

Figure 43: Cascade realization


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 74 / 151
Realization of IIR system Cascade Form Structure

Obtain the cascade realization using second order sections.


10(1 − 12 z −1 )(1 − 23 z −1 )(1 + 2z −1 )
H(z) = 3 −1
(1 − 4
z )(1 − 18 z −1 )[1 − ( 21 + j 12 )z −1 ][1 − ( 21 − j 12 )z −1 ]

Solution:
10z(z − 0.5)(z − 0.6667)(z + 2)
H(z) =
(z − 0.75)(z − 0.125)[z − (0.5 + j0.5)][z − (0.5 − j0.5)]
10z(z − 0.5) (z − 0.6667)(z + 2)
= ×
(z − 0.75)(z − 0.125) [z − (0.5 + j0.5)][z − (0.5 − j0.5)]
10z 2 − 5z z 2 + 1.333z − 1.333
= ×
z 2 − 0.875z + 0.0938 z 2 − z + 0.5
10 − 5z −1 1 + 1.333z −1 − 1.333z −2
= ×
1 − 0.875z −1 + 0.0938z −2 1 − z −1 + 0.5z −2

x ( n) 10 1 y ( n)
+ + + +

Z-1 Z-1
0.875 1
-5 1.333
+ + +

Z-1 Z-1
-0.0938 -0.5 -1.333

Figure 44: Cascade realization


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 75 / 151
Realization of IIR system Cascade Form Structure

EC December 2011
Obtain the cascade realization for the following system.
1 + 14 z −1
H(z) = 1 −1
(1 + 2
z )(1 + 21 z −1 + 12 z −2 )

Solution:
1 + 41 z −1
H(z) =
(1 + 21 z −1 )(1 + 21 z −1 + 12 z −2 )
1 + 41 z −1 1
= ×
1 + 12 z −1 1 + 12 z −1 + 12 z −2

x ( n) y ( n)
+ + +

1 Z-1 1 1 Z-1
− −
2 4 2
+
1 Z-1

4

Figure 45: Cascade realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 76 / 151
Realization of IIR system Cascade Form Structure

Obtain the cascade realization for the following system.


(1 + z −1 )3
H(z) = 1 −1
(1 − 4
z )(1 − 21 z −1 + 12 z −2 )

Solution:
(1 + z −1 )3
H(z) =
(1 − 14 z −1 )(1 − 21 z −1 + 12 z −2 )
1 + z −1 1 + 2z −1 + z −2
= 1 −1
×
(1 − 4
z ) 1 − z −1 + 12 z −2
= H1 (z) × H2 (z)

x ( n) 1 1 y ( n)
+ + + +

1 Z-1 Z-1
1 1
4 2
+ +

1 Z-1

2 1

Figure 46: Cascade realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 77 / 151
Realization of IIR system Cascade Form Structure

EC 2011 July
Obtain the direct form II realizations of the following system.
(1 + z −1 )
H(z) = 1 −1
(1 − 4
z )(1 − z −1 + 12 z −2 )

(1 + z −1 )
H(z) =
(1 − 14 z −1 )(1 − z −1 + 21 z −2 )
1 + z −1 1
= ×
(1 − 14 z −1 ) 1 − z −1 + z −2
= H1 (z) × H2 (z)

x ( n) y ( n)
+ + +

1 Z-1 Z-1
1 1
4
+

Z-1
−1

Figure 47: Cascade realization


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 78 / 151
Realization of IIR system Cascade Form Structure

June 2010 EC
Obtain cascade form for the system described by
y (n) = −0.1y (n − 1) + 0.72y (n − 2) + 0.7x(n) − 0.252x(n − 2)

Solution:

Y (z) = −0.1z −1 Y (z) + 0.72z −2 Y (z) + 0.7X (z) − 0.252z −2 X (z) =

Y (z) 0.7 − 0.252z −2 1


H(z) = = = (0.7 − 0.252z −2 ) ×
X (z) 1 + 0.1z −1 − 0.72z −2 1 + 0.1z −1 − 0.72z −2

H1 ( z )
H2 (z)
x ( n) 0.7 1 y ( n)
+ +

Z-1 −0.1 Z-1


+
0.72
Z-1
Z-1
-0.252

Figure 48: Cascade realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 79 / 151
Realization of IIR system Cascade Form Structure

June 2015 EC
Find the transfer function and difference equation realization shown in Figure

x ( n) w( n ) 4 y ( n)
+ +

Z-1
3
+

Z-1
−2

Solution:

Y (z) 4 + 3z −1
H(z) = =
X (z) 1 + 2z −2

Y (z) = −2z −2 Y (z) + 4X (z) + 3z −1 X (z)


The difference equation is

y (n) = −2y (n − 2) + 4x(n) + 3x(n − 1)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 80 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Parallel Form Structure for IIR System


The system function for IIR sytem is

M
−k
P
bk z C
k=0
H(z) =
N
ak z −k
P
1+
k=1
H1 ( z ) +
b0 + b1 z −1 + b2 z −2 + bM z −M
=
1 + a1 z −1 + a2 z −2 + aN z −N H 2 (z) +

The function can be expanded in partial


fractions as follows: y ( n)
x( n) H k (z) +
H(z) = C + H1 (z) + H2 (z) . . . + Hk (z)
Figure 49: Parallel form realization for
IIR systems
C is constant and each
H1 (z) + H2 (z) . . . + Hk (z) are the second
order system which is as shown in Figure
50

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 81 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

xk (n) wk ( n) bk 0 yk ( n )
bk0 + bk1 z −1 + +
Hk (z) =
1 + ak1 z −1 + ak2 z −2
Z-1
− ak1 bk1
+ +
wk (n) = ak1 wk (n − 1) − ak2 wk (n − 2) + x(n)
yk (n) = bk0 wk (n) − bk1 wk (n − 1) Z-1
− ak 2
K
X
y (n) = C x(n) + yk (n)
k=1 Figure 50: Direct form II of second order
subsystem

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 82 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Realize the following System in parallel form:


4z 2
H(z) = 3 + 1
+ 1
z− 2
z− 4

Solution:
4 2z −1
H(z) = 3 + +
1 − 0.5z −1 1 − 14 z −1

4 y ( n)
+ +
x ( n)
Z-1
0.5

Z-1
0.25 2

Figure 51: Parallel realization


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 83 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Realize the following System in parallel form:

(1 + z −1 )(1 + 2z −1 )
H(z) = 1 −1
(1 + 2
z )(1 − 14 z −1 )(1 + 18 z −1 )

Solution:

z −2 (z + 1)(z + 2)
H(z) =
z −3 (z
+ 0.5)(z − 0.25)(z + 0.125)
z(z + 1)(z + 2)
H(z) =
(z + 0.5)(z − 0.25)(z + 0.125)
H(z) (z + 1)(z + 2)
=
z (z + 0.5)(z − 0.25)(z + 0.125)
H(z) A B C
= + +
z (z + 0.5) (z − 0.25) (z + 0.125)
(z + 1)(z + 2) A B C
= + +
(z + 0.5)(z − 0.25)(z + 0.125) (z + 0.5) (z − 0.25) (z + 0.125)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 84 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Coefficients A B and C are determined

H(z) (z + 1)(z + 2)
A = [z + 0.5]|z=−0.5 =
z (z − 0.25)(z + 0.125)
(−0.5 + 1)(−0.5 + 2)
= = 2.66
(−0.5 − 0.25)(−0.5 + 0.125)

H(z) (z + 1)(z + 2)
B = [z − 0.25]|z=0.25 =
z (z + 0.5)(z + 0.125)
(0.25 + 1)(0.25 + 2)
= = 10
(0.25 + 0.5)(0.25 + 0.125)

H(z) (z + 1)(z + 2)
C = [z + 0.125]|z=−0.125 =
z (z + 0.5)(z − 0.25)
(−0.125 + 1)(−0.125 + 2)
= = −11.66
(−0.125 + 0.5)(−0.125 − 0.25)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 85 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

H(z) 2.66 10 −11.66


= + +
z (z + 0.5) (z − 0.25) (z + 0.125)
2.66 10 −11.66
H(z) = + +
(1 + 0.5z −1 ) (1 − 0.25z −1 ) (1 + 0.125z −1 )

2.66
+

Z-1
x ( n) y ( n)
−0.5

10
+ +

Z-1
0.25

−11.66
+

Z-1
−0.125

Figure 52: Parallel realization


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 86 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Realize the following System in parallel form:

1 − z −1
H(z) =
(1 − 0.2z −1 − 0.15z −2 )

Solution

1 − z −1
H(z) =
(1 − 0.2z −1 − 0.15z −2 )

z2 − z
H(z) =
(z 2 − 0.2z − 0.15)

a = 1, b = −0.2, c = −0.15 √
−b± b 2 −4ac
Roots of the equation ax 2 + bx + c = 0 are = 2a
p √
0.2 ± 0.22 − 4(−0.15) 0.2 ± 0.64 0.2 ± 0.8
= = = ⇒ 0.5, − 0.3
2 2 2

H(z) z −1
=
z (z − 0.5)(z + 0.3)
H(z) A B
= +
z (z − 0.5) (z + 0.3)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 87 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

The values of A and B are determined by the following procedure.


H(z) z −1 0.5 − 1
A = (z − 0.5)|z=0.5 = = = −0.625
z (z + 0.3) (0.5 + 0.3)
H(z) z −1 −0.3 − 1
B = (z + 0.3)|z=−0.3 = = = 1.625
z (z − 0.5) (−0.3 − 0.5)
H(z) −0.625 1.625
= +
z z − 0.5 z + 0.3
−0.625 1.625
H(z) = + = H1 (z) + H2 (z)
1 − 0.5z −1 1 + 0.3z −1

−0.625
+

Z-1
x ( n) y ( n)
0.5 +

1.625
+

Z-1
−0.3

Figure 53: Parallel realization


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 88 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Realize the following System in parallel form:

1 + 0.33z −1
H(z) =
(1 − 0.75z −1 + 0.125z −2 )

Solution

1 + 0.33z −1 z −1 (z + 0.33)
H(z) = = −2 2
(1 − 0.75z −1 + 0.125z −2 ) z (z − 0.75z −1 + 0.125z −2 )
H(z) z + .33
=
z (z 2 − 0.75z + 0.125)

a = 1, b = −0.75, c = 0.125
Roots of the equation are
p √
0.75 ± 0.752 − 4(0.125) 0.75 ± 0.0625 0.75 ± 0.25
= = = ⇒ 0.5, 0.25
2 2 2

H(z) z + 0.33
=
z (z − 0.5)(z − 0.25)
A B
= +
(z − 0.5) (z − 0.25)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 89 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

The values of A and B are determined by the following procedure.


H(z) z + 0.33 0.25 + 0.33
A = (z − 0.5)|z=0.5 = = = 3.33
z (z − 0.25) (0.5 − 0.25)
H(z) z + 0.33 0.25 + 0.33
B = (z − 0.25)|z=0.25 = = = −2.33
z (z − 0.5) (0.25 − 0.5)
H(z) 3.33 −2.33
= +
z (z − 0.5) (z − 0.25)
3.33 −2.33
H(z) = + = H1 (z) + H2 (z)
1 − 0.5z −1 1 − 0.25z −1

3.33
+

Z-1
x ( n) y ( n)
0.5 +

−2.33
+

Z-1
0.25

Figure 54: Parallel realization


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 90 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Realize the following System in parallel form:

y (n) = 0.75y (n − 1) − 0.125y (n − 2) + 6x(n) + 7x(n − 1) + x(n − 2)

Solution

Y (z) = 0.75z −1 Y (z) − 0.125z −2 Y (z) + 6X (z) + 7z −1 X (z) + z −2 X (z)

Y (z) 6 + 7z −1 + z −2
H(z) = =
X (z) 1 − 0.75z −1 + 0.125z −2

z −2 [6z 2 + 7z + 1]
H(z) =
z −2 [z 2 − 0.75z + 0.125]

z −2 [6z 2 + 7z + 1]
H(z) =
z −2 [z 2 − 0.75z + 0.125]
[6z 2 + 7z + 1]
=
[z 2 − 0.75z + 0.125]

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 91 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

a = 1, b = −0.75, c = 0.125
Roots of the equation are


q
0.75 ± (−0.75)2 − 4(0.125) 0.75 ± 0.0625 0.75 ± 0.25
= = =
2 2 2
0.5, 0.25

6z 2 + 7z + 1
H(z) =
(z − 0.5)(z − 0.25)
H(z) 6z 2 + 7z + 1
=
z z(z − 0.5)(z − 0.25)
H(z) A B C
= + +
z z (z − 0.5) (z − 0.25)

6z 2 + 7z + 1 1
A = H(z)z|z=0 = z= =8
z(z − 0.5)(z − 0.25) (−0.5)(−0.25)
6z 2 + 7z + 1 6(0.5)2 + 7(0.5) + 1
B = H(z)(z − 0.5)|z=0.5 = (z − 0.5z) = = 48
z(z − 0.5)(z − 0.25) 0.5[0.5 − 0.25]
6z 2 + 7z + 1
C = H(z)(z − 0.25z)|z=0.25 = (z − 0.25)
z(z − 0.5)(z − 0.25)
6(0.25)2 + 7(0.25) + 1
= = −50
0.25[0.25 − 0.5]

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 92 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

48 −50
H(z) = 8 + + = H1 (z) + H2 (z) + H3 (z)
(1 − 0.5z 1 ) (1 − 0.25z 1 )

48 y ( n)
+ +
x ( n)
Z-1
0.5

−50
+

Z-1
0.25

Figure 55: Parallel realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 93 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Realize the following System in parallel form:

8z 3 − 4z 2 + 11z − 2
H(z) =
[z − 14 ][z 2 − z + 12 ]

H(z) 8z 3 − 4z 2 + 11z − 2
=
z z[z − 14 ][z 2 − z + 12 ]

H(z) 8z 3 − 4z 2 + 11z − 2
=
z z[z − 14 ][z 2 − z + 12 ]
H(z) A B Cz + D
= + + 2
z z z − 0.25 z − z + .5

H(z) 8z 3 − 4z 2 + 11z − 2
A = z|z = 0 =
z [z − 0.25][z 2 − z + 0.5]
−2
= = 16
[−0.25][0.5]

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 94 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

H(z) 8z 3 − 4z 2 + 11z − 2
B = [z − 0.5]|z=0.5 =
z z[z 2 − z + 0.5]
8(0.5)3 − 4(0.5)2 + 11(0.5) − 2
= =8
(0.5)[(0.5)2 − (0.5) + 0.5]

H(z) 8z 3 − 4z 2 + 11z − 2
=
z z[z − 0.25][z 2 − z + 0.5]
8z 3 − 4z 2 + 11z − 2 A B Cz + D
= + + 2
z[z − 0.25][z 2 − z + 0.5] z z − 0.25 z − z + .25
8z 3 − 4z 2 + 11z − 2 = A[z − 0.25][z 2 − z + 0.5] +
+Bz[z 2 − z + .25] + (Cz + D)z[z − 0.25]
3 2
8z − 4z + 11z − 2z = z 3 [A + B + C ] + z 2 [−1.25A − B − 0.25C + D] +
+z[0.5A + .25B − .25D] − 0.0625A

8 = A + B + C = 16 + 8 + C
C = −16

−4 = [−1.25A − B − 0.25C + D] = [−20 − 8 + 4 + D]


D = 20

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 95 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

16

H(z) A B Cz + D
= + + 2
z z z − 0.25 z − z + .5
8 y ( n)
H(z) 16 8 −16z + 20 + +
= + + 2 x ( n)
z z z − 0.25 z − z + .5
Z-1
8 −16 + 20z −1 0.25
H(z) = 16 + +
1 − 0.25z −1 1 − z −1 + .5z −2
-16
+ +

Z-1
1 20
+
Z-1

−0.5

Figure 56: Parallel realization


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October
?, ?] 18, 2016 96 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

EE 2010 May
Realize the following System in parallel form:

1 − 15 z −1
H(z) = 1 −1
[1 − 2
z + 31 z −2 ][1 + 14 z −1 ]

Solution:

z −1 (z − 0.2)
H(z) =
z −2 [z 2 − 0.5z + 0.33]z −1 [z + 0.25]
z 2 (z − 0.2)
H(z) =
[z 2 − 0.5z + 0.33z][z + 0.25]
H(z) z(z − 0.2)
=
z [z 2 − 0.5z + 0.33][z + 0.25]
H(z) Az + B C
= +
z [z 2 − 0.5z + 0.333] [z + 0.25]
z(z − 0.2) Az + B C
= +
[z 2 − 0.5z + 0.33][z + 0.25] [z 2 − 0.5z + 0.333] [z + 0.25]

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 97 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Coefficients A B and C are determined

H(z) (z − 0.2)
C = [z + 0.25]|z=−0.25 = 2
z [z − 0.5z + 0.333]
−0.25(−0.25 − 0.2)
= = 0.217
[(−0.25)2 − (0.5)(−0.25) + 0.333]

z(z − 0.2) Az + B C
= +
[z 2 − 0.5z + 0.33][z + 0.25] [z 2 − 0.5z + 0.333] [z + 0.25]
z(z − 0.2) = (Az + B)[z + 0.25] + C [z 2 − 0.5z + 0.33]
2
z − 0.2z = Az 2 + 0.25Az + Bz + 0.25B + Cz 2 − 0.5Cz + 0.33C ]
2
z − 0.2z = z 2 (A + C ) + z(0.25A + B − C ) + 0.25B + 0.33C

Equating coefficients

A+C = 1
A = 1 − C = 1 − 0.217 = 0.783

0.25B + 0.33C = 0
−0.33C
B = = −0.2864
0.25

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 98 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

H(z) 0.78z + −0.2864 0.216


= +
z [z 2 − 0.5z + 0.333] [z + 0.25]
H(z) z(0.78 − 0.2864z −1 ) 0.216
= +
z z 2 (1 − 0.5z −1 + 0.333z −2 ) z[1 + 0.25z −1 ]
(0.78 − 0.2864z −1 ) 0.216
H(z) = +
(1 − 0.5z −1 + 0.333z −2 ) (1 + 0.25z −1 )

0.78
+ +

Z-1
0.5
-0.2864
x ( n)
+ y ( n)
+
Z-1
-0.333

0.216
+

Z-1
0.25

Figure 57: Parallel realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,October


?, ?] 18, 2016 99 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

EC 2012 December
Realize the following System in parallel form:

(z − 1)(z − 2)(z + 2)z


H(z) =
[z − ( 12 + j 12 )][z − ( 12 − j 12 )](z − 4j )(z + 4j )

Solution:

(z − 1)(z − 2)(z + 2)z


H(z) =
[z − ( 12 + j 12 )][z − ( 21 − j 12 )](z − 4j )(z + 4j )
H(z) (z − 1)(z − 2)(z + 2)z
=
z [z − ( 12 + j 12 )][z − ( 21 − j 12 )](z − 4j )(z + 4j )
H(z) A B C D
= + + +
z z − (0.5 + j0.5) z − (0.5 − j0.5) z − j0.25 z + j0.25)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 100 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

H(z) A B C D
= + + +
z z − (0.5 + j0.5) z − (0.5 − j0.5) z − j0.25 z + j0.25)
H(z) (z 2 − 1)(z − 2)
A = [z − (0.5 + j0.5)]|z=0.5+j0.5 =
z [z − (0.5 − j0.25)][z − j0.25][z + j0.25]
[(0.5 + j0.5)2 − 1][(0.5 + j0.5 − 2]
=
[0.5 + j0.5 − (0.5 − j0.5)][z 2 + 0.0625]
[0.25 + j0.5 − 0.25 − 1][(0.5 + j0.5 − 2]
=
[j1][z 2 + 0.0625]
[−1 + j0.5][(−1.5 + j0.5]
=
[j1][j0.5 + 0.0625]
[1.5 − j0.5 − j0.75 + 0.25] 1.25 − j1.25 1.767∠ − 45
= = =
−0.5 + j0.0625 −0.5 + j0.0625 0.503∠172
1.767∠ − 45
= = 3.513∠ − 217 = −2.8 + j2.1
0.503∠172

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 101 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Similarly B, C and D are estimated.

H(z) A B C D
= + + +
z z − (0.5 + j0.5) z − (0.5 − j0.5) z − j0.25 z + j0.25)
−2.8 + j2.1 −2.7683 − j2.1517 3.268 − j7.837 3.268 + j7.837
= + + +
z − (0.5 + j0.5) z − (0.5 − j0.5) z − j0.25 z + j0.25)

We have to design second order system, hence combine first two terms and last two terms.

H(z) −5.536z + 0.612 6.5366z − 3.918


= +
z z 2 − z + 0.5 z 2 + 0.0625)
H(z) z(−5.536 + 0.612z −1 ) z(6.5366 − 3.918z −1 )
= +
z z 2 (1 − z −1 + 0.5z −2 ) z 2 (1 + 0.0625z −2 )
(−5.536 + 0.612z −1 ) (6.5366 − 3.918z −1 )
H(z) = + = H1 (z) + H2 (z)
(1 − z −1 + 0.5z −2 ) (1 + 0.0625z −2 )

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 102 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

(−5.536 + 0.612z −1 ) (6.5366 − 3.918z −1 )


H(z) = −1 −2
+ = H1 (z) + H2 (z)
(1 − z + 0.5z ) (1 + 0.0625z −2 )

-5.536
+ +

Z-1
1
0.6112
x ( n)
+ y ( n)
+
-1
Z
-0.5

6.5366
+ +

Z-1
3.9184

Z-1
-0.0625

Figure 58: Parallel realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 103 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

EE 2010 May
Realize the following System in parallel form:

1 + 14 z −1
H(z) = 1 −1
[1 + 2
z + 41 z −2 ][1 + 12 z −1 ]

Solution:

z −1 (z − 0.25)
H(z) =
z −2 [z 2 − 0.5z + 0.25]z −1 [z + 0.5]
z 2 (z + 0.25)
H(z) =
[z 2 + 0.5z + 0.25][z + 0.5]
H(z) z(z − 0.25)
=
z [z 2 + 0.5z + 0.25][z + 0.25]
H(z) Az + B C
= +
z [z 2 + 0.5z + 0.25] [z + 0.5]
z(z − 0.25) Az + B C
= +
[z 2 + 0.5z + 0.25][z + 0.5] [z 2 + 0.5z + 0.25] [z + 0.5]

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 104 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Coefficients A B and C are determined

H(z) z(z − 0.2)


C = [z + 0.5]|z=−0.5 = 2
z [z − 0.5z + 0.333]
−0.5(−0.5 − 0.25)
= = 0.5
[(−0.5)2 − (0.5)(−0.5) + 0.25]

z(z + 0.25) Az + B C
= +
[z 2 + 0.5z + 0.25][z + 0.5] [z 2 + 0.5z + 0.25] [z + 0.5]
z(z + 0.25) = (Az + B)[z + 0.5] + C [z 2 + 0.5z + 0.25]
2
z + 0.25z = Az 2 + 0.5Az + Bz + 0.5B + Cz 2 + 0.5Cz + 0.25C ]
2
z + 0.25z = z 2 (A + C ) + z(0.5A + B + 0.5C ) + 0.5B + 0.25C

Equating coefficients

A+C = 1
A = 1 − C = 1 − 0.5 = 0.5

0.25 = 0.5A + B + 0.5C = 0.5 × 0.5 + B + 0.5 × 0.5


B = −0.25

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 105 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

H(z) 0.5z − 0.25 0.5


= +
z [z 2 + 0.5z + 0.25] [z + 0.5]
H(z) z(0.5 − 0.25z −1 ) 0.5
= +
z z 2 (1 + 0.5z −1 + 0.25z −2 ) z[1 + 0.5z −1 ]
(0.5 − 0.25z −1 ) 0.5
H(z) = +
(1 + 0.5z −1 + 0.25z −2 ) (1 + 0.5z −1 )

0.5
+ +

Z-1
-0.5
-0.25
x ( n)
+ y ( n)
+
Z-1
-0.25

0.5
+

Z-1
-0.5

Figure 59: Parallel realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 106 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Realize the following System in parallel form:

1 − 12 z −1
H(z) = 1 −1
(1 − 3
z )(1 − 41 z −1 )

Solution:

z −1 (z − 0.5)
H(z) =
z −1 (z − 0.33)z −1 (z − 0.25)
z(z − 0.5)
H(z) =
(z − 0.33)(z − 0.25)
H(z) (z − 0.33)
=
z (z − 0.33)(z − 0.25)
H(z) A B
= +
z z − 0.33 z − 0.25
(z − 0.5) A B
= +
(z − 0.33)z −1 (z − 0.25) z − 0.33 z − 0.25

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 107 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Coefficients A and B are determined

H(z) z − 0.5
A = [z − 0.33]|z=0.33 =
z z − 0.25
0.33 − 0.5
= = −2
0.33 − 0.25

H(z) z − 0.5
B = [z − 0.25]|z=0.25 =
z z − 0.33
0.25 − 0.5
= =3
0.25 − 0.33

−2
+

Z-1
x ( n) 1 y ( n)
3 +

3
+

Z-1
0.25

Figure 60: Parallel realization


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,
October
?, ?] 18, 2016 108 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Realize the following System in parallel form:

1 + 13 z −1
H(z) =
1 − 34 z −1 + 81 z −2

Solution:

1 + 13 z −1
H(z) =
1 − 34 z −1 + 18 z −2
1 + 0.33z −1
H(z) =
(1 − 0.5z −1 )(1 − 0.25z −1 )
z −1 (z + 0.33)
H(z) =
z −1 (z− 0.5)z −1 (z − 0.25)
z(z + 0.33)
H(z) =
(z − 0.5)(z − 0.25)
H(z) (z + 0.33)
=
z (z − 0.5)(z − 0.25)
H(z) A B
= +
z z − 0.5 z − 0.25
(z + 0.33) A B
= +
(z − 0.5)(z − 0.25) z − 0.33 z − 0.25

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 109 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Coefficients A and B are determined

H(z) z + 0.33 0.5 + 0.33


A = [z − 0.5]|z=0.5 = = = 3.33
z z − 0.25 0.5 − 0.25

H(z) z + 0.33 0.25 + 0.33


B = [z − 0.25]|z=0.25 = = = −2.33
z z − 0.5 0.25 − 0.5
H(z) 3.33 −2.33
= +
z z − 0.5 z − 0.25
3.33 −2.33
H(z) = +
z − 0.5 z − 0.25

3.333
+

Z-1
x ( n) 0.5 y ( n)
+

−2.33
+

Z-1
0.25

Dr. Manjunatha. P (JNNCE) Figure 61: Parallel


UNIT - 8: Implementation realization Systems[?, ?,October
of Discrete-time ?, ?] 18, 2016 110 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

EE 2010 May
Realize the following System in parallel form:

10(1 − 12 z −1 )(1 + 2z −1 )(1 − 32 z −1 )


H(z) = 3 −1
(1 − 4
z )(1 − 18 z −1 )[1 − ( 21 + j 12 )z −1 )][1 − ( 21 − j 12 )z −1 )]

Solution:

10(1 − 0.5z −1 )(1 + 2z −1 )(1 − 0.66z −1 )


H(z) =
(1 − 0.75z −1 )(1 − 0.125z −1 )[1 − (0.5 + j0.5)z −1 )][1 − (0.5 − j0.5)z −1 )]
10(1 − 0.5z −1 )(1 + 2z −1 )(1 − 0.66z −1 )
H(z) =
(1 − 0.75z −1 )(1 − 0.125z −1 )[1 − z −1 + 0.5z −2 )]
10z −3 (z − 0.5)(z + 2)(z − 0.66)
H(z) =
z −4 (z − 0.75)(z − 0.125)[z 2 − z + 0.5]
H(z) 10(z − 0.5)(z + 2)(z − 0.66)
=
z (z − 0.75)(z − 0.125)[z 2 − z + 0.5]
H(z) A B Cz + D
= + + 2
z [z − 0.75] [z − 0.125] [z − z + 0.5]

10(z − 0.5)(z + 2)(z − 0.66) A B Cz + D


= + + 2
(z − 0.75)(z − 0.125)[z 2 − z + 0.5] [z − 0.75] [z − 0.125] [z − z + 0.5]

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 111 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

Coefficients A B and C are determined

H(z) 10(z − 0.5)(z + 2)(z − 0.66)


A = [z − 0.75]|z=0.75 =
z (z − 0.125)[z 2 − z + 0.5]
10(0.75 − 0.5)(0.75 + 2)(0.75 − 0.66)
= = 3.16
(0.75 − 0.125)[0.752 − 0.75 + 0.5]

H(z) 10(z − 0.5)(z + 2)(z − 0.66)


B = [z − 0.125]|z=0.125 =
z (z − 0.75)[z 2 − z + 0.5]
10(0.125 − 0.5)(0.125 + 2)(0.125 − 0.66)
= = −17.46
(0.125 − 0.75)[0.1252 − 0.125 + 0.5]

z(z + 0.25) Az + B C
= +
[z 2 + 0.5z + 0.25][z + 0.5] [z 2 + 0.5z + 0.25] [z + 0.5]
z(z + 0.25) = (Az + B)[z + 0.5] + C [z 2 + 0.5z + 0.25]
2
z + 0.25z = Az 2 + 0.5Az + Bz + 0.5B + Cz 2 + 0.5Cz + 0.25C ]
2
z + 0.25z = z 2 (A + C ) + z(0.5A + B + 0.5C ) + 0.5B + 0.25C
Equating coefficients
A+C = 1
A = 1 − C = 1 − 0.5 = 0.5

Dr. Manjunatha. P 0.25


(JNNCE) = 0.5A
UNIT -+
8: B + 0.5C = 0.5
Implementation × 0.5 + BSystems[?,
of Discrete-time + 0.5 ×?,October
0.5
?, ?] 18, 2016 112 / 151
Realization of IIR Structures Parallel Form Structure for IIR System

H(z) 0.5z − 0.25 0.5


= +
z [z 2 + 0.5z + 0.25] [z + 0.5]
H(z) z(0.5 − 0.25z −1 ) 0.5
= +
z z 2 (1 + 0.5z −1 + 0.25z −2 ) z[1 + 0.5z −1 ]
(0.5 − 0.25z −1 ) 0.5
H(z) = +
(1 + 0.5z −1 + 0.25z −2 ) (1 + 0.5z −1 )

0.5
+ +

Z-1
-0.5
-0.25
x ( n)
+ y ( n)
+
Z-1
-0.25

0.5
+

Z-1
-0.5

Figure 62: Parallel realization

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 113 / 151
Realization of FIR system Lattice structure for FIR Systems

Lattice structure for FIR Systems


The system function of mth order FIR filter is represented by the polynomial Am (z)

Hm (z) = Am (z)

where Am (z) is the polynomial and is defined as


m
X
Am (z) = 1 + am (i)z −i
i=1

A0 (z) = 1 The system function becomes


m
X
Hm (z) = 1 + am (i)z −i
i=1

H0 (z) = 1 the z transform the input and output are related as


Y (z)
Hm (z) =
X (z)
m
Y (z) X
=1+ am (i)z −i
X (z) i=1

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 114 / 151
Realization of FIR system Lattice structure for FIR Systems

m
X
Y (z) = X (z) + am (i)z −i X (z)
i=1 f0 (n) = x(n) and g0 (n − 1) = x(n − 1)

Taking inverse z transform y (n) = x(n) + k1 x(n − 1)

m
X
y (n) = x(n) + am (i)x(n − i)
i=1
f 0 (n )
+ f1 (n) = y (n)
Consider the order of the filter m=1 K1
x( n)

y (n) = x(n) + a1 (1)x(n − 1) K1 g1 (n)


Z-1 +
g0 (n) g0 (n − 1)

From the figure y(n) is Figure 63: Single stage Lattice filter

y (n) = f0 (n) + k1 g0 (n − 1)

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 115 / 151
Realization of FIR system Lattice structure for FIR Systems
Consider the filter of order of two.
The second stage output is
2
X
y (n) = x(n) + am (i)x(n − i) f2 (n) = f1 (n) + K2 g1 (n − 1)
i=1
g2 (n) = K2 f1 (n) + g1 (n − 1)
= x(n) + a2 (1)x(n − 1) + a2 (2)x(n − 2)

The first stage output is The output y (n) is

f1 (n) = x(n) + K1 x(n − 1) y (n) = f1 (n) + K2 g1 (n − 1)


g1 (n) = K1 x(n) + x(n − 1)

y (n) = x(n) + K1 x(n − 1) + K2 [K1 x(n − 1) + x(n − 2)]


= x(n) + K1 (1 + K2 )x(n − 1) + K2 x(n − 2)

f 0 (n ) f1 (n) f 2 ( n ) = y ( n)
+ +
K1 K2
x ( n)

K1 K2
g0 (n)
Z-1 + g1 ( n)
Z-1 + g 2 ( n)

Figure 64: Two stage Lattice filter

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 116 / 151
Realization of FIR system Lattice structure for FIR Systems

y (n) = x(n) + K1 (1 + K2 )x(n − 1) + K2 x(n − 2)

This equation represents the second order FIR system if:

a2 (1) = K1 (1 + K2 ) and a2 (2) = K2

a2 (1)
K1 = and K2 = a2 (2)
(1 + K2 )

The lattice structure for mth order is obtained from direct form coefficients by the following
recursive equations.
Km = am (m)

am (i) − am (m)am (m − i)
am−1 (i) = 2
i = 1, 2, . . . m − 1
1 − Km

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 117 / 151
Realization of FIR system Lattice structure for FIR Systems

Draw the lattice structure for the following FIR filter function
1 −2
H(z) = 1 + 2z −1 + z
3
Solution:
1 −2 y ( n)
H(z) = 1 + 2z −1 + z + +
3 K1 = 1.5 K 2 = 0.333
x ( n)
K1 = 1.5 K 2 = 0.333
1
a2 (1) = 2, a2 (2) = 3
g 2 ( n)

Km = am (m)
Z-1 + Z-1 +
for m=2
K2 = a2 (2) = 13 Figure 65: Lattice filter

am (i) − am (m)am (m − i)
am−1 (i) = 2
1 − Km
a2 (i) − a2 (2)a2 (2 − i)
a1 (i) =
1 − K22
a2 (1) − a2 (2)a2 (1)
a1 (1) =
1 − K22
2 − (0.333)(2)
=
1 − (0.333)2
= 1.5

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 118 / 151
Realization of FIR system Lattice structure for FIR Systems

A FIR filter is given by

2 3 1
y (n) = x(n) + x(n − 1) + x(n − 2) + x(n − 3)
5 4 3

Draw the lattice structure

Solution:
2 3 1
y (n) = x(n) + x(n − 1) + x(n − 2) + x(n − 3)
5 4 3

By taking z transform

2 −1 3 −2 1
Y (z) = X (z) + z X (z) + z X (z) + z −3 X (z)
5 4 3
Y (z) 2 3 −2 1
H(z) = = 1 + z −1 + z + z −3
X (z) 5 4 3
= 1 + 0.4z −1 + 0.75z −2 + 0.333z −3

a3 (1) = 0.4, a3 (2) = 0.75, a3 (3) = 0.333

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 119 / 151
Realization of FIR system Lattice structure for FIR Systems
for m=3, K3 = a3 (3) = 0.333

am (i) − am (m)am (m − i) for m=2, K2 = a2 (2) = 0.693


am−1 (i) = 2
1 − Km
a3 (i) − a3 (3)a3 (3 − i)
a2 (i) = a2 (i) − a2 (2)a2 (2 − i)
1 − K32 a1 (i) =
1 − K22
a3 (1) − a3 (3)a3 (2)
a2 (1) = a2 (1) − a2 (2)a2 (1)
1 − K32 a1 (1) =
1 − K22
0.4 − (0.333)(0.75)
= = 0.169 0.169 − (0.693)(0.169)
1 − (0.333)2 =
1 − (0.693)2
a3 (2) − a3 (3)a3 (1)
a2 (2) = = 0.0998
1 − K32
0.75 − (0.333)(0.4) for m=1, K1 = a1 (1) = 0.0998
= = 0.693
1 − (0.333)2

y ( n)
+ + +
K1 = 0.0998 K 2 = 0.693 K 3 = 0.333
x ( n)
K1 = 0.0998 K 2 = 0.693 K 3 = 0.333

Z-1 + Z-1 + Z-1 + g 3 ( n)

Figure 66: Lattice filter


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,
October
?, ?] 18, 2016 120 / 151
Realization of FIR system Lattice structure for FIR Systems

A FIR filter is given by

y (n) = x(n) + 3.1x(n − 1) + 5.5x(n − 2) + 4.2x(n − 3) + 2.3x(n − 4)

Draw the lattice structure


Solution:

y (n) = x(n) + 3.1x(n − 1) + 5.5x(n − 2) + 4.2x(n − 3) + 2.3x(n − 4)

By taking z transform

Y (z) = X (z) + 3.1z −1 X (z) + 5.5z −2 X (z) + 4.2z −3 X (z) + 2.3z −4 X (z)
Y (z)
H(z) = = 1 + 3.1z −1 + 5.5z −2 + 4.2z −3 + 2.3z −4
X (z)

a4 (1) = 3.1, a4 (2) = 5.5, a4 (3) = 4.2 a4 (4) = 2.3

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 121 / 151
Realization of FIR system Lattice structure for FIR Systems
For m=4 K4 = a4 (4) = 2.3

am (i) − am (m)am (m − i) For m=3 K3 = a3 (3) = 0.683


am−1 (i) = 2
1 − Km
a4 (i) − a4 (4)a4 (4 − i) am (i) − am (m)am (m − i)
a3 (i) = am−1 (i) = 2
1 − K42 1 − Km
a4 (1) − a4 (4)a4 (3) a3 (i) − a3 (3)a3 (3 − i)
a3 (1) = a2 (i) =
1 − K42 1 − K32
3.1 − (2.3)(4.2) a3 (1) − a3 (3)a3 (3)
= a2 (1) =
1 − (2.3)2 1 − K32
= 1.529 1.529 − (0.683)(1.667)
=
a4 (2) − a4 (4)a4 (2) 1 − (0.683)2
a3 (2) =
1 − K42 = 0.732
5.5 − (2.3)(5.5) a3 (2) − a3 (3)a3 (1)
= a2 (2) =
1 − (2.3)2 1 − K32
= 1.6667 1.667 − (0.683)(1.529)
=
a4 (3) − a4 (4)a4 (1) 1 − (0.683)2
a3 (3) =
1 − K42 = 1.167
4.5 − (2.3)(3.1)
=
1 − (2.3)2
= 0.683 For m=2, K2 = a2 (2) = 1.167

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 122 / 151
Realization of FIR system Lattice structure for FIR Systems

For m=2, K2 = a2 (2) = 1.167


For m=1
am (i) − am (m)am (m − i)
k1 = a1 (1) = 2
1 − Km

a2 (1) − a2 (2)a2 (1)


k1 = a1 (1) =
1 − K22
0.732 − (1.167)(0.732)
= = 0.338
1 − (1.167)2

f1 ( n) f 2 ( n) f 3 (n ) y(n)
+ + + +
K1 = 0.338 K 2 = 1.167 K 3 = 0.683 K 4 = 2.3
x(n)
K1 = 0.338 K 2 = 1.167 K 3 = 0.683 K 4 = 2.3
Z-1 + Z-1 + Z-1 + Z-1 +
g1 (n) g 2 ( n) g 3 ( n) g 4 ( n)

Figure 67: Lattice filter

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 123 / 151
Realization of FIR system Lattice structure for FIR Systems

Determine all the FIR filters which are specified by the lattice parameters K1 = 0.1, K2 = 0.2,
and K3 = 0.3 and draw the structure

Solution:

am (0) = 1
am (m) = Km
am (i) = am−1 (i) + am (m)am−1 (m − i) For m=3

For m=1 a3 (0) = 1


a3 (3) = K3 = 0.3
a1 (0) = 1 a3 (i) = a2 (i) + a3 (3)a2 (3 − i)
a1 (1) = K1 = 0.1 a3 (1) = a2 (1) + a3 (3)a2 (2)
= 0.12 + (0.3)(0.2) = 0.18
For m=2
a3 (2) = a2 (2) + a3 (3)a2 (1)
a2 (0) = 1 = 0.2 + (0.3)(0.12) = 0.236
a2 (2) = K2 = 0.2
a2 (i) = a1 (i) + a2 (2)a1 (2 − i)
a2 (1) = 0.1 + (0.2)0.1 = 0.12

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 124 / 151
Realization of FIR system Lattice structure for FIR Systems

m
X
H(z) = 1+ am (i)z −i
i=1
3
X
= 1+ a3 (i)z −i
i=1

= 1 + a3 (1)z −1 + a3 (2)z −2 + a3 (3)z −3


= 1 + 0.18z −1 + 0.236z −2 + 0.3z −3

x ( n)
Z-1 Z-1 Z-1

1 0.18 0.236 0.3

y(n)
+ + +

Figure 68: Lattice filter

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 125 / 151
Realization of FIR system Lattice structure for FIR Systems

Determine all the FIR filters which are specified by the lattice parameters K1 = 0.5, K2 = 0.333,
and K3 = 0.25 and draw the structure
Solution:

am (0) = 1
am (m) = Km For m=3
am (i) = am−1 (i) + am (m)am−1 (m − i)
a3 (0) = 1
For m=1 a3 (3) = K3 = 0.25
a3 (i) = a2 (i) + a3 (3)a2 (3 − i)
a1 (0) = 1 a3 (1) = a2 (1) + a3 (3)a2 (2)
a1 (1) = K1 = 0.5 = 0.665 + (0.25)(0.333) = 0.75
a3 (2) = a2 (2) + a3 (3)a2 (1)
For m=2
= 0.333 + (0.667)(0.12) = 0.5
a2 (0) = 1
a2 (2) = K2 = 0.333 a3 (3) = k3 = 0.25
a2 (i) = a1 (i) + a2 (2)a1 (2 − i)
a2 (1) = 0.5 + (0.333)0.5 = 0.665

a3 (0) = 1, a3 (1) = 0.75, a3 (2) = 0.5, and a3 (3) = 0.25

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 126 / 151
Realization of FIR system Lattice structure for FIR Systems

a3 (0) = 1, a3 (1) = 0.75, a3 (2) = 0.5, and a3 (3) = 0.25

3
X
H(z) = 1+ a3 (i)z −i
i=1

= K3 = 1 + a3 (1)z −1 + a3 (2)z −2 + a3 (3)z −3


= 1 + 0.75z −1 + 0.5z −2 + 0.25z −3

x ( n)
Z-1 Z-1 Z-1

1 0.75 0.5 0.25

y(n)
+ + +

Figure 69: Lattice filter

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 127 / 151
Realization of FIR system Lattice structure for FIR Systems

Determine the impulse response of a FIR filter with reflection coefficients K1 = 0.6, K2 = 0.3,
K3 = 0.5 and K4 = 0.9 Also draw the direct form structure

Solution:

am (0) = 1
am (m) = Km
For m=3
am (i) = am−1 (i) + am (m)am−1 (m − i)
a3 (0) = 1
For m=1
a3 (3) = K3 = 0.5
a1 (0) = 1 a3 (i) = a2 (i) + a3 (3)a2 (3 − i)
a1 (1) = K1 = 0.5 a3 (1) = a2 (1) + a3 (3)a2 (2)
= 0.78 + (0.5)(0.3) = 0.93
For m=2 a3 (2) = a2 (2) + a3 (3)a2 (1)
= 0.3 + (0.5)(0.78) = 0.69
a2 (0) = 1
a2 (2) = K2 = 0.3
a2 (i) = a1 (i) + a2 (2)a1 (2 − i) a3 (3) = k3 = 0.25
a2 (1) = 0.6 + (0.3)0.6 = 0.78

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 128 / 151
Realization of FIR system Lattice structure for FIR Systems
For m=4

a4 (0) = 1
a4 (i) = a3 (i) + a4 (4)a3 (4 − i)
a4 (1) = a3 (1) + a4 (4)a3 (3) = 0.93 + (0.9)(0.5) = 1.38
a4 (2) = a3 (2) + a4 (3)a3 (2) = 0.69 + (0.9)(0.69) = 1.311
a4 (3) = a3 (3) + a4 (3)a3 (1) = 0.5 + (0.9)(0.93) = 1.337

a4 (4) = K4 = 0.9
a4 (0) = 1, a4 (1) = 1.38, a4 (2) = 1.311, and a4 (3) = 1.337 and a4 (4) = 0.9
3
X
H(z) = 1+ a3 (i)z −i = 1 + a4 (1)z −1 + a4 (2)z −2 + a4 (3)z −3 + a4 (4)z −3
i=1

= 1 + 1.38z −1 + 1.311z −2 + 1.337z −3 + 0.9z −4

x ( n)
Z-1 Z-1 Z-1 Z-1

1 1.38 1.311 1.337 0.9

y(n) y(n)
+ + + +

Figure 70: Lattice filter

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 129 / 151
Realization of IIR system Lattice structure for IIR Systems

Lattice structure for IIR Systems

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 130 / 151
Realization of IIR system Lattice structure for IIR Systems

The system function of mth order IIR filter is represented by

M
−k
P
bk z
k=0
H(z) =
N
ak z −k
P
1+
k=1

Let us consider an all pole system with system function

1 1
H1 (z) = =
N AN (z)
aN (k)z −k
P
1+
k=1

Y (z)
But the system function H1 (z) = X (z)

Y (z) 1
=
X (z) N
aN (k)z −k
P
1+
k=1

N
X
Y (z) + aN (k)z −k Y (z) = X (z)
k=1

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 131 / 151
Realization of IIR system Lattice structure for IIR Systems
Consider the order of the filter m=1

N
X y (n) = a1 (1)y (n − 1) + x(n)
Y (z) + aN (k)z −k Y (z) = X (z)
k=1

From the above equation


Taking inverse z transform
K1 = a1 (1)
N
X
y (n) = − aN (k)y (n − k) + x(n)
k=1
f 0 (n ) = y (n )
+
K1 f1 (n) = x (n)

Interchange the input and output


K1
g1 (n)
Z-1 +
N
X
x(n) = − aN (k)x(n − k) + y (n) Figure 71: Single stage Lattice
k=1 filter

Rearranging the above equation


f1(n)=x(n) f0(n)=y(n)
+
N
- K1
X
y (n) = x(n) + aN (k)x(n − k) g1(n) K1
k=1 + Z-1

The equation is similar to the FIR Figure 72: Single stage Lattice
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,
October
?, ?] 18, 2016 132 / 151
Realization of IIR system Lattice structure for IIR Systems

Consider the filter of order of two.

f2 (n) = x(n)
f1 (n) = f2 (n) − K2 g1 (n − 1)
g2 (n) = K2 f1 (n) + g1 (n − 1)
f0 (n) = f1 (n) − K1 g0 (n − 1)
g1 (n) = K1 f0 (n) + g0 (n − 1)
y (n) = f0 (n) = g0 (n)

y (n) = −K1 (1 + K2 )y (n − 1) − K2 y (n − 2) + x(n)


g2 (n) = K2 y (n) + K1 (1 + K2 )y (n − 1) − y (n − 2)

f2(n)=x(n) f1(n) f0(n)=y(n)


+ +
- K2 - K1

g2(n) K2 K1
+ Z-1 + Z-1
g1(n) g0(n)

Figure 73: Single stage Lattice filter

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 133 / 151
Realization of IIR system Lattice structure for IIR Systems

N
X
y (n) = − aN (k)y (n − k) + x(n)
k=1

2
X
y (n) = − a2 (k)y (n − k) + x(n)
k=1

2
X
y (n) = − a2 (k)y (n − k) + x(n)
k=1
= −a2 (1)y (n − 1) − a2 (2)y (n − 2) + x(n)

y (n) = x(n) + K1 (1 + K2 )x(n − 1) + K2 x(n − 2)

This equation represents the second order FIR system if:

a2 (1) = K1 (1 + K2 ) and a2 (2) = K2

a2 (1)
K1 = and K2 = a2 (2)
(1 + a2 (2))

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 134 / 151
Realization of IIR system Lattice structure for IIR Systems

The lattice structure for mth order is obtained by the following recursive equations.
Km = am (m)

am (i) − am (m)am (m − i) am (i) − Km am (m − i)


am−1 (i) = 2
= 2
i = 1, 2, . . . m − 1
1 − Km 1 − Km
The IIR system function is
M
−k
P
bk z
k=0 BM (z)
Hsystem (z) = =
N AN (z)
ak z −k
P
1+
k=1

M
X
βi = bi − βm am (m − i) i = M, M − 1, M − 2, . . . 1, 0
m=i+1

fN(n)=x(n) fN-1(n) f2(n) f1(n) f0(n)


+ + +
- KN - K2 - K1

KN
gN(n) gN-1(n) g2(n) g1(n) g0(n)
+ Z-1 + Z-1 + Z-1

β0
β N −1 β1
βN β2
y ( n)
+ + β0
+ +

Dr. Manjunatha. P (JNNCE)


Figure 74: Lattice ladder structure
UNIT - 8: Implementation of Discrete-time Systems[?, ?,
October
?, ?] 18, 2016 135 / 151
Realization of IIR system Lattice structure for IIR Systems
1
Realize the lattice structure for all pole filter given by H(z) =
1+ 25 z −1 + 43 z −2 + 13 z −3
Solution:
am (i)−am (m)am (m−i)
m=3 a3 (0) = 1, a3 (1) = 25 , a3 (2) = 34 , a3 (3) = 1
3
am−1 (i) = 1−Km2

for m=3

a3 (i) − a3 (3)a3 (3 − i) for m=2


a2 (i) =
1 − K32
a2 (1) − a2 (2)a2 (1)
a3 (1) − a3 (3)a3 (2) a1 (1) =
a2 (1) = 1 − K22
1 − K32
0.1687 − (0.6973)(0.1687)
0.4 − (0.333)(0.75) =
a2 (1) = = 0.16875 1 − (0.697)2
1 − (0.33)2 = 0.0996
a3 (2) − a3 (3)a3 (1)
a2 (2) =
1 − K32 K3 = a3 (3) = 13 ,
0.75 − (0.333)(0.4) K2 = a2 (2) = 0.6937
a2 (2) = = 0.6937 K1 = a1 (1) = 0.0996
1 − (0.33)2

f3(n)=x(n) f2(n) f1(n) f0(n)=y(n)


+ + +
- 0.333 - 0.6973 0.0996
0.333 0.6973 0.0996
g3(n)
+ Z-1 g2(n) + Z-1 + Z-1
g1(n) g0(n)

Dr. Manjunatha. P (JNNCE) Figure 75:Lattice


UNIT - 8: Implementation filter Systems[?, ?,October
of Discrete-time ?, ?] 18, 2016 136 / 151
Realization of IIR system Lattice structure for IIR Systems
1
Realize the lattice structure for all pole filter given by H(z) = 1−0.9z −1 +0.64z −2 −0.576z −3
Solution:
m=3 a3 (0) = 1, a3 (1) = −0.9 a3 (2) = 0.64 a3 (3) = −0.576
for m=3, i=1,2

a3 (i) − a3 (3)a3 (3 − i) for m=2


a2 (i) =
1 − K32
a2 (1) − a2 (2)a2 (1)
a3 (1) − a3 (3)a3 (2) a1 (1) =
a2 (1) = 1 − K22
1 − K32
−0.795 − (0.1819)(−0.795)
−0.9 − (−0.576)(0.64) =
a2 (1) = = −0.795 1 − (0.1819)2
1 − (−0.5763)2 = −0.6726
a3 (2) − a3 (3)a3 (1)
a2 (2) =
1 − K32 K3 = a3 (3) = −0.576,
0.64 − (−0.576)(−0.9) K2 = a2 (2) = 0.1819
a2 (2) = = 0.1819 K1 = a1 (1) = −0.6726
1 − (−0.5763)2

f3(n)=x(n) f2(n) f1(n) f0(n)=y(n)


+ + +
- -0.576 - 0.1819 -0.6726
-0.576 0.1819 -0.6726
g3(n)
+ Z-1 g2(n) + Z-1 + Z-1
g1(n) g0(n)

Figure 76: Lattice filter


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,
October
?, ?] 18, 2016 137 / 151
Realization of IIR system Lattice structure for IIR Systems

Develop the lattice ladder structure for the filter with difference equation

3 1
y (n) + y (n − 1) + y (n − 2) = x(n) + 2x(n − 1)
4 4

Solution:
3 1
y (n) + y (n − 1) + y (n − 2) = x(n) + 2x(n − 1)
4 4

By taking z transform

3 −1 1
Y (z) + z Y (z) + z −2 Y (z) = X (z) + 2z −1 X (z)
4 4
Y (z) 1 + 2z −1
H(z) = =
X (z) 1 + 34 z −1 + 14 z −2

B(z) = 1 + 2z −1
A(z) = 1 + 43 z −1 + 41 z −2
a2 (1) = 0.75, a2 (2) = 0.25

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 138 / 151
Realization of IIR system Lattice structure for IIR Systems

M
X
βi = bi − βm am (m − i)
m=i+1

for m=2
K2 = a2 (2) = 0.25 1
X
β0 = b0 − βm am (m)
am (i) − am (m)am (m − i) m=1
am−1 (i) = 2
1 − Km = b0 − β1 a1 (1) = 1 − 2(0.6) = −0.2
a2 (i) − a2 (2)a2 (2 − i)
a1 (i) =
1 − K22
a2 (1) − a2 (2)a2 (1)
a1 (1) =
1 − K22
0.75 − (0.25)(0.75)
= = 0.6 x(n) f1(n) f0(n)
1 − (0.25)2 + +
- K2=0.25 - K1=0.6
for m=1
g1(n) g0(n)
K1 = a1 (1) = 0.6
+ Z-1 + Z-1
Ladder coefficients are
B(z) = 1 + 2z −1 M=1 β 0 = −0.2
β1 = 2
b0 = 1, b1 = β1 = 2 y ( n)
+ +

Figure 77: Lattice filter

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 139 / 151
Realization of IIR system Lattice structure for IIR Systems

A linear time invariant system is defined by

0.129 + 0.38687z −1 + 0.3869z −2 + 0.129z −3


H(z) =
1 − 0.2971z −1 + 0.3564z −2 − 0.0276z −3

Realize the IIR transfer function using lattice ladder structure


Solution:
1
H(z) = B(z)
A(z)

where

A(z) = 1 − 0.2971z −1 + 0.3564z −2 − 0.0276z −3


B(z) = 0.129 + 0.38687z −1 + 0.3869z −2 + 0.129z −3

a3 (3) = −0.0276, a3 (2) = 0.3564, a3 (1) = −0.2971

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 140 / 151
Realization of IIR system Lattice structure for IIR Systems

for m=3
K3 = a3 (3) = −0.0276

am (i) − am (m)am (m − i)
am−1 (i) = 2
for m=2
1 − Km K2 = a2 (2) = 0.3485
a3 (i) − a3 (3)a3 (3 − i)
a2 (i) =
1 − K32 a2 (i) − a2 (2)a2 (2 − i)
a1 (i) =
a3 (1) − a3 (3)a3 (2) 1 − K22
a2 (1) =
1 − K32 a2 (1) − a2 (2)a2 (1)
a1 (1) =
−0.2971 − (−0.0276)(0.3564) 1 − K22
=
1 − (−0.2971)2 0.2875 − (0.3485)(−0.2875)
=
= −0.2875 1 − (0.3485)2
a3 (2) − a3 (3)a3 (1) = −0.2132
a2 (2) =
1 − K32
0.3564 − (−0.0276)(−0.2971) for m=1
= K1 = a1 (1) = −0.2132
1 − (−0.0.0276)2
= 0.3485

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 141 / 151
Realization of IIR system Lattice structure for IIR Systems

Ladder coefficients are: B(z) = 0.129 + 0.38687z −1 + 0.3869z −2 + 0.129z −3


M
X
βi = bi − βm am (m − i)
m=i+1

b0 = 0.129, b1 = 0.38687, b2 = 0.3869, b3 = 0.129 = β3


i =2
3
X
β2 = b2 − βm am (m − 2) = b2 − β3 a3 (1) = 0.3869 − (0.129)(−0.2971) = 0.4252
m=3

i =1
3
X
β1 = b1 − βm am (m − 1)
m=2
= b1 − β2 a2 (1) − β3 a3 (2) = 0.3867 − (0.4252)(−0.2875) − (0.129)(0.3564) = 0.4630

i =0
3
X
β0 = b0 − βm am (m)
m=1
= b0 − β1 a1 (1) − β2 a2 (2) − β3 a3 (3)
= 0.129 − (0.4630)(−0.2132) − (0.4252)(0.3485) − (0.129)(−0.0276) = 0.0831

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 142 / 151
Realization of IIR system Lattice structure for IIR Systems

fN(n)=x(n) fN-1(n) f2(n) f1(n) f0(n)


+ + +
- K3=-0.0276 - K2=-0.3485 - K1=-0.2132
K1=-0.2132
K3 K2=-0.3485
gN(n) gN-1(n) g2(n) g1(n) g0(n)
+ Z-1 + Z-1 + Z-1

β 2 = 0.4252 β1 = 0.4630 β 0 = 0.0831


β 3 = 0.129
y ( n)
+ + +

Figure 78: Lattice filter

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 143 / 151
Realization of IIR system Lattice structure for IIR Systems

A linear time invariant system is defined by

1 + z −1 + z −2
H(z) =
(1 + 0.5z −1 )(1 + 0.3z −1 )(1 + 0.4z −1 )

Realize the IIR transfer function using lattice ladder structure


Solution:

1 + z −1 + z −2
H(z) =
(1 + 0.5z −1 )(1 + 0.3z −1 )(1 + 0.4z −1 )
1 + z −1 + z −2
=
1 + 1.2z −1 + 0.47z −2 + 0.06z −3

1
H(z) = B(z)
A(z)

where

A(z) = 1 + 1.2z −1 + 0.47z −2 + 0.06z −3


B(z) = 1 + z −1 + z −2

a3 (3) = 0.06, a3 (2) = 0.47, a3 (1) = 1.2


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,
October
?, ?] 18, 2016 144 / 151
Realization of IIR system Lattice structure for IIR Systems

for m=3
K3 = a3 (3) = 0.06

am (i) − am (m)am (m − i)
am−1 (i) = for m=2
1 − Km 2
K2 = a2 (2) = 0.4
a3 (i) − a3 (3)a3 (3 − i)
a2 (i) =
1 − K32 a2 (i) − a2 (2)a2 (2 − i)
a1 (i) =
a3 (1) − a3 (3)a3 (2) 1 − K22
a2 (1) =
1 − K32 a2 (1) − a2 (2)a2 (1)
a1 (1) =
1.2 − (−0.06)(0.47) 1 − K22
=
1 − (−0.06)2 1.176 − (0.4)(1.176)
=
= 1.176 1 − (0.4)2
a3 (2) − a3 (3)a3 (1) = 0.84
a2 (2) =
1 − K32
0.47 − (−0.06)(1.2) for m=1
= K1 = a1 (1) = 0.84
1 − (0.06)2
= 0.4

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 145 / 151
Realization of IIR system Lattice structure for IIR Systems
i =1

3
X
β1 = b1 − βm am (m − 1)
Ladder coefficients are
m=2
B(z) = 1 + z −1 + z −2 M=1
b0 = 1, b1 = 1, b2 = 1 = β2 = b1 − β2 a2 (1)
= 1 − 1.176 = −0.176
M
X
βi = bi − βm am (m − i) i =0
m=i+1
1
X
β2 = b2 = 1 β0 = b0 − βm am (m)
m=1
= b0 − β1 a1 (1) − β2 a2 (2)
= 1 + .84(0.176) − 0.4 = 0.748
fN(n)=x(n) fN-1(n) f2(n) f1(n) f0(n)
+ + +
- K3=-0.06 - K2=-0.4 - K1=-0.84
K1=-0.84
K3 =0.06 K2=-0.4
gN(n) gN-1(n) g2(n) g1(n) g0(n)
+ Z-1 + Z-1 + Z-1

β2 = 1 β1 = −0.176 β 0 = 0.748
y ( n)
+ +

Figure 79: Lattice filter


Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,
October
?, ?] 18, 2016 146 / 151
Realization of IIR system Signal Flow Graph

Signal Flow Graph

Signal flow graph (SFG) is graphical representation of block diagram structure.


The basic elements of SFG are branches and nodes. The signal out of branch is equal to
the branch gain.
Adders and pick-off points are replaced by nodes. Multipliers and delay elements are
indicated by the the branch transmittance.
The input to the system originates at source node and output signal is extracted from a
sink node.
The importance of SFG in FIR or IIR structure is transposition or flow graph reversal
theorem.
Theorem states that “if we reverse the directions of all branch transmittances and
interchange the input and output in the flow graph, the system function remains
unchanged”. The resulting structure is called a transposed structure or a transposed
form.
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,
October
?, ?] 18, 2016 147 / 151
Realization of IIR system Signal Flow Graph

x ( n) b0 y ( n) 2 Sink Node
+ + x ( n) 1 b0 3 y ( n)

Source
Z-1 Node − a1 Z −1 b1
−a1 b1
+ + 4
b2
− a2
Z-1 Z −1
− a2 b2
5

Figure 80: Direct Form II Figure 81: Signal Flow graph


y ( n) b0
2 + x ( n)
y ( n) 1 b0 3 x ( n)

Z-1
− a1 Z −1 b1
− a1 b1
4 +
b2
− a2
Z-1
Z −1
− a2 b2
5 +

Figure 82: Transposed Structure SFG Figure 83: Direct form-II realization
Figure 80 shows the direct form II structure while Figure 81 shows its signal flow graph
Figure 82 shows the Transposed Structure while Figure 83 shows its realization.

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 148 / 151
Realization of IIR system Signal Flow Graph

A linear time invariant system is defined by


1 − 12 z −1 + 41 z −2
H(z) =
1 + 18 z −1 − 51 z −2 + 16 z −3
Draw the signal flow graph, transposed signal flow graph and transposed direct form-II structure
2 Sink Node
x ( n) 1 3 y ( n)

Source 1

1 −1 −
Node
8
Z 2 y ( n)
x ( n)
1
4
+
1
5 Z −1
4
1
− 5
6
Z-1
1 1
− −
Figure 84: Signal flow graph 8 2
+

Z-1
2
y ( n) 1 3 x ( n)
1 1
Source 1
1 − 5 4
Node −
8
Z −1
4
2 +
1
1 1
5 Z −1
4

1
6
− 5 Z-1
6

Figure 86: Direct form-II Structure


Figure 85: Transposed Structure signal flow
graph
Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,
October
?, ?] 18, 2016 149 / 151
Realization of IIR system Signal Flow Graph

For the flow graph write difference equations and system function

x ( n) y ( n)

1 Z −1 1
Z −1
5 4

5
Z −1 −
24

Z −1 1

12

Figure 87: Direct Form I

Solution:
1 5 1 1
y (n) = y (n − 1) − y (n − 2) − y (n − 3) + x(n) + x(n − 1)
4 24 12 5
1 + 15 z −1
H(z) = 1 −1 5 −2 1 −3
1− 4
z + 24
z + 12
z

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 150 / 151
Realization of IIR system Signal Flow Graph

For the flow graph write difference equations and system function
x ( n) w( n ) y ( n)

Z −1 3 Z −1
1
Y (z) Y (z) W (z)
Z −1
H(z) = =
Z −1 X (z) W (z) X (z)
1 2
1
=
Figure 88: Direct Form II Cascade (1 − z −1 − 2z −2 )(1 − 3z −1 − z −2 )
1
=
1 − 4z −1 + 7z −3 + 2z −4
Solution:

w (n) = x(n) + 3w (n − 1) + w (n − 2)
Y (z)[1 − 4z −1 + 7z −3 + 2z −4 ] = X (z)
W (z) 1
= Y (z) = X (z)+4z −1 Y (z)−7z −3 Y (z)−2z −4 Y (z)
X (z) 1 − 3z −1 − z −2

y (n) = w (n) + y (n − 1) + 2y (n − 2) y (n) = x(n)+4y (n−1)−7y (n−3)−2y (n−4)

Y (z) 1
=
W (z) 1 − z −1 − 2z −2

Dr. Manjunatha. P (JNNCE) UNIT - 8: Implementation of Discrete-time Systems[?, ?,


October
?, ?] 18, 2016 151 / 151
Realization of Digital Filters

Chapter Intended Learning Outcomes:

(i) Ability to implement finite impulse response (FIR) and


infinite impulse response (IIR) filters using different
structures in terms of block diagram and signal flow graph

(ii) Ability to determine the system transfer function and


difference equation given the corresponding block diagram
or signal flow graph representation.

H. C. So Page 1 Semester B 2011-2012


Filter Implementation

When causality is assumed, a LTI filter can be uniquely


characterized by its transfer function :

(9.1)

or the corresponding difference equation:

(9.2)

where and are the system input and output


H. C. So Page 2 Semester B 2011-2012
Assuming , the output is:

(9.3)

Assigning and yields

(9.4)

Computing involves and


. That is, we need
 Delay elements or storage
 Multipliers
 Adders (subtraction is considered as addition)
H. C. So Page 3 Semester B 2011-2012
How many storage elements are needed?
How many multipliers are needed?
How many adders are needed?

Computations of y[n] can be arranged in different ways to


give the same difference equation, which leads to different
structures for realization of discrete-time LTI systems
4 basic forms of implementations, namely, direct form,
canonic form, cascade form and parallel form will be
described
An implementation can be represented using either a block
diagram or a signal flow graph

H. C. So Page 4 Semester B 2011-2012


Block Diagram Representation

adder

multiplier

unit delay

Fig.9.1: Basic operations in block diagram


H. C. So Page 5 Semester B 2011-2012
Although an adder can generally deal with more than two
sequences, here we consider two signals in order to align
with practical implementation in microprocessors.

When , it corresponds to signal amplification while the


signal is attenuated for . Note that a multiplier usually
has the highest implementation or computational cost and
thus it is desired to reduce the number of multipliers in
different systems, if possible.

The transfer function corresponds to a unit delay. It can


be implemented by providing a storage register for each
unit delay in digital implementation. If the required number
of samples of delay is , then the corresponding system
function is .

H. C. So Page 6 Semester B 2011-2012


Signal Flow Graph Representation

adder

multiplier

unit delay

Figure 9.2: Basic operations in signal flow graph


H. C. So Page 7 Semester B 2011-2012
Its basic elements are branches with directions, and nodes.
That is, a signal flow graph is a set of directed branches
that connect at nodes.

Signal at a node of a flow graph is equal to the sum of the


signals from all branches connecting to the node.

Signal out of a branch is equal to the branch gain times the


signal into the branch.

Branch gain can refer to a scalar or a transfer function of


corresponding to multiplication or unit delay operation,
respectively.

When the branch gain is unity, it is left unlabeled.

A signal flow graph provides an alternative but equivalent


graphical representation to a block diagram structure
H. C. So Page 8 Semester B 2011-2012
Example 9.1
Draw the block diagram and signal flow graph
representations of a LTI system whose input and output
satisfy the following difference equation:

Fig.9.3: Illustration of block diagram


H. C. So Page 9 Semester B 2011-2012
Fig.9.4: Illustration of signal flow graph

2 adders, 3 multipliers and 2 delay elements are required to


implement the system.

H. C. So Page 10 Semester B 2011-2012


Structures for FIR Filter
For FIR filter, its transfer function does not contain pole.
That is, setting and in (9.1) yields
a FIR system:

(9.5)

while the corresponding difference equation is:

(9.6)

H. C. So Page 11 Semester B 2011-2012


1. Direct Form
Comparing (9.6) with the convolution formula of (3.18),
correspond to the system impulse response :

(9.7)

(9.6) can also be written as:

(9.8)

The direct form follows straightforwardly from the difference


equation.

H. C. So Page 12 Semester B 2011-2012


The implementation needs memory locations for storing
previous inputs of , multiplications and
additions for computing each output value of .

Fig.9.5: Direct form of FIR filter

H. C. So Page 13 Semester B 2011-2012


2. Cascade Form
Expressing (9.5) as products of second-order polynomial
system functions via factorization:

(9.9)

where is the largest integer contained in


. Note that when is odd, one of the will be
zero. Assuming that is even, this implementation needs
storage elements, multiplications and additions,
for computing each output value of .

Why second-order polynomial instead of first-order


polynomial?
H. C. So Page 14 Semester B 2011-2012
Fig.9.6: Cascade form of FIR filter

(9.10)
and
(9.11)

H. C. So Page 15 Semester B 2011-2012


Taking transform on (9.10) and (9.11):

(9.12)
and

(9.13)
Substituting (9.13) into (9.12) yields:

(9.14)

Extending (9.14) to , we finally get:

(9.15)
H. C. So Page 16 Semester B 2011-2012
To save the computational complexity, we express (9.9) as:

(9.16)

where , and ,
. That is, all are normalized to 1.

Assuming that is even, (9.16) needs delay elements,


multiplications and additions, for computing each
output value of

Why (M+1) multiplications are needed?

H. C. So Page 17 Semester B 2011-2012


Fig.9.7: Cascade form of FIR filter with smaller complexity

Example 9.2
Draw the signal flow graph using the cascade form for the
LTI system whose transfer function is:

H. C. So Page 18 Semester B 2011-2012


To factorize , we use the MATLAB command roots([1 1
1 1 1]) to solve for the roots:
0.3090 + 0.9511i
0.3090 - 0.9511i
-0.8090 + 0.5878i
-0.8090 - 0.5878i

Hence can be factorized as

Although it can be realized with first-order sections,


complex coefficients are needed, which implies higher
computational cost. To guarantee real-valued coefficients,
we group the sections of complex conjugates together:
H. C. So Page 19 Semester B 2011-2012
Fig.9.8: Two possible cascade forms for FIR filter
H. C. So Page 20 Semester B 2011-2012
Structures for IIR Filter
When there is at least one pole in , it corresponds to an
IIR filter. The corresponding transfer function is thus:

(9.17)

That is, IIR filter is the general form of any discrete-time


LTI system.

H. C. So Page 21 Semester B 2011-2012


1. Direct Form
It realizes (9.4) in an explicit manner via decomposing it
into a pair of difference equations:

(9.18)

and
(9.19)

The direct form can also be obtained by decomposing


into two transfer functions as:

(9.20)
where
H. C. So Page 22 Semester B 2011-2012
(9.21)

and
(9.22)

In the transform domain, we have:

(9.23)

and
(9.24)

H. C. So Page 23 Semester B 2011-2012


Fig.9.9: Direct form of IIR filter
H. C. So Page 24 Semester B 2011-2012
The direct form implementation needs memory
locations, multiplications and additions,
for computing each output value of .

2. Canonic Form
On the other hand, we can first pass through the filter
to produce an intermediate signal . The is then
passed through the system to give :

(9.25)

and
(9.26)

H. C. So Page 25 Semester B 2011-2012


Applying inverse transform, we get:

(9.27)

and
(9.28)

which can be considered as an alternative direct form.

H. C. So Page 26 Semester B 2011-2012


Fig.9.10: Alternative direct form of IIR filter
H. C. So Page 27 Semester B 2011-2012
Assume . Since the same signals
, are stored in the two chains of
storage elements, they can be combined to reduce the
memory requirement.

In general, the minimum number of delay elements


required is .

It is called canonic form because this implementation


involves the minimum number of storages.

H. C. So Page 28 Semester B 2011-2012


Fig.9.11: Canonic form of IIR filter
H. C. So Page 29 Semester B 2011-2012
Example 9.3
Draw the block diagrams using the direct and canonic forms
for the LTI system whose transfer function is:

According to (9.18)-(9.19):

Based on (9.27)-(9.28):

H. C. So Page 30 Semester B 2011-2012


Fig.9.12: Direct form of second-order IIR filter

Fig.9.13: Canonic form of second-order IIR filter


H. C. So Page 31 Semester B 2011-2012
3. Cascade Form
We factorize the numerator and denominator polynomials in
terms of second-order polynomial system functions as:

(9.29)

Without loss of generality, it is assumed that so that


. Note that when or is odd, one of the
or will be zero.

H. C. So Page 32 Semester B 2011-2012


Each second-order subsystem

(9.30)

can be realized in either the direct or canonic form.


Nevertheless, the canonic form is preferred because it
requires the minimum number of delay elements.

In IIR filter implementation, we can group the numerator


and denominator of (9.30) in different ways, leading to
different pole and zero combinations in each of the second-
order sections.

For example, there are four possible cascade realizations for


a fourth-order IIR filter with .
H. C. So Page 33 Semester B 2011-2012
H. C. So Page 34 Semester B 2011-2012
Fig.9.14: 4 possible cascade realizations for 4th-order IIR filter
H. C. So Page 35 Semester B 2011-2012
To save the computational complexity, we express (9.29) as

(9.31)

where , and ,
.

Assuming that is even with , the cascade


implementation of (9.31) needs or delay elements,
multiplications and additions, for computing
each . That is, its memory and computational
requirements are equal to those of the direct form.

H. C. So Page 36 Semester B 2011-2012


Example 9.4
Draw the signal flow graph using the cascade form with
first-order sections for the LTI system whose transfer
function is:

For each first-order section, canonic form is assumed.

Solving the quadratic equations of the numerator and


denominator polynomials, we can factorize as:

There are four possible cascade forms for :


H. C. So Page 37 Semester B 2011-2012
Note that although all four realizations are equivalent for
infinite precision, they may differ in actual implementation
when finite-precision numbers are employed.

H. C. So Page 38 Semester B 2011-2012


Fig.9.15: 4 possible cascade realizations with 1st-order sections
H. C. So Page 39 Semester B 2011-2012
Example 9.5
Consider a LTI system whose transfer function is:

Find the number of possible combinations of cascade form


with second-order sections. Determine if the system is
stable or not.

Further factorizing yields:

H. C. So Page 40 Semester B 2011-2012


For the numerator polynomials, there are 3 grouping
possibilities in terms of second-order sections as follows:

There are also 3 grouping possibilities for the denominator:

H. C. So Page 41 Semester B 2011-2012


Each fourth-order IIR filter can be realized in four possible
cascade forms.

As a result, the number of possible cascade form


combinations with second-order sections for is
.

When implementing a filter, causality is always assumed


because it is impossible to realize a noncausal system
where the output depends on future input. It is clear that
the region of convergence (ROC) for causal is .
Since the ROC does not include the unit circle, the system is
not stable.

In summary, a causal system is stable when all poles are


inside the unit circle.
H. C. So Page 42 Semester B 2011-2012
4. Parallel Form
The idea of the parallel form is similar to the partial fraction
expansion of transform:

(9.32)

where . But now we use second-order


sections in order to ensure all , , and are
real.

Note that when , the first summation term in (9.32)


will not be included.

H. C. So Page 43 Semester B 2011-2012


Example 9.6
Draw the block diagram using parallel form for a LTI system
whose transfer function is:

Following the long division as in Example 5.9, we obtain:

H. C. So Page 44 Semester B 2011-2012


Fig.9.16: Parallel form with second-order section

As the poles of are real, we can also express in


terms of first-order sections as:

H. C. So Page 45 Semester B 2011-2012


Fig.9.17: Parallel form with first-order sections
H. C. So Page 46 Semester B 2011-2012
Example 9.7
Determine the transfer function and the difference
equation which relates and for

Fig.9.18: LTI system parameterized by and


H. C. So Page 47 Semester B 2011-2012
We first introduce an intermediate sequence to relate
and . Then we can establish:

and

Applying transform yields:

and

From the second equation, we have:

H. C. So Page 48 Semester B 2011-2012


Substituting it into the first equation, we finally have:

Taking the inverse transform gives:

H. C. So Page 49 Semester B 2011-2012


Comparison of Different Structures
The major factors that affect our choice of a specific
realization are computational complexity, memory
requirement, and finite word-length effects. Assuming that
is even with :
Structure Multiplication Addition Register
Direct form
Cascade form
Table 9.1: FIR filter structure comparison
Structure Multiplication Addition Register
Direct form
Canonic form
Cascade form
Parallel form
Table 9.2: IIR filter structure comparison
H. C. So Page 50 Semester B 2011-2012
Computations of the direct form can be reduced if the FIR
filter coefficients are symmetric or anti-symmetric.
When the filter coefficients are expressed using infinite
precision numbers, all realizations are same. However, in
practice, they are processed in registers which have finite
word-lengths. In the presence of quantization errors, the
cascade and parallel realizations are more robust than the
direct and canonic forms, that is, they have frequency
responses closer to the desired responses.
FIR filters are less sensitive than IIR filters to finite word-
length effects.
For a feasible system, it should be causal and stable.
In cascade and parallel realizations of IIR filters, system
stability can be easily monitored by checking pole locations.
H. C. So Page 51 Semester B 2011-2012

You might also like