It is found that the batch process is more difficultly monitored compared with the continuous process, due to its complex features, such as nonlinearity, non-stable operation, unequal production cycles, and most variables only measured at the end of batch. Traditional methods for batch process, such as multiway FDA (Chen 2004) and multi-model FDA (He et al. 2005), cannot solve these issues well. They require complete batch data only available at the end of a batch. Therefore, the complete batch trajectory must be estimated real time, or alternatively only the measured values at the current moment are used for online diagnosis. Moreover, the above approaches do not consider the problem of inconsistent production cycles.

To address these issues, this chapter presents the modeling of kernel Fisher envelope surface (KFES) and applies it to the fault identification of batch process. This method builds separate envelope models for the normal and faulty data based on the eigenvalues projected to the two discriminant vectors of kernel FDA. The highlights of the proposed method include the kernel project aiming at the nonlinearity, data batch-wise unfolding, envelope modeling aiming at unequal cycles, and new detection indicator easily for online implementation.

7.1 Process Monitoring Based on Kernel Fisher Envelope Analysis

7.1.1 Kernel Fisher Envelope Surface

Consider the batch-wise data matrix with I batches, i.e.,

$$\begin{aligned} \boldsymbol{X}(k)=\left[ \boldsymbol{X}^1 (k), \boldsymbol{X}^2 (k), \ldots , \boldsymbol{X}^I (k)\right] ^\mathrm {T}, \end{aligned}$$

where \(\boldsymbol{X}^i\) consists of \(n_i(i=1,\ldots ,I)\) row vectors and each row vector is a sample vector \(\boldsymbol{X}^i_j(k), j=1,\ldots ,n_i\) acquired at time k and batch i. Each batch has the same sampling period but different operation cycles, i.e., batch i has \({n_i}\left( {i = 1,2,\ldots ,I} \right) \) sampling point. Suppose K is the largest sampling moment among all batches, i.e., \(K = \max \left[ {{n_1},{n_2},\ldots ,{n_I}} \right] \).

Let \(\varPhi (x)\) be a nonlinear mapping rule that maps the sample data from the original space \(\boldsymbol{X}\) into the high-dimensional space \(\boldsymbol{F}\). Suppose that each batch is treated as a class, then the whole data set can be categorized as I classes. The optimal discriminant vector \(\boldsymbol{w}\) is obtained using the exponential criterion function in the feature space \(\boldsymbol{F}\). Since computing \(\varPhi (\boldsymbol{x})\) is not always feasible, a kernel function can be introduced,

$$\begin{aligned} K(\boldsymbol{x}_i,\boldsymbol{x}_j )=< \varPhi (\boldsymbol{x}_i), \varPhi (\boldsymbol{x}_j )>= \varPhi (\boldsymbol{x}_i)^\mathrm {T}\varPhi (\boldsymbol{x}_j ). \end{aligned}$$
(7.1)

This kernel function is introduced to allow the dot product in \(\boldsymbol{F}\) without directly computing \(\varPhi \). According to the principle of reproducing kernel, any solution \(\boldsymbol{w}\in \boldsymbol{F}\) of discriminant vector must lie in the span of all training samples of \(\boldsymbol{w}\):

$$\begin{aligned} \boldsymbol{w} = \sum _{(i=1)}^n{\alpha _i \varPhi (\boldsymbol{x}_i )}=\varPhi \boldsymbol{\alpha }, \end{aligned}$$
(7.2)

where \(\boldsymbol{x}_m, m=1, \ldots , n, n=n_1+n_2+\cdots +n_I\) is the row vector of \(\boldsymbol{X}\). \(\varPhi (x)=[\varPhi (\boldsymbol{x}_1),\ldots , \varPhi (\boldsymbol{x}_n)]; \boldsymbol{\alpha }=(\alpha _1, \alpha _2, \ldots \alpha _n )^{\mathrm {T}}\). The eigenvalues \(T_{ij}\) are obtained by projecting the sampled values \(\varPhi (\boldsymbol{x}_j^i)\) in space onto \(\boldsymbol{w}\).

$$\begin{aligned} \begin{aligned} T_{ij}&=\boldsymbol{w}^{\mathrm {T}} \varPhi (\boldsymbol{x}_j^i )=\boldsymbol{\alpha }^{\mathrm {T}} \varPhi ^{\mathrm {T}} \varPhi (\boldsymbol{x}_j^i)\\&=\boldsymbol{\alpha }^{\mathrm {T}} [ \varPhi (\boldsymbol{x}_1 )^{\mathrm {T}} \varPhi (\boldsymbol{x}_j^i ), \ldots , \varPhi (\boldsymbol{x}_i )^{\mathrm {T}} \varPhi (\boldsymbol{x}_j^i )]\\&=\boldsymbol{\alpha }^{\mathrm {T}} \boldsymbol{\xi }_j^i. \end{aligned} \end{aligned}$$
(7.3)

The kernel sample vector \(\boldsymbol{\xi }_j^i\) is defined as follows:

$$\begin{aligned} \boldsymbol{\xi }_j^i=[K(\boldsymbol{x}_1,\boldsymbol{x}_j^i ), K(\boldsymbol{x}_2,\boldsymbol{x}_j^i ), \ldots , K(\boldsymbol{x}_n, \boldsymbol{x}_j^i) ]^{\mathrm {T}}. \end{aligned}$$
(7.4)

Consider the projection of within-class mean vector \(\boldsymbol{m}_i^\varPhi , i=1, \ldots , I\) , the kernel within-class mean vector \(\boldsymbol{\mu }_i\) is obtained as

$$\begin{aligned} \begin{aligned}&\boldsymbol{\mu }_i=\left[ \frac{1}{n_i} \sum _{j=1}^{n_i} K(\boldsymbol{x}_1, \boldsymbol{x}_j^i ), \ldots , \frac{1}{n_i}\sum _{j=1}^{n_i} K(\boldsymbol{x}_n,\boldsymbol{x}_j^i )\right] ^{\mathrm {T}}. \end{aligned} \end{aligned}$$
(7.5)

Then the kernel between-class scatter matrix \(\boldsymbol{K}_b\) is

$$\begin{aligned} \begin{aligned}&\boldsymbol{K}_b=\sum _{i=1}^I\frac{n_i}{n}(\boldsymbol{\mu }_i-\boldsymbol{\mu }_0 ) (\boldsymbol{\mu }_i-\boldsymbol{\mu }_0 )^{\mathrm {T}}. \end{aligned} \end{aligned}$$
(7.6)

Similarly, consider the projection of overall mean vector \(\boldsymbol{m}_0^ \varPhi \) to the discriminant vector \(\boldsymbol{w}\), the kernel overall mean vector \(\boldsymbol{\mu }_0\) and between-class scatter matrix \(\boldsymbol{K}_ w\) can be calculated as

$$\begin{aligned} \begin{aligned}&\boldsymbol{\mu }_0=\left[ \frac{1}{n} \sum _{j=1}^{n} K(\boldsymbol{x}_1, \boldsymbol{x}_j), \ldots , \frac{1}{n}\sum _{j=1}^{n} K(\boldsymbol{x}_n,\boldsymbol{x}_j )\right] ^{\mathrm {T}} \end{aligned} \end{aligned}$$
(7.7)
$$\begin{aligned} \begin{aligned}&\boldsymbol{K}_ w=\frac{1}{n}\sum _{i=1}^I\sum _{j=1}^{n_i}(\boldsymbol{\xi }_j^i-\boldsymbol{\mu }_i ) (\boldsymbol{\xi }_j^i-\boldsymbol{\mu }_i )^{\mathrm {T}}. \end{aligned} \end{aligned}$$
(7.8)

The discriminant function with the objective of maximizing between class and minimizing within class is equivalent to

$$\begin{aligned} \begin{aligned} \max J(\boldsymbol{\alpha })&=\frac{tr(\boldsymbol{\alpha }^{\mathrm {T}} \boldsymbol{K}_b \boldsymbol{\alpha })}{tr(\boldsymbol{\alpha }^{\mathrm {T}} \boldsymbol{K}_ w \boldsymbol{\alpha })}\\&= \frac{tr(\boldsymbol{\alpha }^{\mathrm {T}} (\boldsymbol{V}_b\boldsymbol{\varLambda }_b \boldsymbol{V}_b^{\mathrm {T}} )\boldsymbol{\alpha }))}{tr(\boldsymbol{\alpha }^{\mathrm {T}} (\boldsymbol{V}_ w \boldsymbol{\varLambda }_ w \boldsymbol{V}_ w^{\mathrm {T}} )\boldsymbol{\alpha })}, \end{aligned} \end{aligned}$$
(7.9)

where \(\boldsymbol{K}_b=\boldsymbol{V}_b\boldsymbol{\varLambda }_b \boldsymbol{V}_b^{\mathrm {T}}\) and \(\boldsymbol{K}_ w=\boldsymbol{V}_ w\boldsymbol{\varLambda }_ w \boldsymbol{V}_ w^{\mathrm {T}}\) are eigenvalue decompositions of between-class and within-class scatter matrices, respectively. To construct the envelope surface model, it is usually assumed that two discriminant vectors are obtained, namely, the optimal discriminant vector and the suboptimal discriminant vector. The kernel sampling vector for sampling point k of batch i is \(\boldsymbol{\xi _k^i}\), which is projected onto the two discriminant vectors to obtain the eigenvalues \(T_{ik}^1\) and \(T_{ik}^2\).

The eigenvalue vectors of all batch at time k in the first two projection direction are \(\left[ {T_{1k}^1,T_{2k}^1, \ldots ,T_{Ik}^1} \right] \) and \(\left[ {T_{1k}^2,T_{2k}^2, \ldots ,T_{Ik}^2} \right] \). Their means of the two eigenvalue vectors are \({mean_1(k)}\) and \({mean_2(k)}\), respectively. Define that

$$\begin{aligned} \begin{aligned} {\max } _1(k) = \max \left[ {|T_{1k}^1 - {mean_1}(k)|,{} {} {} \cdots ,{} {} {} |T_{Ik}^1 - {mean_1}(k)|} \right] \\ {\max } _2(k) = \max \left[ {|T_{1k}^2 - {mean_2}(k)|,{} {} {} \cdots ,{} {} {} \mathrm{{|}}T_{Ik}^2 - {mean_2}(k)\mathrm{{|}}} \right] , \end{aligned} \end{aligned}$$
(7.10)

where \(\max (k)\) is the larger between \({\max _1(k)}\) and \(\max _2(k)\), for all \(k = 1,2, \ldots ,K)\). Then the envelope surface in high-dimensional space is

$$\begin{aligned} {\left( {{x_k} - {mean_1}(k)} \right) ^2} + {\left( {{y_k} - {mean_2}(k)} \right) ^2} = \max {(k)^2}(k = 1,2, \ldots ,K), \end{aligned}$$
(7.11)

where \(({x_k},{y_k})\) is a projection of original data in the feature space, i.e., \({x_k}\) is the eigenvalue in the optimal discriminant direction and \({y_k}\) is the eigenvalue in the suboptimal discriminant direction. Equation (7.11) gives the envelope surface with the maximum variation which allows the eigenvalues at different sampling times for this kind of data.

Unequal Cycle Discussion

Suppose the production period of each batch is different, i.e., \({n_i}\) is varying with the batch i. The envelope surface model is similar as described above, but the difference lies in the composition of the eigenvalue vector. As a simple example, it is known that there are I batches of data in a training data set, and the sampling moment k for each batch varies from 1 to K, K is the largest sampling moment of all batches. Suppose only batch i does not reach the maximum sampling moment K, \(k = 1,\ldots ,{n_i},{n_i} \le K\). The corresponding eigenvalue vectors are \(\left[ {T_{1k}^1,T_{2k}^1, \ldots ,T_{Ik}^1} \right] \) and \(\left[ {T_{1k}^2,T_{2k}^2, \ldots ,T_{Ik}^2} \right] \) if \(k = 1,\ldots ,{n_i}\). When the time increases \(k = {n_i} + 1,\ldots ,K\), the eigenvalue vectors are \(\left[ {T_{1k}^1,T_{2k}^1, \cdots T_{(i - 1)k}^1,T_{(i + 1)k}^1, \ldots ,T_{Ik}^1} \right] \) and \(\left[ {T_{1k}^2,T_{2k}^2, \cdots T_{(i - 1)k}^2,T_{(i + 1)k}^2, \ldots ,T_{Ik}^2} \right] \). Obviously, the parameters in envelope surface model (7.11), \(\max (k)\), \({\max _1(k)}\), and \(\max _2(k)\) are time varying with k.

7.1.2 Detection Indicator

Define the detection indicators as follows:

$$\begin{aligned} \begin{aligned} {P_1}(k)&= \frac{{|T_k^1 - mea{n_1}(k)|}}{{\max (k)}}\\ {P_2}(k)&= \frac{{|T_k^2 - mea{n_2}(k)|}}{{\max (k)}}\\ T(k)&= {(T_k^1)^2} + {(T_k^2)^2}, \end{aligned} \end{aligned}$$
(7.12)

where \(T_k^1\) and \(T_k^2\) are the eigenvalues obtained by mapping the real-time sampling vector \(\boldsymbol{x_k}\) onto the discriminant vector in the higher dimensional space. When the trajectory of eigenvalues at that moment is contained within the envelope surface, there must be \({P_1}(k) < 1\) and \({P_2}(k) < 1\) holds. If the difference between the new batch of data and the training data for this type of envelope surface model is large, the Gaussian kernel function used in the kernel Fisher criterion is almost zero, such that \(T_k^1\mathrm{{ = }}0\), \(T_k^2\mathrm{{ = }}0\), i.e., \(T(k) = 0\). Thus, for a given measured data, using the above indicators, a judgement can be made. When \({P_1}(k)<1\), \({P_2}(k)<1\), and \(T(k)=0\) does not occur, the data sampled at that moment belong to this mode type. When \(T(k)=0\) occurs consistently, it indicates that the sampled data does not belong to this mode type.

It is assumed that it has been determined from the normal operating envelope surface model that the batch of data is faulty at some point. Fault identification is carried out using fault envelope surface models. Consider one of the fault envelope surface models, if \({P_1}(k) < 1\), \({P_2}(k) < 1\), and no \(T(k) = 0\), then the batch fault is in current fault type. If \(T(k)=0\) appears consistently in each envelope model, then the fault that exists may be a new one. When that fault occurs multiple times, the pattern type needs to be updated and an additional envelope model need to be constructed for new fault.

Fig. 7.1
figure 1

Fault monitoring flowchart based on fault envelope surface model

The fault identification using the proposed kernel Fisher envelope surface analysis (KFES) is given as follows. Its fault monitoring flowchart is shown in Fig. 7.1.

Fault Monitoring Algorithm Based on KFES

Step 1: Collect the historical data with S fault categories. Construct S envelope surface models for each category based on the description in Sect. 7.1.1:

$$\begin{aligned} {({x_k} - mean_1^S(k))^2} + {({y_k} - mean_2^S(k))^2}\mathrm{{ = }}{\max }^S (k)^2,(k = 1,2, \ldots ,K). \end{aligned}$$
(7.13)

Then store all the model parameters \(mean_1^S(k)\), \(mean_2^S(k)\), and \({\max }^S (k)\), \((k = 1,2, \ldots ,K)\). Thus, the envelope model library \(Env-model(S,k)\) is constructed.

Step 2: Sample the real-time data \(\boldsymbol{x}_k\). After normalization, the kernel sampling vector \(\boldsymbol{\xi _k}\) is obtained.

Step 3: Under the known S fault envelope surface model at time k, project the kernel sampling vector \(\boldsymbol{\xi _k}\) of \(\boldsymbol{x}_k\) in the direction of the discriminant vectors. Calculate the corresponding project eigenvalues \(T_k^1\), \(T_k^2\) and detection indicators. If \({P_1^S}(k)< 1,{P_2^S}(k) < 1\), and \(T^S(k) \ne 0\), then the fault belongs to category S.

Step 4: If detection indicators in Step 3 are not satisfied for all known fault type, it is possible that a new fault has occurred. When that unknown fault lasts for a period of time, the model library needs to be updated. The envelope surface for this new fault is modeled according to the accumulated new batch data as Step 1, and augmented into the model library.

7.1.3 KFES-PCA-Based Synthetic Diagnosis in Batch Process

The basic idea of synthetic diagnosis integrates the advantage of KFES and PCA. It builds a multiway PCA model for normal operating in the historical database and calculates the monitoring statistics \(\mathrm {T^2}\) and \(\mathrm SPE\) of PCA model and their control limits. The multiway PCA is used for fault detection. For the fault data in the historical database, the KFES is modeled for known fault categories. The KFES analysis is used for fault identification. The modeling and online monitoring process of synthetic diagnosis is shown in Fig. 7.2.

Fig. 7.2
figure 2

Process monitoring flowchart based on KFES-PCA

The normal operating data and S classes fault data were obtained from the historical data set. Firstly, the normal operating condition data \(\boldsymbol{X}(I \times J \times K)\) is expanded into two-dimensional matrix \(\boldsymbol{X}(I \times JK)\) in the time direction. After normalization, the data is unfolding again as \(\boldsymbol{Y}(IK \times J)\) in the batch direction. Perform multiway PCA on the matrix to obtain score matrix \(\boldsymbol{T}\left( {IK \times R} \right) \) and load matrix \(\boldsymbol{P}(J \times R)\), where R is the number of principal components. Then calculate the control limits of the statistics \(\mathrm {T^2}\) and \(\mathrm SPE\).

Instead of using contribution maps, kernel Fisher envelope surface analysis is used for fault diagnosis. Assume that there are S classes in the fault data set. The envelope surface model is first constructed for each fault type. When the new data \({x_{new,k}}\) is obtained, it should be judged whether the current operation is normal by PCA model. If the \(\mathrm {T^2}\) and \(\mathrm SPE\) exceed the control limits, and the fault is detected. Then we can identify the type of fault by KFES model library. If the eigenvalues do not satisfy the indicators in all the known fault models, this fault seems to be new. As long as enough data to KFES modeling are collected, update the new fault model in the model library.

Process Monitoring Algorithm Based on KFES-PCA

A. Offline Modeling

Step 1: Develop an improved multiway PCA model for normal operating conditions data, calculate the statistics \(\mathrm {T^2}\) and \(\mathrm SPE\), and determine the corresponding control \(\mathrm T_{\lim }^2\) and \(\mathrm {SPE_{\lim }}\) based on the score matrix \(\boldsymbol{T}(KI \times R)\) and load matrix \(\boldsymbol{P}(J \times R)\) obtained from the normal model.

Step 2: Apply KFES analysis to the fault data and construct a fault envelope for each type of fault separately. Find the optimal discriminant weight matrix \(\boldsymbol{W_\alpha }\), the mean \({mean_1}(k)\), \({mean_2}(k)\), and maximum \(\max \left( k \right) \) of the eigenvalue vectors.

Step 3: Store \(\mathrm T_{\lim }^2\) and \(\mathrm {SPE_{\lim }}\), the discriminant weight matrix \(\boldsymbol{W_\alpha }\) for each fault type, the mean \({mean_1}(k)\), \({mean_2}(k)\), and the maximum \(\max \left( k \right) \) of the eigenvalues.

B. Online Monitoring

Step 1: Normalize the new batch of data \(\boldsymbol{x_{new,k}}\left( {J \times 1} \right) \) at the kth sampling moment.

Step 2: Calculate the value of statistics \(\mathrm {T^2}\) and \(\mathrm SPE\) and determine if they are over the limit, if not, back to the first step. Otherwise proceed to the next step.

Step 3: The known fault envelope surface model is used for fault identification at that moment. \({\boldsymbol{x}_{new,k}}\left( {J \times 1} \right) \) is the sampling data obtained at the first k sampling moment, normalized and projected onto the discriminant weight matrix \(\boldsymbol{W_\alpha }\) of the kernel Fisher envelope model to obtain the eigenvalues \(T_k^1\) and \(T_k^2\). The eigenvalues are substituted into the index, \({P_1}(k)< 1, {P_2}(k) < 1\), and no \(T(k) = 0\), and the fault is in this fault type.

Step 4: If a fault has been detected based on step 2, but it does not belong to any known fault type obtained from step 3, this indicates that a new fault may have occurred. When that unknown fault has occurred several times, the mode type needs to be updated and the envelope surface model for that fault needs to be augmented with the accumulated batches of new faults in an offline situation.

7.2 Simulation Experiment Based on KFES-PCA

The fed-batch penicillin fermentation simulation platform is used to verify the effectiveness of the KFES-PCA method for fault diagnosis here. Eleven variables affecting the fermentation reaction were selected for modeling, and these variables were air flow, stirring power, substrate flow acceleration rate, temperature, etc. Three simulation failure types were selected as shown in Table 7.1. The total data sets (including 50 batches) were generated from the Pensim 2.0 simulation platform with 1 h sampling interval, consisting of 20 batches of normal operation, 10 batches of bottom flow acceleration rate drop failure, 10 batches of agitation power drop failure, and 10 batches of air flow drop failure. The normal operation data are obtained at different product cycles, one batch with 95 h, two batches with 96 h, two batches with 97 h, three batches with 98 h, five batches with 99 h, and seven batches with 100 h. Similarly, change the reaction duration of each batch, and change the time and amplitude of the failure occurrence. The failure batch data are collected.

Table 7.1 Types of faults in penicillin fermentation processes
Fig. 7.3
figure 3

Envelope surface for normal and three fault operations

Figure 7.3a–d gives the envelope surface of the kernel Fisher discriminant envelope model under the normal operation and three known fault operations offline trained, respectively. Here the x-axis and y-axis represent the direction of the optimal and suboptimal discriminant vector, and the z-axis represents time.

The traditional monitoring methods, such as MPCA and MFDA, require the modeling batches to be of equal length. However, the duration of the different batches tends to change in practice. Therefore, the data of different batches must be preprocessed with equal length when using these methods. The proposed KFES-PCA method unfolds the data in the batch direction during the preprocessing, which can simply cope with the unequal batches of data and therefore easily performed in practice.

The following experiments are designed to perform the online detection with the known fault and new unknown fault data, respectively. The two batches of test data are not included in the training data in order to obtain a valid validation. In addition, a comparative validation using the conventional contribution map method and the improved MFDA method is also carried out (Jiang et al. 2003).

7.2.1 Diagnostic Effect on Existing Fault Types

Experiment 1: Step Drop Fault at Stirring Power

A fault batch data is regenerated for testing with the stirring power drop fault. The fault occurs at 50 h with a step disturbance of \(\mathrm{{ - 12\% }}\) in magnitude until the process ends. The sampled data is first monitored based on \(\mathrm {T^2}\) and \(\mathrm SPE\) statistics, as shown in Fig. 7.4. It can be seen that \(\mathrm {T^2}\) and \(\mathrm SPE\) continues to exceed the limit from 50 h to process end. A failure can be detected when it occurs at 50 h. Table 7.2 records the indicators when it is diagnosed using the envelope surface model of fault 2. It shows that there are \({P_1}(k)< 1,{P_2}(k) < 1\), and no \(T(k) = 0\) with time through from 50 h to 100 h. So it is concluded that this fault of testing batch belongs to fault 2. Figure 7.5 shows the diagnosis results based on each envelope surface model. It can also be seen that the fault matches with the second type of fault, a mixing power drop fault.

Fig. 7.4
figure 4

Monitoring statistics of KFES-PCA method: experiment 1

Table 7.2 The indicators detected in fault 2 envelope surface: experiment 1
Fig. 7.5
figure 5

Fault diagnosis based on envelope surfaces: experiment 1

The contribution plot is used to analyze the testing data at 50 h, as shown in Fig. 7.6. It is found that the second variable contributes significantly to both the statistics \(\mathrm {T^2}\) and \(\mathrm SPE\). This also diagnoses that the fault belongs to fault 2. Therefore, the envelope surface model is equally successful in diagnosing the fault type when compared with the contribution plot method.

Fig. 7.6
figure 6

Contribution plot to statistics \(\mathrm {T^2}\) and \(\mathrm SPE\) at 50 h

The comparison experiment is finished based on the improved MFDA method, as shown in Fig. 7.7. The horizontal coordinate is time. The vertical coordinate is fault type, where 0 represents the normal operation, and 1, 2, 3, and 4 correspond to fault 1, fault 2, fault 3, and unknown fault, respectively. It can be seen that the improved MFDA has a relatively high rate of misdiagnosis and its diagnosis result is not ideal.

Fig. 7.7
figure 7

Fault diagnosis based on improved MFDA: experiment 1

Experiment 2: Step Drop Fault at Air Flow

The testing fault is air flow drop failure and testing data is regenerated with the failure which occurred in 58 h, and its amplitude is \(\mathrm{{ - 10\% }}\) step disturbance until the process ends. The monitoring statistics \(\mathrm{T^2}\) and \(\mathrm{SPE}\) are given in Fig. 7.8. The \(\mathrm{T^2}\) and \(\mathrm{SPE}\) continue to exceed the control limits from 58 h to the end, so a fault is detected at 58 h in real time.

Fig. 7.8
figure 8

Monitoring statistics of KFES-PCA method: experiment 2

Fig. 7.9
figure 9

Fault diagnosis based on envelope surfaces: experiment 2

Figure 7.9 is the monitoring result using the proposed envelope surface model. Table 7.3 records the indicators when using the envelope surface model of fault 3. It can be seen that there are \({P_1}(k)< 1,{P_2}(k) < 1\), and no \(T(k) = 0\) between 58 h and 100 h, so it is judged that the fault which occurred in this testing batch belongs to fault 3. Figure 7.9 shows all the diagnosis results with different envelope surface models. It can also be seen that this fault matches with the model of fault 3, i.e., the air flow drop fault.

The contribution plot of the sampling data at 58 h is shown in Fig. 7.10, where variables 1, 4, 6, and 8 contribute more to the statistic \(\mathrm {T^2}\). The variable 3 contributed more to the statistic \(\mathrm SPE\). The diagnosis result is not significant. Therefore, the envelope surface method can successfully diagnose faults that are not diagnosed by the contribution plot.

The comparison results of the improved MFDA method are given in Fig. 7.11. It shows a relatively higher rate of misdiagnosis and its diagnosis result is not very satisfactory, compared with the proposed KFES-PCA.

Table 7.3 The indicators detected in fault 3 envelope surface: experiment 2
Fig. 7.10
figure 10

Contribution plot to statistics \(\mathrm {T^2}\) and \(\mathrm SPE\) at 58 h: experiment 2

Fig. 7.11
figure 11

Fault diagnosis based on improved MFDA: experiment 2

7.2.2 Diagnostic Effect on Unknown Fault Types

Experiment 3: Slope Drop Fault at Air Flow Rate

Here a new fault is used to test the diagnosis ability of the proposed KFES-PCA method. The slope faults different from the known three fault types are considered. The test fault is a ramp fault in which the air flow rate drops by \(- 15\%\) at 50 h. Firstly, the \(\mathrm T^2\) and \(\mathrm SPE\) statistics are used to detect this new fault. Figure 7.12 shows that the \(\mathrm T^2\) and \(\mathrm SPE\) statistics both detect this fault in time at 50 h.

Fig. 7.12
figure 12

Monitoring statistics of KFES-PCA: experiment 3

The known envelope surface models are used to diagnose this fault. Table 7.4 records that all the indicators are zero when the envelope surface model of fault 3 is used for diagnosis. It means that no fault 3 has occurred. The same indicator results are obtained from the envelope surface models of other known faults. Figure 7.13 gives the diagnosis result under the different envelope surface models. So this fault does not belong to the known fault category and is diagnosed as a new fault. Therefore, the proposed method realizes the real-time diagnosis for unknown faults.

Table 7.4 The indicator detected in fault 3 envelope surface: experiment 3
Fig. 7.13
figure 13

Fault diagnosis based on different envelope surfaces: experiment 3

The diagnosis result of improved MFDA method is given in Fig. 7.14. It can be seen that the improved MFDA does not make a timely and correct diagnosis when the fault occurs. It gives a wrong diagnosis result, fault type 3. The correct result is reported until 63 h. This fault is diagnosed as a new fault, and there is a 13 h delay. Therefore, the improved MFDA method failed to identify new faults.

Fig. 7.14
figure 14

Fault diagnosis based on improved MFDA: experiment 3

7.3 Conclusions

This chapter describes a monitoring method based on KFES-PCA for batch processes. The production cycles of batch processes are often unequal, and monitoring methods for batch processes generally require batch data with consistent production cycles. Although data preprocessing can result in equal cycles, these methods can result in the loss of important information about faults. In addition, many existing monitoring methods often require a complete production trajectory for online monitoring, and filling or estimating unknown values inevitably leads to a decrease in diagnostic performance. To address the above two problems, the modeling process of the KFES method is described in detail and an online monitoring flowchart is presented. Furthermore, a batch fault diagnosis method integrating the KFES and the improved PCA method is proposed. The method is applied to a penicillin fermentation simulation platform and compared with the traditional contribution map method and the improved MFDA method. The results show that the proposed method has better monitoring performance, and it can diagnose faults early and effectively and has the ability to identify unknown faults.