Autotuning with Fast Relay Identification - American Chemical Society

identification can help to circumvent the problem of accounting for the identification method, which is a very important issue for which little help i...
0 downloads 0 Views 206KB Size
4052

Ind. Eng. Chem. Res. 2006, 45, 4052-4062

Model-Based Proportional-Integral/Proportional-Integral-Derivative (PI/PID) Autotuning with Fast Relay Identification Alberto Leva,* Luca Bascetta, and Francesco Schiavo Dipartimento di Elettronica e Informazione, Politecnico di Milano, Via Ponzio, 34/5-20133 Milano, Italy

Based on some relationships between model- and relay-based tuning, a novel tuning approach is proposed to couple the advantages of model-based methods and the simplicity and clarity of relay experiments. Based on that approach, some very simple synthesis procedures are derived for proportional-integral (PI), proportionalintegral-derivative (PID), and more-complex regulators. The procedures are fast, because they use a single relay test and do not introduce large process upsets. They are also very light, from the computational standpoint, and, thus, are well-suited for low-end industrial regulators. Both simulation examples and laboratory tests are reported. 1. Introduction This manuscript presents some results of research whose objective was to establish relationships between model- and relay-based tuning methods for industrial controllers. Three points will be detailed: (1) Model-based tuning approaches can be exploited in such a way to ease the use, and improve the results, of proportionalintegral/proportional-integral-derivative (PI/PID) relay-based tuning methods using one point of the Nyquist curve (the wellknown Internal Model Control (IMC) approach1-5 will be applied here as a representative example, without any loss of conceptual generality). (2) In the model-based tuning framework, relay feedback identification can help to circumvent the problem of accounting for the identification method, which is a very important issue for which little help is currently available in the literature.6-8 (3) It is possible, up to some extent, to establish general relationships between the model- and relay-based frameworks, which allows the derivation of tuning procedures that, in principle, can accommodate for arbitrarily complex regulator structures and are limited only by the unavoidable presence of numerical problems. The reported analysis is complemented by the presentation of complete tuning procedures that are tested both in simulation and in physical control systems. As witnessed by those examples, the procedures are fast, reliable, computationally light, and very simple to understand, even for nonspecialists. It is worth stressing that the objective of this work is not to propose just “another relay-based tuning rule”, but to show that relay data can be effectively (and rigorously) used in conjunction with more-powerful model-based methods. It will be shown that, in some particular cases, the rules obtained herein can be interpreted in terms of standard relay-based ones, but this is not always possible, because the formulated proposal is more general. Once again, recall that our intention is to propose a tuning approach, not just tuning formulae. 2. Problem Statement and Literature Review A quite recent classification of autotuning techniques9 has proposed to distinguish between “model-based” and “charac* To whom correspondence should be addressed. Tel.: 39 02 2399 3410. Fax: 39 02 2399 3412. E-mail address: [email protected].

teristics-based” methods. In the former class, a process model (i.e., to put it broadly, “something that can be simulated”) is identified, based on input/output (I/O) data, and used to tune the regulator. In the latter, some characteristics of process responses are measured, and used to tune directly. The great majority of relay-based methods fall in the second class, and those are the most successful in applications. Some methods try to bridge the gap with the model-based domain, but they are used less frequently, and are less trusted in real-world cases. To get the panorama, the interested reader can refer, e.g., to O’Dwyer6 and Yu.10 The idea of joining relay-based identification and model-based tuning is not new, of course, as the desirable features of the latter approach are well-known: a process model is available to forecast the tuning results, which enhances the interpretability of design parameters and helps to select a value for them.11 However, model-based tuning has also an inherent problem. No matter how the model structure is chosen (most often, a very simple one is assumed a priori6), the identification method plays a very relevant role. The literature is often silent on that problem, while the authors believe it to be among the major obstacles for a wide acceptance of model-based tuning in the applications. Simple relay-based tuning methods form maybe the only framework where there is no ambiguity on how the process data are used. Results are local, in that only one or a few points of the open-loop Nyquist curve are considered, but exact. Clearly, relay-based tuning also has shortcomings. One notorious shortcoming is the limited information that is conveyed by a few points of an unknown Nyquist curve, for whatever those points are meant to be used. Much research has been conducted on this feature, and there is a huge amount of literature on the matter. Interesting reviews include reports by O’Dwyer,6 Yu,10 Godfrey and co-workers,12,13 and Hang et al.12-14 If we now focus attention on the “industrial” point of view, some interesting remarks can be done. First, the “limited descriptive capabilities” of relay data are better viewed as a symptom of the limited capabilities of linear, time invariant (LTI) models as a whole, and, therefore, of simple ones such as first- or second-order with dead time (FOPDT or SOPDT), no matter how they are identified.15 Moreover, many modelbased tuning approaches (not only the IMC) operate essentially by cancellation, which gives the tuning model, and its identification, the important role of deciding which of the observed

10.1021/ie051311r CCC: $33.50 © 2006 American Chemical Society Published on Web 04/15/2006

Ind. Eng. Chem. Res., Vol. 45, No. 12, 2006 4053

dynamics are the control-relevant ones.16 The problems mentioned, e.g., in the work of Shinskey,15 come essentially from a misconception of that role, which, in contrast, must be taken into account as the main criterion for selecting the model. Relaybased identification can help greatly to this end; this is a very useful possibility, seldom considered in the literature. Then, with most non-model-based relay methods, agreeing on the control specifications (typically, the cut-off frequency and the phase margin) is not always intuitive: for example, the phase margin is often difficult to relate a priori to the desired closed-loop behavior. As a result, in the application domain, the low ambiguity of the relay-based framework is very often preferred to the numerous unknowns of model-based methods. The presented research is an attempt to bridge the gap between relay- and model-based tuning, and it is characterized by the following main ideas. First, to tune a regulator and reliably predict the main characteristics of the closed-loop system’s responses in the time domain, basically, the tuning model, if one is used, is required to be precise near the cut-off frequency. This obliges to face explicitly the main problem caused by the role of the model, and its identification: the cutoff frequency is a product of the tuning procedure, not a priori information for it. If the approach is taken to address that problem explicitly, there is no need for very complex models. Of course, the models that are applied will be totally inadequate to represent the process in open-loop conditions; however, in the context of autotuning, this is irrelevant. Second, relay-based identification can be used to obtain such models, and, in so doing, the I/O data can be used in a very direct way, i.e., avoiding operations (such as fast Fourier transforms (FFTs)) that introduce potential ambiguities. The strength of relay-based tuning is exactly thatsthe absence of such ambiguitiessand that characteristic must be preserved.

µM(1 - sLM)/(1 + sTM). This leads (see, e.g., Leva and Colombo5) to the tuning formulae

K)

(

)

1 RPI(s) ) K 1 + sTi

, Ti ) TM

µM(LM + λ)

(4)

yielding the nominal open-loop transfer function

Ln,PI(s) ) RPI(s)M(s) )

e-sLM s(LM + λ)

(5)

Therefore, it is possible to define a nominal cut-off frequency ωcn and a nominal phase margin φmn as

1 LM + λ

(6a)

LM π 2 LM + λ

(6b)

ωcn ) φmn )

Now, suppose that a relay test provides a point P(jωo) ) Aejφ of the process Nyquist curve. The rules defined in eqs 4 reveal, in this case, a very interesting property. Given ωo, A, φ and a required phase margin φm, if eqs 4 are used with a model in the form of eq 2 parametrized so that M(jωo) ) Aejφ, and with λ selected so that ωcn ) ωo and φmn ) φm, the resulting PI is the same as if the point were moved to ej(φm-π) with the standard relay-based tuning formulae (that, in the PI case, have no further degrees of freedom). In fact, requiring that ωcn ) ωo, φmn ) φm, |M(jωo)| ) A, and arg(M(jωo)) ) φ, one obtains

3. Proposed Tuning Framework In this section, we first apply the ideas just devised to the PI and the PID regulator structure, using the IMC-PID as the tuning formula, and we make some considerations on the advantages of the proposed tuning approach. Given the simple structure of PI/PID regulators, those considerations (which, in fact, are general) stem with particular clarity. We then formalize our findings, and use the resulting framework to address the most general case treated herein, i.e., the generic rational LTI regulator. 3.1. PI Regulators. Consider the PI regulator

TM

1 ) ωo LM + λ

(7a)

LM π ) φm 2 LM + λ

(7b)

µM

x1 + (ωoTM)2

)A

-arctan(ωoTM) - ωoLM ) φ

(7c) (7d)

Solving for (µM, TM, LM, λ) and substituting into eqs 4 produces the tuning formulae

Ti ) -

(1)

tan[φ + (π/2) - φm] ωo

(8a)

and and the FOPDT (first-order plus dead time) process model

(

)

e-sLM M(s) ) µM 1 + sTM

K) (2)

The IMC tuning method1-3 defines RPI(s) as

RPI(s) )

Q(s)F(s) 1 - Q(s)F(s)Mr(s)

(3)

where Q(s) is the inverse of the minimum-phase part of M(s), the rational model Mr(s) is obtained with a (1,0) Pade´ approximation of the delay, i.e., substituting e-sLM with (1 - sLM/ 2)/(1 + sLM/2), and F(s) (the so-called “IMC filter”) is firstorder, i.e., Q(s) ) (1 + sTM)/µM, F(s) ) 1/(1 + sλ), Mr(s) )

TM µM(LM + λ)

(8b)

which are easily rewritten as the standard one-point PI tuning formulae obtained by solving the complex equation RPI(jωo)× Aejφ ) ej(φm-π) for K and Ti. This result, which is not apparent a priori, has two important and useful consequences: (1) A single relay test provides a model to forecast the closedloop transients, without requiring any further experiment or information, such as the process gain, and since this model is exact at the cutoff, forecasts will be sensible; and (2) It is possible to use traditional relay-based tuning rules but give specifications in terms of λ instead of φm, which is far

4054

Ind. Eng. Chem. Res., Vol. 45, No. 12, 2006

more intuitive, and easier to understand for a nonspecialist; to this end, it suffices to solve eqs 7 for (µM, LM, TM, φm) instead of (µM, TM, LM, λ), which leads to

LM ) TM ) -

1 -λ ωo

(9a)

tan ( φ + ωoLM) ωo

(9b) Figure 1. Graphical interpretation of how the parameter LM is determined from fω(γ) and ωo.

µM ) A x1 + (ωoTM)

2

(9c)

LM π 2 LM + λ

φm )

(9d)

If a tuning method with no specifications is required (a very frequent choice in low-end autotuners), λ can be made proportional to 1/ωo. This is done by replacing eq 9a with LM ) [1 (1/ka)]/ωo, where ka has the intuitive meaning of “acceleration factor”, and results in the rules

Ti )

tan[φ + 1 - (1/ka)] ωo

K)

(10b)

A x1+(ωoTi)2

where the model parameters still come from eqs 9a-9c. This mode of operation is more effective than setting φm to a “standard”, fixed value, which is a frequently adopted choice in simple industrial solutions. For example, a very simple and effective PI tuning procedure is obtained using the process Nyquist curve point with a phase angle of -90°, which is found easily with an integrator cascaded to the relay,10,17 and giving ka values in the range of 1-5 (pragmatically, the experience with process control suggests that these are reasonable acceleration factors). 3.2. PID Regulators. Consider the one degree of freedom (1-dof) ISA PID,17

(

)

(11)

and a FOPDT process model in the form of eq 2. The PID model described by eq 11 can be synthesized with the IMC relationship given in eq 3 if Mr(s) is obtained with a (1,1) Pade´ approximation of the delay, i.e., Q(s) ) [1 + (sTM)]/µM, F(s) ) 1/(1 + sλ), Mr(s) ) µM[1 - (sLM/2)]/[(1 + sTM)(1 + sLM/2)]. This leads to the tuning formulae

Ti ) TM + K)

N)

2(LM + λ) Ti

µM(LM + λ) TM(LM + λ) λTi

Td )

λLMN 2(LM + λ)

[1 + (sLM/2)]e-sLM λLM s(LM + λ) 1 + s 2(LM + λ)

{ [

]}

(13)

Using the definitions γ ) λ/LM and σ ) ωLM, the frequency response of eq 13 is written as

Ln,PID(jσ) )

[1 + (jσ/2)]e-jσ γ jσ(γ + 1) 1 + jσ 2(γ + 1)

[

{

]}

(14)

and the nominal cut-off frequency ωcn is

ωcn )

( )

1 f (γ) LM ω

(15)

where lengthy (but trivial) computations, which have been omitted for brevity, give, for fω(γ), the exact expression

fω(γ) )

1 γ x2

x-χ(γ) + (χ2(γ) + 16γ2)1/2

(16)

where

χ(γ) :) 4γ2 + 8γ +3 Equation 16 is continuous and invertible for γ > 0. Given a Nyquist curve point (i.e., ωo, A, and φ) and a value for λ, first LM is determined by solving the relation



( )

λ ) ω o LM LM

(for LM > 0)

(17)

numerically, which is not a difficult task, as shown in Figure 1, subject to the condition

lim

2

Lm

Ln,PID(s) )

(10a)

ω oT i

sTd 1 + RPID(s) ) K 1 + sTi 1 + sTd/N

and to the nominal open-loop transfer function

LMf0

dfω(λ/LM) > ωo dLM

(18)

(12a)

(12b)

(12c)

(12d)

reflecting in a constraint on λ that is illustrated by the figure itself and can be enforced on-line (warning the operator, if required). The parameters TM and µM then are computed as in eqs 9, and the PID is tuned with the formulae given in eqs 12. In the PID case, one-point tuning has one degree of freedom left, which, in the literature, is used in many different ways.12 Therefore, a comparison between the proposed method and onepoint tuning is not very significant. Also in this case, however, λ is a more intuitive design parameter than a phase margin and, possibly, other coefficients such as the Ti/Td ratio. Note also that the proposed method uses a real PID, whereas most one-

Ind. Eng. Chem. Res., Vol. 45, No. 12, 2006 4055

point methods do not, and those that do normally require some further heuristics. Here, too, λ can be made proportional to 1/ωo, subject to eq 18, by an acceleration factor ka, and a simple and effective tuning procedure is obtained with the point with a phase angle of -90°. Because the PID can introduce a phase lead, the process ultimate point also can be used: this inherently leads to a wider control band (which means strong feedback and good disturbance rejection), but may result in excessive control sensitivity. In fact, extensive experience shows that using the point at -90° and an acceleration factor ka in the range of 1-5 allows one to achieve satisfactory disturbance rejection and noise sensitivity in virtually all cases of practical interest.

convenient relay test(s), solving for (θR,θM),

4. General Principle

for the PI case, and

Let us now formalize the findings of the PI and PID cases, to address the general case. Consider a model-based tuning formula, that, for the level of generality required herein, takes the form

θM ) [µM TM LM ], θR ) [K Ti Td N ], θD ) λ, q ) [ωc φm ], qo ) [ωo φmn ] (23)

θR ) fT(θM,θD)

(19)

where θR and θM are, respectively, the parameter vectors of the model M(s, θM) used for the tuning and the regulator R(s, θR), and θD is a vector of design variables. Note that, in most cases, the structure of the model is fixed, and, therefore, θM can be interpreted as described previously. In other cases, the model structure can be chosen based on the available data, or the method may even accept nonparametrical models. If this is the case, the proposed principle still holds, the only difference being that θM, at the generality level of this presentation, can only be defined as “the vector of numbers that substantiate the process information used to synthesize the regulator”, in the broadest sense of the term. Section 4.1 will further clarify this remark. Also, the structure of the regulator is generally fixed, although, in some cases, it can be chosen based on data. However, for the scope of this research, the regulator is a linear, time-invariant dynamic system of finite dimension, and, therefore, θR can always be interpreted as the parameter set of such a system, the only variable quantity in the case of nonfixed regulator structure being its cardinality. Finally, depending on the particular tuning policy, fT(‚, ‚) can be explicit (similar to the IMC relationships) or involve some numerical solution and/or optimization: however, from our point of view, that difference is irrelevant. Coming back to the proposed principle, assume (this is the key point) that it is possible to define a vector q(θR,θM) of quantities characterizing the tuning quality of the nominal closed-loop system (that containing the model M), either acting as further design parameters or computable based on the process information gathered with relay tests, for which a desired value qo is therefore available, and such that, for a convenient positive integer nP,

M(jωi,θM) ) P(jωi) (for i ) 1, ..., nP) w q(θR,θM) ) q(θR,P) (20) where q(θR,P) denotes the “true” value of q, i.e., the value that it would assume if the model were replaced by the real process P(s), which allows one to take profit of a model “exactly at the cutoff”. If the assumption above holds true, given a set of nP points {Pi(jωi)} of the process frequency response, determined with

M(jωi,θM) ) Pi

(for i ) 1, ..., nP)

q(θR,θM) ) qo

(21a) (21b)

the system not only achieves the tuning, but provides a process model that is useful for computing reliable forecasts of the obtained closed-loop transients. To cast the two regulator structures just treated in the formalism previously described, it is enough to set

θM ) [µM TM LM ], θR ) [K Ti ], θD ) λ, q ) [ωc φm ], qo ) [ωo φmn ] (22)

for the PID one, fT(‚,‚) being provided in both cases by the corresponding set of IMC-PID formulae, with the addition of eqs 17 and 18 in the PID case. (Note that this makes fT(‚,‚) not completely explicit, but the framework is still logical.) The use of ka to compute λ is just an aid to select the design parameter, which, in that sense, is “external” to the tuning procedure, coming from the proposed approach, and, therefore, irrelevant from the methodological standpoint. 4.1. More-Complex Regulators. So far, we have treated the couple (PI/PID, FOPDT model) as an indivisible unity, in accordance with the adoption of the IMC approach. On the other hand, it is possible to generalize the proposed approach to the regulation of processes that cannot be described by simple FOPDT models and, thus, require more-complex regulators than PI/PIDs.18 As a matter of fact, FOPDT models are suitable for typical process applications, where the process is asymptotically stable and “well-damped if examined at the cut-off frequency”, so that such models can correctly represent the fundamental process characteristics (e.g., the peak value, the assessment value, and the transient time of the step response). This is not true for complex processes with different characteristics (e.g., resonant mechanics systems with peaks of the frequency response near the cut-off frequency), thus ruling out the application of the IMC tuning rules based on FOPDT models. The generalization is then useful to address the cases when it is well-known that the regulator structure must be changed, with respect to the PI/PID one. For such cases, the tuning method and the identification should be modified as well, leading to an increased procedure complexity. In contrast, the extension of the proposed approach can yield a tuning procedure that can be systematized: after the vector qo is defined, the method gives a simple way to obtain a regulator and a model with the desired structure. It should be noted that such models and such regulators are suitable to simulate the closed-loop system, thus eliminating the necessity of complex operations based on the explicit identification of the entire frequency response via relay tests and the subsequent transfer function estimation. The procedure can be summarized as follows: (1) Consider np points of the process Nyquist curve,

Pi (jωi) ) Aiejφi

(for i ) 1, ..., np)

(24)

and choose one of them (the njth) to correspond to the closedloop cutoff.

4056

Ind. Eng. Chem. Res., Vol. 45, No. 12, 2006

(2) Find an asymptotically stable, minimum-phase transfer function M(s) of order nM, such that the distance between its frequency response and the points Aiejφi be minimized in a leastsquares sense; in that minimization, apply error weights such that M(jωnj) = Anj ejφnj, i.e., the approximating model should be practically exact at the chosen cutoff, and allow for a variable number zM e nM of model zeroes. There are many wellestablished methods to do this, and discussing the matter would stray from the scope of this work. (3) Because both the denominator MD(s) and the numerator MN(s) of M(s) are Hurwitz by construction, apply the IMC method with

Q(s) )

MD(s) MN(s)

and

F(s) )

1 (1 + sλ)nM-zM+σ∞

(25)

where σ∞ is the desired decay (in units of 20 dB/decade) of the control sensitivity magnitude frequency response Cn(jω) for ω f ∞ (0 or 1 are generally adequate values, and recall that the IMC-PID rules give σ∞ ) 0). Doing so leads to

R(s) )

MD(s) MN(s)[(1 + sλ)nM-zM+σ∞ - 1]

(26)

(4) Because we are referring to asymptotically stable processes, in regard to well-known results, the nominal control system is asymptotically stable; moreover, R(s) has, by construction, a pole at the origin, and so the nominal cut-off frequency ωcn is well-defined at least for λ large enough (note that also σ∞ can help to that end, because larger values of it make Cn(jω) roll off more sharply after the cutoff). (5) To achieve the tuning within the presented framework, then, it is only required to select λ so that ωcn ) ωnj. This may involve some numeric searches, but it is definitely quite a simple task. The so-derived procedure falls in the framework defined in section 4 by assuming (recall the remarks at the beginning of that section)

θM ) {Pi}, (i ) 1, ..., np), θR ) {ri}, θD ) [λ nj σ∞], q ) ωc, qo ) ωnj

(27)

where ri are the parameters of R(s), and fT(‚,‚) is the combination of the model fitting and the search to achieve ωcn ) ωnj; notice that an “identification” task is explicitly considered as a part of fT, which, in the authors' opinion, is a clarity improvement. In the form presented above, the procedure has no design parameters other than nj and σ∞. Quite intuitively, assuming that some points are identified in the phase-angle range between -180° and -90°, nj can be used to select those with higher or lower phase angles, which results in more or less conservative tuning. As for σ∞, values of 0 or 1 are good defaults. The procedure is very effective, as will be shown. However, some refinements are possible. For example, one could introduce a delay LM in the model, so that the nominal phase margin φmn also can be subject to specifications, because it can be easily seen that, with the presented procedure, this would lead to ωcn ) ωcn(λ) but φmn ) φmn(λ, LM). Note anyway that, in nominal conditions and with the IMC method applied to asymptotically

Figure 2. Closed-loop transients in simulation example 1.

stable models, the phase margin is lower bounded (e.g., it is always ∼54°, at least in the IMC-PID case; see Leva and Colombo5). Also, it would be possible to apply the points that are not used as cut-off points to obtain a (coarse) sampling of the additive model error in the frequency domain, providing an upper bound for λ, as shown by Leva and Colombo,11,19 therefore restricting the choice of nj to those points that allow a sufficiently robust tuning, i.e., one that improves the system robustness, at least with respect to the model errors that can be assumed based on the points not used to determine the cutoff. Note that doing so means using actual model error information, thus making a really “robust” (auto)tuning. (See the discussions in Leva and Colombo11,19 on what can rigorously be called “robust” in the particular context of autotuning.) Because of space limitations, these refinements are not treated herein and will be discussed in future works. 5. Three Simulation Examples 5.1. Example 1. This example shows PI tuning with λ selected automatically through the acceleration factor ka. The processes considered are

1 (1 + s)3

(28a)

1 + 5s (1 + 4s)2(1 + s)2

(28b)

1 (1 + 100s)(1 + 5s)

(28c)

P1(s) ) P2(s) ) P3(s) )

The procedure was applied with the point at -90° and ka set to 1.2, 1.5, 2, and 4. Figure 2 shows the closed-loop step response of the process output to a load disturbance unit step. Note that the transient forecasts, based on the model, are reasonable, as far as the main characteristics of the transients (such as the peak value and the settling time) are considered. For a detailed forecast, the FOPDT structure may not be adequate (see the discussion at the end of example 3, presented later in this work). It is worth stressing that “sensible” forecasts are a peculiarity of the proposed method, with respect to generic model-based procedures. To verify that, the interested reader could use the IMC tuning rules with the same processes, but identifying the FOPDT models with the methods typically used

Ind. Eng. Chem. Res., Vol. 45, No. 12, 2006 4057

Figure 3. Model approximating five Nyquist points (example 2).

in industrial applications, e.g., the method of areas, or others based on the rise/settling time and so on. Note that the tuning may still be satisfactory, but the forecast transients would generally be less precise. We omit such a comparison here for space limitations, and also due to the presence of example 3. Notice that the action of ka is clear and easy to understand (the open-loop settling times of the three processes are ∼6 s, ∼12 s, and ∼300 s, respectively). It is apparently simpler to relate the tuning results to ka than to the phase margin; in this example, that value lies approximately in the range of 45°80°. 5.2. Example 2. This example illustrates the procedure described in section 4.1. The process considered is

P(s) )

1 + 2.5s (1 + s + s )(1 + 2s)(1 + 0.5s) 2

Five points were determined, with phase angles ranging from -90° to -180°, and the approximating model,

M(s) ) (0.0202s3 + 0.2305s2 + 0.5977s + 0.4497) ÷ (0.0014s7 + 0.025s6 + 0.193s5 + 0.785s4 + 1.829s3 + 2.443s2 + 1.735s + 0.507) was determined to fit the points, with nj being set equal to 3, as shown in Figure 3. The value that is determined for λ is 0.302, giving a nominal cut-off frequency of 1.001r/s (the frequency of the third point is 1.103r/s, so the achieved precision is reasonable). The value chosen for σ∞ is 1. The IMC procedure leads to a complex regulator that produces the set point and load disturbance responses shown in Figure 4, where the actual transients and those forecast with M(s) are compared. Reducing the complex regulator to a PID cascaded to a firstorder low-pass filter (because σ∞ ) 1) gives

RPIDp(s) ) 1.2

1 + 1.1s + s2 s(1 + 0.25s + 0.015s2)

and the set point and load disturbance responses of Figure 5.

Note the effectiveness of the method, and the reasonably good quality of the transient forecasts using the tuning model. Of course, there may be a steady-state error in the control forecasts, because the model is not conceived to catch the process static gain, but the relevant dynamics are represented, and the control engineer has all the information required to evaluate the tuning. 5.3. Example 3. The objective of this example is to compare the proposed method with other relay-based tuning rules that can be found in the literature, in addition to clarify the main idea of the proposed approach. However, before presenting the example, a foreword is in order. First, to the best of the authors’ knowledge, no explicit attempt to use model-based tuning formulae (a vast repository indeed; see the work of O’Dwyer6 and Yu10) in conjunction with relaybased identification has been proposed so far. To meaningfully compare the proposed method to “available relay-based methods”, then, it is first necessary to (briefly) classify those methods with respect to the proposed methodological shift, which consists of the use of relay-based identification coupled with modelbased tuning. In extreme synthesis, such a classification may be as follows (for the sake of brevity, we do not provide references; the reader can easily map the following onto any survey on the matter (e.g., see the work of Yu10). At a first level, in the literature, we have methods using only points of the process Nyquist curves (“P” methods), and methods using “some other characteristics” of the relay response (“P + C” methods). At a second level, P methods can use only one point, typically the ultimate one or that with a phase angle of -90°; therefore, we have a very numerous class of methods we can term “1P”, Alternatively, P methods can use more points, and then we have the class of “mP” methods. Such methods either explore the process Nyquist curve until a “suitable point” is determined and then resort to the 1P approach (we can term those “mP1” methods), or use two points to govern the open-loop magnitude’s slope at the cut-off frequency, and, in that case, we have “mPs” methods; finally, some mP methods use a set of points to determine a process model, either nonparametric (i.e., composed of the

4058

Ind. Eng. Chem. Res., Vol. 45, No. 12, 2006

Figure 4. Results achieved with the complex regulator (example 2).

Figure 5. Results achieved with the PID cascaded to a first-order low-pass filter (example 2).

frequency response samples themselves, and we may term such methods “mPmn”), or parametric, i.e., fit to those points under some structural assumptions (“mPmp” methods). Classifying P + C methods is more difficult, and we do not delve into the details of this activity here. Suffice to say that some methods share, in some sense, the mPmp idea, in that the relay response samples (not necessarily, or not only, the Nyquist curve points) are used to identify a model of prespecified structure (we could use the “P + Cr” name here); other methods (termed here “P + Cs”) use synthetic information on the relay response shape, either to select a model structure and then fit its parameters to the data, or to choose among a set of possible tuning rules based on the identified point(s).

Given the panorama above, some implicit attempts can be foreseen to use a model-based tuning approach in the mPmp and P + Cs classes, although in both classes, the selection of the model parameters is invariantly disjointed from the regulator tuning (contrary to the methodology proposed herein). Therefore, our proposal is de facto a third class at the first level, in that identification is relay-based, but tuning is model-based, and there is, by definition, consistency between the two. A possible synthetic name for the so-initiated class of methods may be “Ri + Mt”. Now, it should be evident that choosing a meaningful counterpart to compare the new method to existing methods is neither easy nor obviously interpreted. In light of the

Ind. Eng. Chem. Res., Vol. 45, No. 12, 2006 4059

Figure 6. Results of two different relay-based tuning rules on process P1(s).

considerations above, the best choice is probably a mPmp method. Consider now the following processes that were presented in refs 20 and 21, respectively, as benchmark examples to test relay-based tuning rules. -s

P1(s) )

e (s + 1)2

P2(s) )

1 (s + 1)5

The proposed procedure is applied to P1(s) with the point at -90° and λ ) 0.4, yielding the PID regulator

(

Ra(s) ) 1.096 1 +

1 0.39s + 2.15s 1 + 0.156s

)

Here, this controller is compared with the following PID, tuned with the relay based approach presented in Mahji and Litz.20

(

Rb(s) ) 0.51 1 +

1 + 0.9836s 0.9836s

)

Figure 6 shows a comparison between the unitary step and load disturbance responses obtained with the two PIDs. It is apparent that, in this case, the proposed method achieves better performance (i.e., faster and smoother responses) than the one presented in Mahji and Litz.20 Now through the application of the proposed procedure to P2(s), again with the point at -90° and λ ) 2.5, yields the PID regulator

(

Ra(s) ) 1.05 1 +

1 2.27s + 11.66s 1 + 1.13s

)

or the PI regulator

These regulators are now compared with the following PI:

(

Rc(s) ) 0.52 1 +

1 7.8s

)

This PI is tuned with the relay-based approach presented in Wang et al.21 Figure 7 shows a comparison between the unitary step and load disturbance responses obtained with the three controllers Ra(s), Rb(s), and Rc(s). In this case, the results obtained with the proposed method can be considered as good as that obtained with the approach presented in Wang et al.21 In particular, the PID Ra(s) yields better results, whereas that of the PI Rb(s) is worse. It must be stressed however, that the proposed method, besides obtaining comparable results, provides also reasonable forecasts of the closed-loop system behavior (see the disturbance responses in Figure 7). At the end of this test, we can state the following: (1) The proposed method generally performs better than others, based on a single point (recall that also the proposed one tunes based on a single point). (2) For processes “well suited” for model-based tuning with FOPDT models, results are generally comparable, and often better, than other methods. (3) When the process is not suited for being represented by a FOPDT model in the band of interest, there may be (obviously) an advantage on the part of multiple-point methods. Note that this is a shortcoming of the model structure used, not of the approach: one could extend the proposal of this manuscript to more-complex models and/or more points. (4) In any case, the availability of a model allows sensible forecasts of the tuning results, possibly evidencing that the particular model structure chosen to apply the proposed approach is being trusted near its (unavoidable) applicability limits. 6. Two Laboratory Tests

(

Rb(s) ) 0.936 1 +

1 10.46s

)

6.1. Test 1. The PID procedure using the point at a phase angle of -90° was applied to a laboratory apparatus where two

4060

Ind. Eng. Chem. Res., Vol. 45, No. 12, 2006

Figure 7. Results of two different relay-based tuning rules on process P2(s).

Figure 8. Experimental transients in laboratory test 1.

transistors heat a metal plate, whose temperature is the controlled variable.22 One transistor is the control actuator, where the control signal is a percentage of its maximum power, whereas the other provides a load disturbance. The dynamics of the equipment used is quite good and representative of those found in typical process control applications. The procedure found a point with values of ωo ) 0.084 and A ) 0.019. The model and PID parameters obtained with λ values of 5 and 10 are given in Table 1, whereas the entire experiment is illustrated in Figure 8.

Table 1. Model and PID Parameters in Laboratory Test 1 λ

µM

TM

LM

K

Ti

Td

N

5 10

0.03 0.09

16.7 46.7

7.4 2.8

45.7 50.2

18.9 47.0

4.0 5.6

1.2 0.3

The two FOPDT models also allow us to estimate the phase margin, yielding values of 75.1° (λ ) 5) and 78.04° (λ ) 10), whereas a more-accurate estimate, with a higher-order model, gives values of 73.58° and 79.14°, respectively. Two facts are

Ind. Eng. Chem. Res., Vol. 45, No. 12, 2006 4061

Figure 9. Relay responses in laboratory test 2.

Figure 10. Experimental transients in laboratory test 2.

worth noticing. First, a simple model that is precise around the cutoff allows good estimates of the tuning results. Second, should the phase margin be the specification, a small variation of it would cause a significant modification of the obtained closed-loop transients. In synthesis, then, results are satisfactory, process upset is tolerable, and, above all, the design parameter’s action is clear and easy to interpret. 6.2. Test 2. This test is relative to a regulator structure that is more complex than the PID and uses laboratory equipment for rotational speed control in the presence of loosely damped dynamics yielded by a flexible transmission.23

The procedure described in section 4.1 found eight points with phases ranging from -90° to -180° and the approximating models

M(s) )

1062 s3 + 22.05s2 + 256.1s + 1361

(for nj ) 2)

M(s) )

1445 s + 20.96s + 324.8s + 1081

(for nj ) 4)

3

2

were determined to fit the points. The values found for λ are

4062

Ind. Eng. Chem. Res., Vol. 45, No. 12, 2006

0.03037 (nj ) 2) and 0.02323 (nj ) 4), giving rise to a nominal cut-off frequency of 8.165r/s and 10.675r/s, whereas the frequencies of the second and fourth points are 8.1641r/s and 10.6761r/s, respectively. (See Figures 9 and 10.) The value chosen for σ∞ is 1. The IMC procedure leads to the following complex regulators:

R(s) ) 1000

R(s) ) 1000

[ [

]

s3 + 22.05s2 + 256.1s + 1361 s(0.9s3 + 119s2 + 5880s + 129100) (for nj ) 2)

]

s3 + 21s2 + 325s + 1081 s(0.42s3 + 72.4s2 + 4678s + 134200) (for nj ) 4)

The model M(s) also allows us to estimate the phase margin, yielding a value of 68.6° (nj ) 2 and nj ) 4), whereas a moreaccurate model, based on an extensive identification procedure, gives values of 51.3° (nj ) 2) and 62.9° (nj ) 4). This example shows the general applicability of the proposed method, because good results are achieved in a completely different situation, with respect to the previous example, namely, in the presence of loosely damped dynamics, which is typical of mechanical systems. 7. Conclusions Some simple relationships between model- and relay-based proportional-integral-derivative (PID) tuning were investigated, deriving some proportional-integral (PI)/PID tuning methods for the purpose of coupling the advantages of modelbased methods to the simplicity and clarity of relay experiments. The rationale is that, by means of the relay experiment, the process model is made particularly precise in the band of interest for the regulator synthesis. The resulting tuning procedures are fast and reliable, requiring only a single relay test to find one point of the process Nyquist curve, introduce a very tolerable process upset, and are characterized by a single design parameter that is easy to understand, even for nonspecialists. Simulation examples and a laboratory test were reported, to demonstrate the effectiveness of the proposed approach (of which the presented procedures are just examples). Further research is being conducted for a deeper analysis of the relationships between model- and relay-based PID tuning, which appears as a promising framework to ease and clarify the use of existing synthesis methods, and to derive new ones. Moreover, the presented research could provide some aid to circumvent the problem of accounting for the particular identification method used in model-based tuning, allowing us to apply model-based methods in a context (the relay framework) where no ambiguity exists in the identification phase. This subject was not treated in depth, because of space limitations, but it appears to be very interesting and will be exploited in the future. Finally, research is underway to exploit the generality of the idea, whose validity per se is not limited to PI/PID regulators.

Literature Cited (1) Rivera, D. E.; Skogestad, S.; Morari, M. Internal model control 4: PID controller design. Ind. Eng. Chem. Process Des. DeV. 1986, 25, 252265. (2) Morari, M.; Zafiriou, E. Robust Process Control; Prentice Hall: Upper Saddle River, NJ, 1989. (3) Braatz, R. D. Internal model control. In The Control Handbook; Levine, S., Ed.; CRC Press: Boca Raton, FL, 1996; pp 215-224. (4) Brosilow, C.; Joseph, B. Techniques of Model Based Control; Prentice Hall PTR: Indianapolis, IN, 2002. (5) Leva, A.; Colombo, A. M. On the IMC-based synthesis of the feedback block of ISA-PID regulators. Trans. Inst. Meas. Control (London) 2004, 26 (5), 417-440. (6) O’Dwyer, A. Handbook of PI and PID Controller Tuning Rules; World Scientific Publishing: Singapore, 2003. (7) Gevers, M. Identification for control: from the early achievements to the revival of experimental design. Eur. J. Control 2005, 11 (4-5), 335352. (8) Hjalmarsson, H. From experiment design to closed-loop control. Automatica 2005, 41 (3), 393-438. (9) Leva, A.; Cox, C.; Ruano, A. Hands-on PID Autotuning: A Guide to Better Utilisation. IFAC Professional Brief, Oxford, U.K., 2002. (10) Yu, C. C. Autotuning of PID Controllers: Relay Feedback Approach; Springer-Verlag: London, 1999. (11) Leva, A.; Colombo, A. M. Implementation of a robust PID autotuner in a control design environment. Trans. Inst. Meas. Control (London) 2001, 23 (1), 1-20. (12) McCormack, A. S.; Godfrey, K. R. Rule-based autotuning based on frequency domain identification. IEEE Trans. Control Syst. Technol. 1998, 6 (1), 43-61. (13) Fox, P. D.; Godfrey, K. R. Multiharmonic perturbations for nonparametric autotuning. IEE Proc.: Control Theory Appl. 1999, 146 (1), 1-8. (14) Hang, C. C.; Åstro¨m, K. J.; Wang, Q. G. Relay feedback autotuning of process controllerssa tutorial review. J. Process Control 2002, 12, 143-162. (15) Shinskey, F. G. Process control: as taught vs as practiced. Ind. Eng. Chem. Res. 2002, 41 (16), 3745-3750. (16) Leva, A.; Schiavo, F. On the role of the process model in modelbased autotuning. In Proceedings of the 16th IFAC World Congress, Praha, Czech Republic, 2005 (DVD). (17) Åstro¨m, K. J.; Ha¨gglund, T. PID Controllers: Theory, Design and Tuning, Second Edition; Instrument Society of America: Research Triangle Park, NC, 1995. (18) Horn, C. C.; Arulandu, J. R.; Gombas, C. J.; VanAntwerp, J. G.; Braatz, R. D. Improved filter design in internal model control. Ind. Eng. Chem. Res. 1996, 35, 3437-3441. (19) Leva, A.; Colombo, A. M. Estimating model mismatch overbounds for the robust autotuning of industrial regulators. Automatica 2000, 36 (12), 1855-1861. (20) Majhi, S.; Litz, L. On-line tuning of PID controllers. In Proceedings of the American Control Conference, Denver, CO, 2003; pp 5003-5004. (21) Wang, Q.-G.; Hang, C.-C.; Bi, Q. A technique for frequency response identification from relay feedback. IEEE Trans. Control Syst. Technol. 1999, 7 (1), 122-128. (22) Leva, A. A hands-on experimental laboratory for undergraduate courses in automatic control. IEEE Trans. Educ. 2002, 46 (2), 263272. (23) Leva, A.; Schiavo, F. Low-cost flexible speed control experiments. In Proceedings of the 16th IFAC World Congress, Praha, Czech Republic, 2005 (DVD).

ReceiVed for reView November 25, 2005 ReVised manuscript receiVed March 27, 2006 Accepted March 29, 2006 IE051311R