You are on page 1of 3

Ubaid Khan Reg No: 14ABELT0594 DOB 03-06-1996 Department of Electronics Engineering

TITLE: PLOTTING THE FREQUENCY RESPONSE IN MATLAB


 Bode Plot
 Nyquist or Polar Plot

TASK#1:Step the magnitude plot from -30db to +30db and phase (degrees) grom -180 to +180.

TASK#2: Set the values of w from 0.1 to 100.

TASK#3: Design root locus, bode plot and nyquist plot for the same system in program.

TASK#1:

MATLAB CODE: OUTPUT:

closeall
clearall
num=[25];
den=[1 4 25];
f=tf(num,den);
w=logspace(-0.708,1.41)
bode(f,w)
grid
title('open loop frequency
responce')

MATLAB CODE: OUTPUT:

closeall
clearall
num=[9 1.8 9];
den=[1 1.2 9 0];
f=tf(num,den);
w=logspace(-0.708,1.41)
bode(f,w)
grid
title('open loop frequency
responce')
TASK#2:

MATLAB CODE: OUTPUT:

closeall
clearall
num=[25];
den=[1 4 25];
f=tf(num,den);
w=0.1:0.1:100;
nyquist(f,w)
grid
title('open loop frequency
responce')

MATLAB CODE: OUTPUT:

closeall
clearall
num=[9 1.8 9];
den=[1 1.2 9 0];
f=tf(num,den);
w=0.1:0.1:100;
nyquist(f,w)
grid
title('open loop frequency
responce')

TASK#3
MATLAB CODE: OUTPUT:
closeall
clearall
num=[25];
den=[1 4 25];
f=tf(num,den)
w=logspace(-0.708,1.41)
bode(f,w);
nyquist(f,w)
v=[-3 1 -2 2]
axis(v)
grid
title('open loop frequency
responce')

MATLAB CODE: OUTPUT:


closeall
clearall
num=[9 1.8 9];
den=[1 1.2 9 0];
f=tf(num,den)
w=logspace(-0.708,1.41)
bode(f,w);
nyquist(f,w)
v=[-3 1 -2 2]
axis(v)
grid
title('open loop frequency
responce')

You might also like