The PID+p controller structure and its contextual model-based tuning

The PID+p controller structure and its contextual model-based tuning

Proceedings of the 18th World Congress The International Federation of Automatic Control Milano (Italy) August 28 - September 2, 2011 The PID+p contr...

327KB Sizes 0 Downloads 18 Views

Proceedings of the 18th World Congress The International Federation of Automatic Control Milano (Italy) August 28 - September 2, 2011

The PID+p controller structure and its contextual model-based tuning Martina Maggio, Alberto Leva Politecnico di Milano, Dipartimento di Elettronica e Informazione Piazza Leonardo Da Vinci, 32 - 20133 Milano, Italy (e-mail: {maggio,leva}@elet.polimi.it) Abstract: A recently published paper addressed the so called “PI+p” controller (i.e., a PI augmented with an additional, stable pole) and demonstrated that said controller yields interesting results particularly if tuned with the “contextual” approach, where model-based rules are used in conjunction with a relay experiment so as to provide at the same time the tuned regulator, and the tuning model. In this manuscript the scope is extended to the “PID+p” (with obvious meaning) controller structure, discussing its potentialities with reference to some benchmark cases. Keywords: Autotuning; PID control; industrial regulators. 1. INTRODUCTION The importance of the model-based approach to the (auto)tuning of industrial controllers is widely recognised since many years, ˚ om and H¨agglund (1995). Employing I/O data to see e.g. Astr¨ first identify a model of the process under control, and then tuning the regulator based on that model, allows to stipulate the control specifications in a very intuitive way. For example, a response speed request can be formulated in terms of “how faster the closed-loop has to be with respect to the process model”. Also, the availability of a such a model makes it possible to simulate the closed-loop system, in order to assess at least the main characteristics of its behaviour (Leva, 2001). However, as discussed by Leva and Schiavo (2005); Leva and Piroddi (2007), the role of the process model in the particular context of Model-Based AutoTuning (hereinafter MBAT for short) has some very distinctive peculiarities, essentially because that model has to capture the control-relevant dynamics for the particular problem at hand, while being generally identified in the presence of poor excitation. As a result, the quality of the obtained tuning depends significantly on the procedure used to determine the model parameters, and Leva et al. (2009) showed that treating the model parametrisation and the regulator tuning phases jointly, and in a way compatible with the feasible process stimuli, is possible and beneficial. A second important issue about MBAT is that the necessity of simple tuning rules not only constrains the model structure, but frequently lead to consider some idealised version of the regulator. Concentrating on the PID, many rules do not account precisely for the controller structures actually implemented in industrial products (O’Dwyer, 2003). For example, as noted by Isaksson and Graebe (2002), the derivative filter is frequently disregarded despite its relevance, and the additional pole(s) introduced in industrial PI(D)s for the main purpose of measurement noise filtering are even more rarely considered. This manuscript extends the work done in Leva and Maggio (2009). It is pointed out that the PID+p structure (a real PID augmented with a third stable pole) has objective advantages 978-3-902661-93-7/11/$20.00 © 2011 IFAC

in terms of control sensitivity, further supporting the idea of accounting for “high-frequency control filtering” (of which the derivative filter in a real PID is a particular case) in the design. Clearly the idea of augmenting a PID is not new, see e.g. Kwok et al. (2000), but the tuning procedure presented here provides that idea with some more objectiveness. This is done by suitably exploiting the so-called “contextual identification” approach, recently introduced by Leva et al. (2009). As such, the additional contribution of this work with respect to previous ones is the extension of PI results to the PID case, and a better formalisation of previous ideas within the contextual parametrisation approach. Some examples are presented, referring to benchmark cases, to evidence the effectiveness and robustness of the proposal. 2. THE PID+P STRUCTURE Consider a PID regulator in the so-called 1-d.o.f. (one degree of freedom) ISA form, i.e., the transfer function from the error to the control signal   sTd 1 + . (1) RPID (s) = K 1 + sTi 1 + sTd /N Based on (1), the PID+p structure is defined as   1 sTd 1 RPID+p (s) = K 1 + + (2) sTi 1 + sTd /N 1 + sTp or (almost) equivalently (1 + sTz1 )(1 + sTz2 ) RPID+p (s) = µR , (3) sTi (1 + sTp1 )(1 + sTp2 ) which is the form used herein for computational convenience, and obviously represents an extension of any PID with real zeroes—regulators with complex zeroes are a minority in practice, so the limitation is accepted in this work and extensions are deferred to future ones. Irrespective of the tuning method adopted to synthesise (1), the control sensitivity function RPID (s) CPID (s) := , (4) 1 + RPID (s)P(s)

4101

10.3182/20110828-6-IT-1002.01029

18th IFAC World Congress (IFAC'11) Milano (Italy) August 28 - September 2, 2011

Fig. 1. Values of C∞ and N coming from (7) and (8). where P(s) represents the process under control, has a limit frequency response magnitude value for the frequency ω going to infinity given by C∞ := lim |CPID ( jω)| = K(1 + N). (5) ω→∞

and thus does not roll off at high frequencies, therefore potentially leading to a control signal that is very sensitive to measurement noise. In many applications this is a significant problem, especially when the actuator has moving mechanical parts—a frequent case for example in process control, which is the domain of election for the presented technique at least at the level of this study. Of course said control sensitivity does roll off if the regulator is RPID+p (s). To see how relevant the matter can be, consider the simple case where the FOPDT (First Order Plus Dead Time) process µP e−sLP PFOPDT (s) := , (6) 1 + sTP with TP > 0, LP ≥ 0 and for simplicity (without loss of generality) µP > 0, is controlled by the ISA PID (1). Suppose that the control specification is the ratio ka between TP and the desired closed-loop dominant time constant TCL (i.e., ka := TP /TCL is readily interpreted as an acceleration factor). Finally, employ two tuning rules: the first one (Lee et al., 1998, eqn. 22) does not account for N, and with the notation used here reads Ti LP2 , K= , Ti = TP + 2(LP + λ )  µP (L P + λ ) (7) 2 LP LP Td = 1− 2(LP + λ ) 3Ti while the second (Leva and Colombo, 2004, eqn. 8) does consider N, and reads LP2 Ti Ti = TP + , K= , 2(LP + λ ) µP (LP + λ ) (8) TP (LP + λ ) λ LP N N= − 1, Td = . λ Ti 2(LP + λ ) As can be seen the two rules are very similar, since they come from different approximations of an ideal IMC controller, and share the design parameter λ , that is interpreted as the desired closed-loop time constant: in this example λ will thus be set to TP /ka . With trivial computation one obtains that the highfrequency control sensitivity C∞ with the PID (1) tuned by the rule “without N” (7) and “with N” (8) are, respectively, ka 2TP2 + 2ka LP TP + ka LP2 ka C∞,noN = (1 + N), C∞,N = , µP 2(TP + ka LP )2 µP (9) so that the rule (7) yields the same C∞ as (8) if N is set to 2ka LP TP + (2ka2 − ka )LP2 Neq = . (10) 2TP2 + 2ka LP TP + ka LP2

It can be easily verified that, for “normal” values of the involved quantities, the resulting values of N in (8), and also of Neq as per (10), tend to be significantly lower than those often suggested as “reasonable choices”. To give just a brief example, one can take model (6), set µP and TP to the unity (so that generalising is just a matter of re-scaling), and let the normalised delay θ := LP /TP and the required acceleration ka vary in suitable ranges (say 0.1–1 and 0.5–2, respectively). The leftmost plot in figure 1 reports the (identical) value of C∞ obtained with the “tuned N” (8) and with Neq , versus that obtained by fixing N to 5 (not a high value compared to some suggestions, incidentally). The center and right plots conversely show the value of N coming from (8), and that of Neq produced by (10), respectively. The closed-loop responses of the systems corresponding to the various (θ , ka ) couples are omitted for brevity. Suffice to say that the controlled variable’s behaviour is practically the same, while this does not hold true for the control signal (obvious, given the sensitivity differences). Figure 1 in the first place confirms that “default values” for N can be harmful. Also, the effect of the derivative filter, when tuned, is significantly more lowpass-like than one may expect (see the center and right plot). Finally, which is not obvious a priori, even the “tuned N” easily produces values of C∞ greater than the unity, i.e., measurement noise can appear amplified on the control signal. To mitigate the problems above, many industrial PIDs contain some additional filter, almost invariably with a fixed, pre-specified cutoff frequency, which means that they have de facto the PID+p structure. 3. CONTEXTUAL PID+P TUNING 3.1 General considerations Consider a PID+p regulator in the form (3)—the presence of Ti in the denominator is just a useful normalisation that simplifies some of the following computations. The reasoning followed here to devise the tuning rules is similar to that described for the PI+p in Leva and Maggio (2009), and starts from the SOPDT (Second Order Plus Dead Time) process model e−sLM (11) (1 + sTM1 )(1 + sTM2 ) with TM1,2 > 0, LM ≥ 0, and for simplicity (without loss of generality) µM > 0. Suppose for convenience that TM1 ≥ TM2 . Tuning by cancellation (i.e., Tz1 = TM1 and Tz2 = TM2 ), setting Ti = TM1 , and assuming 1/|Tp1,2 |  ωc leads to estimate the nominal cutoff frequency as µM µR , (12) ωcn = TM1

4102

M(s) := µM

18th IFAC World Congress (IFAC'11) Milano (Italy) August 28 - September 2, 2011

Fig. 2. The (α, ϕ m ) → Dc relationship in some relevant cases. and setting Tp1 = α1 /ωcn and Tp2 = α2 /ωcn where α1,2 are two real design parameters in the range (0,1), gives a nominal phase margin of π µM µR LM ϕmn = − − arctan α1 − arctan α2 . (13) 2 TM1

that represents the direction along which the nominal open-loop frequency response crosses the unit circle. For the determination of Dc in the PID+p case, tedious but trivial computations yield

Suppose now that a point of the process frequency response P( jω) is known, For example, a conveniently driven relay b jωox ) = Pox e jϕox test can yield quite reliable an estimate P( of the point of P( jω) corresponding to the frequency ωox of the induced permanent oscillation. Alternatively techniques such as those described by Luyben (2001); Panda and Yu (2003); Thyagarajan and Yu (2003) and similar works (see the review by Yu (1999) for a complete scenario) can be adopted. It is straightforward to write an equation system involving the estimated point, the PID+p regulator (3), and the SOPDT process model (11), so that

(16)

• the nominal cutoff frequency ωcn equal ωox , b jωox ), i.e., • the frequency response of the model contain P( “the model be exact at the nominal cutoff frequency”, • and the nominal phase margin ϕmn equal a desired value ϕ m. Writing said system yields  µM µR    = ωox   TM1     π µM µR LM − − arctan α1 − arctan α2 = ϕ m 2 TM1   µM  p p = Pox     1 + (ωox TM1 )2 1 + (ωox TM2 )2  − arctan(ωox TM1 ) − arctan(ωox TM2 ) − ωox LM = ϕox

(14)

i.e., once a prescribed phase margin ϕ m is chosen, four equations in the seven variables (µM , LM , TM1 , TM2 , µR , α1 , α2 ). The way the missing three equations are introduced can give rise to different tuning procedures, as shown in the following. 3.2 A possible tuning procedure First, set TM1 = TM2 =: TM , which leads to a regulator with coincident zeroes—many methods in the literature, starting from the historical Ziegler-Nichols one, adopt such a simplification. Then, let also the regulator poles not in the origin coincide, i.e., set α1 = α2 =: α. The selection of α (a somehow critical parameter in Leva and Maggio (2009) referring to the PI+p) can be based on the quantity dIm(RPID+p ( jω)M( jω)) (15) Dc := dRe(RPID+p ( jω)M( jω)) ω=ωox

Dc,PID+p (α, ϕ m ) = f (α, ϕ m ) sin ψ(α, ϕ m ) − g(α, ϕ m ) cos ψ(α, ϕ m ) g(α, ϕ m ) sin ψ(α, ϕ m ) + f (α, ϕ m ) cos ψ(α, ϕ m ) where ψ(α, ϕ m ) := ϕ m + 2 arctan α f (α, ϕ m ) := 4α(α 2 + 1)ψ(α, ϕ m ) + 6α 4 − 2πα 3 −12α 2 − 2πα − 2 g(α, ϕ m ) := 2(α 4 − 1)ψ(α, ϕ m ) − πα 4 − 16α 3 + π

(17)

Note that Dc,PID+p depends only on α and ϕ m . This is a characteristic of the PID+p structure and the contextual approach; for example, it can be verified that the same approach applied to the ISA PID (1) gives for Dc an expression containing ϕox . In addition, for any given ϕ m , Dc,PID+p decreases monotonically when α goes from zero to one. This monotonicity too is a characteristic of the PID+p structure and the contextual approach. To briefly testify that, figure 2 shows, from left to right, the (α, ϕ m ) → Dc relationship (a) with the PID+p tuned with the contextual approach, (b) with a real PID obtained by just removing one of the two PID+p additional poles, which can be seen as a particular case of “ISA PID with tuned N”, (c) with the ISA PID tuned with the contextual approach (the resulting formulæ are omitted for brevity) and ϕox = −90◦ , and (d) the same case as (c) but with ϕox = −120◦ . The Dc scale is logarithmic for better readability. In synthesis, to tune the PID+p, one can first choose ϕ m , and then compute a desired crossing direction as   max − Dmin , 0<β <1 (18) D◦c = Dmin c + β Dc c To select β , consider that higher values mean locating the additional PID+p pole near the cutoff, therefore enhancing the advantages of that regulator structure in terms of highfrequency control sensitivity roll-off. On the contrary, a lower β results in more wide a frequency band (around the cutoff) where the regulator introduces a phase lead, which can sometimes be useful e.g. for dominant delay processes. In general, selecting quite high a value for β (say 0.90–0.95) is thus the advised choice, although lower values may be used if the sensitivity roll-off issue is not particularly relevant. Once D◦c is determined, solving (16) numerically produces α. As can be guessed from figure 2 said numerical solution is not a heavy task, thus details are omitted. Finally, the PID+p and the model are (contextually) parametrised by setting

4103

18th IFAC World Congress (IFAC'11) Milano (Italy) August 28 - September 2, 2011

Fig. 3. Simulation Example 1 - Results with ϕ m = 60◦ and β = 0.95. RPID+p (s) = µR

(1 + sTM )2   αTM 2 sTM 1 + s µM µR

(19)

˚ om and H¨agglund tered in process control, see the work by Astr¨ (2000). The considered classes are 1 , (1 + s)(1 + αs)(1 + α 2 s)(1 + α 3 s) 1 + sTz 1 − sTz Pc2 (s) = , Pc3 (s) = , 3 (1 + sTp ) (1 + sTp )2 1 e−sL  , Pc5 (s) = Pc4 (s) = (1 + sTp ) (1 + sT ) 1 + 2 ξ s + Pc1 (s) =

and applying the formulæ   ωox TM 1 π µR = − ϕ m − 2 arctan α , , LM = µM ωox 2    ωox LM + ϕox 1 2 tan . µM = Pox 1 + (ωox TM ) , TM = − ωox 2 (20) A particularly simple and effective rule is obtained by using the point of the process frequency response with phase equal to -90◦ , readily found e.g. by relay feedback with a cascaded integrator. Of course the tuning rule 20 has some applicability limits, but it is easy to enforce them in any automated procedure. Suffice to say, for example, that should the tuning model delay be negative, it is sufficient to iteratively lower α until the problem is solved. As a final remark and a possible extension, one could set the ratio between the two regulator zeroes’ time constants to a fixed value different from the unity, therefore preserving the tuning approach used here while avoiding the zeroes’ coincidence (for example to limit the derivative action also in the control band, as sometimes suggested in the literature). Fixing a non-unitary ratio between the two PID+p zeroes slightly complicates the tuning procedure, but does not pose any serious problem. 4. SIMULATION EXAMPLES 4.1 Example 1: performance and stability robustness with relevant process classes In this section, the proposed PID+p tuning procedure is applied to five classes of processes that cover most of the cases encoun-

p

ωn

s2 ωn2

. (21)

The results are reported in figure 3, that is organised as follows. Each row refers to one of the classes (21), as indicated: ten processes are considered for each class, and the parameter ranges are chosen so as to produce similar time scales. The first column shows the process unit step response. The second column reports the magnitudes of the inverse nominal control sensitivity function 1/Cn ( jω) and the additive error EA ( jω) committed by the tuning model. In that column, the two thick lines connect the points of the two magnitude plots that correspond to the same process, and are at the nominal cutoff frequency for the control system containing that process. This allows to see that the intersection of the two magnitudes invariantly occurs well above the cutoff, so that closedloop stability is preserved although the sufficient condition ||Cn ( jω)EA ( jω)||∞ < 1, where Cn (s) and Ea (s) are respectively the nominal control sensitivity and the additive model error, see Doyle et al. (1992), may not hold true. The third column reports the open-loop Nyquist plot of the control system containing the process (not the model, notice) and finally the fourth column shows the response of the controlled variable of said system to a unit load disturbance step. As can be seen, the PID+p controller tuned with the proposed procedure can handle virtually any case of interest, at least for

4104

18th IFAC World Congress (IFAC'11) Milano (Italy) August 28 - September 2, 2011

process control. Many other tests with different values of ϕ m and intermediate to extreme ones for β (up to β = 0.05), not shown for brevity, back up the statements above and confirm the idea that high values for β are advised in most cases; only when a significant delay is present low ones are to be selected. 4.2 Example 2: forecasting the tuning results In this section, the proposed procedure is applied to five processes that represent (analogously to the batch of section 4.1) some types of dynamics that are acknowledged as relevant for autotuners. The processes (here too parameters were selected so as to obtain transients with comparable durations and amplitudes) are (1) one with high-order dynamics, (2) one with an overshooting step response, (3) a non minimum-phase one, (4) a dominant delay one, and (5) one with recycle, defined respectively as 1 1 + 6s P1 (s) = , P2 (s) = , (1 + 1.5s)5 (1 + 2s)5 (22) −5s e 1 − 3s , P (s) = , P3 (s) = 4 (1 + 4s)2 1 + 5s and P5,FF (s) P5 (s) = , 1 − P5,FF (s)P5,FB (s) (23) −2s e 0.5e−6s P5,FF (s) = , P5,FB (s) = . 1+s 1 + 5s The particular purpose of this example is to examine closedloop responses in detail, hence no parameter sweeping is involved, and to show that the contextually parametrised model can forecast those responses satisfactorily. The results are shown in figures 4 and 5, that show the closedloop controlled variable’s and control signal’s response to a unit step load disturbance, both as obtained with the real process and, which is the key point in this example, as forecast with the tuning model. Each plot also indicates the model parameters and the process dominant time constant Tdom , defined as the inverse of the frequency for which the process frequency response magnitude falls 3 dB under the static gain. Notice that the PID+p zeroes are not always stuck to that frequency and move also with the specifications, despite the model is constrained to be precise at the nominal cutoff—this is particularly true with complex dynamics like those of P5 , for example. Apart from the generally good results and the clear effect of the design parameter, two facts are worth noticing. First, the applicability limits of the proposed approach do appear, but take essentially the form of errors in forecasting the tuning results with the model. That limitation cannot obviously be avoided completely given the simplicity of that model, but it is worth observing that in all the considered cases the tuning procedure produces satisfactory regulators and fairly good forecasts as far as the main transient characteristics (such as the peak deviation and the settling time) are considered. Second, the fidelity of the model “near the cutoff” makes the forecast transients similar to reality essentially at low frequency when the required stability degree is large, and more realistic (also) at mid-high frequency when the required stability degree is smaller (notice for example the behaviour of the forecast response and of parameter LM with process P3 ). It seems, in general, that when the process dynamics cannot be represented by the model on a wide frequency span, parametris-

ing the model in conjunction with the regulator tuning, as is done herein, results in an improved significance of the model parameters—see e.g. the case of P5 , where the SOPDT structure (11) is apparently inadequate. Such an interesting effect can most likely be considered an inherent characteristic of the presented tuning approach, and further studies will be directed at taking advantage from it. 5. CONCLUSIONS An autotuning procedure was presented for the so called “PID+p” controller, i.e., a PID augmented with an additional stable pole. It was noticed that many industrial regulators de facto have the PID+p structure, despite they are tuned as if they were mere PIDs. The proposed method thus provides a rigorous way to tune a regulator structure more similar to those often used in practice than the PID is, and some discussions were reported to show the potential relevance of the above remark. After presenting the proposed controller and tuning method, an analysis was carried out based on some benchmark cases, to prove that the obtained tuning is satisfactory and robust, and also that the involved process model (thanks to the employed “contextual identification” approach) permits to forecast the main characteristics of the closed-loop transients in a reliable manner. Future work will concern the extension of the “additional filtering” idea to other control structures (for example based on the internal model principle, see e.g. the recent work by Vilanova (2008), both in the mono- and the multi-variable cases) and to more general process models (e.g., integrating ones). The porting of the presented solutions to industrial control systems will also be specifically addressed. REFERENCES ˚ om, K. and H¨agglund, T. (1995). PID controllers: theory, Astr¨ design and tuning - second edition. Instrument Society of America, Research Triangle Park, NY. ˚ om, K. and H¨agglund, T. (2000). Benchmark systems for Astr¨ PID control. In IFAC Workshop on Digital Control – Past, present, and future of PID Control. Terrassa, Spain. Doyle, J., Francis, B., and Tannenbaum, A. (1992). Feedback control theory. MacMillan, Basingstoke, UK. Isaksson, A. and Graebe, S. (2002). Derivative filter is an integral part of PID design. IEE Proceedings - Control Theory and Applications, 149(1), 41–45. Kwok, K.E., Ping, M.C., and Li, P. (2000). A model-based augmented PID algorithm. Journal of Process Control, 10(1), 9–18. Lee, Y., Park, S., , Lee, M., and Brosilow, C. (1998). PID controller tuning for desired closed-loop responses for SI/SO systems. AIChE Journal, 44(1), 106–115. Leva, A. (2001). Model-based tuning: the very basics and some useful techniques. Journal-A, 42(3), 14–22. Leva, A. and Colombo, A. (2004). On the IMC-based synthesis of the feedback block of ISA-PID regulators. Transactions of the Institute of Measurement and Control, 26(5), 417–440. Leva, A. and Maggio, M. (2009). The PI+p controller structure and its tuning. Journal of Process Control, 19(9), 1451– 1457. Leva, A., Negro, S., and Papadopoulos, A. (2009). PI(D) tuning with contextual model identification. In Proc. ECC 2009. Budapest, Hungary.

4105

18th IFAC World Congress (IFAC'11) Milano (Italy) August 28 - September 2, 2011

Fig. 4. Simulation Example 2 - Response of the controlled variable to a unit step load disturbance as obtained with the process (P) and forecast with the tuning model (M).

Fig. 5. Simulation Example 2 - Response of the control signal to a unit step load disturbance as obtained with the process (P) and forecast with the tuning model (M). Leva, A. and Piroddi, L. (2007). On the parametrisation of simple process models for the autotuning of industrial regulators. In Proc. ACC 2007, 125–247. New York, NY. Leva, A. and Schiavo, F. (2005). On the role of the process model in model-based autotuning. In Proc. 16th IFAC World Congress. Praha, Czech Republic. Luyben, W. (2001). Getting more information from relay feedback tests. Ind. Eng. Chem. Res., 40(20), 4391–4402. O’Dwyer, A. (2003). Handbook of PI and PID controller tuning rules. World Scientific Publishing, Singapore. Panda, R. and Yu, C. (2003). Analytical expressions for relay feed back responses. Journal of Process Control, 13, 489–

501. Thyagarajan, T. and Yu, C. (2003). Improved autotuning using the shape factor from relay feedback. Ind. Eng. Chem. Res., 43, 4425–4440. Vilanova, R. (2008). IMC based robust PID design: tuning guidelines and automatic tuning. Journal of process Control, 18(1), 61–70. Yu, C. (1999). Autotuning of PID controllers: relay feedback approach. Springer-Verlag, London.

4106