Homework 6 Solution

$29.99 $18.99

This homework deals with digital lters in a low-level sense. You are expected to know a bit about the z-transform, but if you are not in Signals and Systems, please contact me separately for some additional information on this homework if you need it. Read the parts carefully and make sure to complete every part…

You’ll get a: . zip file solution

 

 
Categorys:
Tags:

Description

Rate this product

This homework deals with digital lters in a low-level sense. You are expected to know a bit about the z-transform, but if you are not in Signals and Systems, please contact me separately for some additional information on this homework if you need it. Read the parts carefully and make sure to complete every part of the homework. This homework requires you to produce a few plots; I want nice plots! Axis labels and titles are a must.

1. For this question, you will be working with the discrete system described by the transfer function:

2

z2

+

1

z +

1

7

H(z) =

5

4

1

z3

1

z +

3

3

8

2

Store this transfer function as numerator and denominator polynomials. Be VERY careful setting this up. Check the documentation for zplane to see how discrete transfer functions are handled in MATLAB.

Compute the poles and zeros using a speci c MATLAB function. (Make sure you use the right one for discrete signals and not the one used mostly for continuous signals!)

Create a poly zero plot using a di erent MATLAB function. You may use either the poles and zeros themselves or the numerator and denominator polynomials.

Use impz to compute the impulse response of this transfer function. Com-pute only the rst 50 points of it (there is a way to do this in the function itself). Make a stem plot of the impulse response.

Let x[n] = ( 45 )n. Then use lter to apply the transfer function (or lter) to the signal. In subplots, plot the before and after.

The above is the easiest way to apply a lter, but you also ought to be able to do this analytically, using either convolution in MATLAB or the product of z-transforms. Show me you know how to do this! That is, plot the same answer achieved in another way. You don’t have to take any inverse z-transforms to do this! Note that if you use convolution with the impulse response, you’ll get a longer vector than when you used lter. Therefore, only plot the rst n points where n is the length of the vector result from the previous part.

  1. In this question, you will be “designing” a bandpass lter (probably unrealistic but it’s what I came up with). A bandpass lter is a system which only allows a certain band of frequencies from a signal to pass.

ECE-210B Homework 6 Samuel Maltz

Last question you converted a transfer function in tf form to one in zpk form. Now we will do the opposite. Compute numerator and denominator vectors for a transfer function with k = 0:01 and these zeros and poles:

zeros : 1; 1

poles : 0:9ej 2 ; 0:9e j 2 ; 0:95ej 512 ; 0:95e j 512 ; 0:95ej 712 ; 0:95e j 712

Create a pole-zero plot.

Now compute the frequency response of this lter using freqz . Use n = 1024 points and return an H frequency response vector and a w frequency vector. DO NOT use the option to plot the frequency response. You will be manually creating the plots.

The H vector is a complex vector. That means it has both magnitude gain (via abs) and phase (via angle). Using subplots, plot the magnitude and phase against the w frequency vector. A few things to note (and will be expected in addition to proper plots):

{ Plot the magnitude in dB. You can convert a gain x to dB via 20log10(x).

{ Plot the phase in degrees. You will notice if you do that, the plot will have weird sharp edges. Remove them using unwrap before converting to degrees.

{ Show units in the axis labels. (Remember the frequency vector, w, has units radians not radians per second.)

{ Remember the frequency vector, w, only goes from 0 to . Make sure to use xlim, xticks and xticklabels.

2