Active Fault-Tolerant Control of Nonlinear Batch Processes with

Nov 22, 2007 - In this paper, an active fault-tolerant control scheme is developed for ... Robust fault-tolerant iterative learning control for discre...
1 downloads 7 Views 454KB Size
9158

Ind. Eng. Chem. Res. 2007, 46, 9158-9169

Active Fault-Tolerant Control of Nonlinear Batch Processes with Sensor Faults Youqing Wang,†,‡ Yi Yang,† Donghua Zhou,‡ and Furong Gao*,† Department of Chemical Engineering, The Hong Kong UniVersity of Science and Technology, Clear Water Bay, Kowloon, Hong Kong, and Department of Automation, Tsinghua UniVersity, Beijing 100084, People’s Republic of China

In this paper, an active fault-tolerant control scheme is developed for nonlinear batch processes with sensor faults. This scheme contains three modules: a fault detection and isolation (FDI) module, an output estimation module, and a controller. A batchwise neural-network-based FDI and a batch-wise neural-network-based soft sensor are proposed as the first and second modules, respectively, together with an iterative learning controller. In the nominal case, the measured output is used in the iterative learning control. After a fault is detected and isolated, the estimation produced by the soft sensor is used. The FDI and estimation modules are not modelbased; therefore, most types of sensor faults can be addressed. To illustrate the effectiveness and practicability of this method, two examples are given: the first one is simulation study on a three-tank system, and the second one is an experimental application on the injection molding process. 1. Introduction Batch processes are the preferred manufacturing choice for low-volume and high-value products such as specialty chemicals, pharmaceuticals, consumer products and bio-products. Studies on batch process control can be dated back to the 1930s.1 The last 10 years have witnessed a resurgent interest on batch processing technologies driven by manufacturing business.2 The demand for productivity leads increasingly for plants to operate under challenging conditions, which consequently exposes the possibility of system faults. If a fault is not detected promptly with a proper corrective action, it will degrade the process performance and, in a serious case, result in a safety problem for the plant and personnel. With the ability of maintaining the control performance at an acceptable level in the presence of faults, fault-tolerant control (FTC), using analytical redundancy, has received significant attention;3,4 however, most of them are designed for continuous processes. Batch processes also suffer from process faults. In the work of Wang et al.,5 an iterative learning reliable control scheme was designed for batch processes with actuator faults. To the best knowledge of the authors, this is the only reported study on FTC for batch processes using analytical redundancy. In this paper, designing FTC for batch processes with sensor faults is considered. Sensor fault is common in industrial processes; however, FTC of sensor faults is significantly different from that of actuator faults. As explained in section 2, passive FTC method cannot address the output tracking problem under sensor faults. Hence, a fault detection and diagnosis (FDD) module should be first designed. Most existing FDD methods are model-based;6-9 that is to say, if the model is not accurate enough, these methods cannot be used. In addition, it is often assumed that some a priori information of faults is known; for instance, the position of the fault should satisfy some matrixrank conditions reported by Wang and Zhou,9 and the fault gains are assumed to be constant in the work of Wang et al.10 Because batch processes are nonlinear in most cases, it is difficult to * To whom correspondence should be addressed. Tel.: +852-2358 7139. Fax: +852-2358 0054. E-mail address: [email protected]. † Department of Chemical Engineering, The Hong Kong University of Science and Technology. ‡ Department of Automation, Tsinghua University.

obtain accurate models of this class of processes. Data-based methods have been shown to be promising to address the absence of an accurate model;11,12 however, their applications are mostly limited to fault detection. To conquer the scarcity of practical fault estimation method, a neural network (NN) is adapted, thanks to its excellent approximation ability. To exploit the repetitive nature of batch processes, the differences between any two batches are studied. NNs are used to identify the relationship between the differences of input and output in the batch direction. Based on these NNs, we can obtain a batchwise (abbreviated hereafter as B-wise) NN-based FDI and a B-wise NN-based soft sensor. Similarly, because of the repetitive nature of batch processes, iterative learning control (ILC) is used as the controller. The process is monitored by the B-wise NN-based FDI: in nominal cases, the measured outputs are used for the controller; after a sensor fault is detected and isolated, the corresponding output is replaced by its estimation produced by the soft sensor. Compared to the existing methods,6-12 the proposed FDD method has some advantages: it can be used for a large class of nonlinear processes, and more types of sensor faults can be examined. Therefore, this is a practical scheme for batch processes. The experimental application to an industrial injection molding process shows that this scheme is effective. This paper is organized as follows. The motivation is discussed in section 2. Section 3 presents the problem formulation. The main results, including the B-wise NN-based FDI, the B-wise NN-based SS, and the iterative learning FTC, are given in section 4. In section 5, simulation results on a threetank system are given. The effectiveness and practicability of the proposed scheme also are demonstrated experimently on injection velocity control in section 6. Finally, conclusions are given in section 7. 2. Motivation Example This simple example is given to illustrate control performance difference under the actuator or sensor faults. Consider the following simple first-order system:

{

x˘ (t) ) -x(t) + u(t) y(t) ) x(t)

10.1021/ie0702835 CCC: $37.00 © 2007 American Chemical Society Published on Web 11/22/2007

(1)

Ind. Eng. Chem. Res., Vol. 46, No. 26, 2007 9159

Figure 1. Comparison of actuator fault and sensor fault: (a) closed-loop state under actuator bias fault; (b) closed-loop state under actuator gain fault; (c) closed-loop state under sensor bias fault; and (d) closed-loop state under sensor gain fault.

Suppose that the control objective is to have y(t) to track the setpoint yr ) 1. To do so, let us choose the following simple PI controller:

{

e(t) ) yr - y(t) u(t) ) e(t) +

∫t0 e(s) ds

(2)

Now, let us compare the following four cases of faults. (a) Actuator Bias Fault. Assume that the actuator bias fault is described as

u f ) un + b

(3)

where un denotes the control law in the nominal case, while uf denotes the actual control signal in the fault case; b denotes the unknown bias. The closed-loop responses under different values of b are given in Figure 1a: the solid curve denotes the closedloop state in the nominal case, the dotted curve denotes the state when b ) -1, and the dashed curve denotes the state when b ) +1. (b) Actuator Gain Fault. Assume that the actuator gain fault is described as

u f ) c × un

(4)

where c denotes the unknown fault gain. The states of the closed-loop system under different c are given in Figure 1b. (c) Sensor Bias Fault. Assume that the sensor bias fault has the following form:

yf ) yn + b

(5)

where yn denotes the real output, while yf denotes the measured output in the fault case; b denotes the unknown bias. The states under different b are given in Figure 1c.

(d) Sensor Gain Fault. Assume that the sensor gain fault is formed as

yf ) c × yn

(6)

where c denotes the unknown fault gain. The states under different c are given in Figure 1d. From Figure 1, we can determine that the control objective can be achieved using controller 2, even with an actuator bias or gain fault; however, the control objective cannot be achieved when there is a sensor fault. When the control objective is output tracking, this conclusion holds for all fixed controllers. Hence, a passive FTC is ineffective to tolerate sensor faults; therefore, an active FTC scheme is necessary to address this type of fault. 3. Problem Description Consider the following nonlinear batch process:

{

x(t + 1, k) ) F(x(t,k),u(t,k)) y(t,k) ) G(x(t,k),u(t,k)) + V(t,k) z(t,k) ) H(x(t,k),u(t,k)) x(0,k) ) x0,k, t ) 0, 1, ...,T, k ) 1, 2, ...

(7a) (7b)

where t denotes the time; k denotes the batch or cycle index; x(t,k) ∈ Rn, u(t,k) ∈ Rm, y(t,k) ∈ Rl and z(t,k) ∈ Rq represent, respectively, the states, inputs, measured outputs, and controlled outputs of the process at time t in the kth batch run; V(t,k) represents the unknown measurement noise; F(‚,‚):Rn × Rm f Rn, G(‚,‚):Rn × Rm f Rl , and H(‚,‚):Rn × Rm f Rq are the process functions; and x0,k is the timewise initial state of the kth batch run. Because the initial state of each batch can usually be reset in many applications, it is assumed in this paper that x0,k t x0. The aforementioned formulation can describe a large class of batch processes. The following assumptions are introduced in this paper.

9160

Ind. Eng. Chem. Res., Vol. 46, No. 26, 2007

Assumption 1: F, G, and H are unknown. Remark 1. In most cases, batch processes are nonlinear; however, it is difficult to identify the accurate model of the process dynamics. Therefore, assumption 1 reflects the reality in engineering. Assumption 2: G can be divided into two parts:

G)

[] H H

Therefore, the measured output can be divided into two parts:

[]

y y ) yz z

Remark 2. Because the controlled output z is often predetermined by process engineers, it is easy to make assumption 2 hold. The measured output contains two parts: yz and yz, where the former is the measurement of z, whereas the latter is the redundant information. For FTC, redundancy is necessary. The statements and experiments in sections 5 and 6 will show that yz is important and necessary for the FTC design. The control objective is to determine a FTC law such that z(t) tracks a given setpoint, zr(t), as close as possible, even with sensor faults. Because the process model described by eq 7 is unknown, some identification procedure should be followed to obtain the relationship between the input u and controlled output z. There exist many system identification methods, such as the step response experiment13 and the closed-loop relay feedback experiment.14 It is assumed that the following linear model is obtained for controller design:

{

z(t + 1,k) ) Az(t,k) + Bu(t,k) yz(t,k) ) z(t,k) + Vz(t,k)

(8)

Using the model described by eq 8, we can design an ILC law for the process described by eq 7:

u(t,k) ) u(t,k - 1) + γ(t,k)

(9)

where u(t,k - 1) is the feedforward part and γ(t,k) is called the updating law of the ILC. The objective for ILC design is to determine the updating law such that z(t,k) tracks zr. Much literature exists in this field. A systematic method for the analysis and design of ILC systems was presented in the work of Gorinevsky15 on frequency domain. In the work of Shi et al.,16,17 the batch process under ILC is modeled as a twodimensional (2D) system and the design of a robust ILC for a batch process is transformed to a robust stabilization problem of the 2D system. Generally, the updating law can be described as the following form:

γ(t,k) ) Y(yz(t,k),zr(t),/)

(10)

That is to say, γ(t,k) is related to the measured output yz(t,k) and the setpoint zr(t); of course, it also might be related to other variables, such as yz(t,k - 1). How to design the nominal ILC is not the focus of this paper, so it is assumed that ILC eqs 9 and 10 has been designed. From eqs 8 and 10, we obtain a nominal control law independent of yz; hence, a sensor fault in measuring yz will not affect the closed-loop process. Therefore, the following assumption is introduced. Assumption 3: There is no fault in measuring yz.

Figure 2. Layout of the three-tank system (model DTS200). Table 1. Technical Parameters of DTS200 parameter

value

A Sn Q1max Q2max az1 az2 az3 ∆T g

154 cm2 0.5 cm2 100 cm3/s 100 cm3/s 0.5 0.6 0.6 1s 981 cm/s2

In this paper, we will design a FTC that can tolerate sensor faults in measuring yz. Because yz ∈ Rq, there are q sensor faults to be considered. In practice, it is infrequent that two or more than two sensor faults occur simultaneously; therefore, it is assumed that only a single fault might occur at one time. 4. Main Results 4.1. Fault Detection and Isolation. To achieve active fault tolerance, a FDI scheme should be designed first to detect the fault and to isolate which sensor has fault. Define ∆k,jξ(t) ( ξ(t,k) - ξ(t,j), where ξ ) x,u,y,V, then the following equation can be obtained from eq 7:

∆k,jx(t + 1) ) F(x(t,k),u(t,k)) - F(x(t,j),u(t,j)) (F h (∆k,jx(t),∆k,ju(t))

(11a)

∆k,jy(t) ) G(x(t,k),u(t,k)) - G(x(t,j),u(t,j)) + V(t,k) - V(t,j) (G h (∆k,jx(t),∆k,ju(t)) + ∆k,jV(t)

(11b)

Remark 3. Note that F h (0,0) and G h (0,0) are just two marks, and their exact definitions are given in eqs 11. In fact, if F and G are nonlinear functions, F h (0,0) and G h (0,0) are not functions of ∆k,jx and ∆k,ju in strict meaning. However, these denotations can clearly inspire us that there is some complex and unknown relation between ∆k,jyz and ∆k,ju, and the NN may be a good choice to approximate this relation. From eqs 11, we know that ∆k,jyz and ∆k,ju have a certain relationship. If this relationship is known, sensor faults in measuring yz can be detected and isolated; however, F and G are unknown. This relationship can be seen much clearer from eq 8,

{

∆k,jz(t + 1) ) A∆k,jz(t) + B∆k,ju(t) ∆k,jyz(t) ) ∆k,jz(t) + ∆k,jVz(t)

(12)

Ind. Eng. Chem. Res., Vol. 46, No. 26, 2007 9161

Figure 3. Control results under nominal iterative learning control (ILC): (a) liquid level of tank 1; (b) liquid level of tank 2; (c) flow rate of pump 1; and (d) flow rate of pump 2.

but, in most cases, the model described by eq 12 might be too rough to be used for fault detection and isolation. With excellent approximation of a nonlinear function, the neural network (NN) could be used to identify the relationship between ∆k,jyz and ∆k,ju. For fault isolation, q NNs, NETd_i (for i ) 1, 2, ..., q), are established for q sensors respectively. The input of NETd_i (for i ) 1, 2, ..., q) is

(∆k,ju1(t),‚‚‚,∆k,ju1(t - pi1); ∆k,ju2(t),‚‚‚,∆k,ju2(t pi2); ‚‚‚; ∆k,jum(t),‚‚‚,∆k,jum(t - pim)) d (t), which is the estimation of ∆k,jyz,i(t). and the output is ∆k,jyˆ z,i The order of NETd_i (for i ) 1, 2, ..., q) is defined as (pi1, pi2,‚‚‚,pim). Assume that k > j and there is no fault in cycle j, if

d (t))| g i(t) |yz,i(t,k) - (yz,i(t,j) + ∆k,j yˆ z,i h i,T0]) (13) (for t ∈ [T0 - T

then there is a fault in sensor i, where i(t) is the detection threshold for sensor i and T h i is the length of detection window (this is called the detection length for short). In section 4.4, we will discuss how to determine (pi1,pi2,‚‚‚,pim), i(t), and T h i. Because the differences of inputs in the batch direction are used in the aforementioned scheme, it is called batchwise neuralnetwork-based fault detection and isolation module (abbreviated as B-wise NN-based FDI). 4.2. Output Estimation. After a fault in sensor i (for i ) 1, 2, ..., q) was detected, another observer is needed to estimate the real output, yz,i or zi. Similar to the previous section, we know that ∆k,jyz,i(t) is a function of ∆k,ju(t), ∆k,jyz,ih(t) (i * hl ∈ {1, 2, ..., q}) and ∆k,jyjz(t), which are healthy in this case. Therefore, a neural network, NETe_i (i ) 1, 2, ..., q), can be established to estimate ∆k,jyz,i(t), using ∆k,ju(t), ∆k,jyz,ih(t) (i * hl ∈ {1, 2, ..., q}), and ∆k,jyjz(t). Similar to section 4.1, the order of NETe_i (i ) 1, 2, ..., q) can be defined. The output of this

e j e (t), then yˆ z,i (t,k) ( yz,i(t,j) + ∆k,jyˆ z,i (t) is NN is denoted as ∆k,jyˆ z,i estimation of yz,i(t,k), based on the information in batch j. This scheme has another advantage. Assume j1, j2, ..., jR < k and the process is healthy in batch j1, j2, ..., jR; then we could R jr jr yˆ z,i (t,k) as the estimation of yz,i(t,k). If all yˆ z,i (t,k) use (1/R) ∑r)1 R jr (r ) 1, 2, ..., R) are no-bias estimations, (1/R) ∑r)1 yˆ z,i(t,k) is also a no-bias estimation. In addition, according to estimation R jr theory, (1/R) ∑r)1 yˆ z,i (t,k) has a smaller estimation error square jr R jr yˆ z,i (t,k) has than any yˆ z,i(t,k) (r ) 1, 2, ..., R); hence, (1/R) ∑r)1 better performance. Correspondingly, the proposed scheme in this section can be called batchwise neural-network-based soft sensor (abbreviated as B-wise NN-based SS). The proposed FDI and SS modules are both batchwise. In fact, timewise modules, which use the data in the current batch only, can also be used to detect and isolate the fault and estimate the real output. Compared to conventional time wise methods, batchwise methods have the following advantages: (1) Data in previous batches can be used. Generally, a batch process has a good repetitive nature, so data in previous batches can provide good information for detection, isolation, and estimation in the current batch. (2) More train data can be obtained. To use B-wise NN-based FDI and B-wise NN-based SS, these NNs should be trained. Assume there are M batches of measured data. For the conventional method, only M groups of data can be used for training; however, for the batchwise method, the groups of data that can be used are represented as

() M 2

where the presented martix denotes a combination of 2 from M. It is clear that

()

M >M 2

9162

Ind. Eng. Chem. Res., Vol. 46, No. 26, 2007

Figure 4. Control results with an incipient gain fault in sensor 1: (a) liquid level 1, under FTC and nominal laws; (b) liquid level 2, under FTC and nominal laws; (c) input signal 1 of FTC; (d) input signal 2 of FTC; (e) fault detection result for sensor 1; and (f) fault detection result for sensor 2.

Therefore, the B-wise NNs can have better performance than conventional timewise NNs trained on the same data. 4.3. Fault-Tolerant Control. With B-wise NN-based FDI and B-wise NN-based SS designs, it is natural to design the following active FTC law. Algorithm 1. (1) Initialization: In cycle k, let k* ) k and j* ) k - 1. (2) Control law defined by eqs 9 and 10 is used. If cycle k* ends, let k* ) k* + 1 and j* ) j* + 1. (3) Take ∆uk*,j* (t) as the input of NETd_i (i ) 1, 2, ..., q) d and obtain the output ∆k*,j* yˆ z,i (t). If eq 13 holds, go to step 4; else, go to step 2. (4) There exists a fault in sensor i; the control law then becomes

{

u(t,k*) ) u(t,j*) + γ(t,k*) γ(t,k*) ) Y(yˆ iz(t,k*),zr(t),/)

(14)

where j* (t,k*) ‚‚‚ yz,q(t,k*) ]T yˆ iz(t,k*) ) [yz,1(t,k*) ‚‚‚ yˆ z,i

(15)

In other words, yˆ iz(t,k*) is the output with the ith term replaced by its estimation. If cycle k* end, go to step 5. (5) If eq 13 does not hold for the entire cycle k*, then the fault vanished. Let k* ) k* + 1 and j* ) k* - 1 and go to step 2; else, let k* ) k* + 1 and go to step 4.

Remark 4. Step 5 is used to judge whether the fault vanishes. Obviously, the speed of this judgment is not crucial, so a conservative scheme is used here. For example, assume that the fault vanished at time t* of cycle k*; therefore, it is possible that eq 13 holds in interval [0,t*] of cycle k*. Therefore, it might be not true that eq 13 does not hold for the entire cycle k*. There is no fault in cycle k* + 1, so eq 13 does not hold for the entire cycle k* + 1; then, at the end of cycle k* + 1, we are sure that the fault vanished. Hence, the delay of this detection scheme may be more than one cycle but is generally less than two cycles. 4.4. Network Training and Parameter Designing. In this section, it is discussed how to select the order and weight of input, to choose the training data and design some parameters. The order of the NN is essentially determined by the order of the process. A commonly used method to select the order is to try different combinations of the system input-output data and choose the best one, giving minimum prediction error. This method is increasingly difficult to apply to industrial systems, because of their multivariable nature and complexity. Many simpler methods have been proposed to determine the order of the NN. With linearized models for a nonlinear process at several operating points, a simple order selection method has been proposed by Gomm et al.18 This method has been extended to the multiple-input-multiple-output (MIMO) case in Yu et al.19 With the batchwise and repetitive nature of batch processes, the process model described by eqs 11 generally has low order,

Ind. Eng. Chem. Res., Vol. 46, No. 26, 2007 9163

Figure 5. Control results with a complete failure in sensor 1: (a) liquid level 1, under FTC and nominal laws; (b) liquid level 2, under FTC and nominal laws; (c) input signal 1 of FTC; (d) input signal 2 of FTC; (e) fault detection result for sensor 1; and (f) fault detection result for sensor 2.

which is also one reason why the batchwise scheme is proposed. In this paper, the orders of these NNs are all selected as (1, 1, ‚‚‚, 1). For industrial application, the inputs for the NN might have different units, even belonging to a different units system. In addition, the orders of magnitude of their absolute values are different. In the work of Sola and Sevilla,20 it has been shown that an adequate normalization is important to reduce the estimation errors and the calculation time needed in the training process. As noted in Sola and Sevilla,20 the input weights are necessary if the inputs are different, in regard to both units and magnitude. The weight of the input Is could be proportional to the reciprocal of its mean absolute Value,20

Ws ∝

1 MEAN|Is|

To train these NNs well, the training data should cover a large range. Therefore, the process should be operated with different setpoints, and these data are then used to train the NN. For each output, at least three setpointssa smaller one, a larger one, and the nominal onesshould be tracked; experimentially, the variation of these setpoints should >10%. NETe_i should be able to describe the variation in output i, so the data with different setpoints for output i but fixed setpoints for other outputs should be used to train this NN. NETd_i should be sensitive to a fault in output i but robust to faults in other outputs; hence, the data with the same setpoint for output i but

different setpoints for other outputs should be used to train this NN. Because the setpoints for the outputs are chosen by the engineer, these training data are easy to obtain in practice. For fault detection, the false alarm rate, missed alarm rate, and delay of detection should be as small as possible. Generally, when the detection threshold i(t) decreases, the false alarm rate will increase while the missed alarm rate will decrease. Similarly, when the detection length T h i increases, the false alarm rate will decrease while the delay of detection will increase. Therefore, there is a tradeoff. Much literature has discussed how to address this tradeoff.21,22 In this section, a simple algorithm is introduced to determine the detection threshold and length. Algorithm 2. (1) Let T h i ) 0 and i ) maxl,t|eli(t)|. (2) If i < * hi ) T h i + 1. i - ∆i, go to step 4; else, let T (3) Let i ) maxl,t{minteset+-Ti|eli(s)|}. Go to step 2. (4) Let i ) i + ∆i. End. Here, eli(t) represents the detection error of training data, l denotes the different combination of two batch indexes, *i is the acceptable boundary of the detection threshold, and ∆i, a small positive scalar, is the designed margin. If T h i1 > T h i2, then h i1) e i(T h i2). minteset+-Ti1|eli(s)| e minteset+-Ti2|eli(s)|, so i(T That is to say, a larger detection length can result in a smaller detection threshold. In addition, the detection threshold obtained by Algorithm 2 is a constant and satisfies i < * i. Remark 5. Only the sensor fault is considered in this article; extending the proposed method to address other faults is the

9164

Ind. Eng. Chem. Res., Vol. 46, No. 26, 2007

Figure 6. Control results with an incipient bias fault in sensor 2: (a) liquid level 1, under FTC and nominal laws; (b) liquid level 2, under FTC and nominal laws; (c) input signal 1 of FTC; (d) input signal 2 of FTC; (e) fault detection result for sensor 1; and (f) fault detection result for sensor 2.

focus of our future work. In addition, it is assumed that the initial conditions are always the same, which might be not true in several batch processes. The initial condition problem could be conquered by setting the detection threshold i(t) to be a larger value at the start-up stage of the process. 5. Simulation Application on the Three-Tank System The three-tank system (model DTS200)23 is adopted for simulation studies. Figure 2 shows the schematics of the DTS200 system. It consists of three cylinders (tank 1 (T1), tank 3 (T3), and tank 2 (T2)), all with cross sections A. These cylinders are connected in series with each other by cylindrical pipes with a cross section Sn. Located at tank 2 is the nominal outflow valve; it also has a circular cross section Sn. The outflow liquid is collected in a reservoir, which supplies pump 1 and pump 2. The respective pump flow rates Q1 and Q2 denote the input signals, and the liquid levels of T1, T2, and T3 can be measured. The control objective is such that the liquid levels of T1 and T2 are tracking given setpoints. Hence, this system is described as

{

x(t + 1) ) x(t) + ∆T‚A(x(t)) + ∆T‚Bu(t) y(t) ) x(t) + V(t) z(t) ) [x1(t) x2(t)]T (for t ) 0, 1, ...) (16)

where the expression

V(t) ) [V1(t) V2(t) V3(t) ]T denotes the measurement noise and Vi (for i ) 1, 2, 3) is assumed to be a random variable that is uniformly distributed within interval [-0.5,0.5]. The vectors and matrices are defined as follows:

[][] [ ] [ ] []

x1 h1 -Q13 1 x ) x2 ( h2 , A(x) ) Q32 - Q20 A Q -Q x3 h3 13 32 B)

1 0 Q 1 0 1 , u ( Q1 A 2 0 0

(17a,b)

(17c,d)

The flow rates Q13, Q32, and Q20 can be determined by

Q13 ) az1Sn sgn(h1 - h3)(2g|h1 - h3|)1/2

(18)

Q32 ) az3Sn sgn(h3 - h2)(2g|h3 - h2|)1/2

(19)

Q20 ) az2Sn(2gh2)1/2

(20)

where azi represents the outflow coefficients, hi is the liquid level (given in centimeters), sgn(‚) the sign of the argument, Q1 and Q2 are the supplying flow rates (given in units of cm3/

Ind. Eng. Chem. Res., Vol. 46, No. 26, 2007 9165

Figure 7. Control results with a stuck fault in sensor 2: (a) liquid level 1, under FTC and nominal laws; (b) liquid level 2, under FTC and nominal laws; (c) input signal 1 of FTC; (d) input signal 2 of FTC; (e) fault detection result for sensor 1; and (f) fault detection result for sensor 2. Table 2. Setpoints of Training Data for the Two_tank System (Model DTS200)

zr,1 zr,2

setpoint 1

setpoint 2

setpoint 3

setpoint 4

setpoint 5

30 20

25 20

35 20

30 15

30 25

s), A is the section of cylinder (given in square centimeters), Sn is the section of connection pipe (also given in square centimeters), ∆T is the sampling interval, and g denotes acceleration that is due to Earth’s gravity (given in units of cm/ s2). The nominal technical data of this plant are given in Table 1. The setpoint for z(t) is chosen as zr ) [30 cm 20 cm ]

T

and the initial value is chosen as x(0) ) [20 cm 10 cm 15 cm ]T

The control objective is to design the control law such that z tracks the setpoint zr. The model defined by eq 16 describes one douching procedure. In this simulation, it is assumed that

the douching is performed in finite duration (100 s), and then this procedure is repeated continually. Hence, the entire process can be described as xk(t + 1) ) xk(t) + ∆T‚A(xk(t)) + ∆T‚Buk(t) (for t ) 0, 1, ..., 100 s; k ) 1, 2, ...) (21a) yk(t) ) xk(t) + Vk(t)

(t ) 0, 1, ..., 100 s; k ) 1, 2, ...)

zk(t) ) [xk1(t) xk2(t) ]T

(21b)

(t ) 0, 1, ..., 100 s; k ) 1, 2, ...) (21c)

xk(0) ) [20 cm 10 cm 15 cm ]T

(21d)

The process described by eqs 21 is, in fact, a batch process, where k denotes the batch index. It is assumed that the process model described by eqs 21 is unknown and only a rough relationship between u and z is given in the following set of equations:

zk(t + 1) ) zk(t) +

[ ]

(A1)u (t)

yk1(t) ) zk(t) + Vkz (t) yk2(t)

k

(22a) (22b)

9166

Ind. Eng. Chem. Res., Vol. 46, No. 26, 2007

Based on eqs 22, the ILC control law can be designed as

( [ ])

uk(t) ) uk-1(t) + K zr(t) -

yk1(t) yk2(t)

(23)

where K is the control gain, which is defined as

K)

[ ] k1 0 0 k2

According to Lee et al.,24 a sufficient condition for asymptotical convergence in the batch direction is

|1 +

χ-1 χ-1 k1| > 1, |1 + k2| > 1 -1 A(1 - χ ) A(1 - χ-1) (for all χ ) ejω, ω ∈ [0,π]) (24)

It is easy to prove that, if k1,k2 > 0, then eq 24 holds. In this simulation, k1 ) k2 ) 0.05 × A ) 7.7 is used. Considering the physical constraint of the pumps, the actual control law is

{[

]

k uk1(t) ) min {max {uk-1 1 (t) + k1(zr,1(t) - y1(t)),0},Q1max} k uk2(t) ) min {max {uk-1 2 (t) + k2(zr,2(t) - y2(t)),0},Q2max} (25)

From eqs 21 and 23, we know that all the states are measurable, but only two measured states are used in the normal controller. Therefore, yk3(t) is the redundant variable in this simulation and it will take action after a fault is detected. The closed-loop responses under eq 25 is given in Figure 3: the curves of z1 in cycles 1, 2, and 10 are shown in Figure 3a; the curves of z2 in cycles 1, 2, and 10 are shown in Figure 3b; Figure 3c shows the corresponding control signals of controller 1 in cycles 1, 2, and 10; and Figure 3d shows the corresponding signals of controller 2. Figure 3 clearly indicates that the control performance can improve in both the time and batch directions. This is why ILC is used. Two detection NNs (NETd_1 and NETd_2) and two estimation NNs (NETe_1 and NETe_2) are designed, respectively, for sensors 1 and 2. The orders of NETd_1, NETd_2, NETe_1, and NETe_2 are (1,1), (1,1), (1,1,1,1), and (1,1,1,1), respectively. The two-layer back-propagation (BP) network is used in this simulation: the first layer has 10 tansig neurons, and the second layer has one purelin neuron. To train these NNs, 5 groups of data with different setpoints (see Table 2) were collected, and each group contains 10 batches. Groups 1, 2, and 3 are used to train NETd_2 and NETe_1, and Groups 1, 4, and 5 are used to train NETd_1 and NETe_2. In this simulation, the detection thresholds and the detection lengths are chosen as 1(t) ) 1.7, 2(t) ) 2.0, T h 1 ) 0, and T h 2 ) 0. To validate the effectiveness of the proposed method, four types of faults are introduced to the process, respectively, and they all occur after cycle 11. 5.1. Incipient Gain Fault in Sensor 1. In this section, incipient gain fault in sensor 1 is considered and the measured output is assumed to be

y111(t) ) (1 - 0.002t) × z111(t) + V111(t) (for 0 e t e 100) (26) The closed-loop responses are given in Figure 4. In Figure 4a, the dashed curve denotes z1 under the nominal controller and the solid curve denotes z1 under the FTC. It is shown that the control performance under the nominal controller decreases

immediately after the fault occurs, whereas the performance under the proposed FTC can maintain acceptable performance after the fault occurs. Figure 4b shows that z2 is robust to this fault. The FTC input signals of pumps 1 and 2 are shown in Figures 4c and 4d, respectively. From Figure 4e, we can detect the fault in sensor 1 at step 23; however, from Figure 4f, we observe that detection error 2 is robust to this fault, which indicates that there is no fault in sensor 2. 5.2. Complete Failure in Sensor 1. Assume that there is a complete failure in sensor 1 and the measured output is

y111(t) ) V111(t)

(for 0 e t e 100)

(27)

The closed-loop response is shown in Figure 5. Figures 5a and 5b show that the proposed FTC can tolerate complete failure, whereas the nominal controller cannot. The input signals of FTC are shown in Figures 5c and 5d. As shown in Figures 5e and 5f, the fault can be detected and isolated at step 0. 5.3. Incipient Bias Fault in Sensor 2. Consider incipient bias fault in this section. The measured output is assumed to be

y111(t) ) z111(t) + V111(t) - 0.05t

(for 0 e t e 100) (28)

The control result is shown in Figure 6. Figures 6a and 6b show that the proposed FTC can tolerate incipient bias fault, whereas the nominal controller cannot. The FTC signals are shown in Figures 6c and 6d. Figure 6e and 6f suggest that there is a fault in sensor 1, but not in sensor 2, after step 24. 5.4. Stuck Fault in Sensor 2. Assume that a stuck fault in sensor 2 occurs in step 10 and that the measured output is y211(t) )

[

z211(t) + V211(t) (for 0 e t e 10) 11 y2 (10) (for 10 < t e 100)

]

(29)

The closed-loop response is given in Figure 7. Figures 7a and 7b show that the closed-loop process under the proposed FTC can maintain acceptable performance, even though there is a stuck fault. Figures 7c and 7d show the proposed FTC signals. As shown in Figures 7e and 7f, the fault in sensor 2 can be detected at step 13. 6. Experimental Application on Injection Molding Injection molding is an important polymer processing technique. As a typical batch process, injection molding consists of three main phases: filling, packing, and cooling. To ensure product quality, injection velocity should be controlled to follow a given profile in the filling phase, while nozzle pressure should be controlled in the packing phase. Therefore, there exist at least two sensors in this process: one for injection velocity and the other for nozzle pressure. If there is a fault in the velocity sensor, the control performance in the filling phase will degrade. In this section, the proposed active FTC is used to address this fault. The dynamics of the injection velocity has been determined to be nonlinear and time-varying, and it is affected by many factors, such as the variations of the material properties, injection molds, and the operating conditions.25,26 The injection velocity (V) response to the proportional valve has been identified as an autoregressive model: P(χ) )

1.69χ-1 + 1.419χ-2 1 - 1.582χ-1 + 0.5916χ-2

(30)

Ind. Eng. Chem. Res., Vol. 46, No. 26, 2007 9167

Figure 8. Fault detection results for an injection molding process: (a) detection result for cycle 7; (b) detection result for cycle 10; and (c) detection result for cycle 14.

The setpoint for the output, V(t,k), is chosen to be Vr ) 25 in this study. Define eV(t,k) ( Vr - V(t,k) as the tracking error. Based on the aforementioned model, we can design the nominal ILC law as t

u(t,k) ) u(t,k - 1) + K1eV(t + 1,k - 1) + K2

∑ e (s,k) V

(31)

s)0

where K1 and K2 are design parameters; in this experiment, they are chosen to be K1 ) 0.0025 and K2 ) 0.0005. Note that there are two measured outputs (injection velocity and nozzle pressure) in the filling phase; however, only the value of injection velocity is used in the nominal control. Therefore, only the sensor fault in measuring the injection velocity is considered in this section, and the measured nozzle pressure is the redundant variable in this experiment. Obviously, the process model described by eq 30 is too rough to be used for FDI and output estimation. Therefore, a detection NN (NETd) and an estimation NN (NETe) are provided. The orders of NETd and NETe are (1,1) and (1,1,1,1), respectively. They all have 10 neurons in the first layer. To train NETd, 13 batches of data with setpoint Vr ) 25 were collected. To train NETe, 3 groups of datasVr ) 25, 35, and 15swere collected, and each group has 13 batches of data. In this experiment, the detection threshold and the detection length are chosen as (t) ) 3.0 and T h ) 3. After a fault was detected by NETd, the measured injection velocity V(t,k) used in the controller (defined as eq 31) was replaced by its estimation Vˆ (t,k) produced by NETe, so the FTC could be obtained.

The machine used in this work was a Chen Hsong reciprocating-screw injection molding machine (Model JM88MKIII). The machine has a maximum clamping tonnage of 88 tons, and a maximum shot weight of 128 g. The velocity control system consists of a velocity transducer, a servo-valve, a MOOG MPC 2000 controller, and a personal computer (PC) with an extended input/output (I/O) system. A Temposonics Series III velocity transducer (Type RH-N-0200M) has been fitted to measure the injection velocity. A fast-response linear MOOG servo-valve (SV1, Type J661-141) was fitted with the hydraulic system to control the injection velocity. The MPC 2000 controller was fitted to control machine sequences and the barrel temperatures. Two data acquisition cards were mounted on a Pentium 133 MHz PC: a National Instrument AT_MIO_16X card provides the digital-to-analog conversion (DAC) and analog-to-digital conversion (ADC), and an the AT_DIO_32F digital I/O card performs the digital input-output (DIO) communication between the PC and the MPC 2000. A set of real-time programs has been developed in house, using C language, under the QNX real-time multi-task operating system (Version 4.2), to perform the data acquisition, control, and operation synchronization of the injection molding process. The sampling rate of the velocity controller was determined to be 12.5 ms. Assume that (i) there exists a sensor gain fault in cycles 7, 8, and 9, (ii) there exists a sensor bias fault after cycle 14, and (iii) there is no fault in other cycles. The unknown fault gain and bias are assumed to be 0.7 and 6, respectively. The detection error and threshold are shown in Figure 8, and the detection rule is given in eq 13. As shown in Figure 8a, the

9168

Ind. Eng. Chem. Res., Vol. 46, No. 26, 2007

Figure 9. Control performance of injection molding process: (a) output in cycle 6, (b) output in cycle 7, (c) output in cycle 11, and (d) output in cycle 14.

detection error exceeded the threshold in the window,6,9 so a fault was detected at step 9 of cycle 7. Figure 8b shows that there is no detection window in which the detection error is always larger than the threshold, so it was judged that the fault disappeared in cycle 10. Similarly, from Figure 8c, we can observe that another fault was detected at step 4 of cycle 14. Based on the aforementioned fault detection results and Algorithm 1, the switching of control law can also be obtained: at step 9 of cycle 7, the control law was switched from nominal controller to FTC; beyond cycle 11, the control law was switched to a nominal controller again; at step 4 of cycle 14, FTC should be restarted. The control results are shown in Figure 9. The output response in cycle 6 is shown in Figure 9a. In Figure 9b, the control result in cycle 7 is given: the solid curve denotes the real output, the dashed-dotted curve denotes the measured output using the faulty sensor, and the dotted curve denotes the estimation of real output using the proposed B-wise NN-base SS. In Figure 9c, the output in cycle 11 is given. The control response in cycle 14 is shown in Figure 9d, where the meanings of the different line types are similar with those in cycle 7. We can see that the control performance under the proposed FTC is comparable to that under the nominal controller. 7. Conclusion By combining batchwise neural network-based fault detection and isolation modules (B-wise NN-based FDIs), batchwise neural network-based soft sensors (B-wise NN-based SSs), and an iterative learning control (ILC) module, an active faulttolerant control (FTC) scheme has been proposed for nonlinear batch processes. This scheme can be used for a general class of processes with most types of sensor faults. The applications on a three-tank system and an injection molding processs show that the proposed scheme has good potential for industrial application.

Acknowledgment This work was supported in part by Hong Kong Research Gran Council (under Project No. 612906), NSFC (under Grant No. 60574084), National 863 Project (under Grant No. 2006AA04Z428) and the National 973 Program of China (under Grant No. 2002CB312200). Literature Cited (1) Anon, Automatic control of batch-process temperature. Food Ind. 1936, 8 (5), 237-244. (2) Korovessi, E., Linninger, A. A., Eds. Batch Processes; Taylor & Francis: Boca Raton, FL, 2006. (3) Wang, Y. Q.; Zhou, D. H. Robust reliable control for a class of fuzzy dynamic systems with time-varying delay. Lect. Notes Artif. Intell. 2005, LNAI3802, 1003-1010. (4) Zhou, D. H.; Frank, P. M. Fault diagnosis and fault tolerant control. IEEE Trans. Aerosp. Electron. Syst. 1998, 34 (2), 420-427. (5) Wang, Y. Q.; Shi, J.; Zhou, D. H.; Gao, F. R. Iterative learning fault-tolerant control for batch processes. Ind. Eng. Chem. Res. 2006, 45, 9050-9060. (6) Chen, J.; Patton, R. J. Robust Model-Based Fault Diagnosis for Dynamic Systems; Kluwer Academic Publishers: Dordrecht, The Netherlands, 1999. (7) Frank, P. M. Analytical and qualitative model-based fault diagnosiss a survey and some new results. Eur. J. Control 1996, 2 (1), 6-28. (8) Li, L.; Zhou, D. H. Fast and robust fault diagnosis for a class of nonlinear systems: detectability analysis. Comput. Chem. Eng. 2004, 28, 2635-2646. (9) Wang, Y. Q.; Zhou, D. H. Sensor gain fault diagnosis for a class of nonlinear systems. Eur. J. Control 2006, 12 (5), 1-13. (10) Wang, H.; Huang, Z. J.; Daley, S. On the use of adaptive updating rules for actuator and sensor fault diagnosis. Automatica 1997, 33 (2), 217225. (11) Lu, N.; Gao, F.; Yang, Y.; Wang, F. PCA-based modeling and on-line monitoring strategy for uneven-length batch processes. Ind. Eng. Chem. Res. 2004, 43, 3343-3352. (12) Scenna, N. J. Some aspects of fault diagnosis in batch processes. Reliab. Eng. Syst. Saf. 2000, 70, 95-110. (13) Luyben, W. L. Process Modeling, Simulation and Control for Chemical Engineers, 2nd Edition; McGraw-Hill: New York, 1990.

Ind. Eng. Chem. Res., Vol. 46, No. 26, 2007 9169 (14) Åstro¨m, K. J.; Hagglund, T. PID Control: ConVergence, Robustness, and Applications; Springer-Verlag: U.K., 1999. (15) Gorinevsky, D. Loop shaping for iterative control of batch processes. IEEE Control Syst. Mag. 2002, 22 (6), 55-65. (16) Shi, J.; Gao, F.; Wu, T.-J. Robust design of integrated feedback and iterative learning control of a batch process based on a 2D Roesser system. J. Process Control 2005, 15, 907-924. (17) Shi, J.; Gao, F.; Wu, T.-J. Integrated design and structure analysis of robust iterative learning control system based on a two-dimensional model. Ind. Eng. Chem. Res. 2005, 44, 8095-8105. (18) Gomm, J. B.; Yu, D. L.; Williams, D. A new model structure selection method for non-linear systems in neural modeling. In Proceedings of UKACC Control ’96 Exeter, September 2-5, 1996, Exeter, U.K.; Institute of Electrical Engineers: New York, 1996; pp 752-757. (19) Yu, D. L.; Gomm, J. B.; Williams, D. Neural model input selection for a MIMO chemical process. Eng. Appl. Artif. Intell. 2000, 13, 1523. (20) Sola, J.; Sevilla, J. Importance of input data normalization for the application of neural networks to complex industrial problems. IEEE Trans. Nucl. Sci. 1997, 44 (3), 1464-1468.

(21) Basseville, M.; Nikiforov, I. V. Detection of Abrupt Changes: Theory and Application; PTR Prentice Hall: Englewood Cliffs, NJ, 1993. (22) Hajji, H. Statistical analysis of network traffic for adaptive faults detection. IEEE Trans. Neural Networks 2005, 16 (5), 1053-1063. (23) Xie, X. Q.; Zhou, D. H.; Jin, Y. H. Strong tracking filter based adaptive generic model control. J. Process Control 1999, 9, 337-350. (24) Lee, K. S.; Bang, S. H.; Yi, S.; Son, J. S.; Yoon, S. C. Iterative learning control of heat-up phase for a batch polymerization reactor. J. Process Control 1996, 6 (4), 255-262. (25) Yang, Y.; Gao, F. Adaptive control of the filling velocity of thermoplastics injection molding. Control Eng. Pract. 2000, 8, 1285-1296. (26) Gao, F.; Yang, Y.; Shao, C. Robust iterative learning control with applications to injection molding process. Chem. Eng. Sci. 2001, 56, 70257034.

ReceiVed for reView February 23, 2007 ReVised manuscript receiVed June 14, 2007 Accepted September 24, 2007 IE0702835