System response using the DTFT and the DFT
A system with frequency response H(e^{jΩ})=\frac{e^{jΩ}}{e^{jΩ}-0.7 } is excited by x[n] = tri((n – 8)/8). Find the system response.
The DTFT of the excitation is X(e^{jΩ}) = 8drcl² (Ω/2\pi ,8)e^{-j8Ω}. So the DTFT of the response is
\mathrm{Y}\left(e^{j \Omega}\right)=\frac{e^{j \Omega}}{e^{j \Omega}-0.7} \times 8 \operatorname{drcl}^2(\Omega / 2 \pi, 8) e^{-j8\Omega}.
Here we have a problem. How do we find the inverse DTFT of Y(e^{jΩ})? For an analytical solution it would probably be easier in this case to do the convolution in the time domain than to use transforms. But there is another way. We could use the inverse DFT to approximate the inverse DTFT and fi nd Y(e^{jΩ}) numerically.
When we compute the inverse DFT, the number of values of y[n] will be the same as the number of values of Y(e^{j2πk /N} ) we use, N. To make this a good approximation we need a value of N large enough to cover the time range over which we expect y[n] to have values significantly different from zero. The triangle signal has a full base width of 16 and the impulse response of the system is (0.7)^n u[n] . This is a decaying exponential, which approaches, but never reaches, zero. If we use the width at which its value goes below 1% of its initial value, we get a width of about 13. Since the convolution will be the sum of those two widths minus one, we need an N of at least 28. Also, remember that the approximation relies on the inequality n << N for a good approximation. So let’s use N = 128 in doing the computations and then use only the first 30 values. Below is a MATLAB program to fi nd this inverse DTFT. Following that are the three graphs produced by the program (Figure 7.20) .
% Program to find an inverse DTFT using the inverse DFT
N = 128 ; % Number of points to use
k = [0:N-1]’ ; % Vector of harmonic numbers
n = k ; % Vector of discrete times
x = tri((n-8)/8) ; % Vector of excitation signal values
% Compute the DTFT of the excitation
X = 8*drcl(k/N,8).^2.*exp(-j*16*pi*k/N) ;
% Compute the frequency response of the system
H = exp(j*2*pi*k/N)./(exp(j*2*pi*k/N) - 0.7) ;
h = 0.7.^n.*uD(n) ; % Vector of impulse response values
Y = H.*X ; % Compute the DTFT of the response
y = real(ifft(Y)) ; n = k ; % Vector of system response
values
% Graph the excitation, impulse response and response
n = n(1:30) ; x = x(1:30) ; h = h(1:30) ; y = y(1:30) ;
subplot(3,1,1) ;
ptr = stem(n,x,’k’,’filled’) ; grid on ;
set(ptr,’LineWidth’,2,’MarkerSize’,4) ;
% xlabel(‘\itn’,’FontSize’,24,’FontName’,’Times’) ;
ylabel(‘x[{\itn}]’,’FontSize’,24,’FontName’,’Times’) ;
title(‘Excitation’,’FontSize’,24,’FontName’,’Times’) ;
set(gca,’FontSize’,18,’FontName’,’Times’) ;
subplot(3,1,2) ;
ptr = stem(n,h,’k’,’filled’) ; grid on ;
set(ptr,’LineWidth’,2,’MarkerSize’,4) ;
% xlabel(‘\itn’,’FontSize’,24,’FontName’,’Times’) ;
ylabel(‘h[{\itn}]’,’FontSize’,24,’FontName’,’Times’) ;
title(‘Impulse Response’,’FontSize’,24,’FontName’,’Times’) ;
set(gca,’FontSize’,18,’FontName’,’Times’) ;
subplot(3,1,3) ;
ptr = stem(n,y,’k’,’filled’) ; grid on ;
set(ptr,’LineWidth’,2,’MarkerSize’,4) ;
xlabel(‘\itn’,’FontSize’,24,’FontName’,’Times’) ;
ylabel(‘y[{\itn}]’,’FontSize’,24,’FontName’,’Times’) ;
title(‘System Response’,’FontSize’,24,’FontName’,’Times’) ;
set(gca,’FontSize’,18,’FontName’,’Times’) ;