signal and systems ii b_ digital filters_chapter 12

95
Signals and Systems IIB Dr. Olutayo O. Oyerinde Room 111 School of Electrical and Information Engineering Chamber of Mines Building University of the Witwatersrand E-mail: [email protected]

Upload: ozwurld

Post on 09-Apr-2016

7 views

Category:

Documents


0 download

DESCRIPTION

Presentation - Design of digital filters

TRANSCRIPT

Page 1: Signal and Systems II B_ Digital Filters_Chapter 12

Signals and Systems IIB

Dr. Olutayo O. Oyerinde

Room 111 School of Electrical and Information

Engineering Chamber of Mines Building

University of the Witwatersrand

E-mail: [email protected]

Page 2: Signal and Systems II B_ Digital Filters_Chapter 12

Course Contents

Discrete Time Signals

Discrete Signal Representations; Its Basic Operations

Discrete Signal Classifications ; Discrete Signal Models

Discrete Time Systems

Definition, Properties

Linear Time Invariant (LTI) Systems, System Analysis: Difference Equation

Fourier Transforms (Analysis) of Discrete Time Signals

Discrete-Time Fourier Transform (DTFT): Definition, Properties

Discrete-Fourier Transform (DFT)

Fast Fourier Transform (FFT)

Discrete-Time System Analysis: Z-Transform

Definition, Properties of Z-Transform, Inverse Z-Transform

Digital Filters

Discrete IIR Filters

Discrete FIR Filters

Discrete State Space Modeling

Page 3: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters

Page 4: Signal and Systems II B_ Digital Filters_Chapter 12

Discrete Time Signals

Discrete Signal Representations; Its Basic Operations

Discrete Signal Classifications ; Discrete Signal Models

Discrete Time Systems

Definition, Properties

Linear Time Invariant (LTI) Systems, System Analysis: Difference Equation

Fourier Transforms (Analysis) of Discrete Time Signals

Discrete-Time Fourier Transform (DTFT): Definition, Properties

Discrete-Fourier Transform (DFT)

Fast Fourier Transform (FFT)

Discrete-Time System Analysis: Z-Transform

Definition, Properties of Z-Transform, Inverse Z-Transform

Digital Filters

Discrete IIR Filters

Discrete FIR Filters

Discrete State Space Modeling

Page 5: Signal and Systems II B_ Digital Filters_Chapter 12

The response of a Discrete-Time Systems to an (everlasting) exponential

𝑧𝑛 is also an (everlasting) exponential 𝐻 𝑧 𝑧𝑛 obtained as follow:

𝑥 𝑛 = 𝑧𝑛 𝑦 𝑛

𝑦 𝑛 = ℎ 𝑛 ∗ 𝑥 𝑛 = ℎ 𝑛 ∗ 𝑧𝑛 = ℎ 𝑚 𝑧𝑛−𝑚 = 𝑧𝑛 ℎ[𝑚]𝑧−𝑚∞

𝑚=−∞

𝑚=−∞

But z-transform of a discrete-time sequence 𝑥[𝑛] is defined as:

𝑋 𝑧 = 𝒵 𝑥[𝑛] = 𝑥[𝑛]𝑧−𝑛∞

𝑛=−∞

⇒ ℎ[𝑚]𝑧−𝑚∞

𝑚=−∞

= 𝐻[𝑧]

Hence,

𝑦 𝑛 = 𝑧𝑛𝐻[𝑧]

Digital Filters: Response to Complex Exponential

][nh

Page 6: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Response to Discrete-time Sinusoid

Filtering Characteristics of a system (Filter) are specified by its frequency response

Frequency Response of Discrete Time systems to Discrete-time Sinusoid cos Ω𝑛 (or exponential 𝒆𝒋𝜴𝒏) :

From the previous slides, 𝑧𝑛 ⇔ 𝐻 𝑧 𝑧𝑛, therefore, setting 𝑧 = 𝑒𝑗Ω, we have:

1. 𝒆𝒋𝜴𝒏 𝑯 𝒆𝒋𝜴 𝒆𝒋𝜴𝒏

2. 𝒆−𝒋𝜴𝒏 𝑯 𝒆−𝒋𝜴 𝒆−𝒋𝜴𝒏

3. 2cos Ω𝑛 = 𝒆𝒋𝜴𝒏+ 𝒆−𝒋𝜴𝒏 𝑯 𝒆𝒋𝜴 𝒆𝒋𝜴𝒏 +𝑯 𝒆−𝒋𝜴 𝒆−𝒋𝜴𝒏 = 𝟐𝑹𝒆 𝑯 𝒆𝒋𝜴 𝒆𝒋𝜴𝒏

Note: By expressing 𝑯 𝒆𝒋𝜴 in polar form gives: 𝑯 𝒆𝒋𝜴 = 𝑯 𝒆𝒋𝜴 𝒆𝒋∠𝑯 𝒆𝒋𝜴

; From (3)

4. cos Ω𝑛 𝑅𝑒 𝑯 𝒆𝒋𝜴 𝒆𝒋𝜴𝒏 = 𝑯 𝒆𝒋𝜴 𝒆𝒋∠𝑯 𝒆𝒋𝜴𝒆𝒋𝜴𝒏

= 𝑯 𝒆𝒋𝜴 𝒆𝒋(𝜴𝒏+∠𝑯 𝒆𝒋𝜴 ) = 𝑯 𝒆𝒋𝜴 𝒄𝒐𝒔 𝛀𝒏 + ∠𝑯 𝒆𝒋𝜴

5. cos Ω𝑛 + 𝜃 𝑯 𝒆𝒋𝜴 𝒄𝒐𝒔 𝛀𝒏 + 𝜽 + ∠𝑯 𝒆𝒋𝜴

][nh

][nh

][nh

][nh

][nh

Page 7: Signal and Systems II B_ Digital Filters_Chapter 12

When a sinusoid cos (𝜔𝑡)is sampled with sampling interval 𝑇𝑠, the

resulting signal is a discrete-time sinusoid cos (𝜔𝑛𝑇𝑠)

Start with a continuous-time sinusoid:

𝑥 t = cos (𝜔𝑡)

Sample it every 𝑇𝑠 seconds

𝑥 𝑛 = 𝑥 t |𝑡=𝑛𝑇𝑠 = cos (𝜔𝑛𝑇𝑠)

If 𝜔𝑇𝑠 is substituted for Ω, all the results in the previous slide apply.

Digital Filters: Response to Sampled Sinusoid

Page 8: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Frequency Response

Example

Calculate the frequency response of the system given as a difference equation

as, assuming zero initial conditions.

𝑦 𝑛 + 1 − 0.8𝑦 𝑛 = 𝑥[𝑛 + 1]

Solution:

Taking the z-transform of both sides yields

𝑌 𝑧 𝑧 − 0.8𝑌 𝑧 = 𝑋 𝑧 𝑧 ⇒ 𝑌 𝑧 𝑧 − 0.8 = 𝑋 𝑧 𝑧

Therefore, the transfer function 𝐻 𝑧 is obtained as

𝐻 𝑧 =𝑌[𝑧]

𝑋[𝑧]=𝑧

𝑧 − 0.8=

1

1 − 0.8𝑧−1

Substitutes 𝑒𝑗Ω for 𝑧, gives

𝐻 𝑒𝑗Ω =1

1 − 0.8𝑒−𝑗Ω=

1

1 − 0.8 𝑐𝑜𝑠Ω − 𝑗𝑠𝑖𝑛Ω=

1

1 − 0.8𝑐𝑜𝑠Ω + 𝑗0.8𝑠𝑖𝑛Ω

Page 9: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Frequency Response

Solution contd:

Absolute value (magnitude response) 𝑎 + 𝑗𝑏 = 𝑎2 + 𝑏2, 𝐻 𝑒𝑗Ω is:

𝐻 𝑒𝑗Ω =1

1 − 0.8𝑐𝑜𝑠Ω 2 + 0.8𝑠𝑖𝑛Ω 2=

1

1.64 − 1.64𝑐𝑜𝑠Ω

Angle (phase response), ∠ 𝑎 + 𝑗𝑏 = 𝑡𝑎𝑛−1 𝑏 𝑎 is:

∠𝐻 𝑒𝑗Ω = 0 − 𝑡𝑎𝑛−10.8𝑠𝑖𝑛Ω

1 − 0.8𝑐𝑜𝑠Ω= −𝑡𝑎𝑛−1

0.8𝑠𝑖𝑛Ω

1 − 0.8𝑐𝑜𝑠Ω

The plots of amplitude and phase response as a function of Ω are

in Figure 12.1 on the next slide

Page 10: Signal and Systems II B_ Digital Filters_Chapter 12

Magnitude and Phase Response Magnitude Response

Phase Response

Figure 12.1

jeH 13.53

23

Digital Filters: Frequency Response

jeH 5

2 30

0

13.53

4

4

Page 11: Signal and Systems II B_ Digital Filters_Chapter 12

The z-transform of a difference equation can be written in general

form as

𝐻 𝑧 = 𝑏𝑛𝑧 − 𝑧1 𝑧 − 𝑧2 . . . 𝑧 − 𝑧𝑛𝑧 − 𝛾1 𝑧 − 𝛾2 . . . 𝑧 − 𝛾𝑛

Complex number as vector in complex plane

𝑧 and 𝑧𝑖 are both complex numbers. Their difference is also a complex number (vector in complex plane)

The directed line segment from 𝑧𝑖 to 𝑧 in the

Complex plane shown in Figure 12.2 represents

The complex number 𝑧 − 𝑧𝑖. The length of the

segment is 𝑧 − 𝑧𝑖 and its angle is ∠ 𝑧 − 𝑧𝑖 Figure 12.2

Digital Filters: Frequency response from Pole-Zero location

Re

Im

iz

izz

z

Page 12: Signal and Systems II B_ Digital Filters_Chapter 12

To compute the frequency response 𝐻 𝑒𝑗Ω , we have to evaluate

𝐻 𝑧 at 𝑧 = 𝑒𝑗Ω.

However, for 𝑧 = 𝑒𝑗Ω, 𝑧 = 1, and ∠𝑧 = Ω so that 𝑧 = 𝑒𝑗Ω represents a

point on the unit circle at an angle Ω with the horizontal.

By connecting all zeros 𝑧1, 𝑧2, . . . 𝑧𝑛 and all poles 𝛾1, 𝛾2, . . . 𝛾𝑛 to the

point 𝑒𝑗Ω in the vector representation of 𝐻[𝑧] shown in Figure 12.3.

(Note: 𝑧 − 𝑧1 =𝑟1, ∠𝑟1=∅1; and 𝑧 − 𝛾1 =𝑑1, ∠𝑑1=𝜃1)

∴ 𝐻 𝑒𝑗Ω = 𝐻[𝑧]|𝑧=𝑒𝑗Ω = 𝑏𝑛𝑟1𝑒𝑗∅1 𝑟2𝑒

𝑗∅2 ... 𝑟𝑛𝑒𝑗∅𝑛

𝑑1𝑒𝑗𝜃1 𝑑2𝑒

𝑗𝜃2 … 𝑑𝑛𝑒𝑗𝜃𝑛

= 𝑏𝑛𝑟1𝑟2…𝑟𝑛

𝑑1𝑑2…𝑑𝑛𝑒𝑗 ∅1+∅2+ …+∅𝑛 − 𝜃1+𝜃2+⋯𝜃𝑛 Fig.12.3

Digital Filters: Frequency response from Pole-Zero location

Re

Im

x

x

o o

1

2

1z2z

1d

2d 2r1r

1

2

12

Page 13: Signal and Systems II B_ Digital Filters_Chapter 12

From the previous slide:

𝐻 𝑒𝑗Ω = 𝑏𝑛𝑟1𝑟2…𝑟𝑛𝑑1𝑑2…𝑑𝑛

𝑒𝑗 ∅1+∅2+ …+∅𝑛 − 𝜃1+𝜃2+⋯𝜃𝑛

Therefore,

Magnitude:

𝐻 𝑒𝑗Ω = 𝑏𝑛𝑟1𝑟2…𝑟𝑛𝑑1𝑑2…𝑑𝑛

Phase:

∠𝐻 𝑒𝑗Ω = ∅1 + ∅2 + …+ ∅𝑛 − 𝜃1 + 𝜃2 +⋯𝜃𝑛

Digital Filters: Frequency response from Pole-Zero locations

Page 14: Signal and Systems II B_ Digital Filters_Chapter 12

The main filter types are as follows:

Low-pass Filters (LPF) - These filters pass signals with low frequencies and stop signals with high frequencies.

High-pass Filters (HPF) - These filters pass signals with high frequencies and stop signals with low frequencies.

Band pass Filters (BPF) - These filters pass signals with a range of frequencies and stop frequencies below and above the set range.

Band-Stop Filters (BSF) - These filters pass signals with all frequencies except the ones within a defined range.

All-Pass Filters (APF) - These filters pass signals with all frequencies, but they modify the phase of the frequency components.

Digital Filters: Types of Filters

Page 15: Signal and Systems II B_ Digital Filters_Chapter 12

Notes:

Poles near unit circle indicate filter’s passband(s).

Zeros on/near unit circle indicate stopband(s).

Lowpass Filter:

Placing a pole inside the unit circle near the point 𝑧 = 𝑒𝑗Ω = 1 would result in

a lowpass response. (Note: In this case, Ω = 𝜔𝑇 = 0). Corresponding phase

and magnitude response is shown in Figure 12.4

Figure 12.4:Pole-zero configuration and frequency response for low pass filter

Digital Filters: Effects of Poles/Zeros’ locations

x

Page 16: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Effects of Poles/Zeros’ locations

Lowpass Filter Contd:

Placing a zero at the origin in the previous pole-zero configuration does not

change the amplitude response but it does modify the phase response.

The corresponding phase and magnitude response is shown in Figure 12.5.

Figure 12.5: Pole-zero configuration and frequency response for low pass

filter

x o

Page 17: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Effects of Poles/Zeros’ locations

Lowpass Filter Contd:

Placing a zero at 𝑧 = 𝑒𝑗Ω = −1 in the first pole-zero configuration changes both

the amplitude and phase response.

The point z = −1 corresponds to frequency ω = 𝜋 𝑇 𝑧 = 𝑒𝑗Ω = 𝑒𝑗𝜔𝑇 = 𝑒𝑗𝜋 = −1 .

Consequently, the amplitude response becomes more attenuated at higher

frequencies, with a zero gain at ω𝑇 = 𝜋

The corresponding phase and magnitude response is shown in Figure 12.6

Figure 12.6:Pole-zero configuration and frequency response for low pass filter

x o

Page 18: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Effects of Poles/Zeros’ locations

Ideal Lowpass Filter:

Ideal low pass characteristics can be approached if more poles staggered

near 𝑧 = 𝑒𝑗Ω = 1 (but within the unit circle) are used. Figure 12.7 below

illustrates a third-order low pass filter with three poles near 𝑧 = 1 and a

third-order zero at 𝑧 = −1.

Figure 12.7: Pole-zero configuration and frequency response for third-order low pass filter

x x

o

Page 19: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Effects of Poles/Zeros’ locations

Ideal Highpass Filter:

A highpass filter has a small gain at lower frequencies and a high gain at higher frequencies.

This characteristics could be achieved by placing a pole or poles near 𝑧 = 𝑒𝑗Ω = −1, because the

gain at ω𝑇 = 𝜋 is desired to be the highest.

Placing a zero at 𝑧 = 1 further enhances suppression of gain at lower frequencies.

Figure 12.8 below illustrates a possible pole-zero configuration of a third-order highpass filter

with corresponding frequency response.

Figure 12.8: Pole-zero configuration and frequency response for third-order Highpass filter

Page 20: Signal and Systems II B_ Digital Filters_Chapter 12

Figures 12.9: Ideal Frequency selective filters

Frequency selective filters are systems which select certain frequencies while they reject others.

The parts of the frequency band for which the response is “1” are called

the passband(s); where the response is “0” is the stopband(s).

The dashed lines show the region in which (for most design methods) the

response goes from 1 to 0 (not necessarily linear as shown here), which is

called the transition band. Another name for the bandstop filter is

notch filter.

Digital Filters: Ideal Filters

Page 21: Signal and Systems II B_ Digital Filters_Chapter 12

A digital filter is

a mathematical algorithm implemented in hardware

and/ or software that operates on a digital input signal

to produce a digital output signal for the purpose of

achieving a filtering objective.

The term “digital filter” refers to the specific hardware

or software routine that performs the filtering

algorithm.

Digital Filters

Page 22: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters

Digital filters are preferred in a number of applications:

Data compression

Biomedical

Signal processing

Speech processing

Image processing

Data transmission

Digital audio

Telephone echo cancellation

Etc.

Page 23: Signal and Systems II B_ Digital Filters_Chapter 12

Disadvantages of Digital Filters:

Speed limitation

Finite word length effects

Long design and development times

Digital Filters

Page 24: Signal and Systems II B_ Digital Filters_Chapter 12

Digital filter can be classified as either Recursive or Nonrecursive

Consider a third order transfer function;

𝐻 𝑧 =𝑌 𝑧

𝑋 𝑧=𝑏3𝑧3 + 𝑏2𝑧

2 + 𝑏1𝑧 + 𝑏0𝑧3 + 𝑎2𝑧

2 + 𝑎1𝑧 + 𝑎0……………………………………………(12.1)

The input 𝑥 𝑛 and the corresponding output 𝑦 𝑛 are related by the difference equation:

𝑦 𝑛 + 𝑎2y n − 1 + 𝑎1y 𝑛 − 2 + 𝑎0y 𝑛 − 3 = 𝑏3𝑥 𝑛 + 𝑏2𝑥 𝑛 − 1 + 𝑏1𝑥 𝑛 − 2 + 𝑏0𝑥 𝑛 − 3

𝑦 𝑛 = 𝐨𝐮𝐭𝐩𝐮𝐭 𝐭𝐞𝐫𝐦𝐬 + 𝐢𝐧𝐩𝐮𝐭 𝐭𝐞𝐫𝐦𝐬

= −𝑎2y n − 1 − 𝑎1y 𝑛 − 2 − 𝑎0y 𝑛 − 3

+ 𝑏3𝑥 𝑛 + 𝑏2𝑥 𝑛 − 1 + 𝑏1𝑥 𝑛 − 2 + 𝑏0𝑥 𝑛 − 3 ………………………… . . (12.2)

Digital Filters: Classifications

Page 25: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Classifications

Recursive Filter:

A recursive filter has feedback from output to input, and in

general its output is a function of the previous output

samples and the present and past input samples as

described by equation (12.2):

𝑦 𝑛 = −𝑎2y n − 1 − 𝑎1y 𝑛 − 2 − 𝑎0y 𝑛 − 3

+ 𝑏3𝑥 𝑛 + 𝑏2𝑥 𝑛 − 1 + 𝑏1𝑥 𝑛 − 2 + 𝑏0𝑥 𝑛 − 3

Such Filter, because of its recursive nature, propagate itself

forever once an output exists.

Example of such filter is Infinite Impulse Response

(IIR) filter

Page 26: Signal and Systems II B_ Digital Filters_Chapter 12

Non-recursive Filter:

A non-recursive filter is one in which the output is independent of any past outputs

, it has no feedback from output to input.

If the recursive coefficients 𝑎0, 𝑎1, and 𝑎2 in equation (12.2) are set to zero, then

(12.2) becomes

𝐻 𝑧 =𝑌 𝑧

𝑋 𝑧=𝑏3𝑧3 + 𝑏2𝑧

2 + 𝑏1𝑧 + 𝑏0𝑧3

= 𝑏3 +𝑏2𝑧+𝑏1𝑧2+𝑏0𝑧3……………………… . . (12.3)

The difference equation corresponding to this is given as

𝑦 𝑛 = 𝑏3𝑥 𝑛 + 𝑏2𝑥 𝑛 − 1 + 𝑏1𝑥 𝑛 − 2 + 𝑏0𝑥 𝑛 − 3 …………………………… . . (12.4)

From (12.4) it is obvious that the output 𝑦 𝑛 is now computed from the present

and the three past values of the input 𝑥 𝑛

Equation (12.4) illustrates non-recursive filters.

Example of such filter is Finite Impulse Response (FIR) filter

Digital Filters: Classifications

Page 27: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: FIR vs IIR

FIR: Can be designed from entirely discrete-time domain

method(s).

Advantages of any FIR filter : always stable, linear phase, several

flexible methods for designing, convenience in implementation

IIR: Its designs are typically based on transforming a

continuous-time analog filter (such as Butterworth, Chebyshev,

etc.) into discrete-time.

Advantages of any IIR filter : Decades of experiences in designing

analog filters come to play, typically less complex (fewer registers,

arithmetic units) than FIR in realizing the design filter spectrum

Page 28: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Filter’s Realization

Recursive (IIR) and Non-recursive (FIR)Filter

Example: 3rd-order filters in the previous slides

Recursive (IIR) filter : 𝐻 𝑧 =𝑌 𝑧

𝑋 𝑧=𝑏3𝑧3+𝑏2𝑧

2+𝑏1𝑧+𝑏0

𝑧3+𝑎2𝑧2+𝑎1𝑧+𝑎0

Figure 12.10

Non-recursive (FIR) filter : 𝐻 𝑧 =𝑌 𝑧

𝑋 𝑧= 𝑏3 +

𝑏2

𝑧+𝑏1

𝑧2+𝑏0

𝑧3

Figure 12.11

Page 29: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Filter’s Realization

Recursive (IIR) and Non-recursive (FIR)Filter

FIR:

Figure 12.12

IIR:

Figure 12.13

Page 30: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Filter’s Design Methods

The Filter design process consists of two parts:

the approximation problem and

the realization problem.

The approximation problem deals with the choice of

parameters or coefficients in the Filter 's transfer

function.

The realization part of the design problem deals with

choosing a structure to implement the transfer

function.

Page 31: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Filter’s Design Methods

The approximation stage can be divided into 4

steps:

1. A desired or ideal response is chosen (usually in

the frequency domain).

2. A class of Filters is chosen (for example, FIR vs

IIR).

3. A design criteria is chosen (e.g. least square,

etc.).

4. An algorithm is selected to design the transfer

function.

Page 32: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Filter’s Design Methods

The realization stage can be divided into 4

steps:

1. A set of structures is chosen.

2. A criteria for comparing different implementations

is chosen.

3. The best structure is chosen, and its parameters

are calculated from the transfer function.

4. The structure is implemented in hardware or

software.

Page 33: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Filter’s Design Methods

IIR Filter’s Design

IIR filter design methods include the impulse invariance, bilinear

transformation, and step invariance.

In this course we will consider both impulse invariance and bilinear

transformation methods.

Its construction generally uses

Direct form, Cascade form and

Parallel form.

Continuous frequency

band transformation

Impulse

Invariance

method

Bilinear

transformation

method

Step invariance

method

IIR filter

Normalized analog

lowpass filter

Page 34: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Filter’s Design Methods

FIR Filter’s Design

FIR filter design methods include the window function,

frequency sampling, minimize the maximal error, and

MSE.

Its construction generally uses Direct form and Cascade

form.

Window function technique

Frequency sampling technique

Minimize the maximal error

FIR filter

Mean square error

Page 35: Signal and Systems II B_ Digital Filters_Chapter 12

Recap: Analog Filters: Specifications

Low Pass Filter Specification Note: 1 is the 0dB point; for log10(1)=0dB

Figure 12.14

Page 36: Signal and Systems II B_ Digital Filters_Chapter 12

Recap: Analog Filters: Specifications

High Pass Filter Specification

Figure 12.15

Note: 𝝎𝒑= passband cut off frequency, 𝝎𝒔= stopband cut off frequency

Page 37: Signal and Systems II B_ Digital Filters_Chapter 12

Recap: Analog Filters: Specifications

Bandpass Filter Specification

Figure 12.16

Page 38: Signal and Systems II B_ Digital Filters_Chapter 12

Recap: Analog Filters: Specifications

Bandstop Filter Specification

Figure 12.17

Page 39: Signal and Systems II B_ Digital Filters_Chapter 12

Note:

High pass, bandpass and bandstop filters can be

obtained from a basic lowpass filter by simple

frequency transformations.

Hence in the following, we will only consider the design

procedure for basic lowpass filter.

Recap: Analog Filters: Specifications

Page 40: Signal and Systems II B_ Digital Filters_Chapter 12

Recap Chapter 7: Analog Filters

Butterworth Filter

The general form of the magnitude frequency-response function for the Butterworth filter is

𝐻 𝑗𝜔 =1

1 +𝜔𝜔𝑐

2𝑛

, …………………………………………………… . . (12.5)

where “n” is the “order” of the filter, 𝜔𝑐 is the cut off frequency

where the magnitude experiences a 3 dB drop off.

At 𝜔 = 0, the gain 𝐻 𝑗𝜔 = 1 (i. e. 0dB)

At 𝜔 = 𝜔𝑐, the gain drop by a factor of 2 as: 𝐻 𝑗𝜔 = 12 = 0.707 𝑜𝑟 − 3𝑑𝐵,

hence, Power Ratio Magnitude square, 𝐻 𝑗𝜔 2 =1

1+𝜔

𝜔𝑐

2𝑛 = 1 2 = 0.5

Because of the reduction of the power ratio by a factor of 2 at 𝜔 = 𝜔𝑐, 𝜔𝑐 is also being called the half-power frequency.

Page 41: Signal and Systems II B_ Digital Filters_Chapter 12

Recap Chapter 7: Analog Filters Butterworth Filter

In the Figure 12.8: 𝐺𝑝 = 1 − 𝛿𝑝 = 𝐻 𝑗𝜔𝑝 is the minimum passband gain,

while 𝐺𝑠 = 𝛿𝑠 = 𝐻 𝑗𝜔𝑠 is the maximum stopband gain.

Figure 12.18: Passband, stopband, and transitionband in various types of filters.

Page 42: Signal and Systems II B_ Digital Filters_Chapter 12

Recap Chapter 7: Analog Filters

Butterworth Filter: Magnitude Squared Response

𝐻 𝑗𝜔 =1

1+𝜔

𝜔𝑐

2𝑛:

Figure 12.19

Properties of a LP Butterworth filter

Magnitude response : monotonically decreasing

Maximum gain : 1 (0 𝑑𝐵 ) at 𝜔 = 0

𝐻 𝑗𝜔𝑐 = 0.5 = 0.707 ∶ −3𝑑𝐵 point

Asymptotic attenuation at high frequency :

Maximally flat at DC (maximally flat filter)

Page 43: Signal and Systems II B_ Digital Filters_Chapter 12

Recap Chapter 7: Analog Filters

Butterworth Filter: Normalized Butterworth filter design procedure

In design procedure, it proves most convenient to consider a normalized filter,

whose half-power frequency or 3dB-cut off frequency is 1 rad/s (𝜔𝑐 = 1)

Consequently, the amplitude characteristics from (12.5) becomes

ℋ 𝑗𝜔 =1

1 + 𝜔2𝑛, ………………………………………… . . (12.6)

ℋ 𝑠 could be determined from 𝐻 𝑗𝜔 and its conjugate as:

ℋ 𝑗𝜔 ℋ −𝑗𝜔 = ℋ 𝑗𝜔 2 =1

1 + 𝜔2𝑛………………………(12.7)

Substituting s = j𝜔 :

ℋ 𝑠 ℋ −𝑠 =1

1 + 𝑠 𝑗 2𝑛…… .……………………………… . . (12.8)

The poles corresponding to ℋ 𝑠 are obtained by setting 𝑘 = 1, 2, 3, . . . , 𝑛 as:

𝑠𝑘 = 𝑒𝑗𝜋2𝑛2𝑘+𝑛−1 = 𝑐𝑜𝑠

𝜋

2𝑛2𝑘 + 𝑛 − 1 + 𝑠𝑖𝑛

𝜋

2𝑛2𝑘 + 𝑛 − 1 , 𝑘 = 1, 2, 3, . . . , 𝑛 …… . (12.9)

Note: Once the normalized ℋ 𝑠 has been obtained, the desired transfer function 𝐻 𝑠 can be obtained by replacing 𝑠 by 𝑠 𝜔𝑐 in the normalized ℋ 𝑠 .

Page 44: Signal and Systems II B_ Digital Filters_Chapter 12

Butterworth Filter: Normalized Butterworth filter design procedure

1. From the filter specifications, :𝛿𝑝, 𝛿𝑠, 𝜔𝑝, 𝜔𝑠 , gain 𝐺𝑝′ 𝑑𝐵 = 20 log10 𝐺𝑝 at 𝜔𝑝 and 𝐺𝑠

′ 𝑑𝐵 =

20 log10 𝐺𝑠 at 𝜔𝑠 are obtained as (Note: 𝐺𝑝 = 𝐻 𝑗𝜔𝑝 and 𝐺𝑠 = 𝐻 𝑗𝜔𝑠 )

𝐺𝑝′ = −10 log10 1 +

𝜔𝑝

𝜔𝑐

2𝑛

, …………………………………… . . (12.10)

𝐺𝑠′ = −10 log10 1 +

𝜔𝑠𝜔𝑐

2𝑛

……………………………………… . 12.11

2. Compute n and round up to the nearest integer from:

𝑛 =log10 10

−𝐺𝑠′ 10 − 1 10−𝐺𝑝

′ 10 − 1

2 log10 𝜔𝑠 𝜔𝑝 …………………………… 12.12

3. 𝜔𝑐 (the 3-dB or half power-cut off frequency) could be determined as follow:

𝜔𝑐 =𝜔𝑝

10−𝐺𝑝 10 − 11 2𝑛 ………………………………………………………… 12.13𝑎 ,

𝒐𝒓 𝜔𝑐 =𝜔𝑠

10−𝐺𝑠 10 − 1 1 2𝑛 ………………………………………………… . . 12.13𝑏

Note: Equations (12.13a) and (12.13b) will yield slightly different results and filter

designs, however, the corresponding filter designs will satisfy the given specifications.

Recap Chapter 7: Analog Filters

Page 45: Signal and Systems II B_ Digital Filters_Chapter 12

Butterworth Filter: Normalized Butterworth filter design procedure Contd

4.Compute the poles 𝑠𝑘 , using (12.14):

𝑠𝑘 = 𝑐𝑜𝑠𝜋

2𝑛2𝑘 + 𝑛 − 1 + 𝑗𝑠𝑖𝑛

𝜋

2𝑛2𝑘 + 𝑛 − 1 , 𝑘 = 1, 2, 3, . . . , 𝑛 … (12.14)

5. Compute the normalized transfer function ℋ𝑎 𝑠 , using (12.15):

ℋ𝑎 𝑠 = 1

𝑠 − 𝑠𝑘 ……………………………………………………………… . (12.15)

𝑁−1

𝑘=0

6. Get 𝐻𝑎 𝑠 by replacing 𝑠 by 𝑠 𝜔𝑐 .

7. The low pass filter obtained in step (6) can be transformed to high

pass filter by replacing again 𝑠 by 𝜔𝑝 𝑠

Note: 𝜔𝑐 is the 3-dB or half power-cut off frequency.

Recap Chapter 7: Analog Filters

Page 46: Signal and Systems II B_ Digital Filters_Chapter 12

Recap Chapter 7: Analog Filters

Chebychev Filter

The amplitude response of a normalized Chebyshev filter is given by

𝐻 𝑗𝜔 =1

1+𝜖2𝐶𝑛2 𝜔

, …… (12.16)

Figure 12.20: Amplitude response of a normalized 6th-and 7th-order lowpass chebyshev filter

where 𝐶𝑛 𝜔 , the chebychev polynomial, is given by

𝐶𝑛 𝜔 = 𝑐𝑜𝑠 𝑛𝑐𝑜𝑠−1𝜔 = 𝑐𝑜𝑠ℎ 𝑛𝑐𝑜𝑠ℎ−1𝜔 …………………………(12.17)

In Figure 12.12, parameter 𝝐 controls the height of ripples. In the passband, r, the ratio

of the maximum gain to the minimum gain is

𝑟 = 1 + 𝜖2…………………………………………………………………………… . . (12.18)

This ratio r in decibel, 𝑟′ is

𝑟′ = 20 log10 1 + 𝜖2 = 10 log10 1 + 𝜖

2 ………………………………………… . . (12.19)

So that

𝜖 = 10𝑟′ 10 − 1……………………………………………………………… . . (12.20)

Page 47: Signal and Systems II B_ Digital Filters_Chapter 12

Chebychev Filter: Normalized Chebychev filter design procedure

1. From the filter specifications, :𝛿𝑝, 𝛿𝑠, 𝜔𝑝, 𝜔𝑠 , gain 𝐺𝑠 = 𝛿𝑠 = 𝐻 𝑗𝜔𝑠 at 𝜔𝑠 are

obtained as

𝐺𝑠 = −10 log10 1 + 𝜖2𝐶𝑛2 𝜔𝑠 ………………………………………… . 12.21

Hence,

𝜖2𝐶𝑛2 𝜔𝑠 = 10

−𝐺𝑠 10 − 1 …………………………………………………(12.22)

Note: For Chebyshev filters, the ripple 𝑟′ dB takes the place of 𝐺𝑝′ (the minimum gain

in the passband. For example, 𝑟′ ≤ 2𝑑𝐵 for Chebyshev filter is the same things as 𝐺𝑝′ = −2𝑑𝐵 in Butterworth filter

2. Compute n and round up to the nearest integer from:

𝑛 =1

𝑐𝑜𝑠ℎ−1 𝜔𝑠𝑐𝑜𝑠ℎ−1

10−𝐺𝑠 10 − 1

10𝑟′ 10 − 1

0.5

…………………………………… 12.23

Equations (12.21), (12.22) and (12.23) are for normalized filters, where 𝜔𝑝 = 1. For

general case 𝜔𝑠 is replaced with 𝜔𝑠

𝜔𝑝 to obtain:

𝑛 =1

𝑐𝑜𝑠ℎ−1𝜔𝑠𝜔𝑝

𝑐𝑜𝑠ℎ−110−𝐺𝑠 10 − 1

10𝑟′ 10 − 1

0.5

………………………………………………………… 12.24

Recap Chapter 7: Analog Filters

Page 48: Signal and Systems II B_ Digital Filters_Chapter 12

Chebyshev Filter: Normalized Chebyshev filter design procedure

3. The transfer function ℋ𝑎 𝑠 of the normalized nth-order Chebyshev is given as:

ℋ𝑎 𝑠 =𝐾𝑛𝐶𝑛′ 𝑠=

𝐾𝑛𝑠𝑛 + 𝑎𝑛−1𝑠

𝑛−1 +⋯+ 𝑎1𝑠 + 𝑎0……………………………………………………………… . . (12.25)

𝐾𝑛 =

𝑎0 𝑛 𝑜𝑑𝑑

𝑎0

√ 1 + 𝜖2=𝑎0

10𝑟′ 20 𝑛 𝑒𝑣𝑒𝑛

………………………………………………………………………………… . (12.26)

The design procedure is considerably simplified by ready made tables of polynomials 𝐶𝑛′ in

(12.25). The table on the next slide list the coefficients 𝑎0, 𝑎1…𝑎𝑛−1 for values of n and 𝑟′ =0.5,

1, 2, 3 dB.

Recap Chapter 7: Analog Filters

Page 49: Signal and Systems II B_ Digital Filters_Chapter 12

Recap Chapter 7: Analog Filters

Page 50: Signal and Systems II B_ Digital Filters_Chapter 12

Chebyshev Filter: Normalized Chebyshev filter design procedure

4. However, for the values of n and 𝑟′ not listed in the table, or when the table is not available, ℋ𝑎 𝑠 can be obtained as follow:

(a) 𝜖 is obtained using (12.20) as: 𝜖 = 10𝑟′ 10 − 1

(b) The poles 𝑠𝑘 , are obtained as:

𝑠𝑘 = −𝑠𝑖𝑛2𝑘 − 1 𝜋

2𝑛𝑠𝑖𝑛ℎ𝑥 + 𝑗𝑐𝑜𝑠

2𝑘 − 1 𝜋

2𝑛𝑐𝑜𝑠ℎ𝑥 , 𝑘 = 1, 2, 3, . . . , 𝑛

𝑤ℎ𝑒𝑟𝑒 𝑥 =1

𝑛𝑠𝑖𝑛ℎ−1

1

𝜖

………… . . (12.27)

(c)The normalized transfer function ℋ𝑎 𝑠 is computed as:

ℋ𝑎 𝑠 = 𝐾𝑛𝑠 − 𝑠𝑘

𝑁−1

𝑘=0

and 𝐾𝑛 is obtained using (12.26)

5. Get 𝐻𝑎 𝑠 by replacing 𝑠 by 𝑠 𝜔𝑝

6. The low pass filter can be transformed to high pass filter by replacing again 𝑠 by 𝜔𝑝 𝑠 .

Note the Procedure: Start with designing prototype low pass filter with critical frequencies (pass

band and stopband frequencies) 𝜔𝑝 = 1 𝑎𝑛𝑑 𝜔𝑠 = 𝜔𝑝′

𝜔𝑠′ ; where 𝜔𝑝

′ and 𝜔𝑠′ are the given critical

frequencies specifications of the high pass filter. The transfer function obtained with 𝜔𝑝 = 1 is then

transformed to high pass filter by replacing 𝑠 by 𝜔𝑝 𝑠 .

Recap Chapter 7: Analog Filters

Page 51: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Impulse Invariance Design Method for IIR Filter

IIR Filter’s Design by Impulse Invariance Method

In the impulse invariance design procedure for transforming continuous-

time filters into discrete-time filters, the impulse response of the

discrete-time filter ℎ[𝑛] is chosen proportional to equally spaced samples

of the impulse response of the continuous-time filter ℎ𝑎(𝑡) as:

ℎ 𝑛 = 𝑇ℎ𝑎 𝑛𝑇 , 𝑛 = 1, 2, 3, …

where T is the sampling interval

Assuming the poles of the analog filter are simple with its transfer function given as:

𝐻𝑎 𝑠 = 𝑏𝑘𝑠

𝑘𝑀𝑘=0

𝑎𝑘𝑠𝑘𝑁

𝑘=0

By writing 𝐻𝑎 𝑠 in partial fraction expansion form, we have.

𝐻𝑎 𝑠 = 𝑐𝑘𝑠 − 𝑝𝑘 ………………………………………………………………………… . (12.28)

𝑁

𝑘=1

where 𝑃𝑘 is the location of the k-th pole and 𝑐𝑘 = 𝐻𝑎 𝑠 𝑠 − 𝑝𝑘 |𝑠 = 𝑝𝑘

Page 52: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Impulse Invariance Design Method for IIR Filter

IIR Filter’s Design by Impulse Invariance Method contd

The impulse response of the analogue filter ℎ𝑎(𝑡) is obtained by

taking the inverse Laplace transform of 𝐻𝑎 𝑠 as :

ℎ𝑎 𝑡 = 𝐿−1 𝐻𝑎 𝑠 = 𝐿

−1 𝑐𝑘𝑠 − 𝑝𝑘

𝑁

𝑘=1

= 𝐿−1𝑐𝑘𝑠 − 𝑝𝑘

𝑁

𝑘=1

= 𝑐𝑘𝑒𝑝𝑘𝑡

𝑁

𝑘=1

But ℎ 𝑛 = 𝑇ℎ𝑎 𝑛𝑇 .

Hence,

ℎ 𝑛 = 𝑇ℎ𝑎 𝑛𝑇 = 𝑇 𝑐𝑘𝑒𝑝𝑘𝑛𝑇 , 𝑛 = 1, 2, 3, …

𝑁

𝑘=1

Page 53: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Impulse Invariance Design Method for IIR Filter

IIR Filter’s Design by Impulse Invariance Method contd

Transfer function of the digital filter, 𝐻 𝑧 is obtained by taking the

z-transform of ℎ 𝑛 as:

𝐻 𝑧 = 𝒵 ℎ[𝑛] = 𝑇 𝑐𝑘𝑒𝑝𝑘𝑛𝑇

𝑁

𝑘=1

𝑧−𝑛 = 𝑐𝑘 𝑒𝑝𝑘𝑇𝑧−1 𝑛

𝑛=0

𝑁

𝑘=1

𝑛=0

Using the summation formula for geometric series given as 𝑎𝑘 =∞𝑛=0

1

1−𝑎; 𝑎 < 1.

Hence,

𝐻 𝑧 = 𝑇 𝑐𝑘1

1 − 𝑒𝑝𝑘𝑇𝑧−1= 𝑇

𝑐𝑘𝑧

𝑧 − 𝑒𝑝𝑘𝑇

𝑁

𝑘=1

𝑁

𝑘=1

…………………………… . (12.29)

Digital poles at: 𝑝𝑘 = 𝑒𝑝𝑘𝑇 𝑝𝑘 < 1 BIBO

Page 54: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Impulse Invariance Design Method for IIR Filter

IIR Filter’s Design by Impulse Invariance Method contd

Comparing 𝐻𝑎 𝑠 and 𝐻 𝑧 it can be seen that 𝐻 𝑧 can be obtained from 𝐻𝑎 𝑠 by using the mapping

relation:

Transfer function of the analogue filter:

𝐻𝑎 𝑠 = 𝑐𝑘𝑠 − 𝑝𝑘

𝑁

𝑘=1

𝐻 𝑧 = 𝑐𝑘

1 − 𝑒𝑝𝑘𝑇𝑧−1

𝑁

𝑘=1

𝑐𝑘𝑠 − 𝑝𝑘 →

𝑐𝑘1 − 𝑒𝑝𝑘𝑇𝑧−1

Transfer function of the digital filter:

Page 55: Signal and Systems II B_ Digital Filters_Chapter 12

IIR Filter’s Design by Impulse Invariance Method contd

Aliasing effects and Selection of Sampling Interval

Fig. 12.21 𝐻′ 𝜔 is aliased version of 𝐻𝑎 𝑗𝜔 :

To avoid aliasing, 𝐻𝑎 𝑗𝜔 is be bandlimited, such that 𝐻𝑎 𝑗𝜔 = 0 for

𝜔 > 𝜔0, by selecting the period 2𝜋 𝑇 > 2𝜔0. However, this is not

practicable. For frequencies beyond some 𝜔0 , if 𝐻𝑎 𝑗𝜔 is a

negligible fraction, say 1%, of 𝐻𝑎 𝑗𝜔 |𝑚𝑎𝑥 , then 𝐻𝑎 𝑗𝜔 can be

considered essentially bandlimited to 𝜔0, and 𝑇 can be selected as:

𝑇 =𝜋

𝜔0…………………………………………………………………(12.30)

The impulse invariance method is inappropriate for designing high-pass filters or stop-band filters due to spectrum aliasing that results from the sampling process. The method not widely used.

Digital Filters: Impulse Invariance Design Method for IIR Filter

Page 56: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Impulse Invariance Design Method for IIR Filter

IIR Filter’s Design by Impulse Invariance Method contd

Example: Given Ha s =0.5(s+4)

(s+1)(s+2), find the digital filter with transfer 𝐻 𝑧 using impulse-

invariance method.

𝑺𝒐𝒍𝒖𝒕𝒊𝒐𝒏:

ℎ𝑎 𝑡 = 𝐿−1 𝐻𝑎 𝑠 = 𝐿

−10.5(s + 4)

(s + 1)(s + 2)= 𝐿−1

1.5

s + 1−1

𝑠 + 2= 1.5𝑒−𝑡 − 𝑒−2𝑡

ℎ 𝑛 = ℎ𝑎 𝑛𝑇 = 1.5𝑒−𝑛𝑇 − 𝑒−2𝑛𝑇

𝐻 𝑧 = 𝒵 ℎ[𝑛] = 1.5𝑒−𝑛𝑇 − 𝑒−2𝑛𝑇∞

𝑛=0

= 1.5𝑒−𝑛𝑇𝑧−𝑛 − 𝑒−2𝑛𝑇𝑒−𝑛𝑇𝑧−𝑛∞

𝑛=0

𝑛=0

= 1.5 𝑒−𝑇𝑧−1 𝑛 − 𝑒−2𝑇𝑧−1 𝑛 =

𝑛=0

𝑛=0

1.5

1 − 𝑒−𝑇𝑧−1+

1

1 − 𝑒−2𝑇𝑧−1

Page 57: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

IIR Filter’s Design by Bilinear Transformation Method

Widely used

Avoids aliasing problem of impulse-invariant transformation

The method can be used to design:

lowpass (LP),

highpass (HP),

bandpass (BP),

bandstop (BS),

Butterworth,

Chebyshev,

Inverse-Chebyshev,

and Elliptic filters.

Page 58: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

IIR Filter’s Design by Bilinear Transformation Method

Given an analog filter with a continuous-time transfer

function Ha s , a digital filter with a discrete-time

transfer function 𝐻 𝑧 can be readily deduced by

applying the bilinear transformation as follows:

𝐻 𝑧 = 𝐻𝑎 𝑠 |𝑠=2𝑇𝑧−1𝑧+1 …………………(12.31)

Note: You can check the proof and derivation of (12.7) in the Reference text, “Lathi”

Page 59: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

IIR Filter’s Design by Bilinear Transformation Method

The bilinear transformation method has the following

important features:

A stable analog filter gives a stable digital filter.

The maxima and minima of the amplitude response in the

analog filter are preserved in the digital filter.

As a consequence,

the passband ripple, and

the minimum stopband attenuation

of the analog filter are preserved in the digital filter.

Page 60: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

IIR Filter’s Design by Bilinear Transformation Method:

The Warping Effect

If we let ω and represents the frequency variable in the

analog filter and the derived digital filter, respectively, then

equation (12.31): 𝐻 𝑧 = 𝐻𝑎 𝑠 |𝑠=2𝑇

𝑧−1

𝑧+1

, gives the frequency

response of the digital filter as a function of the frequency

response of the analog filter as:

𝐻 𝑒𝑗Ω𝑇 = 𝐻𝑎 𝑗𝜔 ………………………………………………… . (12.32)

Provided that 𝑠 =2

𝑇

𝑧−1

𝑧+1 or

𝑗𝜔 =2

𝑇

𝑒𝑗Ω𝑇 − 1

𝑒𝑗Ω𝑇 + 1 𝑜𝑟 𝜔 =

2

𝑇𝑡𝑎𝑛Ω𝑇

2 ………………………… . . (12.33)

Page 61: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

IIR Filter’s Design by Bilinear Transformation Method: The

Warping Effect

If we let ω and represents the frequency variable in the analog filter

and the derived digital filter, respectively, then equation (12.31):

𝐻 𝑧 = 𝐻𝑎 𝑠 |𝑠=2𝑇

𝑧−1

𝑧+1

, gives the frequency response of the digital filter as

a function of the frequency response of the analog filter as:

𝐻 𝑒𝑗Ω𝑇 = 𝐻𝑎 𝑗𝜔 …………………………………………………(12.32)

Provided that 𝑠 =2

𝑇

𝑧−1

𝑧+1 or

𝑗𝜔 =2

𝑇

𝑒𝑗Ω𝑇 − 1

𝑒𝑗Ω𝑇 + 1=2

𝑇

𝑒𝑗Ω𝑇2 − 𝑒

−𝑗Ω𝑇2

𝑒𝑗Ω𝑇2 + 𝑒

−𝑗Ω𝑇2

⇒ 𝜔 =2

𝑇𝑡𝑎𝑛Ω𝑇

2 …………………………………… . (12.34)

Page 62: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

IIR Filter’s Design by Bilinear Transformation Method: The

Warping Effect

From (12.34): 𝜔 =2

𝑇𝑡𝑎𝑛

Ω𝑇

2 …………………………………… . . (12.34),

For Ω <0.3

𝑇 (i.e. at low frequency)

𝜔 ≈ Ω

and, as a result, the digital filter has the same frequency response as the

analog filter over this frequency range.

For higher frequencies, however, the relation between ω and

Ω becomes nonlinear, and distortion is introduced in the frequency

scale of the digital filter relative to that of the analog filter.

This is known as the warping effect.

Page 63: Signal and Systems II B_ Digital Filters_Chapter 12

IIR Filter’s Design by Bilinear Transformation Method: The Warping Effect

Figure 12.22

Digital Filters: Bilinear Transformation Design Method for IIR Filter

Page 64: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

IIR Filter’s Design by Bilinear Transformation Method with Prewarping Effect

Usually, prewarping is done at certain critical frequencies rather than over the entire band. The

final behaviour is exactly equal to the desired behaviour at these selected frequencies.

From (12.30): 𝜔 =2

𝑇𝑡𝑎𝑛Ω𝑇

2 ………………………………………………………………(12.34),

A frequency ω in the analog filter corresponds to a frequency in the digital filter and hence,

Ω =2

𝑇𝑡𝑎𝑛−1

𝜔𝑇

2

If 𝜔1, 𝜔2 . . ., 𝜔𝑖, . . . are the passband and stopband edges in the analog filter, then the corresponding

passband and stopband edges in the derived digital filter are given by

Ω𝑖 =2

𝑇𝑡𝑎𝑛−1

𝜔𝑖𝑇

2, 𝑖 = 1, 2, ………………………… . (12.35)

Page 65: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

IIR Filter’s Design by Bilinear Transformation Method with

Prewarping Effect

If prescribed passband and stopband edges Ω1′ , Ω2′ , . . . , Ω𝑖

′ , . . . are to be

achieved, the analog filter must be prewarped before the application of the

bilinear transformation to ensure that its band edges are given by

𝜔𝑖 =2

𝑇𝑡𝑎𝑛Ω𝑖′𝑇

2……………………………………………………………………… . . (12.36)

Note: The scaling factor in (12.36), 2

𝑇 can be omitted, and (12.36) becomes

𝜔𝑖 = 𝑡𝑎𝑛Ω𝑖′𝑇

2, and bilinear transformation of (12.31) becomes:𝐻 𝑧 = 𝐻𝑎 𝑠 |𝑠= 𝑧−1

𝑧+1

. The

final solution will still be the same.

Then the band edges of the digital filter would assume their prescribed values Ω𝑖 given as

Ω𝑖 =2

𝑇𝑡𝑎𝑛−1

𝜔𝑖𝑇

2=2

𝑇𝑡𝑎𝑛−1

𝑇

2∙2

𝑇𝑡𝑎𝑛Ω𝑖′𝑇

2=2

𝑇𝑡𝑎𝑛−1 𝑡𝑎𝑛

Ω𝑖′𝑇

2= Ω𝑖′ , 𝑖 = 1, 2,…… . . (12.37)

Page 66: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

Bilinear transform mapping of the s -plane to the z -plane

Figure 12.23

Page 67: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

IIR Filter’s Design by Bilinear Transformation Method:

Choice of T

Though, the kind of aliasing observed in impulse invariance method

is absent, however, there is a presence of signal aliasing that limits

the highest usable frequency.

Hence, if the highest frequency to be processed is ℱℎ 𝐻𝑧 , then to

avoid signal aliasing, 𝑇 must be chosen as:

𝑇 =1

ℱ𝑠≤1

2ℱℎ, ……………………………………………… . (12.38)

where ℱ𝑠 is the sampling frequency.

Page 68: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

Example:Design a digital filter using the bilinear transformation applied

to the analog filter with transfer function given as 𝐻𝑎 𝑠 =𝜔𝑐𝑠+𝜔𝑐 , where

𝜔𝑐 = 105 and 𝑇 =

𝜋

10𝜔𝑐.

Solution:

Using equation (12.27), we have:

𝐻 𝑧 = 𝐻𝑎 𝑠 |𝑠=2𝑇𝑧−1𝑧+1=

𝜔𝑐2𝑇𝑧 − 1𝑧 + 1 + 𝜔𝑐

=𝜔𝑐𝑇 𝑧 + 1

2 + 𝜔𝑐𝑇 𝑧 − 2 − 𝜔𝑐𝑇

Substitution of 𝜔𝑐 and 𝑇 ⇒ 𝜔𝑐𝑇 = 𝜋 10 gives

𝐻 𝑧 = 0.1357𝑧 + 1

𝑧 − 0.7284

Page 69: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

Solution contd:

Substituting 𝑧 = 𝑒𝑗𝜔𝑇 gives

𝐻 𝑒𝑗𝜔𝑇 = 0.1357𝑒𝑗𝜔𝑇 + 1

𝑒𝑗𝜔𝑇 − 0.7284=0.1357 𝑐𝑜𝑠𝜔𝑇 + 1 + 𝑗𝑠𝑖𝑛𝜔𝑇

𝑐𝑜𝑠𝜔𝑇 − 0.7284 + 𝑗𝑠𝑖𝑛𝜔𝑇

Hence,

𝐻 𝑒𝑗𝜔𝑇 =0.024 1 + 𝑐𝑜𝑠𝜔𝑇

1 − 0.9518𝑐𝑜𝑠𝜔𝑇

0.5

∠𝐻 𝑒𝑗𝜔𝑇 = 𝑡𝑎𝑛−1𝑠𝑖𝑛𝜔𝑇

1 + 𝑐𝑜𝑠𝜔𝑇− 𝑡𝑎𝑛−1

𝑠𝑖𝑛𝜔𝑇

𝑐𝑜𝑠𝜔𝑇 − 0.7285

𝐻 𝑒𝑗𝜔𝑇 and ∠𝐻 𝑒𝑗𝜔𝑇 can be plotted against variation of 𝜔 , remember to substitute : and 𝑇 =𝜋

10𝜔𝑐,

with 𝜔𝑐 = 105

Figure 12.24:

Page 70: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

Example: Design a lowpass discrete filter with the following specifications:

𝐻 𝑗𝜔 = 1 𝑎𝑡 𝐷𝐶 𝑖𝑒 𝜔 = 0

𝐻 𝑗𝜔 ≥ −2𝑑𝐵 𝑓𝑜𝑟 0 ≤ 𝜔 ≤ 10

𝐻 𝑗𝜔 ≤ −11𝑑𝐵 𝑓𝑜𝑟 𝜔 ≥ 15

The highest frequency to be processed is 𝜔ℎ =35 rad/s, using bilinear

transformation applied to a prototype Butherworth filter with specifications for

the design given as Ω𝑝 = 8,Ω𝑠 = 15, 𝐺𝑝′ = −2𝑑𝐵, 𝐺𝑠

′ = −11𝑑𝐵

Solution:

Using equation (12.38), we have:

𝑇 ≤1

2ℱℎ=1

2 35 2𝜋 = 𝜋 35

The critical frequencies 𝜔𝑝 and 𝜔𝑠 are the prewarped using (12.36)

Page 71: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

Solution Contd:

The critical frequencies 𝜔𝑝 and 𝜔𝑠 are then prewarped using (12.36):

𝜔𝑝 =2

𝑇𝑡𝑎𝑛Ω𝑝𝑇

2=70

𝜋tan4𝜋

35= 8.3623

𝜔𝑠 =2

𝑇𝑡𝑎𝑛Ω𝑠𝑇

2=70

𝜋tan15𝜋

35= 17.7696

Designing a Butterworth filter with critical frequencies 𝜔𝑝 = 8.3623

and 𝜔𝑠 = 17.7696, 𝐺𝑝′ = −2𝑑𝐵, 𝐺𝑠

′ = −11𝑑𝐵, the order of the filter, n, is obtained using (12.12)

𝑛 =log10 10

−𝐺𝑠′ 10 − 1 10−𝐺𝑝

′ 10 − 1

2 log10 𝜔𝑠 𝜔𝑝 =log10 10

1.1 − 1 100.2 − 1

2 log10 17.7696 8.3623 = 1.9405 ≈ 2

Obtain 𝜔𝑐 (the 3dB cut-off frequency)using (12.13b) that satisfies the stop band specification as

:

𝜔𝑐 =𝜔𝑠

10−𝐺𝑠 10 − 1 1 2𝑛 =17.7696

101.1 − 1 1 4 = 9.6308

Note:12.13a will give different result, however the designs based on both equations will meet the given specifications

Page 72: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

Solution Contd:

Poles 𝑠𝑘 can be computed using (12.14):

𝑠𝑘 = 𝑐𝑜𝑠𝜋

2𝑛2𝑘 + 𝑛 − 1 + 𝑗𝑠𝑖𝑛

𝜋

2𝑛2𝑘 + 𝑛 − 1 , 𝑘 = 1, 2, 3, . . . , 𝑛 ………… . (12.14)

𝑠1 = 𝑐𝑜𝑠3𝜋

4+ 𝑗𝑠𝑖𝑛3𝜋

4= −0.7071 + 𝑗0.7071

𝑠2 = 𝑐𝑜𝑠5𝜋

4+ 𝑗𝑠𝑖𝑛5𝜋

4= −0.7071 − 𝑗0.7071

Hence normalized ℋ𝑎 𝑠 transfer function is:

ℋ𝑎 𝑠 =1

𝑠 − 𝑠1 𝑠 − 𝑠2=

1

𝑠 + 0.7071 − 𝑗0.7071 𝑠 + 0.7071 + 𝑗0.7071=

1

𝑠2 + 1.4142𝑠 + 1

𝐻𝑎 𝑠 is now obtained by replacing 𝑠 by 𝑠 𝜔𝑐 =𝑠9.6308 in the normalized transfer funcion

ℋ𝑎 𝑠 as

𝐻𝑎 𝑠 =1

𝑠9.6308

2+ 1.4142

𝑠9.6308

+ 1=

92.7529

𝑠2 + 13.62𝑠 + 92.7529

Page 73: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Bilinear Transformation Design Method for IIR Filter

Solution Contd:

Finally, 𝐻 𝑧 is obtained using (12.31) as:

𝐻 𝑧 = 𝐻𝑎 𝑠 |𝑠=2𝑇𝑧−1𝑧+1=70𝜋𝑧−1𝑧+1=

92.7529

𝑠2 + 13.62𝑠 + 92.7529|𝑠=70𝜋𝑧−1𝑧+1=0.1039 𝑧 + 1 2

𝑧2 − 0.9045𝑧 + 0.3201

Substituting 𝑧 = 𝑒𝑗𝜔𝑇 gives

𝐻 𝑒𝑗𝜔𝑇 =0.1039 𝑒𝑗𝜔𝑇 + 1

2

𝑒𝑗2𝜔𝑇 − 0.9045𝑒𝑗𝜔𝑇 + 0.3201

The amplitude response 𝐻 𝑒𝑗𝜔𝑇 , with 𝑇 = 70 𝜋 is displayed below

Figure 12.25:

Page 74: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

Note: FIR filters have several advantages in comparison with IIR filters

Always stable & simple to implement

Can be designed to have linear phase;

Hence when a linear Phased filter is desired, FIR filters are the options

The windowing technique is the simplest method of FIR filter

design’s methods.

Page 75: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Design Procedure

The design of FIR filter based on windowing generally begins by

specifying an ideal zero-phase frequency response 𝐻𝑎 𝑗𝑤 .

The corresponding impulse response ℎ𝑎 𝑛 is centered at 𝑡 = 0 and has

infinite duration.

The corresponding discrete filter impulse response ℎ[𝑛] is then made to

have finite duration and start at 𝑛 = 0 (causal) for filter reliability.

The corresponding impulse response is determined from the

Zero-phase frequency response of the specified ideal filter

Page 76: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Design Procedure Contd

Figure 12.26 illustrates examples of some Zero-phase frequency response of

ideal filters.

Figure 12.26: Zero-phase frequency response of ideal Filter

Page 77: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Design Procedure Contd

(1.) Determination of the discrete filter impulse response ℎ[𝑛] from the impulse

response of continuous-time filter ℎ𝑎(𝑡 )in a similar way with procedure on slide (51) as:

ℎ 𝑛 = 𝑇ℎ𝑎 𝑛𝑇 ,…………………………………… .……………………………………………(12.39)

where ℎ𝑎 𝑡 is the Laplace transform of the analog filter transfer function 𝐻𝑎 𝑠 or the inverse

Fourier transform of 𝐻𝑎 𝑗𝑤 given as

ℎ𝑎 𝑡 =1

2𝜋 𝐻𝑎 𝑗𝜔 𝑒

𝑗𝜔𝑡𝑑𝜔 …………………………………………………………(12.40)

𝜋 𝑇

−𝜋 𝑇

Hence, (12.39) becomes:

ℎ 𝑛 = 𝑇ℎ𝑎 𝑛𝑇 =𝑇

2𝜋 𝐻𝑎 𝑗𝜔 𝑒

𝑗𝜔𝑛𝑇𝑑𝜔 ……………………………… . (12.41)

𝜋 𝑇

−𝜋 𝑇

Page 78: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Design Procedure Contd

(2.) Windowing

The impulse response, ℎ 𝑛 defined by (12.41) is infinite in duration and must be

truncated (or windowed) to have finite duration and to start at 𝑛 = 0 (causal):

causal FIR filter.

Note: Truncation is just pre-multiplication of ℎ 𝑛 by a rectangular window.

This is achieved by using an 𝑁𝑜-point window and then delayed by 𝑁𝑜−1

2 to make it

causal. The delay procedure produces the desired linear-phase frequency response.

Note: 𝑵𝒐 − 𝟏= filter’s order.

Some window functions and their characteristics are presented and summarized in

Table 12.1 in the subsequent slides.

Page 79: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Some Windowing Design Method for FIR Filter

1.Rectangular window

2.Triangular window (Bartett window)

1 , -[ ] 1

0,

nM n M

w n M

otherwise

1, -[ ]

0,

M n Mw n

otherwise

Page 80: Signal and Systems II B_ Digital Filters_Chapter 12

1.Rectangular window

2.Triangular window (Barlett window)

Figure: 12.26

0 10 20 30 40 50 600

0.5

1

sequence (n)

T(n

)

Rectangular window

0 10 20 30 40 50 600

0.5

1

sequence (n)

T(n

)

Bartlett window

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-100

-50

0

50

100

pi units

Fre

quency r

esponse T

(jw

)(dB

) Rectangular window

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-100

-50

0

50

100

pi units

Fre

quency r

esponse T

(jw

)(dB

) Bartlett window

Digital Filters: Some Windowing Design Method for FIR Filter

1, -M[ ]

0,

n Mw n

otherwise

2 , 0

2

2[ ] 2 , 2

0,

n MnM

n Mw n n MM

otherwise

Page 81: Signal and Systems II B_ Digital Filters_Chapter 12

3.HANNING window

4.Hamming window

0

1 21 cos , -

[ ] 2 1

0,

nM n M

w n N

otherwise

0

20.54 0.46cos , -

1[ ]

0,

nM n M

Nw n

otherwise

Digital Filters: Some Windowing Design Method for FIR Filter

Page 82: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Some Windowing Design Method for FIR Filter

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-100

-50

0

50

100

pi units

Fre

quency r

esponse T

(jw

)(dB

) Hanning window

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-100

-50

0

50

100

pi units

Fre

quency r

esponse T

(jw

)(dB

) Hamming window

0 10 20 30 40 50 600

0.5

1

sequence (n)

T(n

)

Hanning window

0 10 20 30 40 50 600

0.5

1

sequence (n)

T(n

)

Hamming window

3.HANNING window

4.Hamming window

Figure: 12.27

1 21 cos , 0

[ ] 2

0,

nn M

w n M

otherwise

20.54 0.46cos , 0

[ ]

0,

nn M

w n M

otherwise

Page 83: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Some Windowing Design Method for FIR Filter

5.Kaiser’s window

6.Blackman window

2

0

0

0

[ 1 4( ) ]1

[ ] ,-[ ]

nI

Nw n M n M

I

0 0

2 40.42 0.5cos 0.08cos , - , 1 10

1 1[ ]

0,

n nM n M and

N Nw n

otherwise

Page 84: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Some Windowing Design Method for FIR Filter

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-100

-50

0

50

100

pi unitsF

requency r

esponse T

(jw

)(dB

) Blackman window

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-150

-100

-50

0

50

100

pi units

Fre

quency r

esponse T

(jw

)(dB

) Kaiser window

5.Kaiser’s window

6.Blackman window

Figure: 12.28

0 10 20 30 40 50 600

0.5

1

sequence (n)

T(n

)

Blackman window

0 10 20 30 40 50 600

0.5

1

sequence (n)

T(n

)

Kaiser window

2

0

0

2[ 1 (1 ) ]

[ ] , 0,1,...,[ ]

nI

Mw n n MI

2 40.42 0.5cos 0.08cos , 0

[ ]

0,

n nn M

w n M M

otherwise

Page 85: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Summary of Windowing Design Method for FIR Filter

(2.) Windowing

Table 12.1:

Page 86: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Design Procedure Contd

(3.) Determination of Frequency Response

After determining ℎ 0 , ℎ 1 , . . . , ℎ 𝑛 with finite duration in step 2, 𝑯 𝒛 the z-transform of

ℎ 𝑛 is determined for nth-order recursive filter as:

𝐻 𝑧 = ℎ 𝑘 𝑧−𝑘 =

𝑘=0

ℎ 0 +ℎ 1

𝑧+ℎ 2

𝑧2+ . . . +ℎ 𝑛

𝑧𝑛, 𝑓𝑜𝑟 𝑘 > 𝑛 𝑡𝑜 ∞, ℎ 𝑘 = 0 ……(12.42)

and the frequency response is determined from (12.42) as

𝐻 𝑒𝑗𝜔𝑇 = 𝐻 𝑧 |𝑧=𝑒𝑗𝜔𝑇 = ℎ 0 + ℎ 1 𝑒−𝑗𝜔𝑇 + …+ ℎ 𝑛 𝑒−𝑗𝑛𝜔𝑇 = ℎ 𝑘

𝑛

𝑘=0

𝑒−𝑗𝑘𝜔𝑇 ……………(12.43)

Page 87: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Design Procedure Contd

Example

Design an ideal lowpass filter for audio band with cutoff frequency 20 kHz. Use a 6th-

order nonrecursive filter using rectangular and Hamming windows. The highest frequency

to be processed is ℱℎ = 40 𝑘𝐻𝑧.

Solution

Here, filter’s order n=6, and 𝑁𝑜 − 1 =n 𝑁𝑜 = 6 + 1 = 7

From the table 12.1: 𝑀 =𝑁0−1

2=7−1

2= 3

Using (12.38), as suitable value of T is chosen as

𝑇 ≤1

2ℱℎ=1

2ℱℎ= 12.5 × 10−6

Page 88: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Design Procedure Contd

Solution Contd

The cut off frequency of the continuous-time signal is given as:

𝜔𝑐 = 2𝜋ℱ𝑐 = 2𝜋 20000 = 40000𝜋 =𝜋

2𝑇

The cut off frequency of the discrete-time signal is given as

Ω𝑐 = 𝜔𝑐𝑇 = 40000𝜋 × 12.5 × 10−6 =𝜋

2 ⇒ 𝜔𝑐 =

𝜋

2𝑇

Note: Digital frequency range is from −𝜋 to 𝜋 only.

Hence, the frequency response of the ideal filter we intend to design has a

period of 2𝜋

𝑇 on 𝜔 scale (remember: 𝜔 = 2𝜋𝑓 =

2𝜋

𝑇), and 2𝜋 on Ω scale.

Page 89: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Design Procedure Contd

Solution Contd

The zero–phase frequency response of the lowpass filter is shown in Figure

12.29(a). The zero-phase frequency response of the ideal low pass analog filter,

H𝑎 ω , is a rectangular function given as:

H𝑎 ω = 𝑟𝑒𝑐𝑡𝜔

2𝜔𝑐= 𝑟𝑒𝑐𝑡

𝜔𝑇

𝜋; 𝜔𝑐 =

𝜋

2𝑇

Figure 12.29(a):Corresponding frequency response H𝑎 ω

The corresponding impulse response of the desired lowpass (zero-phase) filter is

obtained by taking inverse Fourier transform of H𝑎(jω) using (12.40).

Note: Fourier transform pair of 𝑟𝑒𝑐𝑡𝜔

2𝜔𝑐, h t ⇔ 𝐻(𝑤) is

𝜔𝑐

𝜋𝑠𝑖𝑛𝑐 𝜔𝑐𝑡 ⇔ 𝑟𝑒𝑐𝑡

𝜔

2𝜔𝑐

:(see CHAPTER 4 of Lathi)

Hence, ℎ𝑎 𝑗𝜔 is given as: (Note: From previous slide, 𝜔𝑐 =𝜋

2𝑇. By inserting this in the sinc function, we have:)

ℎ𝑎 𝑗𝜔 =𝜔𝑐

𝜋𝑠𝑖𝑛𝑐 𝜔𝑐𝑡 =

1

2𝑇𝑠𝑖𝑛𝑐𝜋𝑡

2𝑇…………………………… . (12.44)

t
Page 90: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Design Procedure Contd

Solution Contd: The discrete filter impulse response ℎ[𝑛] is

obtained using (12.39) as :

ℎ 𝑛 = 𝑇ℎ𝑎 𝑛𝑇 =1

2𝑠𝑖𝑛𝑐𝜋𝑛𝑇

2𝑇=1

2𝑠𝑖𝑛𝑐𝜋𝑛

2 ………………………… . . (12.45)

Windowing: ℎ 𝑛 is truncated using a suitable 𝑁0-point window, and the

truncated ℎ 𝑛 is delayed by 𝑁0−1

2.

Remember 𝑁0-1= filter order, hence 𝑁0 = 7

Rectangular Windowing: 𝑤 𝑛 = 1,−𝑀 ≤ 𝑛 ≤ 𝑀0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Hence, the truncated ℎ 𝑛 = ℎ 𝑛 𝑤 𝑛

Figure 12.29(b) and (c): The plots of ℎ 𝑛 and truncated ℎ 𝑛 by 7-point rect. window

Page 91: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Design Procedure Contd

Solution (Rectangular Windowing) Contd:

The truncated ℎ 𝑛 is then delayed by 𝑁𝑜−1

2= 3 units (3T seconds) as (from eqn 12.45):

ℎ𝑅 𝑛 = ℎ 𝑛 − 3 =1

2𝑠𝑖𝑛𝑐𝜋 𝑛 − 3

2, 0 ≤ 𝑛 ≤ 6 ……………………… . (12.46)

The plot of the delayed truncated ℎ 𝑛 , the causal filter impulse 𝒉𝑹 𝒏 based on rectangular windowing is shown in Figure 12.29 (d).

Note: The constant delay

of 𝑁𝑜−1 𝑇

2 or 𝑛𝑇

2 is what

produces a linear phase

characteristic of FIR filter.

𝑠𝑖𝑛𝑐 𝑥 = sin (𝑥) 𝑥

Figure 12.29: Non recursive method of lowpass filter design

Page 92: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Design Procedure Contd

Solution (Rectangular Windowing) Contd:

The values of the coefficients ℎ𝑅 𝑛 =1

2𝑠𝑖𝑛𝑐

𝜋 𝑛−3

2, 0 ≤ 𝑛 ≤ 6 are shown in the Table below.

By taking the z-transform of ℎ𝑅 𝑛 we have 𝐻 𝑧 given as:

𝐻 𝑧 = ℎ𝑅 𝑛 𝑧−𝑛 = −

1

3𝜋

6

𝑛=0

+1

𝜋𝑧−2 +1

2𝑧−3 +1

𝜋𝑧−4 −

1

3𝜋𝑧−6

= 𝑧−3 −1

3𝜋𝑧3 +1

𝜋𝑧 +1

2+1

𝜋𝑧−1 −

1

3𝜋𝑧−3 …… . (12.47)

The frequency response 𝐻 𝑒𝑗𝜔𝑇 is obtained from (12.47) as:

𝐻 𝑒𝑗𝜔𝑇 = 𝐻 𝑧 |𝑧=𝑒𝑗𝜔𝑇 = 𝑒−𝑗3𝜔𝑇 −

1

3𝜋𝑒𝑗3𝜔𝑇 +

1

𝜋𝑒𝑗𝜔𝑇 +

1

2+1

𝜋𝑒−𝑗𝜔𝑇 −

1

3𝜋𝑒−𝑗3𝜔𝑇

= 𝑒−𝑗3𝜔𝑇1

2+1

𝜋𝑒𝑗𝜔𝑇 + 𝑒−𝑗𝜔𝑇 −

1

3𝜋𝑒𝑗3𝜔𝑇 + 𝑒−𝑗3𝜔𝑇 = 𝑒−𝑗3𝜔𝑇

1

2+2

𝜋𝑐𝑜𝑠𝜔𝑇 −

2

3𝜋𝑐𝑜𝑠3𝜔𝑇

By substituting 𝑇 = 12.5 × 10−6 =1

80000, we have:

𝐻 𝑒𝑗𝜔𝑇 = 𝑒−𝑗3𝜔𝑇1

2+2

𝜋𝑐𝑜𝑠

𝜔

80000−2

3𝜋𝑐𝑜𝑠

3𝜔

80000…………………………… . (12.48)

The term 𝑒−𝑗3𝜔𝑇 is the linear phase representing the delay of 3T seconds

Page 93: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Design Procedure Contd

Solution (Hamming Windowing) :

Hamming window function is given as: 𝑤𝐻 𝑛 = 0.54 + 0.46𝑐𝑜𝑠

2𝜋𝑛

𝑁0−1, −𝑀 ≤ 𝑛 ≤ 𝑀

0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

With 𝑁0 = 7 and 𝑀 = 𝑁0 − 1 2 , 𝑤𝐻 𝑛 = 0.54 + 0.46𝑐𝑜𝑠

2𝜋𝑛

6, −3 ≤ 𝑛 ≤ 3

0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Hence, the values of 𝒘𝑯 𝒏 for −𝟑 ≤ 𝒏 ≤ 𝟑 and the truncated and delayed version of ℎ 𝑛

based on Hamming windowing, 𝒉𝑯 𝒏 = 𝒉 𝒏 𝒘𝑯 𝒏 are given in the Table below in comparison

with that of rectangular windowing.

Like in the case of rectangular

windowing, 𝐻 𝑒𝑗𝜔𝑇 with Hamming

windowing is obtained as:

𝐻 𝑒𝑗𝜔𝑇 = 𝑒−𝑗3𝜔𝑇1

2+ 0.49𝑐𝑜𝑠𝜔𝑇 − 0.01696𝑐𝑜𝑠3𝜔𝑇 ………………………………………… . (12.49)

With coefficients ℎ𝐻 𝑛 using (12.47) (or ℎ𝑅 𝑛 ) in the Table, the desired FIR filter can be realized by using 6 delay

elements using similar structure for non-recursive filter realization as shown in Figure 12.11 on slide (28): b’s are

coefficients ℎ𝐻 𝑛 or ℎ𝑅 𝑛

Page 94: Signal and Systems II B_ Digital Filters_Chapter 12

Digital Filters: Windowing Design Method for FIR Filter

The windowing technique: Gibbs Phenomenon

By examining the magnitude of 𝐻 𝑒𝑗𝜔𝑇 for rectangular windowing plotted in Figure 12.31(a),

the solid curve, the curve exhibits oscillatory behaviour which decays slowly over the stopband.

Increase in filter’s order, n improves the frequency response, however, the oscillatory nature

persist.

Figure 12.31

The oscillatory nature is called Gibbs phenomenon

Gibbs phenomenon is caused by obtaining causal

FIR filter by simply truncating the impulse response

coefficients of the ideal filters as we have done using the rectangular windowing method.

Solution to Gibbs phenomenon: The use of tapper window function such as Hamming

window can eliminate the oscillatory behaviour, but at a cost of increasing the transition band

(from passband to stopband) as could be seen in Figure (a) above.

Read up other methods of FIR filter design in frequency domain: e.g: Frequency Sampling Method

Page 95: Signal and Systems II B_ Digital Filters_Chapter 12

Summary

Under the Digital Filters, we have been able to look at:

Response to complex exponential signals,

Response to Discrete-time sinusoid,

Response to sampled sinusoid,

Frequency response of Digital filters,

Types of filters(Low-, high-, band-pass filters, etc.),

Classifications of Filters (Recursive-IIR, Non-recursive-

FIR filters)

Filters’ design methods (IIR and FIR filter design

methods)