Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical reliability and stability properties
Aim: To Unit Step And Sinusoidal Response Of The Given LTI System And Verifying Its Physical Realizability And Stability Properties.
EQUIPMENT:
PC with windows (95/98/XP/NT/2000).
MATLAB Software
Theory:
A discrete time system performs an operation on an input signal based on predefined criteria to produce a modified output signal. The input signal x(n) is the system excitation, and y(n) is the system response. The transform operation is shown as,
If the input to the system is unit impulse i.e. x(n) = d(n) then the output of the system is known as impulse response denoted by h(n) where,
h(n) = T[d(n)]
we know that any arbitrary sequence x(n) can be represented as a weighted sum of discrete impulses. Now the system response is given by,
For linear system (1) reduces to
%given difference equation y(n)y(n1)+.9y(n2)=x(n);
Program  1: Calculate and plot the impulse response and step response
b=[1];
a=[1,1,.9];
x=impseq(0,20,120);
n = [20:120];
h=filter(b,a,x);
subplot(3,1,1);stem(n,h);
title('impulse response');
xlabel('n');ylabel('h(n)');
stepseq(0,20,120);
s=filter(b,a,x);
s=filter(b,a,x);
subplot(3,1,2);
stem(n,s);
title('step response');
xlabel('n');ylabel('s(n)')
t=0:0.1:2*pi;
x1=sin(t);
%impseq(0,20,120);
n = [20:120];
h=filter(b,a,x1);
subplot(3,1,3);stem(h);
title('sin response');
xlabel('n');ylabel('h(n)');
figure;
zplane(b,a);
Output
Program  2: Computation of Unit Sample response :
%This program finds the unit sample response of the given discrete system
a=input('enter the coefficient vector of input starting from the coefficient of x(n) term')
b=input('enter the coefficient vector of output starting from the coefficient of y(n) term')
n1=input('enter the lower limit of the range of impulse response')
n2=input('enter the upper limit of the range of impulse response')
n=[n1:n2];
x=zeros(1,length(n));
i=find(n==0);
x(i)=1;
h=filter(a,b,x);
stem(n,h)
xlabel('time')
ylabel('amplitude')
grid
title('Unit Sample response of the given discrete system y(n)y(n1)+0.9y(n2)=x(n)')
RESULT:
enter the coefficient vector of input starting from the coefficient of x(n) term 1
a = 1
enter the coefficient vector of output starting from the coefficient of y(n) term [1 1 0.9]
b = 1.0000 1.0000 0.9000
enter the lower limit of the range of impulse response50
n1 = 50
enter the upper limit of the range of impulse response50
n2 = 50
Output:
Program  3: Computation of Unit Step response
%This program finds the unit step response of the given discrete system
a=input('enter the coefficient vector of input starting from the coefficient of x(n) term')
b=input('enter the coefficient vector of output starting from the coefficient of y(n) term')
n1=input('enter the lower limit of the range of impulse response')
n2=input('enter the upper limit of the range of impulse response')
n=[n1:n2];
x=zeros(1,length(n));
i=find(n==0);
x(i:length(x))=1;
h=filter(a,b,x);
stem(n,h)
xlabel('time')
ylabel('amplitude')
grid
title('Unit Step response of the given discrete system y(n)y(n1)+0.9y(n2)=x(n)')
RESULT:
enter the coefficient vector of input starting from the coefficient of x(n) term 1
a = 1
enter the coefficient vector of output starting from the coefficient of y(n) term [1 1 0.9]
b = 1.0000 1.0000 0.9000
enter the lower limit of the range of impulse response50
n1 = 50
enter the upper limit of the range of impulse response50
n2 = 50
Output:
Program  4: Computation of Sinusoidal response
%This program finds the Sinusoidal response of the given discrete system
a=input('enter the coefficient vector of input starting from the coefficient of x(n) term')
b=input('enter the coefficient vector of output starting from the coefficient of y(n) term')
f=input('enter the sampling frequency')
T=1/f;
t=0:T/f:T;
x=sin(2*pi*f*t);
h=filter(a,b,x);
subplot(2,1,1)
stem(t,x)
xlabel('time')
ylabel('amplitude')
grid
title('Sinusoidal input(f=50) for the discrete system y(n)y(n1)+0.9y(n2)=x(n)')
subplot(2,1,2)
stem(t,h)
xlabel('time')
ylabel('amplitude')
grid
title('Sinusoidal(f=50) response of the discrete system y(n)y(n1)+0.9y(n2)=x(n)')
RESULT:
enter the coefficient vector of input starting from the coefficient of x(n) term 1
a = 1
enter the coefficient vector of output starting from the coefficient of y(n) term [1 1 0.9]
b = 1.0000 1.0000 0.9000
enter the sampling frequency100
f = 100
Output:
VERIFYING ITS PHYSICAL RELIABILITY AND STABILITY PROPERTIES:
a=input('enter the coefficients of numerator in the order of decreasing order of the variable z')
b=input('enter the coefficients of denominator in the order of decreasing order of the variable z')
p=roots(a);
q=roots(b);
i=find(abs(q)<1);
R1=input('enter the lower bound of ROC')
R2=input('enter the upper bound of ROC')
if length(p)<=length(q) & R2==inf
disp('The system is causal')
else
disp('The system is not causal')
end
if R1<1&R2>1  length(i)==length(q)
disp('The system is stable')
else
disp('The system is unstable')
end
OUTPUT:
1.H(z)=z/(3z24z+1) ROC z>1
enter the coefficients of numerator in the order of decreasing order of the variable z
a =1 0
enter the coefficients of denominator in the order of decreasing order of the variable z
b=3 4 1
enter the lower bound of ROC
R1 =1
enter the upper bound of ROC
R2 =Inf
The system is causal. The system is unstable
2.H(z)=z/(3z24z+1) ROC 1/3<z<1
enter the coefficients of numerator in the order of decreasing order of the variable z
a =1 0
enter the coefficients of denominator in the order of decreasing order of the variable z
b=3 4 1
enter the lower bound of ROC
R1 =1/3
enter the upper bound of ROC
R2 =1
The system is not causal. The system is unstable
3.H(z)= (z21.5z)/[z2(5/6)z+1/6] ROC z>0.5
enter the coefficients of numerator in the order of decreasing order of the variable z
a =1.0000 1.5000 0
enter the coefficients of denominator in the order of decreasing order of the variable z
b =1.0000 0.8333 0.1667
enter the lower bound of ROC
R1 =0.5000
enter the upper bound of ROC
R2 =inf.
The system is causal. The system is stable
4.H(z)= (z21.5z)/(z2(5/6)z+1/6) ROC 1/3< z<0.5
enter the coefficients of numerator in the order of decreasing order of the variable z
a =1.0000 1.5000 0
enter the coefficients of denominator in the order of decreasing order of the variable z
b =1.0000 0.8333 0.1667
enter the lower bound of ROC
R1 =1/3
enter the upper bound of ROC
R2 =0.5.
The system is not causal. The system is stable
LOCATING THE POLES AND ZEROS IN SPLANE AND ZPLANE:
Ztransforms
The Ztransform converts a discrete timedomain signal, which is a sequence of real or complex numbers, into a complex frequencydomain representation.The Ztransform, like many other integral transforms, can be defined as either a onesided or twosided transform.
Bilateral Ztransform
The bilateral or twosided Ztransform of a discretetime signal x[n] is the function X(z) defined as
Unilateral Ztransform
Alternatively, in cases where x[n] is defined only for n = 0, the singlesided or unilateral Ztransform is defined as
In signal processing, this definition is used when the signal is causal.
The roots of the equation P(z) = 0 correspond to the 'zeros' of X(z)
The roots of the equation Q(z) = 0 correspond to the 'poles' of X(z)
The ROC of the Ztransform depends on the convergence
PROGRAM: ZEROS AND POLES IN S PLANE
clc;
clear all;
close all;
num=input('enter the numerator polynomial vector\n'); % [1 2 1]
den=input('enter the denominator polynomial vector\n'); % [1 6 11 6]
H=tf(num,den)
[p z]=pzmap(H);
disp('zeros are at ');
disp(z);
disp('poles are at ');
disp(p);
pzmap(H);
if max(real(p))>=0
disp(' All the poles do not lie in the left half of Splane ');
disp(' the given LTI systen is not a stable system ');
else
disp('All the poles lie in the left half of Splane ');
disp(' the given LTI systen is a stable system ');
end;
OUTPUT:
Enter the numerator polynomial vector
[1 2 1]
Enter the denominator polynomial vector
[1 6 11 6]
Transfer function:
s^2  2 s + 1

s^3 + 6 s^2 + 11 s + 6
Zeros are at
1
1
Poles are at
3.0000
2.0000
1.0000
All the poles lie in the left half of Splane
The given LTI system is a stable system
Result: In this experiment computation of unit sample, unit step and sinusoidal response of the given lti system and verifying its physical reliability and stability properties Using MATLAB.
Viva Questions:
1. What is Even Signal
Ans: If x(t)= x(t) then x(t) is Even signal.
2. What is Odd Signal
Ans: If x(t)= x(t) then x(t) is Odd signal.
3. State the difference between a Signal and Sequence?
Ans: Signal is a function varies with time, sequence consisting of number samples.
4. What is Static and Dynamic System
Ans: Dynamic system output constantly changing and dynamic system carry past and present inputs to get output,
Static system carry only present input to generate output

CreatedDec 09, 2019

UpdatedMar 01, 2020

Views1,479
Basic operations on Matrices
Sampling theorem verification
Computation of unit sample, unit step and sinusoidal response of the given LTI system and verifying its physical reliability and stability properties
Finding the even and odd parts of signal/sequence and real and imaginary parts of signal
Auto correlation and cross correlation between signals and sequences
Genaration of various signals and sequences