Monitoring of batch processes through state-space models

Monitoring of batch processes through state-space models

IFAC Copyright 10 IFAC Dynamics and Control of Process Systems, Jejudo Island, Korea, 200 1 c: 0 [> Publications www.elsevier.comllocatelifac MO...

769KB Sizes 0 Downloads 60 Views

IFAC

Copyright 10 IFAC Dynamics and Control of Process Systems, Jejudo Island, Korea, 200 1

c:

0

[>

Publications www.elsevier.comllocatelifac

MONITORING OF BATCH PROCESSES THROUGH STATE-SPACE MODELS Andrew

w.

Dorsey, Jay H. Lee·,l

• Georgia Institute of Technology, School of Chemical Engineering, Atlanta, GA 30332-0100

Abstract: This paper will focus on the development of an improved and more general monitoring framework for batch processes. A subspace identification method will be used to extract "within-batch" and "between-batch" correlation information from historical operation data in the form of a state-space model. A simple monitoring procedure can be formed around the state and residuals of the model using scalar statistical metrics. The proposed state-space monitoring framework will deliver a powerful alternative over existing multivariate methods. Since the "between-batch" correlation is modeled explicitly, the algorithm is likely to be more effective than the traditional multivariate methods for detecting small mean shifts, slow drifts, and changes in the correlation structure. The framework is general enough to allow for several formulations, including an off-line formulation, an on-line formulation, or a more flexible formulation that allows for the use of both on-line and off-line information in a single framework. Copyright © 2001 [FAC

1. INTRODUCTION

To alleviate the limitation of the classical methods brought by its dependence on lab analysis, many researchers have considered using multivariate statistical process models built around the available process measurements for on-line monitoring. Techniques such as Principal Component Analysis (PCA) and Partial Least Squares (PLS) have been applied extensively to batch processes (Nomikos and MacGregor, 1994; Nomikos and MacGregor, 1995b; Nomikos and MacGregor, 1995a). These multivariate SPC (MSPC) methods rely on extracting the statistical information about how the on-line and/or off-line measurements vary together around some nominal conditions. MSPC methods have proven success in detecting and diagnosing abrupt changes occurring in the process.

The main purpose of statistical monitoring of a batch process is to ensure that significant and sustained changes in the product quality (brought about by major disturbances and faults) are detected quickly. The traditional way of doing this is to plot the sampled quality variables to see if they fall within specified limits on a conventional Shewart chart. However, the effectiveness of conventional Shewart control charts for batch process monitoring has proven to be limited, particularly in detecting small mean shifts and slow drifts that are common in chemical processes. This has led to the more common implementations of CUSUM or EWMA based methods for their improved ability to detect mean shifts or the presence of strong auto correlation in the process. However, these classical SPC methods can be sluggish due to the dependence on delayed lab quality data.

On the other hand, it is not uncommon for disturbances to evolve over several batches, leading to a gradual drift of the product quality out of acceptable control limits. Thus, one potential shortcoming is that, by monitoring each batch independently, the existing MSPC methods are deficient in terms of detecting small shifts in

To whom all correspondence should be addressed: phone (404)385-2148, fax (404)894-2866, e-mail: [email protected] 1

215

the process mean, slow drifts, or changes in the "between-batch" correlation structure. As mentioned earlier, the same deficiency was realized with the classical control charts, which led to more common implementations of CUSUM or EWMA based methods. Therefore, it is of particular interest to develop methods within the multivariate context that are capable of quickly detecting those disturbances that will have an eventual impact on the quality of future batches. In particular, it is desired to detect these incipient type faults at the onset of the disturbance before it actually leads to an abnormal deviation in subsequent batches.

incipient faults (those that would eventually lead to quality deviations) .

In addition, the framework allows for a very flexible configuration of the monitoring task, in terms of the choice of what measurements to use in developing the model. The choice between online measurements, off-line quality measurements, or using both sets of measurements allows the proposed framework to incorporate attractive features of classical SPC methods, PCA, and PLS respectively but still provides the additional benefit of extracting and using the batch-to-batch correlation for monitoring decisions.

In order to provide this monitoring ability, we propose to capture and use the batch-to-batch correlation structure. One benefit of having such a correlation model is that the monitoring signals can be "whitened" (made serially independent in the batch-to-batch sense) , which can improve the sensitivity of monitoring to mean shifts and drifts. This is particularly important when data during normal ('in-control') periods show significant level of batch-to-batch correlation. Here, statespace models will be identified directly from process data using subspace identification techniques such as the N4SID approach (Van Overschee and De Moor, 1994). In a recent conference paper (Dorsey and Lee, 1999), the authors introduced an extension of this continuous system identification technique to batch processes by employing the technique called "lifting" . In that paper, we investigated the use of the resulting model for inferential product quality prediction. We will explore the use of the model for process monitoring in the present paper. For further enhancement, we also propose to use a CUSUM type monitoring scheme on the prediction error of the state-space model.

2. IDENTIFICATION OF BATCH STATE-SPACE MODELS 2.1 Background

Batch process data can be represented by a three dimensional data array containing the different process variables (indexed through 1, ··· , L) across both the batch (1, · ··, K) and time dimensions (1, ··· , M) . Let X (K x L x M) represent this three dimensional data array. Traditional multivariate approaches to batch processes begin with the unfolding of this three dimensional data array into two dimensions prior to application of the modeling algorithm. The typical choice for unfolding this array is to preserve the batch dimension and rearrange each reSUlting batch slice by collapsing the "within-batch" dimensions. This unfolding process creates a large data matrix X (K x LM), upon which a multivariate statistical modeling technique like PCA or PLS is applied. In this context, the particular way of unfolding results in a model that describes variations of the process variables around their nominal trajectories and treats each batch as an independent observation. No attempt is made to establish a model along the batch dimension that captures the "between-batch" correlation structure.

A similar method for monitoring of continuous systems was proposed by Negiz and Cinar (1997) . In their monitoring procedure, a single T2 monitoring statistic was used around the state variables of the model. Beyond their proposed scheme, scalar statistics will be developed for the model residuals (i. e., prediction errors) for improved detection of changes in the correlation structure. The primary advantage of using this modeling framework for batch process monitoring is that a more complete representation of the batch process operation can be extracted from the data. This includes not only the correlation among the various samples of process variables and the quality variables within a batch but also that among the samples of successive batches. When coupled with the CUSUM type monitoring of the scores and residuals of the prediction error (as will be explained in greater detail below), a monitoring framework built around the developed state-space model will have an improved ability at detecting

However, in the presence of drifts, mean shifts, or other changes in the correlation structure, this lack of "between-batch" information could limit the effectiveness of the statistical monitoring scheme. In fact, in order for existing MSPC tools to detect such a change, the process would have to stray out of the established control limits. The ideal situation is to detect the change in the batchto-batch correlation of the process variables before the process actually drifts out of conventional control limits. Then, corrective action could be made before any true quality deviation is experienced, increasing the overall uptime of the plant by reducing the number of batches that are downgraded or disposed. 216

In order for a monitoring scheme to detect such changes in the batch-to-batch dynamics of the process, it helps to model the batch dimension of the data matrix X . This can be accomplished through developing a dynamic state-space model with respect to the batch dimension using the subspace identification technique. Henceforth, the formulation does not treat each batch independently but tries to capture and use "betweenbatch" correlation information. Coupled with the CUSUM-type monitoring of the scores and residual of the prediction error, the result is a more powerful and general monitoring scheme that is sensitive to mean shifts, slow drifts, or changes in the correlation structure.

future batches. Therefore, a monitoring algorithm built around the developed state space model delivers a powerful way to detect not only deviations in the level of the process variables but also abnormal deviations in the process behavior from a batch-to-batch dynamics point of view. This can help detect unusual changes, both in terms of the magnitudes and batch-to-batch dynamic trends, in the feedstock or other batch operating parameters. 2.4 Reducing the Dimensionality of the Lifted Vector

One practical issue that may arise during the application of subspace ID to batch data is the large size of the lifted output vector y . One way to combat the dimensionality problem is to apply PCA in prior to subspace identification. In most batch processes, variabilities of the measurements are manifested by a relatively smaller number of parameters. Hence, the data for the lifted vector Yk are likely to show a high degree of colinearity. One should be able to reduce the within-batch data trends (other than measurement noises) into a much smaller number of variables that represent the modes of variations in the process variables. If the number of principal components is chosen so that the residuals are mostly noises which tend to be batchwise uncorrelated, the reduced dimension will retain the original batch-to-batch behavior we want to model. PCA would be applied to project the lifted output vector Y of size (LM) to a lower dimensional space Y of size (n ) so that n « LM . With the compressed output vector a more compact model can be developed by applying the subspace ID algorithm to get the following reduced state space model

2.2 Preliminary Steps

The data preparation steps for the identification procedure begin by mean centering and scaling the process measurements so that they are expressed as scaled deviations from the nominal trajectories defined over the batch history. The within batch dimension of the data is then collapsed into the "lifted" vector. To assign some notation to this procedure, let Yk(t) be the vector of mean centered and scaled process measurements available at the current sample time t within batch k. Collecting all such vectors for I, ... , M sample points, the lifted batch vector for the kth batch can then be expressed as

which contains all of the process measurements within the batch ordered on time. This is done for all batches (1,· .. ,K) in the model building data set, which defines the normal operating condition of the plant.

Xk+ 1 = AXk + K~k ~k = CXk+~k

2.3 Model Development

where ~ represents the reduced space define by

The following stochastic model of the process is extracted from the data using a subspace identification technique (Van Overschee and De Moor, 1993).

X k+1 = AXk + K£k Yk = CXk +£k

(3)

(4)

and e is the matrix whose columns are the principal directions of the PCA model. The reduced state space model output can be projected back to the full batch dimension by rewriting the output equation as Yk = ecxk + £k + E k .

(2)

The interpretation of the identification procedure in the batch process setting, in which Yk is the collection of all observations made for the kth batch, is that the state sequence is extracted from the process data based on the relevancy of the previous batch measurements for predicting the future batch measurements. In other words, the state is defined to be a holder of information from previous batches that is relevant for predicting

3. STATE-SPACE MODEL BASED MONITORING OF BATCH PROCESSES 3.1 Monitoring Procedure

The application of PCA in prior to subspace identification provides some advantages in terms of the monitoring task. The output of the state-space 217

model in this setting becomes the filtered scores of the original PCA model. So what is left behind in the prediction error (f.) is the completely uncorrelated portion of the PCA score space. This allows the ability to monitor the correlated portion through the identified state vector and the uncorrelated portion through the prediction error. Both variables can be monitored using the Hotelling T2 statistic. While it is more common in PCA to use the Q-statistic for the model residuals, the T2 statistic is more appropriate in this setting because the prediction errors are formed in the score space which are orthogonal and hence the covariance matrix will be diagonal. In addition, the prediction errors in the score space are of considerably smaller dimension than the full batch output residual (e) . Hence, the covariance matrix of the prediction errors can be estimated reliably for the T2 calculation.

vector formed in the score space of PCA so the T2 statistic is more appropriate over the Q-statistic. Note that in the case that the data contains little batch-to-batch correlation, states will be negligible and the T2 monitoring of the prediction error is equivalent to the T2 monitoring of the scores in the PCA approach. However, even in this case, by monitoring the successive summations of previous batches, the algorithm will be more apt at detecting small mean shifts and sustained drifts in the process.

3.2 Monitoring Formulations The selection of the variables to be included within the lifted vector prior to identification is greatly dependent on the intent of the model's use. Three possible monitoring formulations can be considered based on the information included in the output vector of the model. While it is not intended to explore all of these options exhaustively in the present paper, they are exhibited here to show that the framework can encompass many features of existing monitoring methods.

The Hotelling T2 statistic is used based on the assumption that the set of random variables to be monitored are zero mean and follow a multinormal distribution with estimated covariance matrix E (Anderson, 1984) . The Hotelling T2 statistic is in the form 2

Tk = zkE

-1

Zk

T

'"

(N -1)n

(N _ n) Fn,N-n(o.) (5)

3.2.1. Off-line formulation: The most common industrial monitoring schemes typically rely only on the quality measurements to detect changes in the process behavior. This formulation can easily be incorporated into the state-space formulation by identifying the model directly from the available quality data. Here the vector Y would only contain the off-line quality measurements. As the quality measurements become available they would be used in the developed Kalman filter to obtain the optimal estimate of the state vector. The above metrics could then be calculated and monitored.

With N being the number of samples and n being the dimension of the observation vector z . The F -distribution can be used to establish control limits with significance level 0. . Hence, if the state variables or the prediction errors in the score space exhibit a loss of orthogonality or a change in level from that defined by the normal operating data their respective T2 values will be more likely to exceed the established control limits. Beyond these one-batch-at-a-time analysis, the prediction error (~) can also be monitored in terms of its serial correlation. Significant autocorrelation in the residuals is likely an indication of a change in the batch-to-batch dynamics from the normal operating condition (e.g., a mean shift) as defined by the model-building data. In order to detect such a change, a whiteness test of some sort can be used. Assuming the residual vector ~ is multinormal with N(O,3) then summing over a specified number of batches we can define a new vector

3.2.2. On-line formulation: One attractive feature of the PCA based method is its dependence on only on-line information. An on-line monitoring procedure can be developed in the present framework by including all of the on-line measurements within the lifted vector Yk prior to identification of the state space model. The advantage of this formulation over the purely off-line formulation is that there is no delay from waiting for the off-line quality measurements. The model can be used in a batch-to-batch fashion (analogous to PCA) by applying the full measurement vector Y to the model equation (2) at the end of each batch.

k

L



_t

(6)

i=k-m+l

which is multinormal with N(O, m3) provided the residual vector ~ is white. Control limits can then be established based on the T2 calculated around ak to verify this assumption. Note that elements of ak are orthogonal to each other, since ~ is a

A disadvantage is that the monitoring result becomes available only after the completion of the batch. Instead, the model can be used in realtime as the batch proceeds to provide monitoring 218

throughout the batch. This is an attractive formulation only if the particular process can allow for some within-batch correction or requires an early release decision for the product. The withinbatch monitoring procedure would work by converting the batch-to-batch model of (2) to a timetransition model throughout the batch. Note that (2) can be equivalently written as the following time-evolution equations:

Xk(t + 1) = Xk(t) Yk(t) = H(t)Xk(t) + ck(t ), t E {O, , · · ,M}

incorporate the lab measurements of the previous batch, the identified model is simply augmented with the quality variables of the previous batch (Dorsey and Lee, 1999). Any amount of delay in the lab analysis can be handled by augmenting the state with an appropriate number of past batch quality variables. Even when the analysis delay is not fixed , an upper bound on the delay can be established based on typical laboratory analysis times of the quality variables. The time based model can be constructed as before and the Kalman filter can be built around the resulting time based model. This formulation offers an important advantage over previous methods in that it allows for the use of both on-line and off-line information in the monitoring decision as well as an opportunity to predict the quality variables (possibly for on-line inferential product quality control) all in a single framework .

(7)

with the batch-to-batch transition of

The time varying matrix H(t) is selected from the rows of C so that the output matches the current measurement vector Yk(t) . From these equations a periodically varying Kalman filter can be constructed (Lee et al., 1992). Thus the optimal estimate of Xk(t) can be obtained throughout the batch from the available measurements Yk(t) for purposes of real-time monitoring.

4. CASE STUDY The proposed state-space monitoring formulation will be tested on on data generated from a fundamental model of the pulp digester (see Datta (1996) for model details) . Two scenarios were considered. The first deals with detecting a change in the correlation nature of the process that would eventually lead to an out of control alarm by conventional methods. The second deals with detecting a small mean shift in the process. Variations in chip moisture, chip size, and chip composition were used to generate the data. In both scenarios the on-line formulation will be used to allow for, a direct comparison to PCA.

3.2.3. Integrated approach: The final and most flexible formulation allows for both inferential quality prediction as well as batch monitoring (analogous to PLS) by including all of the information from each batch, including on-line measurements together with the off-line quality variables. This would be done by assuming the quality variables qk define the terminal condition of the batch and thus append qk to the lifted on-line measurement vector Y prior to identification of the model.

4.1 Detection of drift in quality

The normal batch history was assumed to be weakly correlated based on the following batchto-batch disturbance model of the chip properties.

(9)

(10) We would then identify the model based on this lifted vector. As in the previous formulation it is not required to wait until the full measurement vector Y is obtained. A time-evolution based model can be constructed so that the real time measurements can be used throughout the batch as well as quality measurements when they become available.

200 batches were generated with 4> set to 0.1 to simulate the normal operating conditions of the process. These batches were used to obtain a PCA model with 3 principal components and in turn a state-space model of order 6 was identified from the scores of the PCA model. In Figure 1 the monitoring performance over 50 batches with a drifting characteristic is shown. The figure shows the T2 value calculated around the state vector, prediction error, and the CUSUM type sum of the prediction error over 5 batches. The performance of the PCA based monitoring algorithm is also shown. The 95% confidence limits were calculated in all cases and are shown by the horizontal dotted lines on the plots. The results show a higher

It is likely that the quality measurement vector qk will not be available immediately at the end of batch k. For the case when the quality measurements of the current batch will be delayed , one can carry over the quality variable in the state vector to allow for correction based on the laboratory measurements when they become available. To 219

. . . . .r~ -------- - -.

sensitivity of the proposed state-space monitoring formulation to the batch-to-batch drift. In particular, notice that the T2 metric around the state vector exhibits good sensitivity to the drift in the process. Also the T2 around the prediction error shows higher sensitivity than the original PCA model because of the whitening effect of the state space model. The CUSUM type sum also shows good sensitivity to the drift in the process. The earlier detection capability of the proposed framework would allow for a correction to be made to the process before any batches would be produced with marginal or poor quality.

:

------------

0

!, -------- -----

'.~ .

'J-l0

~

------

-

t : J l '" ]4

01.5

~.' -------

~..,.,

-

.~

Fig. 2. Monitoring performance during mean shift

---------- --

'.~ ---------- -

~

-----

..

.'.Q

0 O.Ot

a

0.005

BeIIIh

data through subspace identification. By modeling the batch-to-batch correlation structure and coupling it with the CUSUM type monitoring of the prediction error, the new framework offers enhanced sensitivity for early detection of slow drfits, mean shifts, and changes in the batchto-batch correlation structure. Several possible formulations for the monitoring procedure were suggested that included a complete off-line formulation, an on-line formulation, and an integrated formulation that allows for the use of both online and off-line information. Simulation results from a pulp digester using the on-line formulation indicate that the proposed monitoring framework is more sensitive to changes in the batch-to-batch behavior and is able to more accurately detect mean shifts over traditional multivariate methods.

----

...

'- 10



~

_____

::!

I_

---

2O~

~

_

100

--

.,..15

~':

.r::ta.. 1

'~.. ...

~

0.5

0.45

______________

~10

..E:3 >OOc::z1 ):,ooc:Ii

_ 0.'

f....

~

f:" --------__ -__

~



-- --

• ..,.,

50

Fig. 1. Monitoring performance during process drift 4.2 Detection of small mean shift

In this scenario PCA and state space models were developed from online measurements of 200 batches with a value of cl> = 0.1 in (10). Then 50 batches were generated with a slight mean shift occurring in the chip properties after batch 25. The monitoring results are shown in Figure 2. Notice that the T2 around the state vector is slightly more sensitive to detecting the small mean shift compare with the T2 value from PCA. Also notice that the CUSUM type procedure performed on the prediction errors of the previous 5 batches show a greater ability in detecting the mean shift in the process over the displayed single batch approaches.

6. REFERENCES Anderson, T. W. (1984) . An Introduction To Multivariate Statistical Analysis. John Wiley & Sons. Datta, A. K. (1996). Advanced model based control of pulp digesters. PhD thesis. Auburn University. Dorsey, Andrew and Jay Lee (1999) . Subspace identification for batch processes. In: American Control Conference. San Diego, California. Lee, J. H., M. S. Gelormino and M. Morari (1992) . Model predictive control of multi-rate sampled data systems. Int . J . of Control 55, 865--885. Negiz, Antoine and Ali Cinar (1997) . Statistical monitoring of multivariate dynamic processes with state-space models. AlChE Journal 43(8),2002-2020. Nomikos, P. and J . F . MacGregor (1994). Monitoring of batch processes using multi-way principal component analysis. AIChE Journal 40, 1361-1375. Nomikos, P . and J . F. MacGregor (1995a) . Multi-way partial least squares in monitoring batch processes. Chemom. Intell. Lab. Sys. 30, 97-108. Nomikos , P . and J . F. MacGregor (1995b) . Multivariate SPC charts for monitoring batch processes. Technometrics 37(1), 41-59. Van Overschee, P. and B. De Moor (1994). N4SID: Subspace algorithms for the identification of combined deterministic stochastic systems. Automatica30(1), 7593. Van Overschee, Peter and Bart De Moor (1993). Subspace algorithms for the stochastic identification problem. Automatica 29(3), 649-660.

Notice that, in both examples, the T2 of prediction error and the scores show similar trends. This is because the normal data was simulated with little batch-to-batch correlation. Though not shown here, the situation is quite different when normal operation data exhibits stronger correlation (i.e., cl> being closer to 1) . 5. SUMMARY In this paper, a general monitoring framework for batch processes was proposed based on statespace models identified directly from the plant 220