Abstract
This paper deals with the online sample trajectory prediction problem of batch processes considering complex data characteristics and batch-to-batch variations. Although some methods have been proposed to implement the trajectory interpolation problem for quality prediction and monitoring applications, the accuracy and reliability are not ensured due to data nonlinearity, dynamics and other complicated feature. To improve the data interpolation performance, an improved JITL-LSTM approach is designed in this work. Firstly, an improved trajectory-based JITL strategy is developed to extract similar local trajectories. Then the LSTM neural network is used on the basis of the extracted trajectories with a modified network structure. Therefore, trajectory prediction and interpolation can be achieved according to the local JITL-LSTM model at each time index. A simulated fed-batch reactor process is presented to demonstrate the effectiveness of the proposed method.
Keywords
Introduction
Nowadays, batch processes play an important role in modern industry due to the growing demands of high-value products such as pharmaceuticals, food, semiconductors and biological products [1, 2, 3, 4]. As a result, the quality of batch process products has been paid extreme attention to during recent years. Many quality prediction and quality-relevant monitoring methods have been developed to handle with the problems in terms of the final quality of industrial processes over the past decades [5, 6, 7, 8]. Among them, multiway techniques are proposed according to the data characteristics of batch processes by unfolding the original dataset [9]. However, the quality-relevant applications of batch processes are faced with difficulties compared to the traditional continuous processes. Firstly, the complexity of batch data leads to the deficiency of the traditional linear/static models since data nonlinearity and dynamics are common features for batch processes [10]. Secondly, since the future observations are unknown, quality-relevant prediction models have to estimate the current batch trajectory for regression calculation. Finally, although the trajectories of batch processes are identical, batch-to-batch variations still exist and may influence the robustness of offline model [11].
To overcome the problem of data complexity in quality-relevant modelling for batch processes, scholars have developed some improved models to handle with complicated batch data. Kernel methods are widely used to solve the nonlinear problem of process data, while dynamic modelling is implemented to extract the time-varying information [12, 13, 14]. For the interpolation of unknown samples, the mean trajectory is often used and prediction algorithms such as partial least squares (PLS) can be applied to estimate future samples [15]. However, when the mean trajectory of all historical batches is used, batch-to-batch variations may contribute to a lower estimation accuracy of future trajectories, which will further result in larger errors during quality prediction and monitoring steps. Besides, due to the complex characteristics of batch data, the prediction accuracy of traditional linear and static regression models is difficult to be guaranteed.
Recent years, deep learning algorithms are widely used in process modeling and analysis [16]. In this work, a novel online model based on just-in-time learning (JITL) algorithm and long short-term memory (LSTM) network is proposed to implement nonlinear and dynamic trajectory prediction scheme. JITL is introduced to extract the most identical historical batch trajectories to deal with the problem of batch-to-batch variations, while LSTM is used to construct the local nonlinear and dynamic regression model with extracted historical samples [17, 18]. Different from the traditional LSTM network, the model structure is modified to make full use of historical data. The prediction results will further help to achieve a more accurate quality-relevant monitoring.
The rest of this paper is organized as follows: Section 2 introduces some preliminary knowledge of JITL and LSTM. The detailed method combing an improved JITL algorithm and a modified LSTM neural network for online local modelling and prediction of batch trajectories is illustrated in the next section. A case study based on a batch reactor is provided in Section 4 to evaluate the performance of the proposed method. Finally, conclusion is made and future work is assumed.
Preliminaries
Just-in-time learning algorithm
JITL is developed to extract similar samples from known dataset by the calculation of similarity indices. The detailed algorithm is described as follows [19]:
where
LSTM is an improved neural network based on the traditional recurrent neural network (RNN) [20]. Taking the long-term information of time series data into consideration, LSTM take the advantages of the traditional RNN structure and introduce the concept of “gate”. LSTM can preserve additional long-term time-varying information, which presents a better dynamic modeling performance than RNN. Three gates are developed based on the recurrent network structure in LSTM, which are the input gate, the output gate and the forget gate, respectively. The detailed structure of LSTM is demonstrated in Fig. 1.
The structure of LSTM neural network.
It can be inferred from Fig. 1 that a LSTM cell represents the hidden state of a certain time instant, which carries the intrinsic nature of the process data. The cell is constructed to connect the current input
where
The forget gate is designed to keep the long-term memory which can be described as:
The tanh activation function is used to define the short-term new memory, which can be described as:
Therefore, the current cell state
The output gate is designed to define the preserving information for the cell output. Thus, the output gate is defined as:
Finally, the current cell output is defined referring to the current cell state based on the output gate:
According to the network structure of LSTM, the model parameters are calculated based on the back propagation through time (BPTT) algorithm as follows:
Where
Data preprocessing
Different from the continuous processes, the data collected from batch processes present at a three-way form as
The unfolding approach of batch data.
The batch data after implementing the variable-wise unfolding strategy is
In the proposed work, the variable-wise unfolding method is firstly implemented to normalize the batch data, and the batch-wise unfolding approach is executed to obtain the dataset for further modelling steps. By the use of the batch-wise unfolding way, the process dynamics are not broken since the time-varying feature remains in the reorganized data structure.
The original JITL method compares the similarity degree between the current sample and a certain historical sample, which is a sample-to-sample calculation. In this work, the application of JITL is extended to the trajectory-to-trajectory mode. Samples along a period of time are extracted for similarity calculation. The improved trajectory-based JITL method is described as:
where
In this stage, the online LSTM model is trained based on the most similar local historical trajectory with the same time index. JITL is used to extract the most similar nearby samples among various diverse historical trajectories. The prediction result at the current time index will fill the online batch trajectory and become the known sample for the prediction stage of the nearby time indices. The detailed modelling and prediction strategy is illustrated in Fig. 3.
Online batch trajectory modelling and prediction strategy using JITL-LSTM.
In the proposed JITL-LSTM model, the sample
Compared with the traditional LSTM model according to Eqs (4)–(9), the modified model is constructed online based on the most similar historical trajectory at time
The corresponding flow diagram of the proposed method is presented in Fig. 4.
Flow diagram of the proposed method.
The detailed procedure of the proposed method at time
Unfold and normalize the historical batch data; Calculate the similarity indices Construct the LSTM prediction model based on the historical trajectory with the largest value of Calculate the prediction value of the current time index and fill the online batch trajectory with this value; Go to Step (2) with the updated batch trajectory and repeat Step (2) to Step (4) at every future time index.
This method combines the improved JITL algorithm and the LSTM neural network to implement the online prediction of the batch trajectory, which is able to provide more reliable trajectory filling results for further quality prediction and monitoring purpose. During the JITL calculation stage, an integrated similarity index is developed to find the most similar local trajectories to extract online modelling samples. For the LTSM-based modelling and prediction stage, the network structure is modified to make full use of the historical data and updated along the time index. The unknown future samples are becoming “known” during the online prediction procedure and finally a complete trajectory can be estimated with updated local LSTM models.
Compared to the traditional batch trajectory prediction and filling strategies, the proposed method can handle with nonlinear and dynamic data as well as the batch-to-batch variations, which provides a significantly better accuracy and reliability for quality prediction and monitoring of batch processes.
Case study
Process description
In this section, a fed-batch reactor process is introduced to evaluate the effectiveness of the proposed method [21]. The reactor structure is shown in Fig. 5.
In this process, A and B are raw materials while C is the final product and D is undesired byproduct related to B. During the batch operation, reactant A is fed at the beginning and B is fed with a sustained feed rate
The first principle model of the fed-batch reactor is based on the material balance law, which is presented as differential equations:
The variables of this process used for online modelling and prediction are listed in Table 1, as well as the initial values of these variables.
Process variables and values
The fed-batch reactor process.
MATLAB 2018a is used as the simulation software. In the simulation, the total running time of one batch is 206 minutes with a sampling interval of one minute. Twenty historical batches are generated as historical batch data for JITL-LSTM modelling. During the modelling and prediction procedure, variables in Table 1 are regarded as process variables and the sample number of each local modelling stage is set as 6. The weighting parameter
The online prediction results at each time instant
Trajectory prediction and interpolation results using JITL-LSTM: (a) 
Trajectory prediction and interpolation results using JITL-PLS: (a) 
Meanwhile, the trajectory prediction and sample interpolation results using JITL-PLS at the same time instant are shown in Fig. 7, where the similar JITL strategy is used to extract local historical trajectories and PLS is introduced instead of LSTM neural network. To make a comparison of the nonlinear modeling case, kernel PLS (KPLS) is also used as the JITL-KPLS modeling framework. The prediction results of JITL-KPLS are presented in Fig. 8.
The RMSEs of these two methods are presented in Table 2.
RMSEs of the results
Trajectory prediction and interpolation results using JITL-KPLS: (a) 
According to the prediction results of these methods, obviously larger prediction errors occur by the use of the JITL-PLS and JITL-KPLS methods compared with the results using the proposed JITL-LSTM model. The results are due to the excellent nonlinear dynamic modeling performance of JITL. The comparison demonstrates that by the use of the LSTM neural network based on the improved JITL strategy, more accurate and reliable batch trajectory prediction results can be achieved.
In this paper, an online local modelling and prediction method is proposed to estimate future batch trajectories by using the improved JITL algorithm and LSTM neural network. At each time instant, local similar historical trajectories are extracted to construct the corresponding LSTM prediction models. After the prediction of future samples, trajectory interpolations are implemented with the increasing time indices. Therefore, a complete batch trajectory can be estimated at each time instant. The predicted batch trajectories will provide reliable and accurate estimations of process variables for further tasks such as batch quality prediction and monitoring. The results of the case study prove the effectiveness of the proposed method.
Compared to the traditional trajectory interpolation methods, the proposed method can handle with data nonlinearity and dynamics, as well as batch-to-batch variations, which are common problems during batch process modelling steps. Future work will focus on two parts based on the existing framework. The first part is the quality prediction and monitoring based on the batch trajectory estimation results. The other part is the improvement of the modelling performance when faced with faulty conditions or serious batch-to-batch variations of the online batch.
Footnotes
Acknowledgments
This work is supported by the National Natural Science Foundation of China 61673349, the Natural Science Foundation of Zhejiang LQ19F030004, the General Scientific Research Project of Zhejiang Department of Education Y201839765, and the Foundation of Key Laboratory of Advanced Process Control for Light Industry (Jiangnan University) APCLI1804.
