0% found this document useful (0 votes)
86 views29 pages

Challenge 25 Exam #4 Review Topical Coverage: FIR/IIR

This document provides a review for Exam #4 covering topics in FIR and IIR digital filters. It includes 5 problems to work through. Problem 1 involves analyzing properties of a given 7th order FIR filter, including its transfer function, DC gain, worst case gain, group delay, and phase response for a specific input. Problem 2 analyzes a 1st order IIR filter including determining its transfer function using the bilinear z-transform. Problem 3 examines properties of a given 7th order FIR lowpass filter. Problem 4 continues analysis of a 1st order Butterworth IIR lowpass filter. The document provides a thorough review of key concepts in digital filter design and analysis in preparation for Exam #4.

Uploaded by

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

Challenge 25 Exam #4 Review Topical Coverage: FIR/IIR

This document provides a review for Exam #4 covering topics in FIR and IIR digital filters. It includes 5 problems to work through. Problem 1 involves analyzing properties of a given 7th order FIR filter, including its transfer function, DC gain, worst case gain, group delay, and phase response for a specific input. Problem 2 analyzes a 1st order IIR filter including determining its transfer function using the bilinear z-transform. Problem 3 examines properties of a given 7th order FIR lowpass filter. Problem 4 continues analysis of a 1st order Butterworth IIR lowpass filter. The document provides a thorough review of key concepts in digital filter design and analysis in preparation for Exam #4.

Uploaded by

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

Exam #4 Review

Challenge 25
Exam #4 Review
Topical Coverage: FIR/IIR

Exam #4 Review

Lesson 25 Review Example


A -3dB 2nd order analog lowpass Butterworth filter having 1000 r/s
passband is given by:

10 6
H s 2
s 2 103 s 106
If the sample frequency is fs=1000 Sa/s, what is the bilinear z-transform
version of H(s)?
Some aliasing should be expected when using the standard z-transform.
None, however, should be expected for the bilinear z-transform model.

Bilinear z-transform: s=(2/Ts)(z-1)/(z+1)

106
H z 2
s 2 103 s 106

106

4 10

z 1 2 2
z 1 2

2 106

2 z 1
Ts z 1

0.128 z 1
2
z .767 z 0.278
2

z 1 106
z 1

Digital filter poles are located at z= 0.384 j 0.362.

H(z) Impulse
Invariant
1000(-1/2j1 /2)
-1/2j1/2
0.375j0.32
Hp(s) Prototype
H(s)

Pole Comparisons
H(z) Bilinear
0.384j0.36

Lesson 25 Snapshot
Bi-linear Design Strategy
Step-by-step design procedure
Digital
Filter
Requirements

Step 1:
Prewarp digital frequencies

Hp(s)

Determine analog prototype


filter order N.
Compute the analog
prototype Hp(s)

Step-by-step design procedure


Step 2:

Hp(s)

Convert analog prototype Hp(s) into


analog filter H(s) using frequencyfrequency transformations.

H(s)

(critical analog frequencies have


been prewarped)

Step-by-step design procedure

Step 3:

H(s)

Convert analog H(s) into digital


filter H(z) using the bi-linear ztransform

H(z)

(prewarped analog frequencies are


automatically warped to their
original values)

Example
Design a Butterworth lowpass filter that meets the following
specifications:
Minimum passband attenuation = -3dB
Passband f[0,1]kHz
Minimum stopband attenuation = -10dB
Stopband f[2,5] kHz
Sample frequency fs=10kHz

Step 1: Given fp=1 kHz, fa=2 kHz and fs=10 kHz, determine the prewarped analog frequencies.

p 2 f p / f s 2 0.1 0.2
p

(normalized w.r.t. fs)

2
tan( p / 2) 20 103 tan(0.1 ) 6498r/s 1.0345kHz ~ f p
Ts

a 2 fa / fs 2 0.2 0.4 (normalized w.r.t. fs)


2
a
tan( a / 2) 20 10 3 tan(0.2 ) 14531r/s 2.312kHz fa
Ts
(General rule)

p p ; a a
9

Step 1 (continued): Design the analog prototype filter Hp(s).


From pre-warped data p, a, and magnitude frequency response
(Ap, Aa) it is determined that a 2nd order Butterworth solution is
required. A 2nd order Butterworth prototype filter has a transfer
function given by:
H p (s )

1
s 2 1.414.s 1

10

Step 2: Define analog filter model.


Perform a lowpass-to-lowpass frequency-frequency transform s=s/p,
relocating the passband cutoff frequency from p=1 r/s to the pre-warped
value of p=6.498103 r/s (1034Hz). The resulting analog filter
becomes:

H a ( s) H p ( s)

s s / 6498

4.3 10 7
H a ( s) 2
s 9.2 103 s 4.3 10 7

11

Step 3: Bilinear z-transform.


Apply the bi-linear z-transform to H(s) to obtain H(z):
0.0676( z + 1)2
H (z) 2
z 1.142z 0.412

This process has been reduced to software.


b=0.0676*[1,2,1]
a=[1, -1.142, 0.412]
[H,w]=freqz(b,a);
plot(w,abs(H))

Practice Exam #4

Exam #4 Review

13

Problem 1: FIR
A 7th order Type 1 FIR has the impulse response h[k]={-0.1, 0, 0.3, 0.5,
0.3, 0, -0.1} . The magnitude frequency response is shown for a
sample rate of fs=1k Sa/s.
Type 1: Odd (MATLAB even) order, even symmetry.
0. 6

0.5

0. 5

0. 4

0.3

0. 3

0. 2

0. 1

-0.1

-0. 1

0.3

-0.1

1.4

1.2

1.0
0.9

0.8

Nulls

0.6

0.4

0.2

0.0

0.5

1.5

2.5

Normalized positive baseband


Exam #4 Review

3.5

0.5
14

a)

What is the filters transfer function H(z)?


H(z)= -0.1+ 0z-1+ 0.3z-2+ 0.5z-3+ 0.3z-4+ 0z-5 -0.1z-6

b)

What is the filters DC gain?


H(z)|z=1= H(1)= -0.1+0+0.3+0.5+0.3+0-0.1=0.9

Exam #4 Review

15

c) What is FIRs worst case gain?


Gmax= |hi| = |-0.1|+|0|+|0.3|+|0.5|+|0.3|+|0|+|-0.1|=1.3 < 21.
Implies 1-interger bit of headroom be added to the filters
accumulator.
d) What is the FIRs group delay measured in seconds?
FIR is a Type I linear phase filter ()= -g, where for N=7
(multiplication by 0 still counts), g=(N-1)/2=3. At fs=1000 Sa/s, a
3 sample delay that corresponds to a 3 ms delay.

Exam #4 Review

16

e)

Assume that the input to the FIR is x[k]=cos(2(0.25)k). What is the


phase difference between the input and output signals?
The normalized input frequency is = /2 and the group delay is g
= (N-1)/2=3. The phase response of a Type I lowpass FIR is ()=
-g+0 or -3. Therefore the phase difference at = /2 is () =
-3/2.

Exam #4 Review

17

f)

Assume that a linear phase equiripple FIR is redesigned to have uniformly22 45


weighted errors of p = a=0.01 and a transition bandwidth of =0.1. What is
the approximate filter order?
The FIR order approximately is (Lesson 22, Slide 45)
N=(-10 log10 (ap)-15)/(14) or (-10(-4)-15)/(1.4)=17.8 ~ 18.

e)

A non-uniform error weighted filter (from 1.f) has p=0.1. What is the value of a?
uniform = p a or 0.01 = 0.1 a or a = 0.001

Exam #4 Review

18

Problem 2: IIR
A 1st order digital low pass filter, having a 3dB passband
ranging over f[0, 1/5] Hz, is sampled at a rate fs=1 Hz.
1.0
0.707
0

0.2

0.5

The analog filter H(s) is based on a 1st order Butterworth


analog prototype model:
Hp(s)=1/(s+1),
having its 3dB cut off frequency located at p =1 r/s.

Exam #4 Review

19

a. What is H(z)? (using the bilinear z-transform)


By the book. The digital filters passband cutoff frequency is f = 1/5 = 0.2
Hz. Therefore the normalized digital filters critical passband frequency is:
1/ 5
2 0.2 1.2566 r / s.
1

p 2

which defines the pre-warped analog filters critical passband cut off
frequency to be:

p
2
2 0.2
2 tan
p tan
1.45 r / s (0.23Hz )
Ts
2

2
p p

Exam #4 Review

20

Therefore the frequency-frequency transformed analog lowpass filter is:

Ha s H p s

s s / p

1
s
1
1.45

1.45
s 1.45

then apply the bilinear z-transform:


H z H a s s 2 z 1
Ts z 1

1.45
s 1.45 s 2 z 1

z 1

1.45
1.45 z 1
0.42 z 1

z 1 1.45 3.45z 0.55 z 0.16


2
z 1

Exam #4 Review

21

From this point on, assume that the digital filters transfer function is
H(z)=(1/2) (z+1)/(z-(1/2))
b. What is the DC gain of your digital filter?

H 1

0 .5 * 2
2
0 .5

c. What is the magnitude and phase response of your digital filter


measured at the Nyquist frequency?

H 1

0.5 z 1
z 0 .5

z 1

0 .5 * 0
0 0180
1 .5

Exam #4 Review

22

Problem 3: FIR
A 7th order lowpass FIR filter is designed to suppress signals above 6kHz
and pass signals out to 4kHz . The filter is clocked at 20k Sa/s and has an
assumed impulse response:
h[k] = {1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128}.

Exam #4 Review

23

a. Is the filter a linear phase FIR?


The FIR coefficients h[k] = {1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128} are not
symmetrically distributed. The FIR is therefore non-linear phase.
b. What is the FIRs transfer function (i.e., H(z))?
H(z)= 1/2 + 1/4 z-1+1/8 z-2+ 1/16 z-3+1/32 z-4+ 1/64 z-5+ 1/128 z-6
c. The FIRs input to your filter is assumed to be bounded by unity (i.e., |
x[k]|1.0). What is the maximum value of the output y[k] and what input
signal x[k] produces this maximal output?
6

G hi (
k 0

1 1 1
1
1
1
1

) 0.992 y k 1
2 4 8 16 32 64 128

or G 27 1 / 2 7 0.992 y k 1
and xworst_case_input[k]={1,1,1,1,1,1,1}

Exam #4 Review

24

Problem 4: IIR
A 1st order Butterworth digital lowpass IIR filter H(z) is to be designed
using the bilinear z-transform, and sampled at a 1 Sa/s rate. The IIR has
a -3dB passband defined over f[0, 0.25] Hz. The analog prototype is
given by:
Hp(s)=1/(s+1),
The analog and digital filters are illustrated below.
1
0.707

|H(ej)|
0

Exam #4 Review

25

a. What is the value of p (analog passband cutoff frequency) in


radians/second?
The normalized digital passand frequency is p = 2 f3db/fs = 2
(0.25)=1.5707 r/s.
Therefore the analog filters prewarped passband frequency is:

p
2
2 0.25

2 tan
p tan

2
tan

2 r/s
Ts
2

4
2
~ 0.318 Hz>0.25Hz

Exam #4 Review

26

b. Suppose the p from Part 4.a is p = 2 r/s. Derive the digital filters
transfer function using the bi-linear z transform.

For p 2; H s H p (s )

s
s
p

p
s p

2
; therefore
s2

2
2
2 z 1

s 2 z 2 z 1 2 z 1 2 2z 2 (2z 2)
Ts z 1
z 1
z 1
2 z 1 0.5 z 1

4z 0
z

H z H s z 2 z 1

Exam #4 Review

27

c. What is the filters DC gain?


H(z=1)=0.5(2)/1=1
d. What is the filters gain and phase response measured at f=0.25 Hz?
H z

0.5 z 1
z

z e j j

0.5 j 1
2

45
j
2

e. What is the output if x[k]=1.414 cos(2f/fs), where f=0.25 Hz?

H z

2
45 ( part 4.d )
2

Then y[k]= 1 cos((2f/fs) -45)


Exam #4 Review

28

Exam #4 Review

29

You might also like