0% found this document useful (0 votes)
107 views7 pages

PID Tuning With Exact Gain and Phase Margins: Qing-Guo Wang, Ho-Wang Fung, Yu Zhang

rad PID
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views7 pages

PID Tuning With Exact Gain and Phase Margins: Qing-Guo Wang, Ho-Wang Fung, Yu Zhang

rad PID
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

ISA Transactions 38 (1999) 243249

www.elsevier.com/locate/isatrans

PID tuning with exact gain and phase margins


Qing-Guo Wang*, Ho-Wang Fung, Yu Zhang
Department of Electrical Engineering, National University of Singapore, Singapore 119260

Abstract
In this paper, a simple PID controller design method that achieves user-specied gain and phase margins is pro-
posed. Unlike other existing methods in the same category where assumptions on the process dynamics are made to
simplify the non-linear problem encountered in computation, our method can yield exact solution for a general linear
process. Since the set of unknowns outnumbers the set of equations in the problem, an extra equation is introduced by
relating the closed-loop bandwidth to the process bandwidth. This also leads to a simple solution to the gain and phase
margin problem. Simulation examples are included to demonstrate the eectiveness of the method. # 1999 Elsevier
Science Ltd. All rights reserved.
Keywords: Frequency response; Gain margin; Phase margin; PID controller

1. Introduction important indicators of system robustness [1], they


also reect on the performance and stability of the
The Proportional-plus-Integral-plus-Derivative system and thus are widely used for controller
(PID) controllers have found wide acceptance and designs. Nevertheless, to the best of our knowledge,
applications in the industries for the past few dec- no existing PID tuning formulae in terms of gain
ades [1]. In spite of the their simple structures, PID and phase margins can achieve both gain and
controllers are proven to be sucient for many phase margin specications for a general linear
practical control problems [2] and hence are par- process [2,5] and simplications are usually made
ticularly appealing to practicing engineers. An on the structure of the process such as the
abundant amount of research work has been assumption of the plant being a rst order plus
reported in the past on the tuning of PID con- dead time one to obtain approximate solutions [1,7].
trollers. ZieglerNichols step response, Ziegler The main diculties lie in the non-linearities of
Nichols ultimate cycling, CohenCoon, Internal the gain and phase equations which are further
model control, and error-integral criteria (IAE- complicated by the coupling among them.
setpoint, IAE-load, ITAE-setpoint, ITAE-load) Usually, numerical methods have to be used and
tuning formulae are to mention only a few [3]. iterations are needed. Even then, the solution is
Gain and phase margins are typical control loop not straightforward. Convergence, initial estimate
specications associated with the frequency and long search time problems arise.
response technique [4]. Not only do they serve as In this paper, we present a simple and straight-
forward controller design method that can simul-
* Corresponding author. Tel.: +65-874-2282; fax: +65-779- taneously achieve exact gain and phase margins
1103. for a general linear plant without making any
E-mail address: elewqg@nus.edu.sg (Q.-G. Wang) assumptions. Using the critical point information
0019-0578/99/$ - see front matter # 1999 Elsevier Science Ltd. All rights reserved.
PII: S0019-0578(99)00020-8
244 Q.-G. Wang et al. / ISA Transactions 38 (1999) 243249

and the gain margin specication, the proportional where !P and !g are the phase and gain crossover
gain of the controller is immediately determined. frequencies of the loop, respectively. Now the
Based on this value and the desired phase margin, tuning objective is to determine the controller
another point on the Nyquist plot is searched and parameters KP ; KI and KD so that the given gain
located. From the imaginary parts of the two points, and phase margins (Am and m ) are achieved, i.e.
the Integral and Derivative gains are calculated. (2) and (3) are satised.
The paper is organized as follows. In Section 2, It is noted that there are altogether ve
the exact gain and phase margin method is pre- unknowns, namely KP ; KI ; KD ; !P and !g , in (2)
sented. Simulation examples will follow in Section and (3). Since the equations include complex num-
3 to illustrate the use of the method. Conclusions bers, they can be broken down into four equations
will be drawn in Section 4. with real numbers. It is now easily seen that the
number of unknowns exceeds the number of equ-
ations, leading to an innite number of solutions
2. The exact gain and phase margin method to (2) and (3), unless one extra constraint is added.
The additional equation can be introduced by
Suppose that the transfer function Gs or the considering the bandwidth of the system. The
frequency response Gj! of a linear stable process bandwidth of a process is dened as the frequency
is available and the single loop controller cong- at which the process gain drops by 3 dB below
uration as shown in Fig. 1 is adopted. A PID that at the zero frequency, and is usually approxi-
controller with the transfer function: mated by its phase crossover frequency, since fre-
quencies below it constitute the most signicant
KI range in controller design. In controller tuning,
Ks KP KD s; 1
s the closed-loop bandwidth should be carefully
chosen. If it is too large, the control signal will
is employed to control the process. Assume that saturate. If it is too small, sluggish response will
the control system specications are given in terms result. It is well accepted in engineering practice
of gain margin Am and phase margin m . As a that the closed-loop bandwidth should be close to
standard engineering practice, it is required and its open-loop bandwidth. In our method, we set
thus assumed that Am > 1 and 0 < m < 2 . It fol-
lows from the margin denition that !P !c ; 2 0:5; 2; 4
 
KI 1 where !P is the closed-loop bandwidth and !c the
Gj!P KP jKD !P ; 2
!P Am open-loop bandwidth. The default value for is 1.
The value for !c is available from the process fre-
  quency response and is the point that satises
KI
Gj!g KP jKD !g expjm ; 3
!g Gj!c : 5

Fig. 1. Single-loop controller feedback system.


Q.-G. Wang et al. / ISA Transactions 38 (1999) 243249 245

It can be easily read o from plots of Gj! or Gj!P cosm Gj!
found from data of Gj! for it is the lowest non- f! :
Gj! cosGj!P
zero frequency point at which the imaginary part
of Gj! equals to zero. With (4), !P is readily
Then, (11) will have a solution for !g 2 0; !P if
determined and the number of unknowns is 1 1
reduced from ve to four and (2) and (3) can then f0 < and f!P > . As a PID controller
Am Am
be solved to give provides a phase leag or lag of no more than 2 , (2)
  implies
1
KP Re ; 6
Am Gj!P 3 
< Gj!P < ; 12
2 2
  
 !P !g 1
KI XP !g Xg !P ; 7 and cosGj!P < 0. For 0 < m < and
!g !P 2
Am > 1 > 0, one sees cos m > 0 and

  1 Gj!P cosm 1
XP Xg !P !g f0 <0< :
KD ; 8 Gj0 cosGj!P Am
!g !P !g !P

1
where On the other hand, f!P > requires
Am
  cosm Gj!P 1
1 > ;
XP Im ; 9 cosGj!P Am
Am Gj!P
or
 
expjm 1 Am cos m
Xg Im ; 10 tanGj!P > :
Gj!g Am sin m

and !g satises Combining it with (12) yields


 
    1 Am cos m
expjm 1  arctan < Gj!P
Re Re ; 11 Am sin m 13
Gj!g Am Gj!P 
< :
2
which is equal to KP .
In view of the above development, the design (13) is a condition which guarantees (11) to have a
problem is solvable if and only if (11) yields a solution, and it can be easily checked with the
solution for !g . One notes that (11) can be
given Am ; m and !P . For the default case of 1
equivalently put into
where
 Gj!P  , (13) reduces to arctan
 1 Am cos m
Gj!P cos m Gj!g 1 < 0, or Am cos m > 1, a very
: Am sin m
Gj!g cosGj!P Am simple test. Further, for the most typical speci-
cations where the gain and phase margins are set
The point !g may be identied by searching down 
to 3 and (or 60 ), respectively, Am cos m
from the frequency ! !P towards ! 0 until 3

(11) holds. Let 1:5 > 1 and there is always a solution to (11).
246 Q.-G. Wang et al. / ISA Transactions 38 (1999) 243249

To demonstrate how to use (13), consider a sec- is reached at t ts when both yt ys t


ond order plus dead time process: and ut us t for t5ts become periodic.
The process frequency response is then cal-
1 culated using the formula:
Gs es
s 1s 3
Ys j! Yj!
The phase crossover frequency of the process is Gj! ; 14
Us j! Uj!
!c 1:626rad=s. If the gain and phase margins
are rst set to 1.5 and 1.396 (or 80 ), respectively, where
8
 > ys if step test
(13) becomes 2:677 < Gj!P < , and the >
>
2 < j! ; is performed
corresponding !P satises 0:720 < !P < 1:322 Ys j! TC
>
> 1 if relay test
rad/s. The choice of !P !c 1:626 rad/s will >
: ys tej!t dt;
1e j!T C
0 is performed
violate (13). One possibility to meet (13) is to
and 15
reduce !P , say, to 1.3 rad/s, then the solution to
(11) is obtained as !g 0:565 rad/s. Another pos- 8
>
> u if step test
sibility is, with !P !c unchanged, to modify the > s;
< j! is performed

gain and phase margins to 3.0 and 3 (or 60 ), Us j! TC
>
> 1 if relay test
respectively. This makes (13) as 3:332 < Gj!P >
: us tej!t dt;
 1 ej!TC 0 is performed
< , or 0:720 < !P < 1:754 rad/s, and !P
2 16
!c 1:626 rad/s lies in that range. The solution to
(11) is then obtained as !g 0:535 rad/s. and yt yt ys t; ut ut us t. The
values of Yj! and Uj! are computed via
2.1. Tuning procedure the Fast Fourier Transform [8].

Given the plant Gs or Gj!, the PID para-


meters can be tuned to meet both gain margin Am 3. Simulation examples
and phase margin m in the following way:
We shall now look at some examples and illus-
1. Obtain the process phase crossover fre- trate the use of the method. Comparisons will be
quency !c from Gj!. made with Ho's Gain and Phase Margin Method
2. Determine the ratio of closed-loop to open- (GPM) [1]. In their method, the process is mod-
loop bandwidth, ( 2 0:5; 2 (with a eled as a second order plus dead time plant using
default of 1) and set !P !C . the frequency response at the zero and the phase
3. Check whether or not (13) is satised. If not, crossover frequency. It is the most suitable candi-
either reduce !P or modify the gain/phase date for comparison since it is the best and latest
margin to meet (13). method compared with most of other tuning for-
4. Calculate KP from (6). mulae. In addition, it is designed to meet user-
5. Search from ! !P down towards ! 0 for dened gain and phase margins, which is also the
the frequency !g that satises (11). objective of our method. In all the examples, the
6. Compute KI and KD from (7) and (8). gain and phase margins are set to 3 and 3 (or 60 ),
If the frequency response of the process is respectively, and the value of to 1. According to
not available, its estimate can be obtained by the previous discussion, step iii) in the tuning pro-
performing a step test or relay test [2] on the cedure can be dispensed with as a solution to (11)
process. Input and output data fut; ytg is guaranteed under this set of gain and phase
are collected from t 0 until the steady state margin specication. Step responses using the
Q.-G. Wang et al. / ISA Transactions 38 (1999) 243249 247

proposed method are plotted in solid lines, The designed PID controller is hence
whereas those using Ho's method are in dashed
lines in the gures that follow. 0:4241
Ks 0:6107 0:3449s:
s
3.1. Example 1
The gain and phase margins achieved are 3.0 and
This example is taken from a real industrial 1.047 (or 60.0 ), respectively. The response of the
HVAC system [6]. The supply air pressure in the resultant system to the step change of reference r
HVAC system is regulated by the speed of a sup- from 0 to 1 at time 0 together with the load dis-
ply air fan. The dynamics from the control signal turbance response introduced at time 20 is shown
feeding to the fan Variable Speed Drive to the in Fig. 2. The PID parameters using Ho's method
supply air pressure can be modeled as are given by

1 0:3713
Gsap s e2s Ks 0:4643 0:1451s:
0:12s2 1:33s 1:24 s
with gain and phase margins of 3.02 and 1.032 (or
With the frequency response Gsap j!, the pro- 59.14 ). Since Ho's method nearly achieves the
posed PID tuning method can be used: Step (i) the given margins, both methods yield similar perfor-
process phase crossover frequency !c is obtained mance as expected.
as !c 1:1052 rad/s from Gsap j!; Step (ii) with
1 (the default value), !P is set as !P 1:1052; 3.2. Example 2
Step (iii) (13) is checked and found satised;
Step (iv) KP is calculated
 from (6) as Consider a second order oscillatory process
1
KP Re 0:6107; Step (v) we 1
3  G1:1052j Gs e2s :
search from ! !c towards ! 0 to nd the s2 2s 3
frequency !g 0:3325 that satises (11), i.e.
It follows from the tuning procedure that the
  controller is,
cos60 j sin60
Re 0:6107
Gj0:3325 0:968
  Ks 0:947 0:775s:
1 s
Re ;
3Gj1:1052
Gain and phase margins of 3.0 and 1.047 (or
Step (vi) the intermediate values XP and Xg are 60.0 ) are achieved. The response of the resultant
readily obtained to be 2.345105 and 1.1522; system to the step change of reference r from 0 to
and the value of KI and KD are then calculated 1 at time 0 together with the load disturbance
using (7) and (8) to be response introduced at time 25 is shown in Fig. 3.
Satisfactory response is obtained. Ho's method
  has no solution in this case.
KI 2:345 105  0:3325 1:1522  1:1052
 
1:1052 0:3325 1 3.3. Example 3
0:4241;
0:3325 1:1052
 
2:345  105 1:1522 Consider a high order oscillatory process:
KD
0:3325 1:1052
 1
1:1052 0:3325 1
0:3449: Gs e2s :
0:3325 1:1052 s2 s 5s 1
248 Q.-G. Wang et al. / ISA Transactions 38 (1999) 243249

1
Fig. 2. Step response of the process Gsap s e2s .
0:12s2 1:33s 1:24

1
Fig. 3. Step response of the process Gs e2s .
s2 2s 3

The controller designed using the proposed 1:154


Ks 0:914 0:181s:
method is given by s
The corresponding gain and phase margins are 3.0
1:478 and 1.023 (or 58.6 ) respectively. The response of
Ks 1:950 1:372s:
s the resultant system to step change of reference
The resulting gain and phase margins are 3.0 and and load disturbance is shown in Fig. 4. Our
1.047 (or 60.0 ). The step response is shown in method gives rise to signicantly faster response to
Fig. 4. The controller with Ho's method is step change and disturbance.
Q.-G. Wang et al. / ISA Transactions 38 (1999) 243249 249

1
Fig. 4. Step response of the process Gs e2s .
s2 s 5s 1

4. Conclusions [2] K.J. Astrom, T. Hagglund, Automatic Tuning of PID


Controllers, 2nd ed., Instrument Society of America,
Research Triangle Park, NC, 1995.
A simple method for the design of PID con-
[3] W.K. Ho, O.P. Gan, E.B. Tay, E.L. Ang, Performance
trollers that achieves exact gain and phase margins and gain and phase margins of well-known PID tuning
is proposed. It is based on the utilization of fre- formulas, IEEE Transactions on Control, Systems Tech-
quency response of the process. The proportional nology 4 (4) (1996) 473477.
gain of the controller is calculated using the critical [4] G.F. Franklin, J.D. Powell, A.E. Naeini, Feedback
Control of Dynamics Systems, AddisonWesley, Work-
point information and the specied gain margin.
ingham, UK, 1986.
The phase margin is then used for the calculation [5] K.J. Astrom, T. Hagglund, Automatic tuning of simple
of the integral and derivative gains. The method regulators with specications on phase and amplitude
has been veried to produce exact gain and phase margins, Automatica 20 (5) (1984) 645651.
margins irrespective of the order of the plant. [6] Q.G. Wang, T.H. Lee, H.W. Fung, Q. Bi, Y. Zhang, PID
tuning for improved performance, IEEE Trans. on Con-
Simulation results have been presented to demon-
trol System Technology, in press.
strate the eectiveness of the method. [7] H.P. Huang, C.L. Chen, C.W. Lai, G.B. Wang, Autotun-
ing for model-based PID controllers, AIChE Journal 42
References (9) (1996) 26872691.
[8] Q.G. Wang, C.C. Hang, Q. Bi, A technique for frequency
[1] W.K. Ho, C.C. Hang, L.S. Cao, Tuning of PID con- response identication from relay feedback, IEEE
trollers based on gain and phase margin specications, Transaction on Control Systems Technology 7 (1999)
Automatica 31 (3) (1995) 497502. 122128.

You might also like