You are on page 1of 7

05/09/2022 R Meghana

20BEC1042

EXPERIMENT 5
STABILITY ANALYSIS OF SYSTEM AND
CIRCULAR CONVOLUTION

Aim:
 Find z-transform of x(n) = 2n u(n)
 Plot the pole-zero pattern to find the stability
 Find circular convolution with and without using built-in functions
 Plot the pole-zero plot of
Y ( Z) 1+ z −1
=
H(Z) = X ( Z ) 3 −1 1 −2
1+ z + z
4 8

Software Required: MATLAB

Program code:
clc
close all
clear all
%z-transform
syms z n a;
x=2^n;
fprintf('Z-Transform is:')
X=ztrans(x) %z-transform
fprintf('Inverse z-transform is:')
inv=iztrans(X) %inverse z transform

%Pole-zero plot
num1=input('Enter the numerator coeff:')
den1=input('Enter the denominator coeff:')
figure(1)
subplot(2,2,1)
zplane(num1,den1)
title('Stable','fontsize',12, 'fontweight', 'bold')

num2=input('Enter the numerator coeff:')


den2=input('Enter the denominator coeff:')

ECE2006-Digital Signal Processing Lab


L31+L32
05/09/2022 R Meghana
20BEC1042

subplot(2,2,2)
zplane(num2,den2)
title('Unstable','fontsize',12, 'fontweight', 'bold')

%Circular convolution using built-in func


x=input('Enter the first signal')
h=input('Enter the second signal')
c=cconv(x,h,4);
display(c)
figure(2)
subplot(2,1,1)
stem(c,'color','r','LineWidth',2)
grid on
xlabel('n','fontsize',10, 'fontweight', 'bold')
ylabel('Amplitude','fontsize',10, 'fontweight', 'bold')
title('Circular convolution using built-in
function','fontsize',12, 'fontweight', 'bold')

%Circular convolution without using built-in func


n1=length(x);
n2=length(h);
n=max(n1,n2);
a=1:n;
X=[x,zeros(1,n-n1)];
H=[h,zeros(1,n-n2)];
y=zeros(1,n);
for i=0:n-1
for j=0:n-1
k=mod((i-j),n);
y(i+1)=y(i+1)+X(j+1)*H(k+1);
end
end
display(y)
subplot(2,1,2)
stem(a,y,'color','b','LineWidth',2)
grid on
xlabel('n','fontsize',10, 'fontweight', 'bold')
ylabel('Amplitude','fontsize',10, 'fontweight', 'bold')
title('Circular convolution without using built-in
function','fontsize',12, 'fontweight', 'bold')

%Pole-zero of given fn

ECE2006-Digital Signal Processing Lab


L31+L32
05/09/2022 R Meghana
20BEC1042

num1=input('Enter the numerator coeff:')


den1=input('Enter the denominator coeff:')
figure(3)
zplane(num1,den1)
title('Stable','fontsize',12, 'fontweight', 'bold')

Simulation output:

ECE2006-Digital Signal Processing Lab


L31+L32
05/09/2022 R Meghana
20BEC1042

ECE2006-Digital Signal Processing Lab


L31+L32
05/09/2022 R Meghana
20BEC1042

Y ( Z) 1+ z −1
=
For H(Z) = X ( Z ) 3 −1 1 −2
1+ z + z
4 8

Result: We have thus performed the stability analysis for systems using z-
transform and computed circular convolution. Also, the theoretical calculations
match the simulated output.

Output verification:

ECE2006-Digital Signal Processing Lab


L31+L32
05/09/2022 R Meghana
20BEC1042

ECE2006-Digital Signal Processing Lab


L31+L32
05/09/2022 R Meghana
20BEC1042

ECE2006-Digital Signal Processing Lab


L31+L32

You might also like