Control System 4
Control System 4
com
linear feedback controller analysis - 18.1
Topics:
Objectives:
18.1 INTRODUCTION
Control systems use some output state of a system and a desired state to make
control decisions.
Consider the system below, and how it is enhanced by the addition of a control
system.
GupShupStudy.com 1
www.gupshupstudy.com
linear feedback controller analysis - 18.2
Control variable
INPUT OUTPUT
(e.g. gas) SYSTEM
(e.g. velocity)
(e.g. a car)
The control system is in the box and could be a driver or a cruise control
(this type is known as a feedback control system)
1. If verror is not zero, and has been positive/negative for a while, increase/decrease gas
2. If verror is very big/small increase/decrease gas
3. If verror is near zero, keep gas the same
4. If verror suddenly becomes bigger/smaller, then increase/decrease gas.
5. etc.
GupShupStudy.com 2
www.gupshupstudy.com
linear feedback controller analysis - 18.3
Some of the things we do naturally (like the rules above) can be done with math-
ematics
The basic equation for a PID controller is shown below. This function will try to
compensate for error in a controlled system (the difference between desired and actual
output values).
u = K c e + K i edt + K d ------
de
dt
The figure below shows a basic PID controller in block diagram form.
Kp ( e )
V V
+ +V
integral
+ e u
Ki ( e ) amp motor
+
- derivative + -V
K d ----- e
d
dt
GupShupStudy.com 3
www.gupshupstudy.com
linear feedback controller analysis - 18.4
e.g.
dv error
gas = K c v error + K i v error dt + K d ----------------
dt
Rule 4
Rules 2 & 3
(Immediate error)
(general difference)
Rule 1
(Long term error)
Kc
Ki Relative weights of components
Kd
Proportional
Integral
Derivative
For a PI Controller
gas = K c v error + K i v error dt
For a P Controller
gas = K c v error
For a PD Controller
dv error
gas = K c v error + K d ----------------
dt
GupShupStudy.com 4
www.gupshupstudy.com
linear feedback controller analysis - 18.5
dv error
gas = K c v error + K i v error dt + K d ----------------
dt
gas
- = K c + K i dt + K d ----
------------ d-
v error dt
d- dx
---- s ------ sx
dt dt
1 x
dt = ---
s xdt = --
s
GupShupStudy.com 5
www.gupshupstudy.com
linear feedback controller analysis - 18.6
F = A gas = 10 gas
2
d x dv
F = Ma = M -------2- = M ------
dt dt
F d-
--- = M ----
v dt
v 1
L --- = ------- Transfer function for acceleration of car mass
F Ms
gas F 1- vactual
10 ------
Ms
GupShupStudy.com 6
www.gupshupstudy.com
linear feedback controller analysis - 18.7
5. Finally, knowing the error is verror, and we can control gas (the control variable),
we can select a control system.
verror gas
Controller
GupShupStudy.com 7
www.gupshupstudy.com
linear feedback controller analysis - 18.8
Even though the transfer function uses the Laplace s, it is still a ratio of input to
output.
vdesired
100 step
vdesired(t) = 100 for t >= 0 sec
ramp
vdesired(t) = 50t for t >= 0 sec
t(sec)
0
A
RAMP f ( t ) = Atu ( t ) f ( s ) = ----2
s
2
A
SINUSOID f ( t ) = A sin ( t )u ( t ) f ( s ) = -----------------
2 2
s +
PULSE f ( t ) = A ( u ( t ) u ( t t1 ) ) f( s) =
etc......
GupShupStudy.com 8
www.gupshupstudy.com
linear feedback controller analysis - 18.9
Therefore to continue the car example, lets assume the input below,
100
v desired ( s ) = L [ v desired ( t ) ] = ---------
s
Next, lets use the input, and transfer function to find the output of the system.
v actual
v actual = ----------------- v desired
v desired
2
s ( K d ) + s ( K c ) + K i 100
v actual = ------------------------------------------------------------- ---------
s 2 -----
M s
10- + K d + s ( K c ) + K i
GupShupStudy.com 9
www.gupshupstudy.com
linear feedback controller analysis - 18.10
At this point we have the output function, but not in terms of time yet. To do this
we break up the function into partial fractions, and then find inverse Laplace
transforms for each.
2
2
s + s + 0.1
v actual = 10 -------------------------------------------------
-
s ( s ( 1.01 ) + s + 0.1 )
2
2
1 1 4 ( 1.01 ) ( 0.1 )
x = ------------------------------------------------------------ = 0.113, 0.877
2 ( 1.01 )
2 2
v actual = ---------- ----------------------------------------------------
10 s + s + 0.1
1.01 s ( s + 0.113 )s + 0.877
A B C
v actual = --- + ---------------------- + ----------------------
s s + 0.114 s + 0.795
GupShupStudy.com 10
www.gupshupstudy.com
linear feedback controller analysis - 18.11
2 2 2
A = lim s ---------- --------------------------------------------------------- = ---------- -------------------------------------
10 s + s + 0.1 10 0.1
s0 1.01 s ( s + 0.113 ) ( s + 0.877 ) 1.01 ( 0.113 ) ( 0.877 )
A = 99.9
2 2
B = lim ---------
10 - --------------------------------------------------------
s + s + 0.1 - ( s + 0.113 )
s 0.113 1.01 s ( s + 0.113 ) ( s + 0.877 )
2 2
10 ( 0.113 ) + ( 0.113 ) + 0.1
B = ---------- ----------------------------------------------------------------- = 0.264
1.01 ( 0.113 ) ( 0.113 + 0.877 )
2 2
C = lim ---------
10 - s + s + 0.1 - ( s + 0.877 )
--------------------------------------------------------
s 0.877 1.01 s ( s + 0.113 ) ( s + 0.877 )
2 2
10 ( 0.877 ) + ( 0.877 ) + 0.1
C = ---------- ----------------------------------------------------------------- = 1.16
1.01 ( 0.877 ) ( 0.877 + 0.113 )
GupShupStudy.com 11
www.gupshupstudy.com
linear feedback controller analysis - 18.12
f(t ) f(s )
A
---
A
s
A
At ----
2
s
t A -
Ae -----------
s+
A
A sin ( t ) -----------------
2 2
s +
2
n t 2 n 1 for ( < 1 )
e sin ( n t 1 ) 2
-
---------------------------------------
2
s + 2 n s + n
etc.
To finish the problem, we simply convert each term of the partial fraction back to
the time domain.
0.113t 0.877t
v actual = 99.9 + 0.264e 1.16e
GupShupStudy.com 12
www.gupshupstudy.com
linear feedback controller analysis - 18.13
Proportional (P) Gc = K
G c = K 1 + -----
1
Proportional-Integral (PI) s
Proportional-Derivative (PD) G c = K ( 1 + s )
G c = K 1 + ----- + s
1
Proportional-Integral-Derivative (PID)
s
1 + s
G c = K ------------------ >1
1 + s
Lead
1 + s
G c = K ------------------ >1
Lag 1 + s
1 + 1 s 1 + 2 s >1
G c = K --------------------- ---------------------
Lead-Lag 1 + 1 s 1 + 2 s 1 > 2
Consider the basic transform tables. A superficial examination will show that the
denominator (bottom terms) are the main factor in determining the final form of the solu-
tion. To explore this further, consider that the roots of the denominator directly impact the
partial fraction expansion and the following inverse Laplace transfer.
Root locus plots allow us to determine instabilities (poles on the right hand side
of the plane), overdamped systems (negative real roots) and oscillations (complex roots).
GupShupStudy.com 13
www.gupshupstudy.com
linear feedback controller analysis - 18.14
Note: this procedure can take some time to do, but the results are very important
when designing a control system.
GupShupStudy.com 14
www.gupshupstudy.com
linear feedback controller analysis - 18.15
+ 1---
K
s
-
K H(s) = 1
G ( s ) = ----
s
First, we must develop a transfer function for the entire control system.
K ----
G ( s ) s K
G S ( s ) = --------------------------------- = --------------------------- = ------------
1 + G ( s )H ( s ) s+K
1 + ---- ( 1 )
K
s
Next, we use the characteristic equation of the denominator to find the roots as
the value of K varies. These can then be plotted on a complex plane. Note:
the value of gain K is normally found from 0 to +infinity.
s+K = 0 K root
j
0
1 K K = 0
2
3
etc..
Note: because all of the roots for all values of K are real negative this system will
always be stable, and it will always tend to have a damped response. The large the
value of K, the more stable the system becomes.
Consider the previous example, the transfer function for the whole system was
found, but then only the denominator was used to determine stability. So in general we do
not need to find the transfer function for the whole system.
GupShupStudy.com 15
www.gupshupstudy.com
linear feedback controller analysis - 18.16
The transfer function values will often be supplied in a pole zero form.
K ( s + z0 ) ( s + z1 ) ( s + z m )
G ( s )H ( s ) = ------------------------------------------------------------------
-
( s + p 0 ) ( s + p 1 ) ( s + p n )
GupShupStudy.com 16
www.gupshupstudy.com
linear feedback controller analysis - 18.17
First, find the characteristic equation,. and an equation for the roots,
1 + -------------------------
- ( 1 ) = 0
K
2
s + 3s + 2
2
s + 3s + 2 + K = 0
3 9 4(2 + K) 1 4K
roots = ------------------------------------------------ = 1.5 --------------------
2 2
Next, find values for the roots and plot the values,
K root
j
0 0
1 -1
2 -2
3 -3
1. write the characteristic equation. This includes writing the poles and zeros of the
GupShupStudy.com 17
www.gupshupstudy.com
linear feedback controller analysis - 18.18
equation.
( s + z 1 ) ( s + z 2 ) ( s + z m )
1 + G ( s )H ( s ) = 1 + K ---------------------------------------------------------------- = 0
( s + p 1 ) ( s + p 2 ) ( s + pn )
2. count the number of poles and zeros. The difference (n-m) will indicate how
many root loci lines end at infinity (used later).
3. plot the root loci that lie on the real axis. Points will be on a root locus line if
they have an odd number of poles and zeros to the right. Draw these lines in.
4. determine the asymptotes for the loci that go to infinity using the formula below.
Next, determine where the asymptotes intersect the real axis using the second
formula. Finally, draw the asymptotes on the graph.
180 ( 2k + 1 )
( k ) = ----------------------------------- k [ 0, n m 1 ]
nm
( p1 + p2 + + pn ) ( z 1 + z2 + + z m )
= --------------------------------------------------------------------------------------------
nm
5. the breakaway and breakin points are found next. Breakaway points exist
between two poles on the real axis. Breakin points exist between zeros. to cal-
culate these the following polynomial must be solved. The resulting roots are
the breakin/breakout points.
A = ( s + p 1 ) ( s + p 2 ) ( s + p n ) B = ( s + z 1 ) ( s + z 2 ) ( s + z m )
----
d-
A B A ----- B = 0
d
ds ds
6. Find the points where the loci lines intersect the imaginary axis. To do this sub-
stitute the phasor for the laplace variable, and solve for the frequencies. Plot the
asymptotic curves to pass through the imaginary axis at this point.
( j + z 1 ) ( j + z 2 ) ( j + z m )
1 + K --------------------------------------------------------------------------- = 0
( j + p 1 ) ( j + p 2 ) ( j + p n )
GupShupStudy.com 18
www.gupshupstudy.com
linear feedback controller analysis - 18.19
1 + G ( s )H ( s ) = 1 + -------------------------
- ( 1 ) = 1 + K --------------------------------
K 1 -
2 ( s + 1 ) (s + 2)
s + 3s + 2
Step 2: (find loci ending at infinity)
-2 -1
GupShupStudy.com 19
www.gupshupstudy.com
linear feedback controller analysis - 18.20
d- d-
---- A = 0 ---- B = 2s + 3
ds ds
A ----- B B ----- A = 0
d d
ds ds -2 -1
2
1 ( 2s + 3 ) ( s + 3s + 2 ) ( 0 ) = 0 -1.5
2s + 3 = 0
s = 1.5
Note: because the loci do not intersect the imaginary axis, we know the system will be
stable, so step 6 is not necessary, but we it will be done for illustrative purposes.
1 + G ( s )H ( s ) = 0
1
1 + K -------------------------
2
- = 0
s + 3s + 2
2
s + 3s + 2 + K = 0
2
( j ) + 3 ( j ) + 2 + K = 0
2
+ 3j + 2 + K = 0
2
+ ( 3j ) + ( 2 K ) = 0
2
3j ( 3j ) 4 ( 2 K ) 3j 9 + 8 + 4K 3j 4K 1
= -------------------------------------------------------------- = ---------------------------------------------- = -------------------------------
2 2 2
In this case the frequency has an imaginary value. This means that there will be no
frequency that will intercept the imaginary axis.
GupShupStudy.com 20
www.gupshupstudy.com
linear feedback controller analysis - 18.21
K( s + 5 )
G ( s )H ( s ) = ---------------------------------
2
s ( s + 4s + 8 )
18.5 SUMMARY
GupShupStudy.com 21
www.gupshupstudy.com
linear feedback controller analysis - 18.22
3. Given the transfer function below, and the input x(s), find the output y(t) as a function of
time.
( s )-
y--------- 5
= ----------- x( t) = 5 t 0 sec
x( s) s+2
8. Draw a detailed root locus diagram for the transfer function below. Be careful to specify angles
of departure, ranges for breakout/breakin points, and gains and frequency at stability limits.
2
2K ( s + 0.5 ) ( s + 2s + 2 )-
G ( s ) = -----------------------------------------------------------
3
s (s + 1)(s + 2)
10. Draw the root locus diagram for the transfer function below,
2
K(s + 4)-
G ( s ) = ----------------------
2
s (s + 1)
11. Draw the root locus diagram for the transfer function below,
K(s + 1)(s + 2)
G ( s ) = -------------------------------------
3
s
12. The block diagram below is for a motor position control system. The system has a propor-
tional controller with a variable gain K.
d Vd + Ve Vs a
2 K 100- 1---
----------
s+2 s
-
Va
ans. 200K -
-----------------------------------
2
s + 2s + 200K
b) Draw the Root-Locus diagram for the system (as K varies). Use either the
approximate or exact techniques.
GupShupStudy.com 22
www.gupshupstudy.com
linear feedback controller analysis - 18.23
ans. 2 4 4 ( 200K )
roots = ------------------------------------------------ = 1 1 200K
2
Im
K r
o
o K=0.005
ts
Re
0 -2 -1
0
0
c) Select a K value that will result in an overall damping coefficient of 1. State if the Root-Locus
diagram shows that the system is stable for the chosen K.
(ans. 2
s + 2s + 200K = s + 2n s + n
2 2 n = 1 K = 0.005
13. Draw a Bode Plot for either one of the two transfer functions below.
( s + 1 ) ( s + 1000 ) 5
------------------------------------------ OR ----
2 2
( s + 100 ) s
17. The equation below describes a dynamic system. The input is F and the output is V. It has
the initial values specified. The following questions ask you to find the system response to a
GupShupStudy.com 23
www.gupshupstudy.com
linear feedback controller analysis - 18.24
18. A feedback control system is shown below. The system incorporates a PID controller. The
closed loop transfer function is given.
X + Y
Ki 3-
K p + ----- + K d s ----------
s s+9
-
4 2
s ( 3K d ) + s ( 3K p ) + ( 3K i )
--Y- = ------------------------------------------------------------------------------------
-
X 2
s ( 4 + 3K d ) + s ( 36 + 3K p ) + ( 3K i )
a) Verify the close loop controller function given.
b) Draw a root locus plot for the controller if Kp=1 and Ki=1. Identify any values
of Kd that would leave the system unstable.
c) Draw a Bode plot for the feedback system if Kd=Kp=Ki=1.
d) Select controller values that will result in a natural frequency of 2 rad/sec and
damping coefficient of 0.5. Verify that the controller will be stable.
e) For the parameters found in the last step find the initial and final values.
f) If the values of Kd=1 and Ki=Kd=0, find the response to a ramp input as a func-
tion of time.
19. The following system is a feedback controller for an elevator. It uses a desired heigh d pro-
vided by a user, and the actual height of the elevator h. The difference between these two is
called the error e. The PID controller will examine the value e and then control the speed of
the lift motor with a control voltage c. The elevator and controller are described with transfer
functions, as shown below. all of these equations can be combined into a single system transfer
GupShupStudy.com 24
www.gupshupstudy.com
linear feedback controller analysis - 18.25
equation as shown.
e = dh error
Ki 2 h--- 10 - elevator
c-- 2s + 1 + s PID controller = ------------
= K p + ----- + K d s = -------------------------- c 2
s +s
e s s
combine the transfer functions
2 2
c-- h--- = h--- = -------------------------
2s + 1 + s - 10 - (s + 1) 10 10 ( s + 1 )
------------ = ------------------- ------------------- = ----------------------
e c e s 2 s s(s + 1 ) 2
s +s s
h - 10 ( s + 1 ) eliminate e
----------- = ----------------------
dh 2
s
( 1 )
h = ----------------------
10 s +
(d h)
2
s
10 ( s + 1 ) 10 ( s + 1 )
h 1 + ---------------------- = ---------------------- (d)
2 2
s s
10 ( s + 1 )
----------------------
2
= -------------------------------- = -------------------------------
h--- s 10s + 10 - system transfer function
d 10 ( s + 1 ) 2
1 + ---------------------- s + 10s + 10
2
s
a) Find the response of the final equation to a step input. The system starts at rest
on the ground floor, and the input (desired height) changes to 20 as a step input.
b) Write find the damping coefficient and natural frequency of the results in part
a).
c) verify the solution using the initial and final value theorems.
GupShupStudy.com 25
www.gupshupstudy.com
linear feedback controller analysis - 18.26
(ans. a) h 10s + 10 - 20
--- = ------------------------------- d ( t ) = 20u ( t ) d ( s ) = ------
d 2 s
s + 10s + 10
h = -------------------------------
10s + 10 - 20 ------ = A B C
--- + --------------------------------
- + --------------------------------
-
2
s + 10s + 10 s s s + 5 3.873j s + 5 + 3.873j
A = lim -------------------------------
200s + 200
- = 20
s 0 s + 10s + 10
2
B = lim ----------------------------------------
200s + 200 -
= 2.5 22.6j
s 5 + 3.873j s ( s + 5 + 3.873j )
C = 2.5 + 22.6j
2 2
1 2.5 + 22.6j-
2.5 22.6j- -------------------------------- A = 2.5 + 22.6 = 22.73
h ( t ) = 20 + L -------------------------------- +
s + 5 3.873j s + 5 + 3.873j
= 4.602
= 5
= 3.873
5t
h ( t ) = 20 + 2 ( 22.73 )e cos ( 3.873t + 4.602 )
5
b) 5 = n = ------
n
2 25
3.873 = 1 n = 1 -----2- n
n
25 2 2 n = 35 = 5.916
15 = 1 -----2- n = n 25
n
5
= ---------- = 0.845
35
c)
h ( 0 ) = lim s -------------------------------
10s + 10 - 20 ------ = lim -------
10s-
20 = 0
s s 2 + 10s + 10 s s s2
h ( ) = lim s -------------------------------
10s + 10 - 20 ------ = (----------------
10 )20-
= 20
s0 2 s 10
s + 10s + 10
GupShupStudy.com 26
www.gupshupstudy.com
linear feedback controller analysis - 18.27
1. a) The block diagram below is for an angular positioning system. The setpoint is a desired
angle, which is converted to a desired voltage. This is compared to a feedback voltage from a
potentiometer. A PID controller is used to generate an output voltage to drive a DC motor.
Simplify the block diagram.
PID Controller Motor
d Vd e Ki Vs 100 - a
1- K p + ----- + sK d --------------- 1---
--------- s s + 0.1
0.25 + s
-
Potentiometer
Va
1-
---------
0.25
b) Given the transfer function below, select values for Kp, Ki and Kd that will result in a second
order response that has a damping coefficient of 0.125 and a natural frequency of 10rad/s.
(Hint: eliminate Ki).
2
a s ( 400K d ) + s ( 400K p ) + ( 400K i )
----- = ----------------------------------------------------------------------------------------------------------
d 3 2
s + s ( 0.1 + 400K d ) + s ( 400K p ) + ( 400K i )
c) The function below has a step input of magnitude 1.0. Find the output as a function of time
using numerical methods. Give the results in a table OR graph.
s ( 0.9 ) + ( 4 )
----a- = ------------------------------------
d 2
s + 2.5s + 100
d) The function below has a step input of magnitude 1. Find the output as a function of time by
integrating the differential equation (i.e., using the homogeneous and particular solutions).
s ( 0.9 ) + ( 4 )
----a- = ------------------------------------
d 2
s + 2.5s + 100
GupShupStudy.com 27
www.gupshupstudy.com
linear feedback controller analysis - 18.28
e) The function below has a step input of magnitude 1. Find the output as a function of time using
Laplace transforms.
s ( 0.9 ) + ( 4 )
----a- = ------------------------------------
d 2
s + 2.5s + 100
f) Given the transfer function below; a) apply a phasor/Fourier transform and express the gain and
phase angle as a function of frequency, b) calculate a set of values and present them in a table,
c) use the values calculated in step b) to develop a frequency response plot on semi-log paper,
d) draw a straight line approximation of the Bode plot on semi-log paper.
s ( 0.9 ) + ( 4 )
----a- = -----------------------------
d 2
s +s+4
2. Select a controller transfer function, Gc, that will reduce the system to a first order system with
a time constant of 0.5s, as shown below.
Controller Motor
d Vd e Vs 100 - a
1- Gc --------------- 1---
--------- s + 0.1
0.25 + s
-
Potentiometer
Va
1-
---------
0.25
a 1
desired transfer function ----- = -----------
d s+2
GupShupStudy.com 28