0% found this document useful (0 votes)
58 views20 pages

Lab Manual Biological Control System

Uploaded by

sahildewannehu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views20 pages

Lab Manual Biological Control System

Uploaded by

sahildewannehu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Experiment: 01

AIM: To obtain a transfer function from given poles and Zeros using MATLAB.

Theory: Poles and zeros of a transfer function are the frequencies for which the value of the
denominator and numerator of transfer function becomes zero respectively. Zeros are defined as
the roots of the polynomial of the numerator of a transfer function and poles are defined as the
roots of the denominator of a transfer function. The values of the poles and zeros of a system
determine whether the system is stable, and well the system performs.

Code:

close all;
clear all;
Z = [0];
P = [-1-j -1+j -2];
K = 5;
G = zpk(Z,P,K);
G

Output:

G=

5s

--------------------

(s+2) (s^2 + 2s + 2)

Continuous-time zero/pole/gain model.


Experiment: 02

AIM: Represents s/ (s^2+3s+2) in MATLAB.

Theory:

CODE:

clear all;
close all;
num = [1 0];
den = [1 3 2];
G = tf(num,den);
G

OUTPUT:

G=
s

-------------

s^2 + 3 s + 2

Continuous-time transfer function.

Experiment: 03

AIM: Represents the TF in MATLAB for given values of

Numerator [1 0]

Denominator [1 3 2]

CODE:

clear all;
close all;
num = [1 0];
den = [1 3 2];
G = tf(num,den);
G

OUTPUT:

G=

-------------

s^2 + 3 s + 2

Experiment: 04

AIM: To obtain the time response of a given second order system with its damping frequency .wn=4,
Zeta= 0.5, k = 2, input response=step input.
CODE:

clear all;
close all;
wn= input('freq') %4
zeta= input('damping factor') %0.5
k= input('constant') %2
num= [k*wn^2]
deno= [1 2*zeta*wn wn^2]
g= tf(num, deno)
t= feedback(g,1)
step(t, 'r')

frequency

wn =

damping factor0.5

zeta =

0.5000

constant2

k=

2
num =

32

deno =

1 4 16

OUTPUT:

g=

32

--------------

s^2 + 4 s + 16

Continuous-time transfer function.

t=

32

--------------
s^2 + 4 s + 48

Continuous-time transfer function.


Experiment: 04

AIM: Draw the root locus for the system, whose open loop TF is represented by zeros at -7 at 0, -5, -
15, -20 and has a gain of 1 using MATLAB.

CODE:

clear all;
close all;
sys = zpk([-7],[0,-5,-15,-20],[1])
rlocus(sys);

OUTPUT:

sys =

(s+7)
---------------------

s (s+5) (s+15) (s+20)

Continuous-time zero/pole/gain model.


Experiment: 05

AIM: Obtain the step and impulse response of a transfer function of the given system using MATLAB.
Given numerator [1 30] and Denominator [1 8 15].

CODE:

clc;
clear all;
close all;
mySys2=tf([1 30],[1 8 15])
num= [1 30];
deno= [1 8 15];
G = tf(num,deno);
step(G);

OUTPUT:
mySys2 =

s + 30

--------------

s^2 + 8 s + 15

Continuous-time transfer function.

clc;
clear all;
close all;
mySys2=tf([1 30],[1 8 15])
num= [1 30];
deno= [1 8 15];
G = tf(num,deno);
impulse(G);

OUTPUT:

mySys2 =

s + 30
--------------
s^2 + 8 s + 15

Continuous-time transfer function.

Experiment: 06

AIM: Obtain the step and impulse response of a transfer function of the given system using MATLAB.
Given numerator [16] and denominator [1 1 16].

CODE:
clc;
clear all;
close all;
mySys2=tf([16],[1 1 16])
num= [16];
deno= [1 1 16];
G = tf(num,deno);
step(G);

OUTPUT:

mySys2 =

16

------------

s^2 + s + 16
CODE:

clc;
clear all;
close all;
mySys2=tf([16],[1 1 16])
num= [16];
deno= [1 1 16];
G = tf(num,deno);
impulse(G);

OUTPUT:
Experiment: 07

AIM: Obtain step response for any Type1 system without feedback and again with unity feedback.

CODE:

clear all;
close all;
% type 1 (10/s)
num= [10];
deno= [1 0];

g= tf(num, deno);
subplot(2,2,1);
impulse(g);
subplot(2,2,3);
step(g);

t= feedback(g,1);
subplot(2,2,2);
impulse(t, 'r');
subplot(2,2,4);
step(t,'r');
Experiment: 08

AIM: Obtain step response for any Type2 system without feedback and again with unity feedback.

CODE:

% Type 2 (10/s^2)
figure;
num= [10];
deno=[1 0 0];
g= tf(num, deno);
subplot(2,2,1);
impulse(g);
subplot(2,2,3);
step(g);

t= feedback(g,1);
subplot(2,2,2);
impulse(t, 'r');
subplot(2,2,4);
step(t,'r');

Output:
Experiment: 07

AIM: Obtain step response for any Type3 system without feedback and again with unity feedback.

CODE:

% Type 3 (10/s^3

figure;
num= [10];
deno=[1 0 0 0];
g= tf(num, deno);
subplot(2,2,1);
impulse(g);
subplot(2,2,3);
step(g);

t= feedback(g,1);
subplot(2,2,2);
impulse(t, 'r');
subplot(2,2,4);
step(t,'r');

OUTPUT:

You might also like