www.ietdl.org Published in IET Control Theory and Applications Received on 4th May 2010 Revised on 15th September 2010 doi: 10.1049/iet-cta.2010.0239
ISSN 1751-8644
Exact tuning of PID controllers in control feedback design L. Ntogramatzidis1 A. Ferrante2 1
Department of Mathematics and Statistics, Curtin University, Perth, WA 6845, Australia Dipartimento di Ingegneria dell’Informazione, Universita` di Padova, via Gradenigo, 6/B – I-35131, Padova, Italy E-mail:
[email protected]
2
Abstract: In this study, the authors introduce a range of techniques for the exact design of PID controllers for feedback control problems involving requirements on the steady-state performance and standard frequency-domain specifications on the stability margins and crossover frequencies. These techniques hinge on a set of simple closed-form formulae for the explicit computation of the parameters of the controller in finite terms as functions of the specifications, and therefore they eliminate the need for graphical, heuristic or trial-and-error procedures. The relevance of this approach is (i) theoretical, since a closed-form solution is provided for the design of PID-type controllers with standard frequency-domain specifications; (ii) computational, since the techniques presented here are readily implementable as software routines, for example, using MATLABw; (iii) educational, because the synthesis of the controller reduces to a simple exercise on complex numbers that can be solved with pen, paper and a scientific calculator. These techniques also appear to be very convenient within the context of adaptive control and selftuning strategies, where the controller parameters have to be calculated online. Furthermore, they can be easily combined with graphical and first/second-order plant approximation methods in the cases where the model of the system to be controlled is not known.
1
Introduction
Countless tuning methods have been proposed for PID controllers over the last 70 years. Accounting for all of them goes beyond the possibilities of this paper. We limit ourselves to noting that many surveys and textbooks have been entirely devoted to these techniques, which differ from each other in terms of the specifications, the amount of knowledge on the model of the plant and the tools exploited, see, for example, [1 – 4] and the references therein. Recently, renewed interest has been devoted to design techniques for PID controllers under frequency-domain specifications, see, for example, [5 – 9]. In particular, much effort has been devoted to the computation of the parameters of the PID controllers that guarantee desired values of the gain/phase margins and of the crossover frequency. Specifications on the stability margins have always been extensively utilised in feedback control system design to ensure a robust control system. It is also common to encounter specifications on phase margin and gain crossover frequency, since these two parameters together often serve as a performance measure of the control system. Indeed, loosely speaking, the phase margin is related to characteristics of the response such as the peak overshoot and the resonant peak, while the gain crossover frequency is related to the rise time and the bandwidth [10, 11]. In the last 15 years, three important sets of techniques have been proposed to deal with requirements on the phase/gain margins and on the gain crossover frequency, to the end of IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565–578 doi: 10.1049/iet-cta.2010.0239
avoiding the trial-and-error nature of classical control methods based on Bode and Nichols diagrams. The first one is a graphical method hinging on design charts, and exploits an interpolation technique to determine the parameters of the PID controller. This method can be adapted to control problems involving different kinds of compensators, including phase-correction networks, and can deal with specification on the stability margins, crossover frequencies and the steady-state performance [5]. A second important set of techniques that can handle specifications on the phase and gain margins relies on the approximation of the plants dynamics with a first (or second)-order plus delay model [6, 9]. A third numerical technique has been recently proposed in [7] in which the objective is the determination of the set of PID controllers that satisfy given requirements on the gain and phase margins, but without the flexibility required to also deal with specifications on the crossover frequencies, and on the steady-state performance. To overcome the difficulties and approximations of trialand-error procedures on Bode and Nyquist plots, and of the three above-described design methods, a unified design framework is presented in this paper for the closed-form solution of the feedback control problem with PID controllers. The problem of determining closed-form expressions for the parameters of the controller to exactly meet the aforementioned design specifications has been described as a difficult one [9], and this in part explains the popularity of heuristic, numerical and graphical solutions to this problem [10, 12]. In this paper, we show that this is not 565
& The Institution of Engineering and Technology 2011
www.ietdl.org the case: simple closed-form formulae are easily established for the computation of the parameters of a PID controller that exactly meets specifications on the steady-state performance, stability margins and crossover frequencies, without the need to resort to approximations for the transfer function of the plant. There are several advantages connected with the use of the methods presented here for the synthesis of PID controllers: (i) unlike other analytical synthesis methods [13], steadystate performance specifications can be handled easily; moreover, the desired phase/gain margins and crossover frequency can be achieved exactly, without the need for trialand-error approximations of the plant dynamics or graphical considerations; (ii) a closed-form solution to the feedback control problem allows to analyse how the solution changes as a result of variations of the problem data; moreover, the explicit formulae presented here can be exploited for the self-tuning of the controller; (iii) very neat necessary and sufficient solvability conditions can be derived for each controller and each set of specifications considered, and reliable methods can be established to select the compensator structure to be employed depending on the specifications imposed; (iv) Several important questions arising in the design of PID controllers can find a precise answer for the first time. For example, is it possible to determine in finite terms the range of phase margins that can be achieved at a particular gain crossover frequency for each type of compensator belonging to the family of PID controllers? (v) The approach presented here can be used jointly with graphical considerations on Bode or Nichols diagrams to determine the set of solutions of the control problem in the case of inequality constraints; (vi) The formulae presented here are straightforwardly implementable as MATLABw routines. Furthermore, as shown in the several numerical examples throughout the paper, the calculation of the parameters of the controller is carried out via standard manipulations on complex numbers, and therefore appears to be very suitable for educational purposes; (vii) The generality of this method allows more complex compensator structures to be taken into account, as well. For example, the proper versions of the PID and PD controllers will be considered as well; (viii) In the case of additional degrees of freedom in the solution of the control problem, it is possible to exactly establish how to select the parameters to be chosen in order to guarantee the solvability of the problem; (ix) The closed-form formulae that deliver the parameters of the PID controller as a function of the specifications only depend on the magnitude and argument of the frequency response of the system to be controlled at the desired crossover frequency. As such, this method can be used in conjunction with a graphical method based on any of the standard diagrams for the representation of the dynamics of the frequency response, for example, the Bode, Nyquist or Nichols diagrams; (x) In case a mathematical model of the plant or a graphic representation of its frequency reponse is not available, the technique presented in this paper can be used on a first/second-order plus delay approximation of the plant. The extra flexibility offered by the design method presented here consists in the fact that the formulae for the computation of the parameters are not linked to a particular structure of the plant. This means that, differently from other approaches based on such approximation, when a more accurate mathematical model is available for the model of the plant, the formulae presented here can still be used without modifications, and will deliver more reliable values for the parameters of the compensator. 566 & The Institution of Engineering and Technology 2011
This paper provides a unified and comprehensive exposition of this technique, not only for PID controllers in standard form, but also for PI and PD controllers, as well as for modified (bi-)proper PID and PD controllers with approximation of the derivative action. The basic problem considered throughout the paper consists in finding the parameters of the controller that guarantees a certain phase margin and crossover frequency, and to satisfy appropriate steady-state requirements. Standard PID controllers will be considered first. Differently from the synthesis with lead and lag networks [14, 15], here it is necessary to distinguish between two different types of steady-state requirements. In fact, because of the pole at the origin in the transfer function of the standard PID controller, it is essential to discriminate between the case where the steadystate specifications impose a constraint on the Bode gain (or integral constant) of the PID controller, and the case where the presence of the pole at the origin in the PID controller alone is sufficient to satisfy the steady-state requirements. The synthesis procedures differ significantly in these two scenarios. In the first case, three simple formulae yield the expression of the three parameters of the PID controller as a function of the phase margin and the crossover frequency required [11]. In the solution of the second problem there is a degree of freedom that can be exploited to satisfy additional requirements. Here, we consider two possibilities. The first is the imposition of the ratio of the two time constants of the PID controllers, which is useful since that ratio directly affects the quality of the time response of the closed-loop system, and its assignment can avoid the situation of complex conjugate zeros in the transfer function of the PID controller, see also [16]. The second is the imposition of the gain margin, in addition to the phase margin. More precisely, in the case of specifications on both stability margins and on the gain crossover frequency, it is possible to compute the phase crossover frequency by solving a polynomial equation, and then compute the parameters of the controller in finite terms. In the case of PI and PD controllers, when the steady-state requirements sharply assign the integral constant, it is not possible to simultaneously impose the phase margin and the gain crossover frequency, except for particular cases. However, when the use alone of a PI (or PD) controller is sufficient to guarantee the satisfaction of the steady-state specifications, the problem can be solved in closed form as described above.
2
Problem formulation
In this section we formulate the problem of the design of the parameters of a compensator belonging to the family of PID controllers such that different types of steady-state specifications are satisfied and the crossover frequency and the phase margin of the loop gain transfer function are equal to desired values vg and PM, respectively. For the sake of simplicity of exposition, only unity feedback schemes are considered here. The extension to non-unity feedback schemes does not present difficulties. Consider the following assumptions on the loop gain transfer function L(s): 1. L(s) has no poles in the open right half-plane and is strictly proper; 2. The polar plot of L( jv) for v ≥ 0 intersects the unit circle and the negative real semi-axis only once (except for the intersection in the origin as v 1). IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565 –578 doi: 10.1049/iet-cta.2010.0239
www.ietdl.org These are the standard assumptions that guarantee that the stability margins are both well defined, and that a positive value of these margins will guarantee stability of the closed-loop system by virtue of the Nyquist Criterion, [10, 11]. Consider compensators described by the one of the following transfer functions: 1. PID controller in standard form CPID (s) = Kp 1 +
1 + Td s Ti s
(1)
2. Proper PID controllers 1 Td s ′ + CPID (s) = Kp 1 + T i s 1 + td s
(2)
3. PI controllers 1 CPI (s) = Kp 1 + Ti s
(3)
CPD (s) = Kp (1 + Td s)
(4)
5. Proper PD controllers = Kp
Td s 1+ 1 + td s
(5)
with Kp , Ti , Td , td . 0. The parameter Kp is the proportional sensitivity constant, while Ti and Td are the time constants of the integral and derivative actions, respectively. The modifications of the PID and PD controllers in (2) and (5) are usually introduced because the derivative action cannot be perfectly realised, and approximate filters must be used instead. The problem we are concerned with can be stated in precise terms as follows. Problem 1: Consider the classic feedback control architecture in Fig. 1, where G(s) is the plant transfer function. Design a ′ ′ controller C(s) [ {CPID (s), CPID (s), CPI (s), CPD (s), CPD (s)} such that the steady-state requirements on the tracking error e(t) def = r(t) − y(t) are satisfied, and such that the crossover frequency and the phase margin of the compensated system (loop gain transfer function) L(s) def = C(s)G(s) are vg and PM, respectively, such that
3
with Kp , Ti , Td . 0. Our aim in this section is to solve Problem 1 with C(s) = CPID (s). Here, we have to discriminate between two important situations. The first is the one in which the steady-state specifications can be met only by the use of a controller with a pole at the origin; consider for example, the case of a type-0 plant and the steady-state performance criterion of zero-position error. In this case, the fact itself of using a PID controller guarantees that the steady-state requirement is satisfied. The second case of interest is the one in which the imposition of the steady-state specifications gives rise to a constraint on the Bode gain Ki def = Kp /Ti of CPID (s). This situation occurs, for example, in the case of a type-0 plant when the steady-state specification not only requires zero-position error, but also that the velocity error be equal to (or smaller than) a given non-zero constant. A similar situation arises with constraints on the acceleration error for type-1 plants. 3.1
4. PD controllers in standard form
′ (s) CPD
Fig. 1 Unity feedback control architecture
|L(jvg )| = 1
(6)
arg L(jvg ) = PM − p
(7)
PID controllers in standard form
The classical PID controller is described by the transfer function 1 1 + Ti s + Ti Td s2 + Td s = Kp CPID (s) = Kp 1 + Ti s Ti s IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565–578 doi: 10.1049/iet-cta.2010.0239
Steady-state requirements do not constrain Ki
First, we consider the case where the steady-state specifications do not lead to a constraint on the integral constant of the PID controller. In order to compute the parameters of the PID controller, we write G( jv) and CPID (jv) in polar form as G(jv) = |G(jv)|e j arg G(jv) ,
CPID (jv) = M (v)e jw(v)
The loop gain frequency response can be written as L(jv) = |G(jv)|M (v)e j( arg G(jv)+w(v)) . If the gain crossover frequency vg and the phase margin PM of the loop gain transfer function L(s) are assigned, by (6 – 7) it is found that |L(jvg )| = 1 and PM = p + arg L(jvg ) must be satisfied. These two equations can be written as 1. Mg = 1/|G(jvg )|, 2. wg = PM − p − arg G(jvg ), def where Mg def = M (vg ) and wg = w(vg ). In order to find the parameters of the controller such that (1 – 2) are met, equation
Mg e
j wg
1 + jvg Ti − v2g Ti Td = Kp j vg Ti
(8)
must be solved in Kp , Ti , Td . 0. It is easy to see that in the solution to this problem there is a degree of freedom, since by equating the real and imaginary parts of both sides of (8) we obtain the pair of equations
vg Mg Ti cos wg = vg Kp Ti
(9)
−Mg vg Ti sin wg = Kp − Kp v2g Ti Td
(10)
in the three unknowns Kp , Ti and Td . A possibility to carry out the design at this point is to freely assign one of the unknowns and to solve (9 –10) for the other two. However, from (9) it is easily seen that Kp cannot be chosen arbitrarily. If we choose 567
& The Institution of Engineering and Technology 2011
www.ietdl.org Ti , (9) gives Kp = Mg cos wg , and (10) leads to Td =
positive solution. In fact, (10) can be written as the quadratic equation
1 + vg Ti tan wg Ti v2g
v2g sTi2 − vg Ti tan wg − 1 = 0
However, in order to guarantee Kp . 0 and Td . 0, the angle wg must be such that cos wg . 0 and Ti must be chosen to be such that vg Ti tan wg . −1. These two conditions are simultaneously satisfied only when wg [ (0, p/2). If we choose Td , we get Kp = Mg cos wg and Ti =
1 v2g Td − vg tan wg
which implies that in order to ensure Ti . 0 we must choose Td to be . tan wg /vg . Therefore Td is arbitrary when wg [ (− p/2, 0), while when wg [ (0, p/2), we must choose Td . tan wg /vg . Another possibility to carry out the design of the PID controller in the case of an unconstrained integral constant is to exploit the remaining degree of freedom so as to satisfy some further time- or frequency-domain requirements. There are several ways to exploit this degree of freedom in the calculation of the parameters of the controller. In the sequel, we consider two important situations: the first is the one where the ratio Td /Ti is chosen, so as to ensure, for example, that the zeros of the PID controller are real; the second is the one where a gain margin constraint is to be satisfied. 3.1.1 Imposition of the ratio Td /Ti: A very convenient way to exploit the degree of freedom in the solution of (8) consists in the imposition of the ratio s def = Td /Ti . This is convenient since it is an easily established fact that when Ti ≥ 4Td , that is, when s−1 ≥ 4, the zeros of the PID controller are real (and coincident when s−1 = 4), and they are complex conjugate when s−1 , 4. In the following theorem, necessary and sufficient conditions are given for the solvability of Problem 1 in the case of a standard PID controller when the ratio s is given. Moreover, closed-form formulae are provided for the parameters of the PID controller to meet the specifications on PM, vg and s exactly. Theorem 1: Let s = Td /Ti be assigned. Equation (8) admits solutions in Kp , Ti , Td . 0 if and only if p p wg [ − , 2 2
(15)
in Ti , that always admits two real solutions, one positive and one negative. (If). From (12), it follows that (9) is satisfied. Moreover, since as aforementioned (10) can be written as (15) and tan2 w + 4s . | tan w|, the positive solution is given by (13). A 3.1.2 Imposition of the gain margin: Another possibility in the solution of the control problem in the case of unconstrained Ki is to fix the gain margin to a certain value GM. To this end, the conditions arg L(jvp ) = −p and GM = |L(jvp )|−1 on the loop gain frequency response must be satisfied by definition of gain margin and phase crossover frequency vp . By writing again CPID (jv) = M (v)e jw(v) , it is found that these conditions are equivalent to Mp =
1 |GM|G(jvp )|
wp = −p − arg G(jvp )
(16) (17)
def where Mp def = M (vp ) and wp = w(vp ). Therefore now the parameters Kp , Ti , Td . 0 of the PID controller must be determined so that (8) and
Mp e j w p = K p
1 + jvp Ti − v2p Ti Td j vp Ti
(18)
are simultaneously satisfied. By equating the real and the imaginary part of (8) and (18) we obtain (9), (10) and the additional two equations
vp Mp Ti cos wp = vp Kp Ti
(19)
−Mp vp Ti sin wp = Kp − Kp v2p Ti Td
(20)
From (9) and (19), we obtain the equation (11)
Mg cos wg = Mp cos wp
(21)
If (11) is satsfied, the solution of (8) with s fixed is given by Kp = Mg cos wg
Ti =
tan wg +
tan2 wg + 4s 2vg s
Td = Ti s
(12)
(13) (14)
Proof: (Only if). As already observed, equating real part to real part and imaginary part to imaginary part in (8) results in (9) and (10). Since Kp must be positive, from (9) – which can be written as Kp = Mg cos wg – we get that wg must satisfy −p/2 , wg , p/2. If this inequality is satisfied, it is also easy to see that (10) always admits a 568 & The Institution of Engineering and Technology 2011
in the unknown vp . For the control problem to be solvable, it is required that (21) admits at least one strictly positive solution. At first glance, (21) seems transcendental in vp . However, a more careful analysis reveals that the solution of (21) can be found by solving a polynomial equation in vp , as the following lemma shows. Lemma 1: Let G(s) be a rational function in s [ C. Then, (21) can be reduced to a polynomial equation in vp . Let n1 and m1 represent the number of real poles/zeros of G(s), and let n2 and m2 represent the number of complex conjugate pairs of poles/zeros of G(s), respectively, and let n [ Z be the number of poles at the origin of G(s) (with the understanding that if n , 0, the transfer function has 2n zeros at the origin). Then, the degree of the polynomial (21) IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565 –578 doi: 10.1049/iet-cta.2010.0239
www.ietdl.org In view of the well-known formulae
is at most
max{n + l, 2m1 + 4m2 } max{l, −n + 2m1 + 4m2 }
if n ≥ 0 if n , 0
cos
l
j=0
where l = m1 + m2 + n1 + n2 .
i=1
K G(s) = nB s n
(1 + tˆ i s)
1
i=1
(1 + ti s)
m2 i=1
n2 i=1
zˆ s2 1+2 i s+ 2 vˆ n,i vˆ n,i 2
1+2
zi s s+ 2 vˆ n,i vˆ n,i
sin
+ −
n1
v2p − vˆ 2n,i
i=1
n2
arctan
i=1
2zi vp vn,i v2p − v2n,i
nˆ l p + − Fj 2 i=1 j=0
cos wp =
(23)
(−1)k/2
S#{1,...l} |S|=k
sin Fj
j[S
cos Fj
(24)
j[S
we obtain
cos wp =
m p 1
fi,aj ( arctan(vp tˆ i ))
m2
fi,bj
arctan
2zˆ i vp vˆ n,i
v2p − vˆ 2n,i n1 n2 2 z v v i p n,i · fi,cj ( arctan(vp ti )) fi,dj arctan 2 vp − v2n,i i=1 i=1 j=1
i=1
i=1
1 cos arctan u = 1 + u2
where F(vp ) is a polynomial function of vp given by sums of products of the type vp tˆ i , vp ti , zˆ i vp /vˆ n,i and zi vp /vn,i . Its degree depends on the term containing the largest number of sine factors in the sum (22). From (23 – 24) it is easy to establish that when n is even
deg F =
(22)
l if l is even l − 1 if l is odd
and, when n is odd
if n is even if n is odd
for suitably defined angles Fj , where l = m1 + m2 + n1 + n2 and nˆ is either equal to 0 when n is even and equal to 1 if n is odd. Therefore ⎧ l ⎨ (−1)h+n−1 cos F j=0 j cos wp = ⎩ (−1)h+n sin l F j=0 j
cos Fj
j[S
it follows that cos wp can be written as (see equation at the bottom of the page)
where the integer h depends on the sign of KB and on the sign of the real parts of the second order terms of the frequency response G( j v). As such, wp can be written as
wp = −(h + n − nˆ )p +
odd k[{0,...,l}
u sin arctan u = 1 + u2
2zˆ i vp vˆ n,i
arctan(vp ti ) −
sin Fj
where fi,k j (with k [ {a, b, c, d}) are either sine or cosine functions and p = 2m1 +m2 +n1 +n2 −1 . From the goniometric identities
m1 n p + − arctan(vp tˆi ) 2 i=1 i=1
arctan
i=1
=
Fj
×
and
m2
j=0
2 2 2 v v
n2
n1 p p 2 2 + 4z2i 2 1− 2 i=1 1 + vp ti i=1 n v v vp n,i n,i
Mp = 2 KB 2 2
m1
m2 1 − vp + 4zˆ 2 vp GM i=1 1 + v2p tˆ 2i i=1 i vˆ 2n,i vˆ 2n,i
wp = −hp +
l
j[S
S#{1,...l} |S|=k
with n [ Z. In the Bode real form given above, the parameters ti and tˆ i are the time constants associated with the real poles/zeros, zi and zˆ i are the damping ratios and vn,i and vˆ n,i are the natural frequencies associated with the complex conjugate pairs of poles/zeros of G(s). It follows that
×
(−1)k/2
even k[{0,...,l}
Proof: Let us write the transfer function of the plant in the Bode real form
m1
=
Fj
deg F =
l − 1 if l is even l if l is odd
F(vp )
2 2 2 2 2 vp v2p
m2
n1
n2 2 vp 2 vp m1 2 2 2 2 1− 2 1− 2 +4zi v2 i=1 1 + vp tˆ i i=1 +4zˆ i 2 1 + vp ti i=1 i=1 n,i vn,i vˆ n,i vˆ n,i
IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565–578 doi: 10.1049/iet-cta.2010.0239
569
& The Institution of Engineering and Technology 2011
www.ietdl.org Therefore the degree of F(vp ) is at most l. Hence
If vg , vp , one of the following conditions must hold:
Mp cos wp =
vnp F(vp ) ⎡ ⎤ 2 2 2 v v
m1
2 p p m 2 ⎣ 1− 2 +4zˆ i 2 ⎦ KB GM i=1 (1 + v2p tˆ 2i ) i=1 vˆ n,i vˆ n,i
Therefore (21) is a polynomial equation in vp . In view of possible cancellations, the degree of this equation is not greater than max{n + l, 2m1 + 4m2 } if n ≥ 0 and max{l, −n + 2m1 + 4m2 } if n , 0. A Remark 1: If the transfer function of the process is given by ˆ the product of a rational function G(s), and a delay e−t0 s , −t0 s ˆ that is, if G(s) = G(s)e , (21) is not polynomial in vp , and it needs to be solved numerically. More details about this case are given in Section 9. Theorem 2: Consider Problem 1 with the additional specification on the gain margin GM. Equations (8) and (18) admit solutions in Kp , Ti , Td . 0 if and only if wg [ (−p/2, p/2) and (21) admits a positive solution vp such that ⎧ ⎨ vp , vg v tan w . v tan w ⎩ vg tan wg . vp tan wp p g g p
⎧ ⎨ vp . vg v tan w , v tan w or ⎩ vg tan wg , vp tan wp p g g p
(25)
If wg [ (−p/2, p/2) and (25) is satisfied, the control problem admits solutions with a PID controller, whose parameters can be computed as Kp = Mg cos wg Ti =
(26)
v2g − v2p vg vp (vp tan wg − vg tan wp )
(27)
vg tan wg − vp tan wp v2g − v2p
(28)
Td =
Proof: (Only if). As already seen, a necessary condition for the problem to admit solutions is that vp is a solution of (21). From (9) and (10), and from (19) and (20), we obtain −vg Ti tan wg = 1 − v2g Ti Td
(29)
−vp Ti tan wp = 1 − v2p Ti Td
(30)
By solving (29) and (30) in Ti and Td , we obtain (26 – 28). For Kp to be positive, it is necessary that wg [ (−p/2, p/2). Moreover, the time constants Ti and Td are positive if vg and vp satisfy (25). (If). It is a matter of straighforward substitution of (26 –28) into (9), (10), (19) and (20). A
† wg , wp [ (0, p/2) and wg , wp ; † wg [ (−p/2, 0) and wp [ (0, p/2); † wg , wp [ (−p/2, 0) and wg . wp . 3.2
Steady-state requirements constrain Ki
Now, the Bode gain Ki = Kp /Ti is determined via the imposition of the steady-state requirements; for example, for type-0 (resp. type-1) plants, Ki is computed via the imposition of the velocity error (resp. acceleration error). As such, the factor Ki /s can be separated from C˜ PID (s) = 1 + Ti s + Ti Td s2 , and viewed as part of the plant. In this way, the part of the controller to be designed is C˜ PID (s), and the feedback scheme reduces to that of Fig. 2. ˜ def Denote G(s) = (Kp /Ti )sG(s), so that the loop gain transfer ˜ ˜ v) function can be written as L(s) = C˜ PID (s)G(s). Write G(j and C˜ PID (jv) in polar form as ˜ v) ˜ v) = |G(j ˜ v)|ej arg G(j G(j ,
C˜ PID (jv) = M (v)ejw(v)
so that the loop gain frequency response can be written as ˜ v)+w(v)) ˜ v)|M (v)ej( arg G(j . If the crossover L(jv) = |G(j frequency vg and the phase margin PM of the loop gain transfer function L(s) are assigned, the equations |L(jvg )| = 1 and PM = p + arg L(jvg ) must be satisfied. These can be written as ˜ vg )|, 1. Mg = 1/|G(j ˜ vg ), 2. wg = PM − p − arg G(j def where Mg def = M (vg ) and wg = w(vg ). Alternatively, Mg and wg can be computed as functions of the frequency response of G(s) at v = vg
−1 K vg p Mg = G(jvg ) = Ti jvg Ki |G(jvg )|
Kp wg = PM − p − arg G( jvg ) Ti jvg = PM −
p − arg G(jvg ) 2
(31)
(32)
since Kp , Ti . 0. In order to find the parameters of the controller such that (1 – 2) are met, equation Mg e jwg = 1 + jvg Ti − Ti Td v2g
(33)
must be solved in Ti . 0 and Td . 0. The closed-form solution to this problem is given in the following theorem.
Remark 2: In view of the constraint Kp . 0, (25) can be written as follows: If vg . vp , one of the following conditions must hold: † wg , wp [ (0, p/2) and wg . wp ; † wg [ (0, p/2) and wp [ (− p/2, 0); † wg , wp [ (−p/2, 0) and wg , wp . 570 & The Institution of Engineering and Technology 2011
Fig. 2 Modified feedback structure with unity DC gain controller IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565 –578 doi: 10.1049/iet-cta.2010.0239
www.ietdl.org Theorem 3: Equation (33) admits solutions in Ti . 0 and Td . 0 if and only if 0 , wg , p
and
Mg cos wg , 1
which leads to Mg2 cos2 wg − 4Mg cos wg + (4 − Mg2 ) ≤ 0
(34)
(38)
Solving (38) in cos wg yields If (34) are satisfied, the solution of (33) is given by Kp = Ki
1 M sin wg vg g
(35)
1 Ti = M sin wg vg g Td =
(36)
1 − Mg cos wg vg Mg sin wg
1 wg [ arccos ,p Mg
wg [ (0, p)
However, (2 + Mg /Mg ) . 1. Moreover, (2 − Mg /Mg ) . −1 and (2 − Mg /Mg ) , 1 if and only if Mg . 1. Hence 2 − M g 2 + Mg , > [−1, 1] = ∅ Mg Mg
(37)
The two conditions (34) can be alternatively written as
2 − Mg 2 + Mg ≤ cos wg ≤ Mg Mg
only when Mg . 1. Hence, when Mg , 1 the inequality (38) is never satisfied, while when Mg . 1, (38) holds if and only if cos wg . (2 − Mg )/Mg . It follows that the zeros of the PID controller are real if and only if
if Mg . 1 Mg . 1
if Mg , 1
In fact, when wg [ (0, p/2), condition cos wg , 1/Mg is always satisfied when Mg , 1, and is satisfied when wg . arccos(1/Mg ) when Mg . 1. When wg [ (p/2, p), the condition cos wg , 1/Mg is always satisfied since cos wg , 0 and (1/Mg ) . 0. As a consequence, we have the following. Corollary 1: When the ratio Kp /Ti is assigned, Problem 1 admits solutions if and only if v † arg G(jvg ) [ PM − 32 p, PM − p2 if |G(jvg )| . Kg ; i K |G(jv )| if † arg G(jvg ) [ PM − 32 p, PM − p2 − arccos i v g g v |G(jvg )| , Kg .
Theorem 4: The zeros of the PID controller are real if and only if vg Ki ;
† |G(jvg )| , 2K |G(jv )|−v † arg G(jvg ) [ PM − p2 − arccos i v g g , PM − p2 . g
Proof: The discriminant Ti (Ti − 4Td ) of the numerator of CPID (s) is ≥0 if and only if Ti ≥ 4Td . Using (36 – 37), this inequality becomes 1 1 1 − Mg cos wg M sin wg ≥ 4 vg g vg Mg sin wg IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565–578 doi: 10.1049/iet-cta.2010.0239
0 , wg , arccos
2 − Mg Mg
(39)
The result is then a matter of substitution of the definitions of Mg and wg in (39). A
4
Proper PID controllers
The transfer function of the PID controller in standard form is not proper. To obtain a proper approximation of CPID (s), usually a further real pole is introduced into the derivative term 1 Td s ′ CPID + (s) = Kp 1 + Ti s 1 + td s =
i
When the steady-state specifications lead to a constraint on the ratio Ki = Kp /Ti , there are no degrees of freedom that can be exploited to assign s = Td /Ti . As a result, in this case the design technique based on the imposition of the phase margin and crossover frequency can lead to PID controllers with either real or complex conjugate zeros. However, in standard practice it is desirable to work with PID controllers with real zeros. The following theorem establishes necessary and sufficient conditions on the problem data and specifications for the zeros of the PID controller to be real.
and
Kp Ti (Td + td )s2 + (Ti + td )s + 1 Ti s 1 + td s
(40)
with Kp , Ti , Td , td . 0. Owing to the additional pole ′ s = −1/td , the transfer function CPID (s) is now (bi-)proper. Typically, to obtain a good approximation of the derivative action, the frequency associated with the further pole is chosen to be much higher than the frequencies of all other poles and zeros of the loop gain transfer function. As such, the parameter td is usually very small. Our aim here is to ′ solve Problem 1 using a controller C(s) = CPID (s). For the sake of brevity, we only consider the case where the steadystate specifications lead to an assignment of the Bode gain Kp /Ti . By defining T (T + td )s2 + (Ti + td )s + 1 ′ C˜ PID (s) = i d 1 + td s ′ ˜ ˜ v) and and by expressing G(j and L(s) = C˜ PID (s)G(s), ′ ˜ C PID (jv) in polar form, Mg and wg can be defined as in (31) and (32). Then, in order to find the parameters of the controller, equation
Mg e j w g =
−Ti (Td + td )v2g + j(Ti + td )vg + 1 1 + j v g td
(41)
571
& The Institution of Engineering and Technology 2011
www.ietdl.org must be solved in Ti . 0 and Td . 0. The closed-form solution to this problem is given in the following theorem. Theorem 5: Equation (41) admits solutions in Ti . 0 and Td . 0 if and only if Mg sin wg vg (1 − Mg cos wg )
td ,
(42)
If (42) is satisfied, the solution of (41) is given by Kp = Ti =
Ki Mg sin wg − td (1 − Mg cos wg ) vg
(43)
Mg sin wg − Ki td (1 − Mg cos wg ) vg
(44)
Td =
vg
1 + v2g t2d
Mg sin wg − v g td 1 − Mg cos wg
(45)
Consider the first problem. The expression of the acceleration error is ea1 =
1 lims0
=
[−Ti (Td + td )v2g + j(Ti + td )vg + 1](1 − jvg td ) (1 + jvg td )(1 − jvg td )
=
−Ti Td v + jv, Ti + 1 + jv td Ti Td + jv 1 + v2 t2d
3
Ti t2d
Mg sin wg 1 − Mg cos wg 12 Ti = = √ , Td = = 30 30Mg sin wg 5 2
The zeros of the PID controller are real since Ti is . 4Td . From√the ratio Kp /Ti = 400, we find Kp = 400Ti = 960/ 2. The transfer function of the PID controller is
+
Mg sin wg (1 + v2g t2d ) = vg Ti + v3g td Ti Td + v3g Ti t2d Solving both equations in Ti and equating the results yield =
Mg sin wg (1 + v2g t2d ) vg (1 + v2g td Td + v2g t2d )
that can be solved to get Td . This gives (45). A Finally, the proportional sensitivity Kp can be computed from the ratio Kp /Ti using the value of Ti thus found. Example 1: Consider the plant described by the transfer function G(s) =
1 s(s + 2)
and consider the problem of determining the parameters of a PID controller that exactly achieves a phase margin of 458 and gain crossover frequency vg = 30 rad/s in the two situations: † the acceleration error is equal to 0.005. † the velocity error is equal to zero; first use the remaining degree of freedom to assign the ratio Ti /Td = 16, and then to impose a gain margin equal to 3. 572 & The Institution of Engineering and Technology 2011
Mg sin wg ≃ 0.0373 vg (1 − Mg cos wg )
v2 t2d
Mg cos wg (1 + v2g t2d ) = −Ti Td v2g + 1 + v2g t2d
(1 − Mg cos wg )(1 + Td v2g
√ 2 + 63 2160
Let us now solve the same problem with a PID controller with an additional pole as in (40). We first need to choose td to be smaller than the quantity
Hence, by (41) we obtain
v2g t2d )
1 2T = i 2 Kp 1 + Ti s + Ti Td s lims0 s2 Kp Ti s2 (s + 2)
√ √ 960 5 2 2 + 63 + s CPID (s) = √ 1 + 12s 2160 2
C˜ PID (jv)
3
=
Then, ea1 = 0.005 implies Ki = Kp /Ti = 400. Define ˜ G(s) = Ki G(s)/s. Compute Mg = 30/Ki |G(30j)| = √ 9 904/4 and wg = PM − p/2 − arg G(30j) = p/4+ arctan 15. Using Theorem 3, it is seen that the time constants of the PID controller are
Proof: It is easy to see that
2
s2 L(s)
Hence, by choosing td = 0.01s, after standard goniometric manipulations we find √ Mg sin wg 177 − 2 √ − td (1 − Mg cos wg ) = Ti = 30 100 2
Td = 30
1 + 302 t2d Mg sin wg − 30td 1 − Mg cos wg
√ 109(63 + 2) = √ 300(531 − 3 2)
From √the factor Kp /Ti = 400, we find Kp = 400Ti = 2(177 2 − 2). The zeros of this controller are still real. Now let us consider the second problem, where the ratio Ki = Kp /Ti is not constrained. Now, the pole at the origin alone guarantees that the velocity error be equal to zero. We −1 first consider the situation where Ti√ /T = 16. First, d =s we compute Mg = 1/|G(30j)| = 30 904 and wg = PM− p − arg G(30j) = p/4 − p + p/2 + arctan 15 = −p/4 + arctan 15. Using (12) we find √ √ p Kp = 30 904 cos − + arctan 15 = 480 2 4 Moreover, a simple computation shows that tan wg = 7/8, so that using the results in Theorem 1, and in particular (13) with s−1 = 16, we find Ti =
√ 7 + 65 30
and
Td =
√ 7 + 65 480
IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565 –578 doi: 10.1049/iet-cta.2010.0239
www.ietdl.org The transfer function of the PID controller in this case is √ CPID (s) = 480 2 1 +
√ 30 7 + 65 √ + s 480 (7 + 65)s
Now we solve the same problem by imposing a gain margin equal to 3. We compute Mp and wp as functions of vp vp v2p + 4 1 = Mp = 3 GM|G(jvp )|
wp = −p − arg G(jvp ) = −
vp p + arctan 2 2
Using these expression, (21) can be written as vp v2p + 4
vp sin arctan = Mg cos wg 3 2 whose unique real solution is vp = 3Mg cos wg . 0. Using the expressions √ for Mg and wg it is easily found that vp = 720 8 rad/s. Hence √ √ p p 720 8 = − + arctan 180 8 wp = − + arctan 2 2 2 √ which gives tan wp = −1/ 180 8. It is easily verified that the conditions in Theorem 2 are not satisfied, since vp . vg but vg tan wg . vp tan wp = −2. Let us consider the same problem with PM = 2p/3, vg = 3 rad/s, and GM ¼ 3. √ In this case, we find Mg = 3 13, wg = p/6 + arctan(3/2), √ √ and consequently tan wg = (2 + 3 3)/(2 3 − 3). Using these values in (21) yields 9 √ (2 3 − 3) vp = 3Mg cos wg = 2 As such √ p 9(2 3 − 3) wp = − + arctan 2 8 √ which yields tan wp = −1/ (9/8)(2 3 − 3). In this case, the conditions in Theorem 2 are satisfied, and the parameters of the PID controller can be computed in closed form as 3 √ Kp = Mg cos wg = (2 3 − 3) 2 √ v2g − v2p 5−2 3 √ = Ti = vg vp (vp tan wg − vg tan wp ) 10 + 9 3 Td =
√ vg tan wg − vp tan wp 26 3 √ = v2g − v2p 144 3 − 243
Since Ti , 4Td , the zeros of the PID controller are complex conjugate. IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565–578 doi: 10.1049/iet-cta.2010.0239
Example 2: Consider the example in [5], where a PID controller must be used for the plant G(s) =
3 s(s2 + 4 s + 5)
to achieve the following control objectives: (i) acceleration constant Ka = 2; (ii) gain crossover frequency vg = 2.5 rad/s and phase margin PM = 488. First, the steady-state specification fixes the ratio Ki = Kp /Ti , as Ka = lim (s2 CPID (s)G(s)) = s0
3 Kp =2 5 Ti
which in turn implies Ki = Kp /Ti = 10/3. G(5/2j) = 24/(−25j − 200), we obtain
From
√ 5/2 25 65 = Mg = Ki |G(5/2j)| 32 p 5 37 1 wg = PM − − arg G j = − p + arctan 2 2 30 8 From sin(37/30p) = −sin(7/30p) = −k1 /8 and cos(37/ 30p) = −cos(7/30p) = −k2 /4, with k1 = 1 −
√ 5+
√ 30 + 6 5
√ √ k2 = 7 − 5 + 6(5 − 5) we obtain 1 k2 sin wg = √ k1 − 4 65 1 k cos wg = − √ 2 k2 + 1 8 65 Plugging these values into (36 – 37), we obtain closed-form expressions for all the parameters of the PID controller 25 k k1 − 2 4 24 5 k k1 − 2 Ti = 4 16
Kp =
Td =
256 + 25k1 + 400k2 500k1 − 125k2
Notice that, differently from [5], the solution provided here is given in finite terms. This ensures that the desired crossover frequency and the desired phase margin are achieved accurately. Let us now consider the same plant, for which a PID controller must be designed to achieve a gain crossover frequency crossover frequency vg = 1 rad/s, a phase margin PM = 308, √and a gain margin GM ¼ 3. It is easily seen that Mg = 4 2/3 and wg = −p/12, so that tan(wg ) = √ √ −( 2 − 6)/4. It is easily seen that (21) admits a positive 573
& The Institution of Engineering and Technology 2011
www.ietdl.org Theorem 6: Equation (46) admits solutions in Kp . 0 and Ti . 0 if and only if
solution 3GM Mg cos wg = vp = 4
√ 3+1 3 2
p wg [ 0, 2 If (47) is satisfied, the solution of (46) is given by
Therefore 4vp p wp = − + arctan 2 5 − v2p Since vp ,
√ 5, we find that √ 3 3−7 tan wp = √ 4 6( 3 + 1)
√ 2 3+2 Kp = 3 Ti =
√ 4(1 + 3 3) √ 15 3 − 19
√ 9−5 3 √ Td = 4(1 + 3 3) In this case, Ti . 4Td ; the zeros of the PID controller are real and strictly negative.
PI controllers
CPI (s) = Kp 1 +
To find the parameters of the PI controller, equation
574 & The Institution of Engineering and Technology 2011
1 1 tan wg = vg 15
√ s + 15 Mg vg cos wg + Mg sin wg s = 40 2 s vg s
Notice that, since in this case we have Mg cos wg = √ 3 cos (−p/4 + arctan 1/2) = 1, we cannot solve the problem with constraints on Ki .
˜ vg ) = PM − p − arg G(jvg ) wg = PM − p − arg G(j 2
must be solved in Kp . 0 and Ti . 0.
√ Mg sin wg = 40 2 vg
Ti =
CPI (s) =
vg 1 = ˜ |G(j vg )| |G(jvg )|
jTi vg + 1 Ti
1 tan wg vg
Kp =
1 Ts+1 = Kp i Ti s Ti s
Mg ejwg = Kp
Ti =
The transfer function of the PI controller is
˜ By defining G(s) = G(s)/s, it is found that Mg =
Mg sin wg vg
Example 3: Consider the plant described by the transfer function in Example 1. Find the parameters of a PI controller that achieves a phase margin of 458, a crossover frequency vg = 10 rad/s and zero-velocity error. First, let us compute √ Mg = 1/|G(j)| = 20 26 and wg = PM − p − arg G(j) = −p/4 + arctan(1/2). The angle wg lies in (0, p/2), so that a PI controller meeting the specifications exists. The parameters can be found with
The synthesis techniques presented in the previous sections can be adapted to the design of PI controllers for the imposition of phase margin and crossover frequency of the loop gain transfer function. This can be done, however, only when the steady-state specifications do not lead to the imposition of the Bode gain of the loop gain transfer function. The transfer function of a PI controller is
Kp =
As already observed, when the steady-state requirements lead to the imposition of the ratio Kp /Ti , the problem of assigning the phase margin and the crossover frequency of the loop gain transfer function cannot be solved in general. Indeed, if we ˜ define G(s) = (Kp /Ti s)G(s) and C˜ PI (s) = 1 + Ti s, the values ˜ vg )| and wg = PM − p − arg G(j ˜ vg ) are such Mg = 1/|G(j that the identity 1 + jvg Ti = Mg e jwg must be satisfied. The latter yields Mg cos wg = 1 and Mg sin wg = vg Ti , which are two equations in one unknown Ti ; the first does not even depend on Ti , but only on the transfer function of the plant G(s). As such, the problem at hand now admits solutions only if the equality constraint Mg cos wg = 1 is satisfied. If that constraint is satisfied, Ti = Mg sin wg /vg .
A simple computation yields
5
(47)
(46)
6
PD controllers
As for the design of PI controllers, the synthesis techniques presented for the imposition of phase margin and crossover frequency of the loop gain transfer function can be used for PD controllers only when the steady-state specifications do not lead to the imposition of the proportional sensitivity Kp . The transfer function of a PD controller is CPD (s) = Kp (1 + Td s) IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565 –578 doi: 10.1049/iet-cta.2010.0239
www.ietdl.org To find the parameters of the PD controller, the equation Mg ejwg = Kp (1 + jTd vg )
If (52) are satisfied, the solution of (51) is given by Mg2 − 2Mg cos wg + 1 Td = Mg vg sin wg
(48)
must be solved in Kp . 0 and Td . 0.
td =
Theorem 7: Equation (48) admits solutions in Kp . 0 and Td . 0 if and only if p wg [ 0, 2
(49)
If (49) is satisfied, the solution of (48) is given by Kp = Mg cos wg Td =
1 tan wg vg
When the imposition of the steady-state specifications lead ˜ to a sharp constraint on Kp , and define G(s) = Kp G(s) and ˜ vg )| and C˜ PD (s) = 1 + Td s, the values Mg = 1/|G(j ˜ vg ) wg = PM − p − arg G(j lead to the identity 1 + jvg Td = Mg e jwg , which in turn leads to the two equations Mg cos wg = 1 and Mg sin wg = vg Td , so that the problem admits solutions only if the constraint Mg cos wg = 1 is satisfied. In that case, Td = Mg sin wg /vg .
7
Proper PD controllers
Now we consider an alternative form of the PD controller, described by the transfer function ′ CPD (s)
= Kp
Td s 1 + (Td + td )s = Kp 1+ 1 + td s 1 + td s
(50)
with Kp , Td , td . 0. In this case, the proposed method can be applied even in the presence of steady-state requirements on the position error for type-0 plants, on the velocity error for type-1 plants, and on the acceleration error for type-2 ′ plants. In fact, the transfer function CPD (s) is exactly that of ′ a lead network. Since the transfer function CPD (s) does not contain poles at the origin, usually the steady-state specifications lead to constraints on the proportional ˜ sensitivity Kp . In that case, let us define G(s) = Kp G(s), and 1 + (Td + td )s ′ C˜ PD (s) = 1 + td s ′ If we also set C˜ PD (jv) = M (v)e jw(v) , by imposing |L(jvg )| = 1 and PM = p + arg L(jvg ), we find that, as before, in order to find the parameters of the controller, equation
Mg e
j wg
1 + j(Td + td )vg = 1 + j td v g
(51)
must be solved in Td , td . 0. Theorem 8: Equation (51) admits solutions Td , td . 0 if and only if Mg . 1,
p , wg [ 0, 2
Mg .
1 cos wg
IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565–578 doi: 10.1049/iet-cta.2010.0239
(52)
Mg cos wg − 1 Mg vg sin wg
8 Graphical and approximate solution to the design problem The synthesis methods developed in the previous sections are based on closed-form formulae for the computation of the parameters of the PID controller. In this regard, it could be argued that often a full knowledge of the dynamics of the plant is not available in practice and therefore the presented closed-form formulae are of little interest. On the contrary, the approach presented here still offers a solution even when the model of the plant is not exactly known, but may be based on (i) graphical considerations similar in spirit to those considered in the literature [5] (but that can be carried out on any of the standard diagrams for the frequency response), (ii) on the approximation of the plant with a firstor second-order transfer function [9] or even (iii) on the results of an experiment conducted on the plant in the same spirit of the Ziegler and Nichols methods, [17]. In this and in the following section we discuss these issues. As already mentioned, a graphical version of the method presented in this paper can be implemented using any of the frequency domain plots usually employed in control to represent the frequency response dynamics, that is, Bode diagrams, Nyquist diagrams or Nichols charts. This is owing to the fact that the formulae used to derive the parameters of the PID controller are expressed in terms of the magnitude and the argument of the frequency response of the plant at a given crossover frequency, which is readable over any of these diagrams. Example 4: Consider Example 5.12 in [10], in which the control of a small airplane has to be implemented via a PID controller achieving a crossover frequency of 8 rad/s, a phase margin of 758 and a ratio Ti /Td equal to 4. The Nyquist plot of the plant, in which the input is the pitch attitude and the output is the elevator angle, both expressed in degrees, is represented by the dark line in Fig. 3. Given the point of the Nyquist plot corresponding to the desired gain crossover frequency vg = 8 rad/s, that is G(jvg ) ≃ −2.9 − 2.2j we can estimate 1 Mg = √ = 0.2747 2.92 + 2.22 2.2 − p = 0.6600 wg = PM − p − arctan 2.9 These values lead to the parameters Kp = 0.2170,
Ti = 0.5105 s,
Td = 0.1276 s
(53)
The frequency response of the loop gain transfer function obtained by combining the PID controller thus obtained 575
& The Institution of Engineering and Technology 2011
www.ietdl.org 9
Second-order plus delay approximation
Several tuning techniques proposed in the literature do not require exact knowledge of the mathematical model of the plant, but rely on its first- or second-order plus delay approximation, [1, 2, 9]. While in this paper the formulae for the parameters of the PID controller have been obtained under the assumption of exact knowledge of the transfer function of the plant, the procedure outlined can be used in conjuction with the heuristics or numerical methods based on these approximations. In this section we show that the formulae presented in this paper can be specialised to the case of a second-order plus delay approximation of the plant dynamics, and compare our results with those in [9], in the case of specifications on the stability margins and gain crossover frequency. We consider the second-order plus delay model Fig. 3 Nyquist diagram of the plant G (dark solid line) and of the loop gain transfer function L (light solid line)
with the transfer function of the plant given in [10], that is
G(s) =
where t1 , t2 , T . 0 and K . 0. A direct calculation shows that
(s + 2.5)(2 + 0.7) G(s) = 160 2 (s + 5 s + 40)(s2 + 0.03 s + 0.06) is depicted with the green solid line in Fig. 3. By direct inspection it can be seen that the loop gain transfer function guarantees the desired phase margin and crossover frequency. In fact, using the MATLABw routine margin on the loop gain given by the series of the PID controller with (53) and G(s) shows that the phase margin and gain crossover frequency obtained are 74.938 and 7.96 rad/s, respectively. The step response of the controlled system is given in Fig. 4. The approach described in the previous example may be employed even in the absence of graphical descriptions of the plant transfer function. Indeed, in the very same spirit of the Ziegler and Nichols method, we may ‘perform an experiment’ on the plant by feeding it with a sinusoidal input with frequency vg , that is, the desired crossover frequency. From the steady-state output we can estimate G(jvg ), and hence Mg , and wg and we can thus readily apply the proposed method.
K e−Ts (1 + t1 s)(1 + t2 s)
Mg =
(1 + v2g t21 )(1 + v2g t21 ) K
wg = u − p + arctan(vg t1 ) + arctan(vg t2 ) where u = PM + vg T , which lead to Mg cos(wg ) =
vg (t1 + t2 ) sin u − (1 − v2g t1 t2 ) cos u K
If the specifications are on the ratio s = Td /Ti , the parameters of the compensator can be computed directly using (12–14), which with this particular model yield Kp =
vg (t1 + t2 ) sin u − (1 − v2g t1 t2 ) cos u K
Ti =
(1 − v2p t1 t2 ) tan u + vp (t1 + t2 ) (1 − v2p t1 t2 ) − vp (t1 + t2 ) tan u
Td = Ti s If the specifications are on both the phase and gain margin (and on the gain crossover frequency), we must also compute
Mp =
(1 + v2p t21 )(1 + v2p t21 ) K
wp = −p + vp T + arctan(vp t1 ) + arctan(vp t2 ) so that Mp cos(wp ) =
Fig. 4 Step response of the controlled system 576 & The Institution of Engineering and Technology 2011
vp (t1 + t2 ) sin(vp T) − (1 − v2p t1 t2 ) cos(vp T) GM · K
Therefore in order to achieve the desired phase and gain margins at the desired gain crossover frequency, we need to find the roots IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565 –578 doi: 10.1049/iet-cta.2010.0239
www.ietdl.org vp of the equation
different transfer function for the PID controller
c(vp ) = vp (t1 + t2 ) sin(vp T ) − (1 − v2p t1 t2 ) cos(vp T ) − GM · K · Mg cos(wg ) = 0
CPID (s) = KP (54)
Note that this time function c(vp ) is not a polynomial, since the transfer function of the model is not rational. The roots of this equation can be determined numerically, as shown in the following example. Of all the roots of c(vp ), one satisfying the conditions of Theorem 2 must be determined (if no such roots exist, the problem does not admit solutions), and compute the parameters of the PID controller using (26–28). Example 5: In this example we compare the results presented in this paper with those based on a second-order approximation described in [9]. In particular, we consider the process in [9, Table 5] described by the transfer function 1/(s + 1)5 and approximated with the second-order model G(s) =
e−1.73s (1 + 1.89s)2
Kp = 1.1038,
Ti = 3.7797 s,
is utilised. The values of the phase margin and gain margin obtained in [9] are 62.58 and 3.38, respectively. The closed-form formulae given in this paper for the parameters of the PID controller are given in finite terms. Hence, a remarkable advantage of this method is the fact that these formulae can be applied to any plant approximation, even though in this section for the sake of comparison with the existing methods only the second-order plus delay approximation has been considered. As such, the flexibility offered by the method presented here also extends to the case where the transfer function of the plant to be controlled is not exactly known, and necessarily guarantees a better performance when a better approximation of the plant dynamics is available. This also means that the method proposed in this paper outperforms any method constructed on a plant approximation with a fixed structure.
10
The design specifications considered are on the phase and on the gain margin, which are required to be equal to 608 and 3, respectively. The desired gain crossover frequency is 0.30 rad/s. This problem can be solved as described above with t1 = t2 = 1.89 s, T = 1.73 s and K ¼ 1. In this case, function c(vp ) is depicted in Fig. 5. It can be numerically established that the smallest root of c(vp ) is at vp = 0.8728 rad/s. It is a matter of direct substitution to see that this frequency satisfies the conditions given in Theorem 2. This means that the control problem is solvable, and we can use vp to compute the parameters of the compensator Td = 0.8291 s
With these values, the phase and gain margins of the loop gain transfer function obtained by the series of the real process and the PID controller designed using its second-order approximation are 62.268 and 3.26, respectively, and the real gain crossover frequency is at 0.3173 rad/s. The values of the parameters of the PID controller are different from those obtained here because in [9] the
(1 + Ti s)(1 + Td s) Ti s
Conclusions
A unified approach has been presented that enable the parameters of PID, PI and PD controllers (with corresponding approximations of the derivative action when needed) to be computed in finite terms given appropriate specifications expressed in terms of steady-state performance, phase/gain margins and gain crossover frequency. The synthesis tools developed in this paper eliminate the need of trial-and-error and heuristic procedures in frequency-response design, and therefore they undoubtedly outperforms the heuristic, trialand-error and graphic approaches proposed so far in the literature for the feedback control problem with specifications on the steady-state performance and on the gain/phase margins, in the case of perfect knowledge of the model of the plant. When the plant model is not exactly known – as is often the case in practice – the present method can still be fruitfully employed for the design of the PID controller. Indeed, the formulae delivering the controller parameters only require the magnitude and the argument of the frequency response of the plant at the desired crossover frequency. These data can be obtained graphically by direct inspection over any of the Nyquist, Bode and Nichols diagrams (with the advantage that no special charts are needed). Alternatively, the closed-form design techniques can be used jointly with a firstor second-order plus delay approximation of the plant to deliver the desired values of the stability margins and crossover frequency.
11
Acknowledgments
This work was partially supported by the Australian Research Council (Discovery Grant DP0986577) and by the Italian Ministry for Education and Research (MIUR) under PRIN grant ‘Identification and Robust Control of Industrial Systems’.
12
Fig. 5 Function c(vp) IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565–578 doi: 10.1049/iet-cta.2010.0239
References
˚ stro¨m, K.J., Hagglund, T.: ‘PID controllers: theory, design, and tuning’ 1 A (Instrument Society of America, Research Triangle Park, NC, 1995, 2nd edn.) ˚ stro¨m, K.J., Hagglund, T.: ‘Advanced PID control’ (Instrument 2 A Society of America, Research Triangle Park, NC, 2006) 3 Datta, A., Ho, M.-T., Bhattacharyya, S.P.: ‘Structure and synthesis of PID controllers’ (Springer, 2000) 577
& The Institution of Engineering and Technology 2011
www.ietdl.org 4 Visioli, A.: ‘Practical PID control: advances in industrial control’ (Springer-Verlag, 2006) 5 Yeung, K.S., Lee, K.H.: ‘A universal design chart for linear timeinvariant continuous-time and discrete-time compensators’, IEEE Trans. Edu., 2000, E-43, (3), pp. 309 –315 6 Skogestad, S.: ‘Simple analytic rules for model reduction and PID controller tuning’, J. Process Control, 2003, 13, pp. 291– 309 7 Kim, K., Kim, Y.C.: ‘The complete set of PID controllers with guaranteed gain and phase margins’. Proc. 44th IEEE Conf. on Decision and Control, and the European Control Conf. 2005, Seville, Spain, 12–15 December 2005, pp. 6533– 6538 8 Keel, L.H., Bhattacharyya, S.P.: ‘Controller synthesis free of analytical models: three term controllers’, IEEE Trans. Autom. Control, 2008, AC53, (6), pp. 1353–1369 9 Ho, W.K., Hang, C.C., Cao, L.S.: ‘Tuning of PID controllers based on gain and phase margin specifications’, Automatica, 1995, 31, (3), pp. 497–502
578
& The Institution of Engineering and Technology 2011
10 Franklin, G., Powell, J.D., Emami-Naeini, A.: ‘Feedback control of dynamic systems’ (Prentice Hall, 2006) 11 Ferrante, A., Lepschy, A., Viaro, U.: ‘Introduzione ai controlli automatici’ (UTET Universit, 2000) 12 Ogata, K.: ‘Modern control engineering’ (Prentice Hall, Englewood Cliffs, NJ, 2000, 2nd edn.) 13 Wakeland, W.R.: ‘Bode compensation design’, IEEE Trans. Autom. Control, 1976, AC-21, (5), pp. 771– 773 14 Phillips, C.L.: ‘Analytical bode design of controllers’, IEEE Trans. Educ., 1985, E-28, (1), pp. 43– 44 15 Zanasi, R., Marro, G.: ‘New formulae and graphics for compensator design’. Proc. 1998 IEEE Int. Conf. on Control Applications, 1– 4 September 1998, vol. 1, pp. 129– 133 16 Marro, G.: ‘TFI: insegnare ed apprendere i controlli automatici di base con MATLABw’ (Zanichelli Ed., Bologna, Italy, 1998) 17 Ziegler, J.G., Nichols, N.B.: ‘Optimum settings for automatic controllers’, Trans. ASME, 1942, 64, pp. 759–768
IET Control Theory Appl., 2011, Vol. 5, Iss. 4, pp. 565 –578 doi: 10.1049/iet-cta.2010.0239