Wednesday, January 30, 2019

FREQUENCY RESPONSE FUNCTION AND DISCRETE TIME FOURIER TRANSFORM (DTFT)


DIGITAL SIGNALING PROCESSING
FREQUENCY RESPONSE FUNCTION AND DISCRETE TIME FOURIER TRANSFORM (DTFT)
 THEORY:
 Frequency Response Function:-The frequency response function of a discrete time system is found by substituting  z = ejw in the pulse transfer function of the system.
Mathematically,

 The following example demonstrates how MATLAB computes and plots the frequency response function.
 Example 1: Sketch the normalized frequency response function of the system having the pulse transfer function

 Solution:
Write the following MATLAB code.
 num=[1 0.95];
den = [1 –1.8 0.81];
w =- pi : pi/255 : pi % frequency vector
h=freqz(num,den,w); % compute frequency response of the system.
h1 = abs(h); % magnitude response
 h2 = h1/(max(h1)); % normalization
 h3=20*log10(h2); % normalized magnitude shown in dB scale
plot(w,h3)

Discrete Time Fourier Transform (DTFT):
We have already studied the Discrete-Time Fourier Transform (DTFT) in the class. There are several ways to plot DTFT using MATLAB. Consider the following example:
Example 2: Plot the spectrum (DTFT) of the following system:




Solution:
Write the following MATLAB code.
k = 256; % frequency points
num=[ 0.008 -0.033 0.05 -0.033 0.008];
 den=[1 2.37 2.7 1.6 0.41];
w=0:pi/k:pi;
h=freqz(num,den,w);
subplot(221); plot(w/pi,real(h)),
grid ;
title('Real Part')
 xlabel('Normalized angular frequency')
ylabel('Amplitude')
 subplot(222)
plot(w/pi,imag(h));
grid
title('imaginary part')
xlabel('Normalized angular frequency')
 ylabel('Amplitude')
 subplot(223)
plot(w/pi,abs(h)),
grid
title('Magnitude Spectrum')
xlabel('Normalized angular frequency')
ylabel('Magnitude')
subplot(224)
plot(w/pi,angle(h));
grid title('Phase Spectrum')
xlabel('Normalized angular frequency')
ylabel('Phase, radians')

EXERCISE
 Repeat example1 for the following system:



num=[1 1];
den = [1 0.1 -0.2];
w =- pi : pi/255 : pi % frequency vector
h=freqz(num,den,w); % compute frequency response of the system.
h1 = abs(h); % magnitude response
 h2 = h1/(max(h1)); % normalization
 h3=20*log10(h2); % normalized magnitude shown in dB scale
plot(w,h3)



Sketch the magnitude and phase response of the system described by the system function.


k = 256; % frequency points
num=[1];
 den=[1 -0.8];
w=0:pi/k:pi;
h=freqz(num,den,w);
subplot(221); plot(w/pi,real(h)),
grid ;
title('Real Part')
 xlabel('Normalized angular frequency')
ylabel('Amplitude')
 subplot(222)
plot(w/pi,imag(h));
grid
title('imaginary part')
xlabel('Normalized angular frequency')
 ylabel('Amplitude')
 subplot(223)
plot(w/pi,abs(h)),
grid
title('Magnitude Spectrum')
xlabel('Normalized angular frequency')
ylabel('Magnitude')
subplot(224)
plot(w/pi,angle(h));
grid; title('Phase Spectrum')
xlabel('Normalized angular frequency')
ylabel('Phase, radians')



No comments:

Post a Comment