TX00CQ31 –Digital Signal Processing

Study 5:  Modification of Systems


Read these instructions first!

Number

Questions

Write your answer in this column

Hints

Q1

Generate filter parameters for an IIR-type bandstop notch filter with the following properties:

  • Sampling rate 8000 s-1
  • Stop-band center frequency = 800 Hz
  • Stop-band bandwidth = 200 Hz

Verify your design from Amplitude Response

Commands:

f_center = 800;

bw = 200;

fs = 8000;

wo = f_center / (fs/2);

bw_norm = bw / (fs/2);

[a, b] = pei_tseng_notch(wo, bw_norm);

freqz(a, b, 1024, fs);

zero-pole diagram amplitude response

By zooming in and pointing to the right place the exact value of the point appears on the lower left corner as (x, y) values.

freqz, notch.html

Q2

Stem-plot few first values of the impulse response of the system, and verify from the plot that this is indeed an IIR-system.

amplitude response

filter

Q3

Double all delays of the previous system and compare the frequency responses of the original and modified system.

Describe in your own words and/or graphically how the system properties changed.

amplitude response

 

Q4

You have given the following 4th order difference equation y[n] = 0.0023018x[n] +

-0.0023886x[n-1] + 0.0039849x[n-2] +

-0.0023886x[n-3] + 0.0023018x[n-4] +

3.57009y[n-1] +

-4.92927y[n-2] +

3.11044y[n-3] +

-0.75606y[n-4]

 

Find out the pole-zero diagram and the frequency response assuming 8 kHz sampling rate.  What kind of filter this is, and what is the -3dB corner frequency?

Commands:

aa = [0.0023018, -0.0023886, 0.0039849,-0.0023886, 0.0023018];

bb = [1, -3.57009, 4.92927, -3.11044, 0.75606];

fs = 8000;

zz = roots(aa);

pp = roots(bb);

zplane(zz,pp);

freqz(aa,bb,1024,fs);

pp = roots(bb);

Lowpass filter. Corner frequency is at 508Hz.

stem plot stem plot

zplane

freqz

Q5

Convert the Q4 filter to a bandpass filter whose center frequency is 2 kHz and bandwidth is 1 kHz (assuming 8kHz sampling frequency)

Commands:

aa = [0.0023018, 0, 0.0023886, 0, 0.0039849, 0, 0.0023886, 0, 0.0023018];

bb = [1.0000, 0, 3.5701, 0, 4.9293, 0, 3.1104, 0, 0.7561];

freq(aa,bb,1024,fs);

stem plot

Change first the direction of real axis, then double the delay elements

Q6

Determine the filter coefficients for a cascaded second-order-section (SOS) implementation of the filter in Q4 (4th order system).

 

Verify your design by cascading the sections and calculate combined filter coefficients.

Commands:

b = [0.0023018, -0.0023886, 0.0039849,-0.0023886, 0.0023018];

a = [1, -3.57009, 4.92927, -3.11044, 0.75606];

[sos,g]= tf2sos(b,a);

sos = 1.0000 0.2146 1.0000 1.0000 -1.7785 0.8132 1.0000 -1.2523 1.0000 1.0000 -1.7916 0.9297

g = 2.3018e-03

roots(a) ans = 0.8958 + 0.3567i 0.8958 - 0.3567i 0.8892 + 0.1500i 0.8892 - 0.1500i

roots(b) ans = 0.6262 + 0.7797i 0.6262 - 0.7797i -0.1073 + 0.9942i -0.1073 - 0.9942i

Pick zero-pole complex conjugate pairs, and determine the system coefficients for both systems separately. Make sure that the system gain does not change in process.

Multiplication of two polynomials can be done with the conv command