Mathematical Problems in Engineering

Volume 2015 (2015), Article ID 761280, 9 pages

http://dx.doi.org/10.1155/2015/761280

## Recursive Gaussian Process Regression Model for Adaptive Quality Monitoring in Batch Processes

^{1}State Key Laboratory of Industrial Control Technology, Zhejiang University, Hangzhou, Zhejiang 310027, China^{2}Department of Chemical Engineering, Chung-Yuan Christian University, Chung-Li 320, Taiwan

Received 5 November 2014; Revised 23 December 2014; Accepted 23 December 2014

Academic Editor: Gang Li

Copyright © 2015 Le Zhou et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

In chemical batch processes with slow responses and a long duration, it is time-consuming and expensive to obtain sufficient normal data for statistical analysis. With the persistent accumulation of the newly evolving data, the modelling becomes adequate gradually and the subsequent batches will change slightly owing to the slow time-varying behavior. To efficiently make use of the small amount of initial data and the newly evolving data sets, an adaptive monitoring scheme based on the recursive Gaussian process (RGP) model is designed in this paper. Based on the initial data, a Gaussian process model and the corresponding SPE statistic are constructed at first. When the new batches of data are included, a strategy based on the RGP model is used to choose the proper data for model updating. The performance of the proposed method is finally demonstrated by a penicillin fermentation batch process and the result indicates that the proposed monitoring scheme is effective for adaptive modelling and online monitoring.

#### 1. Introduction

In modern industries, batch and semibatch processes are of great importance for the production of high-quality and value-added specialty chemicals, such as semiconductors, pharmaceuticals, and biological products. For product consistency and quality improvement, multivariate statistical process monitoring (MSPM) has been developed and widely used in many batch processes [1–11]. Nomikos and MacGregor [12, 13] are the first to apply multiway principle component analysis (MPCA) and multiway partial least squares (MPLS) to batch process monitoring. MPCA is powerful at analyzing the batch-to-batch variations and monitoring the newly evolving batches with the assumption that the batchwise unfolded data follow a multivariate Gaussian distribution. However, there are still some disadvantages of the conventional MPCA and its extensions. Firstly, MPCA assumes that the length of each batch is equal, which is unlikely to happen in practice. Furthermore, the entire batch data are needed for MPCA for online monitoring. Hence, the unknown future data of a newly evolving batch have to be estimated. Also, it is hard to reveal the timewise variations since the entire batch data are treated as a single object [14]. To solve these problems, variable-wise unfolding approaches were developed [15]. This method provides a straightforward scheme for online monitoring and the equal length of the collected batches is not required.

It is noticed that, however, both batchwise and variable-wise unfolding methods are based on the sufficient batch data. Abundant data are easy to be collected in the rapid manufacturing process, such as wafer etching, spray-drying, and spray-coating. Nevertheless, it is time-consuming and expensive to obtain data from slow chemical processes, such as emulsion polymerization, fermentation, and pharmaceutical and biotechnical products [15]. In this situation, it is not proper to construct monitoring models after all the sufficient data are collected. It is interesting to design a statistical scheme to construct an initial model using limited batch data and then adapt the strategy when newly evolving batch data arrive. Therefore, Zhao et al. [14, 16] proposed an adaptive monitoring model based on ICA [14]. In their article, multiphase ICA was constructed based on limited reference cycles and an adaptive algorithm was formulated with the accumulation of newly available normal batches. However, their adaptive strategy was complex and time-consuming since the adaptive criterion was not straightforward and the updated model needed to be retrained completely.

Process monitoring is crucial not only to process safety but also to quality improvement. When the quality variables are examined, an input-output model is needed to reveal the quality-relevant variations. Since the batch process data are highly nonlinear, dynamic, and seriously interconnected with uncertainties, it is hard to build the relationship between the process variables and the quality variables and detect the abnormal production conditions. Therefore, there has been an increasing interest in quality monitoring of batch processes [13, 16–19]. However, their research was also conducted based on the assumption that the normal batch data were sufficient, when the chemical batch processes are operated in a long batch time. Moreover, the process is slow-responding. Thus, only limited batch runs can be used for modelling. With the restricted batch data, the statistical process analysis would be inaccurate. Also, the time-varying behavior of the newly evolving batches may not be completely described based on the data recorded in the early stage of the operating batches. Hence, an adaptive strategy is important for batch quality monitoring, especially in slow processes.

In this paper, a recursive Gaussian process (RGP) model is designed for adaptive quality monitoring with limited initial batch data. A Gaussian process (GP) model is trained at first using limited batch data to construct the relationship between the process and the quality variables. In the GP model, the measure of the confidence level in the prediction is also taken into account. Hence, not only the mean value but also the variance of the quality prediction is supplied. With the estimation of the variance from GP as a level of confidence, the adaptive strategy is proposed to determine when and how the model should be updated. This updating strategy is straightforward and easy to implement. It is helpful to describe the time-varying dynamics over batches. Using the online updating strategy, an adaptive quality monitoring scheme is constructed.

The rest of the paper is organized as follows. The Gaussian process model is revisited in Section 2. Next, the batch process monitoring based on GP using limited batch data is discussed. The SPE statistic and its confidence bound are constructed then. With the accumulation of newly evolving batches, the updating strategy is developed and the implementation of the recursive GP based adaptive quality monitoring in the batch process is discussed in Section 3. Also, an industrial case is provided to demonstrate the efficiency of the proposed method in Section 4. Finally, conclusions are made.

#### 2. GP Regression Model

In supervised learning, the objective is to infer a distribution over functions given the inputs and outputs . Usually, a parametric representation for the function is assumed. Then the model parameters are inferred instead of . The methods above are called parametric modelling. In nonparametric modelling, without limitations of the model structure, the distribution over functions themselves is inferred. In a GP model, Bayesian inference is used for estimating the distribution of functions.

Given inputs and outputs , a GP model defines a Gaussian prior distribution as [20] where is the mean value of outputs and is the covariance function in which . In the GP model, the data collected are not assumed to follow the same Gaussian distribution any more. On the contrary, all the samples follow a joint Gaussian distribution. Hence, the joint Gaussian distribution of the training data and the test data can be estimated: where and . According to the property of conditional Gaussian distribution, the posterior distribution of the test data has the following form:It is noticed that it is common to use the mean function as since GP is flexible enough to model arbitrary mean value [20]. In the kernel function of GP, any positive definite kernel can be used for GP covariance. Generally, three common kernels, linear kernel, Gaussian kernel, and squared-exponential kernel, are mostly used [21]. In this paper, Gaussian kernel is employed, which is given by [22] where controls the vertical length scales of the function and reflects the horizontal variations. To estimate the kernel parameters, which are called hyperparameters, the empirical Bayes approach is used. Firstly, the marginal log-likelihood is written as [20] Then the log-likelihood is maximized with respect to each hyperparameter as [23] In the GP model, it will take to compute and for hyperparameter gradient estimation. Particularly in the batch process model, the model needs to be updated with the newly evolving batches. With the accumulation of the sample size, the training of the GP model is time-consuming. In this research work, a RGP model needs to be constructed.

#### 3. Adaptive Quality Monitoring Based on RGP in Batch Processes

For a slowly varying batch process, all the batch data cannot sufficiently be collected at the initial operation stage. If the monitoring system is not adapted with the newly evolving batches, it will cause nuisance alarms. An online adaptive strategy is proposed to determine when the model needs to be updated and how to adapt the model without retraining the GP model using all the data set. The update criterion is based on the estimation of the variance from GP and the SPE statistic to judge if the newly evolving data are needed for updating. Then the covariance matrix of GP is recursively updated to provide a better representative of the current state of the system.

##### 3.1. GP Based Batch Process Monitoring with Limited Batches

Using limited batch data at first, the data are collected in the form of three-dimensional array. Assume the measured process variables are summarized as , where variables are collected at times and is the batch number. Simultaneously, the key quality variable is collected as . For simple explanation, only single quality variable is measured, but it is very easy to extend it to multiple quality variables. Also, in this paper, a variable-wise unfolding method is used for data preprocessing [15]. Using the unfolded matrix and , a GP model can be trained as an initial quality monitoring model to identify the early correlations between the process and the quality variables.

The prediction error of the GP model and the corresponding SPE statistic can be calculated as [24] The confidence limit of SPE is approximated by distribution as , in which and are the parameters of distribution and they are estimated as [25]The significance level of SPE statistics is 99%. When a new sample of the process variables is collected, the prediction value of quality can be estimated using (3) and the SPE statistic is calculated using (7). Generally, if the SPE statistic exceeds the control limit, it is thought that a fault occurs and vice versa. It is noticed that, however, the accuracy of the statistic is not evaluated because most of the time the collected data are not sufficient in the initial modeling stage. In the GP model, not only the mean value but also the variance of prediction of each sample is provided. With the variance serving as a measure of the confidence for the prediction, the required information can be found and included to enhance the accuracy of the monitoring model. Since the prediction follows a Gaussian distribution, the real value of quality mostly relies on a region covering of the prediction distribution around the mean. Owing to the uncertainty of prediction, the SPE statistic can also be estimated in a corresponding confidence region instead of a single value. According to the criterion, the upper and lower limit of mean can be estimated as . Then the prediction error and the SPE statistic of and are calculated using (7). Similarly, can also be constructed based on the prediction error between mean value and the real value. It is noticed that and are not the real bounds of the SPE statistic because of the quadratic property. However, it is easy to prove that the upper and lower limits can be determined by , , and : In this way, the confidence bound of the SPE statistic is constructed to evaluate its reliability. If is below the control limit while is above it, the normal state this time becomes questionable. By contrast, in some states there may be false alarms if only is above the control limit while indicates it is normal. Thus, the confidence bound of the SPE statistic is helpful for online updating strategy for quality monitoring in batch processes.

##### 3.2. Updating Strategy and RGP Based on Adaptive Quality Monitoring

After the initial monitoring model is built using the early collected normal batches, with the new batch data evolved, one needs to judge if the model should be adjusted to enhance the predictability of the monitoring model. Based on the discussions in the previous section, we have the following.(1)If the upper bond of the test data is still below the control limit, there is statistically sufficient evidence to show that it is normal, no more new information is needed, and the original model is good enough without being updated.(2)If the lower bond of the test data is larger than the control limit, chances are that almost all the potential values of predictions are far from the real data. In this situation, it is highly doubted that an abnormal variation has occurred, and it is mainly caused by the unknown disturbances instead of the normal time-varying behavior.(3)If the control limit falls in the region of the statistic, in which it is larger than and smaller than , the cases become indistinct. The result indicates that part of the potential values has exceeded the control limited while others have not. Hence, the part of false alarm results from the failure of initial models and an updating model is needed to adapt the model to the state of current batches.Figure 1 illustrates the updating strategy of our method and the relationship between and of a test data and the control limit. In Figure 1, the value of -coordinate is the control limit based on the mean prediction error of the normal data. Hence, when the control limit is smaller than , all the test data are defined as faults; when the control limit is larger than , it indicates that almost all the possible prediction values fall in the normal region and all the test data would be normal.