ENGR 6925: Automatic Control Engineering Supplementary Notes On Modelling
ENGR 6925: Automatic Control Engineering Supplementary Notes On Modelling
ENGR 6925: Automatic Control Engineering Supplementary Notes On Modelling
Transfer function
The transfer function of a linear, time invariant differential equation system is defined as the
ratio of the Laplace transform of the output (response function) to the Laplace transform of
the input (driving function) under the assumption that all initial conditions are zero. Consider
following differential equation.
a0 y (n) + a1 y (n1) + + an1 y + an y = b0 x(m) + b1 (m 1) + + bm1 x + bm x
Transfer function
G(s) =
G(s) =
L [output]
L [input]
Y (s)
b0 sm + b1 sm1 + + bm1 s + bm
=
X(s)
a0 sn + a1 sn1 + + an1 s + an
1/m
s(s + b/m)
1/m
s(s + b/m)
The time response can be obtained by taking the inverse Laplace of the above equation. Therefore using Laplace tables, we can find the output time function. Choose 14 from the Laplace
Tables.
1
1/m
x(t) =
1 e(b/m)t =
1 e(b/m)t
b/m
b
As the friction and mass are constants and are positive (b > 0, m > 0) the response will be
stable. When
lim x(t) = 1/b
t
1
1/m
= 2
+k
s + k/m
ms2
To find the inverse, consider #10 in the Laplace table. We can re-arrange the above as to;
#
"
p
( k/m)2
1
p
X(s) =
k s2 + ( k/m)2
k
t
m
System poles
To find the system poles consider the denominator in the system transfer function and make
that to zero.
1/m
1/m
p
p
=
X(s) = 2
s + k/m
(s + j k/m)(s j k/m)
p
p
The system poles are at j k/m and j k/m as shown in the figure.
1
1
k/m
=
2
+ cs + k
k s + (c/m)s + (k/m)
p
k/m
n2
s2 + 2n s + n2
Now consider unit step response where U (s) = 1/s. The output will be given by;
X(s) =
1
n2
2
2
s + 2n s + n s
X(s) =
n2
s(s2 + 2n s + n2 )
1
s + 2n
2
s s + 2n s + n2
s + 2n
1
s (s + n )2 + d2
1
s + n
n
2
2
s (s + n ) + d (s + n )2 + d2
1
s + n
n
d
2
s (s + n )2 + d
d (s + n )2 + d2
p
Using the fact that d = n 1 2 Using inverse tables, we get;
X(s) =
x(t) = 1 en t cos d t p
1 2
en t sin d t
x(t) = 1 en t cos d t + p
sin d t
1 2
en t
x(t) = 1 p
sin (d t + )
1 2
where
1
= tan
p
1 2
Critically Damped Case = 1 In this case the transfer function will be simplified as
X(s) =
n2
s(s + n )2
The poles are real, negative and equal. Therefore the output should be monotonous. The
output using inverse Laplace is;
x(t) = 1 en t (1 + n t)
Overdamped Case > 1 In this case the poles are real, negative and distinct. Transfer
function can be modified to as follows.
X(s) =
X(s) =
n2
s[(s + n )2 n2 ( 2 1)]
n2
p
p
s(s + n + n 2 1)(s + n n 2 1)
To get the inverse Laplace, follow the Laplace transform given in 17, where
1
1
1
at
bt
L
1+
be ae
=
ab
ab
s(s + a)(s + b)
p
p
In this case a = p
n + n 2 1 and b = n n 2 1 ab = 2 n2 n2 ( 2 1) = n2
and a b = 2n 2 1 Therefore;
i
h
p
p
1
2
2
x(t) = 1 + p
( 2 1)e(+ 1)n t ( + 2 1)e( 1)n t
2 2 1
Note: Students are required to draw response curves for each case.
Liquid Level System
Consider the water level system shown in Figure 7. Consider the flow through a pipe and the
restriction or resistance is defined as;
R=
Also assume linear or laminar flow where Q h. Therefore the governing equations are;
Cdh = (qi qo )dt
h
R
dh
+ h = Rqi
dt
change in temperature
change heat flow
R
The heat capacity C = mc where c is the specific heat and m is the mass. The neat heat supply
is (qi qo ) and within dt time the temperature increase will be given by;
qo =
Cd = (qi qo )dt
10
d
+ qo = qi
dt
d
RC + = Rqi
dt
C
1
s(s + 1/T )
1
1 et/T
1/T
11
12
dy
=q
dt
1
dy
p =
K1 x A
K2
dt
A
Thus
dy
K1 x A
dt
Assuming coulomb friction at the sliding surface this force will be the accelerating force for the
mass m. Therefore the force balance for mass will give;
F = m
y + by
Thus
A
m
y + by =
K2
dy
K1 x A
dt
bK2
AK1
A
K1
k2
k1
c
(x y)
+
(x y) +
(x r) = 0
m1
m1
m1
c
k2
k1
k1
(x y)
+
(x y) +
xr =
r
m1
m1
m1
m1
13
c
k2
k1
k1
(X(s) Y (s)) s +
(X(s) Y (s)) +
X(s) =
R(s)
m1
m1
m1
m1
c
k2
(y x)
+
(y x) = 0
m2
m2
k2
s
(Y (s) X(s)) s +
(Y (s) X(s)) = 0
m2
m2
s2 Y (s)
cs
+ mk22
m2
Substituting;
"
s2 Y (s)
cs
+ mk22
m2
#
c
k2
k1
k1
k1
2
s +
+
+
+ s +
Y (s) =
R(s)
m1 m1 m1
m1
m1
2
14
k1 c
m1 m2
c
m2
s3 +
k2
m1
s+
k1
m1
k2
c
k2
m2
s2 +
k1 c
s
m1 m2
k1 k2
m1 m2
Rotating Systems
Consider a motor turning a load with a flexible shaft. The viscous damping at the two ends are
Bm and BL . The motor and load inertia are Jm and JL respectively. The shaft stiffness is K.
We assume there is no other resistance is applied at the load end except the inertia load. The
torque applied by the motor is Tm . While considering equilibrium of two sections, (free body
15
Km (s)
(JL s2 + BL s + K)
K 2 m (s)
(JL s2 + BL s + K)
Therefore;
m (s)
(JL s2 + BL s + K)
=
Tm (s)
Jm JL s4 + (Jm BL + Bm JL )s3 + (KJm + KJL + Bm BL )s2 + K(Bm + BL )s
We can easily show;
K
L (s)
=
4
3
Tm (s)
Jm JL s + (Jm BL + Bm JL )s + (KJm + KJL + Bm BL )s2 + K(Bm + BL )s
Rotating Gear Arrangement
Consider a simple gear arrangement shown in Figure 12. The input torque is T1 ; input angle
1 , total moment of inertia of the rotating elements in the first shaft J1 ; the viscous damping
at the first shaft is b1 . The second shaft rotates freely with no disturbance, thus the output
angle 2 , total moment of inertia of the rotating elements in the second shaft is J2 , the viscous
damping at the second shaft is b2 . The gear wheels have teeth N1 and N2 . Thus from basic
fundamentals
r2
1
N1
1
1
=
=
=
=
r1
2
N2
2
2
where r1 and r2 are the pitch circle radii of the two gear wheels.
As shown in the diagram assume the tangential force at the contact surface of the gear teeth is
16
F . Using the freebody diagrams we can write torque balances for the two shafts.
For the first shaft;
T1 = J1 1 (t) + b1 1 (t) + F r1
For the second shaft;
F r2 = J2 2 (t) + b2 2 (t)
Therefore
1
F = J2 2 (t) + b2 2 (t)
r2
J1 + J2
N1
N2
2 !
1 (t) +
b1 + b2
N1
N2
2 !
1 (t)
N1
N2
2
and
N1
N2
2
N2
N1
2
beq = b1 + b2
N2
N2
J2
b2
and
beq = b1 + 2
2
n
n
If we refer the torque equation to shaft 2 then this becomes,
Jeq = J1 +
0
T10 = Jeq
2 (t) + b0eq 2 (t)
where
0
Jeq
= J2 + J1
N2
N1
2
and
b0eq
= b2 + b1
17
Electrical Systems
LRC circuit
The LRC circuit shown in the figure has an inductance L (henry), a resistance R (ohm), and
capacitance C (farad). Applying basic Kirchhoffs law we obtain the following.
Z
1
di
idt = = ei
L + Ri +
dt
C
Z
1
idt = = eo
C
Using Laplace transforms,
LsI(s) + RI(s) +
11
I(s) = = Ei (s)
Cs
11
I(s) = = Eo (s)
Cs
We can remove I(s) using I(s) = CsEo (s). Then we will get the following.
1
Ls + R = +
CsEo (s) == Ei (s)
Cs
Then
Eo (s)
1
=
2
Ei (s)
LCs + RCs + 1
Complex Impedances
With Laplace transform the same circuit can be conveniently analyzed in the complex domain.
The currents, voltages and impedances can be drawn in the complex form as shown in the figure
below. Here ZR = R, ZL = Ls, and ZC = 1/Cs and the current and voltages are indicated in
the complex s domain. Thus
(ZR + ZL + ZC )I(s) = = Ei (s)
ZC I(s) = = Eo (s)
18
Eo (s)
= Ei (s)
ZC
Eo (s)
ZC
=
Ei (s)
ZR + ZL + ZC
Substituting for complex impedances;
1/Cs
Eo (s)
=
Ei (s)
R + Ls + 1/Cs
Eo (s)
1
=
2
Ei (s)
LCs + RCs + 1
Exercise Find the transfer function of the cascade circuit shown below. Now consider complex
19
Z2 I1 = (Z3 + Z4 )I2
This means;
Z2 I1 = (Z3 + Z4 )(I I1 )
Therefore
Z3 + Z4
I
Z2 + Z3 + Z4
Z3 + Z4
I2 = I I1 = I
I
Z2 + Z3 + Z4
I1 =
Thus;
I2 =
Z2
I
Z2 + Z3 + Z4
Z2 (Z3 + Z4 )
Ei (s) = Z1 I + Z2 I1 = Z1 +
I
Z2 + Z3 + Z4
Z1 (Z2 + Z3 + Z4 ) + Z2 (Z3 + Z4 )
Ei (s) =
I
Z2 + Z3 + Z4
For the output;
Eo (s) = Z4 I2 =
Z2 Z4
I
Z2 + Z3 + Z4
1
1
C1 s C2 s
1
C2 s
1
C1 s
R2 +
1
C2 s
1
Eo (s)
=
2
Ei (s)
R1 C1 R2 C2 s + (R1 C1 + R2 C2 + R1 C2 )s + 1
Operational Amplifiers
Operational amplifiers, or op amps are commonly use in devising analog control systems and
also to amplify and condition signals from sensors. We can write the output as;
20
Z2
1+
Z1
Example
Consider the diagram shown in the following figure. Considering the complex impedance circuit
we can write the transfer function as;
Eo (s)
Z0
=
Ei (s)
Z1
21
Z2 Z3
Z2 + Z3
Therefore substituting;
Z2 Z3
Eo (s)
=
Ei (s)
Z1 (Z2 + Z3 )
Therefore;
1
R2 ( Cs
)
Eo (s)
=
1
Ei (s)
R1 (R2 + Cs
)
R2
Eo (s)
=
Ei (s)
R1 (R2 Cs + 1)
Lead or Lag Network
The circuit shown in Figure 13 is called the lead or lag circuit. The complex impedances are
22
given by;
Z1 =
Therefore
R1
,
R1 C1 s + 1
Z2 =
R2
R2 C2 s + 1
E(s)
Z2
R2 R1 C1 s + 1
=
=
Ei (s)
Z1
R1 R2 C2 s + 1
23
Z2
E(s)
=
Ei (s)
Z1
Where
1
1
1
=
+
Z1
R1 1/C1 s
Z2 = R2 + 1/C2 s
Therefore
Z1 =
R1
,
R1 C1 s + 1
Z2 =
R2 C2 s + 1
C2 s
Thus,
R C s+1
2 2
E(s)
= CR21s
Ei (s)
R1 C1 s+1
E(s)
R2 C2 s + 1
R1 C1 s + 1
=
Ei (s)
C2 s
R1
As,
Eo (s)
R4
=
E(s)
R3
Eo (s) E(s)
Eo (s)
=
Ei (s)
E(s) Ei (s)
R4 R2 C2 s + 1
R1 C1 s + 1
Eo (s)
=
Ei (s)
R3
C2 s
R1
R4
Eo (s)
=
(R2 C2 s + 1) (R1 C1 s + 1)
Ei (s)
R3 R1 C2 s
Expanding;
R4
Eo (s)
=
R1 R2 C1 C2 s2 + (R1 C1 + R2 C2 )s + 1
Ei (s)
R3 R1 C2 s
Further expanding;
Eo (s)
R4 R2 C1
R4 (R1 C1 + R2 C2 )
R4
+
=
s+
Ei (s)
R3
R3 R1 C2
R3 R1 C2 s
This can be rearranged as;
Eo (s)
R4 (R1 C1 + R2 C2 )
R4 1 R4 R2 C1
=
+
+
s
Ei (s)
R3 R1 C2
R3 R1 C2 s
R3
When the PID controller is expressed as;
Eo (s)
Ki
= Kp +
+ Kd s
Ei (s)
s
PROPORTIONAL GAIN
Kp =
R4 (R1 C1 + R2 C2 )
R3 R1 C2
R4
R3 R1 C2
Kd =
R4 R2 C1
R3
DERIVATIVE GAIN
24
Modelling of a DC motor
dia (t)
+ vb (t) = ea (t)
dt
Where Ra and La are the armature resistance and reluctance respectively. Using Laplace transform we get
Ra Ia (s) + La sIa (s) + Vb (s) = Ea (s)
25
The torque developed by the motor is proportional to the armature current; thus
Tm (t) = Kt ia (t)
and using Laplace transform
Tm (s) = Kt Ia (s)
where Kt is called the motor torque constant. Using the above equation we can replace the
current
1
Tm (s)
Ia (s) =
Kt
And replacing
Tm (s)
(Ra + La s)
+ Kb sm (s) = Ea (s)
Kt
Assume the motor is attached to a mechanical rotating system with Jm equivalent inertia and
having bm equivalent viscous damping, then we can write
Tm (t) = Jm m (t) + bm m (t)
Thus
Tm (s) = Jm s2 (s) + bm s(s)
Substituting
1
m (s) + Kb sm (s) = Ea (s)
Kt
Simplifying the above we can write the overall transfer function as;
(Ra + La s) Jm s2 + bm s
Kt
m (s)
=
Ea (s)
s [(La s + Ra )(Jm s + bm ) + Kb Kt ]
In case of speed control problem we need to find the transfer function between angular speed
and voltage input. Thus
dm (t)
m (t) =
dt
m (s) = sm (s)
Thus
m (s)
m (s)
=s
Ea (s)
Ea (s)
Therefore
m (s)
Kt
=
Ea (s)
[(La s + Ra )(Jm s + bm ) + Kb Kt ]
If we assume the armature inductance, La , is small compared to the armature resistance Ra ,
which is usual in a dc motor, then La << Ra the above transfer function becomes;
m (s)
Kt
=
Ea (s)
[Ra (Jm s + bm ) + Kb Kt ]
m (s)
Kt /(Ra Jm )
i
=h
Ea (s)
b
s + J1m (bm + KRt K
)
a
The above is a first-roder equation. Therefore a speed control of a DC motor can be approximately modelled using a first-order model.
26
k 1
Ts + 1 s
27
1
k/m
1
=
2
+ cs + k
k s + (c/m)s + (k/m)
p
k/m
n2
s2 + 2n s + n2
Now consider unit step response where U (s) = 1/s. The output will be given by;
X(s) =
1
n2
2
2
s + 2n s + n s
1 2
1
2
where d = n 1 xi and = tan
The error signal is the difference between
28
en t
sin (d t + )
e(t) = p
1 2
Or this can be expressed as;
n t
e(t) = e
cos d t + p
sin d t
1 2
This error signal exhibits a damped sinusoidal oscillation. At steady state t = , the
error e(t) = 0. When the damping is zero; i.e. = 0,
e(t) = cos n t
for t 0
Referring to the under damped response shown in Figure 1, we can derive some transient
response characteristics such as rise time, peak overshoot, settling time etc.
Rise Time tr : Referring to the diagram, we obtain rise time by letting, x(t) = 1; As
en tr 6= 0
sin d tr = 0
cos d tr + p
1 2
or
p
1 2
tan d tr =
!
p
1 2
By looking at the system poles as shown in Figure 2, this can also be written as;
1
d
1
tr =
tan
=
d
d
It is clear from the diagram that lower damping results higher value for which results
faster rise time.
Peak Time tp :Referring to the diagram again we can find the peak time tp corresponding
to when
dx(t)
=0
dt
That is;
!
!
dx(t)
d
= n en t cos d t + p
sin d t en t d sin d t + p
cos d t
2
dt
1
1 2
29
p
1 2 ; at t = tp ;
dx(t)
n
en tp = 0
= (sin d tp ) p
2
dt t=tp
1
= p
d
n 1 2
p
1 2
Settling timepts : Referring to the diagram we can see the enveloping curve is given by,
1 (en t / 1 2 ). The time constant of this enveloping curve is 1/n or
1
T =p
1 2
Therefore we take
4
n
3
ts = 3T =
n
ts = 4T =
(2% Criterion)
(5% Criterion)
2
1
n
p
p
s + n + n 2 1 s + n + n 2 1 s
1
1
1
2
2
p
p
x(t) = 1 + p
e(+ 1)n t
e( 1)n t
2
2
2
2 1 + 1
1
30
es1 t es2 t
x(t) = 1 + p
s2
2 2 1 s1
n
The two real negative poles adds two decaying functions to the output. If s1 s2 then
the decay dye to the pole s1 will be much faster as compared to the one with s2 . In other
words es1 t es2 t . The system can be approximated to a first-order system.
Critically Damped Case In this case = 1
The system will constitute identical two poles, s1 = s2 = n Output X(s) can be expressed
as;
n2
X(s) =
(s + n )2 s
The inverse Laplace will give;
x(t) = 1 en t (1 + n t)
Example 1
For a second order system = 0.6 and n = 5 rad/s. Then we can obtain;
p
d = n 1 2 = 4, = n = 3
3.14
=
d
4
d
4
= tan1 = 0.93 rad
tr =
3.14 0.93
= 0.55 sec
4
tp =
3.14
=
= 0.785 sec
d
4
Peak time tp : is
Maximum overshoot Mp ;
Mp = e(/d ) = e(3/4)3.14 = 0.095
Therefore the overshoot is 9.5%.
Settling time ts ; For 2% criterion;
ts =
4
4
= = 1.33 sec
31