Monitoring and diagnosing process control ... - ACS Publications

warped time measured from the beginning of a cut. 6k = duration of cut k. Literature Cited. Al-Tuwaim, M. S.; Luyben, W. L. Multicomponent Batch Disti...
0 downloads 0 Views 2MB Size
Znd. Eng. Chem. Res. 1993,32, 301-314 6 = warped time measured from the beginning of a cut bk = duration of cut k

Literature Cited Al-Tuwaim, M. S.; Luyben, W. L. Multicomponent Batch Distillation. 3. Shortcut Design of Batch Distillation Columns. Ind. Eng. Chem. Res. 1991,30,507-516. Anderson, N. J.; Doherty, M. F. An Approximate Model for Binary, Azeotropic Distillation Design. Chem. Eng. Sci. 1984,39,11-16. Bernot, C. Design and Synthesis of Multicomponent Batch Distillation. Ph.D. Dissertation, Chemical Engineering Department, University of Massachusetts at Amherst, 1990. Bernot, C.; Doherty, M. F.; Malone, M. F. Patterns of Composition Change in Multicomponent Batch Distillation. Chem. Eng. Sci. 1990,45,1207-1221. Bernot, C.; Doherty, M. F.; Malone, M. F. Feasibility and Separation Sequencing in Multicomponent Batch Distillation. Chem. Eng. Sci. 1991,46,1311-1326. Christensen, F. M.; Jorgensen, S. B. Optimal Control of Binary Batch Distillation With Recycled Waste Cut. Chem. Eng. J. 1987, 34,57434. Diwekar, U. M. An Efficient Design Method for Binary, Azeotropic Batch Distillation Columns. AIChE J. 1991,37, 1571-1578. Diwekar, U. M.; Madhavan, K. P. Multicomponent Batch Distillation Column Design. Ind. Eng. Chem. Res. 1991,30, 713-721. Diwekar, U. M.; Malik, R. K.; Madhavan, K. P. Optimal Reflux Rate Policy Determination for Multicomponent Batch Distillation Columns. Comput. Chem. Eng. 1987,11,629-637. Diwekar, U. M.; Madhavan, K. P.; Swaney, R. E. Optimization of Multicomponent Batch Distillation Columns. Ind. Eng. Chern. Res. 1989,28,1011-1017. Douglas, J. M. Conceptual Design of Chemical Processes; McGrawHill: New York, 1988;Chapter 2. Farhat, S.; Czernicki, M.; Pibouleau, L.; Domenech, S. Optimization of Multiple-Fraction Batch Distillation by Nonlinear Programming. AIChE J . 1990,36,1349-1360. Hansen, T.T.; Jorgensen, S. B. Optimal Control of Binary Batch Distillation in Tray or Packed Columns, Chem. Eng. J. 1986,33, 151-155.

301

Julka, V.; Doherty, M. F. Geometric Behavior and Minimum Flows for Nonideal Multicomponent Distillation. Chem. Ena. - Sci. 1990. 45, 1801-1822. Kim, Y. S. Optimal Control of Time-Dependent Processes. Ph.D. Thesis. Chemical Eneineering-DeDartment. Universitv of Maasa. chusetts at Amherst: 1985. King, C. J. Separation Processes; McGraw-Hill: New York, 1980; pp 417-423. Kolber, M. J.; Anderson, T. F. Design of Batch Distillation by Interactive Simulation on Microcomputer. Presented at the AIChE Annual Meeting, New York, NY, 1987;paper 92c. Logsdon, J. S.;Diwekar, U. M.; Biegler, L. T. On the Simultaneous Optimal Design and Operation of Batch Distillation Columns. Presented at the AIChE Annual Meeting, San Francisco, CA, 1989;paper 27b. Luyben, W. L. Multicomponent Batch Distillation. 1. Ternary Systems with Slop Recycle. Ind. Eng. Chem. Res. 1988, 27, 642-647. Quintero-Marmol, E.; Luyben, W. L. Multicomponent Batch Distillation. 2. Comparison of Alternative Slop Handling and Operating Strategies. Ind. Eng. Chem. Res. 1990,29,1915-1921. Rippin, D. W. T. Simulation of Single- and Multiproduct Batch Chemical Plants for Optimal Design and Operation. Comput. Chem. Eng. 1983,7, 137-156. Robinson, E. R. The Optimisation of Batch Distillation Operations. Chem. Eng. Sci. 1969,24,1661-1668. Robinson, E. R. Optimal Reflux Policies for Batch Distillation. Chem. Process Eng. 1971,52,47-49and 55. Underwood, A. J. V. Fractional Distillation of Ternary Mixtures. Part 11. J. Znst. Pet. 19468,32,598-613. Underwood, A. J. V. Fractional Distillation of Multicomponent Mixtures-Calculation of Minimum Reflux Ratio. J. Znst. Pet. 1946b,32,614426. Underwood, A. J. V. Fractional Distillation of Multicomponent Mixtures. Chem. Eng. Prog. 1948,44,603-614. Wu, W.-H.; Chiou, T.-N. Determination of Feasible Reflux Ratios and Minimum Number of Plates Required in Multicomponent Batch Distillation. Ind. Eng. Chem. Res. 1989,28, 1862-1867. Received for reuiew October 30, 1992 Accepted November 12, 1992

Monitoring and Diagnosing Process Control Performance: The Single-Loop Case Nives Stanfelj, Thomas

E. Marlin,* a n d J o h n F. MacGregor

Chemical Engineering Department, McMaster University, Hamilton, Ontario, Canada L8S 4L7

This paper presents a hierarchical method for monitoring and diagnosing the performance of single-loop control systems based primarily on typical operating plant data. It (1)identifies significant deviations from control objectives, (2) determines the best achievable performance with the current control structure, and (3) identifies steps to improve the current performance. Within the last point, the method can isolate whether poor performance is due to the feedforward loop or the feedback loop. If in the feedback loop, it is sometimes possible to determine whether the cause of poor performance is plant/model mismatch or poor tuning. The methods are based on simple but rigorous statistical analysis of plant time series data using autocorrelation and cross correlation functions. The theoretical basis of the method is developed, and it is applied to simulation studies which clarify the principles. Then, results of studies on two industrial processes are reported. The first is a heat exchanger feedback temperature controller, and the second is a feedforward-feedback tray temperature controller in a 50-tray distillation column. The initial diagnosis and subsequent control performance improvements are reported for both cases. The process industries make wide use of automatic process control to achieve objectives from safety to optimization. Every plant has many control loops operating in automatic; the number of control loops varies from the low lo's in small, simple processes to over 1000 in large integrated planta. Due to this high degree of automation, succedul plant operation depends on the proper operation of the control strategies.

Currently, only overall measures of process and control performance are monitored. The most commonly used measure of performance is the variance on standard deviation of key process variables. If the control strategies do not work well, the standard deviations can be very large. The reason that the standard deviation is used for monitoring is ita direct relationship to process performance and profit (Bozenhardt and Dybeck, 1986;Marlin et al., 1987;

Oaaa-5sa5/93/2632-03Q1~04.00/00 1993 American Chemical Society

302 Ind. Eng. Chem. Res., Vol. 32, No. 2, 1993 0.2

,

NORMALOPERATING DATA

,3

I---, MONITORING

Ipmu_ POSSIBLE?

/CHIHGE] -0.7

4 0

I

20

I

40

60

80

100

120

140

160

c-1.5 180 200

STRUCTURE

Time

‘CONTROL

Figure 1. Closed-loop data for input (v) and output (Y) for simulated case.

PROCESS

Stanton, 1990;Stout and Kline, 1976). However, many of the performance measures like standard deviation do not provide information that can be used to diagnose control loop performance. Some of the most important process diagnostic questions which are not addressed are the following: 1. What is the best achievable performance? 2. Is the current control system achieving the best performance? 3. If not, what steps would improve the performance? This paper addresses these three key questions by presenting simple, yet powerful, diagnostic methods which complement the existing monitoring methods. To be practical, monitoring and diagnostic methods must be tailored to the needs of industrial plants. Since most plants have at least hundreds of control loops to monitor, the methods in this paper are designed to require little initial engineering effort. Thus, all loops would be monitored and only those not performing adequately, as will be defined, would be evaluated further. In addition, the methods make use of mainly typical operating data, with only limited need for disruptive plant experimentation. Assessing process control performance is normally presented with respect to the response of a system to a step disturbance in set point or load upset variable. Performance is defined by measures such as integral of the absolute maximum deviation, and decay value of the error (ME), ratio (Smith and Corripio, 1985). This is a simple and useful method when experiments or set point changes can be made periodically on each control loop. However, continuously operating processes produce data like those shown in Figure 1. The plant is subject to numerous small and large unmeasured disturbances which cause the typical variations in the controlled and manipulated variables. The challenge is to develop a simple method for diagnosing this type of data. Since most current industrial control strategies are implemented with digital control equipment, the methods in this paper are developed for digital systems. Surprisingly little has been published in the area of control performance monitoring in the process industries. Pryor (1982)discusses some aspects of how autocorrelations and power spectra can be used to analyze paper machine dynamic data. Also, Stanton (1984)discusses how dynamic data can be used to investigate the performance of existing control systems and to design improvements. Notable is the work of Harris (1989),who develops a technique for determining the best possible control performance for a single-loop controller. Harris’s results are used as part of the methodology presented in this paper.

MODELLING TUNING

Figure 2. Monitoring and diagnostic flowchart for feedback system.

Finally, it is worth noting that several of the ideas in this paper have been taught in industrial short courses and been applied successfully to industrial cases (MacGregor and Taylor, 1990;Bialkowski, 1990). The paper is organized as follows. The importance of using a hierarchical approach is discussed, some necessary background on time series analysis and stochastic control is presented, and the methods used at each level of the hierarchical approach are developed. Finally, several examples of feedback and feedforward-feedback systems are presented. The examples in the paper cover both simulation studies and industrial applications. The simulation studies are helpful because the actual process which underlies the data is known; thus, the results of the diagnostics can be verified. Industrial studies were performed with the support and assistance of Shell Canada on several units in a petroleum refinery. This opportunity enabled us to apply the method to plant units experiencing typical disturbances and signal noise and to evaluate the analyses by altering the plant control strategies and verifying the diagnostic interpretations. A Hierarchical Diagnostic Method The method in Figure 2 is designed to be hierarchical in nature, to establish the best possible performance with the existing equipment and to suggest steps for improvements. The top level is the existing performance monitoring. This monitoring level could be based on analysis of standard deviations or on other measures such as frequency of constraint violations, amount of off-specificaton product, and safety valve openings. Clearly, the variables monitored and their threshold values must be tailored to each control system. An important aspect of the entire approach is this top level which eliminates most of the control loops from consideration at any time. It is not necessary to further diagnoee a process and controller when its performance. is satisfactory with respect to safety, process equipment service factor, product quality, and plant profit. Only those control loops which offer potential benefit are considered in the subsequent diagnostic steps. The second level applies a “performance boundn assessment to compare the current control performance to the best possible performance for the existing plant and control equipment. In addition, the theoretical improvement which could be obtained by enhancing the control performance from the current to the best possible is quantified. The calculations at this level use routine process data and are independent of the control algorithm used when the data were collected. This bound on achievable performance is very useful in determining

Ind. Eng. Chem. Res., Vol. 32, No. 2, 1993 303 whether the unacceptable performance identified at the first level can be eliminated by improved control. If significant improvement is shown to be poesible within the framework of the existing control structure, further diagnosis of the control performance can be undertaken with the objective of identifying corrective steps. At this third level, the dynamic data from the plant are analyzed to determine why the current control system deviates from very good performance. The reasons for poor control in a feedforward-feedback strategy, e.g., poor models or improper tuning, can be located in either or both of the feedback and feedforward loops. The diagnostic methods at this stage can often isolate the source of and reason for poor performances and allow the engineer to make improvements to the control system. If the second, assessment level indicates that the desired control performance is not possible with the current process and control structure, more substantial changes to improve control system performance are required. One change might be to alter the feedback dynamics, reducing the dead time by changing the process flow, e.g., adding a bypass, or changing the sensor location. Another change might be to reduce the disturbance magnitude by introducing (expensive) inventory between units. Another possible change would be to improve a single-loop control structure by adding feedforward or cascade control. In the next few sections of this paper, the principles and calculations used in levels two and three of the procedure in Figure 2 are presented. Since they are based on wellestablished techniques for analyzing stochastic systems, some background on such systems is included. The reader unfamiliar with this topic should refer to the Appendix and may want to refer to one of the standard references in the area, for example, Box and Jenkins (19761, Cryor (1986), or Astrom (1970).

Minimum Variance Control: A Bound on Achievable Control Performance Minimum variance control is the best possible control in the sense that no controller can have a lower variance. Its implementation may not be desirable in practice because it may call for excessively aggressive control and may lack robustness to model errors. However, it provides a convenient bound on achievable performance against which the performance of other controllers can be compared. Such a basis is especially important in deciding corrective steps. For instance, if the current performance were inadequate but were close to the minimum variance, corrective steps would have to be directed toward structural changes to the controller or the process. On the other hand, if the variance under the current control were substantially greater than the calculated minimum, corrective steps could be directed toward improving the controller performance with the current structure. The basic ideas of minimum variance control essential for this paper are now developed with reference to the control block diagram in Figure 3a, which represents a system which can be modelled by a linear transfer function with additive noise. The controlled variable is given by (1) yt = Yp,t + Dt G,,(Z-l)Ut-f-l+ D, (2) where f is the number of whole periods of process delay, GP(z-l)z-f-lis the discrete process transfer function, and D, is the disturbance in the output at time t . This disturbance D, represents the net effect on the output of all sources of upset occurring anywhere in the system (e.g., feed rates, feed compositions, temperatures) and deter-

&I Dt

Ut

. QP p l

w yt

I Figure 3. (a, top) Block diagram of feedback system, classical structure. (b, bottom) Block diagram of feedback system, IMC structure.

mines the behavior of the output variable without control. In situations where some disturbances are measured and used in feedforward control, D, represents the effects of all unmeasured disturbances. We consider the common situation in which disturbances of a stochastic nature are continually affecting the process. As an example, the simulated data in Figure 1 are the result of a control system responding to a stochastic disturbance; similar data from industrial plants will be presented later in the paper. The analysis methods described in this paper are applicable to stationary stochastic variables, i.e., variables whose statistical properties, such as the mean, do not change with time. Since many variables are subject to nonstationary disturbances, their means are not stationary; however, most such variables can be transformed into stationary variables by using the difference, V Yt = Y, Yt-l,in place of the variable Yt in the analysis. This transformation is performed throughout the paper where appropriate. Models of stochastic disturbances can usually be well represented as linear functions of past values of a statistically independent random variable, a,, that is, as D,= * ( f 1 ) u t = a, + + $2a,-2+ (3)

...

where the parameters $j can be identified from plant data. All variables in the linear models are expressed as deviations from steady state, and the random shocks (a,) have a zero mean and variance goa2.A more compact representation of the stochastic model in eq 3 is given by a transfer function of the form given below (Box and Jenkins, 1976; Ljung, 1987). (4)

The at's can be thought of as random shocks that enter the system. Their effects on the process is given by the

304 Ind. Eng. Chem. Res., Vol. 32, No. 2, 1993

transfer function in eq 4. By comparing eqs 3 and 4,it is apparent that q(2-l) = GD(z-l). From the block diagram in Figure 3a it is evident that when the set point is constant, the output can be expressed as a weighted sum of all past shocks according to eq 5 or 6 below.

Yt =

q(2-l)

1

(5)

+ K(z-1) C,(z-')z-f-lat = **(z-')a,

(6)

= a, + $1at-1 + ... + $/a,++ $*f+lat-f-l+ ... (7) The f s and $*'e in eq 7 are easily determined from the long division of the polynomial operator in eq 5. Note that because of the process delay term z-f-l in the denominator of the transfer function, eq 5, the first (f + 1)terms in eq 7 will be the same as those in the disturbance model "(z-') given in eq 3. Only the subsequent terms ($* + $*,+flt-[-2 + . .I are influenced by the controller and are desqnated by the addition of an asterisk. This point is very important in development of the analysis to follow. The variance of the controlled variable can be calculated from eq 7 by a simple procedure in which the equation is squared, and the expectation,E(), is taken. In performing this calculation, the independence of the shocks ensures that all crow product terms are zero, i.e., E ( U , ~ , ,=~0) for k # 0. Therefore, the variance in Y is given by uy' = E(Y,2) = (1 + $I2 + $2' + ... + $? + $*f+I2 + ...)ua2 (8) where ua2 = E(a,a,) This result demonstrates that the variance of the controlled variable ie related to the $-weights, which depend on the feedback process dynamics, the disturbance process model, the controller, and the variance of the shocks. We see that control performance is improved by steps which reduce the magnitudes of the fs, $*'s, and (ua)'. The minimum variance controller results in all q * j equal to zero for j = f + 1,f + 2, (Box and Jenkins, 1976; Astrom and Wittenmark, 1984). In effect, this controller cancels the expected value or prediction of the disturbance after the dead time, f , leaving only the (uncorrelated) prediction error to influence the controlled variable. Therefore, the controlled variable under minimum variance control, (Yt)m, will depend on only the most recent f past shocks, where f is the number of whole periods of process dead time, i.e., ( Y t ) M V = at + q1Ut-l + + $Pt-f (10) Such a finite stuchastic process is called a moving-average process of order f , for which it can be shown that the theoretical autocornlatione, pw(k), me zero for k > f. This relationship leads to the first important control assessment result. Result 1: The best possible, i.e., minimum variance, control performance has been achieved if and only if all autocorrelationsof the controlled variable are zero beyond lag f , where f is the number of whole periods of time delay. This result provides the basis for assessing control performance at level two of the hierarchy. To determine whether the current controller is achieving the best performance possible under minimum variance control, the following statistical test can be performed. Using a representative sample of n observations of the controlled variable (Yt,t = 1, 2, 3, ...), the sample autocorrelation (ryy(k),k = 1,2,3, ...) can be computed (see Appendix).

k(z-9

...

Statistically significant values of the estimated autocorrelations existing beyond lag f provide evidence that the current controller is not minimum variance. Furthermore, if there exist many large autocorrelations that persist beyond lag f , the controller performance deviates substantially from the minimum variance performance bound. If only a few, slightly significant values exist beyond lag f , the performance is close to the lower bound. Since the sample autocorrelations are statistical estimates based on a finite sample of data, they will never be truly zero. Therefore, to assess whether or not the true autocorrelations might be zero, their estimated values must be compared to their statistical confidence intervals (see Appendix). In this paper, a value is deemed to be significantly different from zero if its magnitude exceeds the 95% (two standard deviation) probability limits: an example is given in Figure 4a. When the above test reveals that the current control deviates significantly from minimum variance performance, it is important to determine how much greater the current variance is compared with the minimum variance bound. The calculation of the minimum achievable variance from normal plant data is the essence of the paper by Harris (1989) and is summarized briefly here. To calculate the theoretically achievable minimum variance for the current process, a time series model of the form (11)

is identified from a set of observations of Yt. This model is an alternative, lower order form which is equivalent to eq 6. The data can be collected with or without feedback control, the only requirement being that they have a large enough number of observations to contain a representative sample of process disturbances. The model in eq 11can be expanded to obtain the leading f terms in eq 7. This expansion can be achieved either by long division or by solving a Diophantine equation (Harris, 1989). The achievable minimum variance, (uy2)MV,can be calculated from the leading f terms, or $-weights, and the residual variance, ,:a using the same method as for eq 8, yielding in this case ( U y 2 ) M V = (1 + $1' + $Z2 + + $?)ua2 (12) This leads to the second result. Result 2 The theoretically achievable lower bound on the variance of the controlled variable can be estimated from a representative set of either open- or closed-loop process data by fitting a time series model to the data and evaluating the variance (eq 12) from the f leading terms in its expansion (eq 7). The variance of the controlled variable in the current closed-loop system can be estimated using the same data set according to

e(%

Yt)2

=

tal

(13) n-1 where P is the mean value of the sample of data. The ratio of current variance to the theoretical minimum variance, sy2/(uY2)Mv, gives a direct measure of the maximum improvement possible by modifying the control, without changing the process. The results of the assessment at level two of the hierarchy in Figure 2 dictates the appropriate action at level three. If the current variance is far from the minimum variance, substantial improvement is possible by modifying the controller calculations; thus, diagnosis to determine the proper modifications is apsy=

Ind. Eng. Chem. Res., Vol. 32, No. 2, 1993 305 1

0.8 0.6 0.4

-0.4 -0.6

-0.8 -1

1 2 3 4 5 6 7 8 910111213141516171819

k s k 2.5

1.5

-2

4 0

50

100

150

200

250

300

t-0.5 350

lime

’1

E

0.8

-

0.6

-

1

0.4-

-0.6

-03 -1

1

i

proving performance by reducing the minimum variance can be achieved by (1)reducing the periods of delay 0, (2) reducing the variance of the disturbance, Le., the shocks (ua2),or (3) modifying the disturbance transfer function, Le., the magnitude of the *,-weights, or by a combination of these modifications. The periods of delay can be reduced by reducing the process transportation time, the sensor analysis time, and so forth. The improvement for reducing the delay time can be quantified from the model fit to plant data in eq 12 by setting the 9 ; s to zero for f > f : where f’ is the reduced number of periods of delay. The other process factor that influences the controlled variable variance in eq 12 is the disturbance structure and variance. The disturbance structure and variance could be modified in some cases by introducing a well-mixed inventory upstream of the process considered. This would attenuat@the variance of disturbance variables like feed composition and temperature. In other cases,part of the random shocks, a,, is due to measurement error and can be reduced by a more precise sensor. Finally, the structure of the control system could be changed to improve performance. One control structure change would be feedforward control which, when perfect, eliminates the effect of measured disturbances on the controlled variable. Another control structure change would be .toemploy cascade control to improve the disturbance rejection capabilities through feedback control. Clearly, theae structural approaches can be very effective when tailored to the specific application. It is worth noting that process changes can be costly and that some approaches requiring plant or sensor changes can be implemented only during infrequent plant shutdowns. Therefore, every effort should be made to achieve the best performance from the existing system. Control Performance Diagnosis When the performance assessment reveals that significant improvement is possible by adjusting the control algorithm,the procedure should proceed to the “diagnosbn step at level three of the hierarchy in Figure 2. In certain circumstances, simple diagnostic tests can be performed to identify the source of the poor performance and to suggest corrective actions. In this section, such diagnostic testa are developed for single-loop feedback control and then extended to feedforward-feedback systems. The diagnostic method is described with reference to the feedback system in Figure 3b. Note that the controller can be implemented as a conventional feedback system as in Figure 3a or in an internal model controller (IMC) form as in Figure 3b. In the IMC form, the manipulated variable is used to predict the process output, so that the feedback signal for the controller in Figure 3b becomes

i 0 1 2 3 4 5 6 7 8 910111213141516171819

h

k

Figure 4. (a, top) Autocorrelationof controlled variable (Y),simulated feedback case. (b, middle) Dynamic data for set point forcing, simulated feedback case. (c, bottom) Crose correlation of differenced set point to differenced model mismatch (EM), simulated feedback case.

propriate. The diagnostic step is discussed later in the paper. If the current variance is close to the minimum variance, substantial improvement is possible only by changing the system structure, as discussed briefly in the next section.

Changing the System Structure The system structure must be changed when the achievable minimum variance with the current structure does not provide satisfactory performance. The method in the previous section provides insight concerning how changes to the system structure would improve performance, as well as an estimate of the possible improvement for each. By referring to eq 12, it can be seen that im-

EM, = Yt - G,,(z-’)U, = Dt + (GJ2-l) - G,&-’))Ut

(14)

The IMC form could use any of the available controller algorithms, e.g., Smith predictor (Smith, 1959), linear quadratic (Bergh and MacGregor, 1987),dynamic matrix (Cutler and Ramaker, 1979), or IMC (Garcia and Morari, 1982). Degradation in performance, when tight control is desired, can arise from two sources: errors in the process model and/or poor controller tuning. The goal of the diagnostic step is to determine which source(s) is (are) causing the poor performance. Using the system in Figure 3b and assuming that the set point is constant, the following expressions for the model prediction and manipulated variable can be derived by straightforward block

306 Ind. Eng. Chem. Res., Vol. 32, No. 2, 1993

diagram manipulations (recalling that G&') EM, = H(2-l) Q(z-')a, U , = -GC(z-l) H(z-') Q(z-')a, where

= *(z-')). (15)

(16)

When the model exactly matches the plant, H(z-') = 1,and the prediction error is equal to the disturbance. Since both EM, and U,are influenced by the model accuracy through If(%-'), a possible basis for diagnosing control performance would be to look at the effect of the manipulated variable on the prediction error. This can be done by calculating the cross correlation function, which is similar to the autocorrelation function except that it involves two different process variables (see Appendix). The resulting cross covariance is YU,EM(k) = E(Ut*EMt+k) = E[(-GC(z-')H(2-l) q ( ~ - ' ) a , )X (H(z-') *(z-')at+k)l (18) where E is the expectation operator. Two situations are now discussed. First and simplest, the model could be perfect, H(2-l) = 1, and the disturbance could be white noise, q(2-l) = 1,in which case the cross correlations would be zero: (19) YU,EM(k) = E(-Gc(Z-')at*at+d = 0 because E(atat+k)= 0 for k > 0 and the controller, Gc(z-'), uses only the current and past values of the feedback signal. In the situation with only a white noise disturbance, any nonzero cross correlations would be due to model error which would be a valuable diagnostic. However, the more realistic situation is where the disturbances have significant autocorrelation (Q(2-l) # 1)so that, even with a perfect model, some cross correlations are nonzero in eq 18. As a result, for systems with only feedback control, it is not possible to unequivocally diagnose whether poor control performance is caused by modeling errors or by poor tuning if one uses normal plant operating data. The addition of set point changes (or any other measured external signal introduced into the feedback loop) gives a different and more useful result. The prediction error for set point changes can be expressed as EM, = H(z-')D, + G&') [G,(z-') - Grnp(z-')lH(~-l)Ysp,, (20) Since set point changes should be independent of future disturbances, eq 20 shows that the cross correlation between the set point and the prediction error is a clear function of the model error. If the model is perfect, no correlation between the set point and the prediction error would exist. On the other hand, if the model error is significant, correlation would exist. This analysis provides a method for diagnosing the presence of model error. The diagnostic could be implemented by calculating the cross correlation between YSP,tand EM,+kand comparing the values to their two standard deviation intervals. Naturally, the amount of forcing i.e., the magnitudes and number of set point changes, must be large enough to provide significant information for the calculated cross correlations. If the model can be determined to be adequate by the above analysis, the only other possible cause for the poor performance, assuming proper sensor and final element behavior, is the controller. Potential shortcomings are the tuning and the structure of the algorithm which cause it

to deviate from the minimum variance performance. In most cases, aggressive adjustments of the manipulated variable typical of a minimum variance controller may not be appropriate for the control objectives. However, the engineer has established the cause for the shortfall in performance and can use judgment in improving the controller tuning or structure to obtain the appropriate compromise between the variances of the controlled and manipulated variables. Result 3: The reason for poor feedback controller performance can be diagnosed as being due to modeling errors or poor controller tuning and structure if the feedback operating data contains changes in a known external variable like the set point. However, normal operating data from a feedback system without any measured external perturbations does not provide information for such a diagnosis on the cause of poor performance.

Feedback Examples The diagnostic method is demonstrated in two examples. The first is a simulation in which known differences between the controller model and the "exact" process can be introduced; the second is an empirical study on an industrial process. A Simulation Example. The initial dynamic data from the closed-loop simulation is given in Figure 1. The proceas has a dead time of two sample intervals, and the variance of the controlled variable is estimated from the data to be sy2 = 0.0058. It is assumed that the process analysis at the first level has indicated potential benefits for improved control. Proceeding with the second level of analysis, the autocorrelation function of the controlled variable shown in Figure 4a indicates that there are significant autocorrelations beyond lag 2. Since the process dead time has two periods of delay, this result indicates that the current controller is not achieving minimum variance performance. To calculate the lower bound on variance, the following time series model was identified for the controlled variable from the data. Y, =

1 1 - 1.0142-'

+ 0.172~-'at

(21)

Expanding this equation by long division gives the equivalent series Y , = (1 + 1.0142-' + 0.856z-* + ...) a, (22) Using the estimates of = 1.014 and $' = 0.856 and 6,' = 0.00139 in eq 13 yields the prediction of the minimum variance of 0.0038. Since improvement is possible, the analysis proceeds to the third level to determine the cause for the poor performance of the current system. We have already shown that model accuracy cannot be determined from normal operating data but can be determined from data with set point perturbations. Thus, the additional data in Figure 4b were developed with changes in the controller set point. The cross correlations between V Y s ~and , ~VEMt+kcalculated from these data are plotted in Figure 4c. Since several cross correlations have significant nonzero values, the conclusion is that the model, GmP(z-l),has significant error. To improve the system performance, the dynamic model should be reidentified using standard methods which require plant perturbations (Box and Jenkins, 1976; Ljung 1987). Since model error exists, no evaluation of the controller tuning is possible. In this method, the model errors must be eliminated before the tuning can be evaluated.

Ind. Eng. Chem. Res., Vol. 32, No. 2, 1993 307 65 i

r700 1680

STEAM

I-

e

AMINE I560 45 50

100

150

1

Figure 5. Schematic of heat exchanger.

0.8

70

1300

68

1250

66

1200

OS6 0.4

1150

P 4

1100

1000 lo50

504 0

5

G

J

(A

' C800 100 200 300 400 500 600 700 800 900 1000 TLme 1

I

0.8 0.6 0.4

-0.8 -1 1 2 3 4 5 6 7 8 910111213141516171819

LBek

Figure 6. (a, top) Data for controlled temperature and manipulated steam flow,base tuning. (b, bottom) Autocorrelation of the controlled temperature from data in (a).

Since in the simulation study the "true" process model is known, we can establish that the method provided the correct diagnosis. The data were generated using the following models which include a significant difference between the "true" plant and the dynamic model used in the controller; i.e., the model gain is twice the true plant gain. The controller was a Smith predictor in the structure given in Figure 3b. GP(z-') =

0.12-3

200

250

300

350

400

540 450

Time

CONDENSATE

Grnp(2-l) =

1 - 0.82-1 1 G&') = (1- 0.22-')(1

- 2-1)

0 . 2 ~ ~

- o*82-'

(ua2= 0.001)

(23)

1

1

1

I

308 Ind. Eng. Chem. Res., Vol. 32, No. 2, 1993

YSP,t

cause of the poor performance, model mismatch or poor tuning, can sometimes be determined at the third level. Since each controller has ita own models and tuning, the second and third levels must be able to diagnose each controller independent of the performance of the other. The feedforward-feedback diagnostic hierarchy to achieve these goals is shown in Figure 9. Many of the steps are identical to the feedback-only hierarchy; therefore, only the modified steps are explained here. The first step is to assees the performance of the feedforward controller. From Figure 8, the controlled variable is given by

*-

Yt =

I

+ G&-l)

G,(z-'))d,

(Gd(2-I)

+ D,+ G,(z-')U,, (24)

Figure 8. Block diagram for feedforward-feedback system.

pected for minimum variance performance. The difference between thisvariance and the predicted minimum variance from the original data set in Figure 8a is due to the heat exchanger experiencing different disturbances in the two data sets. Other results not shown here confirmed that the best feedback performance with a proportional-integral controller had been achieved, since making the tuning more or less aggressive resulted in an increase in variance (Stanfelj, 1990). The studies using simulations and plant data, including many additional studies reported elsewhere (Stanfelj, 1990), verify the usefulness of the correlation-based methods for diagnosing feedback control strategies. Extension to Feedforward-Feedback Systems The diagnostic method can be extended to feedforward-feedback control systems shown in Figure 8. Again, the first level of performance monitoring remains unchanged. However, the second level must be modified to evaluate the performance of each controller, feedforward and feedback. Should either or both be inadequate, the

I

with d, a measured disturbance. If the feedforward controller is designed according to

and is realizable (i.e., the disturbance dead time is not lees than the feedback dead time), the first term on the right-hand side of eq 24 will be zero when the controller compensates for the measured disturbances. Assuming that the measured disturbance is independent of the unmeasured disturbances and the feedback control manipulations, the cross correlations between the measured disturbance and future values of the controlled variable will be zero, i.e., pdY(k) = 0 for k = 0, 1 , 2 , .... This result leads to the following result. Result 4: The performance of a feedforward controller can be 88Bes88d on the basis of the cross Correlations of the measured disturbance with the controlled variable, with perfect feedforward control giving no significant cross correlations. In practice, the cross correlations between the measured disturbance and the controlled variable are compared to

Honitorlng Control Is Control Performance Acceptable?

stop

Diagnose Feedforvard Performance Significant cross Correlation 9 dt* Yt+k

Compare Feedback with HV Control Significant Autocorrelation Beyond f" yt *Yt+k

Performance Is Best Possible Change Structure, Plant o r Control

Diagnose Models Significant Cross Correlation" dt*EM t c k ( W i t h o u t FF C o n t r o l )

Compare Feedback vlth HV Control Significant Autocorrelation Beyond f ? Yt *Yt+k .

G d in Error R e i d e n t 1f y

Check Feedback Model, Significant Cross Correlation? 'SP

t * EMt + k

Ind. Eng. Chem. Res., Vol. 32, No.2, 1993 309 their confidence limits, with the presence of cross correlation values beyond the confidence limits indicating imperfect feedforward control. If the measured disturbance is highly autocorrelated or nonstationary, differencing the disturbance or prewhitening it by fitting a time series model and taking the residuals prior to computing the crow correlations would lead to a more sensitive test (Box and Jenkins, 1976). We can proceed down the left branch in Figure 9, where by the above analysis the feedforward controller has been aseessed to be performing well. The adequacy of the feedback controller can then be evaluated in a manner similar to that used in the feedback-only method. If the autocorrelations of the controlled variable are zero beyond the dead time, the feedback control, in conjunction with the perfect feedforward, is providing the best control possible with the current process and control structure. If the feedback deviates from the best performance, it is possible to diagnose the system further. For the feedforward-feedback control system in Figure 8, the model prediction error is given by

+ K(2-1) Gmp(2-1) Dt + 1 + K(2-1) GJz-1)

1

EM, =

K(2-1)(Gpi2-1) - Gmp(2-1))

1 (Gd(2-l)

1

+ K(2-1) C,(z-')

- Gmd(2-l))

d, +

(Gp(z-l)

YSP,, +

- G~p(2-1))GCff(z-1)

1 + K(z-1) Gp(z-') + K(2-1) Gp(2-1) K(Z-')(Gd(z-') Gmp(2-l) - Gp(2-l) Gnd(2-l)) + dt 1 + K(2-1) Gp(z-')

dt (26)

To test for modeling errors, we can examine the cross correlation of d,*EM,+k. The first case considered is where the data are collected with the feedforward-feedback controller in operation. Since the feedforward control has already been assessed to be adequate, we know that Gd(Z-l)/Gp(Z-l) G,d(Z-l)/G,,,p(Z-l). Thus, the contribution to the cross correlation by the fifth and last term in eq 26 will be nearly zero. Although the third and fourth terms may both contribute nonzero amounts to the cross Correlation, the contributions will be of nearly the same magnitudes and different signs. Thus, the two terms cancel (or nearly cancel) because of the design equation for G&-l). Furthermore, the unmeasured disturbance and set point changes would not usually be correlated with the measured disturbance. Therefore, the proposed cross correlation between C~,*EM,+~ will not provide a useful diagnostic when the feedforward-feedback controller is operational and compensates adequately for the measured disturbance. However, it can be seen from eq 26 that the cross correlation of d,*EM,+kunder feedback-only control will be zero if the models Gmd(2-l) and G, (2-l) are perfect since the last three terms in eq 26 wili be zero. When the feedforward controller is off, GCff(z-l)= 0, while the feedback is on, the fourth term will be identically zero. Also, the f i i will be approximately zero since the feedforward controller has been found to be performing well; note that good feedforward control can be achieved by an accurate ratio of G,d(z-l)/Glpp(Z-l), even though each individual transfer function might be in error. However, the third term will be zero only if the disturbance model is nearly perfect, and it will be nonzero if the disturbance model has sufficient error to affect the control performance significantly. Thus, the cross correlation of d,*EM,+k under feedback-only control will be nonzero should significant

model errors exist, and these modeling errow may not be apparent from the feedforward performance because of cancellation in the ratio of transfer functions. Data for this check are easily obtained by decommissioning the feedforward component of the control strategy for a short time. Note that since the feedforward controller has been established to be performing well, an error in the measured disturbance model implies an error in the process model as well. Result 5: If the feedforward control has been assessed to be performing well, deviation from minimum variance feedback performance can be diagnosed to be caused by modeling errors or poor tuning. The cross correlation of d,*EM,+kunder feedback-only control provides information on the adequacy of the feedback model, GmP(z-l). If the feedback controller deviates from minimum variance, the feedforward controller performs well, and the measured disturbance model has no error, the only further source of poor performance is the tuning of the feedback controller or the controller algorithm. Now consider the right branch in Figure 9, where the performance of the feedback controller is evaluated when the feedforward controller is not perfect. Again, the controlled variable autocorrelations beyond the feedback dead time are examined; if they are all within their confidence limits, the feedback control is tentatively accepted as minimum variance. It is important to note that the feedback performance, even if perfect at this stage, should be rechecked after the feedforward is corrected since the feedback system experiences different disturbances with and without perfect feedforward control. If the feedforward controller is not perfect and the feedback is far from minimum variance, the accuracy of the individual models cannot be determined from normal operating data. However, the adequacy of the feedback predictive model, G, (z-l), can be evaluated as described in the section on feedback-only control if some set point changes are introduced. Feedforward-Feedback Example A Simulation Example. The diagnostic analysis in Figure 8 is demonstrated with a simulation exercise of a feedforward-feedback system. Results from the correlation calculations are shown in Figure loa-c. The cross correlation of the measured disturbance with the controlled variable in Figure 10a shows significant correlation, indicating that the feedforwrd controller is performing far from the best possible. The autocorrelations of the controlled variable in Figure 10b indicate that the control deviates slightly from minimum variance since nonzero values extend beyond the dead time of two lags. Finally, the cross correlation of the measured disturbance with the model error under feedback-only control in Figure 1Oc indicates that the measured disturbance and/or process models are in error and should be reidentified. Results not shown here confirmed that much better control could be achieved by following this corrective step. An Industrial Distillation Example. As an experimental test of the method on an industrial feedforwardfeedback system, the control performance of a distillation inferential temperature control system was diagnosed. The process equipment and control strategy are shown in Figure 11. The distillation tower is a 50-tray stabilizer in a hydrocracking unit which separates a feed composed of six major components. The light and heavy key components are i-CB and C6,respectively. The feed to the tower is predominantly liquid with a small fraction entering as vapor. The regulatory control strategy uses energy balance principles, and both product qualities are

310 Ind. Eng. Chem. Res., Vol. 32, No. 2, 1993

0,811 1 ,

I

I

I

0.6 0.4

E

.Y

3

0.2

E

o

0

I

1

v

.............................................

1

3

CQNlROLlER

Figure 11. Schematic of distillation tower.

tional-integral controller. The initial process models and controller equations are summarized below. GrnP(z-l)= Grnd(z-')

1

0.8 0.6 0.4

1

s

O*:

:::

1

-0.6

-0.8 -1

0 1 2 3 4 5 6 7 8 9 10111213141516171819 h l k

Figure 10. (a, top) Crow correlation of the differenced measured disturbance with the controlled variable, simulated feedforwardfeedback caw. (b, middle) Autocorrelationof the controlled variable, simulated feedforward-feedback awe. (c, bottom) Cross correlation of the differenced measured disturbance with the model mismatch (EM), simulated feedforward-feedback case with feedback only.

controlled by single-loop controllers. The heavy key in the top liquid product is measured by an on-stream analyzer and controlled by cascading through a tray temperature to the reflux flow. The light key in the bottom product is inferred using the bottom temperature as an indication of compoaition and controlled by adjusting the flow of hot oil to the reboiler. The bottom temperature controller is enhanced by a feedforward controller from the liquid feed flow rate to reboiler duty. Both the feedback and feedforward controllers are executed once per minute. The feedforward controller was designed according to conventional means, and the feedback controller was a propor-

=

0.0076~~ 1- 0.8752-'

-o.oo%k-'O 1 - 0.8732-'

Evaluation of the control performance indicated that substantial opportunity for improvement existed for both feedforward and feedback control. After fine tuning these controllers, the feedforward gain was decresed to give G&-l) = 1 . 0 and ~ ~the PI controller gain was increased; reasonably good performance was achieved. (At the request of the company, values of the PI tuning constants are not reported.) After these tuning changes analysis of the closed-loop data from the feedforward-feedback control system showed that no deviation from good feedforward control could be detected by examining the cross correlations in Figure 12a. Also, the autocorrebetween dt and Yt+k lation estimates for the bottom temperature are shown in Figure 12b and indicate that the feedback control was not achieving minimum variance since significant nonzero autocorrelations exist beyond lag f = 5. Additional data were collected with the feedforward component of the control strategy decommissioned, and the multa are given in Figure 13. The zero cross correlations between d, and EMt+kindicate that the disturbance model exhibits no inadequacies; thus, the process model is also adequate because the feedforward controller has been shown to be adequate. The feedback control performance could only be improved by tuning or by using a different controller algorithm. These diagnostic results were verified by other experiments in which the feedforward model was altered, the gain was changed by up to loo%,and the feedback controller gain was doubled. In these cases, the diagnostic method correctly identified the modeling inadequacies. On the other hand, experiments at various controller tunaround the best values (about f26%) did not yield significantly different control performance nor did they exhibit significantly different diagnostic results. This confirms the well-known situation that control performance is not sensitive to controller parameters close to their "optimum" values. The results of simulations and experiments presented in this section demonstrate that the diagnostic method can

Ind. Eng. Chem. Res., Vol. 32,No. 2, 1993 311

-1

0.8

I

1

0.6

1

0.4

rI

r-1

-1

0-

0.2

-

I

I

! -o.2 -0.4-

-

-0.6

-0.8 -1

0 1 2 3 4 5 6 7 8 9 10111213141516171819

4

4 5 k I

1 ,

0.8 0.6 0.4

l9 E o 0.2

-0.6 -0.8

1 4

-1

I 1 2 3 4 5 6 7 8 9 10111213141516171819

h

I

k

Figure 12. (a, top) Cross correlation of the differenced measured feed disturbance with the controlled temperature, distillation with feedforward-feedback control. (b, bottom) Autocorrelation of the correlation of the controlled temperature, distillation with feedforward-feedback control. 1

0.6

w

0.4

2I

0.2

E

o

8

1

11

-o.21 I -0.4

-o.6 -0.8 -1

0 1 2 3 4 5 6 7 8 9 10111213141516171819

Lag, k

Figure 13. Cross correlation of the differenced measured feed disturbance with the model mismatch (EM), distillation with feedback only control.

be applied to feedforward-feedback control systems. No significant increase in complexity or computation is involved with this extension. A Synopsis of the Diagnostic Method A brief summary of the diagnostic method is presented to emphasize its simplicity and to present an alternative manner for displaying the results. The three-level hierarchy shown in Figure 2 greatly reduces the computational

Figure 14. Diagnostic correlation matrix for feedforward-feedback system.

and data storage requirements. This is accomplished by having only the first level address all control loops in the plant. Since most will be functioning satisfactorily most of the time, only a few loops will require diagnosis concurrently. The relatively higher rate of data collection and storage required for the levels two and three can be reserved for the few potentially troublesome loops. A monitoring computer program could perform the routine tasks of identifying candidates for the lower level analysis, collecting the dynamic data, and calculating the autocorrelations and cross correlations. The correlations can be computed recursively using either a square or exponential data window. After all calculations and plots have been prepared, the program could alert the control engineer to review the diagnostic information. Even this review could be partially automated by a knowledge-baaed system which could provide an initial diagnostic recommendation (Cinar et al., 1992). The retuning, reidentification of process dynamic models, or restructuring of the control strategy seems best left to the engineer since these tasks require considerable knowledge of plant objectives and equipment statuses. The diagnostic logic has been introduced with reference to the diagrams in Figures 2 and 9. A simpler manner for presenting a summary of the results to the control engineer is the diagnostic matrix, a sample of which is shown in Figure 14 for a feedforward-feedback system. The rows of the matrix involve the controlled variable, measured disturbance, and the set point, all at time 9".The columns involve the controlled and model error variables at time "t + k" with k 1 0. The elements of the matrix contain either a blank, indicating good control, or an "X", indicating inadequate control, at the significance level selected by the engineer. Figure 14 shows a box in the elements which could have an "X". The elements would be determined through the analysis of autocorrelations and cross correlations using the diagnoses explained previously. For example, an "X"would be placed in the box numbered 1 if significant Yt*Yt+k autocorrelations were present beyond the feedback dead time, indicating the feedback controller deviates from minimum variance. An "X"would be placed in box 2 if nonzero d,*Y,+, cross correlations existed, indicating poor feedforward performance. An "X" would be placed in box 3 if nonzero d,*EM,+k cross correlations existed under feedback-only control, indicating an error in the disturbance model. Finally, an "X" would be placed in box 4 if nonzero YsP,t*EM,+k cross correlations existed, indicating an inadequate feedback model. Thus, the diagnostic matrix provides a concise display of the performance of a control system. Preparation of the diagnostic matrix does not require visual evaluation of the autocorrelation and cross correlation plots. Some simple, overall statistics can be used

312 Ind. Eng. Chem. Res., Vol. 32,No. 2,1993

to determine significance, for example (Box and Jenkins, 1976), L

Q = n k =Cf + l

ruu2(k)

(28)

with n = the number of data points and L = the number of lags,taken to be beyond the settling time of the system. If the true values of the correlation function between values k and L are zero, Q is approximately distributed as a weighted sum of x2 distributions (Desbrough,1992;Desbrough and Harris,1992). For f = 0, Q will be distributed as x2 (Box and Jenkins, 1976). The computed value of Q can be compared with some upper limit, such as the upper 100 (1 - u)% critical value of this distribution with the appropriate degrees of freedom. If Q exceeds the critical value, an "X"is placed in the diagnostic matrix. Normally, this upper limit would be chosen to be sufficiently large (e.g., the level of significance chosen would be small, a = 0.01), so that only relatively large deviations from the best performance or perfect model would be indicated in the matrix. Further Discussion The important principles of the method have been presented; however, a few additional clarifications and interpretations are appropriate. An important strength of the diagnostic method at levels two and three is that it detects modeling and tuning errors through the statistical significance of their effects on the controlled variable, rather than through a consideration of the relative magnitudes of controller errors. The magnitude of an error in modeling or a tuning parameter is not necessarily important; only its effect on the controlled variable is relevant. In some instancea large errors might have little effect on performance, while in other instances even small errors might have a large effect on performance. If the model mismatch or improper controller tuning do not emerge as being statistically significant at the diagnostic levels, regardless of size, correcting the inadequacies will do little to improve the control performance. A second issue is the use of routine plant data for the diagnostics. Naturally, the control strategy will be relatively inactive when disturbances are small and infrequent, and the control performance in such situations may not be easily diagnosed. Thus, the diagnostic method can be considered to send an unequivocal signal when it indicates potential for substantial improvement. But, when it indicates satisfactory performance, the result could be the consequence of either truly good performance or such small disturbances that no significant difference from satisfactory performance can be distinguished. For good diagnosis the method should be applied to data which include typical disturbance magnitudea and frequencies. If nece88ary, data from different periods can be pooled in order to obtain a representative sample. A third issue is that the method does not require designed plant perturbations or detailed model identification for many of the assessment and diagnostic steps. By focueing on the minimum variance control as the reference, the method requires only knowledge of the process dead time and simple autocorrelation and cross correlation plots constructed from normal operating data obtained under the current control. It is important to note that the use of the minimum variance as the performance bound, calculated via eq 12, provides a significant simplification. The only process model parameter required is the dead time (f), and the only disturbance model parameters required are the #-weights

up to lag f , which can be calculated from any open- or closed-loop data. If we wished to calculate the expected performance of any other controller, we would have to use eq 18 or, equivalently, simulate the control system subject to the stochastic disturbance. In either case, the prediction would require the identification of the process (C (2-l)) and disturbance (GD(z-l)) transfer functions. WRile these models are not extremely difficult to determine, plant identification tests would be required. The final issue is the restriction of the current method to single-loop control strategies. The restriction does not imply that the controller cannot experience interaction with other controllers as a result of process interactions. For example, the bottoms temperature controller in the distillation tower example interacts with the top composition controller. The diagnostic method applies since the process, GP(f1),in the block diagrams in Figure 3 involves all process and control systems that influence the inputoutput relationship, Y(z-')/V(z-'). For example, the control performance, and thus the diagnostic result, would change if the top analyzer control loop were taken out of service by being placed on manual in the distillation example. Conclusions A hierarchical method for monitoring and diagnosing control performance has been developed and successfully tested in an industrial environment. It uses measures linked closely to process performance, like control variable variance, to evaluate control loops at the first level. This step eliminates the majority of loops from further consideration at any one time, The second level provides the essential information on the best performance given the current process and control structure. The third level gives insight into shortcomings of the current system. The source of problems can usually be identified as either feedforward or feedback, and in some instances, the cause8 can be further attributed to either modeling or tuning errors. The method uses statistical correlation principles which can be applied to continuous systems experiencing stochastic disturbances. The calculations required are easily programmed and use limited computational time. Finally, the use of normal operating data and simple, graphical displays and straightforward interpretations make it attractive for wide application. Acknowledgment The experimental portion of this research WBB performed at Shell Canada, Scotford Refinery. We are grateful for the cooperation of the plant personnel during the extensive empirical testing, and we are especially grateful for their forbearance during tests performed with controller tunings which were expected to degrade control performance. These tests were crucial to the verification of the diagnoetic method. Nomenclature a, = white noise cuy = estimate of cross covariance c y y = estimate of autocovariance d , = measured disturbance at time t D,= unmeasured disturbance at time t V = difference operator EM,= Y,- Y f = number o!&hole periods of delay G, = transfer function for controller in IMC form Gd = transfer function for measured disturbance

Ind. Eng. Chem. Res., Vol. 32, No. 2, 1993 313 GD = transfer function for unmeasured disturbance Gmd= transfer function model for measured disturbance G,, = transfer function model for feedback process G = transfer function of feedback process d=transfer function in eq 17 K = transfer function of controller in standard form K, = proportional-integral controller gain n = number of data pointa in a sample Q = statistic on correlation function, eq 28 ruy = sample cross correlation r y y = sample autocorrelation TI= proportional-integral controller integral time Ut = manipulated variable at time t Yt = controlled variable at time t Y = predicted value of controlled variable at time t S,$,t= set point at time t z-l = backward shift operator Greek Symbols y u y = cross covariance yyy = autocovariance 6 = polynomial in z-l, eq 4 p = population mean puy = cross correlation p y y = autocorrelation u = standard deviation 6 = polynomial in z-l, eq 4 = polynomial in z-l, eq 3 +i = coefficient in polynomial, eq 3 Subscripts a = white noise f = whole periods of delay fb = feedback ff = feedforward k = number of periods of delay MV = minimum variance SP = set point t = time sample Y = controlled variable Superscripts * = elements in polynomial beyond lag f , eq 7 - = mean value

Appendix In this appendix, we provide some background needed to apply the diagnostic methods. The appendix covers stochastic systems and autocorrelation and cross correlation functions briefly, since further details are available in many texts on times series analysis, for example, Box and Jenkins (1976). A stochastic process is a process which evolves in time according to the laws of probability as opposed to a deterministic process (e.g., a sine wave) for which the future is perfectly determined from the present and the past. A time series is a sequence of observations on a variable ordered in time and represents a particular "realization" or finite sample from an underlying stochastic process. We shall deal exclusively with discrete stochastic systems with equispaced samples. A stationary, normally distributed stochastic process is completely characterized by ita mean, variance, and autocorrelation function which are constant over time. Many stochastic processes are nonstationary; Le., the local level or mean of the process shifts with time. However, stationarity can usually be induced by differencing the series,i.e., by computing the backward differences V Yt = Yt - Yt-l, t = 1,2, ...,n. Since the autocorrelation and cross correlation functions defined below are only valid for a stationary process, the differenced series (VU, and VU,)

are used when appropriate in place of the original series (Yt and ut). The Autocorrelation Function. For a stationary stochastic variable, Yt,the autocovariance a t lag k is defined as k = 0,1, 2, 'Yyy(k) = E(Yt - PY)(Yt+k- PY) (A-1) with p y the population mean. The autocorrelation a t lag k is the autocovariance scaled by the autocovariance at lag k = 0 (the variance) to give the dimensionless number between -1 and 1 given below. pyy(k) = r y y ( k ) / ~ y ' k = 0, 1, 2, ... (A-2) e..

with CY2

= YYY(0)

Since the autocorrelation is symmetric about k = 0, only the values for positive k are considered. The autocorrelation measures the linear dependence between values of Yt separated by k sampling periods. The theoretical autocovariance and autocorrelation functions are never known in practice but can be estimated from a finite set of observations according to 1n-k k = 0, 1, 2, ... (A-3) ~ y y ( k )= -C(Yt - Y)(Yt+k- p) nt=1 and ryy(k) = cyy(k)/cyy(0) k = 0, 1, 2,... (A-4) with P being the sample mean. Because they are based on a finite set of data, these estimates have errors associated with them; hence, their calculated values must be compared with their standard errors in order to determine whether their theoretical values might be zero. For example, to determine whether pyy(k) might be zero, the calculated value of ry&) is compared to its standard error. The variance of ryy(k), under the assumptions that the true autocorrelations beyond some lag f are zero, is approximately given by (Box and Jenkins, 1976) Var(ryy(k)) N (l/n)(l + 2(ryy2(1) + ... + rw2(f))) for f = k - 1 (A-5) The approximate 95% confidence interval is given by two standard deviation limits: *t2(Var(ryy2(k)))1/2 These are the confidence limits plotted about zero on the figures in this paper. The Cross-Correlation Function. It is often of interest to determine potential linear dependence between two different variables. For two stationary stochastic processes (U,Y) the cross covariance at lag k is Y U Y ( k ) = E(Ut - PU)(Yt+k- PY) k = ..., -2, -1, 0, 1, 2, ... (A-6) The cross correlation at lag k is the scaled, dimensionless cross covariance which has values from -1.0 to 1.0. (A-7)

Estimates of the cross covariance and cross correlation functions based on a set of n observations of U and Yare given by 1n-k

C~y(k)

-c(ut - a(Yt+k nt=l

k = 0,1, 2,

... (A-8)

314 Ind. Eng. Chem. Res., Vol. 32, No. 2 , 1993

1n-k

Cyu(k) = -C(Yt - n(Ut+knt=l

0

k = 0, 1, 2, ... (A-9)

Unlike the autocorrelation function, the cross correlation function is not symmetric with respect to the sign of the lag k. Under the assumption that the true cross correlations are nonzero only over some range of lags L1to Lz, the variance of the sample cross correlations at lags not included in this range is approximately (Box and Jenkins, 1976) (A-11)

To test whether any particular cross correlation pvy(k) might be zero, its estimate is compared to its two standard deviation limits f2(Var(ruy(k)))1/2

which are plotted about zero on all of the cross correlation plots in this paper. Literature Cited Astrom, K. Introduction to Stochastic Control Theory; Academic Press: New York, 1970. Astrom, K.; Wittenmark, B. Computer Controlled Systems, Theory and Practice; Prentice-Hall: New York, 1984. Bergh, L., MacGregor, J. Constrained Minimum Variance Controllers: Internal Model Structure and Robustness Properties. Znd. Eng. Chem. Res. 1987,26, 1558-1564. Bialkowski, W. "Process Control For Engineers"; Control Notes, ENTEC Control Engineering Company: Toronto, Canada, 1990. Box, G. E. P.; Jenkins, G. Times Series Analysis, Forecasting and Control; Holden-Day: Oakland, 1976. Bozenhardt, H.; Dybeck, M. Estimating Savings From Upgrading Process Control. Chem. Eng. 1986, 93 (3),99-102.

Cinar, A,; Marlin, T.; MacGregor, J. Automated Monitoring and Assessment of Controller Performance. Presented at the IFAC Symposium on On-line Fault Identification and Control in the Chemical Industries, April 22-24, 1992,Newark, DE. Cryor, J. D. Time Series Analysis; Duxbury Press: Boston, 1986. Cutler, C.; Ramaker, B. Dynamic Matrix Control, A Computer Control Algorithm. Presented at the AIChE National Meeting, April 1979. Desbrough, L. Performance Assessment Measures for Univariate Feedback Control. M. Eng. Thesis, Chemical Engineering, Queen's University, Kingston, Ontario, 1992. Desbrough, L.; Harris, T. Performance Assessment Measures for Univariate Feedback Control. Can. J. Chem. Eng. 1992, submitted for publication. Garcia, C.; Morari, M. Internal Model Control-1. A Unifying Review and Some New Results. Ind. Eng. Chem. Process Des. Dev. 1982,21, 308-323. Harris, T. Assessment of Control Loop Performance. Can. J. Chem. Eng. 1989,67,856-861. Ljung, L. System Identification For The User; Prentice-HaU Englewood Cliffs, 1987. MacGregor, J.; Taylor, P. Advanced Process Control Notes; McMaster University: Hamilton, 1990. Marlin, T., Barton, G., Brisk, M., Perkins, J., Eds. Advanced Process Control Applications; Instrument Society of America: Research Triangle Park, 1987. Pryor, C. Auto-covariance and Power Spectrum Analysis, Derive New Information from Process Data. Control Eng. 1982, 2, 103-106. Smith, J. A Controller to Overcome Dead Time. ZSA J. 1959,6 (2), 28-33. Smith, C.; Corripio, A. Principles and Practice of Automatic Process Control; Wiley: New York, 1985. Stanfelj, N. Control Performance Evaluation and Diagnosis. M. Eng. Thesis, Department of Chemical Engineering McMaster University, Hamilton, Ontario, Canada, 1990. Stanton, B. Characteristics and Control of Process Disturbances. Hydrocarbon Process. 1984,63 (6),51-55. Stanton, B. Using Historical Data to Justify Controls. Hydrocarbon Process. 1990, 69 (6),57-60. Stout, T.; Kline, R. Control System Justification. Instrum. Technol. 1976,23, 51-58. Received for review August 20, 1992 Accepted September 19,1992