You are on page 1of 6

Proceedings of the 2nd IFAC

Workshop on Fractional Differentiation and its Applications


Porto, Portugal, July 19-21, 2006

TUNING-RULES FOR FRACTIONAL PID


CONTROLLERS
Duarte Val
erio ,1 Jos
e S
a da Costa

Technical Univ. of Lisbon Instituto Superior Tecnico


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
PID (proportionalintegralderivative) controllers are well-known and widely used because they
are simple, effective, robust, and easily tuned. An
important contribution for this last characteristic
was the development of several tuning rules for
tuning the parameters of such controllers from
some simple response of the plant. The data required by a tuning rule would not suffice to find
a model of the plant, but is expected to suffice to
find a reasonable controller.
Such rules are the only choice when there is really
no model for the plant and no way to get it. Even
when we do have a model, if our control specifications are not too difficult to attain, a rule may be
all that is needed, saving the time and the effort
required by an analytical method. Rules have their
problems, namely providing controllers that are
hardly optimal according to any criteria and that
hence might be better tuned (and sometimes have
to be better tuned to meet specifications), but
since they often (though not always) work and
1

Partially supported by Fundaca


o para a Ci
encia e a Tecnologia, grant SFRH/BPD/20636/2004, funded by POCI
2010, POS C, FSE and MCTES.

are simple their usefulness is unquestionable (as


their widespread use attests).
Fractional PID controllers are variations of usual
PID controllers
C(s) = P +

I
+ Ds
s

(1)

where the (first-order) integral and the (firstorder) derivative of (1) are replaced by fractional
derivatives like this:
C(s) = P +

I
+ Ds
s

(2)

(In principle, both and should be positive


so that we still have an integration and a differentiation.) Fractional PIDs have been increasingly used over the last years (Podlubny, 1999).
There are several analytical ways to tune them
(Vinagre, 2001; Caponetto et al., 2002; Caponetto
et al., 2004). This paper is concerned about how
to tune them using tuning rules.
It is organised as follows. Section 2 describes an
analytical method that lies behind the development of the rules. Sections 3 to 7 describe tuning
rules similar to those proposed by Ziegler and

ta

ti

nf
le

ct

io

po

in

ta

ng

en

output

Nichols for (integer) PIDs 2 . Section 8 addresses


the question of how fractional PIDs can be implemented. Section 9 gives some simple examples
and section 10 concludes the paper.

inflection point

2. TUNING BY MINIMISATION
0

In this tuning method, presented by (Monje et


al., 2004), we begin by devising a desirable behaviour for our controlled system, described by
five specifications (five, because the parameters to
be tuned are five):
(1) The open-loop is to have some specified
crossover frequency cg :
|C (cg ) G (cg )| = 0 dB

(3)

(2) The phase margin m is to have some specified value:


+ m = arg [C (cg ) G (cg )]

(4)

(3) To reject high-frequency noise, the closed


loop transfer function must have a small
magnitude at high frequencies; hence, at
some specified frequency h , its magnitude
is to be less than some specified gain H:

C (h ) G (h )

(5)
1 + C (h ) G (h ) < H

(4) To reject output disturbances and closely follow references, the sensitivity function must
have a small magnitude at low frequencies;
hence, at some specified frequency l , its
magnitude is to be less than some specified
gain N :

(6)
1 + C (l ) G (l ) < N
(5) To be robust when gain variations of the
plant occur, the phase of the open-loop transfer function is to be (at least roughly) constant around the gain-crossover frequency:

d
arg [C () G ()]
=0
(7)
d
=cg

Then the five parameters of the fractional PID are


to be chosen using the Nelder-Mead direct search
simplex minimisation method. This derivativefree method is used to minimise the difference between the desired performance specified as above
and the performance achieved by the controller.
Of course this allows for local minima to be found:
so it is always good to use several initial guesses
and check all results (also because sometimes unfeasible solutions are found).

time

L+T

Fig. 1. S-shaped unit-step response


3. A FIRST SET OF S-SHAPED RESPONSE
BASED TUNING RULES
The first set of rules proposed by Ziegler and
Nichols apply to systems with an S-shaped unitstep response, such as the one seen in Fig. 1.
From the response an apparent delay L and a
characteristic time-constant T may be determined
(graphically, for instance). A simple plant with
such a response is
G=

K
eLs
1 + sT

(8)

Tuning by minimisation was applied to some


scores of plants with transfer functions given by
(8), for several values of L and T (and with
K = 1). The specifications used were
cg = 0.5 rad/s
m = 2/3 rad 38

(9)
o

(10)

h = 10 rad/s

(11)

l = 0.01 rad/s

(12)

H = 10 dB

(13)

N = 20 dB

(14)

Matlabs implementation of the simplex search in


function fmincon was used; (3) was considered the
function to minimise, and (4) to (7) accounted for
as constraints.
Obtained parameters P , I, , D and vary
regularly with L and T . Using a least-squares fit,
it was possible to adjust a polynomial to the data,
allowing (approximate) values for the parameters
to be found from a simple algebraic calculation.
The parameters of the polynomials involved are
given in Table 1. This means that
P = 0.0048 + 0.2664L + 0.4982T

+0.0232L2 0.0720T 2 0.0348T L (15)

and so on. These rules may be used if


0.1 T 50 and L 2

(16)

Rules in sections 3 and 4 have already been presented


in (Val
erio and S
a da Costa, 2005b; Val
erio and S
a da
Costa, 2006). Those in sections 5, 6 and 7 are novel.

It should be noticed that quadratic polynomials


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
I

0.3254
1.5766
0.0662
0.8736
0.2478
0.2098
0.2528
0.2746
0.1429
0.1313
0.1081
0.1489
0.1330
0.0713
0.0702
0.1557
0.0258
0.0016
0.0328
0.0250
0.0171
0.0114
0.2202
0.0323

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.
4. A SECOND SET OF S-SHAPED
RESPONSE BASED TUNING RULES

Parameters to use when 5 T 50


I

0.5201
1.0645
1.1421
1.2902
2.6643
0.3268
1.3707
0.5371
0.3453
0.0229
0.0357
0.0381
1.0944
0.2018
0.5552
0.2208
0.0002
0.0003
0.0002
0.0007
0.1054
0.0028
0.2630
0.0014

0
Pcr
0

Rules in Table 2 were obtained just in the same


way, but for the following specifications:
cg = 0.5 rad/s

(17)

m = 1 rad 57o

(18)

h = 10 rad/s

(19)

l = 0.01 rad/s

(20)

H = 20 dB

(21)

N = 20 dB

P
2.1187
3.5207
0.1563
1.5827
0.0025
0.1824

output

1
L
T
L2
T2
LT

P
0.0048
0.2664
0.4982
0.0232
0.0720
0.0348

time

Fig. 2. Plant output with critical gain control


6. A SECOND SET OF CRITICAL GAIN
BASED TUNING RULES
Re-using in the same wise the data used in section
4, corresponding to specifications (17) to (22),
other rules may be got with parameters given in
Table 4. These rules may be applied if

(22)

Pcr 2

These rules may be applied if


0.1 T 50 and L 0.5

(23)

5. A FIRST SET OF CRITICAL GAIN BASED


TUNING RULES
The second set of rules proposed by Ziegler and
Nichols apply to systems that, inserted into a feedback control-loop with proportional gain, show,
for a particular gain, sustained oscillations, that
is, oscillations that do not decrease or increase
with time, as shown in Fig. 2. The period of
such oscillations is the critical period Pcr , and the
gain causing them is the critical gain Kcr . Plants
given by (8) have such a behaviour. Re-using
the data collected for finding the rules in section
3, obtained with specifications (9) to (14), it is
seen that parameters P , I, , D and obtained
vary regularly with Kcr and Pcr . The regularity
was again translated into formulas (which are no
longer polynomial) using a least-squares fit. The
parameters are given in Table 3. This means that
P = 0.4139 + 0.0145Kcr
0.4384 0.0855

+0.1584Pcr
Kcr
Pcr

(24)

and so on. These rules may be used if


Pcr 8 and Kcr Pcr 640

(25)

(26)

7. A THIRD SET OF CRITICAL GAIN


BASED TUNING RULES
Unfortunately, rules in the two previous sections
do not often work properly for plants with a
pole at the origin. The following rules address
such plants. They were obtained from controllers
devised to achieve specifications (9) to (14) with
plants given by
G=

K
s(s + 1 )(s + 2 )

(27)

It is easy to show that such plants have


Kcr = (1 + 2 )1 2
2
Pcr =
1 2

(28)
(29)

Once more the regular variation of parameters P ,


I, , D and with Kcr and Pcr was translated into
rules using a least-squares fit. The parameters are
those given in Table 5 and may be used if
0.2 Pcr 5 and 1 Kcr 200

(30)

(though the performance be somewhat poor near


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
1
L
T
L2
T2
LT

P
1.0574
24.5420
0.3544
46.7325
0.0021
0.3106

I
0.6014
0.4025
0.7921
0.4508
0.0018
1.2050

1.1851
0.3464
0.0492
1.7317
0.0006
0.0380

D
0.8793
15.0846
0.0771
28.0388
0.0000
1.6711

0.2778
2.1522
0.0675
2.4387
0.0013
0.0021

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

1
Kcr
Pcr
1/Kcr
1/Pcr

Parameters to use when Kcr Pcr 64


P
I

0.4139
0.7067
1.3240
0.2293
0.8804
0.0145
0.0101
0.0081
0.0153
0.0048
0.1584
0.0049
0.0163
0.0936
0.0061
0.4384
0.2951
0.1393
0.5293
0.0749
0.0855
0.1001
0.0791
0.0440
0.0810

Parameters to use when 64 Kcr Pcr 640


P
I

1.4405
5.7800
0.4712
1.3190
0.5425
0.0000
0.0238
0.0003
0.0024
0.0023
0.4795
0.2783
0.0029
2.6251
0.0281
32.2516
56.2373
7.0519
138.9333
5.0073
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
1
Kcr
Pcr
2
Pcr
Kcr Pcr
1/Kcr
1/Pcr
Kcr /Pcr
Pcr /Kcr

P
1.0101
0.0024
0.8606
0.1991
0.0005
0.9300
0.1609
0.0009
0.5846

I
10.5528
0.2352
17.0426
6.3144
0.0617
0.9399
1.5547
0.0687
3.4357

0.6213
0.0034
0.2257
0.1069
0.0008
1.1809
0.0904
0.0010
0.8139

D
15.7620
0.1771
23.0396
8.2724
0.1987
0.8892
2.9981
0.0389
2.8619

1.0101
0.0024
0.8606
0.1991
0.0005
0.9300
0.1609
0.0009
0.5846

Table 5. Parameters for the third set of tuning rules for plants with critical gain
and period
1
Kcr
Pcr
Kcr Pcr
1/Kcr
1/Pcr
Kcr /Pcr
Pcr /Kcr
log10 (Kcr )
log10 (Pcr )

P
1.6403
0.0046
1.6769
0.0002
0.8615
2.9089
0.0012
0.7635
0.4049
12.6948

I
92.5612
0.0071
33.0655
0.0020
1.0680
133.7959
0.0011
5.6721
0.9487
336.1220

cope with poles at the origin, the rules in this


section do not often cope with plants with a delay.

8. IMPLEMENTATION
For implementation purposes, fractional PID controllers are usually converted into integer continuous transfer functions or into discrete transfer
functions. This is done replacing each fractional
derivative with a suitable approximation.
There are many ways of finding integer or discrete
transfer functions that approximate a fractional
derivative. In what follows one of the most popular integer ones will be considered. On digital
approximations of fractional derivatives, see for
instance (Valerio and S
a da Costa, 2005a).

0.7381
0.0004
0.1907
0.0000
0.0167
0.0360
0.0000
0.0792
0.0164
0.4636

D
8.6771
0.0636
1.0487
0.0529
2.1166
8.4563
0.0113
2.3350
0.0002
16.6034

0.6688
0.0000
0.4765
0.0002
0.3695
0.4083
0.0001
0.0639
0.1714
3.6738

Oustaloups continuous approximation (Oustaloup,


1991) consists of a transfer function with poles and
zeros recursively placed:
s = k

N 1+
Y
n=1

1+

s
z,n
s
p,n

>0

(31)

The approximation is to be valid in a pre-defined


frequency range [a ; b ] (the performance being
poor, however, near a and b ). Gain k in (31)
is adjusted so that the approximation shall have
unit gain at 1 rad/s. The number of poles and
zeros N is chosen beforehand (low values resulting
in simpler approximations but also causing the
appearance of a ripple in both gain and phase
behaviours). Frequencies of poles and zeros are
given by


z,1 = a

(32)

p,n = z,n , n = 1 . . . N

(33)

z,n+1 = p,n , n = 1 . . . N 1
= (b /a )
= (b /a )

1
N

(34)
(35)
(36)

Whatever the approximation used, it is usual,


whenever || > 1, to make
s = s n s ,

n + = n Z [0; 1] (37)

and then approximate s only.

9. ROBUSTNESS
Evidence showing that rules in sections 3 and 4
provide reasonable, robust controllers has been
presented in (Valerio and S
a da Costa, 2005b;
Valerio and S
a da Costa, 2006). Here, similar
examples are shown for critical gain based rules.
The plant considered is
G1 (s) =

K
e0.2s
20s + 1

(38)

for several values of K. Controllers obtained with


rules from sections 5 and 6 are, respectively,
6.1492
+ 2.3956s0.5494 (39)
s0.6363
14.7942
C2 (s) = 0.3835 + 0.7480 + 3.6466s0.3835 (40)
s

C1 (s) = 0.0109 +

A plant with one pole at the origin and with a


similar step-response, in what concerns apparent
delay and characteristic time-constant, is
G2 (s) =

1
s3 + 2.539s2 + 62.15s

(41)

The controller obtained with rules from section 7


is
C3 (s) = 0.8271 +

14.3683
1.6866s1.2328 (42)
s0.5588

Simulations shown in Fig. 3, Fig. 4 and Fig. 5


were obtained using Oustaloups approximations
for the fractional derivatives of (39), (40) and (42).
In this particular case,
a = 103 rad/s

(43)

b = 10 rad/s

(44)

N =7

(45)

Notice that for values of K close to 1 the overshoot


does not vary significantlythe only difference
is that the response is faster or slower. Also
notice that specifications (9) to (14) or (17) to

(22) are roughly followed, even though not exactly


followedthis is because of the approximations
involved in the process of finding the parameters.
An integer PID tuned with the second set of
rules by Ziegler and Nichols is unable to stabilise
(38). Plant (41) seems easier to control: the PID
manages it, and so do (39) and (40). But only
fractional PIDs achieve overshoots more or less
constant in face of variations of K.

10. CONCLUSIONS
In this paper tuning rules (inspired by those proposed by Ziegler and Nichols for integer PIDs) are
given to tune fractional PIDs. Two different sets
of fixed performance specifications are used; other
rules may be similarly obtained for other sets.
Such specifications are roughly followed and are
more stringent than those aimed at by the rules of
Ziegler and Nichols. Though developed for plants
with particular forms, the rules presented can
usually be applied to other plants with different
transfer functions, as long as they have S-shaped
unit-step responses or a critical gain control.
Fractional PIDs so tuned perform better than
rule-tuned PIDs. This may seem trivial, for we
now have five parameters to tune (while PIDs
have but three), and the actual implementation
requires several poles and zeros (while PIDs have
but one invariable pole and two zeros). But the
new structure might be so poor that it would not
improve the simpler one it was trying to upgrade;
this is not, however, the case, for fractional PIDs
perform fine and with greater robustness. Additionally, examples given show tuning rules to be
an effective way to tune the five parameters required. Of course, better results might be got with
an analytical tuning method for integer PIDs;
but what we compare here is the performance
with tuning rules. These reasonably (though not
exactly) follow the specifications from which they
were built (through tuning by minimisation).
One might wonder, since the final implementation
has plenty of zeros and poles, why these could
not be chosen on their own right, for instance
adjusting them to minimise some suitable criteria.
Of course they could: but such a minimisation is
hard to accomplish. By treating all those zeros
and poles as approximations of a fractional controller, it is possible to tune them easily and with
good performances, as seen above, and to obtain a
understandable mathematical formulation of the
dynamic behaviour obtained.
So this seems to be a promising approach to
fractional control. Future work is possible and
desirable, to further explore other means of tuning
this type of controller.

20

gain / dB

gain / dB

100

1.5

50
0

output

50 2
10

10

0
0

10

20

time / s

30

40

50

10

10

10

10

20

500

1000 2
10

40
60 2
10

10

gain / dB

0.5

phase /

10
frequency / rads1

0
20

10

10

10

10

10

0
20
40 2
10

10

10
frequency / rads1

10

10

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
20

gain / dB

gain / dB

100

1.5

50
0

output

50 2
10

10

0
0

10

time / s

30

40

50

1000 2
10

10

10

10

20

500

20

40
60 2
10

10

phase /

0.5

10

gain / dB

10
frequency / rads1

0
20

10

10

10

10

10

0
20
40 2
10

10

10
frequency / rads1

10

10

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

gain / dB

gain / dB

50
0
50

output

10

10

10
frequency / rads1

10

0
0

20

time / s

30

40

50

200
300
2

10

10

10

10

20
gain / dB

phase /

10

40
60 2
10

10

100
0.5

0
20

10

10

10
frequency / rads1

10

10

10

10

0
20
40
60
80 2
10

10

10

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
Caponetto, R., L. Fortuna and D. Porto (2002).
Parameter tuning of a non integer order PID
controller. In: Electronic proceedings of the
15th International Symposium on Mathematical Theory of Networks and Systems.
Caponetto, Ricardo, Luigi Fortuna and Domenico
Porto (2004). A new tuning strategy for a non
integer order PID controller. In: First IFAC
Workshop on Fractional Differentiation and
its Applications. Bordeaux.
Monje, C. A., B. M. Vinagre, Y. Q. Chen, V. Feliu,
P. Lanusse and J. Sabatier (2004). Proposals
for fractional PI D tuning. In: First IFAC
Workshop on Fractional Differentiation and
its Applications. Bordeaux.
Oustaloup, Alain (1991). La commande
CRONE : commande robuste dordre non entier. Herm`es. Paris. In French.
Podlubny, Igor (1999). Fractional differential
equations. Academic Press. San Diego.

Valerio, Duarte and Jose Sa da Costa (2005a).


Time-domain implementation of fractional
order controllers. IEE ProceedingsControl
Theory & Applications. Accepted for publication.
Valerio, Duarte and Jose Sa da Costa (2005b).
Ziegler-nichols type tuning rules for fractional
PID controllers. In: Proceedings of ASME
2005 Design Engineering Technical Conferences and Computers and Information in Engineering Conference. Long Beach.
Valerio, Duarte and Jose Sa da Costa (2006).
Tuning of fractional PID controllers with
ziegler-nichols type rules. Signal Processing.
Accepted for publication.
Vinagre, Blas (2001). Modelado y control de
sistemas dinamicos caracterizados por ecuaciones ntegro-diferenciales de orden fraccional. PhD thesis. Universidad Nacional de
Educacion a Distancia. Madrid. In Spanish.

You might also like