modern control - lec 03 - feedback control systems performance and characteristics
TRANSCRIPT
LECTURE (3)
Feedback Control Systems
Performance and Characteristics
Assist. Prof. Amr E. Mohamed
Agenda
Introduction
Test Input Signals.
Response of First Order systems.
Response of Second Order Systems.
Higher Order Systems Response.
Steady State Errors of Feedback Control Systems.
Stability Analysis Using Routh-Hurwitz Method
Introduction to PID
2
Introduction
Order of the system:
Consider a system defined by the transfer function:
The order of this system is n which is defined by the highest power for s in
the denominator.
Examples:
3
)()(
)()(
0
1
1
0
1
1
asasa
bsbsb
sR
sCsT
n
n
n
n
m
m
m
m
1st order system 2nd order system
14
5
)(
)(
ssR
sC
44
10
)(
)(2
ss
s
sR
sC
3423
10
)(
)(234
2
ssss
s
sR
sC
4th order system
Introduction
The system type Number:
It is defined as the number of poles at the origin of the open loop transfer function
G(s)H(s).
Consider the open loop transfer function of a system as :
The system of type c and has an order of n+c
Examples:
4
)()()(
0
1
1
0
1
1
asasas
bsbsbsHsG
n
n
n
n
c
m
m
m
m
)4)(1(
50)()(
sssHsG
)3423(
310)()(
2342
2
sssss
ssHsG
System of type 0
System of type 2
Standard Test Signals
Impulse-Function
The impulse signal imitate the sudden shock
characteristic of actual input signal.
Step-function
The step signal imitate the sudden change
characteristic of actual input signal.
5
0 0
0 )()(
t
tAttu
0 t
δ(t)
A
00
0
t
tAtu
)(
0 t
u(t)
A
s
AsU )(
AsU )(
Standard Test Signals
Ramp-function
The ramp signal imitate the constant velocity characteristic of
actual input signal.
Parabolic-function
The parabolic signal imitate the constant acceleration
characteristic of actual input signal.
6
00
0
t
tAttr
)( 0 t
r(t)
00
02
2
t
tAt
tp
)( 0 t
p(t)
3)(
s
AsU
2)(
s
AsU
Relation Between Standard Test Signals
Impulse
Step
Ramp
Parabolic
7
00
0
t
tAt
)(
00
0
t
tAtu
)(
00
0
t
tAttr
)(
00
02
2
t
tAt
tp
)(
dt
d
dt
d
dt
d
Time Response of Control Systems
Time response of a dynamic system is response to an input expressed as
a function of time.
The time response of any system has two components:
Transient response
Steady-state response.
8
System
)()()( tctctc sstr
Time Response of Control Systems
When the response of the system is changed form rest or equilibrium it takes some
time to settle down.
Transient response is the response of a system from rest or equilibrium to steady state.
The response of the system after the transient response is called steady state
response.
9
0 2 4 6 8 10 12 14 16 18 200
1
2
3
4
5
6x 10
-3
Step Response
Time (sec)
Am
plitu
de Response
Step Input
Time Response of Control Systems
Transient response dependents upon the system poles only and not on
the type of input.
It is therefore sufficient to analyze the transient response using a step
input.
The steady-state response depends on system dynamics, system type,
and the input quantity.
It is then examined using different test signals by final value theorem.
10
Response of First Order System
The Standard form system transfer function G(s) is given by:
Where K is the D.C gain and T is the time constant of the system.
Time constant is a measure of how quickly a 1st order system responds to a
unit step input.
D.C Gain of the system is ratio between the input signal and the steady
state value of output.
The first order system has only one pole at 1/T
11
1)(
)()(
sT
k
sR
sCsG
Unit-Impulse Response of First Order System
Consider the following 1st order system
12
)(sR
0t
δ(t)
1
1)( sR
Ts
TK
Ts
KsRsGsC
11)()()(
TteT
Ktc /)(
)(sC
1Ts
K
K=1 & T=2s
Unit-Step Response of First Order System
Taking Inverse Laplace of above equation
13
1Ts
K )(sC)(sR
ssUsR
1 )()(
1)()()(
Tss
KsRsGsC
0 t
u(t)
1
TteKtc /1)(
1
1)(
Ts
T
sKsC
K=1 & T= 1.5s
Step Response of 1st order System
System takes five time constants to reach its final value.
14
Unit-Ramp Response of First Order System
The ramp response is given as
15
1Ts
K)(sC)(sR
2
1)(
ssR
1)(
2
Tss
KsC
TtTeTtKtc /)(
0 5 10 150
2
4
6
8
10
Time
c(t
)
Unit Ramp Response
Unit Ramp
Ramp Response
K=1 & T= 1s
error
Table 3.1 Summary of response of a LTI first order system
16
/1)( tetc
/1)( tetc
/1)( tettc
input: output:
unite ramp
unite step
unite impulse )()( 0 tuttr
)()( 1 tututr
)(2 tutr
dt
d
dt
d
dt
d
dt
d
Second Order Systems
A general second-order system (without zeros) is characterized by the
following transfer function.
1722
2
2 nn
n
sssR
sC
)(
)(
)2()(
2
n
n
sssG
Open-Loop Transfer Function
Closed-Loop Transfer Function
Second Order Systems
damping ratio of the second order system, which is a measure of
the degree of resistance to change in the system output.
un-damped natural frequency of the second order system, which
is the frequency of oscillation of the system without damping
18
22
2
2)(
)(
nn
n
sssR
sC
n
Example#2
Determine the un-damped natural frequency and damping ratio of the
following second order system.
Compare the numerator and denominator of the given transfer function
with the general 2nd order transfer function.
19
42
42
sssR
sC
)(
)(
22
2
2)(
)(
nn
n
sssR
sC
42 n sec/radn 2 ssn 22
422 222 ssss nn 50.
1 n
Example#3
Example 3: For the second order system described by the closed loop
transfer function T(s), n and ξ .
Compare with the standard equation we have:
20
643
6
256124
24
)(
)()(
22
sssssR
sCsT
632642 nnn kandandSince
75.08.016
3,8 kandn
Second Order Systems - Poles
The second order system Transfer function is
The characteristic polynomial of a second order system is:
The closed-loop poles of the system are
21
22
2
2)(
)(
nn
n
sssR
sC
1
1
2
2
2
1
nn
nn
s
s
0))((2 21
22 ssssss nn
12
442,
2222
11
nn
nnnss
Response of Second Order Systems
According the value of , a second-order system can be set into one
of the four categories:
Case 1: Over damped response (ξ > 1)
Case 2: Critically damped response (ξ = 1)
Case 3: Under damped response (0 < ξ <1)
Case 4: No damped response (ξ = 0)
22
Unit-Step Response of Second Order Systems
Case 1: Over damped response (ξ > 1)
The two roots of the characteristic equation s1 and s2 are real and distinct.
Example#4: Calculate and plot the output of the system with the following
transfer function:
Solution: With unit step input, its response is:
23
δ
jω
23
2)(
2
sssT
2
1
1
21
)23(
1)()()(
2
sssssssTsRsC
1
1
2
2
2
1
nn
nn
s
s
Unit-Step Response of Second Order Systems
The corresponding time domain output is given by:
24
)(]21[)}({)( 21 tueesCLtc tt
time [sec]
outp
ut
signal
1
Unit-Step Response of Second Order Systems
Case 2: Critically damped response (ξ = 1)
The two roots of the characteristic equation s1 and s2 are real and equal.
Example#5: Calculate and plot the output of the system with the following
transfer function:
Solution: With unit step input, its response is:
25
δ
jω
44
45)(
2
ss
ssT
22 )2(
3
2
11
)44(
45)()()(
ssssss
ssTsRsC
ns 2,1
Unit-Step Response of Second Order Systems
The corresponding time domain output is given by:
26
)(]31[)}({)( 221 tuetesCLtc tt
time [sec]
outp
ut
signal
1
Unit-Step Response of Second Order Systems
Case 3: Under damped response (ξ < 1)
The two roots of the characteristic equation s1 and s2 are complex conjugates of on another.
Example#6: Calculate and plot the output of the system with the following
transfer function:
Solution: With unit step input, its response is:
27
δ
jω2
2,1 1 nn js
dn js 2,1
42
4)(
2
sssT
42
21
)42(
4)()()(
22
ss
s
sssssTsRsC
Unit-Step Response of Second Order Systems The corresponding time domain output is given by:
28time [sec]
outp
ut
signal
1
)()sin(
1
11)}({)(
2
1 tutsCLtc d
t
en
𝑤ℎ𝑒𝑟𝑒 𝜃 =
1 − 𝜉2
𝜉
Unit-Step Response of Second Order Systems
Case 4: Undamped response (ξ = 0)
The two roots of the characteristic equation s1 and s2 are imaginary poles.
Example#7: Calculate and plot the output of the system with the following
transfer function:
Solution: With unit step input, its response is:
29
δ
jω
njs 2,1
4
4)(
2
ssT
222 2
1
)4(
4)()()(
s
s
ssssTsRsC
)()sin(1)}({)( 1 tutsCLtc n
The transient response as a function of the damping ratio ξ
30time [s]
outp
ut
signal
01.0
4.0
2.0
5.0
3.07.0
6.0
8.0
2
Time-Domain Specification
For 0< ξ <1 and ωn > 0, the 2nd order system’s response due to a unit
step input looks like
31
Time-Domain Specification – Delay Time
Delay-Time (Td): The delay (Td) time is the time required for the
response to reach half the final value the very first time.
32
Time-Domain Specification – Rise Time
Rise-Time (TR): The rise time is the time required for the response to
rise from
10% to 90% of its final value, over damped systems
5% to 95% of its final value, Critical damped systems
or 0% to 100% of its final value. under damped systems
33
d
rt
n
n
2
1 1tan
Time-Domain Specification – Peak Time
Peak Time (Tp): The peak time is the time required for the response to
reach the first (maximum) peak of the overshoot.
34
d
pt
Time-Domain Specification – Maximum Overshoot
Maximum Overshoot (MP): is the maximum peak value of the response
curve measured from unity.
Maximum percent overshoot (P.O): is defined as follows:
35
eMP
)
1
(2
%100.21xeOP
%100. xvaluefinal
OPMp
Time-Domain Specification – Rise Time
The settling time (Ts): is the time required for the response curve to
reach and stay within a range about the final value of size specified by
absolute percentage of the final value (usually 2% or 5%).
36
nst
4
Settling Time (2%)
nst
3
Settling Time (5%)
Example#7
For the control system shown in Figure, determine k and a that satisfies
the following requirements:
a) Maximum percentage overshoot P.O =10%.
b) The 5% settling time ts = 1 sec.
Solution: The closed loop transfer function is given by
37
)(sR
-+
)(sC
2
1
sas
k
)(sT
)2()2()2)((
2
11
2
1
)(
)(2 kaass
k
ksas
k
sas
k
sas
k
sR
sC
Example#7
The maximum percent overshoot (P.O )is given by:
For 5%, the settling time ts is given by:
From these two equations we get a + 2 = 6 then a = 4 and k = 17
38
6.0
100
10.
21
eOP
133
ne
st 5n
305.02&22 2 nn kaa
Higher Order Systems Response
The natural response of higher-order systems consists of a sum of
terms, one term for each characteristic root:
For each distinct real characteristic root, there is a real exponential term in
the system natural response.
For each pair of complex conjugate roots, there is a an exponential
sinusoidal term in the system natural response.
Repeated roots give additional terms involving power of time times the
exponential.
39
Higher Order Systems Response
Example#8: Analyze the system with the following transfer function:
Solution: With unit step input, apply the partial fraction, its response is
given by:
The corresponding time domain output is given by:
40
)134)(4)(1(
58
5281379
58)(
2
2
234
2
ssss
s
ssss
ssT
22
54321
)3()2(41)(
1)(
s
ksk
s
k
s
k
s
ksT
ssC
)3cos()(24
321
tkkktc eAeettt
Higher Order Systems Response
Example#9: Analyze the system with the following T.F
Solution: With unit step input, apply the partial fraction, its response is
given by:
The corresponding time domain output is given by:
Where the natural frequencies and damping ratios are given by:
41
)178)(134)(4)(1(
23967)(
22
23
ssssss
ssssT
17813431)(
1)(
2
76
2
54321
ss
ksk
ss
ksk
s
k
s
k
s
ksT
ssC
)cos(2
2
2)cos(2
1
1)( 2211
3
321
1
1
1
12
11
1
ttkkktc d
t
d
t
tt eAeAee
nn
97.02
8sec,/12.41755.0
2
4sec,/6.313
22
2
11
1 n
n
n
n radandrad
The s-Plane Root Location and The Transient Response
42
Example#10
Consider the system shown in following figure, where damping ratio is
0.6 and natural undamped frequency is 5 rad/sec. Obtain the rise time tr,
peak time tp, maximum overshoot Mp, and settling time 2% and 5%
criterion ts when the system is subjected to a unit-step input.
Solution:
ξ = 0.6 and ωn = 5 rad/sec
43
Example#10
Rise Time:
Peak Time:
44
drt
21
1413
n
rt.
rad 9301 2
1 .)(tan
n
n
str 550
6015
9301413
2.
.
..
dpt
st p 7850
4
1413.
.
Example#10 Settling Time (2%):
Settling Time (5%):
Maximum Overshoot:
45
nst
4 sts 331
560
4.
.
nst
3 sts 1
560
3
.
095.022
6.01
6.0141.3
1
eeM p
%5.9100.21
eOP
Example#11
For the system shown in Figure, determine the values of gain K and
velocity-feedback constant Kh so that the maximum overshoot in the
unit-step response is 0.2 and the peak time is 1 sec. With these values of
K and Kh, obtain the rise time and settling time. Assume that J=1 kg-m2
and B=1 N-m/rad/sec.
46
Example#11
47
Example#11
Comparing above T.F with general 2nd order T.F
48
Nm/rad/sec and Since 11 2 BkgmJ
KsKKs
K
sR
sC
h
)()(
)(
12
22
2
2 nn
n
sssR
sC
)(
)(
Kn K
KKh
2
1 )(
Example#11
49
Maximum overshoot is 0.2.
Kn K
KKh
2
)1(
2021
.ln)ln(
e
The peak time is 1 sec
dpt
245601
1413
.
.
n
21
14131
n
.
533.n
Example#11
50
Kn K
KKh
2
1 )(
96.3n
K533.
512
533 2
.
.
K
K
).(.. hK512151224560
1780.hK
Example#11
51
963.n
nst
4
nst
3
21
n
rt
str 65.0 sts 48.2sts 86.1
Example#12
When the system shown in Figure(a) is subjected to a unit-step input,
the system output responds as shown in Figure(b). Determine the values
of a and c from the response curve.
52
)( 1css
a
Example#13
For the RLC shown in Fig. 3.17, determine the natural frequency n and
the damping ratio ξ for the transfer function T(s)= X(s) / F(s), if M = 1
kg, b= 4 Ns/m and k = 10 N/m.
Solution:
The D.E for this system is given by:
The closed loop transfer function is given by
Then
53
)()()()(
2
2
tftKxdt
tdxf
dt
txdM v
m
kS
m
fs
m
ksfsMsF
sX
vv
22
/11
)(
)(
10
22sec/10
/
1
m
fandrad
mk
vnn
K
vf
M)(tf
)(tx
Fig. 3.15 RLC network
Example#14
For the RLC shown in Fig. 3.16, determine the natural frequency n and
the damping ratio ξ for the transfer function T(s)= I(s) / E(s).
Solution:
The closed loop transfer function is given by
Then
54
11
1
)(
)(2
RCSLC
Cs
CSLsR
sE
sI
s
L
CR
L
Rand
LCnn
22
1
Fig. 3.15 RLC network
LCs
L
R
sL
sE
sI
s1
1
)(
)(
2
Example#15
Figure (a) shows a mechanical vibratory system. When 2 lb of force
(step input) is applied to the system, the mass oscillates, as shown in
Figure (b). Determine m, b, and k of the system from this response
curve.
55
Example#16
Given the system shown in following figure, find J and D to yield 20%
overshoot and a settling time of 2 seconds for a step input of torque T(t).
56
Example#16
57
Example#16
58
Steady-State Error
59
Steady-state error
Steady-state error
Consider the feedback control system shown in Fig. 3.16.
The closed loop transfer function is given by:
The system error is equal to:
By application of final value theorem the steady state error is:
Fig. 3.16
)(sR )(sC)(sE)(sG
)(sH
)()(1
)(
)(
)()(
sHsG
sG
sR
sCsT
)()()()()(
)()()()()()()()( sR
sHsGsHsG
sHsGsRsRsHsCsRsE
1
1
1
)()(1
)(lim)(lim)(lim
00 sHsG
ssRssEtee
sstss
Static Error Constants
Static Position Error Constant Kp [Step-error]
Static Velocity Error Constant Kv [Ramp-error]
Static Acceleration Error Constant Ka [Parabolic-error]
)()(lim0
sHsGKs
p
p
ssK
e
1
1
)()(lim0
sHssGKs
v
v
ssK
e1
)()(lim 2
0sHsGsK
sa
a
ssK
e1
Summary of steady-state errors
Input
Type #
step input ramp input acc. input
type 0
system
type 1
system
type 2
system
2)(
2ttr 1)( tr ttr )(
pK1
1
vK
1
aK
1
0
0 0
Example
Find the steady state error of the system shown in Fig. 3.17, when the
reference input r(t) is:
a) δ(t) b) u(t) c) t u(t)
Solution:
The steady state error is given by
)(sR )(sC)(sE
4
5
s
1
2
s
Fig. 3.17
)()()(1
1lim)(lim
00sR
sHsGssE
sssse
Example (Cont.)
(a) For
(b) For
(c) For
01.
1
2
4
51
1lim
0
ss
sssse
)()( ttr
14
41.
10)1)(4(
)1)(4(lim
0
sss
sss
ssse
)()( tutr
)()( tuttr
20
1.
10)1)(4(
)1)(4(lim
sss
sss
ssse
Example
Find the steady state error of the system shown in Fig. 3.18, when the
reference input r(t) is:
a) δ(t) b) u(t) c) t u(t)
Solution:
The steady state error is given by
)()()(1
1lim)(lim
00sR
sHsGssE
sssse
)(sR )(sC)(sE
)4(
10
ss
Fig. 3.18
Example (Cont.)
(a) For
(b) For
(c) For
)()( ttr
)()( tutr
)()( tuttr
01.10)4(
)4(lim
0
ss
sss
ssse
01
.10)4(
)4(lim
0
sss
sss
ssse
10
41.
10)4(
)4(lim
20
sss
sss
ssse
Example
For the system shown in Fig. 3.19, determine:
a) The system type number
b) Static position error constant Kp
c) Static velocity error constant Kv
d) ess, when r(t) is: u(t) and t u(t)
Solution:
Fig. 3.19
)(sR )(sC)(sE)5(
10
ss
3
2
s
Example (Cont.)
a) The open loop transfer function is given by
b) static position error constant Kp
c) Static velocity error constant Kv
d) ess, when r(t) is: u(t) and t u(t)
))3)(5(
20)()(
ssssHsG Then the system is type number =1
)3)(5(
20lim)()(lim
00 sssssHsGKp
ss
15
20
)5)(5(
20lim)()(lim
00
sss
ssHssGKv
ss
20
151)(0
1
1)(
ke
ke
v
ss
p
ssrampstep
Routh-Hurwitz criterion
70
The Concept of Stability
A stable system is a dynamic system with a bounded response to a bounded
input.
Consider the closed loop transfer function of a system as :
The characteristic equation or polynomial of the system which is given by:
For the system described by T(s) to be stable, the root of the characteristic equation
must lie in the left half plane.
The Routh-Hurwitz criteria or test is a numerical procedure for determining the
number of right half-plane (RHP) and imaginary axis roots of the characteristic
polynomial.
)(
)()(
0
1
1
0
1
1
s
sN
asasa
bsbsbsT
n
n
n
n
m
m
m
m
0
1
1)()( asasasQs n
n
n
n
The Routh-Hurwitz Method Stability Criteria
The method requires two steps:
Step #1: Generate a date table called a Routh table as follows:
Consider the characteristic equation which is given by:
01
2
2
3
3
4
4)()( asasasasasQs
Table 3.3 Initial layout for Routh table
Rules for Routh table creation
Any row of the Routh table can be
multiplied by a positive constant without
changing the values of the rows below.
To avoid the division by zero, an epsilon is
assigned to replace the zero in the first
column.
The Routh-Hurwitz Method Stability Criteria
Further rows of the schedule are then completed as follows:
Table 3.4 Completed Routh table
The Routh-Hurwitz Method Stability Criteria
Step #2: Interpret the Routh table to tell how many closed-loop system poles are inthe:
left half-plane
right half-plane.
The number of roots of the polynomial that are in the right half-plane is equal to thenumber of sign changes in the first column.
Notes: 1- If the coefficients of the characteristic equation have differing algebraic, there is at
least one RHP root. For Example:
• Has definitely one or more RHP roots.
2- If one or more of the coefficients of the characteristic equation have zero value, there areimaginary or RHP roots or both. For Example:
• has imaginary axis roots indicated by missing s3 term.
102357)()( 2345 ssssssQs
173823)()( 2456 ssssssQs
Example
For the system shown in Fig. 3.20, determine T(s) and then apply the
Routh-Hurwitz Method to check the its Stability .
Solution: :
Step #1: Find the system closed loop transfer function T(s)
)(sR )(sC)(sE
)5)(3)(2(
1000
sss
Fig. 3.20
10303110
1000
)5)(3)(2(
10001
)5)(3)(2(
1000
)()(1
)()(
23
ssssss
sss
sHsG
sGsT
Example (Cont.) Therefore, the characteristic equation is given by:
Step #2: Generate the Routh table as follows:
Step #3: Since. There are two sign changes in the left column.
• therefore, the system is unstable and has two roots in the right hand side.
10303110)( 23 ssss
Divide by 10
Example
Apply the Routh-Hurwitz Method to determine the stability of a the closed
loop system whose transfer function is given by:
Solution: Generate the Routh table as follows:
123653
10)(
2345
ssssssT
There are two sign changes in the left
column, therefore, the system has two
RHP roots and hence it is unstable
Example
Apply the Routh-Hurwitz Method to determine the values of K that make the system
stable.
Solution: Generate the Routh table as follows:
03)60(825413 2345 KsKssss
1
13
5s
4s
3s
2s
1s
0s
7.47
K212.06.65
K212.06.65
K163.0K10539402
K3
54
82
K60
K3
K769.060
K3
0
0
0
0
0 0
0K212.06.65 309K
0K163.0K10539402
35K 0K
Then the values of k that makes the system stable are 350 K
Example
Apply the Routh-Hurwitz Method to check the stability of a system whose
characteristic equation is given by:
Step #1: Generate the Routh table as follows:
35632)( 2345 ssssss
Note:To avoid the division by
zero, an epsilon is
assigned to replace the
zero in the first column.
Table 3.6The Routh table
Example (Cont.)
Step #2: Interpret the Routh table to tell how many closed-loop system poles are in
the right half-plane. To begin the interpretation, we must assume a sign, positive or
negative, for the quantity ε as illustrated in Routh table.
Table 3.6 The Routh table
Step #3: Interpret the Routh table to tell how many closed-loop system poles are in
the right half-plane There are two sign changes in the left column, therefore, Q(s)
has two RHP roots and hence it is unstable.
Introduction to PID Control
81
Introduction This introduction will show you the characteristics of the each of proportional
(P), the integral (I), and the derivative (D) controls, and how to use them to
obtain a desired response.
In this tutorial, we will consider the following unity feedback system:
Plant: A system to be controlled
Controller: Provides the excitation for the plant; Designed to control the
overall system behavior
The PID controller
The transfer function of the PID controller looks like the following:
𝑮𝒄 𝒔 = 𝑲𝒑 +𝑲𝑫 𝒔 +𝑲𝑰𝒔
Kp = Proportional gain
KI = Integral gain
Kd = Derivative gain
The PID controller
First, let's take a look at how the PID controller works in a closed-loop system using the
schematic shown above. The variable [E(s)] represents the tracking error, the difference
between the desired input value [R(s)] and the actual output [C(s)].
This error signal (e) will be sent to the PID controller, and the controller computes both the
derivative and the integral of this error signal.
The signal [U(s)] just past the controller is now equal to the proportional gain (Kp) times
the magnitude of the error plus the integral gain (Ki) times the integral of the error plus
the derivative gain (Kd) times the derivative of the error.
𝒖 𝒕 = 𝑲𝒑 𝒆(𝒕) + 𝑲𝑰 𝒆 𝒕 . 𝒅𝒕 + 𝑲𝑫𝒅 𝒆(𝒕)
𝒅𝒕
This signal (u) will be sent to the plant, and the new output will be obtained. This new
output will be sent back to the sensor again to find the new error signal (e). The controller
takes this new error signal and computes its derivative and its integral again.
This process goes on and on.
The characteristics of P, I, and D controllers
A proportional controller (Kp) will have the effect of reducing the rise time and will
reduce ,but never eliminate, the steady-state error.
An integral control (Ki) will have the effect of eliminating the steady-state error, but it
may make the transient response worse.
A derivative control (Kd) will have the effect of increasing the stability of the system,
reducing the overshoot, and improving the transient response.
Effects of each of controllers Kp, Kd, and Ki on a closed-loop system are summarized
in the table shown below.
RISE TIME OVERSHOOT SETTLING TIME Steady-State
Response
Kp Decrease Increase Small Change Decrease
Ki Decrease Increase Increase Eliminate
Kd Small Change Decrease Decrease Small Change
Example Problem
Suppose we have a simple mass, spring, and damper problem.
The modeling equation of this system is
Let
M = 1kg
fv = 10 N.s/m
k = 20 N/m
F(s) = 1 = unit step
𝑋(𝑠)
𝐹(𝑠)=
1
𝑠2 + 10 𝑠 + 20
K
vf
M)(tf
)(tx
)()()()(
2
2
tftKxdt
tdxf
dt
txdM v
𝑋(𝑠)
𝐹(𝑠)=
1
𝑀 𝑠2 + 𝑓𝑣 𝑠 + 𝐾
Open-loop step response
Let's first view the open-loop step response.
Create a new m-file and add in the following code:
>> num=1;
>> den=[1 10 20];
>> step (num,den)
Running this m-file in the Matlab command window should give you the
plot shown below.
Open-loop step response The DC gain of the plant transfer function is
1/20, so 0.05 is the final value of the output to
an unit step input. This corresponds to the
steady-state error of 0.95, quite large indeed.
Furthermore, the rise time is about one second,
and the settling time is about 1.5 seconds.
Let's design a controller that will reduce the rise
time, reduce the settling time, and eliminates
the steady-state error.
Closed Loop with P-Controller
The closed-loop T.F is𝐶(𝑠)
𝑅(𝑠)=
𝐾𝑝
𝑠2 + 10 𝑠 + (20 + 𝐾𝑝)
Let the proportional gain (Kp) equals 300 and change the m-file to thefollowing:>> Kp = 300;
>> num = [Kp];
>> den = [1 10 20+Kp];
>> t = 0 : 0.01 : 2 ;
>> step (num,den,t)
Closed Loop with P-Controller
Running this m-file in the Matlab command window should gives you the
following plot.
The plot shows that the proportional
controller reduced both the rise time
and the steady-state error, increased
the overshoot, and decreased the
settling time by small amount.
Closed Loop with PD-Controller
The closed-loop T.F is
𝐶(𝑠)
𝑅(𝑠)=
𝐾𝑝 + 𝐾𝐷 𝑆
𝑠2 + 10 + 𝐾𝐷 𝑠 + (20 + 𝐾𝑝)
Let Kp equals 300 and Kd equals 10, then change the m-file to the following:
>> Kp = 300; KD = 10;
>> num = [KD Kp];
>> den = [1 10+KD 20+Kp];
>> t = 0 : 0.01 : 2 ;
>> step (num,den,t)
Closed Loop with PD-Controller
Running this m-file in the Matlab command window should gives you the
following plot.
The plot shows that the derivative
controller reduced both the overshoot
and the settling time, and had small
effect on the rise time and the steady-
state error.
Closed Loop with PI-Controller
The closed-loop T.F is𝐶(𝑠)
𝑅(𝑠)=
𝐾𝑝 𝑠 + 𝐾𝐼
𝑠3 + 10 𝑠2 + 20 + 𝐾𝑝 𝑠 + 𝐾𝐼
Let Kp equals 300 and Ki equals 70, then change the m-file to the following:
>> Kp = 300; KI = 70;
>> num = [Kp KI];
>> den = [1 10 20+Kp KI];
>> t = 0 : 0.01 : 2 ;
>> step (num,den,t)
Closed Loop with PI-Controller
Running this m-file in the Matlab command window should gives you the
following plot.
We have reduced the proportional gain
(Kp) because the integral controller also
reduces the rise time and increases the
overshoot as the proportional controller
does (double effect). The above response
shows that the integral controller
eliminated the steady-state error.
Closed Loop with PID-Controller
The closed-loop T.F is
𝐶(𝑠)
𝑅(𝑠)=
𝐾𝐷 𝑠2 + 𝐾𝑝 𝑠 + 𝐾𝐼
𝑠3 + (10 + 𝐾𝐷)𝑠2 + 20 + 𝐾𝑝 𝑠 + 𝐾𝐼
Let Kp equals 350, Kd equals 50 and Ki equals 300, then change the m-file tothe following:>> Kp = 350; KI = 300; KD = 50;
>> num = [KD Kp KI];
>> den = [1 10+ KD 20+Kp KI];
>> t = 0 : 0.01 : 2 ;
>> step (num,den,t)
Closed Loop with PID-Controller
Running this m-file in the Matlab command window should gives you the
following plot.
Now, we have obtained the system with no
overshoot, fast rise time, and no steady-
state error.
General tips for designing a PID controller
When you are designing a PID controller for a given system, follow the
steps shown below to obtain a desired response.
1) Obtain an open-loop response and determine what needs to be improved
2) Add a proportional control to improve the rise time
3) Add a derivative control to improve the overshoot
4) Add an integral control to eliminate the steady-state error
5) Adjust each of Kp, Ki, and Kd until you obtain a desired overall response.
98