agc dsp digital filters - imperialmandic/dsp_slides/handout_digital_filter… · agc dsp professor...

56
AGC DSP Professor A G Constantinides DIGITAL FILTERS ! Finite Impulse Response (FIR) ! Infinite Impulse Response (IIR) ! Background ! Matlab functions 1 AGC DSP Professor A G Constantinides 2 ! Only the magnitude approximation problem ! Four basic types of ideal filters with magnitude responses as shown below (Piecewise flat)

Upload: vuongquynh

Post on 02-May-2018

231 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides

DIGITAL FILTERS

!! Finite Impulse Response (FIR)

!! Infinite Impulse Response (IIR)

!! Background

!! Matlab functions

1

AGC

DSP

Professor A G Constantinides 2

!! Only the magnitude approximation problem

!! Four basic types of ideal filters with magnitude responses as shown below (Piecewise flat)

Page 2: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 3

!! These filters are unealisable because (one of

the following is sufficient)

!! their impulse responses infinitely long non-

causal

!! Their amplitude responses cannot be equal to a constant over a band of frequencies

Another perspective that provides some understanding can be obtained by looking

at the ideal amplitude squared.

AGC

DSP

Professor A G Constantinides 4

!! Consider the ideal LP response squared

(same as actual LP response)

Page 3: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 5

!! The realisable squared amplitude response

transfer function (and its differential) is continuous in

!! Such functions

!! if IIR can be infinite at point but around that point cannot be zero.

!! if FIR cannot be infinite anywhere.

!! Hence previous defferential of ideal response

is unrealisable

AGC

DSP

Professor A G Constantinides 6

!! A realisable response would effectively need to have an approximation of the

delta functions in the differential

!! This is a necessary condition

Page 4: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 7

!! For example the magnitude response of

a digital lowpass filter may be given as indicated below

AGC

DSP

Professor A G Constantinides 8

!! In the passband we require

that with a deviation

!! In the stopband we require that with a deviation

Page 5: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 9

Filter specification parameters

!! - passband edge frequency

!! - stopband edge frequency

!! - peak ripple value in the passband

!! - peak ripple value in the stopband

AGC

DSP

Professor A G Constantinides 10

!! Practical specifications are often given in terms of loss function (in dB)

!!

!! Peak passband ripple

dB

!! Minimum stopband attenuation

dB

Page 6: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 11

!! In practice, passband edge frequency

and stopband edge frequency are specified in Hz

!! For digital filter design, normalized bandedge frequencies need to be computed from

specifications in Hz using

AGC

DSP

Professor A G Constantinides 12

!! Example - Let kHz, kHz, and kHz

!! Then

Page 7: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 13

!! The transfer function H(z) meeting the

specifications must be a causal transfer function

!! For IIR real digital filter the transfer function is a real rational function of

!! H(z) must be stable and of lowest order N or

M for reduced computational complexity

AGC

DSP

Professor A G Constantinides 14

!! FIR real digital filter transfer function is a polynomial in (order N) with real coefficients

!! For reduced computational complexity, degree N of H(z) must be as small as possible

!! If a linear phase is desired then we must have:

!! (More on this later)

Page 8: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 15

!! Advantages in using an FIR filter -

(1) Can be designed with exact linear phase

(2) Filter structure always stable with quantised coefficients

!! Disadvantages in using an FIR filter - Order of an FIR filter is considerably higher than that

of an equivalent IIR filter meeting the same specifications; this leads to higher

computational complexity for FIR

AGC

DSP

Professor A G Constantinides 16

Page 9: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 17

!! The transfer function is given by

!! The length of Impulse Response is N

!! All poles are at .

!! Zeros can be placed anywhere on the z-plane

AGC

DSP

Professor A G Constantinides 18

For phase linearity the FIR transfer function must have zeros outside

the unit circle

Page 10: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 19

!! To develop expression for phase response set transfer function (order n)

!! In factored form

!! Where , is real & zeros occur in conjugates

AGC

DSP

Professor A G Constantinides 20

!!Let

where

!!Thus

Page 11: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 21

!!Expand in a Laurent Series convergent within the unit circle

!!To do so modify the second sum as

AGC

DSP

Professor A G Constantinides 22

!! So that

!! Thus

!! where

Page 12: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 23

!! are the root moments of the minimum phase component

!! are the inverse root moments of the maximum phase component

!! Now on the unit circle we have

and

AGC

DSP

Professor A G Constantinides 24

!! hence (note Fourier form)

Page 13: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 25

!! Thus for linear phase the second term in the fundamental phase relationship must be

identically zero for all index values.

!! Hence

!! 1) the maximum phase factor has zeros which

are the inverses of the those of the minimum phase factor

!! 2) the phase response is linear with group delay (normalised) equal to the number of

zeros outside the unit circle

AGC

DSP

Professor A G Constantinides 26

!! It follows that zeros of linear phase FIR trasfer functions not on the

circumference of the unit circle occur in the form

Page 14: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 27

!! For Linear Phase t.f. (order N-1)

!!

!! so that for N even:

AGC

DSP

Professor A G Constantinides 28

!! for N odd:

!! I) On we have for N even, and +ve sign

Page 15: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 29

!! II) While for –ve sign

!! [Note: antisymmetric case adds rads

to phase, with discontinuity at ]

!! III) For N odd with +ve sign

AGC

DSP

Professor A G Constantinides 30

!! IV) While with a –ve sign

!! [Notice that for the antisymmetric case to have linear phase we require

The phase discontinuity is as for N even]

Page 16: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 31

!! The cases most commonly used in filter design are (I) and (III), for which the

amplitude characteristic can be written as a polynomial in

AGC

DSP

Professor A G Constantinides 32

(i) Start with ideal infinite duration

(ii) Truncate to finite length. (This

produces unwanted ripples increasing in height near discontinuity.)

(iii) Modify to

Weight w(n) is the window

Page 17: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 33

Commonly used windows

!! Rectangular

!! Bartlett

!! Hann

!! Hamming

!!

!! Blackman

!!

!! Kaiser

AGC

DSP

Professor A G Constantinides 34

!! Kaiser window

! Transition

width (Hz)

Min. stop

attn dB

2.12 1.5/N 30

4.54 2.9/N 50

6.76 4.3/N 70

8.96 5.7/N 90

Page 18: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 35

•! Lowpass filter of length 51 and

AGC

DSP

Professor A G Constantinides 36

•! In this approach we are given and

need to find

•! This is an interpolation problem and the

solution is given in the DFT part of the

course

•! It has similar problems to the windowing

approach

Page 19: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 37

!! Amplitude response for all 4 types of linear-phase FIR filters can be

expressed as

where

AGC

DSP

Professor A G Constantinides 38

!! Modified form of weighted error function

where

Page 20: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 39

!! Optimisation Problem - Determine which minimise the peak absolute value

of

over the specified frequency bands

!! After has been determined, construct the original and

hence h[n]

AGC

DSP

Professor A G Constantinides 40

Solution is obtained via the Alternation Theorem

The optimal solution has equiripple behaviour consistent with the total number of available parameters.

Parks and McClellan used the Remez algorithm to develop a procedure for designing linear FIR digital filters.

Page 21: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 41

Kaiser’s Formula:

!! ie N is inversely proportional to transition band width and not on transition band location

AGC

DSP

Professor A G Constantinides 42

!! Hermann-Rabiner-Chan’s Formula:

where

with

Page 22: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 43

!! Formula valid for

!! For , formula to be used is obtained by interchanging and

!! Both formulae provide only an estimate of the required filter order N

!! If specifications are not met, increase filter order until they are met

AGC

DSP

Professor A G Constantinides 44

!! Fred Harris’ guide:

where A is the attenuation in dB

!! Then add about 10% to it

Page 23: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides

MATLAB Resources

!! Filter design toolbox (FIR and IIR)

!! Functions

!! Filter

!! Filtfilt

!! Rand and randn

!! Xcorr

!! Freqz, invfreqz, fvtool

!! Poly, roots, conv, polyval,

45

AGC

DSP

Professor A G Constantinides

This page is left blank

46

Page 24: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 1

Standard approach

(1) Convert the digital filter specifications into an analogue prototype lowpass filter specifications

(2) Determine the analogue lowpass filter transfer function

(3) Transform by replacing the complex variable to the digital transfer function

AGC

DSP

Professor A G Constantinides 2

!! This approach has been widely used for the following reasons:

(1) Analogue approximation techniques are highly advanced

(2) They usually yield closed-form solutions

(3) Extensive tables are available for analogue filter design

(4) Very often applications require digital simulation of analogue systems

Page 25: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 3

!! Let an analogue transfer function be

where the subscript “a” indicates the analogue domain

!! A digital transfer function derived from this is denoted as

AGC

DSP

Professor A G Constantinides 4

!! Basic idea behind the conversion of

into is to apply a mapping from the s-domain to the z-domain so that essential

properties of the analogue frequency response are preserved

!! Thus mapping function should be such that

!! Imaginary ( ) axis in the s-plane be

mapped onto the unit circle of the z-plane

!! A stable analogue transfer function be

mapped into a stable digital transfer function

Page 26: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 5

!! To obtain G(z) replace s by f(z) in H(s)

!! Start with requirements on G(z)

G(z) Available H(s)

Stable Stable

Real and Rational in z Real and Rational in s

Order n Order n

L.P. (lowpass) cutoff L.P. cutoff

AGC

DSP

Professor A G Constantinides 6

!! Hence is real and rational in z of order one

!! i.e.

!! For LP to LP transformation we require

!! Thus

Page 27: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 7

!! The quantity is fixed from

!! ie on

!! Or

!! and

AGC

DSP

Professor A G Constantinides 8

!! Transformation is unaffected by scaling.

Consider inverse transformation with scale factor equal to unity

!! For

!! and so

Page 28: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 9

!! Mapping of s-plane into the z-plane

AGC

DSP

Professor A G Constantinides 10

!! For with unity scalar we have

or

Page 29: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 11

!! Mapping is highly nonlinear

!! Complete negative imaginary axis in the s-plane from to is

mapped into the lower half of the unit circle in the z-plane from to

!! Complete positive imaginary axis in the s-plane from to is mapped into the upper half of the unit circle in

the z-plane from to

AGC

DSP

Professor A G Constantinides 12

!! Nonlinear mapping introduces a distortion in the frequency axis called

frequency warping

!! Effect of warping shown below

Page 30: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 13

!! To transform a given lowpass transfer function to another transfer function that may be a lowpass, highpass, bandpass or bandstop filter (solutions given by Constantinides)

!! has been used to denote the unit delay in the prototype lowpass filter and to denote the unit delay in the transformed filter to avoid confusion

AGC

DSP

Professor A G Constantinides 14

!! Unit circles in z- and -planes defined by

,

!! Transformation from z-domain to

-domain given by

!! Then

Page 31: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 15

!! From , thus , hence

!! Therefore must be a stable allpass function

AGC

DSP

Professor A G Constantinides 16

!! To transform a lowpass filter with a

cutoff frequency to another lowpass filter with a cutoff frequency , the

transformation is

!! On the unit circle we have

which yields

Page 32: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 17

!! Solving we get

!! Example - Consider the lowpass digital

filter

which has a passband from dc to with a 0.5 dB ripple

!! Redesign the above filter to move the passband edge to

AGC

DSP

Professor A G Constantinides 18

!! Here

!! Hence, the desired lowpass transfer

function is

Page 33: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 19

!! The lowpass-to-lowpass transformation

can also be used as highpass-to-highpass, bandpass-to-bandpass and bandstop-to-bandstop transformations

AGC

DSP

Professor A G Constantinides 20

!! Desired transformation

!! The transformation parameter is given by

where is the cutoff frequency of the lowpass filter and is the cutoff frequency of the desired highpass filter

Page 34: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 21

!! Example - Transform the lowpass filter

!! with a passband edge at to a highpass filter with a passband edge at

!! Here

!! The desired transformation is

AGC

DSP

Professor A G Constantinides 22

!! The desired highpass filter is

Page 35: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 23

!! The lowpass-to-highpass transformation can also be used to transform a

highpass filter with a cutoff at to a lowpass filter with a cutoff at

!! and transform a bandpass filter with a center frequency at to a bandstop filter with a center frequency at

AGC

DSP

Professor A G Constantinides 24

!! Desired transformation

Page 36: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 25

!! The parameters and are given by

where is the cutoff frequency of the lowpass filter, and and are the

desired upper and lower cutoff frequencies of the bandpass filter

AGC

DSP

Professor A G Constantinides 26

!! Special Case - The transformation can be simplified if

!! Then the transformation reduces to

where with denoting the desired center frequency of the bandpass filter

Page 37: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

AGC

DSP

Professor A G Constantinides 27

!! Desired transformation

AGC

DSP

Professor A G Constantinides 28

!! The parameters and are given by

where is the cutoff frequency of the lowpass filter, and and are the desired upper and lower cutoff frequencies of the bandstop filter

Page 38: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 1

•! Filtering operation Time k Given

signal

OPERATION

0

1 4.0 14.0

2 1.1 2.5

3 -21.6 -9.3

4 -3.6 -20.1

5 -4.7 -28.8

ADD

4.0 + 1.1 - 21.6 - 3.6 =

Professor A G Constantinides 2

Filtering

Page 39: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 3

Filtering

+ -

Professor A G Constantinides 4

Filtering

•! Basic operations required

•! (a) Delay

•! (b) Addition

•! (c) Multiplication (Scaling)

Page 40: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 5

Filtering: More general operation

INPUT

OUTPUT

+ +

+ + + +

+

Professor A G Constantinides 6

Impulse response

•!Most general linear form

•! Recursive or Infinite Impulse Response

(IIR) filters

Page 41: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 7

A simple first order

Professor A G Constantinides 8

Transfer function

•! For FIR

Page 42: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 9

For IIR

•! Stability: Note that

Professor A G Constantinides 10

Thus there is a pole at

•! if its magnitude is more than 1 then the

impulse response increases without bound

•! if its magnitude is less than 1 decreases

exponentially to zero

•! Frequency Response: Set and

Page 43: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 11

So that

•!And hence

•! Compare with transfer function

Professor A G Constantinides 12

In the initial example

or

•!And thus

Page 44: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 13

2-D z-transform

•! Example :

Professor A G Constantinides 14

•!And hence

(i) Separable transforms.

(ii) Non-separable transforms.

Page 45: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 15

2-D filters

•! Thus we can have

•! (a) FIR 2-D filters and

•! (b) IIR 2-D filters

Professor A G Constantinides 16

Transfer function

•! For convolution set

Page 46: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 17

Filtering

a02 a01 a00

a12 a11 a10

a22 a21 a20

b02 b01

b12 b11 b10

b22 b21 b20

Typical N1 = N2 = M1 = M2

IIR= 2

arrangement.

Professor A G Constantinides 18

(a) Separable filters

(b) Non-separable filters

is not expressible as a product of separate and

independent factors

Page 47: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 19

1

1

1

1

0

0

0

0

Professor A G Constantinides 20

Page 48: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 1

•!Defined as power series

•! Examples:

Professor A G Constantinides 2

•!And since

•!We get

Page 49: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 3

•!Define

! +ve and = 1

! +ve and > 1

! +ve and < 1

Professor A G Constantinides 4

•!We have

•! ie

•!Note that has a pole at on the

z-plane.

Page 50: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 5

Note:

•! (i) If magnitude of pole is > 1 then

increases without bound

•! (ii) If magnitude of pole is < 1 then

has a bounded variation

•! i.e. the contour on the z-plane is of

crucial significance.

•! It is called the Unit circle

Professor A G Constantinides 6

1

1

Page 51: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 7

(i) Linearity

•! The z-transform operation is linear

•! Z

•!Where Z , i = 1, 2

(ii) Shift Theorem

Z

Professor A G Constantinides 8

•! Let

•!Z

•! But for negative i.

....

Page 52: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 9

Examples:

•! (i) Consider generation of new discrete

time signal from via

•! Recall linearity and shift

•! (ii) Z write

Professor A G Constantinides 10

•! From

•!With from earlier result

•!We obtain Z

Z

Page 53: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 11

•!Given F(z) to determine .

•! Basic relationship is

•! may be obtained by power series

expansion. It suffers from cumulative errors

Professor A G Constantinides 12

•!Alternatively

•!Use for m = -1

•! otherwise

•!where closed contour ! encloses origin

Page 54: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 13

•! Integrate to yield

Examples

•! (i)

write

Professor A G Constantinides 14

•!And hence

Pole at of Residue

(ii) Let

where

and

•! To determine

Page 55: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 15

•! From inversion formula

•! But

Professor A G Constantinides 16

•!Hence

•! Thus

Page 56: AGC DSP DIGITAL FILTERS - Imperialmandic/DSP_Slides/Handout_Digital_Filter… · AGC DSP Professor A G Constantinides DIGITAL FILTERS !! Finite Impulse Response (FIR) !! Infinite

Professor A G Constantinides 17

Note:

•! (i) For causal signals for negative

i. Thus upper convolution summation limit

is in this case equal to k.

•! (ii) Frequency representation of a discrete-

time signal is obtained from its z-transform

by replacing where T is the

sampling period of interest. (Justification

will be given later.)