You are on page 1of 6

TUNING-RULES FOR FRACTIONAL PID

CONTROLLERS

Duarte Valério ∗,1 José Sá da Costa ∗


Technical Univ. of Lisbon – Instituto Superior Técnico
Department of Mechanical Engineering – GCAR
Av. Rovisco Pais 1, 1049-001 Lisboa, Portugal

Abstract: This paper presents several tuning rules for fractional PID controllers,
similar to the first and the second sets of tuning rules proposed by Ziegler and
Nichols for integer PIDs. Fractional PIDs so tuned perform better than integer
PIDs; in particular, step-responses have roughly constant overshoots even when
the gain of the plant varies.

Keywords: Fractional PIDs, tuning rules

1. INTRODUCTION are simple their usefulness is unquestionable (as


their widespread use attests).
PID (proportional—integral—derivative) control-
Fractional PID controllers are variations of usual
lers are well-known and widely used because they
PID controllers
are simple, effective, robust, and easily tuned. An
important contribution for this last characteristic I
was the development of several tuning rules for C(s) = P + + Ds (1)
s
tuning the parameters of such controllers from
some simple response of the plant. The data re-
where the (first-order) integral and the (first-
quired by a tuning rule would not suffice to find
order) derivative of (1) are replaced by fractional
a model of the plant, but is expected to suffice to
derivatives like this:
find a reasonable controller.
Such rules are the only choice when there is really I
C(s) = P + + Dsµ (2)
no model for the plant and no way to get it. Even sλ
when we do have a model, if our control specifica-
tions are not too difficult to attain, a rule may be (In principle, both λ and µ should be positive
all that is needed, saving the time and the effort so that we still have an integration and a dif-
required by an analytical method. Rules have their ferentiation.) Fractional PIDs have been increas-
problems, namely providing controllers that are ingly used over the last years (Podlubny, 1999).
hardly optimal according to any criteria and that There are several analytical ways to tune them
hence might be better tuned (and sometimes have (Vinagre, 2001; Caponetto et al., 2002; Caponetto
to be better tuned to meet specifications), but et al., 2004). This paper is concerned about how
since they often (though not always) work and to tune them using tuning rules.
It is organised as follows. Section 2 describes an
1 Partially supported by Fundação para a Ciência e a Tec-
analytical method that lies behind the develop-
nologia, grant SFRH/BPD/20636/2004, funded by POCI ment of the rules. Sections 3 to 7 describe tuning
2010, POS C, FSE and MCTES. rules similar to those proposed by Ziegler and
Nichols for (integer) PIDs 2 . Section 8 addresses
K
the question of how fractional PIDs can be im-

t
in
po
plemented. Section 9 gives some simple examples

n
io
ct
le
nf
and section 10 concludes the paper.

ti
ta
output

en
ng
ta
•inflection point
2. TUNING BY MINIMISATION
0
0 L L+T
time
In this tuning method, presented by (Monje et
al., 2004), we begin by devising a desirable be-
Fig. 1. S-shaped unit-step response
haviour for our controlled system, described by
five specifications (five, because the parameters to
be tuned are five): 3. A FIRST SET OF S-SHAPED RESPONSE
BASED TUNING RULES
(1) The open-loop is to have some specified
crossover frequency ωcg : The first set of rules proposed by Ziegler and
|C (ωcg ) G (ωcg )| = 0 dB (3) Nichols apply to systems with an S-shaped unit-
step response, such as the one seen in Fig. 1.
(2) The phase margin ϕm is to have some speci- From the response an apparent delay L and a
fied value: characteristic time-constant T may be determined
(graphically, for instance). A simple plant with
−π + ϕm = arg [C (ωcg ) G (ωcg )] (4)
such a response is
(3) To reject high-frequency noise, the closed K
loop transfer function must have a small G= e−Ls (8)
1 + sT
magnitude at high frequencies; hence, at
some specified frequency ωh , its magnitude
Tuning by minimisation was applied to some
is to be less than some specified gain H:
¯ ¯ scores of plants with transfer functions given by
¯ C (ωh ) G (ωh ) ¯ (8), for several values of L and T (and with
¯ 1 + C (ωh ) G (ωh ) ¯ < H (5)
¯ ¯
K = 1). The specifications used were
(4) To reject output disturbances and closely fol-
low references, the sensitivity function must ωcg = 0.5 rad/s (9)
o
have a small magnitude at low frequencies; ϕm = 2/3 rad ≈ 38 (10)
hence, at some specified frequency ωl , its ωh = 10 rad/s (11)
magnitude is to be less than some specified
gain N : ωl = 0.01 rad/s (12)
¯ ¯ H = −10 dB (13)
¯ 1 ¯
¯ 1 + C (ωl ) G (ωl ) ¯ < N (6) N = −20 dB (14)
¯ ¯

(5) To be robust when gain variations of the Matlab’s implementation of the simplex search in
plant occur, the phase of the open-loop trans- function fmincon was used; (3) was considered the
fer function is to be (at least roughly) con- function to minimise, and (4) to (7) accounted for
stant around the gain-crossover frequency: as constraints.
Obtained parameters P , I, λ, D and µ vary
¯
d ¯
arg [C (ω) G (ω)]¯¯ =0 (7) regularly with L and T . Using a least-squares fit,
dω ω=ωcg
it was possible to adjust a polynomial to the data,
Then the five parameters of the fractional PID are allowing (approximate) values for the parameters
to be chosen using the Nelder-Mead direct search to be found from a simple algebraic calculation.
simplex minimisation method. This derivative- The parameters of the polynomials involved are
free method is used to minimise the difference be- given in Table 1. This means that
tween the desired performance specified as above
and the performance achieved by the controller.
P = −0.0048 + 0.2664L + 0.4982T
Of course this allows for local minima to be found:
so it is always good to use several initial guesses +0.0232L2 − 0.0720T 2 − 0.0348T L (15)
and check all results (also because sometimes un-
and so on. These rules may be used if
feasible solutions are found).
0.1 ≤ T ≤ 50 and L ≤ 2 (16)
2 Rules in sections 3 and 4 have already been presented

in (Valério and Sá da Costa, 2005b; Valério and Sá da It should be noticed that quadratic polynomials
Costa, 2006). Those in sections 5, 6 and 7 are novel. were needed to reproduce the way parameters
Table 1. Parameters for the first set of tuning rules for S-shaped response plants
Parameters to use when 0.1 ≤ T ≤ 5 Parameters to use when 5 ≤ T ≤ 50
P I λ D µ P I λ D µ
1 −0.0048 0.3254 1.5766 0.0662 0.8736 2.1187 −0.5201 1.0645 1.1421 1.2902
L 0.2664 0.2478 −0.2098 −0.2528 0.2746 −3.5207 2.6643 −0.3268 −1.3707 −0.5371
T 0.4982 0.1429 −0.1313 0.1081 0.1489 −0.1563 0.3453 −0.0229 0.0357 −0.0381
L2 0.0232 −0.1330 0.0713 0.0702 −0.1557 1.5827 −1.0944 0.2018 0.5552 0.2208
T2 −0.0720 0.0258 0.0016 0.0328 −0.0250 0.0025 0.0002 0.0003 −0.0002 0.0007
LT −0.0348 −0.0171 0.0114 0.2202 −0.0323 0.1824 −0.1054 0.0028 0.2630 −0.0014

change with reasonable accuracy. So these rules


are clearly more complicated than those proposed
by Ziegler and Nichols (upon which they are
inspired), wherein no quadratic terms appear.

output
4. A SECOND SET OF S-SHAPED 0
P
RESPONSE BASED TUNING RULES 0
cr

time

Rules in Table 2 were obtained just in the same


way, but for the following specifications: Fig. 2. Plant output with critical gain control

ωcg = 0.5 rad/s (17) 6. A SECOND SET OF CRITICAL GAIN


BASED TUNING RULES
ϕm = 1 rad ≈ 57o (18)
ωh = 10 rad/s (19) Re-using in the same wise the data used in section
ωl = 0.01 rad/s (20) 4, corresponding to specifications (17) to (22),
other rules may be got with parameters given in
H = −20 dB (21)
Table 4. These rules may be applied if
N = −20 dB (22)
Pcr ≤ 2 (26)
These rules may be applied if
0.1 ≤ T ≤ 50 and L ≤ 0.5 (23)
7. A THIRD SET OF CRITICAL GAIN
BASED TUNING RULES
5. A FIRST SET OF CRITICAL GAIN BASED
TUNING RULES Unfortunately, rules in the two previous sections
do not often work properly for plants with a
The second set of rules proposed by Ziegler and pole at the origin. The following rules address
Nichols apply to systems that, inserted into a feed- such plants. They were obtained from controllers
back control-loop with proportional gain, show, devised to achieve specifications (9) to (14) with
for a particular gain, sustained oscillations, that plants given by
is, oscillations that do not decrease or increase
with time, as shown in Fig. 2. The period of K
G= (27)
such oscillations is the critical period Pcr , and the s(s + τ1 )(s + τ2 )
gain causing them is the critical gain Kcr . Plants
given by (8) have such a behaviour. Re-using It is easy to show that such plants have
the data collected for finding the rules in section
3, obtained with specifications (9) to (14), it is Kcr = (τ1 + τ2 )τ1 τ2 (28)
seen that parameters P , I, λ, D and µ obtained 2π
vary regularly with Kcr and Pcr . The regularity Pcr = √ (29)
τ 1 τ2
was again translated into formulas (which are no
longer polynomial) using a least-squares fit. The Once more the regular variation of parameters P ,
parameters are given in Table 3. This means that I, λ, D and µ with Kcr and Pcr was translated into
rules using a least-squares fit. The parameters are
P = 0.4139 + 0.0145Kcr those given in Table 5 and may be used if
0.4384 0.0855
+0.1584Pcr − − (24) 0.2 ≤ Pcr ≤ 5 and 1 ≤ Kcr ≤ 200 (30)
Kcr Pcr
and so on. These rules may be used if (though the performance be somewhat poor near
Pcr ≤ 8 and Kcr Pcr ≤ 640 (25) the borders of the range above). But, if rules above
(devised for plants with a delay) did not often
Table 2. Parameters for the second set of tuning rules for S-shaped response plants
P I λ D µ
1 −1.0574 0.6014 1.1851 0.8793 0.2778
L 24.5420 0.4025 −0.3464 −15.0846 −2.1522
T 0.3544 0.7921 −0.0492 −0.0771 0.0675
L2 −46.7325 −0.4508 1.7317 28.0388 2.4387
T2 −0.0021 0.0018 0.0006 −0.0000 −0.0013
LT −0.3106 −1.2050 0.0380 1.6711 0.0021

Table 3. Parameters for the first set of tuning rules for plants with critical gain and
period

Parameters to use when Kcr Pcr ≤ 64 Parameters to use when 64 ≤ Kcr Pcr ≤ 640
P I λ D µ P I λ D µ
1 0.4139 0.7067 1.3240 0.2293 0.8804 −1.4405 5.7800 0.4712 1.3190 0.5425
Kcr 0.0145 0.0101 −0.0081 0.0153 −0.0048 0.0000 0.0238 −0.0003 −0.0024 −0.0023
Pcr 0.1584 −0.0049 −0.0163 0.0936 0.0061 0.4795 0.2783 −0.0029 2.6251 −0.0281
1/Kcr −0.4384 −0.2951 0.1393 −0.5293 0.0749 32.2516 −56.2373 7.0519 −138.9333 5.0073
1/Pcr −0.0855 −0.1001 0.0791 −0.0440 0.0810 0.6893 −2.5917 0.1355 0.1941 0.2873

Table 4. Parameters for the second set of tuning rules for plants with critical gain
and period
P I λ D µ
1 1.0101 10.5528 0.6213 15.7620 1.0101
Kcr 0.0024 0.2352 −0.0034 −0.1771 0.0024
Pcr −0.8606 −17.0426 0.2257 −23.0396 −0.8606
Pcr2 0.1991 6.3144 0.1069 8.2724 0.1991
Kcr Pcr −0.0005 −0.0617 0.0008 0.1987 −0.0005
1/Kcr −0.9300 −0.9399 1.1809 −0.8892 −0.9300
1/Pcr −0.1609 −1.5547 0.0904 −2.9981 −0.1609
Kcr /Pcr −0.0009 −0.0687 0.0010 0.0389 −0.0009
Pcr /Kcr 0.5846 3.4357 −0.8139 2.8619 0.5846

Table 5. Parameters for the third set of tuning rules for plants with critical gain
and period
P I λ D µ
1 −1.6403 −92.5612 0.7381 −8.6771 0.6688
Kcr 0.0046 0.0071 −0.0004 −0.0636 0.0000
Pcr −1.6769 −33.0655 −0.1907 −1.0487 0.4765
Kcr Pcr 0.0002 −0.0020 0.0000 0.0529 −0.0002
1/Kcr 0.8615 −1.0680 −0.0167 −2.1166 0.3695
1/Pcr 2.9089 133.7959 0.0360 8.4563 −0.4083
Kcr /Pcr −0.0012 −0.0011 0.0000 0.0113 −0.0001
Pcr /Kcr −0.7635 −5.6721 0.0792 2.3350 0.0639
log10 (Kcr ) 0.4049 −0.9487 0.0164 −0.0002 0.1714
log10 (Pcr ) 12.6948 336.1220 0.4636 16.6034 −3.6738

cope with poles at the origin, the rules in this Oustaloup’s continuous approximation (Oustaloup,
section do not often cope with plants with a delay. 1991) consists of a transfer function with poles and
zeros recursively placed:
N 1+ s
8. IMPLEMENTATION Y ωz,n
sν = k s , ν>0 (31)
n=1
1+ ωp,n
For implementation purposes, fractional PID con-
trollers are usually converted into integer contin-
The approximation is to be valid in a pre-defined
uous transfer functions or into discrete transfer
frequency range [ωa ; ωb ] (the performance being
functions. This is done replacing each fractional
poor, however, near ωa and ωb ). Gain k in (31)
derivative with a suitable approximation.
is adjusted so that the approximation shall have
There are many ways of finding integer or discrete unit gain at 1 rad/s. The number of poles and
transfer functions that approximate a fractional zeros N is chosen beforehand (low values resulting
derivative. In what follows one of the most pop- in simpler approximations but also causing the
ular integer ones will be considered. On digital appearance of a ripple in both gain and phase
approximations of fractional derivatives, see for behaviours). Frequencies of poles and zeros are
instance (Valério and Sá da Costa, 2005a). given by

ωz,1 = ωa η (32) (22) are roughly followed, even though not exactly
ωp,n = ωz,n α, n = 1 . . . N (33) followed—this is because of the approximations
involved in the process of finding the parameters.
ωz,n+1 = ωp,n η, n = 1 . . . N − 1 (34)
ν An integer PID tuned with the second set of
α = (ωb /ωa ) N
(35)
1−ν
rules by Ziegler and Nichols is unable to stabilise
η = (ωb /ωa ) N
(36) (38). Plant (41) seems easier to control: the PID
manages it, and so do (39) and (40). But only
Whatever the approximation used, it is usual, fractional PIDs achieve overshoots more or less
whenever |ν| > 1, to make constant in face of variations of K.

sν = s n sδ , n + δ = ν ∧ n ∈ Z ∧ δ ∈ [0; 1] (37)
10. CONCLUSIONS
and then approximate sδ only.
In this paper tuning rules (inspired by those pro-
posed by Ziegler and Nichols for integer PIDs) are
9. ROBUSTNESS given to tune fractional PIDs. Two different sets
of fixed performance specifications are used; other
Evidence showing that rules in sections 3 and 4 rules may be similarly obtained for other sets.
provide reasonable, robust controllers has been Such specifications are roughly followed and are
presented in (Valério and Sá da Costa, 2005b; more stringent than those aimed at by the rules of
Valério and Sá da Costa, 2006). Here, similar Ziegler and Nichols. Though developed for plants
examples are shown for critical gain based rules. with particular forms, the rules presented can
The plant considered is usually be applied to other plants with different
K transfer functions, as long as they have S-shaped
G1 (s) = e−0.2s (38) unit-step responses or a critical gain control.
20s + 1
Fractional PIDs so tuned perform better than
for several values of K. Controllers obtained with rule-tuned PIDs. This may seem trivial, for we
rules from sections 5 and 6 are, respectively, now have five parameters to tune (while PIDs
have but three), and the actual implementation
6.1492 requires several poles and zeros (while PIDs have
C1 (s) = 0.0109 + + 2.3956s0.5494 (39)
s0.6363 but one invariable pole and two zeros). But the
14.7942 new structure might be so poor that it would not
C2 (s) = 0.3835 + 0.7480 + 3.6466s0.3835 (40)
s improve the simpler one it was trying to upgrade;
A plant with one pole at the origin and with a this is not, however, the case, for fractional PIDs
similar step-response, in what concerns apparent perform fine and with greater robustness. Addi-
delay and characteristic time-constant, is tionally, examples given show tuning rules to be
an effective way to tune the five parameters re-
1 quired. Of course, better results might be got with
G2 (s) = (41)
s3 + 2.539s2 + 62.15s an analytical tuning method for integer PIDs;
but what we compare here is the performance
The controller obtained with rules from section 7 with tuning rules. These reasonably (though not
is exactly) follow the specifications from which they
14.3683 were built (through tuning by minimisation).
C3 (s) = 0.8271 + − 1.6866s1.2328 (42)
s0.5588
One might wonder, since the final implementation
Simulations shown in Fig. 3, Fig. 4 and Fig. 5 has plenty of zeros and poles, why these could
were obtained using Oustaloup’s approximations not be chosen on their own right, for instance
for the fractional derivatives of (39), (40) and (42). adjusting them to minimise some suitable criteria.
In this particular case, Of course they could: but such a minimisation is
hard to accomplish. By treating all those zeros
and poles as approximations of a fractional con-
ωa = 10−3 rad/s (43) troller, it is possible to tune them easily and with
3
ωb = 10 rad/s (44) good performances, as seen above, and to obtain a
N =7 (45) understandable mathematical formulation of the
dynamic behaviour obtained.
Notice that for values of K close to 1 the overshoot So this seems to be a promising approach to
does not vary significantly—the only difference fractional control. Future work is possible and
is that the response is faster or slower. Also desirable, to further explore other means of tuning
notice that specifications (9) to (14) or (17) to this type of controller.
1.5 100 20
0

gain / dB

gain / dB
50
−20
0
1 −40
−50 −2 −1 0 1 2
−60 −2 −1 0 1 2
output

10 10 10 10 10 10 10 10 10 10
−1 −1
frequency / rad⋅s frequency / rad⋅s
0 20
0.5

gain / dB
phase / º
K 0
−500
−20

0 −1000 −2 −40 −2
0 10 20 30 40 50 10
−1
10 10
0 1
10
2
10 10
−1
10 10
0 1
10
2
10
time / s

Fig. 3. Left: Step response of (38) controlled with (39) when K is 1/16, 1/8, 1/4, 1/2, 1 (thick line),
2, 4 and 8; centre: open-loop Bode diagram when K = 1; right: sensitivity function gain (top) and
closed-loop gain (bottom) when K = 1
1.5 100 20
gain / dB 0

gain / dB
50
−20
0
1 −40
−50 −2 −1 0 1 2
−60 −2 −1 0 1 2
output

10 10 10 10 10 10 10 10 10 10
−1 −1
frequency / rad⋅s frequency / rad⋅s
0 20
0.5

gain / dB
phase / º

K 0
−500
−20

0 −1000 −2 −40 −2
0 10 20 30 40 50 10
−1
10 10
0 1
10
2
10 10
−1
10 10
0 1
10
2
10
time / s

Fig. 4. Left: Step response of (38) controlled with (40) when K is 1/32, 1/16, 1/8, 1/4, 1/2, 1 (thick
line), 2, 4 and 8; centre: open-loop Bode diagram when K = 1; right: sensitivity function gain (top)
and closed-loop gain (bottom) when K = 1
1.5 20
50
0
gain / dB

gain / dB

0 −20

1 −40
−50
−2 −1 0 1 2
−60 −2 −1 0 1 2
output

10 10 10 10 10 10 10 10 10 10
K frequency / rad⋅s
−1
frequency / rad⋅s
−1

−100 20
0.5 0
gain / dB
phase / º

−200 −20
−40
−300 −60
0 −80 −2
0 10 20 30 40 50 10
−2 −1
10 10
0 1
10
2
10 10
−1
10 10
0 1
10
2
10
time / s

Fig. 5. Left: Step response of (41) controlled with (42) when K is 1/8, 1/4, 1/2, 1 (thick line), 2, 4,
8 and 16; centre: open-loop Bode diagram when K = 1; right: sensitivity function gain (top) and
closed-loop gain (bottom) when K = 1

REFERENCES Valério, Duarte and José Sá da Costa (2005a).


Time-domain implementation of fractional
Caponetto, R., L. Fortuna and D. Porto (2002).
order controllers. IEE Proceedings—Control
Parameter tuning of a non integer order PID
Theory & Applications. Accepted for publi-
controller. In: Electronic proceedings of the
cation.
15th International Symposium on Mathemat-
Valério, Duarte and José Sá da Costa (2005b).
ical Theory of Networks and Systems.
Ziegler-nichols type tuning rules for fractional
Caponetto, Ricardo, Luigi Fortuna and Domenico
PID controllers. In: Proceedings of ASME
Porto (2004). A new tuning strategy for a non
2005 Design Engineering Technical Confer-
integer order PID controller. In: First IFAC
ences and Computers and Information in En-
Workshop on Fractional Differentiation and
gineering Conference. Long Beach.
its Applications. Bordeaux.
Valério, Duarte and José Sá da Costa (2006).
Monje, C. A., B. M. Vinagre, Y. Q. Chen, V. Feliu,
Tuning of fractional PID controllers with
P. Lanusse and J. Sabatier (2004). Proposals
ziegler-nichols type rules. Signal Processing.
for fractional PIλ Dµ tuning. In: First IFAC
Accepted for publication.
Workshop on Fractional Differentiation and
Vinagre, Blas (2001). Modelado y control de
its Applications. Bordeaux.
sistemas dinámicos caracterizados por ecua-
Oustaloup, Alain (1991). La commande
ciones ı́ntegro-diferenciales de orden frac-
CRONE : commande robuste d’ordre non en-
cional. PhD thesis. Universidad Nacional de
tier. Hermès. Paris. In French.
Educación a Distancia. Madrid. In Spanish.
Podlubny, Igor (1999). Fractional differential
equations. Academic Press. San Diego.

You might also like