Professional Documents
Culture Documents
CONTROLLERS
∗
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.
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
output
4. A SECOND SET OF S-SHAPED 0
P
RESPONSE BASED TUNING RULES 0
cr
time
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