Lazy Learning-Based Online Identification and Adaptive PID Control

Dec 9, 2006 - PROCESS DESIGN AND CONTROL. Lazy Learning-Based Online Identification and Adaptive PID Control: A Case. Study for CSTR Process. Tianhong...
0 downloads 10 Views 417KB Size
472

Ind. Eng. Chem. Res. 2007, 46, 472-480

PROCESS DESIGN AND CONTROL Lazy Learning-Based Online Identification and Adaptive PID Control: A Case Study for CSTR Process Tianhong Pan,†,‡ Shaoyuan Li,*,† and Wen-Jian Cai§ Department of Automation, Shanghai Jiao Tong UniVersity, Shanghai, 200240 People’s Republic of China, School of Electrical and Information Engineering, Jiangsu UniVersity, 212013 People’s Republic of China, and School of Electrical and Electronic Engineering, Nanyang Technological UniVersity, 639798 Singapore

Since most chemical processes exhibit severe nonlinear and time-varying behavior, the control of such processes is challenging. In this paper, a novel two-layer online adjust algorithm is presented for chemical processes. The lower layer consists of a conventional proportional-integral-derivative (PID) controller and a plant process, while the upper layer is composed of identification and tuning modules. Using a lazy learning algorithm, a local valid linear model denoting the current state of system is automatically exacted for adjusting the PID controller parameters based on input/output data. This scheme can adjust the PID parameters in an online manner even if the system has nonlinear properties. In this online tuning strategy, the concepts of generalized minimum variance (GMV) and quadratic program with constraints are also considered. The capabilities of the proposed tuning strategy are investigated through a CSTR process available in an advanced algorithm simulation platform. 1. Introduction Many industrial chemical processes such as high-purity distillation columns, exothermic irreversible reactions, pH neutralization processes, continuous stirred tank reactor processes, and so forth exhibit nonlinear dynamic characteristic and time-varying behavior. Hence, the control of such processes is complex and challenging. In addition, the demands of the global economy and increased competition have forced chemical processes to operate in multiple operating regimes to manufacture several different grades of products.1 A very important control objective is to minimize grade transition time, and thereby reduce the amount of off-specification product produced during transition. As a result of these characteristics and demands, many control techniques have been proposed and analyzed for chemical processes, and a good review of these is available by Bequette.2 Among those control strategies, a proportional-integral-derivative (PID) controller is extensively used in the chemical process industry because of its simple control structure, robustness in operation, and easy comprehension in principle. It was recently estimated that more than 90% of all control loops involve PID controllers.3 Nevertheless, the conventional PID controller might be difficult to deal with in highly nonlinear and time varying chemical processes.4 To improve the control performance, several schemes of adaptive PID controllers have been developed in recent years. The most common PID advancement in industry is gain scheduling, which can overcome nonlinear process characteristics through tailoring of controller gains over local operating * To whom correspondence should be addressed. E-mail: syli@ sjtu.edu.cn. † Shanghai Jiao Tong University. ‡ Jiangsu University. § Nanyang Technological University.

conditions. However, this scheduling is complicated because detailed process knowledge is necessary to define operating conditions and open-loop tests, in which the controller gain within each condition must be locally calibrated.5 Many other advanced tuning algorithms have been developed for industrial process. Xu et al. introduced a receding horizon optimization strategy to adjust PID parameters based on receding horizon window (RHW) identification.6 Chen and Huang proposed a PID control design based on instantaneous linearization of the neural network.7 Hirata et al. constructed a nonlinear PID controller for SISO systems, which is composed of M parallel conventional PID controllers.8 Lu et al. constructed a predictive fuzzy PID controller by combining a fuzzy PID controller with MPC.9 Although chemical processes are inherently nonlinear and time varying, the above tuning strategies can work well through linear dynamic models generated at some particular operating points. There are several potential reasons for this. A carefully identified linear dynamic model is sufficiently accurate in the neighborhood of a single operating point. Using this linear model and a certain optimal strategy, a set of reliable parameters can easily be found. This is important because the solution algorithm must satisfy some specific design objectives. For these reasons, in many cases a linear model will provide the majority of the benefits possible with adjusted technology. Nevertheless, there are some flaws in practical situations, such as, an online identification algorithm (such as RHW) updating a linear approximation of the system, using a forgetting factor in order to track variations in the dynamics. However, such an approximation provides a satisfactory performance only if the operating regime changes slowly. The instantaneous linearization approaches need a global model (NN: neural network) that can describe all the characters of the entire nonlinear system. Furthermore, the multiple model approach requires that the

10.1021/ie0608713 CCC: $37.00 © 2007 American Chemical Society Published on Web 12/09/2006

Ind. Eng. Chem. Res., Vol. 46, No. 2, 2007 473

Figure 1. Control system framework.

modules can cover different parts of the whole input domains. When a new operating regime emerges (i.e., the operating regime is not covered by an existing model), the parameters of the model need to be retained to meet this change. In the extreme case, the whole model structure needs to be re-determined to achieve better prediction of the new process dynamics. In order to maintain a satisfactory system performance over a wide range of operating conditions, a new tuning method of PID parameters using lazy learning (LL) identification has been developed in this paper. Lazy learning can be considered as an intrinsically adaptive method, which is achieved by gathering the input/output observations and storing them in the database.10,11 Unlike traditional methods (such as NN), it has no standard learning phase. The computation is not performed until query data arrives. It is worth noting that lazy learning is only locally valid for operating conditions characterized by the current query data, meaning that lazy learning constructs local approximation of the dynamic system. Therefore, a simple model structure can be chosen, for example, a low order ARX model. As a result, the user does not need to decide how to partition the operating regimes of the system or construct a complex model. Also the availability of advanced technology and inexpensive computing power are a boon for design and implementation of advanced tuning strategies. Using this local model, the PID parameters are calculated. This calculation is based on the relationship between the PID control law and the general minimum variance (GMV) control law. By the newly proposed scheme, PID parameters are adequately adjusted corresponding to the nonlinear properties. The remaining sections of this paper are organized as follows: Section 2 describes the proposed control structure including two layers, which consist of a lower and upper layer. A local identified algorithm using lazy learning is presented in section 3. In section 4, an online tuning supervisory control strategy based on GMV is described. We briefly introduce the AAS (advanced algorithm simulation) platform developed by ourselves in section 5. Section 6 presents simulation results on a CSTR process in the AAS platform. Finally, conclusions are drawn in section 7. 2. Problem Statement To improve the control system’s performance, a novel twolayer online tuning strategy has been developed in this paper and the control structure is shown in Figure 1.

A conventional PID controller is adopted in the lower layer. The upper layer is composed of a tuning and an identification module. In the identification module, a local validated linear model in the current state is obtained by a lazy learning algorithm. Here, the modeling database is generated by an excitation signal (such as multi-level pseudo-random signals) and updated online. In the tuning module, optimal PID parameters are derived by minimizing the GMV criterion. If the operating condition suffers a big variation causing process parameter change, the identification module automatically identifies the new local model, and thereafter the optimization algorithm calculates the new PID controller parameters and updates to the lower layer. If the system is linear time-invariant or operating in a narrow range, this control structure reduces to a conventional PID control system. 3. Local Model Identification Using Lazy Learning 3.1. System Description. First, the discrete-time nonlinear system which is described as the following equation is considered:

y(t) ) f(y(t - 1), ..., y(t - ny), u(t - p), ..., u(t - p - nu)) + (t) (1) where t denotes the discrete time, y(t) is the system output, u(t) is the input, (t) is a zero-mean disturbance term, p g1 is the input/output time delay, and f(•) is some nonlinear function. Let us assume we have no physical description of f(•) except a N . Define the training dataset DN made of pairs [u(t),y(t)]t)1 regression vector as

φ(t - 1) ) [y(t - 1), ..., y(t - ny), u(t - p), ..., u(t - p - nu)]T (2) The system (1) can be written in the following form:

y(t) ) f(φ(t - 1)) + (t)

(3)

For identification, the existing time serial data of the system N should be organized as [y(i),φ(i)]i)1 . Here, in order to provide an informative database which can support the lazy learning identification, the process must be subjected to an input capable of exciting nonlinearities. Many popularly exciting signal such

474

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

as pseudo-random binary sequence (PRBS), Multi-level pseudorandom signals, and so forth can be used.12 At each sample point, the nonlinear system can be represented by a locally valid linear model in a certain region around this point:10

y(t) ) φ(t - 1) θˆ + (t) T



φ(i)∈Ωk

{

(y(i) - φ(i)Tθ)2K

(

)}

d〈φ(i), φ(t - 1)〉 h

(5)

θˆ can be obtained by minimizing the loss function:

θˆ ) arg min(Jh(φ(t - 1))) ) θ

arg min θ

( { ∑

(y(i) - φ(i)Tθ)2K

φ(i)∈Ωk

(

)})

d〈φ(i),φ(t - 1)〉 h

{

y(j) - φ (j)θk+1

(7)

T

, j ) 1,2, ..., k + 1 (8)

1 - φT(j)Vk+1φ(j)

and the cross-validation mean square error is

(9)

During the recursive process,

MSEloo(k + 1) > MSEloo(k) or k > kmax

(10)

where kmax is the maximal sequence number of learning subset Ωk and given by the designer. This means the new model θk+1 is significantly worse than the last model θk and exits the recursive procedures. Otherwise, adding a new regression vector from the learning subset Ωk, the parameter θˆ , and error MSEloo is evaluated by using eqs 7 and 10, until k ) kmax. As mentioned above, lazy learning estimates a local valid linear model of nonlinear system by using the regression vectors, which are the most representative ones of the current operating point. This means once a linearization is required, the most similar regression vectors in space and time are used to fit the local model. This approach returns different local linear models for different operating regimes and has a more adaptive ability than other online identification algorithms (such as RHW identification6). To implement an adaptive database for the lazy learning algorithm to allow the controller workable in the new operating regime, the following strategy is considered: use of the similar criterion (Euclidean norm d〈•〉), the learning subset Ωk (Ωk ) kmax ), can be constructed and rearranged in increasing [y(i), φ(i)]i)1 order. At each sampling instant, we compare the distance (say d10) of the 10th regressive vector in Ωk with a threshold δ. If d10 > δ, the current process data are then considered as “new” data for the present database and are added to the database or else are discarded. For details on lazy learning, the reader is referred to the thesis by Bontempi.14 4. Online Tuning PID Controller Parameters

where V, γ, and e are the variables for the recursive algorithm. Once the matrix Vk+1 is available, the leave-one-out error can be directly calculated without the need of any further model identification.14 That is,

eloo j (k + 1) )

k+1

ωj ∑ j)1

4.1. PID Controller. The proposed control system structure consists of two layers. In the lower layer, a velocity form of the discrete PID control can be written as a time series:

∆u(t) ) kc(e(t) - e(t - 1)) +

Vkφ(k + 1)wk+1φT(k + 1)Vk

1 + wk+1φT(k + 1)Vkφ(k + 1) γk+1 ) Vk+1φ(k + 1)wk+1 ek+1 ) y(k + 1) - φT(k + 1)θk θk+1)θk + γk+1ek+1

2 ωj(eloo ∑ j (k + 1)) j)1

(6)

To obtain optimal θˆ , a simple and quick algorithm named the recursive least-square (RLS) algorithm is adopted in this paper.13-15 Assuming that the model θk is obtained using k groups of select analogous regression vectors, for the (k + 1)th selected regression vector φ(k + 1), a step of the standard RLS algorithm is performed to obtain the model θk+1:

Vk+1 ) Vk -

MSEloo(k + 1) )

(4)

where φ(t - 1) ) [1, y(t - 1), ..., y(t - ny), u(t - p), ..., u(t p - nu)]T and a constant value 1 has been appended to the regression vector in order to consider a constant term in the regression. θˆ ) [d, a1, ..., any, b0, b1, ..., bnu]T is the parameter of the model and d is a constant term. 3.2. Lazy Learning Algorithm. The lazy learning algorithm estimates the linear parameter θˆ of the nonlinear function by focusing on the region surrounding the operating point. The idea is that the relevant regression vectors in the dataset DN which are similar to the current vector φ(t - 1) can be selected to construct a learning subset Ωk. In the literature,11-15 the distance measure d〈φ(i), φ(t - 1)〉, for example, the Euclidean norm d〈•〉 ) |φ(i) - φ(t - 1)|2, is overwhelmingly used to evaluate the similarity between the current regression vector φ(t - 1) and φ(i) in the entire database, that is, the smaller value of distance measure indicates greater similarity between φ(t - 1) and φ(i). To do so, a weight ωi is computed by the kernel function ωi ) [K(d〈φ(i), φ(t - 1)〉)/h]1/2, where h is the bandwidth of the kernel function K(•). The parameter θˆ can be obtained depending on the following loss function:

Jh(φ(t - 1)) )

k+1

kcTs k c Td e(t) + (e(t) Ti Ts 2e(t - 1) + e(t - 2)) (11)

where e(t) ) r(t) - y(t) and r(t) denotes the reference signal and is given by piecewise constant components. Also, kc, Ti, and Td respectively denote the proportional gain, the reset time, and the derivative time, and Ts denotes the sampling interval. For convenience, let

∆e(t) ) e(t) - e(t - 1) and ∆2e(t) ) ∆e(t) - ∆e(t - 1) (12a) ki )

k c Ts kcTd and kd ) Ti Ts

(12b)

then, eq 11 can be written as

∆u(t) ) kc∆e(t) + kie(t) + kd∆2e(t) ) eT(t) k(t) (13)

Ind. Eng. Chem. Res., Vol. 46, No. 2, 2007 475

J ) [G(z-1) y(t) - Rr(t) + S(z-1) ∆u(t)]2 + [Q∆u(t)]2

where

e(t) ) [∆e(t) e(t) ∆2e(t)]T,

[

k(t) ) [kc ki kd]T ) kc

]

kcTs kcTd Ti Ts

T

4.2. Tuning Strategy. At time t, the local linear model in a neighborhood of φ(t - 1) can be obtained by the algorithm described in previous sections. The model provides an inputoutput linearization:

y(t) ) fLL[y(t - 1), ..., y(t - ny), u(t - p) ..., u(t - p - nu)] ) φT(t - 1)θˆ ) ny

∑ i)1

ng

ns

giy(t - i) - Rr(t) + ∑si∆u(t - i) + ∑ i)0 i)1

)[

b0∆u(t)]2 + [Q∆u(t)]2 ) [L + b0∆u(t)]2 + [Q∆u(t)]2

ng ns giy(t - i) - Rr(t) + ∑i)1 si∆u(t - i) can be where L ) ∑i)0 achieved by eqs 15 and 17. Introducing eq 13 into eq 21 gives

J ) [L + b0eT(t) k(t)]T[L + b0eT(t) k(t)] +

nn

aiy(t - i) + z-p

∑ i)0

(21)

biu(t - i) + d (14)

The relation between the input u(t) and the output y(t) is given by

Q[eT(t) k(t)]T[eT(t) k(t)] (22) Setting ∂J/∂k ) 0, the optimal parameters of the controller are given

k(t) ) [eT(t) (b0b0I3×3 + QI3×3)e(t)]-1(b0eT(t)L) (23) A(z-1) y(t) ) z-pB(z-1) u(t) + d

(15)

where A(z-1) ) 1 - a1z-1 - ... - anyz-ny, deg A ) ny, B(z-1) ) b0 + ... + bnuz-nu, deg B ) nu, and z-1 is the backward shift operator. In order to eliminate the constant item d in eq 15, both sides of eq 15 are multiplied by the operator ∆ (∆ ) 1 - z-1): -1

-p

-1

∆A(z ) y(t) ) z B(z ) ∆u(t)

(16)

To express the output prediction at time t + p as a function of future controls, the Diophantine equation is introduced:4

P(z-1) ) ∆A(z-1) F(z-1) + z-pG(z-1)

{

kc > 0 Ti > 0 Td > 0

i.e.,

{

kc > 0 ki > 0 kd > 0

(24)

Therefore, eq 22 should be rewritten as a quadratic program problem with linear inequality constraints:

(17)

where P(z-1) ) 1 + p1z-1 + ... + pnpz-np is monic polynomial, deg P ) np, F(z-1) ) 1 + f1z-1 + ... + fnf z-nf, deg F ) nf ) p - 1, G(z-1) ) g0 + g1z-1 + ... + gngz-ng, and deg G ) ng. Since there are many solutions, we may select the minimumdegree solution. When eqs 16 and 17 are combined, the optimal prediction at time t + p is

y(t + p) )

The optimum of the above objective function is not a problem, but physically it is not suitable. The optimal PID parameters from eq 23 have negative values. In order to obtain reasonable PID parameters, the optimal problem in eq 22 must satisfy the following inequality constraints:

1 [G(z-1) y(t) + F(z-1) B(z-1) ∆u(t)] P(z-1 ) (18)

Consider the cost function of the GMV:4

J ) [P(z-1) y(t + p) - R(z-1) r(t)]2 + [Q∆u(t)]2 (19) where P(z-1) is defined as eq 17. R(z-1) is the weighted polynomial of the reference trajectory which is the user-specified polynomial; generally set R(z-1) ) R. Q is the weighted factor with respect to the control input which is the user-specified parameter. Introducing eq 18 into eq 19 gives

J ) [G(z-1) y(t) - Rr(t) + F(z-1) B(z-1) ∆u(t)]2 + [Q∆u(t)]2 (20) By defining S(z-1) as S(z-1) ) F(z-1) B(z-1) ) s0 + s1z-1 + ... + snsz-ns, obviously deg S ) deg F deg B. Because F(z-1) is monic polynomial, s0 ) b0. The cost function can be rewritten as

1 min J ) kT(t) Hk(t) + f Tk(t) 2 s.t.

Aink(t) < bin

(25)

where H ) 2 × eT(t) (b0b0I3×3 + QI3×3)e(t), f ) -2 × [b0eT(t)L]T, Ain ) [diag(-1)]3×3, and bin ) [10-6, 10-6, 10-6]T is a small enough column vector. It can be efficiently solved using standard routines such as the “quadprog.m” subroutine in MATLAB. 4.3. Tuning Criterion. When the system output is close to the desired setpoint, the identification and tuning computation are redundant. To ensure this algorithm is only preformed after significant changes in setpoint or load, a procedure that measures the change is needed.16 The tuning condition, by a cumulative sum of the absolute value of the past control error with the fixed window size, is designed. That is, t

IAE )

∑ |e(i)| i)t-n +1

(26)

e

where ne is the number of past control errors. From eq 26, the cumulative computation is receding. This means an old control error would be removed and a new error would come into cumulative computation at each sampling time. When IAE values become small, that is, IAE e σ (σ is the threshold), this means the system is running in the steady state, and the current controller parameters are assumed to be fixed. Otherwise, the parameters of PID need to be tuned based on lazy learning identification.

476

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

Figure 2. Structure of the AAS platform.

4.4. Algorithm Steps. As mentioned above, the proposed tuning strategy is composed of two phases. Phase 1 involves identifying the process parameters through the lazy learning algorithm. In phase 2, the controller parameters are directly computed based on the identified local valid model so as to solve the quadratic program problem with constraints. Optimal design rules are incorporated to tuning the calculated PID control parameters. Algorithm: Two-Layer Adaptive PID Control Phase One: Step 1: At time t, construct regression vector φ(t - 1). Step 2: Estimate the parameters of the local linear model by lazy learning algorithm. Phase Two: Step 3: Obtain e(t) and IAE. If IAE < σ, u(t) ) u(t - 1) and go to step 6, otherwise go to step 4. Step 4: Calculate k(t) by eq 25. Step 5: Compute ∆u(t) by eq 3. Step 6: Implement the new control action on the process. Step 7: Update the dataset by storing the new input-output observation (only for adaptive lazy learning). Repeat this procedure for the next time step. 5. Verification Platform The AAS platform, version 1.0, is a controller design and tuning tool and a process control training simulator used by industry and academic institutions worldwide. It is used for control loop analysis and tuning, dynamic process modeling and simulation, performance and capability studies, and hands-on process control training. This platform for automatic process control offers a practical environment for testing of control concepts through “virtual world” simulations for real world processes. It has been developed by Institute of Automation, Shanghai Jiao Tong University, China. The major features of the AAS platform include (1) ability to verify a developed advanced control algorithm; (2) easily changing parameters online and simulating operating regime change or structure variety of nonlinear system, in order to test the controller’s performance; (3) ability of tuning the controller’s parameters and obtaining a satisfied controlled result; (4) ability of realtime display of all kinds of data and variable curves; (5) ability of telecommunications; and (6) ability of adding a new industrial process which is described by a first principle model through a friendly user interface. The formulation of the AAS platform is shown in Figure 2. It is constructed by two industrial computers named model machine and control machine. On the basis of the first principle model of industry process, the model machine simulates actual

plants’ variability in an industrial environment. The control machine carries out data sampling, implementation of control algorithm and output display, and so forth. Two computers exchange model information and control data through net, which abides by OPC protocol. It has the same structure and manipulated mode of the industrial distributed control system (DCS). Figure 3 shows the photo of the AAS platform. The AAS platform includes the following components: (1) Industrial process model library. Several theoretical dynamic models, such as pumped tank, CSTR, pH neutralization, centralized heating, ventilation, and air conditioning system (HVAC), and so forth, which are derived from first principles and have been designed in this library. Similar to the real world application, most of the processes in this platform exhibit nonlinear behavior. On the other hand, several state parameters in each process can be easily modified through a dialog box in the interface (see Figure 5). Also, a new industrial process model can be programmed through this open interface. (2) Simulated parameters setting module. In this module, several simulated parameters, such as, sample intervals, initial value for ordinary differential equations of dynamic processes, and so forth, can be changed through a dialog box for different plants. Several disturbances such as pulse, sinusoid, or PRBS, and so forth are also provided. Input/output data for modeling can be generated by those disturbances in one of the controller output variables with all of the processes at steady state and all the controllers in manual mode. This is performed for each controller output to measured the process variable pair at each operating level. (3) Control algorithm library. Several advanced control algorithms, such as PID, fuzzy control, generalized predictive control (GPC), and so forth, are afforded in the control machine. More importantly, some key parameters among those algorithms are afforded an open interface. The user can obtain satisfied control performance by adjusting those parameters. Also, a new control algorithm can be programmed through this open interface. (4) Supervisory control and data acquisition (SCADA) interface module. This module is designed according to a standard SCADA of industrial DCS. The user can directly observe a running curve of plant’s input/output data, state value, alarm information, and so forth. (5) Database managed module. This database is a kind of OPC server database. It can send a system’s data to memory of the computer. The user can quickly query a variable record in the database by using a fast index mechanism. Those samples can be used for different purposes, such as identifying a model

Ind. Eng. Chem. Res., Vol. 46, No. 2, 2007 477

Figure 3. Photograph of the AAS platform.

Figure 4. CSTR graphic from the AAS platform software package.

of a plant, performance assessment, monitoring of a controller, and so forth. (6) Industrial interface module. Through the industrial interface card, the AAS platform can connect with a real world industrial process. The AAS platform can directly sample or control a real system and not the first principle model. Those components have been developed by software WinCC 5.1. For more details, see ref 17.

On the basis of material and energy balance principles, the lumped parameter equations describing the system are

6. Experiment for the CSTR Process

This case study is concerned with the case 2 reactor parameter values presented by Bequette and shown in Table 1.18 The inlet stream is fed at a constant rate F with constant concentration CAf into the vessel. The final concentration of the reactant CA is the controlled variable and the jacket temperature Tj is manipulated to keep the exit stream concentration CA at the setpoint. The exiting stream leaves at a rate, and since it is assumed the vessel is perfectly mixed, the exiting concentration

We illustrate the application of this algorithm on a single first-order exothermic, irreversible reaction (A f B). This CSTR process, shown in Figure 4, is one of the case studies available in the AAS platform. The process assumed (1) perfect mixing in the reactor and jacket; (2) constant volume in the reactor and jacket; and (3) constant parameter values.

{

( ) ( )

dCA F -Ea ) (CAf - CA) - k0 C dt V RT A -∆H -Ea UA dT F k C (T - Tj) ) (Tf - T) + dt V Fcp 0 RT A VFcp (27)

478

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

Figure 6. CSTR system identification result using lazy learning.

Figure 7. Response of CSTR simulation using lazy learning identification.

Figure 5. Input/output data used for lazy learning identification. Table 1. Parameters of the CSTR parameter

description

F/V

volumetric flow rate/ reactor volume pre-exponential factor heat of reaction activation energy feed temperature concentration of A in feed stream overall heat transfer coefficient/area for heat exchange/reactor volume jacket temperature density/heat capacity

k0 -∆H Ea Tf CAf UA/V

Tjf Fcp

unit

value

h-1

1

h-1 kcal/(kg mol) kcal/(kg mol) °C kg mol/m3

9703 × 3600 5960 11 843 25 10

kcal/(m3 °C h)

150

which means deg A ) 2 and deg B ) 1. First, in the model machine of the AAS platform, a dynamic test is performed by pulsing the control output Tj with a random signal Tj ∈ [273.15, 273.15 + 60] as shown in Figure 5a. In the control machine, using a fixed-step size Ts ) 0.1 h, 1000 input/output data of CSTR, as shown in right-hand of Figure 5b, are used to build the original lazy learning data set. Because of the control signal’s variable range, the corresponding range of process output CA is constrained in [8.5654, 7.5547]. In order to verify identification performance of lazy learning, a test signal was added to manipulated variable Tj in the model machine. The model and the predicted output can be plotted in the control machine by using the SCADA interface module, as shown in Figure 6. We obtain a good performance in modeling this complex chemical process by using lazy learning. 6.1. Set-Point Tracking. In this simulation, the reference signals r(t) are given by

8.9 f 8.3 f 7.8 f 8.5 °C kcal/(m3 °C)

25 25

and vessel concentration are assumed to be the same. For more details, see ref 18. The system is represented in the input-output form

CA(t) ) f(CA(t - 1), CA(t - 2), Tj(t - 1), Tj(t - 2))

(28)

The modeling information vector is φ(t - 1) ) [CA(t - 1), CA(t - 2), Tj(t - 1), Tj(t - 2)]T, where ny ) 2 and nu ) 1,

(29)

The newly proposed two-layer PID control strategy shows good quality as shown in Figure 7. In the identification module, the size of the lazy learning subset Ωk is set as k ∈ [12, 80] and a Uniform Kernel14 is used in eq 5. In the tuning module, the weighted factor is set as P(z-1) ) 1, R ) 1, and Q ) 0.01. Through eq 28, the delay time is p ) 1, and the parameter polynomials of model are A(z-1) ) 1 + a1z-1 + a2z-2, and B(z-1) ) b0 + b1z-1. Those corresponding polynomials in the Diophantine equation can be solved as F(z-1) ) 1, G(z-1) ) -(a1 - a0) - (a2 - a1)z-1 + a2z-2(the minimum-degree solution). S(z-1) can be given as S(z-1) ) F(z-1) B(z-1) ) b0 + b1z-1.

Ind. Eng. Chem. Res., Vol. 46, No. 2, 2007 479

Figure 8. Response of CSTR simulation using RHW identification.

Figure 9. Response of CSTR simulation using fixed PI.

During the wide range of operating conditions, superior control performance with a short setting time and little oscillation is obtained by a lazy learning algorithm to tune online PID controller parameters of the lower layer, because highly accurate system identification can be obtained by the lazy learning method, and PID parameters are adjusted adequately. Furthermore, Figure 7 illustrates the online adaptive ability of lazy learning, because successive step changes in the setpoint are made so that the operation space is outside of the original operating regime ([8.5654, 7.5547]). For the purpose of the comparison, a tuning scheme of PID parameters, which was derived by using RHW identification,6 was employed. The control result is shown in Figure 8. In this online identified strategy, according to ref 5, a forgetting factor λf is set as λf ) 0.95. In optimal design rule, the weighted factor is set: R ) 1, Q ) 0.01. Owing to the nonlinearities, the control result is not good, especially in setpoint change from 8.3 to 7.8. Also, a conventional PID control algorithm is used in this simulation. The parameters kc and Ti are determined to be 0.8 and 0.3, respectively. As shown in Figure 9, the fixed parameter PID controller has a large oscillation in set-point change from 8.3 to 7.8. Compared with a tuning scheme based RHW and conventional PID, our algorithm has a fast rise time and setting time over a large operating range. 6.2. Disturbance Rejection. The disturbance rejection capabilities of the two-layer tuning scheme were also studied. The disturbance is the feed stream. The disturbance concentration CAf was stepped from the nominal value 10 kg mol/m3 to 10 ( 5% kg mol/m3, respectively, when the system works in steady state.

Figure 10. Closed loop simulation for an unmeasured step disturbance in the concentration of feed stream CAf (10.0 f 10.5).

Figure 11. Closed loop simulation for an unmeasured step disturbance in the concentration of feed stream CAf (10.0 f 9.5).

Figure 10 shows the response of controller implementation at a setpoint concentration of approximately 8.5 kg mol/m3, when the disturbance concentration was stepped from 10 kg mol/m3 to 10.5 kg mol/m3. After several adjustment periods, the process variable can be stabilized in the steady state. Figure 11 shows the response of controller implementation at a setpoint concentration of approximately 8.5 kg mol/m3, when the disturbance concentration was stepped from 10 kg mol/m3 to 9.5 kg mol/m3. The two-layer tuning scheme also exhibits better performance. As shown in those figures, the proposed two layers adaptive PID control strategy is able to maintain better performance over all the operating ranges. It also has the ability to reject unmeasured disturbances. 7. Conclusion In this paper, a two-layer supervised control method for tuning PID controller parameters according to a GMV criterion has been proposed. According to the newly proposed scheme, since system parameters are estimated based on the lazy learning algorithm, the better accuracy of system identification by the proposed scheme can be obtained as compared with one by the other online method (e.g., RHW identification) for a nonlinear system. As a result, it allows tuning of lower-layer PID parameters at each sampling time, making it suitable for a wide range of operating conditions. The scheme has been tested on a CSTR chemical process from an AAS platform and showed a good control system performance.

480

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

Acknowledgment This work was supported by the National Natural Science Foundation of China under Grant 60474051, the Key Technology and Development Program of Shanghai Science and Technology Department under Grant 04DZ11008, and the Program for New Century Excellent Talents in University of China (NCET). The authors are grateful to the anonymous reviewers for their helpful comments and constructive suggestions with regard to this paper. Literature Cited (1) O ¨ zkan, L.; Kothare, M. V.; Georgakis, C. Control of a solution copolymerization reactor using multi-model predictive control. Chem. Eng. Sci. 2003, 58 (7), 1207-1221. (2) Bequette, B. W. Nonlinear control of chemical processes: A review. Ind. Eng. Chem. Res. 1991, 30 (7), 1391-1413. (3) Astrom, K. J.; Hagglund, T. The future of PID control. Control Engineering Practice 2001, 9 (11), 1163-1175. (4) Astrom, K. J.; Wittenmark, B. AdaptiVe Control, 2nd ed.; AddisonWesley: Reading, MA, 1995. (5) Agrawal, P.; Lakshminarayanan, S. Tuning proportional-integralderivative controllers using achievable performance indices. Ind. Eng. Chem. Res. 2003, 42 (22), 5576-5582. (6) Xu, M.; Li, S.; Cai, W. Practical receding-horizon optimization control of the Air Handling Unit in HVAC systems. Ind. Eng. Chem. Res. 2005, 44 (22), 2848-2855. (7) Chen, J.; Huang, T. Applying neural networks to online updated PID controller for nonlinear process control. J. Process Control 2004, 14 (2), 211-230. (8) Hirata, M.; Ohnishi, Y.; Yamamoto, T. A design of nonlinear PID control systems by using local model identification. In Proceedings of 30th

IEEE Annual Conference on Industrial Electronics Society, November 2-6, 2004, Busan, Korea; pp 2464-2469. (9) Lu, J. L.; Chen, G. R.; Ying, H. Predictive fuzzy PID control: Theory, design and simulation. Inf. Sci. 2001, 137 (1), 157-187. (10) Atkeson, C. G.; Moore, A. W.; Schaal, S. Locally weighted learning. Artif. Intell. ReV. 1997, 11 (1), 11-73. (11) Atkeson, C. G.; Moore, A. W.; Schaal, S. Locally Weighted Learning for Control. Artif. Intelli. ReV. 1997, 11 (1), 75-113. (12) Braun, M. W.; Rivera, D. E.; Stenman, A. A ‘Model-on-Demand’ Identification Methodology for Non-linear Process Systems. Int. J. Control 2001, 71 (18), 1708-1717. (13) Bontempi, G.; Birattari, M.; Bersini, H. Lazy learning for local modelling and control design. Int. J. Control 1999, 72 (7-8), 643-658. (14) Bontempi, G. Local Learning Techniques for Modeling, Prediction and Control. Ph.D. Thesis, IRIDIA-Universit’e Libre de Bruxelles, Brussels, 1999. (15) Bontempi, G.; Birattari, M. From linearization to lazy learning: a survey of Divide-and-Conquer techniques for nonlinear control. Int. J. Computational Cognition 2005, 3 (1), 26-72. (16) Ha¨gglund, T.; Astrom, K. J. Supervision of adaptive control algorithm. Automatica 2000, 36 (8), 1171-1180. (17) Li, S. AdVanced Algorithm Simulated Platform, version 1.0; Shanghai Jiao Tong University: Shanghai, People’s Republic of China, 2006 (software copyright: 2006SR01748). (18) Bequette, B. W. Process dynamics: modelling, analysis and simulation; Prentice Hall, Upper Saddle River, NJ, 1998.

ReceiVed for reView July 6, 2006 ReVised manuscript receiVed October 12, 2006 Accepted October 13, 2006 IE0608713