Adaptive PID Controller Design for Nonlinear Systems - Industrial

Apr 10, 2009 - In this paper, an adaptive proportional−integral−derivative (PID) controller design is proposed for nonlinear process control. In t...
3 downloads 12 Views 190KB Size
Ind. Eng. Chem. Res. 2009, 48, 4877–4883

4877

Adaptive PID Controller Design for Nonlinear Systems Imma Nuella, Cheng Cheng, and Min-Sen Chiu* Department of Chemical and Biomolecular Engineering, National UniVersity of Singapore, 4 Engineering DriVe 4, Singapore 117576

In this paper, an adaptive proportional-integral-derivative (PID) controller design is proposed for nonlinear process control. In the proposed method, a controller database is constructed to store the PID parameters previously implemented together with their corresponding information vectors, while another modeling database is utilized by the just-in-time learning technique for modeling purpose. The PID parameters are obtained from controller database according to the current process dynamics characterized by the information vector at each sampling instance. Moreover, these PID parameters can be further fine-tuned, whenever required, and the resulting PID parameters together with the associated information vector are stored into controller database to improve it for operating conditions where the relevant information is not available in the construction of initial controller database. Simulation results are presented to illustrate the proposed adaptive PID design and its effectiveness is evaluated through comparison with its conventional counterpart. 1. Introduction The proportional-integral-derivative (PID) controller has gained widespread use in many process control applications due to its simplicity in structure, robustness in operation, and easy comprehension of its principle.1 Numerous tuning methods have already been proposed to design PID controller, like Cohen-Coon and Zieglar-Nichols tuning rules, model-based design,2 relay feedback test,3-5 and dominant pole design.1 However, most of these design methods for PID controllers are based on a linear process model obtained experimentally around the nominal operating condition. Therefore, the performance of the conventional PID controller might degrade or even become unstable for nonlinear processes with a range of operating conditions. To improve the control performance, several schemes of incorporating nonlinear control techniques in the design of PID controllers have been developed in the literature. For example, Krishnapura and Jutan6 utilized a neural network to mimic nonlinear PID design. Adaptive PID controller designs with controller parameters updated online by the neural network models were also proposed.7,8 Andra´sˇik et al.9 made use of a hybrid model and a neural PID-like controller for online tuning of a PID controller. Bisowarno et al.10 developed a nonlinear PI controller to accommodate the directionality of the process gain for a reactive distillation column. Likewise, the recursive least-squares method was employed to develop local models for an adaptive PID design to control a fixed-bed reactor.11 Using the genetic algorithm, the PID controller is optimized for nonlinear processes, such as a polymerization reactor.12 Pan et al.13 developed a two-layer supervised control method for tuning PID controller parameters based on model parameters estimated by the lazy learning technique. Chang et al.14 developed a stable adaptation mechanism such that the PID parameters are adjusted to track certain feedback linearization control prespecified. However, the aforementioned previous results require a trial and error procedure for initialization of PID parameters, which hampers their application in control practices. To alleviate this shortcoming, a memory-based PID controller design was proposed.15 In this design method, initial PID parameters are designed around nominal operating condi* To whom correspondence should be addressed. Tel.: (+65) 65162223. Fax: (+65) 67791936. E-mail: [email protected].

tion, which is equivalent to a linear PID controller design that can be carried out straightforwardly. However, a detailed account of the condition required for the refinement of PID parameters was not available in this previous work. Furthermore, the number of nearest-neighbors employed in the design of PID parameters is carried out in an ad-hoc procedure. Motivated by the previous results, an adaptive PID (APID) design utilizing two databases is developed in this paper. The first database is the controller database which contains the PID parameters previously implemented and their corresponding information vectors. The initial controller database can be readily constructed from historical closed-loop data around a nominal operating condition. If this prior knowledge is not available, a PID controller can be designed for the local dynamics around nominal operating condition, which can be easily carried out by many PID tuning methods available in the literature. Subsequently, closed-loop data obtained from successive setpoint changes around a nominal operating condition can be used for the construction of initial controller database. Because an initial controller database can be easily obtained, the proposed method requires less trial and error effort compared to the previous methods.6-14 The second database is the modeling database which is utilized by the just-in-time learning (JITL) technique16-20 for modeling purposes. During online implementation, the relevant information is extracted from the controller database based on the current process dynamics characterized by the information vector and the nearestneighborhood criterion. Such information is subsequently utilized to calculate the PID parameters. Moreover, PID parameters thus obtained can be further fine-tuned when the predicted control error is greater than a prespecified threshold. In addition, the resulting PID parameters together with the corresponding information vector are stored in controller database. Simulation results are presented to illustrate the proposed control strategy, and a comparison with its conventional counterpart is made. 2. Adaptive PID Design for Nonlinear Systems As discussed above, the proposed APID design as depicted in Figure 1 requires not only the modeling database used by the JITL for modeling purposes but also the controller database, which is exploited by the proposed online PID tuning algorithm

10.1021/ie801227d CCC: $40.75  2009 American Chemical Society Published on Web 04/10/2009

4878

Ind. Eng. Chem. Res., Vol. 48, No. 10, 2009

Figure 1. Adaptive PID control system.

to compute the PID parameters at each sampling instance. In what follows, a brief review of JITL is provided first, followed by the detailed discussion of the proposed APID design. 2.1. Just-in-Time Learning Technique. The just-in-time learning (JITL) technique offers an attractive alternative for modeling the nonlinear systems because of its excellent prediction capability for nonlinear processes and its inherent adaptive nature compared with other global modeling approach such as neural networks.16-20 There are three main steps in the JITL in order to calculate the model output corresponding to the query data: (i) finding the relevant data samples in the modeling database corresponding to the query data by the nearestneighborhood criterion; (ii) constructing a low-order local model based on the relevant data; and (iii) obtaining the model output based on the local model and the current query data. When the next query data is available, a new local model will be built based on the aforementioned procedure. To apply the JITL technique, initial modeling database is constructed by using the process input and output data obtained around nominal operating condition. This modeling database can be updated online when the deviation between process output and its prediction obtained by the JITL is greater than the prespecified threshold. In those cases, the current process data is considered as new data that is not adequately represented by the present modeling database, and thus, it is added to the modeling database to improve its prediction accuracy for new operating region where the process data may not be available to construct the initial modeling database for JITL. As the JITL technique identifies the current process dynamics at each sampling instance by focusing on the relevant region around current operating condition, a low-order ARX model is usually used as a local model. In the proposed design, the following second-order ARX (autoregressive with exogenous inputs) model is considered: yˆ(k) ) Rk1y(k - 1) + Rk2 y(k - 2) + βku(k - 1)

(1)

where yˆ(k) is the predicted output by the JITL model, y(k - 1) and u(k - 1) denote the process output and input at the (k 1)th sampling instance, and the model parameters R1k , R2k , and βk are calculated by the JITL at the kth sampling instance. Based on eq 1, the regression vector is defined as x(k) ) [y(k - 1) y(k - 2) u(k - 1)] (2) Suppose that the present JITL’s database consists of N data (y(k), x(k))k)1-N. The following similarity measure, sk, is used

to select the relevant regression vectors from the modeling database that resemble the query data xq:20



2

sk ) φ e-|xq - x(k)| + (1 - φ)cos(θk);

if cos(θk) g 0

(3)

where φ is a weight parameter constrained between 0 and 1, | · | is an Euclidean norm, and θk is the angle between ∆xq and ∆x(k), where ∆xq ) xq- xq-1 and ∆x(k) ) x(k) - x(k - 1). The value of sk is bounded between 0 and 1. When sk approaches to 1, it implies that x(k) closely resembles xq. After all sk are computed by eq 3, for each l ∈ [kmin kmax], where kmin and kmax are the minimum and maximum numbers of relevant data, the relevant data set (yl, Φl) is constructed by selecting the l most relevant data (y(k), x(k)) corresponding to the largest sk to the lth largest sk. Next, leave-one-out cross validation test is applied to calculate the validation error. Upon the completion of above procedure, the optimal l, l*, is determined by that resulting in the smallest validation error. Subsequently, the predicted output for query data is calculated T T T Pl*)-1Pl* Wl*yl*, where Pl* ) Wl*Φl* and Wl* is a as xqT(Pl* diagonal matrix with entries being the first l* largest sk. 2.2. Controller Design. Consider the PID algorithm given by u(k) ) u(k - 1) + Kp(k)[e(k) - e(k - 1)] + Ki(k)e(k) + Kd(k)[e(k) - 2e(k - 1) + e(k - 2)] (4) where Kp(k), Ki(k), and Kd(k) are PID parameters at the kth sampling instance, and e(k) ) r(k) - y(k) is the error between set-point r(k) and process output at the kth sampling instance. The design of the proposed APID controller is discussed in the following subsections. 2.2.1. Generation of Initial Controller Database. As discussed previously, initial controller database can be easily constructed from the available historical operating data or closed-loop data obtained from experiments consisting of successive set-point changes around a nominal operating condition. The initial controller database is constructed as Φ(i) ) (K(i), xcl(i));

i ) 1, 2, ... , N0

(5)

where xcl(i) ) [ y(i - 1), u(i - 1)] is the information vector obtained from closed-loop data, PID parameters are given by K(i) ) [Kp(i) Ki(i) Kd(i)], and N0 denotes the number of information vectors stored in initial controller database. Because only one PID controller (K0) is employed to generate the above-

Ind. Eng. Chem. Res., Vol. 48, No. 10, 2009

4879

Table 1. Model Parameters of Polymerization Reactor kTc ) 1.3281 × 1010 m3/(kmol h) kTd ) 1.0930 × 1011 m3/(kmol h) kI ) 1.0225 × 10-1 L/h kp ) 2.4952 × 106 m3/(kmol h) kfm ) 2.4522 × 103 m3/(kmol h) f * ) 0.58

F ) 1.00 m3/h V ) 0.1 m3 CIin ) 8.0 kmol/m3 Mm ) 100.12 kg/kmol Cmin ) 6.0 kmol/m3

Table 2. Steady-State Operating Condition of Polymerization Reactor Cm ) 5.506774 kmol/m3 CI ) 0.132906 kmol/m3 D0 ) 0.0019752 kmol/m3

DI ) 49.38182 kmol/m3 u ) 0.016783 m3/h y ) 25000.5 kg/kmol

mentioned closed-loop data, K(1) ) K(2) ) · · · ) K(N0) ) K0 is specified in initial controller database. 2.2.2. Calculation of Initial PID Parameters. At the kth sampling instance during online implementation of the APID controller, the following measure is calculated between the query data xcl(k) and information vector xcl(i) in the controller database:



2

-|xcl(k) - xcl(i)|

di ) e

i ) 1, 2, ... , Nk

;

(6)

Figure 2. Input and output data used to construct modeling database for the JITL.

where Nk denotes the number of information vectors stored in the current controller database. To extract PID parameters from controller database, lc relevant information vectors or nearestneighbors in the controller database are selected to be those corresponding to the largest di to the lcth largest di. As the number of nearest-neighbors may vary with respect to the operating condition, which was not addressed in the previous work,15 a systematic procedure is developed in what follows to determine the optimal lc in a prespecified range. After lc nearest-neighbors are chosen, a weight is assigned to each neighbor by using the following equation: ωi )

lc

di

∑ω )1

,

lc

i

∑d

(7)

i)1

i

i)1

The PID parameters resulting from these lc nearest-neighbors are obtained as follows: lc

K0(k) )

∑ ω K(i) i

(8)

Figure 3. Input and output data used to construct initial controller database.

i)1

With PID parameters specified by eq 8, the resulting controller output is calculated by eq 4: uˆ(k) ) u(k - 1) + K0p(k)[e(k) - e(k - 1)] + K0i (k)e(k) + K0d(k)[e(k) - 2e(k - 1) + e(k - 2)] (9) As the controller output is known, the process output at the (k + 1)th sampling instance can be predicted by employing the JITL technique: k+1 k+1 yˆ(k + 1) ) Rk+1 uˆ(k) 1 y(k) + R2 y(k - 1) + β

(10)

The optimal nearest-neighbors at the kth sampling instance are then determined by that resulting in the smallest deviation between the set-point and predicted output calculated by eq 10. After the optimal nearest-neighbors lc is fixed, the fitness of its corresponding PID design, Kopt(k), is further evaluated in the next step. 2.2.3. Refinement of the PID Parameters and Update of Controller Database. Because the initial controller database is constructed by using the process data around nominal operating condition, it may not provide adequate information

to obtain PID parameters for the operating condition away from the nominal one. In this situation, the optimal PID parameters Kopt(k) obtained in the previous step need further refinement. To determine whether Kopt(k) is satisfactory or not, the following criterion is adopted in this paper:

|

|

r(k + 1) - yˆopt(k + 1)