Académique Documents
Professionnel Documents
Culture Documents
a r t i c l e i n f o a b s t r a c t
Article history: In this paper a new auto-tuning algorithm for PI and PID controllers based on relay experiments is
Received 7 October 2010 proposed to minimize the load disturbance integral error (IE) by maximizing the integral gain, sub-
Received in revised form 24 February 2011 ject to a desired phase margin, and a minimum required gain margin constraint. The main advantage
Accepted 10 April 2011
of the proposed auto-tuning algorithm with respect to previous works is that it leads, for most of the
Available online 20 May 2011
processes, to PID tuning with close loop performance similar to PID designed using off-line numerical
optimization. Moreover the algorithm is applicable to any linear model structure, including dead time
Keywords:
and non-minimum phase systems.
PID
PI © 2011 Elsevier Ltd. All rights reserved.
Auto-tuning
Relay experiment
0959-1524/$ – see front matter © 2011 Elsevier Ltd. All rights reserved.
doi:10.1016/j.jprocont.2011.04.003
J.A. Romero et al. / Journal of Process Control 21 (2011) 840–851 841
While the transfer function of the PID controller with high fre-
quency filter in the derivative term is assumed to be
Td s 1
(1 + (s/zi ))(1 + (s/zd ))
C(s) = Kp 1 + + = Ki
1 + (Td s/N ) Ti s s(1 + (s/zd N))
(3)
where ωcg is the frequency where the magnitude of the open loop 3.2. Method properties: shapes of functions Ki (a) and m (a)
frequency response is 1, i.e. where the phase margin is measured.
For a given value of this parameter a, the phase of the controller As aforementioned, the tuning method looks for the value of
at the final crossover frequency ωcg depends only on that value, as parameter a that maximize Ki (a) fulfilling the robustness condi-
shown by the following equations. tions m (a) ≥ m,r . In this section the functions Ki (a) and m (a) are
1 studied and some of their properties are revealed which will be
PI : arg(C(jωcg )) = arctan(a) − = − arctan (6) used in the auto-tuning algorithm. For this study, the tuning pro-
2 a
cedure is applied to design controllers for the following test batch
a of models proposed in [15,8]. For the PID controllers the test batch
PID : arg(C(jωcg )) = 2 arctan(a) − arctan − (7)
N 2 of models is:
1
Therefore, for a given value of parameter a, the calculation of G1 (s) = (12)
the controller is automatic, following two steps: s(s + 1)3
e−5s
1. The final crossover frequency (ωcg ) is obtained as the frequency G2 (s) = (13)
(s + 1)3
where the phase of the system fulfills the phase margin equation,
i.e. where the phase of the system is 1
G3 (s) = (14)
(s + 1)(1 + 0.2s)(1 + 0.22 s)(1 + 0.23 s)
arg(G(jωcg )) = − + m,r − arg(C(jωcg )) (8)
1
G4,5,6,7 (s) = ˛ = 4, 5, 6, 7 (15)
Then, the value of the zero (zi = zd ) is calculated as (s + 1)˛
ωcg −2(s − 2)
zi = zd = G8 (s) = (16)
a (s + 1)3
In the case of PI controllers the considered models are:
2. The value of Ki is then calculated from the condition of unit
magnitude at the final crossover frequency 1
G9 (s) = (17)
(s + 1)3
|C(jωcg )G(jωcg )| = 1 → Ki (9)
1
G10 (s) = (18)
The resulting equations are: (s + 1)(1 + 0.2s)(1 + 0.22 s)(1 + 0.23 s)
ωcg e−15s
PI : Ki (a) = (10) G11 (s) = (19)
|G(jωcg )| 1 + a2 (s + 1)3
1
ωcg 1 + (a2 /N 2 ) G12 (s) = (20)
PID : Ki (a) = (11) s(s + 1)2
|G(jωcg )|(1 + a2 )
1 − 2s
3. Once the controller parameters are defined, the final gain margin, G13 (s) = (21)
m , is calculated. (s + 1)3
9
G14 (s) = (22)
Applying the previous steps for different values of a, two graphs (s + 1)(s2 + 2s + 9)
relating a with Ki and m can be easily built, and the value of a
These models capture the typical dynamics encountered in con-
where Ki reaches a maximum value, constrained to m ≥ m,r can
trol applications: multiple poles, different poles, integrator, time
be obtained straightforwardly. Once the values of Ki and zc are
delay, non minimum phase, therefore the conclusions of the next
obtained, the parameters of the controller (Kp , Td and Ti ) are cal-
study may be assumed to apply for most of the industrial process
culated applying Eqs. (2) or (4).
models.
Remark 1. In the case of the PID controller, the two zeros are The shapes of functions Ki (a) and m (a) obtained when design-
imposed to be equal, i.e. zi = zd , in order to simplify the design ing PID and PI controllers for models in the test batch are shown in
method. This restriction could result in a significant loss of perfor- Figs. 2 and 3 respectively. It can be noted that in all cases Ki (a) is a
mance for some particular processes. However, in [4] it is proved smooth function with only one maximum in aKmax . In most cases,
that for most of the industrial processes dynamics this limitation the function m (a) has also a maximum which is always located
produce a minor deterioration of the closed loop performance com- in values of a smaller than aKmax , more precisely, the maximum
pared with the optimal design obtained with independently fixed of m (a) lies in the interval [0, 0.5]. Therefore, the function m (a)
zeros. For the batch of models proposed in [15,8], that are rep- increases as a decreases from aKmax until the maximum of m is
resentative of most of the industrial processes dynamics, the loss reached.
of performance due to this restriction is not important. Interested The features of functions Ki (a) and m (a) pointed out in this
readers are referenced to [9], where a detailed comparison between section will be used to develop an ad hoc algorithm to automatically
the above described method and the MIGO (M-constrained inte- solve the optimization problem involved in the design procedure.
gral gain optimization) methods presented in [15,8] for PID and PI
controllers respectively, was made. The MIGO methods are based 4. Auto-tuning algorithm
on a pure numerical optimization approach where the zeros are
independently fixed, leading to complex zeros most of the times. In this section the auto-tuning algorithm which automati-
Despite the restriction in the zeros placement, both methods lead cally tunes the PI and PID controllers according to the procedure
to controllers with similar closed loop performance, measured in described in Section 3 is presented. Since the simplified optimiza-
terms of disturbance IAE, when similar robustness conditions are tion tuning procedure needs the frequency response of the process,
fixed. and this is unknown, a straight line approximated model of the
J.A. Romero et al. / Journal of Process Control 21 (2011) 840–851 843
0.04 40 0.2 4
0.03 G 30 0.15 G 3
1 2
0.02 20 0.1 2
0.01 10 0.05 1
0 0 0 0
0 1 2 3 4 5 0 1 2 3 4 5
a a
20 500 0.5 10
G3 0.4 G 8
4
0.3 6
0.2 4
0.1 2
0 0 0 0
0 1 2 3 4 5 0 1 2 3 4 5
a a
0.5 5 0.5 5
G5 G6
0 0 0 0
0 1 2 3 4 5 0 1 2 3 4 5
a a
0.4 4 0.4 4
0.3 G 3 0.3 G8 3
7
0.2 2 0.2 2
0.1 1 0.1 1
0 0 0 0
0 1 2 3 4 5 0 1 2 3 4 5
a a
Fig. 2. Controller gain Ki (solid lines, left axis) and gain margin m (dashed lines, right axis) variations as a function of parameter a (N = 10, m,r = 60◦ ). PID design.
frequency response is proposed to be obtained by estimating two alternatives can be found. For example, one of them consists of
points of the Nyquist plot. The first point should be near the critical adding a delay in the loop (the phase of the estimated point depends
point (where the phase of the process is around −180◦ ), and the on the delay). Once two points of the frequency response have been
second point at a lower frequency. These points can be obtained by obtained (M1 ej1 at frequency ω1 and M2 ej2 at frequency ω2 ), the
performing two modified relay feedback experiments. In [11] some magnitude and phase are approximated by the straight line defined
1 10 3 60
2.5 50
G 2 40
9 G10
0.5 5 1.5 30
1 20
0.5 10
0 0 0 0
0 1 2 3 4 5 0 −3
1 2 3 4 5
a x 10 a
0.06 4 6 300
0.05 G11 3.5 5 250
0.04 3 4 G12 200
0.03 2.5 3 150
0.02 2 2 100
0.01 1.5 1 50
0 1 0 0
0 1 2 3 4 5 0 5 10
a a
0.2 4 1.5 6
G G
13 14
1 4
0.1 2
0.5 2
0 0 0 0
0 1 2 3 4 5 0 1 2 3 4 5
a a
Fig. 3. Controller gain Ki (solid lines, left axis) and gain margin m (dashed lines, right axis) variations as a function of parameter a (N = 10, m,r = 60◦ ). PI design.
844 J.A. Romero et al. / Journal of Process Control 21 (2011) 840–851
and −100
near the gain crossover frequency of the first design (ωgt1 ), because
5. Design the PID controller using the approximation by the two
then the error in the final phase margin due to the straight line
straight lines, with specifications m,r and m,r , and finish the
approximation will be lower. The three points then define a two
auto tuning process.
straight lines approximate frequency response model that is used
again to tune automatically the PID using the procedure described
The most adequate value of parameters and r depend on the
in Section 3. Two parameters must be fixed to define the auto tun-
type of controller (PI or PID). For PID controller, adequate values
ing procedure. The first one is the phase of the process where the
are = − 130◦ , r = 1, while for PI controller, adequate values are
second point should be identified. The second parameter is the one
= − 100◦ , r = 0.5. These numerical values have been decided by
that defines the condition to perform or not the third experiment.
a heuristic approach using the test batch of models proposed in
This parameter can be defined as the maximum relative distance
[15,8], that represent the most common dynamics encountered in
between the gain crossover frequency of the first design, ωgt1 , and
industrial processes. Decreasing the parameter r implies increas-
the interval of frequencies defined by the two known points. If this
ing the probability of requiring a third experiment, leading to an
parameter is defined as r, the third point should be calculated only
improved accuracy, but at the cost of a longer experiment phase.
if
On the other hand, increasing the parameter r implies decreasing
ω the probability of requiring a third experiment, reducing the length
ω2 1
log > r log . (25) of the experiment phase, but at the cost of a less accurate result.
ωgt1 ω2
To summarize, the auto tuning procedure is then defined by the 4.1. Examples
following steps, including the equations that result from using the
relay feedback with delay experiments: As an example, consider the system
1 − 2s
G8 (s) =
1. Perform a relay feedback experiment without delay, with ampli- (s + 1)3
tude and hysteresis h. The result is a frequency ω1 , and
Fig. 4 shows the Bode diagram of the system, and the approxi-
amplitude A1 . The first point of the frequency response is defined
mation by one or two straight lines, as a result of the relay feedback
by frequency
ω1 , magnitude M 1 = A1 /4, and phase 1 = − −
experiments, with = 1 and h = 0.01. If the third experiment is not
4 2
arg A1
1 − ( Ah ) − j Ah (here, the describing function taken into account, the straight line approximation defined by the
1 1
two points has an significant error especially outside the inter-
of the relay with hysteresis has been used). val defined by those points. Using the point obtained with the
2. Perform a second relay feedback experiment with a delay third experiment, the approximation by two straight lines is more
L2 = ((− 1 + )1 )/ω1 , where is the phase of the desired accurate. Fig. 5 shows the disturbance response of the PID con-
point. The result is a frequency ω2 , and amplitude A2 . The trollers designed with the two points approximation and with the
second point of the frequency response is defined by fre- three points approximation, compared to the response of the PID
quency
ω2, magnitude M2 = A 2 /4 and phase 2 = L2 ω2 − −
designed with the full frequency response data, with specifications
arg 4 2
1 − ( Ah ) − j Ah . m ≥ 60◦ , m ≥ 2. The use of the third point improves the distur-
A2 2 2 bance response, making it closer to the true response. The cost is,
3. Tune the PID controller using the straight line approximation, of course, the longer experiment phase. In this case, the third exper-
with specifications m,r and m,r , and calculate the gain crossover iment would not be performed if a parameter r > 1.3 is taken. The
frequency ωgt1 . If log (ω2 /ωgt1 ) < rlog (ω1 /ω2 ) the auto tuning performance of the controller tuned after only two experiments is
ends. slightly worse but still reasonable.
J.A. Romero et al. / Journal of Process Control 21 (2011) 840–851 845
p2 p1 p0 p3
0 R= − − 2
6 2 27
−100
1
d
−200 p2 = (N − 2) 1+ ln(10)
f 20
10 −1
p1 = (2N 2 − 1)
Fig. 6. Bode diagram of G2 (s) and the approximation by one or two straight lines.
The circles are the points obtained by the relay feedback experiments.
1
d
p0 = (N − 2N 2 ) 1+ ln(10)
f 20
1
ln(10)
d
0.8 aKmax = ˇ ln(10) = 1+ (28)
f 20
0.6
The result of these equations is the starting point of an algorithm
0.4 developed to solve (26), that is shown in Fig. 8. In the first step of the
Amplitude
0.2 algorithm, Eq. (27) for PID or (28) for PI is used to calculate the value
a1 = aKmax where Ki (a) has a maximum. A PID or PI controller (PID1 )
0 is designed for this value of a applying the two steps described in
−0.2 Section 3, with m = m,r and using the straight lines approximated
process model. The gain margin m is also estimated using that
−0.4
model. If the gain margin restriction is fulfilled (condition mi >
−0.6 m,r is true), then the controller PID1 is the optimal one and the
algorithm stops, otherwise the algorithm looks for the value of a
−0.8
0 10 20 30 40 50 60 70 80 90 100 which fulfills the gain margin restriction. Taking into account that
time (sec) according to Section 3.2, m (a) increases as a decreases from aKmax ,
the value of a∗ is expected to be at the left of a1 . Therefore a is
Fig. 7. Disturbance response of system G2 (s) with PID controllers. (−) Full data. (− −) decreased by a in each iteration of the algorithm until the first
Two points approximation. (· · ·) Three points approximation.
value of a fulfilling the gain margin restriction is found (ai such that
mi > m,r ). Then the value of a∗ is calculated by interpolating the
last two points, i.e., as the intersection point of straight lines defined
Figs. 6 and 7 show the Bode diagram and the disturbance by the points (ai−1 , mi−1 ), (ai , mi ) and (ai−1 , m,r ), (ai , m,r ), Eq.
response for the same analysis of previous example applied to the (29). The value of a is defined as a = a1 /imax , where imax is the
system G2 (s) = 1 3 e−5s . In this case the third experiment would maximum number of iterations to cover the interval ]0, a1 [.
(s+1)
not be performed if a parameter r > 1.7 is taken, but in this case,
(mi − m,r )ai−1 − (mi−1 − m,r )ai
the behaviour of the controller tuned after only two experiments is a∗ = (29)
mi − mi−1
much worse due to the high approximation error, especially in the
phase (that results in a much lower phase margin (m = 17◦ ) than While the value of a is decreased, in a steps, looking for the gain
desired). margin condition ( m (ai ) > m,r ), two events may occur that must
846 J.A. Romero et al. / Journal of Process Control 21 (2011) 840–851
5. Simulation study
5 1
9
1
y,G
y,G
0 0
−5 −1
0 50 100 150 200 250 0 50 100 150
1
0.5
2
y,G
y,G10
0
−1
0 50 100 150 200 250 300 350 −0.5
0 5 10 15 20 25
0.2
2
3
y,G
11
0
y,G
−0.2
0 5 10 15 20 25 −2
1 0 100 200 300 400 500 600 700
4
y,G
0 10
y,G12
−1 0
0 50 100 150 200 250
1 −10
0 50 100 150 200 250
y,G5
0
2
13
−1 0
y,G
0 50 100 150 200 250
1
−2
0 50 100 150 200 250
6
y,G
0
1
−1
0 50 100 150 200 250
14
0
y,G
1
y,G7
0 −1
0 10 20 30 40 50
time(sec)
−1
0 50 100 150 200 250
2 Fig. 10. Relay experiments and disturbance step responses for the close-loop sys-
tems with models G9 –G14 and PI controllers.
y,G8
−2
(i.e. FR AUTO), the disturbance step response is obtained for the test
0 50 100 150 200 250 batch. The IAE and the sensitivity peak Ms obtained are presented
time(sec)
in Tables 1–3. These values are compared first with the tuning pro-
cedure using the full transfer function information as described in
Fig. 9. Relay experiments and disturbance step responses for the close-loop systems
with models G1 –G8 and PID controllers. [9], and secondly with the classical Ziegler–Nichols tuning rules,
described in [14] and the tuning method proposed in [13], which
will be referred as Zhuang–Atherton method.
margins: m,r = 60◦ , m,r = 2. A relay with amplitude = 1 and hys- Firstly, as can be seen in Tables 1–3, the IAE and the Ms obtained
teresis h = 0.001 is used. The results of simulations for PID and PI by the FR AUTO are very similar to the method FR presented in [9],
are presented in Figs. 9 and 10, respectively. despite the fact that FR method uses the full exact model and the
The oscillations at the beginning of simulations correspond to FR AUTO algorithm performs relay experiments to obtain only two
relay experiments carried out in order to estimate points in the sys- or, at most three, points in the frequency response. As a result it
tems frequency responses. The vertical lines in the oscillation zones can be concluded that the autotuning approach is able to capture
indicate the beginning and end of experiments, each experiment the interesting frequencies for control.
allowing the identification of one point in the frequency response. Secondly, the proposed FR AUTO method is compared with
As can be noted, for PID designs (Fig. 9) most of the models the Ziegler–Nichols and the Zhuang–Atherton methods. The
require two experiments: only models G2 and G8 need the iden- Zhuang–Atherton method is derived for FOPDT models, so no result
tification of three points of the frequency response. Model G2 has a can be provided for integrating models G1 and G12 . Moreover,
large time delay in comparison with the time constants, whereas G8 unstable tunings are noted by an ∞ IAE. In general, the values of IAE
is a non-minimum phase system. In the case of PI designs (Fig. 10), obtained with the proposed auto-tuning algorithm are smaller than
models with time delay (G11 ), integrator (G12 ) and non-minimum those obtained with Ziegler–Nichols and Zhuang–Atherton meth-
phase (G13 ) require three experiments. For the rest of models two ods, while the robustness indexes, Ms , are kept very similar. The
experiments are enough to tune the controllers. It is worth to note only exception is the Zhuang–Atherton method for model G8 which
that the number of experiments is linked with the parameter r in provides an IAE slightly smaller than the one achieved with the FR
Eq. (25). For PID and PI designs empirical values of r = 1 and r = 0.5 AUTO, however at the cost of reducing the robustness. The same
have been used. These values, however, can be modified in order happens with Ziegler–Nichols PI design for G12 . In this case the
to obtain more exact models or to reduce the maximum number of IAE obtained is smaller but again at the cost of a lower robustness
experiments to two, as suggested in Section 4. (higher Ms ).
After the experiments, in Figs. 9 and 10, once the controllers are In most of the cases, the algorithm found the solution for
tuned with the proposed frequency response autotuning method m = m,r . Only in three cases (models G8 , G13 and G14 ), marked
848 J.A. Romero et al. / Journal of Process Control 21 (2011) 840–851
Table 1 Table 3
Comparison of the results reached by the proposed PID auto-tuning method and Comparison of the results reached by the proposed PI auto-tuning method and
the ones in [14] (Ziegler–Nichols method) and [13] (Zhuang–Atherton method). FR the ones in [14] (Ziegler–Nichols method) and [13] (Zhuang–Atherton method). FR
AUTO: frequency response relay experiment method, FR: frequency response model AUTO: frequency response relay experiment method, FR: frequency response model
based method. based method.
G1 FR (m,r =45, m,r =2) 21.44 1.93 G9 FR (m,r =45, m,r =2) 1.72 1.93
FR (m,r =60, m,r =2) 40.84 1.70 FR (m,r =60, m,r =2) 2.20 1.63
FR AUTO(m,r =45, m,r =2) 24.16 1.88 FR AUTO(m,r =45, m,r =2) 1.68 1.80
FR AUTO(m,r =60, m,r =2) 46.25 1.62 FR AUTO(m,r =60, m,r =2) 2.71 1.52
Ziegler–Nichols 24.55 1.59 Ziegler–Nichols 11.97 1.26
Zhuang–Atherton – – Zhuang–Atherton 5.76 1.36
G2 FR (m,r =45, m,r =2) 12.83 2.19 G10 FR (m,r =45, m,r =2) 0.21 1.67
FR (m,r =60, m,r =2) 8.55 2.04 FR (m,r =60, m,r =2) 0.41 1.40
FR AUTO(m,r =45, m,r =2) 9.13 2.27 FR AUTO(m,r =45, m,r =2) 0.25 1.59
FR AUTO(m,r =60, m,r =2) 8.59 1.10 FR AUTO(m,r =60, m,r =2) 0.54 1.33
Ziegler–Nichols ∞ – Ziegler–Nichols 4.00 1.10
Zhuang–Atherton ∞ – Zhuang–Atherton 2.02 1.14
G3 FR (m,r =45, m,r =2) 0.04 1.70 G11 FR (m,r =45, m,r =2) 37.01 2.21
FR (m,r =60, m,r =2) 0.09 1.46 FR (m,r =60, m,r =2) 25.02 2.05
FR AUTO(m,r =45, m,r =2) 0.04 1.68 FR AUTO(m,r =45, m,r =2) 29.19 2.61
FR AUTO(m,r =60, m,r =2) 0.09 1.45 FR AUTO(m,r =60, m,r =2) 26.89 2.58
Ziegler–Nichols 1.70 1.21 Ziegler–Nichols 68.15 1.71
Zhuang–Atherton 1.00 1.29 Zhuang–Atherton 38.77 1.43
G4 FR (m,r =45, m,r =2) 1.62 2.08 G12 FR (m,r =45, m,r =2) 49.91 1.62
FR (m,r =60, m,r =2) 2.17 1.75 FR (m,r =60, m,r =2) 179.47 1.32
FR AUTO(m,r =45, m,r =2) 1.62 2.09 FR AUTO(m,r =45, m,r =2) 48.91 1.57
FR AUTO(m,r =60, m,r =2) 2.25 1.75 FR AUTO(m,r =60, m,r =2) 115.07 1.33
Ziegler–Nichols 7.56 1.67 Ziegler–Nichols 21.10 2.17
Zhuang–Atherton 4.35 1.95 Zhuang–Atherton ∞ –
Table 4 68
Computation load of the algorithm (evaluated in number of FLOPS) when applied
to the test batch of models. The column TIME contain the execution time when the 66
experiment experiment
algorithm is implemented in a hardware architecture with 20 Mega-FLOPS. 64 1 2
PID PI 62
y
Models FLOPS TIME (s) Models FLOPS TIME (s) 60
u
4
0
0 500 1000 1500 2000 2500 3000 3500 4000 4500
t
Fig. 12. Output and input of the thermal process during auto-tuning and control
experiment.
Fig. 11. Picture of the thermal process used for the experiment.
7. Conclusions
6. Experimental case In this paper, a PID auto-tuning procedure has been developed.
It is based on the use of modified relay feedback experiments
This section illustrates the applicability of the proposed PID auto (for example with added delay) to obtain two or three points of
tuning method to a real experimental case. The process to be con- the frequency response of the process, and the use of straight
trolled is a thermal system, composed by a heater resistor attached line approximations of the Bode diagram in order to tune the PID
to an iron plate inside a plastic cover. A switched amplifier drives through a simplified single parameter optimization method previ-
the resistor, while a thermocouple with an amplifier is used to mea- ously developed by the authors.
sure the temperature. The system is completed by a small fan that The auto-tuning procedure implies a low computing cost, and
can be used to apply a disturbance to the plant. The auto tuning the performance of the resulting control loop is somehow near
algorithm and the PID controller are implemented by a PC with a the optimum that could be obtained if the full information of the
data acquisition card using Matlab Real Time Windows Target soft- process model were available.
ware. A simple Euler discretization with period T = 1 second and The proposed algorithm has been compared with other auto-
a parallel realization of the controller with anti windup is used. A tuning approaches and with the optimum performance, using a
picture of the complete thermal system (without the plastic cover) batch of models widely used in the literature. The conclusion is that
is presented in Fig. 11. previous approaches are clearly improved, and the overall perfor-
Fig. 12 shows the input and output of the process during the mance obtained is quite similar to the one obtained by assuming
auto tuning phase and during the control phase for the follow- full information of the process model.
ing values of the parameters that define the algorithm: m,r = 60◦ , Finally, the algorithm has been tested on a real experimental
m,r = 2, = − 130◦ , r = 1, = 1, h = 0.05, N = 10, b = 1. An output ref- thermal process, showing that it works well with real measurement
erence yref = 60◦ C is selected to perform the experiment. As the noise and disturbances.
required input for that output value is unknown, an estimated value
of uav = 3 V is used. Taking into account the relay amplitude = 1,
Appendix A. Study of Ki (a)
the relay switched between umax = 4 V and umin = 2 V. This approxi-
mate selection of the input needed for the desired output reference
Assume that a straight line approximation of the frequency
led to an asymmetrical switching, as can be seen in the figure. How-
response is used for the controller design as
ever, this imperfection in the relay switching symmetry was not a
problem, as the behaviour of the tuned controller was still correct.
|G(jω)|db = c − d log(ω) (30)
In order to test the controller behaviour under reference and distur-
bance changes, the reference was increased 6◦ C at instant t = 2600 s,
arg(G(jω)) = e − f log(ω) (31)
and the fan was connected at instant t = 3400 s.
In this case, only two points were needed to approxi-
mate the frequency response. The first point, obtained without that can be written as
delay, corresponds to A = 0.143 and Tosc = 326 s (experiment 1 in c−d log(ω)
Fig. 12), leading to ω1 = 0.01927 rad/s, arg (G(jω1 )) = − 159.5◦ and G(jω) = 10 20 ej(e−f log(ω)) (32)
850 J.A. Romero et al. / Journal of Process Control 21 (2011) 840–851
Now, consider the case of the PI controller, whose frequency Applying the phase margin equation for a given value of a
response is
1 + (jω/zi ) K a arg(C(jωcg )) + arg(G(jωcg )) = − + 2 arctan(a)
C(jω) = Ki = i 1+ jω 2
jω jω ωcg a
− arctan + e − f log(ωcg ) = − + m,r
whose argument at the final crossover frequency ωcg is N
one obtains the final cross over frequency for that value of a
arg(C(jωcg )) = − + arctan(a) +2 arctan(a)−arctan a +e−
2 (N) m,r
2 ωcg = 10 f
where that is a degree 3 polynomial with a unique real root for a > 0. In
order to demonstrate this, if a1 , a2 , a3 are the roots of the above
1 d c polynomial, the following well known relations between the roots
˛= 1+ + e − m,r −
f 20 2 20 and the coefficients of the polynomial are true
dKi 10˛+ˇ arctan(a) In the case that d > 0, f > 0 and N > 2, the following inequalities
= ˇ ln(10) − a fulfil
da (1 + a2 )
3/2
−(a1 + a2 + a3 ) > 0
that has a unique root at
dKi ln(10)
d
a1 a2 + a2 a3 + a1 a3 > 0
= 0 ⇒ aKmax = ˇ ln(10) = 1+ (33)
da f 20
known formulas for degree 3 polynomials. Defining the polynomial [3] I. Kaya, D.P. Atherton, Parameter estimation from relay autotuning with asym-
coefficients as metric limit cycle data, Journal of Process Control 11 (4) (2001) 429–439, 8.
1
d
[4] B. Krinstianson, B. Lennartson, Robust tuning of PI and PID controllers: using
derivative action despite sensor noise, IEEE Control Systems Magazine 26 (1)
p2 = (N − 2) 1+ ln(10) (2006) 55–69.
f 20
[5] A. Leva, PID autotuning algorithm based on relay feedback, Control Theory and
Applications 140 (5) (1993) 328–338, ID: 1.
p1 = (2N 2 − 1) [6] M. Ma, X. Zhu, A simple auto-tuner in frequency domain, Computers & Chemical
Engineering 30 (4) (2006) 581–586.
1
d
[7] T. Minka, Lightspeed matlab toolbox, 2002, http://research.microsoft.com/en-
us/um/people/minka/software/lightspeed/.
p0 = (N − 2N 2 ) 1+ ln(10) [8] H. Panagopoulos, K.J. Åström, T. Hägglund, Design of PID controllers based on
f 20
constrained optimization., IEE Proceedings of the Control Theory Application
the optimum value of a can be obtained as: 149 (1) (2002) 32–40.
[9] R. Sanchis, J.A. Romero, P. Balaguer, Tuning of PID controllers based on sim-
3p1 − p22 plified single parameter optimization, International Journal of Control 83 (9)
Q = (2010) 1785–1798.
9 [10] K.K. Tan, T.H. Lee, S. Huang, K.Y. Chua, R. Ferdous, Improved critical point esti-
mation using a preload relay, Journal of Process Control 6 (5) (2006) 445–
p2 p1 p0 p3 455.
R= − − 2 [11] K.K. Tan, T.H. Lee, R. Ferdous, PID control, new identification and design meth-
6 2 27 ods, Automatic PID Controller Tunning-The Nonparametric Approach, Springer,
2005, pp. 147–182.
[12] S. Vivek, M. Chidambaram, An improved relay auto tuning of PID controllers
p2 3 3
aKmax = − + R+ Q 3 + R2 + R− Q 3 + R2 (35) for unstable FOPTD systems, Computers & Chemical Engineering 29 (10) (2005)
3 2060–2068.
[13] M. Zhuang, P. Atherton, Automatic tuning of optimum PID controllers, IEE Pro-
References ceedings D 140 (3) (1993) 216–224.
[14] K.J. Åström, T. Hägglund, Automatic tuning of simple regulators with specifica-
tions on phase and amplitude margins, Automatica 20 (5) (1984) 645–651.
[1] J. Crowe, M.A. Jonhson, PID control, new identification and design methods,
[15] K.J. Åström, H. Panagopoulos, T. Hägglund, Design of PI controllers based on
Phase-Locked Loop Methods, Springer, 2005, pp. 213–256.
non-convex optimization, Automatica 34 (5) (1998) 585–601.
[2] W.K. Ho, Y. Hong, A. Hansson, H. Hjalmarsson, J.W. Deng, Relay auto-tuning
[16] K.L. Åström, T. Hägglund, Revisiting the Ziegler–Nichols step response method
of PID controllers using iterative feedback tuning, Automatica 39 (1) (2003)
for PID control, Journal of Process Control (14) (2004) 635–650.
149–157.