Model Classification Applied to the Autotuning of ... - ACS Publications

tuning of industrial proportional−integral−derivative (PID) regulators, based on a ... from a simplified and normalized representation of its ...
0 downloads 0 Views 208KB Size
Ind. Eng. Chem. Res. 2004, 43, 6787-6796

6787

Model Classification Applied to the Autotuning of Industrial Proportional-Integral-Derivative Regulators Alberto Leva* and Luigi Piroddi† Dipartimento di Elettronica e Informazione, Politecnico di Milano, Via Ponzio 34/5, 20133 Milano, Italy

This paper presents a technique for the automatic tuning of industrial proportional-integralderivative (PID) regulators, based on a classifier that selects an appropriate model structure for the system to be controlled starting from a simplified and normalized representation of its unit step response. The PID tuning is then performed within the well-established framework of the internal model control approach, showing that structural information is particularly beneficial for model-based synthesis. Both simulations and a physical application, based on a laboratory thermal process, are reported. 1. Introduction Autotuning techniques for industrial regulators are normally based on some structural assumption on the process dynamics.6,27 In practical cases, these assumptions take into account only the type of regulator to be synthesized and generally lead to very simple and loworder models, thus allowing a straightforward model parametrization by means of standard estimation techniques and the adoption of simple rules for the regulator tuning. To achieve consistent tuning and a good performance, it is crucial that the simplified model be able to capture the dominant process dynamics7 and, in any case, the regulator synthesis rules need to be quite conservative with respect to the unavoidable processmodel mismatches.2,8 Hence, there is room for improving the quality of automatic tuning if structural information on the process model is collected, so that specialized rules can be used in the regulator synthesis.3 It is worth emphasizing that the need for case-specific tuning rules is widely acknowledged in the process control domain,29 and particularly in the chemical engineering community,5,31 where proportional-integral-derivative (PID) autotuners are frequently used. However, explicitly defining specialized tuning rules for each case of interest may prove too complicated and long a task: on the other hand, model-based techniques, such as the well-known internal model control (IMC) approach, can handle this automatically and within a unitary framework, provided that a robust model is available. In this respect, the process model identification phase is crucial, but as long as classical identification approaches are adopted, structural information on the process model can only be obtained at the cost of extensive numerical computations. In practice, a full set of models of various orders have to be parametrized, and the best one has to be selected a posteriori on the basis of some optimality criterion. Apart from the computational load required by such an approach, the control engineer should be aware of the weaknesses of classical identification methods in assessing the correctness of an identified model, a subject that is too frequently * To whom correspondence should be addressed. Tel.: +392-23993410. Fax: +39-2-23993412. E-mail: [email protected]. † E-mail: [email protected].

Figure 1. Introductory example.

overlooked in the literature. This is due to multiple factors: 1. Model accuracy is usually evaluated in terms of the predictive performance (possibly weighted with the model size), which can be extremely misleading if only a small data set is available for identification and data are poorly informative (e.g., step responses), as is invariably the case in the autotuning domain. 2. Only the number of poles and zeros is used in identification to distinguish between different models, while a more refined classification of the system dynamical properties is crucial for the control performance.23 To appreciate the importance of these two points, consider, for example, the following two systems:

G1(s) )

1 2.2s + 1 , G2(s) ) s + 1.3s + 1 (1.1s + 1)3 2

(1)

If one looks at their open-loop responses (see Figure 1, top) without bearing in mind the importance of dynamic characteristics, their similarity suggests that the systems too are similar and that, for example, G2(s) is a “reasonable” approximation of G1(s). If, on the other hand, one focuses on their dynamic features, the overshooting behavior of G2(s) is clearly distinguished from the oscillatory behavior of G1(s). This difference, though small from the identification standpoint, is of

10.1021/ie049827i CCC: $27.50 © 2004 American Chemical Society Published on Web 09/08/2004

6788

Ind. Eng. Chem. Res., Vol. 43, No. 21, 2004

significant momentum for the subsequent control design. In fact, a satisfactory controller for G2(s) may be far less adequate for G1(s), as shown in Figure 1 (bottom), where the regulator is

(

R(s) ) 2.5 1 +

1 1.4s

)

(2)

To summarize, this example shows that model identification for autotuning purposes should primarily assess the main dynamic characteristics of a system, such as oscillating, overshooting, minimum-phase behaviors, etc., prior to estimation. Though this is not necessary to yield a “good” model from a predictive identification perspective, it is, in fact, crucial for correct and robust control design. In this work, on the basis of the preliminary results reported in refs 19, 20, and 21, a new regulator synthesis approach is proposed, which aims at separating model structure selection from parameter estimation, so that only the chosen structure needs parametrizing. The former task is performed by means of a neural network (NN), which classifies the process to be controlled with respect to a set of possible model structures on the basis of step-response data. In the definition of the set of structures, particular attention has been paid to those model characteristics that are traditionally relevant for control design. That is, not only has the number of poles and zeros been considered but also the presence of overdamped rather than oscillating or non-minimum-phase dynamics, and so on: such a set of structures can be easily related to a set of step-response shapes, thus greatly simplifying the NN operation. In practice, the NN classifies the process unit step response with respect to a predefined set of shapes, each one corresponding to a model structure and, consequently, to a specialized tuning policy. Note that in the majority of the neural control literature11,25,28 NNs are used as controllers or parameter estimators; i.e., they are trained to a quantitatively defined behavior. Nonetheless, they are also a powerful tool for classification, as witnessed, e.g., by the survey paper.34 Exploiting this classification capability to ease controloriented identification is a promising research field. As for the tuning phase, an important peculiarity of this work is that, in the regulator synthesis, the selected process (model) structure is accounted for by adopting a tuning approach, namely, the IMC, that casts the problem within a unitary framework. This allows one to avoid structure-specific rules devised on a heuristic basis, resulting in better robustness. The technique is presented here with reference to the PID controller. However, by expansion and/or specialization of the set of model structures and tuning policies and thanks to the IMC approach, the technique can be extended to different regulators easily and on a systematic basis. In particular, notice that should the set of model structures be enlarged, the online computational load resulting from the adoption of the approach presented here would remain almost the same. Only the NN training would be affected, but as will be shown later, this takes place offline and, above all, does not require any process data. An evaluation of the proposed method cannot avoid some kind of confrontation with the autotuning techniques currently in use in the industrial context. Some analytical tests have been devised in order to demonstrate the performance achievements of the method with

Figure 2. Step-response filtering and normalization for the neural model structure selection.

respect to the popular fixed-structure IMC-PID autotuning approach.27 The results show that both techniques work fine if plants with simple structures are considered, whereas a noticeable performance loss is experienced by the IMC autotuner, in comparison to the proposed technique, when significant structural mismatches are present. The applicability of the method to real-life control problems is also assessed by means of a laboratory application to a thermal process. 2. Proposed Method The autotuning technique presented here operates in five steps: (1) step-response data collection, (2) model classification, (3) parameter estimation, (4) model validation, and (5) regulator synthesis. This work will mainly concentrate on phases 2 and 5 because standard methods for the other steps are available in the literature. 2.1. Model Classification. Consider in detail the main path of the control designer’s reasoning when analyzing a step-response record. First of all, he inspects the response and looks for some characteristic qualitative aspects such as overshoots or undershoots, oscillations, and so on. Then, he decides which of these aspects carries significant information on the system dynamics, flagging some of them as relevant for the following design steps and ignoring some others. In doing this, neither universal rules nor absolute thresholds exist; the process is almost entirely based on human intelligence and experience. Subsequently, the relevant response characteristics are turned into process model characteristics (e.g., an undershoot calls for a right-hand part zero, etc.), which, in turn, suggest a convenient regulator type and tuning method. The NN employed in this work has to emulate the first part of this process; its input is a simplified representation of the process step response, and its output consists of a proposed choice for the process model structure and a set of response features, which may be relevant to the designer. To obtain a simplified and normalized representation of the process step response, the step-response data record is first filtered with the discrete low-pass transfer function 0.5/(z - 0.5) to reduce the effects of measurement noise and then divided into Np chunks of equal length, where Np is the number of points to be extracted. For each chunk, the average is computed, obtaining a vector Y of Np values. These values are suitably normalized in amplitude, so that the steadystate value reached by the response is unity. This process is illustrated in Figure 2, where Np ) 64 (a typical choice).

Ind. Eng. Chem. Res., Vol. 43, No. 21, 2004 6789

The NN task is to classify the sequence Y within a convenient set of classes. Ideally, such model classes should guarantee a biunivocal mapping with controller classes, both being defined in terms not only of model structure but also of dynamic behaviorial characteristics (i.e., for example, a couple of overdamped poles is not the same as a couple of oscillating ones). The classification task has been divided into three sections. In the structured feature extraction (SFE) phase, vector Y is checked against the presence or absence of typical features relevant to the control design. Here only features whose significance is assessed by human experience have been considered: (i) F1: The step response appears to be of first-order. (ii) F2: The step response contains a time delay. (iii) F3: The step response presents an overshoot. (iv) F4: The step response is oscillatory. (v) F5: The step response presents an undershoot. The following phase is the nonstructured feature extraction (NFE), aimed at extracting other response features that are not visually evident or do not have an immediate interpretation but are useful for classifying the input patterns. This higher-order task is very important because the set of structured features might not contain all of the necessary information for a correct classification. The NFE is entirely left to the NN learning process. Finally comes the classification phase: the whole set of features is processed to provide a classification of the input patterns. A selection among a fixed set of model structures is performed. Note that the ultimate result of this phase need not be a unique response because the NN might have trouble in classifying patterns that either do not fit within the available structures or appear to be “hybrid”. In such cases, more than one model structure might be suggested to the user, so that different alternatives can be evaluated. In this work, the model structures indicated in the following have been considered:

C1: P1(s) )

µ 1 + sT

C2: P2(s) ) e-sτP1(s) C3: P3(s) )

µ (1 + sT1)(1 + sT2)

C4: P4(s) ) e-sτP3(s) C5: P5(s) )

µ(1 - sTz) (1 + sT1)(1 + sT2)

C6: P6(s) ) e-sτP5(s) C7: P7(s) )

µ(1 + sTz)

, Tz > T1, T2

(1 + sT1)(1 + sT2)

C8: P8(s) ) e-sτP7(s), Tz > T1, T2 C9: P9(s) )

µ 2ξs s2 1+ + 2 ωn ω n

-sτ

C10: P10(s) ) e

P9(s)

(3)

where all of the parameters are nonnegative and |ξ| < 1.

Figure 3. The classification NN.

All three tasks are performed by a single threelayered feedforward NN of the multilayer perceptron type with sigmoidal activation functions.9 The NN is organized as follows (see also Figure 3): the first layer has Nh1 + Nh2 neurons fully connected with the Np inputs, while the second layer is made of Nf1 neurons (Nf1 being the number of structured features) fully connected with the first Nh1 of the first layer and Nf2 neurons fully connected with the last Nh2 of the first layer (note that there would be Nh1Nf2 + Nh2Nf1 more weights in the full connection case); finally, the output layer has Nc neurons fully connected with the second layer, with Nc being the number of model classes. The SFE subnetwork is the two-layered fully connected feedforward network constituted by the first Nh1 neurons of the first layer and the first Nf1 neurons of the second layer. The sizing of the hidden layers has been done on the basis of a trial-and-error procedure. In the training phase, the SFE subnetwork is adapted first and the relative weights are kept fixed during the training of the compound network. Thus, the computational load of the training phase is split in two. Notice that the organization of the model classification task is consistent with standard pattern recognition methodologies: there are preprocessing, feature extraction, and classification phases.34 2.2. Training the Classification NN. To tune the classification NN, training patterns are prepared as follows. For each class Ci (i ) 1, ..., Nc), a number Nm,i of models is generated randomly and the exact step response is computed for each of them. From these responses, the simplified data sequences Yi,j (j ) 1, ..., Nm,i), of Np points each, are obtained. Then, for each sequence Yi,j, a vector Fi,j of Nf1 elements is prepared in order to train the SFE. Each element of this vector is +1 or -1, depending on the presence or absence of the corresponding feature. For each input sequence Yi,j, a vector Ci,j of Nc elements is prepared to provide the training signal for the compound network. This vector holds +1 at the ith position, while all other elements are set to -1. In so doing, Ntrain ) NcNm training patterns are obtained. Correspondingly, an “unseen” smaller set of Nval patterns is prepared for the validation phase. At this point, the error back-propagation method30 is employed to train the SFE with the Fi,j vectors as training signals. As explained, e.g., in ref 30, bad generalization behavior can stem from the use of oversized NNs or from overtraining. To avoid this, the process is stopped when 99% correct answers on the training set have been achieved, and no further training is applied to this subnetwork. In addition, a validation phase is carried out a posteriori, as shown in the following, to assess the network generalization capabilities.

6790

Ind. Eng. Chem. Res., Vol. 43, No. 21, 2004

Figure 6. Activation status of the NFE neuron N3.

Figure 4. Output of the structured feature extractor.

Figure 7. Generalization test for the compound network.

Figure 5. Classification results of the compound network.

After training the SFE, its weights are fixed, and the same method is employed to train the compound network; this time the training signals are the vectors Ci,j, and the process ends when 100% correct answers on the training set are achieved. Note that once the set of structures is defined, the previously mentioned stepresponse normalization allows the training to be performed without the need to collect process data; this is due to the fact that the NN only has to provide structural information. To illustrate the proposed training technique in detail, an example of its application is presented. For each class, 40 models have been generated randomly, and for each model, a simplified step-response representation composed of 25 points has been obtained. Because the generated step-response record covers the entire transient, 25 points correspond to five samples within the dominant time constant. Then, the SFE training was performed with Nh1 ) 15, leading to the results shown in Figure 4. In the figure, the horizontal axis holds the pattern number, with patterns being ordered by class from C1 to C10, while the vertical axis holds the network outputs in the range [-1, +1], i.e., its answers about the presence (1) or absence (-1) of each feature in each pattern. Notice that the network outputs are very close to the expected ones except for some models in class C2, which have posed problems to the SFE probably because of the fact that the simplified step-response description employed might not represent some of the structured features correctly. In the following phase, the compound network has been trained with Nh2 ) 5 and Nf2 ) 3, and the classification results obtained are depicted in Figure 5. Again, the horizontal axis carries the pattern number, with patterns being ordered by class from C1 to C10, and the vertical axis holds the classification answers, i.e., 10 signals in the range [-1, +1] indicating that a pattern belongs (1) or not (-1) to a class. As the figure shows, the compound network has enough information, by means of the nonstructured features, to overrule the incorrect results coming from the SFE; interestingly enough, this 100% correct result has been obtained with little additional training effort.

Note that the information provided by nonstructured features is actually necessary because a simple logical network would not be able to correct the SFE errors. To illustrate this, Figure 6 shows the activation status of the third neuron in the output layer of the NFE subnetwork, which is, in fact, used by the compound network to obtain the correct classification. The generalization capabilities of the network thus trained have been tested on a smaller training set, 10 patterns per class, prepared in the same way as the training set, with a 5% additive noise on the process output; the results of this test are shown in Figure 7. A 96% correct performance has been achieved on the validation set, which constitutes an acceptable result. An analysis of the improperly classified patterns shows that they are actually similar to the ones in the class erroneously proposed by the network. In detail, the C10 patterns classified as C9 had a small delay, while the C6 pattern classified as C4 had a minimal undershoot; finally, in the C4 pattern classified as C2, one of the time constants was significantly smaller than the other. Moreover, the NN classification capabilities have been tested with models that do not belong to the predefined set of structures to see if the structure it proposes from among the known ones can be an acceptable approximation of the real system. To this end, the following four model structures have been employed:

1 CA: PA(s) ) µ (1 + sT1)(1 + sT2)(1 + sT3) CB: PB(s) ) e-sτPA(s) 1 CC: PC(s) ) µ 2ξ 1 (1 + sT) 1 + s + 2s2 ωn ω

(

CD: PD(s) ) e-sτPC(s)

n

) (4)

For each of these structures, 20 patterns have been generated with the same parameter ranges used in the training and validation sets and with a 5% additive noise on the process output; the classification results obtained are shown in Figure 8.

Ind. Eng. Chem. Res., Vol. 43, No. 21, 2004 6791

a load disturbance, and a measurement noise, respectively, and y and yˆ are the true and nominal controlled variables. The feedback signal is y - yˆ , which motivates the method’s name in that the regulator (the gray blocks in Figure 9) contains a model of the process explicitly. The IMC regulator of Figure 9 is equivalent to a feedback regulator R(s) given by

R(s) )

F(s) Q(s) 1 - F(s) Q(s) M(s)

(5)

Figure 8. Classification of models outside the predefined set.

Figure 9. IMC control scheme.

The patterns coming from models with three real poles (types CA and CB) are approximated with one- or two-pole structures, depending on the relative positions of the singularities. On the other hand, oscillating patterns (types CC and CD) are reasonably classified in classes C9 and C10. The presence or absence of a delay is, in general, detected correctly, with the only exception being patterns of type CA, where a delay is usually assumed by the network in order to account for the initially flat response. On the whole, only one pattern (of type CA) is definitely misinterpreted, probably because of the effects of additive output noise; in all other cases, the structure chosen by the network can be considered to be a good approximation of the real one. 2.3. Parameter Estimation. Once the model structure is chosen, plenty of methods are available for selecting its parameters; the interested reader can refer to, e.g., refs 1, 13, and 17. Discussing this phase would be lengthy and would stray from the scope of this paper. Suffice to say that provided the selected model structure “fits the data”, the choice of the identification method is far less critical than it would be if the structure were fixed, regardless of the data. In this work, identification is done by simple least squares ISE (Integrated Squared Error) minimization, considering the model simulation (not prediction) error on the step response. If, on the other hand, all of the candidate model structures were identified and an a posteriori choice were made based on the classical prediction performance, overparametrized models would typically be selected, which do not necessarily guarantee an optimal simulation performance. In particular, especially in noisy cases or in the presence of spurious phenomena during identification, such models are not guaranteed to capture the control relevant dynamics and therefore are not particularly suited for tuning approaches where the model is contained in the regulator explicitly, as is the case with the IMC. 2.4. Regulator Synthesis. The IMC scheme, first proposed in ref 27, has found a number of successful applications. Its rationale is shown in the block diagram of Figure 9. Here P(s) is the transfer function of the process, M(s) is the model of the process obtained from input/ouput data, Q(s) and F(s) are two asymptotically stable transfer functions, y°, d, and n are the set point,

where Q(s) is chosen as an approximate inverse of the process model M(s) and F(s) is a low-pass filter aiming at a compromise between the performance and robustness.27 The IMC method, by itself, is in no sense connected to a specific regulator type. What is more, each model class Ci in eq 3 induces a specific regulator class via eq 5. In fact, not only can the scheme of Figure 9 be used whatever M(s) is, but if this is done, the most important part of the regulator is provided by the model directly. If the model is structurally good, the task of finding suitable Q(s) and F(s) is not difficult or critical if the guidelines devised in the following are adopted. 1. First, for the purpose of PID tuning, replace the possible delay of M(s) with its (1, 1) Pade´ approximation (1 - sτ/2)/(1 + sτ/2), which provides a rational process model MR(s). This is standard practice in IMC-based tuning27 and can be safely done provided that the requested control system’s bandwidth is not excessively wide, a precaution taken implicitly in the following steps. 2. Then, figure out the upper limit ωM of the band where the model represents the process “precisely enough” from the regulator synthesis standpoint. If the model structure fits experimental data, as in our context, a first-cut (yet reasonable and quite conservative) value for ωM is 4 times the maximum frequency of all of the poles and zeros of MR(s) if MR(s) is minimumphase or half of the lowest frequency of the right-hand part zeros of MR(s) in the opposite case. 3. Once ωM is determined, compute the inverse of the minimum-phase part of MR(s). If it is not proper, augment it with poles located above (say at twice) ωM. The number of these poles is chosen so that the result, i.e., Q(s), is of relative degree -1. 4. Carrying on, set F(s) to a first-order filter with a cutoff frequency below (say at 1/5 of) ωM. In so doing, the relative degree of Q(s) F(s) is zero, which is suitable for the subsequent approximation of the regulator with a real PID. Observe that, because the regulator must have integral action, it is required (see eq 5) that Q(0) F(0) M(0) ) 1, so choose the gain of F(s) accordingly [normally one is correct because there is no reason for Q(0) not to be the reciprocal of M(0)]. This leads to the “full” IMC regulator RIMC(s) in the form of eq 5, which in the general case is not a PID. 5. The (nominal) phase margin of the open-loop transfer function RIMC(s) M(s) (not RIMC(s) MR(s), notice) must now be checked to see if the design is reasonably stable and robust (45° is a suitable threshold value). It is also to be checked that the control system’s (nominal) cutoff frequency ω ˆ c, estimated with M(s), is below ωM. In the opposite case, the cutoff frequency of F(s) has to be reduced and RIMC(s) recomputed.

6792

Ind. Eng. Chem. Res., Vol. 43, No. 21, 2004

Figure 10. Qualitative Bode diagrams (top, magnitude; bottom, phase) of the IMC regulators.

6. The next step is to approximate RIMC(s) with a PID. In this work, we adopt the 1-degree-of-freedom ISA form of the PID control law, i.e.,

(

RPID(s) ) K 1 +

sTd 1 + sTi 1 + sTd/N

)

(6)

This approximation is briefly discussed below. 7. Finally, the phase margin of the open-loop transfer function RPID(s) M(s) is checked. If it is too low, the IMC and then the PID regulators are recomputed, decreasing the cutoff frequency of F(s), because the performance achieved with the “full” IMC cannot be preserved with the PID approximation. The key point of the proposed procedure is that, in all of the cases (i.e., model classes) considered, RIMC(s) can be approximated well enough with a PID.15 For this approximation, an ad hoc numerical procedure is em-

ployed. The rationale is to preserve the low- and highfrequency aspects of the regulator’s frequency response and the mid-frequency phase lead (when required) while keeping the regulator zeros’ damping over a given value (typically 0.6) when they turn out to be complex. To convince the reader that this task is neither difficult nor critical, Figure 10 reports the qualitative Bode diagrams of the “full” IMC regulators in all of the cases that may arise with the set of model classes adopted. Numerical details are omitted here for brevity. Note that, although the structure of RIMC(s) depends on that of M(s) and although the frequency distribution of the model error is correspondingly heterogeneous,24 all of the possible shapes of its Bode diagrams are compatible with the PID structure. As a final remark, notice that the IMC approach is particularly sensitive to model error, and the actual significance (not to say the interpretability) of its design

Ind. Eng. Chem. Res., Vol. 43, No. 21, 2004 6793

Figure 12. IMC regulator and PID approximation.

Figure 11. Identification and tuning results (proposed method versus FOPDT-based IMC-PID).

parameter (the time constant λ of the first order, unit gain filter F(s), see refs 27 and 29) also depends on the structural model fidelity, as acknowledged by several works such as ref 10. This strongly motivates a robust identification approach like the proposed one. 3. Simulation Example on PID Tuning In this example, the process is described by the transfer function

P(s) )

1 0.25 1 2 (1 + 2s) 1 + 2 s+ s 0.5 0.25

(

)

Figure 13. PID approximation of the IMC regulator.

(7)

that does not belong to any of the model classes C1C10. The apparent oscillatory behavior of its step response causes the selection of a model of class C9, which is then parametrized as

M9(s) )

1 1 + 2s + 4.94s2

(8)

The proposed tuning method is then employed, taking

Q(s) F(s) )

1 + 2s + 4.94s2 (1 + 0.5s)(1 + 5s)

(9)

and leading, by means of the proposed PID approximation, to the regulator

R(s) ) 0.2

1 + 2.7s + 4.9s2 s(1 + 0.8s)

(10)

where the zeros’ damping is limited to 0.6. A model of class C2 can also be identified to compare the proposed method with standard IMC-PID tuning based on firstorder plus dead time (FOPDT) models. Because LS ISE minimization is inadequate with such a low damping, a modified version of the method of areas is employed, and the parametrized model turns out to be

M2(s) )

e-0.2s 1 + 5.5s

(11)

In Figure 11, the “full” IMC regulator is compared with the IMC-PID obtained from model (11) with λ ) 1.5(τ + T) and λ ) 3(τ + T). Recall that in the IMCPID method27 λ is interpreted as the desired dominant closed-loop time constant. Figure 11, left column, reports

the identification results with a FOPDT model and with the second-order (SO) model selected by the NN; Figure 11, right column, shows the performances of the proposed method and those of the FOPDT-based IMC-PID; both are evaluated with the (nominal) model and with the real process. Notice how, in the IMC-PID method, the model mismatch makes the choice of λ really critical. In fact, there is a quantifiable relationship between the model error magnitude and the minimum value of λ that stabilizes the real system with a PID tuned on the (nominal) model; this is investigated in detail in ref 16. It is also important to observe that the model mismatch adversely affects the a priori evaluation of the control behavior in the IMC-PID case, while with the IMC regulator (which uses a structurally correct model), the tuning results can be evaluated more consistently. To back up the statement that the “full” IMC regulator can be approximated with a PID effectively in all of the model classes considered, and more in general whenever the process (and model) structure is suited enough for a PID, Figure 12 reports the results obtained with the regulator (10). In the cases considered, the IMC regulator magnitude may have one of the two aspects of Figure 13. To obtain the PID regulator, the magnitude of the frequency response of the IMC regulator is computed, the presence or absence of the peak is checked, and 20 points are selected, as shown in Figure 13. Then, the frequency response magnitude of a real PID is fit to these points with a procedure very similar to the Matlab “invfreqs” command, with the constraint that the second PID pole and its zeros be in the left half plane. Several alternative procedures can be found in the literature for this purpose; see, e.g., refs 4, 22, 26, 32, and 35. Some were tested, with results similar to those

6794

Ind. Eng. Chem. Res., Vol. 43, No. 21, 2004

Figure 16. Closed-loop experimental results.

Figure 14. Experimental apparatus.

leads to the approximating PID regulator

(

R1(s) ) 85 1 +

1 0.6s + 35s 1 + 0.3s

)

(15)

In Figure 15c, this PID is compared to one tuned with the IMC-PID rules,27 requesting a closed-loop dominant time constant (λ in ref 27) of 10 s, i.e.,

(

R2(s) ) 100 1 +

Figure 15. Open-loop experiment and tuning.

of the simple one proposed. This corroborates the idea that the structural model improvement makes also the PID approximation not particularly critical. 4. Physical Application To show the effectiveness of the proposed method, we now present an experimental application in a case where model structure selection is relevant. The experimental setup is a temperature control system,14 in which a metal plate is connected to two electric heaters. One heater is the control actuator, the other provides a load disturbance, and a fan is available for cooling. The controlled variable is the plate temperature. The experimental apparatus is depicted in Figure 14. Figure 15a shows an open-loop step experiment and two identified models: one is of the class selected by the method (C6) and the other has a FOPDT structure (i.e., it is of class C2). The parametrized models are

M6(s) )

2.12(1 + 85s)e-1.8s (1 + 165s)(1 + 35s)

(12)

2.12e-2.5s 1 + 125s

(13)

M2(s) )

Figure 15b shows the tuning results of the proposed method. Taking

Q(s) F(s) )

(1 + 165s)(1 + 35s) 2.12(1 + 85s)(1 + 0.9s)

(14)

1 s + 126s 1 + 1.2s

)

(16)

Finally, Figure 16 reports the experimental closedloop transients obtained with the proposed method (R1) and the IMC-PID rules with the FOPDT model (R2). Note that the FOPDT model has a small delay and a large time constant. With the IMC approach, this means that the integral time equals that time constant. In the case at hand, this causes an apparent lack of integral action on the part of R2, and the fact is structural because no sensible identification algorithm for FOPDT models, starting from the measured step response of Figure 15a, would ever produce a time constant of less than 100 s or so. Conversely, the structure-conscious tuning of R1 overcomes the problem. The integral time is one-third of that of R1, and the transients of Figure 16 are self-explanatory. 5. Implementation Issues and Possible Extensions After presentation of the proposed method and a possible tuning procedure based on it, it is useful to spend some time on the major implementation-related issues that may arise and on some future developments of the research. In the first place, it is not always possible to obtain a “good” step-response record, either because of spurious phenomena or because the process cannot undergo abrupt variations of the control signal. In the former case, one must honestly admit that no identification tool can be made totally robust in the presence of erratic data. There exists a vast literature on input/output data evaluation, outlier detection and removal, and so forth: from this point of view, the presented technique has neither advantages nor disadvantages with respect to any method based on “bump tests” (an interesting industrial reference is, e.g., the Control Loop Assistant Tuning Software of Lambda Controls).12 In the latter case, there are several ways to obtain a step-response record without actually applying a step

Ind. Eng. Chem. Res., Vol. 43, No. 21, 2004 6795

to the process. Some works, e.g., ref 18, propose the use of a relay test, and it is simple to extend those methods to the use of a relay with a cascaded integrator, therefore applying ramp and not step control variations: a complete discussion on the possibility of relay tests can be found in ref 33. Therefore, the use of the step response is not a limitation in practice. Besides, the model classification is not restrained to use the step response; it could be based on different responses, chosen so as to produce an acceptable process upset. In fact, the proposed classification method can detect the relevant dynamic features of the process as long as the response used does convey that information, no matter whether the information is visible to the human. This is a very important possibility inherent in the presented research, which will be exploited in future works. Another possible extension is a customizable selection of the IMC filter F(s): in the proposed procedure, a firstorder filter has been adopted for simplicity, but the IMC method is in no sense tied to a specific form of F(s), and the PID approximation is done on a numerical basis. If desired, one could apply different filter choices, like, e.g., those proposed in ref 10. Finally, one may be concerned with the potential complexity of the proposed method. In this respect, it must be noticed that the principles behind several industrial autotuners are equally or more complex than those of the one proposed (a short review is available in ref 17). Also, in the proposed method, complexity is mostly relegated to the NN training, which is performed offline, without the need for real process data and before the autotuner is released to the user. In other words, the end user of the presented method does not need any knowledge on the classification NN: the weights are fixed from his/her point of view, and therefore using the proposed method is not different from using any other one with prespecified tuning rules. 6. Concluding Remarks A simple technique for the automatic tuning of classical regulators has been presented, whose key feature is the presence of a structural identification capability. This is offered by a neural pattern classifier, which selects an appropriate model structure for the system to be controlled, starting from a simplified representation of its unit step response. The classification task is performed in two steps: first some significant features of the response are recognized, and then the process is classified within a convenient set of possible model structures. The proposed structural identification method leads to satisfactory classification and generalization results if the process under question falls into the predefined set of model structures. Notice that a simple and general-purpose training algorithm is employed and the training is done offline. The resulting network appears also to cope with systems that do not belong to the training set, choosing a reasonable approximation of the real system from among the known model structures. Once a model structure has been chosen, parameters can be estimated by means of any conventional identification algorithm. The availability of structural knowledge significantly reduces the need for model validation checks and, furthermore, allows for a corresponding selection of regulator classes. As such, because it can be expected that the mismatches between the model and

the real process will be reduced by the adoption of an objectively chosen model structure, tuning rules may be less conservative than usual and aim at better control performances. The proposed method has been illustrated with reference to the PID regulator. However, the tuning is done by means of an approach (the IMC) that allows one to extend both the set of model classes and that of regulator classes, maintaining between the two sets a well-defined correspondence. Therefore, the proposed method can easily be extended to other control structures on a rigorous basis. Literature Cited (1) Åstro¨m, K. J.; Ha¨gglund, T. PID controllers: theory, design and tuning, 2nd ed.; Instrument Society of America: Research Triangle Park, NC, 1988. (2) Åstro¨m, K. J.; Ha¨gglund, T. Industrial adaptive controllers based on frequency response techniques. Automatica 1991, 27 (4), 599-609. (3) Åstro¨m, K. J.; Hang, C. C.; Persson, P.; Ho, W. K. Towards intelligent PID control. Automatica 1992, 28 (1), 1-9. (4) Chen, J. C.; Zhou, K.; Chang, B. C. Closed-loop controller reduction by a structured truncation approach. Proceedings of the 33rd CDC, Lake Buena Vista, FL, 1994. (5) Chien, I. L.; Chung, Y. C.; Chen, B. S.; Chuang, C. Y. Simple PID controller tuning method for processes with inverse response plus dead time or large overshoot response plus dead time. Ind. Eng. Chem. Res. 2003, 42 (20), 4461-4477. (6) Doyle, J. C.; Francis, B. A.; Tannenbaum, A. R. Feedback Control Theory; Macmillan: Basingstoke, U.K., 1992. (7) Goodwin, G. C.; Sin, K. S. Adaptive Filtering, Prediction and Control; Prentice Hall: Englewood Cliffs, NJ, 1984. (8) Hang, C. C.; Åstro¨m, K. J.; Ho, W. K. Refinements of the Ziegler-Nichols tuning formula. IEE Proc.-D: Control Theory Appl. 1991, 138 (2), 111-118. (9) Hertz, J.; Krogh, A.; Palmer, R. J. Introduction to the Theory of Neural Computation; Addison-Wesley: Reading, MA, 1991. (10) Horn, I. G.; 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. (11) Hunt, K. J.; Sbarbaro, D.; Zbinowski, R.; Gawthrop, P. J. Neural networks for control systemssa survey. Automatica 1992, 28 (6), 1083-1112. (12) Lambda Controls home page, www.lambdacontrols.com. (13) Leva, A. Model-based tuning: the very basics and some useful techniques. Journal A 2001, 42 (3), special issue on controller tuning, 14-22. (14) Leva, A. A Hands-On Experimental Laboratory for Undergraduate Courses in Automatic Control. IEEE Trans. Educ. 2003, 46 (2), 263-272. (15) Leva, A. Improving performance and robustness in the IMC-PID tuning method. Proceedings of the 4th IFAC Symposium on Robust Control Design ROCOND 2003, Milano, Italy, 2003. (16) Leva, A.; Colombo, A. M. Estimating Model Mismatch Overbounds for the Robust Autotuning of Industrial Regulators. Automatica 2000, 36, 1855-1861. (17) Leva, A.; Cox, C.; Ruano, A. Hands-on PID autotuning: a guide to better utilisation; IFAC Professional Brief; IFAC: Oxford, U.K., 2002. (18) Leva, A.; Lovera, M. Estimating the step response of an unknown SISO process on the basis of a relay experiment. Proceedings of the MCEA ‘98 Conference, Marrakesh, 1998; pp 458-463. (19) Leva, A.; Piroddi, L. A neural network-based technique for structural identification of SISO systems. Proceedings of the IMTC ‘94 Conference, Hamamatsu, Japan, 1994; pp 135-138. (20) Leva, A.; Piroddi, L. Model-specific autotuning of classical regulators: a neural approach to structural identification. Control Eng. Pract. 1996, 4 (10), 1381-1391. (21) Leva, A.; Piroddi, L. Model-based PID autotuning enhanced by neural structural identification. Proceedings of ACC 2004, Boston, 2004.

6796

Ind. Eng. Chem. Res., Vol. 43, No. 21, 2004

(22) Liu, Y.; Anderson, B. D. O. Controller reduction via stable factorization and balancing. Int. J. Control 1986, 44, 507-531. (23) Ljung, L. System identificationsTheory for the user, 2nd ed.; Prentice Hall: Englewood Cliffs, NJ, 1999. (24) Maffezzoni, C.; Rocco, P. Robust tuning of PID rgulators based on step response identification. Eur. J. Control 1997, 3, 125136. (25) Miller, W. T.; Sutton, R. S.; Werbos, P. J. Neural Networks for Control; MIT Press: Cambridge, MA, 1990. (26) Moore, J. B.; Telford, A. J.; Ly, U. Controller reduction methods maintaining performance and robustness. Proceedings of the 27th CDC, Austin, TX, 1988. (27) Morari, M.; Zafiriou, E. Robust Process Control; Prentice Hall: Englewood Cliffs, NJ, 1989. (28) Narendra, K. S.; Parthasarathy, K. Identification and control of dynamical systems using neural networks. IEEE Trans. Neural Networks 1990, 1 (1), 4-27. (29) O’Dwyer, A. Handbook of PI and PID controller tuning rules; World Scientific Publishing: Singapore, 2003. (30) Rumelhart, D. E.; Hinton, G. E.; Williams, R. J. Learning internal representations by error propagation. In PDP: Explora-

tions in the Microstructures of Cognition; Rumelhart, D. E., McClellan, J. L., Eds.; MIT Press: Cambridge, MA, 1986. (31) Tang, W.; Shi, S. J.; Wang, M. X. Autotuning PID control for large time-delay processes and its application to paper basis weight control. Ind. Eng. Chem. Res. 2002, 41 (17), 4318-4327. (32) Wang, G.; Sreeram, V. A method to realize performance preserving controller reduction. Proceedings of ACC 2000, Chicago, 2000. (33) Yu, C. C. Autotuning of PID controllers: relay feedback approach; Springer-Verlag: London, 1999. (34) Zhang, G. P. Neural networks for classification: a survey. IEEE Trans. Syst., Man CyberneticssPart C 2000, 30 (4), 451462. (35) Zhou, K.; D’Souza, C.; Cloutier, J. R. Structurally balanced controller order reduction with guaranteed closed loop performance. Syst. Control Lett. 1995, 24, 235-242.

Received for review March 2, 2004 Revised manuscript received July 21, 2004 Accepted July 28, 2004 IE049827I