You are on page 1of 19

FACULTY OF ENGINEERING & TECHNOLOGY

LAB REPORT

CONTROL ENGINEERING

EME 3206

TRIMESTER 2 (2012/2013)

Title of experiment
Name
ID
Group
Date of Experiment
Date of Submission

Control System Modeling and Step Response


Ng Yie Chin
1091102724
27
01 November 2012
07 December 2012

EME 3206 Control Engineering


Lab 1: Control System Modeling and Step Response
Objectives
1. To design proportional-integral-derivative (PID) controller for closed loop
control.
2. To evaluate the performance of different controllers based on maximum
overshoot, rise time, settling time and steady-state error.
Introduction
In this lab, you will learn the characteristics of the each of the proportional (P), integral
(I) and derivative (D) control terms, and how to use these terms to obtain a desired
response. Consider the following unity feedback system:

Figure 1
Plant: A system to be controlled
Controller: Provides the excitation for the plant; designed to control the overall
system behavior
The three-term PID controller
The transfer function of the PID controller is
KI
K D s2+ K s s + K i
G c ( s ) =K p + + K D s=
s
s
where KP = proportional constant; KI = integral constant; and KD = derivative constant.
The P term, I term and D term are given by

P term: KP
KD
I term: s

D term: KDs

First, let's take a look at how the PID controller works in a closed loop system using
Figure 1. The variable e = (R Y) represents the tracking error, which is the difference
between the desired input value R and the actual output Y. 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 control signal u produced by the controller is given by
u=K p e + K I e dt+ K D

de
dt

The signal u will form the input to the plant, producing the output Y. The output Y will be
feedback (via a sensor) to allow the error signal e to be recalculated. The controller takes
this new error signal and computes its derivative and its integral again. This process is
continuous and goes on and on. The objective is to minimize e. In the ideal case, e = 0
and Y = R.
The characteristics of P, I and D controllers
A proportional controller will have the effect of reducing the rise time and will reduce,
but never eliminate, the steady-state error. An integral controller will have the effect of
eliminating the steady-state error, but it may make the transient response worse. A
derivative controller will have the effect of increasing the stability of the system,
reducing the overshoot, and improving the transient response. The general effects of
increasing each of KP, KI and KD on a closed loop system are summarized in Table 1.

Note that these correlations may not be exactly accurate, because the effects of KP, KI and
KD are dependent on one another. Changing one of these variables can change the effects
of the other two. For this reason, Table 1 should only be used as a reference when you are
determining the values for KP, KI and KD.
Time domain performance measures
Maximum overshoot: Let ymax denote the maximum value of y(t) and y ss be the steadystate value of y(t) and ymax > yss. The maximum overshoot of y(t) is defined as
Maximum overshoot = ymax - yss
Rise time: The rise time is defined as the time required for the step response to rise from
10% to 90% of its final value.
Settling time: The settling time is defined as the time required for the step response to
reach and stay within a specified percentage (5%) of its final value.

Procedure:
a) Open loop system
1. To view the open loop step response, a new m-file is created by clicking File
New M-file in the MATLAB command window. A MATLAB editor or
debugger window will pop up.
2. In this window, the following codes were typed and saved as file.
num = 1;
den = [1 10 20];
step (num, den)
Here, num denotes the numerator polynomial coefficients in s and den
denotes the denominator polynomial coefficients in s step is a MATLAB
function. To find out more about this function, type help step at the
MATLAB command prompt.
3. The m-file is run by clicking Tools Run in the MATAB editor/debugger
window. The plot is obtained and shown in Figure 2.

Figure 2
4. The final value is checked by using Final Value Theorem show in Table 2.

5. From the response obtained, the maximum overshoot, rise time and settling
time is found. (The steady-state error is calculated based on Final Value
Theorem.)
b) Proportional control
1. The closed loop transfer function of the above system with a proportional
controller is:
20+ K
s +10 s+( p)
X (s ) K p
=
F (s )
2

The derivation of the closed loop transfer function was showed in Table 2.
2. The proportional constant Kp was set to 300 and the m-file was changed to the
following:
Kp=300;
num=[Kp];
den=[1 10 20+Kp];
t=0:0.01:2;
step(num,den,t)
3. This m-file is run to obtain the step response plot. The plot has shown that the
proportional controller reduced the rise time, the settling time and the steadystate error, but increased the overshoot.
4. The relevant entries were completed in Tables 2 and 3.
c) Proportional-Derivative control
1. The closed loop transfer function is derived on the given system with a PD
controller and is recorded in Table 2.
2. KP is set to 300 as before and K D is set to 10. A new m-file is created, the
necessary codes are typed and the m-file is run.

3. The relevant entries are completed in Table 2 and 3.


d) Proportional-Integral control
1. The closed loop transfer function of the given system is derived with a PI
controller and is recorded in Table 2.
2. KP is reduced to 30 and KI is set to 70. A new m-file is created, the necessary
codes are typed and the m-file is run. Note that the proportional constant is
reduced because the rise time is reduced and the overshoot is increased by
integral term as the proportional term does. The double effect is shown.
3. The relevant entries were complete in Tables 2 and Table 3.

e) Proportional-Integral-Derivative control
1. The closed loop transfer function of the given system is derived with a PID
controller and recorded in Table 2.
KP

2. There are several methods to choose the parameters

KI

and

KD

One of the methods is by trial and error using Table 1 as a guide. At least 4
sets of values for

KP

responses are noted too.

KI
KP

when choosing the values of

KD

and
,

KI
KP

are tried and the closed loop step

and

KD

are varying one at a time

KI

and

KD

in order to see the

effects of changing the parameter. These are recorded in Table 3.

3. It is repeating by using

KP

= 350,

KI

= 300 and

4. The relevant entries were completed in Tables 2 and 3.

KD

= 50.

Result
b. Proportional control

Figure 2.2 Proportional control (P)

c. Proportional Derivative control

Figure 2.3 Proportional-Derivative control (PD)

d. Proportional Integral control

Figure 2.4 Proportional-Derivative control (PI)

e Proportional Integral Derivative control

Figure 2.5.1 PID controls with

K p=70, K I =60, K D =10

Figure 2.5.2 PID control with

K p=140, K I =120, K D =20

Figure 2.5.3 PID control with

K p=210, K I =180, K D =30

Figure 2.5.4 PID control with

K p=280, K I =240, K D =40

Figure 2.5.5 PID control with

K p=350, K I =300, K D =50

Table 2
a. Open loop

Transfer function:

No of finite zeros = 0
No of pole = 2

X (s)
1
= 2
F(s) s +10 s +20

System order = 2

Final value:

lim x ( t )=lim sX ( s )
x

lim s
s 0

b. P control

x 0

( 1s )( s +101s +20 )
2

1
20

Transfer function:

No of finite zeros = 0
No of pole = 2

Kp
X (s)
= 2
F(s) s +10 s + ( 20+ K p )

System order = 2

300
s +10 s+320
2

Final value:

lim x ( t )=lim sX ( s )
x

lim s
s 0

300
320

x 0

( 1s )( s +10 s +1(20+ K ) )
2

0.9375

c. PD control

Transfer function:

No of finite zeros = 1
No of pole = 2

K d s+ K p
X (s )
= 2
F ( s ) s + ( 10+ K d ) s + ( 20+ K P )

System order = 2

10 s+ 300
s +20 s+320
2

Final value:

lim
s 0

K ds+K p
s + ( 10+ K d ) s+ ( 20+ K p )
2

300
320

0.9375

d. PI control

Transfer function:

No of finite zeros = 1
No of pole = 3

K p s+ K i
X (s)
= 2
F(s) s + ( 10 ) s 2 +(20+ K P ) s+ K i

30 s +70
2
s + ( 10 ) s +50 s +70
2

Final value:

System order = 3

lim
s 0

K p s+ K i
s + ( 10 ) s +(20+ K P )s + K i
2

70
70

e.

PID

Transfer function:

No of finite zeros = 2

control

No of pole = 3
2

System order = 3

K d s + K p s+ K i
X (s )
= 3
F ( s ) s + ( 10+ K d ) s 2 + ( 20+ K P ) s + K i

350 s 2+ 50 s+300
s3 +360 s2 +70 s +300

Final value:

lim
s 0

Kd s +K p s +Ki
s 3+ ( 10+ K d ) s2 + ( 20+ K P ) s+ K i

300
300

Table 3
Controller

KP

KI

KD

Maximu

Rise time

Settling

Steady-

(s)

Time (s)

state error

overshoot

a. Open loop
b. P
c. PD
d. PI
e. PID

300
300
30
70
140
210
280
350

70
60
120
180
240
300

10
10
20
30
40
50

0
39.7
12.0
1.26
0
0
0
0
0

0.885
0.074
0.099
0.410
0.922
0.254
0.115
0.074
0.055

1.590
0.772
0.327
0.620
2.930
1.890
1.400
1.070
0.831

0.950
0.062
0.062
0
0
0
0
0
0

Exercise
1

The block diagram of the P control system is shown below.

Kp

1
2
s +10 s+20

Kp
2

Kp
Y
s +10 s +20
=
= 2
R
Kp
s +10 s+ ( 20+ K p )
1+ 2
s + 10 s+ 20

Kp
s2 +10 s+(20+ K p )

For PD control system, the transfer function is


K d s+ K p
X (s)
= 2
F(s) s + ( 10+ K d ) s +(20+ K P )
The number of closed loop system pole is two.
2

n
Y ( s)
= 2
R ( s ) s +2 n s+ n2

K d s+ K p

10 s+300
s + ( 10+ K d ) s+( 20+ K P ) s +20 s +320
2

n2 =320
2 n=20
=

20
=0.5590
2 320

Obviously, the system is under-damped because the damping ration is smaller


than 1.

A general transfer function G(s) is given by


K ( 1+T 1 s ) ( 1+T 2 s ) (1+T m s)
G ( s )= j
s ( 1+T a s ) ( 1+ T b s ) (1+T n s)
where K and all the T are constants. The system type refers to the order of the
pole of G(s) at s=0. Thus, the closed-loop system having a forward path transfer
function of type j, where j = 0,1,2,
e =constant
For type 0 system:
steady state error, ss
For type 1 or higher system: steady state error,

e ss =0

Therefore, for system without any controller, the steady-state error is a constant,
so the system is type 0. For system with P controller, the steady-state error is a
constant, so the system is type 0. For system with PD controller, the steady-state
error is a constant, so the system is type 0. For system with PI controller, the
steady-state error is a 0, so the system is type 1 or higher. For system with PID
controller, the steady-state error is a 0, so the system is type 1 or higher.

Discussion
Throughout the lab, we have learned on how to design the PID controller for a given
system. We have also seen the effects of varying each of the P, I and D term on the
controller performance.
When we are designing a PID controller for a given system, we follow the steps shown
below to obtain a desired response.
1

Obtain an open-loop response and determine what needs to be improved

Add a proportional control to improve the rise time

Add a derivative control to improve the overshoot

Add an integral control to eliminate the steady-state error

Adjust each of Kp, Ki, and Kd until obtain a desired overall response.

Conclusion
In conclusion, Open loop system have the most highest steady-state error and rise time
compare to the Proportional (P) control, Proportional Derivative (PD) control,
Proportional-Integral (PI) control and Proportional-Integral-Derivative (PID) control
which is 0.950 and 0.885s respectively.
Besides that, the Proportional (P) controller decrease the rise time, settling time and the
steady-state error vastly, but it increases the maximum overshoot to 39.7 %
For Proportional Integral (PI) controller, it can reduce steady-state error to zero
percentage although it does not change much in rise time, settling time and the
percentage of maximum overshoot.
The Proportional-Integral-Derivative (PID) controller is conducted to improve the
K P , K I K D
performance of the controller with different values of
. The desirable
controller gives the lowest rise time, settling time, and steady-state error. Besides, it also
will have the lowest percentage of maximum overshoot (merely zero or zero) as we
obtain for the desirable (KP=350, KI=300 and KD=50).

You might also like