lecture 2 matlab exercise presenter : lee-kang lester liu instructor : prof. truong nguyen
TRANSCRIPT
Lecture 2 Matlab Exercise
Presenter : Lee-Kang Lester LiuInstructor : Prof. Truong Nguyen
Problem M3.3(b)
M3.3(b) : Determine and plot the real and imaginary parts and the magnitude and phase spectrum of the following DTFT.
X
Problem M3.3(b)
M3.3(b) : Determine and plot the real and imaginary parts and the magnitude and phase spectrum of the following DTFT.
X
After seeing the magnitude and phase spectrum, what are its corresponding poles and zeros. !!
Problem M3.3(b)
M3.3(b) : Determine and plot the real and imaginary parts and the magnitude and phase spectrum of the following DTFT.
X
Z=roots([1 0.1885 -0.1885 -1]);P=roots([1 0.7856 1.4654 -0.2346]);Figure; zplane(Z,P);
Question ?
Problem M4.4
M4.4: Write a MATLAB program to compute the group delay using the expression of Problem 4.77 at prescribed set of discrete frequencies.
P4.77:Show that the group delay of a LTI discrete-time system characterized by a frequency response can be expressed as,
Problem M4.4
M4.4: Write a MATLAB program to compute the group delay using the expression of Problem 4.77 at prescribed set of discrete frequencies.
Suppose we have a system , we can rewrite the frequency response as
Second, the definition of group delay, , is
Problem M4.4
Hence,
Problem M4.4
The definition of group delay, , is
Hence,
Problem M4.4
Given a system Using provided equation to find its group delay,
Problem M4.4
The definition of group delay, , is
Given a system Using provided equation to find its group delay,
Question ?
Problem M4.5
M4.5: Write a MATLAB program to simulate the filter designed in Problem 4.69, and verify its filtering operation.
P4.69:A FIR filter of length 3 is defined by a symmetric impulse response, i.e., Let the input to this filter be a sum of two cosine sequences of angular frequencies 0.2 rad/sample and 0.5 rad/samples, respectively. Determine the impulse response coefficients so that the filter passes only the high-frequency component of the input.
Problem M4.5
P4.69:A FIR filter of length 3 is defined by a symmetric impulse response, i.e., Let the input to this filter be a sum of two cosine sequences of angular frequencies 0.2 rad/sample and 0.5 rad/samples, respectively. Determine the impulse response coefficients so that the filter passes only the high-frequency component of the input.
n0 1 2
h [0 ]h [1 ]h [2 ]
= = = + =
Problem M4.5
P4.69:A FIR filter of length 3 is defined by a symmetric impulse response, i.e., Let the input to this filter be a sum of two cosine sequences of angular frequencies 0.2 rad/sample and 0.5 rad/samples, respectively. Determine the impulse response coefficients so that the filter passes only the high-frequency component of the input.
n0 1 2
h [0 ]h [1 ]h [2 ]
=
Given that and
=
=
Problem M4.5
P4.69:A FIR filter of length 3 is defined by a symmetric impulse response, i.e., Let the input to this filter be a sum of two cosine sequences of angular frequencies 0.2 rad/sample and 0.5 rad/samples, respectively. Determine the impulse response coefficients so that the filter passes only the high-frequency component of the input.
n0 1 2
h [0 ]h [1 ]h [2 ]
=
=
h [0 ]=h [2 ]=−4.8788h [1 ]=9.5631
Question ?
Problem M4.6
M4.6: Write a MATLAB program to simulate the filter designed in Problem 4.72, and verify its filtering operation.
P4.72:Consider an FIR filter of length 5 with a symmetric impulse response, i.e., An input consisting of a sum of three cosine sequences of angular frequencies: 0.3 rad/samples, 0.4 rad/samples, and 0.7 rad/samples, respectively, is applied to this filter. Determine the impulse response coefficients so that the filter passes only the mid-frequency component of the input.
Problem M4.6
P4.72:Consider an FIR filter of length 5 with a symmetric impulse response, i.e., An input consisting of a sum of three cosine sequences of angular frequencies: 0.3 rad/samples, 0.4 rad/samples, and 0.7 rad/samples, respectively, is applied to this filter. Determine the impulse response coefficients so that the filter passes only the mid-frequency component of the input.
n0 1 2 3 4
h [0 ]h [1 ]h [2 ]h [3 ]h [ 4 ]
,
Problem M4.6
P4.72:Consider an FIR filter of length 5 with a symmetric impulse response, i.e., An input consisting of a sum of three cosine sequences of angular frequencies: 0.3 rad/samples, 0.4 rad/samples, and 0.7 rad/samples, respectively, is applied to this filter. Determine the impulse response coefficients so that the filter passes only the mid-frequency component of the input.
= = = + =
Problem M4.6
P4.72:Consider an FIR filter of length 5 with a symmetric impulse response, i.e., An input consisting of a sum of three cosine sequences of angular frequencies: 0.3 rad/samples, 0.4 rad/samples, and 0.7 rad/samples, respectively, is applied to this filter. Determine the impulse response coefficients so that the filter passes only the mid-frequency component of the input.
-229.8416
Problem M4.6
P4.72:Consider an FIR filter of length 5 with a symmetric impulse response, i.e., An input consisting of a sum of three cosine sequences of angular frequencies: 0.3 rad/samples, 0.4 rad/samples, and 0.7 rad/samples, respectively, is applied to this filter. Determine the impulse response coefficients so that the filter passes only the mid-frequency component of the input.