Student Seminar Report & Project Report With Presentation (PPT,PDF,DOC,ZIP)

Full Version: IMPULSE RESPONSE OF THE GIVEN SYSTEM
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Procedure:-
1. Rewrite the difference equation so that y[n] and its delayed samples are on the LHS
2. Create a matrix a for the coefficients of y[n] and its delayed versions
3. Create a matrix b for the coefficients of x[n] and its delayed versions
4. Generate impulse excitation signal delta [n]
5. Find the response h[n] of the filter defined by a & b coefficients , so the input impulse excitation , using filter command
6. Display the impulse response h[n].
MATLAB program for impulse response
Code:
clear
close all
clc
%SOLVE THE GIVEN DIFFERENCE EQUATION Y(N) - 0.9Y(N-1) = X(N)
% FIND THE TRANSFER FUNCTION OF THE GIVEN DIFFERENCE EQUATION  H(Z) = Y(Z)/X(Z)
% NUMERATOR POLYNOMIAL IS 'A' AND DENOMINATOR POLYNOMIAL IS 'B'
% FOR THE ABOVE EXAMPLE B = [1] AND A = [ 1 -0.9 ]
b = [1];
a = [1 -0.9];
% H(N) IS REQUIRED FOR N = -5,-4…10,20
% SO GENERATE IMPULSE SEQUENCE OF THE ABOVE LENGTH
% N - TIME INDEX
n = [-5:20];
% X IS THE IMPULSE SEQUENCE
x = [(n == 0)];
% FIND THE OUTPUT OF THE SYSTEM FOR THE IMPULSE SEQUENCE WHICH IS THE
% IMPULSE RESPONSE
%h = impz(b,a)
h = filter(b,a,x);

% PLOT THE INPUT AND THE OUTPUT

subplot(2,1,1);
stem(n,x);
xlabel('Time index n');
ylabel('Amplitude');
title('Impulse Sequence');
grid on;


subplot(2,1,2);
stem(n,h);
xlabel('Time Index n');
ylabel('Amplitude');
title('Impulse Response');
grid on;

RESULT:-IMPULSE RESPONSE OF THE GIVEN SYSTEM