You are on page 1of 31

ENGR 6925: Automatic Control Engineering

Supplementary Notes on Modelling


Dr. George Mann,
Faculty of Engineering and Applied Science
Memorial University of Newfoundland
Fall 2009

Mathematical modelling of dynamic systems


Dynamic modelling is an important part when designing control systems. The dynamic model
of a system is analyzed to understand how it can response under different input conditions. The
system behaviour of a dynamical system is essential in designing a control system. In general
a dynamic system can be described using differential equations. Generally those equations are
derived sing physical characteristics of the system. Most of systems we assume causality where
we assume the response of a system does not depend on any future inputs and only depends on
its past and current inputs.
In this section we will examine several types of dynamical systems and the objective is to
determine the transfer function of the system model.

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

ENGR6925: Automatic Control Engineering, Fall 2009

Mass on a frictional surface


As shown in Figure 1 consider a mass m is sliding along a frictional surface. The frictional force
is proportional to the speed and the free body diagram with the inertia force in is shown in the
figure. The external force is u. Using the force balance;
m
x + bx = u
Now we transform this into Laplace domain and assume zero initial conditions.

Figure 1: Load moving on a frictional surface


ms2 X(s) + bsX(s) = U (s)
We can show now;
X(s)
1
=
U (s)
ms2 + bs
The transfer function
G(s) =

1/m
s(s + b/m)

Consider unit-impulse input. In this case U (s) = 1 and


X(s) =

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

The response is as shown in the figure below.


System Poles
Consider the system poles, i.e. the s values when denominator is zero. s(s + b/m) = 0 and
s = 0. Therefore when the system poles are real and negative or zero the system response
will be stable and has monotonically increasing output as shown in Figure below.

ENGR6925: Automatic Control Engineering, Fall 2009

Figure 2: Impulse response of the load moving on a frictional surface

Figure 3: Oscillating mass on a spring


Oscillating Mass on a spring
As shown in Figure 3, the mass attached to the spring oscillates and consider the free body
diagram shown in the figure. The force balance will yield the following.
m
x + kx = u
Using Laplace transform and assuming zero initial conditions;
ms2 X(s) + kX(s) = U (s)
The transfer function is;
1
X(s)
=
2
U (s)
ms + k
Consider unit impulse input, then U (s) = 1 the system response will be;
X(s) =

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

ENGR6925: Automatic Control Engineering, Fall 2009


Therefore
1
x(t) = sin
k

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.

Figure 4: System poles of the oscillating mass

Inverted Pendulum Problem


Consider the diagram shown in Figure 5 where an inverted pendulum is hinged on a cart which
can roll on a frictionless surface. The free-body diagram for the forces are also shown. By

Figure 5: Inverted Pendulum


consider the whole system resolve forces in horizontal direction.
m
x + M x + ml cos ml2 sin = u

ENGR6925: Automatic Control Engineering, Fall 2009

For small , sin = and cos = 1


m
x + M x + ml ml2 = u
Assuming small velocities, we can neglect the higher order terms and rewrite above as;
m
x + M x + ml = u
Take the moments for the pendulum about P.
+ m
(ml)l
xl cos mg(l sin ) = 0
For small the above will simplify to;
l + x g = 0
Taking Laplace transform we get;
ms2 X(s) + M s2 X(s) + mls2 (s) = U (s)
ls2 (s) + s2 X(s) g(s) = 0
We can now eliminate X(s) and
s2 X(s) = (g ls2 )(s)
Also we know
(m + M )s2 X(s) + mls2 (s) = U (s)
Substituting;
(m + M )(g ls2 )(s)) + mls2 (s) = U (s)

(m + M )(g ls2 ) + mls2 (s) = U (s)

(m + M )g M ls2 (s) = U (s)
(s)
1
=
U (s)
(m + M )g M ls2
(s)
1
1
=
U (s)
M l (1 + m/M )g/l s2
(s)
1
1
p
p
=
U (s)
M l ( (1 + m/M )g/l s)( (1 + m/M )g/l + s)
p
The system poles are s = (1 + m/M )g/l and are real. There is a positive pole in the
s-plane and that will make this system unstable.

ENGR6925: Automatic Control Engineering, Fall 2009

Figure 6: Second Order System


Second Order Problem
Consider the second order system shown in the diagram below. For the input force u the
displacement x can be shown as;
m
x + cx + kx = u
Using Laplace transformation we can show the transfer function as;
1
X(s)
=
2
U (s)
ms + cs + k
For a unit input, the response will be determined by the poles of the above transfer function. In
other words the roots of the function ms2 + cs + k will determine the response. Lets transform
the above in to a form as given below;
ms2

1
1
k/m
=
2
+ cs + k
k s + (c/m)s + (k/m)

This can be written in the form;


X(s)
1
n2
=
U (s)
k s2 + 2n s + n2
The natural frequency
n =

p
k/m

and the damping ratio


= c/(2mn )
The term 1/k is the static deflection for unit force applied. Let For simplicity consider the
following general second order transfer function.
G(s) =

n2
s2 + 2n s + n2

ENGR6925: Automatic Control Engineering, Fall 2009

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 )

Underdamped Case 0 < < 1


In this case the roots are complex. Using partial fractions it can be shown;
X(s) =

1
s + 2n
2
s s + 2n s + n2

We can also simplify the second order denominator as;


s2 + 2n s + n2 = (s + n )2 + n2 (1 2 )
As < 1 the roots are complex and we can write above as;
(s + n )2 + n2 (1 2 ) = (s + n )2 + d2
where d2 = n2 (1 2 ) is the damped natural frequency. Therefore we can write the
transfer function in the form;
X(s) =
X(s) =

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

This can be simplified to as

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

ENGR6925: Automatic Control Engineering, Fall 2009

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=

change in level difference


change in flow rate

The capacitance is defined as;


C=

change in liquid stored


change in head

Also assume linear or laminar flow where Q h. Therefore the governing equations are;
Cdh = (qi qo )dt

ENGR6925: Automatic Control Engineering, Fall 2009

Figure 7: Liquid level system


qo =

h
R

This two equations will give


RC

dh
+ h = Rqi
dt

Using Laplace transformation


RCsH(s) + H(s) = RQi (s)
R
H(s)
=
Qi (s)
RCs + 1
This is referred to as the first order system.
Heating System
Consider the heating system shown in Figure 8. The heat input is qi and heat outflow to
surrounding is qo . The temperature measured inside Tin = To + where To is the temperature
of the surrounding. The thermal resistance at the walls is defined as;
R=

change in temperature
change heat flow

Therefore heat outflow is


qo = R[(To + ) To ]

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

ENGR6925: Automatic Control Engineering, Fall 2009

10

Figure 8: Closed Heating System


Therefore

d
+ qo = qi
dt
d
RC + = Rqi
dt
C

The Laplace transformation is


RCs(s) + (s) = RQi (s)
The transfer function is therefore given by;
(s)
R
=
Qi (s)
RCs + 1
General First Order System
Both the liquid level control and temperature control problems can be modelled using a first
order system. Thus the general first order model can be described as;
k
Y (s)
=
U (s)
Ts + 1
Where k is the Steady state gain and T is the time constant. For a unit step input the output
is given by;
k 1
k
Y (s) =
=
Ts + 1 s
s(T s + 1)
To get the inverse Laplace we will modify this to as;
Y (s) = (k/T )
y(t) = (k/T )

1
s(s + 1/T )


1
1 et/T
1/T

ENGR6925: Automatic Control Engineering, Fall 2009


y(t) = k 1 et/T

11


The steady state gain is when t ,


y(t)|t = k
Similarly when
y(t)|t=T = k(1 e1 ) = 0.632k
Hydraulic Servo System
Consider the hydraulic servo system shown in Figure 8. This represents a pilot-valve controlled
hydraulic power amplifier and actuator which is connected to a load of mass m sliding on a
frictional surface.

Figure 9: Closed Heating System


In this analysis we assume the fluid is incompressible. The flow is symmetrical and therefore
ps p1 = p2
or
p s = p1 + p2
Consider the pressure difference as;
p = p1 p2
The true plant model is nonlinear, however we linearized at the operating point. Under such
conditions the flow rate q will be proportional to the valve displacement. In addition increase of
q can be accomplished with a greater pressure gradient between ps and p1 . Thus the linearized
flow rate is given by;
q = K1 x K2 p
where K1 and K2 are constants and depends on the area of the flow opening in the valve and
fluid properties. Thus at the actuator
Ady = qdt

ENGR6925: Automatic Control Engineering, Fall 2009


Or

12

dy
=q
dt


1
dy
p =
K1 x A
K2
dt
A

Thus

The force developed at the power piston


A
F = Ap =
K2

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

This will provide;




A2
AK1
m
y+ b+
x
y =
K2
K2
The transfer function is therefore;
Y (s)
1

= h
X(s)
2
s mK
s+
AK1

bK2
AK1

A
K1

This is in the form,


Y (s)
K
=
X(s)
s(T s + 1)
As an exercise determine the terms for K and T.
Quarter Car Model
Consider the quarter car model shown in the figure. The spring k1 represents a tyre and the
spring k2 and c represents the shock absorber. The mass of the quarter car is m2 and that of
tyre is m1 . Consider the input displacement as the road surface variation given by r. The free
body diagrams are shown in the figure. For mass m1 ;
m1 x c(y x)
k2 (y x) + k1 (x r) = 0
This can be simplified to as;
x +
x +

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

ENGR6925: Automatic Control Engineering, Fall 2009

13

Figure 10: Quarter Car model


The Laplace transform is
s2 X(s) +

c
k2
k1
k1
(X(s) Y (s)) s +
(X(s) Y (s)) +
X(s) =
R(s)
m1
m1
m1
m1

Now consider mass m2 ;


m2 y + c(y x)
+ k2 (y x) = 0
m2 y +

c
k2
(y x)
+
(y x) = 0
m2
m2

Transforming into Laplace we get;


s2 Y (s) +

k2
s
(Y (s) X(s)) s +
(Y (s) X(s)) = 0
m2
m2

This will give;


X(s) Y (s) =

s2 Y (s)
cs
+ mk22
m2

The Laplace transform in the former can be simplified to asl




c
k2
k1
k1
k1
2
s [X(s)Y (s)]+
[X(s) Y (s)]+
[X(s) Y (s)]+
[X(s) Y (s)]+ s +
Y (s) =
R(s)
m1
m1
m1
m1
m1

 

c
k2
k1
k1
k1
2
2
[X(s) Y (s)] s +
+
+
+ s +
Y (s) =
R(s)
m1 m1 m1
m1
m1
2

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

ENGR6925: Automatic Control Engineering, Fall 2009

14

This will now simplifies to;



 




cs
k2
k1
k1
cs
k2
k1
cs
k2 R(s)
2
2
2
+
+
+ s +
+
=
+
s s +
m1 m1 m1
m1
m2 m2
m1 m2 m2 X(s)
Thus
Y (s)

=
X(s)
s4 + mc1 +

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

Figure 11: Motor turning a load with a flexible shaft


diagrams) we can write the following two underline equations.
Tm = Jm m + Bm m + K(m L )
Using the Laplace transform we will get;
Tm (s) = Jm s2 m (s) + Bm sm (s) + K(m (s) L (s))
Tm (s) = (Jm s2 + Bm s + K)m (s) KL (s)
For the load
0 = JL L + BL L + K(L m )
Using Laplace transform;
0 = JL s2 L (s) + BL sL (s) + K(L (s) m (s))

ENGR6925: Automatic Control Engineering, Fall 2009

15

(JL s2 + BL s + K)L (s) = Km (s)


Therefore
L (s) =

Km (s)
(JL s2 + BL s + K)

To obtain m (s)/Tm (s) we substitute; Therefore


Tm (s) = (Jm s2 + Bm s + K)m (s)

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

Figure 12: Gear train with viscous damping

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

ENGR6925: Automatic Control Engineering, Fall 2009

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

Substituting to the first we get;



 r
1
T1 = J1 1 (t) + b1 1 (t) + J2 2 (t) + b2 2 (t)
r2
Then using the gear teeth ratio equation we can express the above reference to shaft 1;
 

 
N1
N1
N
1
+ b2 1 (t)

T1 = J1 1 (t) + b1 1 (t) + J2 1 (t)


N2
N2
N2
While collecting the terms

T1 =

J1 + J2

N1
N2

2 !

1 (t) +


b1 + b2

N1
N2

2 !

1 (t)

We can use the equivalent systems and then this becomes,


T1 = Jeq 1 (t) + beq 1 (t)
and

Jeq = J1 + J2

N1
N2

2
and

N1
N2

2

N2
N1

2

beq = b1 + b2

In case of speed reduction


n=

N2
N2

where N2 > N1 amd

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

The torque at the low speed shaft is higher and therefore


 
N2
0
T1 = T1
N1

= b2 + b1

ENGR6925: Automatic Control Engineering, Fall 2009

17

Figure 13: LRC circuit

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)

ENGR6925: Automatic Control Engineering, Fall 2009

18

Figure 14: LRC circuit with complex impedances


Substituting;
(ZR + ZL + ZC )

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

Figure 15: Cascade RC circuit


impedance and re-draw the above circuit as shown below. In this case Z1 = R1 , Z2 = 1/C1 s,

Figure 16: Cascade RC circuit with complex impedances

ENGR6925: Automatic Control Engineering, Fall 2009

19

Z3 = R2 and Z4 = 1/C2 s. We can now write the following equations;


I = I1 + I2

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

For the voltages;





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

Dividing the above;


Eo (s)
Z2 Z4
=
Ei (s)
Z1 (Z2 + Z3 + Z4 ) + Z2 (Z3 + Z4 )
Substituting for complex impedances, we get; Dividing the above;
Eo (s)

=
Ei (s)
R1 C11 s + R2 +

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;

Figure 17: Operational Amplifier

ENGR6925: Automatic Control Engineering, Fall 2009

20

Figure 18: Operational Amplifier


eo = K(e2 e1 ) = K(e1 e2 )
Generally for DC inputs the amplifier gain is in the order of 102 106 . The arrangement shown
in above is not stable and to make it stable feedback is employed as shown in Figure 11.
Inverting amplifier
In the inverting amplifier the current draws in to the amplifier from the input is negligible. This
is due to high impedance of the amplifier. Thus current passing in the R1 resistor is almost
same as the current passing through R2 resistor. Thus we can show for an inverting amplifier;
R2
eo
=
ei
R1
In the laplace domain the above equation can be considered while replacing the resistors by
complex impedances. Therefore
Eo (s)
Z2
=
Ei (s)
Z1
Noninverting amplifier
In this case the R1 resistor is grounded and due to negligible current through the amplifier, the
voltage at the negative input can be computed considering a voltage divider. Thus we can show
for noninverting amplifier;


R2
eo
= 1+
ei
R1
Similarly with complex impedances,
Eo (s)
=
Ei (s)

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

ENGR6925: Automatic Control Engineering, Fall 2009

21

Figure 19: Example


In this case; Z1 = R1 , Z2 = R2 and Z3 = 1/Cs. Thus
1
1
1
=
+
0
Z
Z2 Z3
And
Z0 =

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

Figure 20: Lead or Lag compensator

ENGR6925: Automatic Control Engineering, Fall 2009

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

Also for the sign inverter;


R4
Eo (s)
=
E(s)
R3
Therefore,
Eo (s)
Eo (s) E(s)
=
Ei (s)
E(s) Ei (s)
Eo (s)
R2 R4 R1 C1 s + 1
=
Ei (s)
R1 R3 R2 C2 s + 1
"
#
1
R4 C1 s + R1 C1
Eo (s)
=
Ei (s)
R3 C2 s + R21C2
This also can be written as;
s + T1
Eo (s)
= Kc
1
Ei (s)
s + T
Eo (s)
Ts + 1
= Kc
Ei (s)
T s + 1
where, T = R1 C1 , = R2 C2 /R1 C1 and Kc = R4 C1 /R3 C2
LAG NETWORK if < 1 or R1 C1 < R2 C2
LEAD NETWORK if > 1 or R1 C1 > R2 C2
Electronic PID Controller
An electronic PID controller is shown below. Obtain the transfer function for Eo (s)/Ei (s) and
PID gains. Considering the complex impedances, we can write;

Figure 21: Electronic PID controller

ENGR6925: Automatic Control Engineering, Fall 2009

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

ENGR6925: Automatic Control Engineering, Fall 2009


INTEGRAL GAIN
Ki =

R4
R3 R1 C2

Kd =

R4 R2 C1
R3

DERIVATIVE GAIN

24

Modelling of a DC motor

Figure 22: Schematic of a DC motor


A motor is a electromechanical device used to provide rotational output for a voltage input.
The most common motor in many of electromechanical systems is the armature-controlled dc
servomotor. The motor schematic is shown below. In the permanent magnet dc motor a magnetic field is developed by stationary magnets in the stator. If the magnets (or electromagnets)
are same, it will produce a constant magnetic field and is called fixed field. The rotating circuit
is called the armature through which current ia (t) flows.
Since the current carrying armature is rotating in a magnetic field, its voltage is proportional
to the speed of rotation. This voltage vb (t) is called the back electromotive force (or back emf)
and the relation is
dm (t)
vb (t) = Kb
dt
where Kb is the back emf constant and m (t) is the angle of rotation of the motor. Using the
Laplace transform we can write above as;
Vb (s) = Kb sm (s)
The relationship between the armature current, ia (t), the applied armature voltage (or input
voltage) ea (t) and the back emf vb (t) can be written as;
Ra ia (t) + La

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)

ENGR6925: Automatic Control Engineering, Fall 2009

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.

ENGR6925: Automatic Control Engineering, Fall 2009

26

Transient response of a first-order system


A first-order system is given by;
k
X(s)
=
U (s)
Ts + 1
where T is the time constant and k is the steady state gain. In other words at steady state the
input will be amplified by gain k. The unit-step response is given by;
X(s) =

k 1
Ts + 1 s

The output is given by;


x(t) = k(1 et/T )
for t 0. The response curve assuming k = 1 is shown below. The steady state output is given

Figure 23: Step-response of a first order system


by;
xss = lim x(t) = k
t

The output when t = T is given by;


x(T ) = k(1 e1 ) = 0.632k
In other words time constant is the time taken for the output to reach 63.2% of its final value.
Smaller the time constant faster the response.

ENGR6925: Automatic Control Engineering, Fall 2009

27

Transient response of a second order system


Consider the second order system shown in the diagram below. For the input force u the
displacement x can be shown as;
m
x + cx + kx = u
Using Laplace transformation we can show the transfer function as;
1
X(s)
=
2
U (s)
ms + cs + k
For a unit input, the response will be determined by the poles of the above transfer function. In
other words the roots of the function ms2 + cs + k will determine the response. Lets transform
the above in to a form as given below;
ms2

1
k/m
1
=
2
+ cs + k
k s + (c/m)s + (k/m)

This can be written in the form;


1
X(s)
n2
=
U (s)
k s2 + 2n s + n2
The natural frequency
n =

p
k/m

and the damping ratio


= c/(2mn )
The term 1/k is the static deflection for unit force applied. Let For simplicity consider the
following general second order transfer function.
G(s) =

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) Under Damped Case In this case (0 < < 1)


The inverse Laplace will provide the solution as;
en t
x(t) = 1 p
sin (d t + )
1 2

1 2
1
2
where d = n 1 xi and = tan
The error signal is the difference between

the input and output and is


e(t) = r(t) x(t)

ENGR6925: Automatic Control Engineering, Fall 2009

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 =

This will provide rise time as;


1
tr =
tan1
d

!
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

ENGR6925: Automatic Control Engineering, Fall 2009


While know d = n

29

p
1 2 ; at t = tp ;

dx(t)
n
en tp = 0
= (sin d tp ) p

2
dt t=tp
1

This equation satisfies only when


sin d tp = 0
or when
d tp = 0, , 2, 3, . . .
Since peak time corresponding first peak overshoot;
tp =

= p
d
n 1 2

Maximum Overshoot Mp : The maximum overshoot occurs when t = tp or when d tp = .


Substituting to above we will get;
Mp = x(tp ) 1
Mp = en (/d )
Mp = exp

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)

Over Damped Case In this case ( > 1)


The poles of the system will have real parts and X(s) can be written as;
X(s) = 

2
1
 n

p
p
s + n + n 2 1 s + n + n 2 1 s

The output can be shown as;


#
"

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

ENGR6925: Automatic Control Engineering, Fall 2009

30

Figure 24: second order system response with different damping


The above also can be view in terms of system poles. Let the poles be s1 and s2 , where
p
s1 = ( + n 1 1)n
p
s2 = ( n 1 1)n
Then

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

ENGR6925: Automatic Control Engineering, Fall 2009


Rise time: tr is
tr =
where
= tan1
The rise time is;

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