PID Controller
PID Controller
PID Controller
1
1
1 2
2
1 2
2
m
m
, (1)
where K
PR
denotes the process steady-state gain, and
a
1
to a
n
and b
1
to b
m
are the corresponding parameters
(mn) of the process transfer function, and T
del
represents the process pure time delay.
The PID controller is given by the following transfer
function:
( )
( )
( )
G s
U s
E s
K
sT
sT
sT
C
i
d
f
= = + +
+
1
1
1
, (2)
where U and E denote the Laplace transforms of the
controller output, and the control error (e=w-y),
respectively. The controller parameters K, T
i
, T
d
, and
T
f
represent proportional gain, integral time constant,
derivative time constant, and filter time constant,
respectively.
The PID controller in a closed-loop configuration
with the process is shown in Fig. 1, where d denotes a
load disturbance.
Fig. 1. The closed loop system with PID controller
The goal of tuning is to find such a controller that
makes the closed-loop magnitude (amplitude)
frequency response (G
CL
) from the set-point to the
plant output as flat and as close to unity as possible
for a large bandwidth. The requirements can be
expressed in the following way:
( )
( )
( )
( ) ( )
( ) ( )
G j
Y j
W j
G j G j
G j G j
CL
P C
P C
= =
+
1
1 . (3)
This technique is called magnitude optimum (MO)
(Umland and Safiuddin, 1990), modulus optimum
(strm and Hgglund, 1995), or Betragsoptimum
(strm and Hgglund, 1995; Kessler, 1955), and
results in a fast and non-oscillatory closed-loop time
response for a large class of process models.
The closed-loop tuning goal can be easily
transformed into the open-loop criterion by using the
well-known M and N circles known from the basic
control theory. To achieve the same tuning goal as
given above, the open-loop Nyquist curve should
follow the vertical line with the real value -0.5 up to
the highest frequency possible (Hanus, 1975). If the
controller is of the same order as the process, the
open-loop Nyquist curve will follow the vertical line
up to the frequency = (see solid line in Fig. 2).
Otherwise, open-loop Nyquist curve will turn away
from the vertical line at higher frequencies (see
dashed line in Fig. 2).
2 1.5 1 0.5 0 0.5 1 1.5 2
2
1.5
1
0.5
0
0.5
1
1.5
2
Re
I
m
Fig. 2. Nyquist chart of the open-loop frequency
response G
P
(j)G
C
(j);
__ frequency response when using a controller
with same order than the process,
-- frequency response when using a controller
with lower-order than the process.
Following the procedure given by Hanus, (1975),
such tuning goal can be achieved by moving the zeros
of the function Re{G
P
(j)G
C
(j)}+0.5 toward =0.
In order to derive the PI and the PID controller
parameters according to the given MO criterion,
firstly the pure time delay in equation (1) has to be
developed into the Taylor series:
( ) ( )
e sT
sT sT
sT
del
del del
del
= + + 1
2 3
2 3
! !
m. (4)
The open-loop system transfer function can then be
expressed in the following way:
( ) ( ) G s G s
d d s d s d s
c s c s c s c s
C P
=
+ + + +
+ + + +
0 1 2
2
3
3
0 1
2
2
3
3
4
l
l
, (5)
where parameters c
i
and d
i
are functions of the
transfer function (Equation 1), and PID controller
(Equation 2) parameters (see e.g. Vrani et al.,
1997c).
In order to determine three PID controller
parameters, as required by the presented magnitude
optimum criterion, the first three equations (n=0..2)
from the following set of equations must hold (Hanus,
1975):
( ) ( ) =
+
=
+
=
1
1
2
1
2 1
0
2 1
2
0
2
i
i n i
i
n
i
i n i
i
n
d c c c (6)
When inserting parameters c
i
and d
i
from equation (5)
into equation (6), and applying T
f
=0
1
, the following
PID controller parameters can be expressed by the
unknown process parameters (Vrani, 1997):
( )
( )
( ) ( )
( )
K
a a b a b a a a b
a b T a a b a b
T
a b
T
K
a b a a a b a b b
b T a b T a b
T
T a b T
del
del del
PR del del
del
d del
=
+ + +
+ + + +
+ +
+ + +
+ + + +
+ +
1
3
1
2
1 1 2 1 2 2 1
3 3 1
2
1 1 2 2
2
1 1
3
1
2
1 1 2 1 1
2
3 1 2
3 1 1
2
2
1 1
3
1 1
2
2
2 6
2
3
(7)
( )
( )
( )
( )
T
a a b a b a a a b
a b T a a b a b
T
a b
T
a a b a b T a b
T
T a b T
i
del
del del
del
del
d del
=
+ + +
+ + + +
+ +
+ + +
+
1
3
1
2
1 1 2 1 2 2 1
3 3 1
2
1 1 2 2
2
1 1
3
1
2
1 1 2 2 1 1
2
1 1
2
2 6
2
(8)
( ) T f a a b b T
d del
=
1 5 1 5
m m , , (9)
Note that the explicit result for the derivative time
constant is not given. The reason is that equation (9)
would fill up one full page of this lecture.
In order for the method to be applied, an explicit
identification of the parameters K
PR
, a
1
, a
2
, a
3
, a
4
, a
5
,
b
1
, b
2
, b
3
, b
4
, b
5
, and T
del
of the transfer function
(Equation 1) is required. However, it is well known
that exact and reliable identification of such a number
1
The derivation of PID controller parameters, when T
f
0
is given in Vrani (1997). However, T
f
does not affect
seriously the accuracy of the calculated controller
parameters when choosing T
f
=T
d
/10 as was used in all the
closed-loop experiments given in this lecture.
of parameters from real measurements is very
problematic.
This problem can be avoided by using the concept of
multiple integrations (Rake, 1987; Strejc, 1959).
Following Rake, (1987), and considering equation
(1), the following areas can be expressed by
integrating the process open-loop step response (y(t)),
after applying the step-change U at the process
input:
( ) ( )
( )
( ) ( )
( )
( )
A y K a b T
A y K b a T b
T
A a
A y K
a b
T b
i
A a
PR del
PR del
del
k k PR
k
k k
k i
i
k
del
i
k i
k i
i
k
i k i
1 1 1 1
2 2 2 2 1
2
1 1
1
1
1
1
1
2
1
1
1
= = +
= = +
1
]
1
1
+
+
= =
+
+
|
'
+
+
+
+
=
+
=
!
( )
!
o (10)
where
( )
( ) ( )
( ) ( ) [ ]
( ) ( )
[ ]
y t
y t y
U
y t K y d
y t A y d
PR
t
k k k
t
0
1 0
0
1 1
0
0
=
=
=
o
, (11)
In order to clarify the mathematical derivation,
graphic representations of the first three areas (A
1
to
A
3
) are shown in Figures 3 to 5.
When inserting the calculated areas (Equation 10),
obtained from the process open-loop step response,
into equations (7) to (9), the following result is
obtained:
T
A A A A
A A A
d
=
3 4 2 5
3
2
1 5
(12)
( )
K
A
A A A K T A
PR d
=
3
1 2 3 1
2
2
(13)
T
A
A T A
i
d
=
3
2 1
(14)
Note that the PI controller parameters can be
expressed from equations (13) and (14) simply by
applying T
d
=0.
Fig. 3. The graphic representation of area A
1
Fig. 4. The graphic representation of area A
2
Fig. 5. The graphic representation of area A
3
Now obviously only the process steady-state gain
K
PR
, and five areas (A
1
to A
5
) are needed to calculate
the unknown PID controller parameters, and three
areas (A
1
to A
3
) to calculate the unknown PI
controller parameters.
As seen from equations (10) and (11), or Figures 3 to
5, the areas A
1
to A
5
can be calculated from the
process open-loop step response by a simple
numerical integration, whilst the gain K
PR
can be
determined from the steady-state value of the process
step response in the usual way.
All together this means substantial reduction of the
number of the required parameters (areas A
1
to A
5
instead of transfer function parameters a
1
..a
5
, b
1
..b
5
,
and T
del
) and consequently important simplification of
expressions for K, T
i
, and T
d
.
One of the main points is, however, that the mapping
of equations (7), (8), and (9) into equations (13),
(14), and (12) is an exact and not an approximate
one. This means that the PID parameters defined by
the MO criterion and originally expressed by
complicated relations between the parameters of the
transfer function, can be equally well expressed by
single combination of corresponding areas obtained
from the step response.
The PID controller tuning procedure can therefore
proceed as follows:
measure the process step response,
find the process steady-state gain K
PR
and areas
A
1
, to A
5
(by using numerical integration
(summation) from the start to the end of the
process step response), and
calculate the PID controller parameters by using
equations (12) to (14).
2.1 Illustrative example
Let us now illustrate the proposed PID controller
design in one example.
The following fifth-order process model is chosen:
( )
G s
s
P
( )
.
=
+
15
1
5
. (15)
At first, a step-change U=2 is applied to the process
input. The process open-loop step response is shown
in Fig. 6 above. The starting process steady-state is
y(0)=0, and the final steady-state of the process is
y()=3, so the process steady-state gain
K
PR
=(y()-y(0))/U=1.5. Function y
1
(t) is obtained
by numerically integrating a difference K
PR
-(y(t)-
y(0))/U, as given by equation (11). Function y
1
(t) is
shown in Fig. 6 below. The final steady-state
y
1
()=7.5 equals area A
1
(10). Similarly, area A
2
can
be obtained by numerically integrating the difference
between A
1
=y
1
() and y
1
(t), as given by equations
(10) and (11). Calculated function y
2
(t) is given in
Fig. 7. The final steady-state value of y
2
(t)
corresponds to A
2
(A
2
=y
2
()=22.5). The remaining
functions (y
3
to y
5
) and areas (A
3
to A
5
) can be
calculated in the similar manner. Functions y
3
(t) to
y
5
(t) are shown in Fig. 7.
Hence, the following values of the process steady-
state gain and the areas are obtained from the process
step-response:
K A A
A A A
PR
= = =
= =
15 7 5 22 5
105 189
1 2
3 4 5
. , . , . ,
,
= 52.5,
. (16)
The optimal PID controller parameters are calculated
from equation (16) by using equations (12) to (14):
K T s T s
i d
= = = 0 708 3 4 0 94 . , . , . . (17)
0 2 4 6 8 10 12 14 16 18 20
0
0.5
1
1.5
2
2.5
3
Time [s]
Process output (y)
0 2 4 6 8 10 12 14 16 18 20
0
2
4
6
8
Time [s]
Function y1(t)
Fig. 6. Process step response (y) (above) and function
y
1
(t) (below)
0 5 10 15 20
0
5
10
15
20
25
Time [s]
Function y2(t)
0 5 10 15 20
0
10
20
30
40
50
60
Time [s]
Function y3(t)
0 5 10 15 20
0
20
40
60
80
100
120
Time [s]
Function y4(t)
0 5 10 15 20
0
50
100
150
200
Time [s]
Function y5(t)
Fig. 7. Function y
2
(t) (above left), function y
4
(t)
(above right) , function y
5
(t) (below left), and
function y
5
(t) (below right)
The optimal PI controller parameters can be
calculated as well by applying T
d
=0 into equations
(13) and (14):
K T s
i
= = 0 292 2 33 . , . . (18)
Fig. 8 shows the closed-loop time responses on the
reference change (w=1 at t=0s), and on the load-
disturbance (d=1 at t=30s) when using the PI and the
PID controller. It is clear that both closed-loop
responses are quite acceptable, all according to the
chosen MO tuning criterion.
Two Nyquist curves of the open-loop frequency
response G
C
(j)G
P
(j) (when using the PI and the
PID controller) are shown in Fig. 9. It is clear that
both Nyquist curves closely follow the vertical line
with the real value -0.5 at lower frequencies, as
prescribed by the MO tuning criterion.
0 10 20 30 40 50 60
0
0.5
1
1.5
2
2.5
Time [s]
Process output
0 10 20 30 40 50 60
1
0
1
2
3
Time [s]
Process input
Fig. 8. Process output (y) (above) and controller
output (u) (below) during the closed-loop
experiment with: __ PID controller, -- PI
controller
2 1.5 1 0.5 0 0.5 1 1.5 2
2
1.5
1
0.5
0
0.5
1
1.5
2
Re
I
m
Fig. 9. Nyquist curve of the open-loop frequency
response when using: __ PID controller, -- PI
controller
3. SOME GUIDELINES FOR PRACTICAL
WORK
In the previous section it was shown that the
implementation of the magnitude optimum multiple
integrations (MOMI) method is very simple and
straightforward. Only the process step response has to
be measured and some integrations (summations) to
be performed in order to calculate areas A
1
to A
5
(A
1
to A
3
for PI controller). However, there are always
some additional obstacles which have to be overcome
in order to be able to implement the method in
practice. In this section a few practical guidelines for
deriving areas from process step response will be
given, as well as some modifications of the tuning
procedure if the calculated controller gain is too high
or even negative.
3.1 Performing multiple integrations in practice
Areas A
1
to A
5
can be calculated from the final values
(t=) of signals y
1
(t) to y
5
(t) (Equation 10). In
practice, of course, it is enough to wait until process
step response settles. Fig. 10 shows a typical process
step response. At t=t
1
, a step-change is applied to the
process input. Process practically reaches the steady-
state value at t=t
int
, so all integrations in equation (11)
can be made in time interval t=[t
1
, t
int
].
Fig. 10. Process input and output during step-change
experiment.
However, making relatively small errors in the
calculation of the process steady-state gain (K
PR
)
could lead to relatively large errors in calculated
areas. Such errors are especially noticeable when
dealing with process with present noise. In order to
improve the accuracy of the calculated K
PR
, the
process step response should be averaged in time
intervals
t=[t
0
, t
1
] (before making step change) and t=[t
int
, t
fin
]
(after new steady-state is already achieved) in the
following way (see Fig. 10):
( ) [ ]
( )
[ ]
y y t t t t
y y t t t t
a
a fin
0 0 1
1
= =
= =
; ,
; ,
int
(19)
A process steady-state gain is then simply calculated
as:
K
y y
U
PR
a a
=
1 0
(20)
Note that y(0) in (11) should be replaced by y
a0
.
How to choose time instants t
0
and t
fin
? Numerous
experiments on several process models and
laboratory plants showed that good practical results
are usually obtained when choosing:
( )
( )
t t t t
t t t t
int
fin int int
1 0 1
1
01 0 3
01 0 3
=
=
. .
. .
l
l
(21)
Let us now illustrate the proposed integration
procedure in one example.
The following process model is chosen:
( )
G s
s
P
( ) =
+
1
1 4
3
. (22)
A random noise, generated by MATLAB function
RANDN, and amplified by factor 0.05, was added to
the process step response. The process output and
input signals are shown in Fig. 11.
0 10 20 30 40 50 60 70 80
0
0.5
1
Time [s]
Process output
0 10 20 30 40 50 60 70 80
0.2
0
0.2
0.4
0.6
0.8
1
Time [s]
Process input
Fig. 11. Process output (y) and controller output (u)
during the open-loop experiment on the process
with present noise.
The following time intervals were chosen: t
0
=0s,
t
1
=10s, t
int
=50s, and t
fin
=60s. Values y
a0
and y
a1
were
calculated by averaging process output signal during
intervals t=[t
0
, t
1
] and t=[t
int
, t
fin
] (Equation 19) and
resulted in y
a0
=-6.9710
-4
, and y
a1
=0.996. Using
equation (20), the calculated process gain was
K
PR
=0.997. Functions y
1
(t) to y
5
(t) were calculated
from equation (11), where integrations were
performed in time interval t=[t
1
, t
int
]. Areas A
1
to A
5
were calculated from y
1
(t
int
) to y
5
(t
int
). The following
values of areas and controller parameters were
obtained:
process K A
A A A
A
PI K T
PID K T T
PR
: . , . ,
. , ,
.
:
:
= 604.1,
= 0.595, = 6.46
= 2.50, = 9.92, = 2.74
i
i d
= =
= =
=
0 997 1187
93 47 3433
1 762 10
1
2 3 4
5
4
. (23)
The ideal values, obtained on the process without
present noise, were the following:
process K A A
A A A
PI K T
PID K T T
PR
: , , ,
, .
:
:
= 640,
= 0.625, = 6.67
= 2.31, = 9.87, = 2.59
i
i d
= = =
= =
1 12 96
3840 215 10
1 2
3 4 5
4
. (24)
It is clear that the obtained controller parameters
(Equation (23)) are close to the ideal ones (Equation
(24)).
Tuning procedure, shown above, was used as a basis
of the auto-tuning algorithm, which will be explained
in more details in section 4.1.
3.2 Re-tuning the controller parameters
In some cases, the controller parameters, obtained by
using the MOMI method, have to be re-tuned due to
some practical reasons. Namely, when tuning the PID
controllers for a first-order or second-order process
the controller gain is in accordance with MO tuning
criterion theoretically infinite. In practice (when
process noise is present), the calculated controller
gain can have a very high positive or negative value.
In this case the controller gain should be limited to
some acceptable value, which depends on the
controller and the process limitations.
The remaining two controller parameters can now be
calculated according to the limited (fixed) controller
gain from equations (13) and (14):
T
A
K
K
i
PR
=
+
1
1
2
(25)
and
T
A
A
A A
A K
K
d PR
=
3
1
2
1 2
3
1
2
(26)
if
K
A A
A
K
PR
>
1
2
2
1 2
3
(27)
and
T
d
= 0 (28)
if
K
A A
A
K
PR
1
2
2
1 2
3
(29)
When limiting the controller gain in the PI controller
than, of course only equation (25) is used. Note that
the proposed re-tuning of controller parameters can
also be used in cases when slower and more robust
controller should be designed (by decreasing the
calculated gain K) or faster, but more oscillatory
response is required (by increasing the calculated
gain K).
Let us now illustrate the proposed modified tuning
procedure.
The following process model is chosen:
( )( )
G s
s s
P
( ) =
+ +
2
1 5 1
. (30)
The multiple integrations were performed on the
process step response (y), and the following values of
the process steady-state gain and areas were obtained
from equations (10) and (11):
K A A
A A A
PR
= = =
= = =
2 12 62
312 1562 7812
1 2
3 4 5
, , ,
, ,
(31)
In the next step PI and the PID controller parameters
were calculated from equations (12) to (14):
PI K T s
PID K T s T s
i
i d
: . , .
: , , .
= =
= = =
13 5 03
6 0 833
(32)
By fixing the controller gain to K=10, and by using
equations (25) and (26), the following modified PID
controller parameters were obtained:
K T s T s
i d
= = = 10 5 85 0 725 , . , . (33)
Fig. 12 shows the process closed-loop responses
when using the original PI controller and the
modified PID controller parameters. It is clear that
the process closed-loop response when using such
modified PID controller is very good. The Nyquist
curves of the open-loop system, when using the PI
and the modified PID controller parameters, are
shown in Fig. 13.
0 2 4 6 8 10 12 14 16 18 20
0
0.2
0.4
0.6
0.8
1
1.2
Time [s]
Fig. 12. Process output (y) and controller output (u)
during the closed-loop experiment with:
__ modified PID controller, -- PI controller
2 1.5 1 0.5 0 0.5 1 1.5 2
40
30
20
10
0
10
20
30
40
Re
I
m
Fig. 13. Nyquist curves of the open-loop frequency
response when using:
__ modified PID controller, -- PI controller
4. EXPERIMENTS ON LABORATORY PLANTS
4.1 Description of auto-tuning algorithm
An auto-tuning algorithm, made in the Pascal
programme language has been built up to show the
advantages of using the proposed tuning method in
the auto-tuning controllers (Vrani, 1997).
The block scheme of the auto-tuning algorithm is
given in Fig. 14.
Fig. 14. Block diagram of the auto-tuning algorithm
4.1.1 Inserting parameters
At first, the algorithm requires some parameters for
proper initialisation:
sampling time (T
S
),
amplitude of the step-change at the process input
(U),
maximum allowable proportional gain of the
controller (K), (see sub-section 3.2), and
approximate process main time constant (T
main
).
The last parameter (T
main
) does not have to be
accurate. It is generally enough to estimate the range
of the value (e.g. 1s, 10s, 100s...).
4.1.2 Manually driving the process into the steady-
state
After inserting the parameters, the algorithm switches
into the manual mode and the process has to be
driven to the desired steady-state. When the process
output settles the open-loop step-response can be
performed.
4.1.3 Performing the open-loop step response
At first, a standard deviation (
1
) and a mean value
( y
1
) of the process output signal is measured by
using the recursive algorithms, during the period
0<tt
1
=T
main
/4 (see Fig. 15 and a block-diagram in
Fig. 16). Then, at t=t
1
=T
main
/4, a step-change U is
applied to the process input. After t=t
1
, five integrals
of ( ) y t y
1
are calculated recursively, where y(t)
denotes the process output and
( ) ( ) y
t t
y t dt y t t t t
i
i i
i i
t
t
i
i
=
= =
1
1
1
1
; [ , ] . (34)
Time instants t
1
to t
n
are defined in the following
way:
t
t
T
t T
t t T
i
i
main
i main
i i main
+
=
+ <
1
4
1 25
;
. ;
. (35)
Fig. 15. Process output during the open-loop and the
closed-loop experiments performed by the auto-
tuning algorithm
In time intervals t
i-1
t t
i
(i=2...n), the process
standard deviation:
( ) ( )
i
i i
i
t
t
t t
y t y dt
i
i
=
1
1
1
(36)
and the process mean value y
i
(see Equation (34))
are recursively calculated. The multiple integrations
of the process step response are also recursively
calculated from t=t
1
and are terminated at t=t
n-1
, when
the standard deviation becomes
n-1
2
1
or when
n-1
max
/40, where
max
max =
= k n
k
1 1 l
. (37)
The steady-state gain of the process is calculated at
t=t
n
in the following way:
K
y y
U
PR
n
=
1
, (38)
t=0
t
1
=T
main
/4
t=t+T
S
t=t+T
S
t=t+T
S
apply a step change
(U) to the process input
i=1
max
=0
TD=FALSE
TLD=1.5
1
i=i+1
calculation of A
1
to A
5
calculation of the
PI and the PID controller
parameters
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
recursively calculate
1
,
calculate I
1
to I
5
,
i
,
calculate
n=i+1
t
i-1
-t
1
<T
PROC
t
i
=1.25t
i-1
t
i
=t
i-1
+T
main
/4
i
>
max
i
>2.5
1
TLD<
max
/40
TLD=
max
/40
max
=
i
TD=TRUE?
TD=TRUE
i
<TLD
or
Fig. 16. Block-diagram of the auto-tuning algorithm whilst performing the open-loop step response.
At the same instant, the areas A
1
to A
5
are calculated:
( ) A K t t
I
U
PR n 1 1 1
1
=
, (39)
( )
( )
A A t t K
t t I
U
n PR
n
2 1 1 1
1 1
2
2
2
=
+
, (40)
( )
( )
( )
A A t t A
t t
K
t t I
U
n
n
PR
n
3 2 1 1 1
1 1
2
1 1
3
3
2
6
=
+
+
, (41)
( )
( )
( ) ( )
A A t t A
t t
A
t t
K
t t I
U
n
n
n
PR
n
4 3 1 1 2
1 1
2
1
1 1
3
1 1
4
4
2
6 24
=
+
+
, (42)
( )
( )
( ) ( )
( )
A A t t A
t t
A
t t
A
t t
K
t t
I
U
n
n
n n
PR
n
5 4 1 1 3
1 1
2
2
1 1
3
1
1 1
4
1 1
5
5
2
6 24
120
=
+
+
+
+
, (43)
where I
1
to I
5
are recursively calculated multiple
integrations of the process step response:
( ) I y y d
t
t
n
1 1
1
1
=
( ) , (44)
( ) I y y d d
t t
t
n
2 1 1
1
1
1
1
=
( )
, (45)
( ) I y y d d d
t t t
t
n
3 1 1 1 2 3
1
2
1
3
1
1
=
( )
, (46)
( ) I y y d d d d
t t t t
t
n
4 1 1 1 2 3 4
1
2
1
3
1
4
1
1
=
( )
, (47)
I y y d d d d d
t t t t t
t
n
5 1 1 1 2 3 4 5
1
2
1
3
1
4
1
5
1
1
=
( ( ) )
, (48)
where the process step response y(t) is approximated
by the linear function between two samples:
( ) ( )
( ) ( )
( ) ( )
( ) ( )
y t y k
y k y k
T
t t k
t k t t k
S
= +
<
1
1
1
1
;
, (49)
as given in Fig. 17.
After the process steady-state gain K
PR
and areas A
1
to A
5
are obtained, the PI and the PID controller
parameters are derived from expressions (12) to (14).
In order to achieve more robust auto-tuning
algorithm, the proportional gain of the PID controller
(K
PID
) is additionally limited to four times the
proportional gain of the PI controller (K
PI
):
K K
PID PI
4 . (50)
The remaining two PID controller parameters can be
calculated from Equations (25) to (29).
Fig. 17. The continuous-time approximation of the
process step-response between two discrete
samples.
4.1.4 Performing closed-loop experiments
After calculating areas A
1
to A
5
, the PI and the PID
controller parameters (the calculation is very fast due
to the recursive way of numerical integration), the
algorithm switches into automatic mode (into closed-
loop configuration).
After switching to automatic mode, the reference step
changes are applied (only for testing purposes), first
by using the PI controller from t
n
<tt
n+2
, and then by
using the PID controller from t
n+2
<tt
n+3
.
Note that in practical realisation of the PID
controllers, the implementation of the appropriate
anti-windup protection is of high importance. In this
auto-tuning algorithm, the conditioning technique is
applied as an anti-windup protection (see Peng et al.,
1996).
4.2 Real-time experiments
Two real-time experiments were performed on the
laboratory set-ups by using the Burr-Brown
acquisition system PCI-20000 (Vrani, 1997). The
first experiment was made on a pneumatic set-up
(process), given by Fig. 18. The input of the process
is the current reference i
in
(4/20 mA) on the servo-
driven valve V
1
and the output is the pressure p
1
between valves V
1
and V
2
(transferred to the voltage
u
out
by using the pressure-to-voltage transmitter in the
range from 0 to 10V).
Fig. 18. Pneumatic set-up.
Fig. 19 shows the system time response when running
the auto-tuning algorithm.
0 2 4 6 8 10 12 14 16
0.2
0.4
0.6
0.8
1
time [s]
__ process output (y), reference (w)
0 2 4 6 8 10 12 14 16
5
10
15
20
time [s]
__ process input (ur)
Fig. 19. Process output (upper Figure) and input
(lower Figure) during the open-loop tuning period
(0-1.2s) and the closed-loop testing period (1.2s-
17s) of the auto-tuning algorithm.
Fig. 20 shows the process open-loop step response in
more details from which the following values of the
process gain K
PR
, and areas A
1
to A
5
were calculated
by the auto-tuning algorithm: K
PR
=-0.0782,
A
1
=-0.0248, A
2
=-4.91910
-3
, A
3
=-7.74610
-4
,
A
4
=-1.03910
-4
, A
5
=-1.21910
-5
.
0 0.2 0.4 0.6 0.8 1
0.2
0.4
0.6
0.8
1
Time [s]
Process output
0 0.2 0.4 0.6 0.8 1
5
10
15
20
Time [s]
Process input
Fig. 20. The pneumatic set-up open-loop step
response.
The corresponding PI and PID controller parameters
are obtained from equations (12) to (14) and are:
PI K T s
PID K T s T s
i
i d
: . , .
: . , . , .
= =
= = =
6 31 0157
20 36 0 241 0 069
. (51)
The closed-loop responses (see Fig. 21) are quite
good for both controllers. It is obvious that the
closed-loop time response is faster when using the
PID controller, without significant increase of the
process overshoot. Different closed-loop transients at
low and high reference levels indicate the non-linear
characteristics of the plant. The higher process time
delay is clearly noticeable when decreasing the
pressure, rather than when increasing the pressure
(see Fig. 21).
4 5 6 7 8 9 10
0.2
0.4
0.6
0.8
1
time [s]
PI controller; __ process output (y), reference (w)
10 11 12 13 14 15 16
0.2
0.4
0.6
0.8
1
time [s]
PID controller; __ process output (y), reference (w)
Fig. 21. The closed-loop process responses under PI
and PID controller for the pneumatic set-up.
The second experiment was made on a motor-
generator laboratory plant, as shown in Fig. 22.
The plant input is the voltage on the amplifier input
(u
in
) which drives the motor, and the output is the
speed of the motor-generator system, measured at the
output of the speed-to-voltage converter (u
out
). Both
input and output signals are in the range from 0 to
10V.
Fig. 22. Motor-generator laboratory set-up.
Fig. 23 shows the system time response when running
the auto-tuning algorithm.
The process open-loop step response is shown in
more details in Fig. 24. From the step response the
following values of the process gain K
PR
, and areas A
1
to A
5
were calculated by the auto-tuning algorithm:
K
PR
=0.7144, A
1
=0.187, A
2
=3.19810
-2
, A
3
=4.35710
-3
,
A
4
=4.98910
-4
, A
5
=4.88110
-5
, and the resulting PI
and PID controller parameters are
PI K T s
PID K T s T s
i
i d
: . , .
: . , . , .
= =
= = =
0 76 0136
314 0 214 0 062
. (52)
0 2 4 6 8 10 12 14 16 18
3.5
4
4.5
time [s]
__ process output (y), reference (w)
0 2 4 6 8 10 12 14 16 18
0
2
4
6
8
10
time [s]
__ process input (ur)
Fig. 23. Process output (upper Figure) and input
(lower Figure) during the open-loop tuning period
(0-1.3s) and the closed-loop testing period (1.3s-
19s) of the auto-tuning algorithm.
The closed-loop responses (see Fig. 25) are very
good for both controllers. It is obvious that the
closed-loop response becomes faster when using PID
controller. Different process transients at low and
high reference levels again indicate the non-linear
process characteristics.
Note that in this case also some noise at the process
output is present.
0 0.2 0.4 0.6 0.8 1 1.2
3.4
3.6
3.8
4
4.2
4.4
Time [s]
Process output
0 0.2 0.4 0.6 0.8 1 1.2
5.5
6
6.5
7
7.5
Time [s]
Process input
Fig. 24. The motor-generator set-up open-loop
response.
5. DISCUSSION
The research related to the presented method was
extended also to some other areas like e.g.
multivariable PI controllers or Smith-predictor
schemes. It was shown that the same idea with some
modifications works quite successfully also in these
domains (Vrani et al., 1997b, Vrani et al., 1998).
Unfortunately, the MOMI method has also some
drawbacks which have to be mentioned.
Integration is a mathematical operation which is quite
inert to moderate high frequency noise present in the
process response. However, lower frequency noise,
like disturbances in the measured system, can
significantly deteriorate accuracy of the calculation of
areas.
4 5 6 7 8 9 10 11
3.5
4
4.5
time [s]
PI controller; __ process output (y), reference (w)
11 12 13 14 15 16 17 18
3.5
4
4.5
time [s]
PID controller; __ process output (y), reference (w)
Fig. 25. The closed-loop process responses under PI
and PID controller for the motor-generator set-up.
There are several different approaches to circumvent
this problem. First, to use larger excitation signals at
the process input if possible (since signal/disturbance
ratio is higher, higher accuracy of the calculated areas
can be obtained). Second, to carry out several
different experiments on the process (the average of
all process responses can then be used for the
calculation of areas. This can significantly reduce the
error, but on the other hand it also increases the time
of experiment).
If neither the first nor the second approach is
possible, the error in the calculation of controller
parameters can be reduced by using lower number of
areas. Namely, it is possible to calculate the PID
controller parameters based only on three areas
(instead of five), but such a solution is not more
optimal according to the MO criterion, because the
ratio T
d
/T
i
has to be fixed (Vrani et al., 1997a).
However, the obtained closed-loop responses of such
a controller are still faster than those obtained by
using the PI controller and are not oscillatory for
majority of the process models which frequently
appear in the process industry.
Beside the mentioned problems there are also some
difficulties related to the drawbacks of the original
magnitude optimum (MO) technique on which our
approach is based. One of them is that the closed-
loop stability is not guaranteed (Hanus, 1975).
Namely, there exist processes with stronger zeros or
complex poles, which correspond to equation (1), but
give unstable controller parameters (Vrani, 1997).
Even though it was not our prime intention to
improve the original MO technique, some ways how
to achieve stability for such processes by re-tuning
controller parameters, were proposed (Vrani,
1997).
Another, also frequently claimed problem is that the
process poles are cancelled by the controller zeros.
This may lead to poor attenuation of load
disturbances if the cancelled poles are excited by
disturbances, and if they are slow compared to the
dominant closed-loop poles (strm and Hgglund,
1995). Poorer disturbance rejection can be observed
especially when controlling low-order processes. In
such cases, disturbance rejection can be significantly
improved by using a two-degrees-of-freedom PI
(PID) controller (Vrani, 1997).
We are planning to report about the results mentioned
above in future publications.
6. CONCLUSIONS
The purpose of this lecture was to present a simple
tuning method for the PI(D) controller, suitable for a
large class of processes. The method is based on the
magnitude optimum (frequency domain) criterion
from which the formulae for calculation of PI(D)
controller parameters are derived. These formulae are
transformed into the new ones consisting mainly of
different areas which can be calculated from the
process step response by using the multiple
integrations method. This results in a quite simple
and straightforward time domain tuning approach.
Simulation experiments on different kinds of
processes have shown that the proposed method gives
better results in comparison to some other, more
frequently used, tuning procedures.
The method was also tested on two laboratory plants.
It was shown that it is quite robust to the process
high-frequency noise and non-linearity.
The drawback of this approach is that the method
requires a stable open-loop process response in order
to determine the appropriate controller parameters,
and that the low-frequency noise or disturbances can
significantly affect the accuracy of the calculated
controller parameters if some additional precautions
are not taken.
REFERENCES
strm, K. J., T. Hgglund, C. C. Hang, and W. K.
Ho (1993). Automatic Tuning and Adaptation
for PID Controllers - A Survey. Control
Engineering Practice, 1 (4), pp. 699-714.
strm, K. J., and T. Hgglund (1995). PID
Controllers: Theory, Design, and Tuning.
Instrument Society of America, 2
nd
edition.
Gorez, R. (1997). A survey of PID Auto-Tuning
Methods. Journal A, 38 (1), pp. 3-10.
Hanus, R. (1975). Determination of controllers
parameters in the frequency domain. Journal A,
XVI (3).
Kessler, C. (1955). ber die Vorausberechnung
optimal abgestimmter Regelkreise Teil III. Die
optimale Einstellung des Reglers nach dem
Betragsoptimum. Regelungstechnik, Jahrg. 3,
pp. 40-49.
Nishikawa, Y., N. Sannomiya, T. Ohta, and H.
Tanaka (1984). A Method for Auto-tuning of
PID Control Parameters. Automatica, 20 (3),
pp. 321-332.
Peng, Y., D. Vrani, and R. Hanus (1996). Anti-
windup, bumpless and conditioned transfer
techniques for PID controllers, IEEE Control
Systems Magazine, 16 (4), pp. 48-57.
Rake, H. (1987). Identification: Transient- and
Frequency-Response Methods. Systems &
Control Encyclopedia; Theory, Technology,
Applications, Madan G Singh, ed., Pergamon
Press.
Strejc, V. (1959). Nherungsverfrahren fr
aperiodische bergangscharakteristiken.
Regelungstechnik 7, pp. 124-128.
Umland, J. W., and M. Safiuddin (1990). Magnitude
and Symmetric Optimum Criterion for the
Design of Linear Control Systems: What Is It
and How Does It Compare with the Others?.
IEEE Transactions on Industry Applications, 26
(3), pp. 489-497.
Voda, A. A., and I. D. Landau (1995). A Method for
the Auto-calibration of PID Controllers.
Automatica, 31 (1), pp. 41-53.
Vrani, D. (1997). Design of Anti-Windup and
Bumpless Transfer Protection. Doctoral thesis.
Vrani, D., Y. Peng, J. Petrovi, and R. Hanus
(1997a). A new tuning method for PID
controllers. Pre-prints of the 4th IFAC
Conference on System Structure and Control,
Bucharest, pp. 438-443.
Vrani, D., Y. Peng, J. Lieslehto, S. Strmnik, and
R. Hanus (1997b). Design of MIMO PI
Controllers Using the Multiple Integration
Approach. IMACS World Congress, Berlin,
Vol. 5, pp. 149-154.
Vrani, D., Y. Peng, and J. Petrovi (1997c). A
new simple auto-tuning method for PID
controllers. Pre-prints of the 2nd IFAC
Workshop on New Trends in Design of Control
Systems, Smolenice, pp. 457-462.
Vrani, D., R. Hanus, and S. Strmnik (1998). A
new tuning method for delayed processes based
on the multiple integration method. Accepted by
the IFAC Conference on System Structure and
Control, Nantes, July 8-10, 1998.
Ziegler, J. G., and N. B. Nichols (1942). Optimum
settings for automatic controllers. Trans.
ASME, 64, pp. 759-768.