Holooly Plus Logo

Question 7.10: Using the DFT to find a system response A set of samples n 0......

Using the DFT to find a system response

A set of samples

\begin{array}{cccccccccccc} n & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ x[n] & -9 & -8 & 6 & 4 & -4 & 9 & -9 & -1 & -2 & 5 & 6 \end{array}

is taken from an experiment and processed by a smoothing filter whose impulse response is h[n] = n(0.7)^n u[n]. Find the filter response y[n].

Step-by-Step
The 'Blue Check Mark' means that this solution was answered by an expert.
Learn more on how do we answer questions.

We can find a DTFT of h[n] in the table. But x[n] is not an identifiable functional form. We could find the transform of x[n] by using the direct formula

\mathrm{X}\left(e^{j \Omega}\right)=\sum_{z=0}^{10} \mathrm{x}[n] e^{-j \Omega n}.

But this is pretty tedious and time-consuming. If the nonzero portion of x[n] were much longer, this would become quite impractical. Instead, we can find the solution numerically using the relation derived above for approximating a DTFT with the DFT

\mathrm{X}\left(e^{j 2 \pi k / N}\right)=\sum_{n=0}^{N-1} \mathrm{x}[n] e^{-j 2 \pi k n / N}.

This problem could also be solved in the time domain using numerical convolution. But there are two reasons why using the DFT might be preferable. First, if the number of points used is an integer power of two, the fft algorithm that is used to implement the DFT on computers is very efficient and may have a significant advantage in a shorter computing time than timedomain convolution. Second, using the DFT method, the time scale for the excitation, impulse response and system response are all the same. That is not true when using numerical timedomain convolution.

The following MATLAB program solves this problem numerically using the DFT.
Figure 7.21 shows the graphs of the excitation, impulse response and system response.

The 'Blue Check Mark' means that either the MATLAB code/script/answer provided in the answer section has been tested by our team of experts; or the answer in general has be fact checked.

Learn more on how do we answer questions.

Script File

% Program to find a discrete-time system response using the DFT
N = 32 ; % Use 32 points
n = [0:N-1]’ ; % Time vector
% Set excitation values
x = [[-9,-8,6,4,-4,9,-9,-1,-2,5,6],zeros(1,21)]’ ;
h = n.*(0.7).^n.*uD(n) ; % Compute impulse response
X = fft(x) ; % DFT of excitation
H = fft(h) ; % DFT of impulse response
Y = X.*H ; % DFT of system response
y = real(ifft(Y)) ; % System response

% Graph the excitation, impulse response and system response
subplot(3,1,1) ;
ptr = stem(n,x,’k’,’filled’) ; set(ptr,’LineWidth’,2,’MarkerSize’,4) ;
grid on ;
xlabel(‘\itn’,’FontName’,’Times’,’FontSize’,24) ;
ylabel(‘x[{\itn}]’,’FontName’,’Times’,’FontSize’,24) ;
set(gca,’FontName’,’Times’,’FontSize’,18) ;
subplot(3,1,2) ;
ptr = stem(n,h,’k’,’filled’) ; set(ptr,’LineWidth’,2,’MarkerSize’,4) ;
grid on ;
xlabel(‘\itn’,’FontName’,’Times’,’FontSize’,24) ;
ylabel(‘h[{\itn}]’,’FontName’,’Times’,’FontSize’,24) ;
set(gca,’FontName’,’Times’,’FontSize’,18) ;
subplot(3,1,3) ;
ptr = stem(n,y,’k’,’filled’) ; set(ptr,’LineWidth’,2,’MarkerSize’,4) ;
grid on ;
xlabel(‘\itn’,’FontName’,’Times’,’FontSize’,24) ;
ylabel(‘y[{\itn}]’,’FontName’,’Times’,’FontSize’,24) ;
set(gca,’FontName’,’Times’,’FontSize’,18) ;

1

Related Answered Questions

Question: 7.6

Verified Answer:

The signal energy of a signal is defined as [latex...