Академический Документы
Профессиональный Документы
Культура Документы
LAB # 4
SPRING 07
DISCRETE TIME FOURIER TRANSFORM (DTFT)
-Frequency Response
Objective: The function freqz can be used to compute the values of the DTFT of a
sequence, described as a rational function in e jw at a prescribed set of discrete frequency
points.
b1 b2 e j bM 1e jM
Y e j
H e j
X e j
a1 a 2 e j a N 1e jN
N 1
M 1
k 1
k 1
ak yn k 1 bk xn k 1
Commands:
FREQZ: Compute the frequency response of digital filters.
When N is an integer, [H,W] = FREQZ(B,A,N) returns the N-point frequency
vector W in radians and the N-point complex frequency response vector H
of the filter B/A:
Y e jw
b1 b2e jw bm 1e jmw
jw
He
X e jw
a1 a2e jw an 1e jnw
given numerator and denominator coefficients in vectors B and A. The frequency
response is evaluated at N points equally spaced around the upper half of the unit
circle. If N isn't specified, it defaults to 512.
He
2. Find the N-point frequency vector (W) and plot the frequency response of the
following system with respect to normalized frequency. You need to plot 4 graphs (the
real part, the imaginary part, the magnitude spectrum, and the phase spectrum) on a sheet
of paper. (Use subplot, plot, title and gtext commands.) Take N=512.
Appendix
x[n]e
jwn
Impulse response
x[n]
h(n)
Therefore H e jw
Y e jw
X e jw
N 1
M 1
k 1
k 1
ak yn k 1 bk xn k 1
X e jw
a1 a 2 e j a N 1e jN
0.03
Exercise 1
0.015
0.02
0.01
0.01
0.005
0.5
Normalized frequency
Magnitude spectrum of H
1.5
0.02
0.5
Normalized frequency
Phase spectrum of H
0.5
Normalized frequency
Ph(H)
0.03
0.01
0.5
0.5
Normalized frequency
real part of H
1
Exercise 2
6
2
0
-2
2
0
0.5
Normalized frequency
magnitude spectrum of H
-2
Ph(H)
Mag(H)
imaginary part of H
Im(H)
Re(H)
Mag(H)
Imaginary part of H
Im(H)
Re(H)
Real part of H
4
2
0
0.5
Normalized frequency
Phase spectrum of H
0.5
Normalized frequency
1
0
0.5
Normalized frequency
-1