You are on page 1of 2

20139 – Ex 4.

IZT DTFT fft

1. Find the Z transform of the following


a. x[n] = 10sin(0.25π n)u[n]

b. x[n] = e −0.1n cos(0.25π n)u[n]

2. Find inverse Z transform


z 2 ( z + 1)
Y ( z) =
( z − 1)( z 2 − z + 0.5)
3. Given a function of z

z 4 + z3 + z 2 + z + 1
F ( z) =
z4
a) Find f[n] (inverse Z transform)
b) Calculate the DTFT of f[n] and plot its magnitude using MATLAB
c) Plot the magnitude of the frequency response (the DTFT) directly from F(z) using MATLAB
d) Use MATLAB to find the frequency response of f[n] using the ‘fft’ command. Why is this
different from (b) and (c)?

4. Demonstration of Nyquist and aliasing.

a) Create a sine signal at 1KHz. Create 100 cycles with 100 points in each cycle. This will represent
the “continuous” signal before sampling.
b) Plot the signal you created in (a). Use plot and not stem for better display. Be careful with the
N −1
time axis. If you have N points total, the last time point is ⋅ Total _ time (this is true for all
N
time plots if you start at zero)
1
c) Create a sampled signal with a sampling frequency of 4KHz (time steps are every s ). How
4000
many time points will you have after sampling?
d) Plot the samples signal. Use plot and not stem for better display.
e) Measure the period time and determine what is the signal’s frequency.
f) Plot the DFT of the samples signal. Use stem command. Again, be careful with the frequency
N −1
axis. If you have N points total, the last frequency point is ⋅ Sampling _ frequency (this is
N
true for all DFT spectrum plots if you start at zero). What frequency do you see in this case?
What is the magnitude of the DFT relative to the number of points in the sampled signal?
1
g) Create a sampled signal with a sampling frequency of 1.25KHz (time steps are every s ).
1250
How many time points will you have now after sampling?

h) Plot the samples signal. Use plot and not stem for better display.
i) Measure the period time and determine what is the signal’s frequency.
j) Plot the DFT of the samples signal. Use stem command. Again, be careful with the frequency
N −1
axis. If you have N points total, the last frequency point is ⋅ Sampling _ frequency (this is
N
true for all DFT spectrum plots if you start at zero). What frequency do you see? What is the
magnitude of the DFT relative to the number of points in the sampled signal?

You might also like