

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Instructions and matlab code snippets for completing assignment #9 in the cmpe2322 signals and systems course. The assignment involves calculating the impulse response and filtering of input signals for given iir filter coefficients, as well as designing a 5th order low pass elliptic filter. The document also includes sample input signals and filter coefficients for problems 33-35.
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!
CMPE2322 Signals and Systems Page 1 of 2 Assignment #9 IIR Filters Spring 2009 Problem 33. You can recreate Figure 8-3 page 199 with the following matlab statements. xn = zeros(1,20); xn(1) = 2; xn(2) = -3; xn(4) = 2; note the index of xn starts with 1 not zero as in the text so the response will be displaced by 1. The IIR filter in the text a1 =0.8 b0 = 5 noting the sign reversal is implemented by the matlab steps: a =[ 1 -0.8]; b = 5; and the response yn is calculated by the matlab filter() function: yn = filter(b,a,xn); To plot the variable versus n the statements needed are: n = 0:1:19; stem(n,yn) This should result in Figure 8.3. Plot the filter response for xn(1), xn(2), and xn(3) having your assigned values and the rest zero up to xn(20) for the first order text example b = 5 a 1 = 0.8 ( a = -0.8). Problem 34. For the general first order system y[n] = a1y[n-1]+b0x[n]+b1x[n-1] the impulse response is shown in the text to be h[n] = b0(a1^n)u[n]+b1(a1^(n-1))u[n-1]. You can use the filter function to find h[n] by making x[n] = [1 0 0 0 …..] and using filter() as in problem 33. For your values of coefficients find h[n] for n = 0 to 20 using matlab by creating x[n] equal to the impulse function xn = zeros(1,20); xn(1) =1; then b = b0; a = [1 -a1]; Then generate hn hn = filter(b,a,xn); n = 0:1;19; stem(n,hn) This should give you a graph of your hn. Problem 35. Find h[n] for your assigned IIR a and b filter coefficients (a is a1 a2 a3), (b is b1 b0) where y[n] = a1y[n-1]+a2y[n-2] +a3y[n-4]+b0x[n]+b1x[n-1] the same as in problem 34 by making xn = zeros(1,20) and xn(1) =1, a = [1 -a1 -a2 -a3] and b= [ b b1] and hn = filter(b,a,xn). Find H(z) for your IIR filter. Plot the poles and zeros of H(z) using zplane(b,a). Do a partial fraction expansion of H(z) = r1/(z-p1)+r2/(z-p2)+r3/(z- p3)+k1+k2*z-1^ using [r,p,k] = residue(b,a);.
CMPE2322 Signals and Systems Page 2 of 2 Assignment #9 IIR Filters Spring 2009 Problem 36. Design a 5th order low pass elliptic(Cauer) filter using [b,a] = ellip(5,PR,SR,fc) where fc is your normalized cutoff frequency, and PR is the pass band ripple in dB (use PR =3) and SR is the Stop Band Ripple in dB (use SR = 50). Plot the filter response using freqz.(). Your cutoff frequency is given in Hz for a system sampled at 20 kHz. Elizondo Garcia Guerrero Rodríguez Villarreal Problem 33 xn(1) 3 4 5 6 7 xn(2) -4 -5 -6 -7 - xn(3) 3 4 5 6 7 Problem 34 a1,b0,b1 0.7, 2, 3 0.6, 3, 5 0.5, 3, 4 0.4, 5, 3 0.3, 5, 4 Problem 35 a coefficients a1 1.5 1.4 1.3 1.2 1. a2 -1.125 -1.1 -1.2 -1.15 -1. a3 0.3125 0.3 0.275 0.32 0. b0, b1 1,3 1,2 1,3 1,2 1, Problem 36 fc kHz 3 4 5 6 7