Sunteți pe pagina 1din 5

Project 1 1. Use MATLAB to plot the following functions for 1 t 5 sec. Label your axes appropriately.

y. Use plot command. (a) u(t) (b) r(t), r(t) is the unit ramp signal.

(c) x(t) = 3e2tu(t) (d) x(t) = et, 0 t 2, 0, otherwise (e) x(t) = sin(2t) + 2 cos (3t 0.2) (f) x(t)= p2 (t), where p(t) is the rectangularpulse of width , =2. (g) x(t) = e2t sin(3t)u(t) (h) x(t) = e2t sin(3t)u(t)

2. Sketch the continuous-time signals in parts (a) to (d) by using plot command. (a) x(t) = u(t + 1) 2u(t 1) + u(t 3) (b) x(t) = (t + 1)u(t 1) tu(t) u(t 2) (c) x(t) = etu(t) + et [exp(2t 4) 1] u(t 2) et4u(t 4) (d) x(t) = cos t [ u(t+pi/2)-2u(t-pi)] + (cos t) u( t pi*3/2 ) (e) Use MATLAB to plot the signals defined in parts (a) to (d). 3. Plot the following discrete-time signals using MATLAB for 5 n 15. Label your axes appropriately. Hint: use the stem command. (a) u[n] (b) r[n] (c) x[n] = (0.8)nu[n] (d) x[n] = (0.8)nu[n] (e) x[n] = sin[ (/4) n ] (f) x[n] = sin[ (/2) n ] (g) x[n] = (0.9)n [ sin(n)/4) + cos(n) /4 ] (h) x[n] = 2nu[n] (i) x[n] = 1, 4 n 4, 0, else 4. Sketch the following discrete-time signals (a) x[n] = u[n] 2u[n 1] + u[n 4] (b) x[n] = (n + 2)u[n + 2] 2u[n] nu[n 4] (c) x[n] = [n + 1] [n] + u[n + 1] u[n 2] (d) x[n] = e0.2nu[n + 1] + u[n] 2e 0.1n u[n 3] (1 e 0.1n )2 u[n 5] (e) Use MATLAB to plot the signals defined in parts (a) to (d).

5. For the discrete-time signals x[n] and v[n] shown below 1) compute the convolution x[n] * v[n] for all n 0 by hand; 2) plot the convolution x[n] * v[n] in MATLAB by first computing it with conv command and then plotting it with the stem command.

6. Find the DTFT of the following discrete-time signals. Plot the amplitude and phase spectra using MATLAB for each signal. (a) x[n] = (0.8)nu[n] (b) x[n] = (0.5)n cos(4n)u[n] (c) x[n] = n(0.5)nu[n] (d) x[n] = n(0.5)n cos(4n)u[n] (e) x[n] = (0.5)n cos2(4n)u[n] (f) x[n] = (0.5)|n| , < n < (g) x[n] = (0.5)|n| cos(4n), < n <
3

7. A linear, time-invariant, causal discrete-time system is described by the difference equation y[n + 2] + y[n] = 2x[n + 1] x[n], where x[n] is the system input and y[n] is the system output. (a) Find h[n], the impulse response of the system. (b) The step response, g[n], of a system is the output when the input is u[n] and zero initial energy is present in the system. Find the step response of the system above. (c) Suppose the input to the system is x[n] = 2nu[n], and the initial conditions on the system output are y[0] = 2, y[1] = 1. Find the output y[n]. (d) Suppose the input to the system is x[n] = 2nu[n], and the initial conditions on the system output are y[n] = 0, n < 0. Find the output y[n]. 8. Find the z-transform X(z), its corresponding frequency response, and the pole-zero diagram for each input x[n]. Plot the frequency response in Matlab, for < . You may use the freqz function in Matlab to calculate the frequency response if you prefer. You may also use the zplane function in Matlab to plot your pole-zero diagrams. Include in your report your plot of the frequency response as well as the ztransform X(z) and pole-zero diagram for each x[n] given below. (a) x[n] = (1/2)n, 0 n 3; x[n] = 0 otherwise. (b) x[n] = u[n] u[n 2], where the unit step function u[n] = 1, n 0; u[n] = 0 otherwise. 9. The ROC (region of convergence) of X(z) consists of the values of z for which X(z) converges. (a) Find the ROC for x[n] = (1/4)n u[n], where u[n] is the unit step function as given in problem 8(a) above. (b) If X(z) has a pole at z = zp, can the ROC include the point z = zp?
4

(c) If X(z) has a pole on the unit circle, can its frequency response be finite for all values of frequency? 10. Consider a cascaded system where filter 1s impulse response is given by h1(n) = 0.75 [n]1.75 [n1] + 1.75 [n 2] 0.75 [n 3], and filter 2 is a 4-point moving average (MA) filter with impulse response given by h2[n] = 0.25 [n] + 0.25 [n 1] + 0.25 [n 2] + 0.25 [n 3]. (a) Find H1(z) as a polynomial in z-1. Convert H1(z) to a function of z, where both numerator and denominator are polynomials in z. Your denominator should be z3, showing there are 3 poles at the origin. (b) Find the zeros of H1(z) with the Matlab function roots. For information on the roots function, type help roots in Matlab. Without plotting frequency response, can you tell whether this will be a lowpass, highpass or bandpass filter? Explain why or why not. (c) Find H2(z) as a polynomial in z1. Convert H2(z) to a function of z, where both numerator and denominator are polynomials in z. Your denominator should be z3, showing there are 3 poles at the origin. (d) Find the zeros of H2(z) with the Matlab function roots. Without plotting frequency response, can you tell whether this will be a lowpass, highpass or bandpass filter? Explain why or why not. (e) Find the overall cascaded response H(z). Also find the zeros of H(z). If you need to, you may use the Matlab function roots, but it isnt necessary. (f) Plot the overall frequency response. You may use the Matlab function freqz if you prefer. Include your plot in your report. Is this a lowpass, highpass, or bandpass filter?

S-ar putea să vă placă și