First Order System
First Order System
Objectives:
The objectives of this experiment are to:
1. Describe quantitatively the transient response of first
order systems.
2. See the effect of the gain and time constant on the
transient response and steady state error.
Time Response:
(a) (b)
Figure 5.2: First order system lag: (a) RC lag circuit, (b) output step
response.
(a)
(b)
Figure 5.3: First order system lead: (a) RC lead circuit, (b) output step
response.
Example 5.1: Consider a first order system has the closed
loop transfer function with the unity feedback:
Y (s ) 1
=
R ( s ) τ s+1
Solution:
Step Response
1
=1
0.9
=3
0.8
=5
0.7
0.6
Amplitude
0.5
0.4
0.3
0.2
0.1
0
0 5 10 15 20 25 30
Time (sec)
tau=[1 3 5];
hold on
for i=1:3
T=1/(tau(i)*s+1)
t=0:0.01:30;
r=t;
lsim(T,r,t)
end
gtext('Input')
gtext('\tau=1')
gtext('\tau=3')
gtext('\tau=5')
=1
25
20
Input =3
Amplitude
15
=5
10
0
0 5 10 15 20 25 30
Time (sec)
Error [step
Ts¿
input]
0 0 0
Error [ramp
1 3 5
input]
For closed loop system, a float level sensor and valve may
be used. The valve is controlled so that a reduction in the
flow rate ∆ Q1, is a proportional to an increase in head H . The
block diagram of the system shown in Figure 5.6 (b). Do the
following:
1. Write a MATLAB program to obtain the closed loop step
response of the system for K=2, 4, and 10. Assuming:
C=1 m2 and R=0.5 sec/m2.
(a)
(b)
Figure 5.6: Tank level system: (a) schematic diagram, (b) block
diagram.
Solution:
% 1. To obtain the closed loop step response for K=2,4, and 10 %
s=tf('s');
R=0.5;C=1;
K=[2 4 10];
hold on
for i=1:3
G=K(i)*R/(R*C*s+1);
T=feedback(G,1)
step(T)
xlabel('Time')
ylabel('Height')
title('Step Response')
end
gtext('K=2')
gtext('K=4')
gtext('K=10')
Step Response
0.9
0.8
K=10
0.7
K=4
0.6
0.5
Height
K=2
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
Time (sec)
Time Constant (
τ)
0.25 sec 0.167 sec 0.0831sec
Do the following:
Solution:
% 1. To obtain step response of the RC network for R=1KΩ,5KΩ,10KΩ,
and C=1µf %
s=tf('s');
C=1*10^-6;
R=[1*10^3 5*10^3 10*10^3];
hold on
for i=1:3
T=1/(1+R(i)*C*s);
step(T)
end
gtext('R=1K ohm')
gtext('R=5K ohm')
gtext('R=10K ohm')
Step Response
R=1K ohm
R=5K ohm
0.8
R=10K ohm
Amplitude
0.6
0.4
0.2
0
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
Time (sec)
τ)
Rise Time ( T r ¿
Settling Time (
2.2 msec 11msec 22 msec
voltage?