ISA Transactions: Wuhua Hu, Gaoxi Xiao, Xiumin Li
ISA Transactions: Wuhua Hu, Gaoxi Xiao, Xiumin Li
                                                                         ISA Transactions
                                                         journal homepage: www.elsevier.com/locate/isatrans
An analytical method for PID controller tuning with specified gain and phase
margins for integral plus time delay processes
Wuhua Hu a , Gaoxi Xiao a,∗ , Xiumin Li b
a
    School of Electrical and Electronic Engineering, Nanyang Technological University, Singapore
b
    Department of Electronic and Information Engineering, Hong Kong Polytechnic University, Kowloon, Hong Kong
0019-0578/$ – see front matter © 2011 ISA. Published by Elsevier Ltd. All rights reserved.
doi:10.1016/j.isatra.2011.01.001
                                                          W. Hu et al. / ISA Transactions 50 (2011) 268–276                                                269
                                                                                       p = β/T
                                                                                        ω        i,
                                                                                      
where Kc , Ti and Td are the proportional, integral and derivative
                                                                                      
                                                                                      
                                                                                      
parameters, respectively. With this closed-loop system, explicit                             β 2 1 + α2                                                    (9)
PI/PD/PID parameters are solved for achieving a given GPM. While                        Am = 2             ,
                                                                                             α      1 + β2
                                                                                      
                                                                                      
the way of properly specifying a GPM depends on specific design
                                                                                      
                                                                                      
                                                                                        φm = arctan α − ωg τ ,
                                                                                      
requirements and demands extra studies, it is assumed that a GPM
has been specified by the designer throughout the paper. Some                        where
brief discussions on this are given in the next section.                                 
   Although PI and PD controller tunings are special cases of                                     
                                                                                        γ2       4
PID controller tuning, their tuning formulas and corresponding                       α=    1+ 1+ 2 ,                       with γ := Kp Kc Ti ,          (10)
GPM formulas are derived independently, adopting different                                2      γ
approximations for accuracy and simplicity.
                                                                                     (the negative α is omitted) and β is solved from
2.1. PI tuning formula and GPM-PI formula                                             arctan β = θ β,         with θ := τ /Ti .                           (11)
     Suppose the GPM of the closed-loop system is specified as                       Solution (9) also gives expressions of the gain and phase crossover
(Am , φm ), where Am denotes the gain margin and φm denotes the                      frequencies. As indicated by the above equations, the phase margin
phase margin. Given a PI controller in (2), the PI parameters (Kc , Ti )             φm is explicitly expressed; however, deriving the gain margin Am
are to be solved. According to the definition of GPM, we have                        requires first solving (11) for β . Although a numerical solution can
                                                                                     be used, for ease of application an approximate analytic solution is
arg[G(jωp )] = −π + arctan(ωp Ti ) − ωp τ = −π ,                           (3)
                                                                                     proposed. According to Appendix A.1, such a solution is
                                
                        Kc Kp       1 + ωp2 Ti2
                                                                                                               
                                                                                           π             16λB θ
                                                                                                 
 1
     = |G(jωp )| =                                ,                        (4)          β=                        ,               if 0 < θ ≤ θB ,
                                                                                      
                                                                                               1+ 1−
Am                               ωp2 Ti                                                    4θ             π2
                                                                                      
                                                                                      
                                                                                      
                                                                                                                                                        (12)
                                1 + ωg2 Ti2
                                                                                                    
                   Kc Kp
                                                                                      
                                                                                           1         120
1 = |G(jωg )| =                               ,                                       β =                 − 95,                  if θB < θ < 1,
                                                                                      
                                                                           (5)
                                                                                              −5 +
                               ωg2 Ti                                                      2θ          θ
φm = arg[G(jωg )] + π = arctan(ωg Ti ) − ωg τ ,               (6)                    where λB = 0.917 and θB = 0.582. The constraint 0 < θ <
                                                                                     1 is imposed to ensure a positive solution for β . With β given
where ωp and ωg are the phase and the gain crossover frequencies,                    in (12), both Am and ωp in (9) are then explicitly expressed. The
respectively. Due to the nonlinearity of the equations, the four
                                                                                     above solution of (α, β) meanwhile justifies the uniqueness of the
variables ωg , ωp , Kc and Ti are normally analytically unsolvable,
                                                                                     solution to (8).
preventing derivation of a general PI tuning formula [1]. By
                                                                                         To evaluate the accuracy of (12) as the solution of (11), numeric
introducing two intermediate variables, however, all these four
                                                                                     tests are carried out. Without loss of generality, let Kp = 1. For
variables can be solved. Specifically, let α := ωg Ti and β := ωp Ti .
                                                                                     different (τ , Am , φm ), the PI parameters are first calculated by the
From (3)–(6), the following solution is obtained:
                                                                                     PI tuning formula. With these PI parameters, the realized GPMs are
       1                                                                             then estimated by the GPM-PI formula, using β ’s estimated by (12).
ωg = τ (arctan α − φm ),
                                                                                    The estimated GPMs are compared with the originally specified
ω = arctan β = β ω ,
                                                                                     GPMs correspondingly, so that the accuracy of the approximations
   p                  g
          τ         α                                                      (7)       is tested. In the computation, the parameters are chosen randomly
          αω g                                                                       as τ ∈ (0, 1] (which loses no generality since the PI tuning
                  ,
 Kc =    √
       Kp 1 + α 2                                                                    formula and GPM-PI formula both apply regardless of the process
 Ti = α/ωg ,                                                                         parameters), Am ∈ (1, 12] and φm ∈ (10°, 70°]. The numerical
270                                                         W. Hu et al. / ISA Transactions 50 (2011) 268–276
Fig. 2. GPMs estimated by GPM-PI formula versus true GPMs specified randomly a priori (50 tests), where the dots denote the estimated points and the circles denote the
true points.
results are shown in Fig. 2, where the relative estimation error                       The solution (α ′ , β ′ ) is unique since α ′ > 0 and β ′ > 0 which
(R.e.e.) is defined as R.e.e. := (the estimated value — the true                       make sure positive crossover frequencies and PD parameters. The
value)/the true value. Since α and φm are exactly derived by the                       initial guess of (α ′ , β ′ ) for the numerical solver can be any pair of
GPM-PI formula, their estimation errors are omitted in the figure,                     large enough positive numbers, e.g., (5, 5), (10, 10), etc. Therefore,
as it remains the same for later discussions on PD and PID controls.                   (17) gives the PD tuning formula.
The results indicate that the estimation errors of Am ’s are normally                      Inversely, given an IPTD process in (1) and a PD controller in
within 2% and thus validate (9) adopting the approximate solution                      (2), the resultant GPM and crossover frequencies of the closed-loop
of β by (12).                                                                          system are derived from (13)–(16) as
                                                                                          ωg = α ′ /Td ,
                                                                                        
                                                                                        ωp = β /  Td ,
2.2. PD tuning formula and GPM-PD formula                                                        ′
                                                                                        
                                                                                        
                                                                                        
                                                                                        
   Given a specified GPM (Am , φm ), an IPTD process in (1) and a PD
                                                                                               β ′ 1 + α ′2                                                      (19)
                                                                                          Am = ′            ,
                                                                                               α 1 + β ′2
                                                                                        
controller in (2), the PD parameters (Kc , Td ) are to be solved. The
                                                                                        
                                                                                        
                                                                                        
                                                                                          φm = arctan α − ωg τ + π /2,
                                                                                                         ′
                                                                                        
definition of GPM leads to
φm = arg[G(jωg )] + π = π /2 + arctan ωg Td − ωg τ ,                        (16)       Since deriving the gain margin requires solving β from (21), an
                                                                                                                                                    ′
Fig. 3. GPMs estimated by GPM-PD formula versus true GPMs specified randomly a priori (50 tests), where the dots denote the estimated points and the circles denote the
true points.
Fig. 4. GPMs estimated by GPM-PID formula versus true GPMs specified randomly a priori (50 tests), where the dots denote the estimated points and the circles denote the
true points.
where α and β are the respective solutions of the two equations: with xB := 1.5, x′B := 1.0 and λ(t ) := (arctan t )/t; and
formulas respectively in (7), (17), and (30), we see that the PID                          enhanced disturbance rejection) [18] about (2.9, 42.5°) for an IPTD
parameters have a common form of                                                           process, when the recommended settings are adopted for both
                                                                                           methods.
       k1
Kc =          ,       Ti = k2 τ ,       Td = k3 τ ,                            (40)           Finally, we apply the GPM-PI/PD/PID formulas derived in the
       Kp τ                                                                                last section to estimate the GPMs realized by relevant PI/PD/PID
where the parameters k1 , k2 , k3 are specifically                                         tuning rules as collected in [1]. The GPM-PI/PD/PID formulas
                                                                                           indicate that any PI/PD/PID controllers with the same (k1 , k2 , k3 ) in
                          α(arctan α − φm )
PI controller: k1 =           √             ,                                              (40) result in the same GPM, regardless of the process parameters.
                                1 + α2                                                     This enables numeric computation of the exact GPM realized by
                  α                                                                        each rule in the form of (40). To compare, GPM attained by each
k2 =                       ,        k3 = 0;
       arctan α − φm                                                                       rule is computed by using both the GPM-PI/PD/PID formula and
                           arctan α ′ + π /2 − φm                                          the numeric approach. The results are documented in the link [24],
PD controller: k1 =                 √                 ,      k2 = ∞,                       which take more than four pages to present and hence are omitted
                                      1 + α ′2                                 (41)        here. The results show that various GPMs are achieved by the
                 α′                                                                        existing tuning rules. Note that the larger the gain margin or the
k3 =                         ;
      arctan α ′ + π /2 − φm                                                               smaller the phase margin is, the more aggressive yet less robust
                             αϕα                                 α                         the closed-loop performance will be. The summary of such GPMs
PID controller: k1 =                      ,              k2 =      ,                      thus provides a rich reference for control engineers to tune PID
                        (1 − kα 2 )2 + α 2                       ϕα
                                                                                           controllers. Meanwhile the results verify that the GPM-PI/PD/PID
k3 = kk2 .                                                                                 formulas are accurate for GPM estimations.
Here ϕα := arctan 1−αkα 2 + H (1 − kα 2 )π − φm , and α , α ′ and α
for the PI, PD and PID controllers are determined from (8), (18) and                       4. Conclusion
(31), respectively.
    The common form of PI/PD/PID parameters in (40) indicates
                                                                                              For an IPTD process, PI/PD/PID tuning formulas with specified
that different rules employing different values of (k1 , k2 , k3 ) are
                                                                                           GPM were obtained and so were GPM-PI/PD/PID formulas for
realizing different GPMs which consequently lead to various
                                                                                           estimating GPM resulting from a given PI/PD/PID controller. The
closed-loop performances. This gives a unified interpretation
                                                                                           tuning formulas indicate a common form of the PID parameters and
to the vast variety of PI/PD/PID tuning rules accumulated in
the literature [1]. From this viewpoint, PI/PD/PID control design                          unify a large number of tuning rules as PI/PD/PID controller tuning
on an IPTD process is essentially choosing a proper GPM                                    with various GPM specifications. The GPM formulas accurately
or parameter set (k1 , k2 , k3 ). The GPM or parameter set can                             estimate the GPM realized by each relevant PI/PD/PID tuning rule
be selected via performance optimization subject to design                                 as collected in [1] and the results are summarized in the link [24].
constraints. Depending on the specific performance index and                               The results show that a variety of GPMs are attained by the existing
design constraints, the solution may differ from case to case and                          rules. Since the rules were developed based on various criteria
particular studies are required. A summary of various designs can                          and methods, the summary of their resulting GPMs provides a rich
be found in [1]. In particular, the well-known SIMC rule [12] uses                         reference for control engineers to tune PID controllers, helping to
a GPM of about (3.0, 46.9°) and the improved SIMC rule (with                               select a rule or GPM for a specific design.
274                                                   W. Hu et al. / ISA Transactions 50 (2011) 268–276
Acknowledgements
therefore omitted.):
                                                                                          
                                                                                                with ϕ := arctan( −D/R) + H (R)π ,          if D < 0.
                                                                                          
          β                                                                              Here H (•) is the function defined in (29), and D and R keep the
arctan          = θ β, if 1 − kβ 2 > 0;                                       (55)
       1 − kβ 2                                                                          same as those in (65).
                                                                                            With (57), (59) and (66), the approximate solution of (34) is thus
          β
arctan          = θ β − π , if 1 − kβ 2 < 0.                                  (56)       obtained as follows
       1 − kβ 2                                                                                              
                                                                                                                             2
                                                                                                                                         
   Let x := β/(1 − kβ ) and y := θ β in (42). From (46) and (50)
                              2
                                                                                                                   
                                                                                                1    1      3        1    3         12
                                                                                             
                                                                                                                       + 2 − 3 , if β < βB ;
                                                                                             
                                                                                                − 2+
                                                                                            
                                                                                            
an approximate solution of (55) is derived as                                               
                                                                                            
                                                                                               2 k        θ         k   θ         kθ
                                                                                            
                                                                                            
                                                                                        
                                                                                            
                                                                                                                                      
                                                                                                   π                    16λB (θ − λB k)
                                 2                                                                             
        1   1      3       1    3        12
                                                                                          
                                                                                                                                            ,
                                                                                           
 β=  − 2 +                 + 2 − 3 ,                                                                       1+ 1−
                                                                                          
                                                                                         β = 4(θ − λB k)                       π2
                                                                                           
                  θ            θ        kθ
        2 k                k                                                                                                                  (68)
                                                                                             if βB ≤ β <      /;
                                                                                                            1
  if 0 < β < βB ,                                                            (57)
                                                                                                                                       
                                                                                                   π                    16λ′B (θ − λ′B k)
                                                                                            
                                                                                            
                                                                                           
          π                   16λB (θ − λB k)                                                                                               ,
                                                                                          
                                                                                                            1+ 1−
 β=                                             ,                                             4(θ − λ′B k)                     π2
                                                                                           
                     1+ 1−
                                                                                           
      4(θ − λB k)                   π2
                                                                                           
                                                                                                     √
                                                                                           
                                                                                            
                  √                                                                          if 1/ k < β ≤ βB′ ;
                                                                                           
                                                                                            
  if βB ≤ β < 1/ k,
                                                                                           
                                                                                              −a2 /3 + U , if β > βB′ ,
where                                                                                    where the intermediate variables, λB and βB , λ′B and βB′ , a2 and U,
                                                                                        are defined in (58), (60), and {(62), (65), (67)}, respectively. Since
λB := λ(1/xB ),           βB := ( 1 + 4kx2B − 1)/(2kxB ),                     (58)       it is hard to give the piecewise conditions of (68) in terms of θ as
                                                                                         that in (53), the candidate solutions are calculated in a top-down
with xB := 1.5 and λ(•) being defined in (47).
                                                                                         sequence until a feasible β is obtained; if no feasible solution is
   To solve (56), the approximation skills used in (22)–(23)
                                                                                         achieved, (34) will be taken as having no solution, or a numerical
are adopted. Specifically, by applying the skill used in (23), an
                                                                                         solution to it has to be tried.
approximate solution of (56) is obtained as                                                  Additionally, another simpler yet less accurate approximate
                                                                                         solution for (34) can be derived. The main idea√is as follows. For
                                          
         π                16λ′B (θ − λ′B k)
β=                  1+ 1−                     ,                                          the case of (55) and the case of (56) with 1/ k < β ≤ βB′
     4(θ − λ′B k)                π2                                                      (Here βB′ is of a different value from that in (68).), the approximate
      √                                                                                  solutions remain the same as those in (57) and (59), respectively;
 if 1/ k < β ≤ βB′ ,                                                          (59)       and for the case of (56) with β > βB′ , first (56) is approximated
where                                                                                    by replacing ‘‘1 − kβ 2 ’’ with −kβ 2 (requiring that kβB′2 ≫ 1—here
                                                                                        kβB′2 = 10 is used, by selecting a proper boundary point x′B ). Then
λ′B := λ(1/x′B ),         βB′ := ( 1 + 4kx′B2 − 1)/(2kx′B ),                  (60)       by applying the same skill as that in (22), a less accurate yet simpler
                                                                                         approximate solution of (34) can be obtained. Specifically, it is as
with x′B := 1.0 and λ(•) being defined in (47). And for the case                         follows:
where β > βB′ , by applying the skill used in (22) the following                            
equation of β is obtained:
                                                                                                              
                                                                                                                             2
                                                                                                                                          
                                                                                                 1 1       3          1    3         12
                                                                                             
                                                                                                                        + 2 − 3 , if β < βB ;
                                                                                             
                                                                                            
                                                                                               − 2+
β 3 + a2 β 2 + a1 β + a0 = 0,                                                                2 k θ                       θ         kθ
                                                                                            
                                                                              (61)          
                                                                                                                     k
                                                                                            
                                                                                            
                                                                                            
where                                                                                                                                    
                                                                                                    π                    16λB (θ − λB k)
                                                                                                               
                                                                                            
                                                                                                                                             ,
                                                                                            
a2 := −π /θ ,            a1 := (λ′B − θ )/(kθ ),         a0 := π /(kθ).                                      1+ 1−
                                                                                            
                                                                              (62)
                                                                                             4(θ − λB k)                       π2
                                                                                            
                                                                                            
                                                                                            
                                                                                                               √
                                                                                            
Eq. (61) is a standard cubic equation with real coefficients, and its                    β=     if βB ≤ β < 1/ k;                            (69)
feasible solution (being real and positive) is obtained as
                                                                                                                                           
                                                                                                    π                    16λ′B (θ − λ′B k)
                                                                                            
                                                                                            
                                                                                                                                             ,
                                                                                            
                                                                                                             1+ 1−
                                                                                            
β = −a2 /3 + S + T ,
                                                                                            
                                                                              (63)            4(θ − λ′B k)                      π2
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                                     √
                                                                                                   1/ k < β ≤ βB′ ;
                                                                                            
where                                                                                        if 
                                                                                            
                                                                                            
                                                                                                                    
                                                                                              π               4λ′′B θ
                                                                                            
                √                           √
                                                                                          
                                                                                            
       3                           3
                    D,                            D,                                                                    , if β > βB′ ,
                                                                                            
S :=       R+               T :=       R−                                     (64)
                                                                                                   1+ 1−
                                                                                              2θ               kπ 2
                                                                                            
with
                                                                                         where λB := λ(1/xB ), λ′B := λ(1/x′B ), λ′′B := λ(x′B ), βB :=
D := Q + R ,
           3    2
                   Q := (3a1 −              a22   )/9,                                                                       √
                                                                                          
                                                                              (65)       ( 1 + 4kx2B − 1)/(2kxB ) and βB′ :=   10/k, with xB := 1.5,
R := (9a2 a1 − 27a0 − 2a32 )/54.
                                                                                         x′B := βB′ /(kβB′2 − 1) and λ(•) being defined in (47). As expected, the
Since D in (64) may be negative, leading to complex numbers in the                                                                          √
                                                                                         estimated β may not be accurate when β > 1/ k, but it is found
calculations which should be avoided in applications, the solution
                                                                                         to be able to achieve the final goal of estimating the gain margin
(63) is expressed in an alternative way such that
                                                                                         Am with satisfactory accuracy. The relative estimation errors are
β = −a2 /3 + U ,                                                              (66)       mostly within 7%. Exemplary results are shown in Fig. 7.
276                                                             W. Hu et al. / ISA Transactions 50 (2011) 268–276
Fig. 7. Typical relative estimation errors of β and Am , with β being estimated by (69).
References                                                                                 [14] Kookos I, Lygeros A, Arvanitis K. On-line PI controller tuning for integra-
                                                                                                tor/dead time processes. European Journal of Control 1999;5:19–31.
 [1] O’Dwyer A. Handbook of PI and PID controller tuning rules. 2nd ed. London:            [15] Visioli A. Optimal tuning of PID controllers for integral and unstable processes.
     Imperial College Press; 2006.                                                              In: IET2002. p. 180–4.
 [2] Åström KJ, Hägglund T. Advanced PID control. Research Triangle Park (NC):             [16] Wang Y, Cai W. Advanced proportional-integral-derivative tuning for
     ISA-The Instrumentation, Systems, and Automation Society; 2005.                            integrating and unstable processes with gain and phase margin specifications.
 [3] Visioli A. Practical PID control. London: Springer; 2006.                                  Industrial & Engineering Chemistry Research 2002;41:2910–4.
 [4] Kano M, Ogawa M. The state of art in advanced process control in Japan.               [17] Chidambaram M, Padma Sree R. A simple method of tuning PID controllers for
     In: IFAC symposium ADCHEM. Istanbul (Turkey); 2009.                                        integrator/dead-time processes. Computers & Chemical Engineering 2003;27:
 [5] Johnson MA, Moradi MH, Crowe J. PID control: new identification and design                 211–5.
     methods. Berlin: Springer; 2005.                                                      [18] Hu W, Xiao G, Cai W-J. Simple analytic formulas for PID tuning. In:
 [6] Seborg D, Edgar T, Mellichamp D. Process dynamics and control. 2nd ed. New                 11th international conference on automation, robotics and computer vision.
     York (USA): John Wiley; 2004.                                                              Singapore; 2010.
 [7] Ali A, Majhi S. PID controller tuning for integrating processes. ISA Transactions     [19] Wang QG. In: O’Dwyer Aidan, editor. Handbook of PI and PID Controller Tuning
     2010;49:70–8.                                                                              Rules. London: Imperial College Press; 2003. pp. 375; Automatica 2005;41:
 [8] Seshagiri Rao A, Rao VSR, Chidambaram M. Direct synthesis-based controller
                                                                                                355–6.
     design for integrating processes with time delay. Journal of the Franklin
                                                                                           [20] Lee CH. A survey of PID controller design based on gain and phase margins
     Institute 2009;346:38–56.
                                                                                                (invited paper). International Journal of Computational Cognition 2004;2:
 [9] Shamsuzzoha M, Lee M. Analytical design of enhanced PID filter controller
     for integrating and first order unstable processes with time delay. Chemical               63–100.
     Engineering Science 2008;63:2717–31.                                                  [21] Tan KK, Wang Q-G, Hang CC, Hägglund T. Advances in PID control. London:
[10] Garcia P, Albertos P. A new dead-time compensator to control stable and                    Springer; 1999.
     integrating processes with long dead-time. Automatica 2008;44:1062–71.                [22] Ho WK, Hang CC, Cao LS. Tuning of PID controllers based on gain and phase
[11] Wang B, Rees D, Zhong QC. Control of integral processes with dead time. Part               margin specifications. Automatica 1995;31:497–502.
     IV: various issues about PI controllers. IEE Proceedings-Control Theory and           [23] Åström KJ, Hägglund T. Automatic tuning of simple regulators with
     Applications 2006;153:302–6.                                                               specifications on phase and amplitude margins. Automatica 1984;20:
[12] Skogestad S. Simple analytic rules for model reduction and PID controller                  645–651.
     tuning. Journal of Process Control 2003;13:291–309.                                   [24] Hu W, Xiao G, Li X. PI/PD/PID tuning rules for IPTD (integral plus time de-
[13] Luyben W. Tuning proportional-integral-derivative controllers for integra-                 lay) processes and their realized GPM (gain and phase margins). Supple-
     tor/deadtime processes. Industrial & Engineering Chemistry Research 1996;                  mental Material; http://www3.ntu.edu.sg/home/EGXXiao/GPM_Tables.pdf;
     35:3480–3.                                                                                 2010.