Sie sind auf Seite 1von 28

Depatment of Electrical Engineering, SGMCOE

Step responce of Different Transfer Function

(A) Open loop step responce of transfer function G(s)=1/(s2 +10s+20)

MATLAB PROGRAM-

clc;
clear all;
close all;
num=[1];
den=[1 10 20];
step(num,den)
grid

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

(B)Close loop step response of transfer function G(s)=Kp/s2+10s+(20+Kp)


with Kp=300

MATLAB PROGRAM-
clc;

clear all;

close all;

Kp=300;

num=[Kp];

den=[1 10 20+Kp];

t=0:0.01:2;

step(num,den,t)

grid

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

(C)Step response of closed loop transfer function.

G(s)=Kds+Kp/s2+(10+Kd)s+(20+Kp) with Kp=300,Kd=10

MATLAB PROGRAM-
clc;

clear all;

close all;

Kp=300;

Kd=10

num=[Kd Kp];

den=[1 10+Kd 20+Kp];

t=0:0.01:2

step(num,den,t)

grid

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

(D) Closed loop transfer function of

G(s)=Kps+Ki/s3+10s2+(20+Kp)s+Ki with Kp=30,Ki=70

MATLAB PROGRAM-
clc;

clear all;

close all;

Kp=30;

Ki=70O

den=[1 10 20+Kp Ki];

t=0:0.01:2

step(num,den,t)

grid

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Experiment No. 2

Design a Lead Compensator using root locus technique

(A)Unit step response of compensated and uncompensated system.

MATLAB PROGRAM-
clc;

close all;

clear all;

numc=[0 0 18.7 54.23];

denc=[1 7.4 29.5 54.23];

num=[0 0 4];

den=[1 2 4];

t=0:0.05:5

[c1,x1,t]=step(numc,denc,t);

[c2,x2,t]=step(num,den,t);

plot(t,c1,’.’,t,c2,’-‘)

grid

title(‘unit step response for compensated and uncompensated system’)

xlabel(‘t in second’)

ylabel(‘output c1 & c2’)

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Experiment No. 3
Design a Lag Compensator using root locus technique
(A)Unit step response of compensated and uncompensated system.

MATLAB PROGRAM-

clc;

clear all;

close all;

numc=[0 0 0 1.0235 0.0512];

denc=[1 3.005 2.015 1.0335 0.0512];

num=[0 0 0 1.06];

den=[1 3 2 1.06];

t=0:0.1:40;

[c1,x1,t]=step(numc,denc,t);

[c2,x2,t]=step(num,den,t);

plot(t,c1,’.’,t,c2,’-‘)

grid

title(‘using step response of compensated & uncompensated system’)

xlabel(‘time in sec’)

ylabel(‘output c1 &c2’)

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

(B)Unit ramp response of compensated and uncompensated system.

MATLAB PROGRAM-
clc;

close all;

clear all;

numc=[0 0 18.7 54.23];

denc=[1 7.4 29.5 54.23];

num=[0 0 4];

den=[1 2 4];

t=0:0.05:5

[c1,x1,t]=step(numc,denc,t);

[c2,x2,t]=step(num,den,t);

plot(t,c1,’.’,t,c2,’-‘,t,t’--‘)

grid

title(‘unit ramp response for compensated and uncompensated system’)

xlabel(‘t in second’)

ylabel(‘output c1 & c2’)

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

(D)Unit ramp response of compensated and uncompensated


system

MATLAB PROGRAM-
clc;
clear all;
close all;
numc=[0 0 0 1.0235 0.0512];
denc=[1 3.005 2.015 1.0335 0.0512];
num=[0 0 0 1.06];
den=[1 3 2 1.06];
t=0:0.1:40;
[c1,x1,t]=step(numc,denc,t);
[c2,x2,t]=step(num,den,t);
plot(t,c1,'.',t,c2,'-',t,t,'--')
grid
title('Unit ramp response of compensated & uncompensated system')
xlabel('time in sec')
ylabel('output c1 & c2')

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Experiment No. 4
Design a lead compensator using Bode Plot technique
A) Unit step response of compensated and uncompensated
system

MATLAB PROGRAM-
clc;

close all;

clear all;

num=[4];

den=[1 2 4];

numc=[166.8 735.588];

denc=[1 20.4 203.6 735.588];

t=0:0.02:6;

[c1,x1,t]=step(num,den,t);

[c2,x2,t]=step(numc,denc,t);

plot(t,c1,’.’,t,c2,’-‘)

grid

title(‘unit step response for compensated & uncompensated system’);

xlabel(‘time in sec’);

y label(‘o/p c1 & c2’);

text(0.4,1.31,’compensated system’)

text(1.55,0.88,’uncompensated system,)

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

B) Unit ramp response of compensated and uncompensated


system

MATLAB PROGRAM-

clc;

close all;

clear all;

num=[4];

den=[1 2 4 0];

numc=[166.8 735.588];

denc=[1 20.4 203.6 735.588 0];

t=0:0.02:5;

[c1,x1,t]=step(num,den,t);

[c2,x2,t]=step(numc,denc,t);

plot(t,c1,’.’,t,c2,’-‘,t,t,’--‘)

grid

title(‘unit ramp response for compensated & uncompensated system’);

xlabel(‘time in sec’);

y label(‘o/p c1 & c2’);

text(0.89,3.7,’compensated system’)

text(2.55,1.1’uncompensated system,)

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Experiment No. 5
Design a Lag Compensator using Bode Plot technique
A)Unit step response of compensated and uncompensated system

MATLAB PROGRAM-
clc;

close all;

clear all;

num[1];

den=[0.5 1.5 1 1];

numc=[50 5];

denc=[50 150.5 101.5 51 5];

t=0:0.1:40;

[c1,x1,t]=step(num,den,t);

[c2,x2,t]=step(numc,denc,t);

plot(t,c1,’.’t,c2,’-‘)

grid

title(‘unit step response for compensated & uncompensated system’);

xlabel(‘time in sec’);

ylabel(‘o/p c1 & c2’);

text(12.7,1.27,’compensated system’)

text(12.2,0.7,’uncompensated system’)

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

B) Unit ramp response of compensated and uncompensated system.

MATLAB PROGRAM-
clc;
clear all;
close all;
num=[1];
den=[0.5 1.5 1 1 0];
numc=[50 5];
denc=[50 150.5 101.5 51 5 0];
t=0:0.1:20;
[c1,x1,t]=step(num,den,t);
[c2,x2,t]=step(numc,denc,t);
plot(t,c1,'.',t,c2,'-',t,t,'--')
grid
title('unit ramp response for compensated & uncompensated system');
xlabel('time in sec');
ylabel('o/p c1 & c2');
text(8.3,3,'compensated system')
text(8.3,5,'uncompensated system')

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Experiment No. 6
Software program for Transfer Function to state space
conversion
clc;

clear all;

close all;

num=[5 6 8];

den=[1 3 7 9];

[A B C D]=tf2ss(num,den);

P=[0 0 1;0 1 0;1 0 0];%phase variable form%

AP=inv(P)*A*P

BP=inv(P)*B

CP=C*P

DP=D

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Output-

AP =

0 1 0

0 0 1

-9 -7 -3

BP =

CP =

8 6 5

DP =

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Experiment No. 7
(A)Software program to obtain controllability of system.
MATLAB PROGRAM-
clc;
clear all;
close all;
A=[0 1 0;0 0 1;-6 -11 -6]
B=[0;0;1]
C0=ctrb(A,B)
Cr=rank(C0)
Ar=rank(A)
if Cr==Ar
disp('The given system is controllable.')
else
disp('The given system is not controllbale.')
end

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Ouput-
A=
0 1 0
0 0 1
-6 -11 -6
B=
0
0
1
C0 =
0 0 1
0 1 -6
1 -6 25

Cr =
3

Ar =
3

The given system is controllable.

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

(B) Software program to obtain Observability of system

MATLAB PROGRAM-
clc;
clear all;
close all;
A=[0 1 0;0 0 1;-6 -11 -6]
C=[1 0 0]
C0=obsv(A,C)
Cr=rank(C0)
Ar=rank(A)
if Cr==Ar
disp('The given system is observable.')
else
disp('The given system is not observable.')
end

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Output-
A=
0 1 0
0 0 1
-6 -11 -6

C=
1 0 0

C0 =
1 0 0
0 1 0
0 0 1

Cr =
3

Ar =
3

The given system is observable.

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

Experiment No. 8
Determine state feedback gain matrix using Ackerman’s method

MATLAB PROGRAM-

clc;
clear all;
close all;
A=[0 1 0;0 0 1;1 -5 -6];
B=[0;0;1];
J=[-2+j*4;-2-j*4;-10];
K=acker(A,B,J)

Output-

Lab Manual Control System- II


Depatment of Electrical Engineering, SGMCOE

K=

201 55 8

Lab Manual Control System- II

Das könnte Ihnen auch gefallen