Você está na página 1de 2

MATLAB Assignment

BITS-PILANI, K.K.BIRLA GOA CAMPUS


Semester II, 2013-14
EEE F243/INSTR F243
SIGNALS AND SYSTEMS
Submission: 8.00 PM, 01/05/2014

Instructions:
In this assignment the follwing constants are used: a, b, c, k1 and k2. The constants a, b
and c are to be chosen from the last three digits of your ID number:
20**B*A*abcG/20**A*PSabcG Further, k1 = largest{a,b,c} and 0<k2=smallest{a,b,c}.

Let h[n], x[n] and y[n] denote the impulse response, input and output of the system,
respectively.

The assignment consists of three parts: 1 to 3. Write one single MATLAB program
giving the solution to all three parts in the same program. Name the program as
f20**A*PSabc.m / f20**B*A*abc.m. Give appropriate comments for each part of the
program.

In your program it is NOT allowed to define a, b, c, k1 and k2 as variables in the


beginning of your program. Instead, you have to use the numerical values of those
constants wherever needed.

Use pause to separate the different subparts and plots in your program.

Use disp() to display your comments wherever necessary (for example, comment on
stability).

Each plot must have a suitable title, xlabel and ylabel.

1. A system is given by the following difference equation


y[n] = x[n] + a x[n-2] + b x[n-3] + c x[n-4]+x[n-6].
a.
b.
c.
d.
e.

Construct the impulse response sequence: h


Plot h. (Use stem()).
Plot the pole-zero map of the transfer function H(z). (Use zplane.)
Comment on the stability of the system.
If a (causal) input is given by x[n] = {1,-1,1,-1}, determine the output, y[n], by
convolution of x[n] with h[n]. Plot x[n] and y[n]. (Use conv() and subplot).
f. Plot the magnitude plot and phase plot for x[n], h[n] and y[n] (use freqz).

2. A system is given by the following difference equation


5y[n] + k1 y [n-1] + k2 y[n-2] + 5 y[n-3]= x[n].
a.
b.
c.
d.
e.

Get the first 21 samples of the impulse response sequence: h (use impz()).
Plot h. (Use stem()).
Plot the pole-zero map of the transfer function H(z). (Use zplane.)
Comment on the stability of the system.
If a (causal) input is given by x[n] = {1,-1,1,-1}, determine the output, y[n], by
convolution of x[n] with h[n]. Plot x[n] and y[n]. (Use conv() and subplot).
f. Plot the magnitude plot and phase plot for x[n], h[n] and y[n] (use freqz).

3. Let a sequence be given by


x = {1,a,-a,b,-b,c,-c,1}.
a. Plot x. (Use stem()).
b. Determine 8 point FFT (X) of the sequence x. Plot the magnitude and phase.
------ END -----Submission:
a. Prepare one single MATLAB program named f20**A*PSabc.m for the entire assignment.
Give appropriate comments for each part of the program.

b. Prepare a word document named f20**A*PSabc.doc giving all the results and the plots.
c. Submit the two files on moodle.

Você também pode gostar