Docsity

Homework Problems - Digital Signal Process | ENEE 425, Assignments of Electrical and Electronics Engineering

Toggle sidebar
bg1
ENEE 425
Spring 2008 Assigned Homework
Oppenheim and Shafer (2nd ed.)
Instructor: S.A. Tretter
Note: The dates shown are when the problems were assigned. Homework is due at the
beginning of the next class after they were assigned unless stated differently.
1. January 31: 4.2, 4.3, 4.4
2. February 5: Special Problem set on Hilbert Transforms
(a) Hint: cos ω0tF
←→ πδ(ω−ω0) + πδ(ω+ω0)
sin ω0tF
←→ −jπδ(ω−ω0) + jπδ(ω+ω0)
i. Find the Hilbert transforms of x(t) = cos ω0tand y(t) = sin ω0t
ii. Find the analytic signals x+(t) and y+(t)
iii. Find X+(ω) and Y+(ω)
(b) Let x(t) have the rectangular shaped low-pass Fourier transform
X(ω) = (1 for |ω|< W
0 elsewhere
i. Find x(t) and ˆx(t)
ii. Find x+(t) and X+(ω)
3. February 12: 3.1 (a), (b); 3.3 (a), (b)
4. February 14: 3.5, 3.6 (a), (c), (d), (e). Just find inverse z-transforms using whatever
method you prefer. Ignore the question about the existence of a Fourier transform.
5. February 21: 3.33, 3.54, 3.37 (Do them in this order.)
6. February 26 (Due next Tuesday, March 4): Special Problem Set on Difference Equa-
tions
Find the solutions to the following difference equations using one-sided z-transforms
with the one-sided delay theorem.
(a) y(n)+3y(n−1) = x(n)
where x(n) = 2−nu(n) and y(−1) = 1
(b) y(n)−0.5y(n−1) = x(n)−0.5x(n−1)
where x(n) = u(n) and y(−1) = 0
(c) y(n)−0.5y(n−1) = x(n)−0.5x(n−1)
where x(n) = u(n) and y(−1) = 1
7. February 28: 3.21, 3.22
1
pf3
pf4
pf5
pf8

Partial preview of the text

Download Homework Problems - Digital Signal Process | ENEE 425 and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

ENEE 425

Spring 2008 Assigned Homework Oppenheim and Shafer (2nd ed.) Instructor: S.A. Tretter

Note: The dates shown are when the problems were assigned. Homework is due at the beginning of the next class after they were assigned unless stated differently.

  1. January 31: 4.2, 4.3, 4.
  2. February 5: Special Problem set on Hilbert Transforms

(a) Hint: cos ω 0 t F ←→ πδ(ω − ω 0 ) + πδ(ω + ω 0 ) sin ω 0 t F ←→ −jπδ(ω − ω 0 ) + jπδ(ω + ω 0 ) i. Find the Hilbert transforms of x(t) = cos ω 0 t and y(t) = sin ω 0 t ii. Find the analytic signals x+(t) and y+(t) iii. Find X+(ω) and Y+(ω) (b) Let x(t) have the rectangular shaped low-pass Fourier transform

X(ω) =

{ 1 for |ω| < W 0 elsewhere

i. Find x(t) and ˆx(t) ii. Find x+(t) and X+(ω)

  1. February 12: 3.1 (a), (b); 3.3 (a), (b)
  2. February 14: 3.5, 3.6 (a), (c), (d), (e). Just find inverse z-transforms using whatever method you prefer. Ignore the question about the existence of a Fourier transform.
  3. February 21: 3.33, 3.54, 3.37 (Do them in this order.)
  4. February 26 (Due next Tuesday, March 4): Special Problem Set on Difference Equa- tions

Find the solutions to the following difference equations using one-sided z-transforms with the one-sided delay theorem.

(a) y(n) + 3y(n − 1) = x(n) where x(n) = 2−nu(n) and y(−1) = 1 (b) y(n) − 0. 5 y(n − 1) = x(n) − 0. 5 x(n − 1) where x(n) = u(n) and y(−1) = 0 (c) y(n) − 0. 5 y(n − 1) = x(n) − 0. 5 x(n − 1) where x(n) = u(n) and y(−1) = 1

  1. February 28: 3.21, 3.
  1. March 4: Special Problem Set on Frequency Responses

First make pole/zero plots for the following transfer functions. Then sketch their am- plitude and phase responses using the geometrical approach based on vectors drawn from the poles and zeros to the unit circle. Finally, compute and plot the exact ampli- tude and phase responses using your favorite programming language or tool (mathcad, MATLAB, C, FORTRAN, etc.) The MATLAB functions freqz( ) and freqzplot( ) in the signal processing package are convenient for computing and plotting the theoretical amplitude and phase responses.

(a)

1 + z−^1

(b)

z−^2 (1 − 0. 8 z−^1 )(1 − 0. 9 z−^1 )

(c)

(1 + z−^1 )^2 1 + 0. 16 z−^2

9. March 25 (Due April 3): Project 1. Problem on Filter Implementation

and Amplitude Response Measurement

(This project must be turned in or else you will get a grade of “I” for this course.)

A 4th order IIR filter has a transfer function of the form H(z) = KH 1 (z)H 2 (z) where K = 0.0659434348 and

H 1 (z) =

1 + 1. 732154 z−^1 + z−^2 1 − 0. 620227 z−^1 + 0. 195243 z−^2

H 2 (z) =

1 + 0. 883717 z−^1 + z−^2 1 − 0. 444412 z−^1 + 0. 678665 z−^2 Let the sampling rate be fs = 8000 Hz.

(a) Use the MATLAB functions freqz( ) and freqzplot( ) in the signal processing package to compute and plot the theoretical amplitude response of the filter in dB. (b) Suppose the input xc[n] = cos ωnT u[n] has the output yc[n] and the input xs[n] = sin ωnT u[n] has the output ys[n]. Then the input x[n] = xc[n]+jxs[n] = ejωnT^ u[n] has the output y[n] = yc[n] + jys[n]. The amplitude of this output is a[n] = (y c^2 [n] + y^2 s [n])^1 /^2. After some time the filter output will reach a steady state and a[n] will become a constant equal to the amplitude response on a linear scale since the magnitude of x[n] is 1 for positive n. The amplitude response in dB is α = 20 log 10 a[n]. i. Write a MATLAB program to implement the filter H(z) as a cascade of the scale factor K followed by H 1 (z) and then H 2 (z). Implement H 1 (z) and H 2 (z) as a second-order Type 1 direct form sections. Do not use MATLAB’s built in filter implementation functions but program your own sums of products.

Digital Filter Design Problems

  1. A simple digital bandpass filter with zeros at ω = 0 and ωs/2 and a peak near ωs/ 4 is required. The amplitude response must meet the specifications |G∗(ωs/4)| = 1 and |G∗(ωs/8)| ≤ 1 /100. Find a transfer function with a second degree numerator and denominator that meets these requirements. Draw the block diagram for a Type 1 Direct Form realization and write the difference equations required to implement it.
  2. A digital filter approximation to a differentiator is desired. An ideal differentiator has the transfer function G(s) = s. An approach to designing the filter is shown in Figure
    1. Let the guard filter be A(s) =

(1 − z−^1 )^2 T s^2 where, as usual, z = esT^. The filter A(s) is a linear point connector with a one-sample delay to make it realizable. The desired response G(s) is cascaded with the guard filter.

(a) Find the transfer function of the digital filter approximation by computing H(z) = Y (z)/X(z). (b) Write a difference equation for realizing H(z). (c) Find the amplitude and phase responses of H(z) and compare them with those of the ideal differentiator.

^ - - -

x(t) G(s) T T

y∗(t) A(s)

Hold

Figure 1: Using a Hold as a Guard Filter

  1. Repeat the previous problem if the desired transfer function is G(s) = 1/s which is an ideal integrator. Show that the resulting difference equation is equivalent to the classical trapezoidal integration rule.
  2. (a) Find the transfer function of a lowpass digital filter with a 3 dB cutoff frequency of ωs/6 using the bilinear transformation and a third-order Butterworth analog prototype filter. (b) Sketch the amplitude response. Show the values at ω = 0, ωs/6, and ωs/2. (c) Show how to realize it as a cascade of a 1st and 2nd order section and give the difference equations required for implementing it.
  3. (a) Using a fourth-order Butterworth filter as the analog prototype filter and the bilinear transformation, design a digital lowpass filter with a 3 dB cutoff frequency of ωs/6.

(b) Sketch the amplitude response. Show the values at ω = 0, ωs/6, and ωs/2.

(c) Show how to realize the digital filter as the cascade of two second-order Type 1 direct form sections and give the difference equations required to implement it.

(c) Pass the signal in sig1.dat through your filter using time-domain discrete-time convolution and plot the output signal. Don’t plot all 1000 output points on one line because you will not be able to see the nature of the desired signal! You will just get a black stripe across the page! Plot only as many points on a line as will allow you to see the fine structure of the output. Those of you who have taken ENEE 420 should recognize what kind of signal it is. If you have had ENEE 420 (or maybe you saw it in ENEE 322 also), what kind of modulation was used to generate the signal?

  1. Repeat the previous exercise but use the program, window, with the Kaiser window to design your filter.
  2. Repeat the exercise again using an elliptic IIR filter. Realize the filter as a cascade of second-order Type I sections.

Problems on Quantization and Finite Word-Length Arithmetic

  1. Find the decimal equivalents of the following normalized two’s complement numbers: (a) 01111 (b) 0011 (c) 1111 (d) 1011
  2. Find the normalized two’s complement representations for the following decimal num- bers: (a) 3/4 (b) − 3 /4 (c) 7/8 (d) − 7 / 8
  3. A random variable X is rounded to quantization step size accuracy q. Suppose X is uniformly distributed over the interval [− 3 q, 3 q].

(a) Find and sketch the probability density function (pdf) for the quantization error. (b) Find the signal to quantization noise power ratio in dB.

  1. The input to an analog to digital converter is equally likely to fall anywhere between 10 and −10 volts. Find the number of converter bits required to achieve an 80 dB signal to quantization noise ratio.
  2. A digital filter has the transfer function

G(z) =

(1 − 0. 5 z−^1 )(1 − 0. 9 z−^1 )

1 − 1. 4 z−^1 + 0. 45 z−^2

The filter is implemented by the difference equation

y[n] = x[n] + 1. 4 y[n − 1] − 0. 45 y[n − 2]

Let the input be x[n] = 0 for all time. The value of y[n] is computed using full accuracy arithmetic for the products and sum on the right-hand side of the difference equation and the resulting sum of products is rounded to the nearest integer and stored to be used in the next iteration. That is, the past values of y[·] used on the right-hand side are the values that have been rounded to the nearest integer and stored.

(a) If the initial conditions at time n = 0 are y[−1] = 0 and y[−2] = 1, calculate the future outputs until a steady-state pattern emerges. (b) Repeat (a) if y[−1] = 0 and y[−2] = 10. (c) Repeat (a) if y[−1] = 10 and y[−2] = 10. (d) Is there a problem with this filter? What would be the theoretical steady-state filter output for x[n] = 0? This problem illustrates a nonlinear effect called the dead band.