You are on page 1of 7

COMSATS-Lancaster Dual Degree

Programme

Names:-Ali Nawaz Ranjha

Registeration # DDP-FA10-BTE-008

Control Systems Lab

Lab Session 4 :EXERCISE 1:


Apply block diagram reduction techniques on model below to show that its
complete transfer function is
X(s)/R(s)=1/200s2+25s+10

Attach MATLAB code with your report.

EXERCISE 2:
An electrical RC-circuit is the simplest example of a first order system. It
comprises of a resistor and capacitor connected in series to a voltage supply
as shown below. If R=2.2kohms and C=2.2 microfarad and we apply a DC
voltage source of 8V, verify that capacitors charging curve follows the
following proportions

Vc(1Tau)=5.0400V
Vc(2Tau)=6.9048V
Vc(3Tau)=7.5948V
Vc(4Tau)=7.8501V
Vc(5Tau)=7.9445V

Q1(ans.):Matlab code:%---------------------------% Question#1


%---------------------------% Using builtin command
G1=1/200;
num1=[1];
den1=[1 0 ];
G2=tf(num1,den1);
sys1=series(G1,G2)
H1=25;
sys2=feedback(sys1,H1)
num2=[1];
den2=[1 0];
G3=tf(num2,den2);
sys3=series(sys2,G3)
H2=10;
sys4=feedback(sys3,H2)*200/200

Results:Transfer function:
0.005
----s

Transfer function:
0.005
--------s + 0.125

Transfer function:
0.005
-------------

s^2 + 0.125 s

Transfer function:
1
------------------200 s^2 + 25 s + 10
which is in time domain

Q2(ans.):-

Matlab code:%---------------------------% Question#2


%---------------------------R=2200;
C=.0000022;
num=[1];
den=[R.*C 1];
sys=tf(num,den)
t=0:0.00001:.025;
x=8.*heaviside(t);
lsim(sys,x,t)
grid on

Results:Linear Simulation Results


8
System: sys
Time (seconds): 0.0233
Amplitude: 7.94

System: sys
System: sys
Time (seconds): 0.00962
Time (seconds): 0.00481
Amplitude: 6.9
Amplitude: 5.04

Amplitude

0.005

0.01

0.015

Time (seconds)

Q3(ans.):-

Matlab code:%---------------------------% Question#3


%---------------------------wn=1;
zeta1=0.1
num1=[wn];
den1=[1 2.*zeta1.*wn wn.^2];
sys1=tf(num1,den1)
subplot(3,2,1)
step(sys1)
stepinfo(sys1)
grid on
zeta2=0.4
num2=[wn];
den2=[1 2.*zeta2.*wn wn.^2];

0.02

0.025

sys2=tf(num2,den2)
subplot(3,2,2)
step(sys2)
stepinfo(sys2)
grid on
zeta3=0.7
num3=[wn];
den3=[1 2.*zeta3.*wn wn.^2];
sys3=tf(num3,den3)
subplot(3,2,3)
step(sys3)
stepinfo(sys3)
grid on
zeta4=1
num4=[wn];
den4=[1 2.*zeta4.*wn wn.^2];
sys4=tf(num4,den4)
subplot(3,2,4)
step(sys4)
stepinfo(sys4)
grid on
zeta5=0.4
num5=[wn];
den5=[1 2.*zeta5.*wn wn.^2];
sys5=tf(num5,den5)
subplot(3,2,5)
step(sys5)
stepinfo(sys5)
grid on

Results:-

Step Response

Step Response
2
Amplitude

Amplitude

2
1
0

20

40

1
0

60

Time (seconds)
Step Response

Amplitude

10

Time (seconds)

4
Time (seconds)

0.5
0

10

Time (seconds)
Step Response

15

1
Amplitude

Amplitude

10

Time (seconds)
Step Response

15

You might also like