Anda di halaman 1dari 18

Available online at www.sciencedirect.

com

Journal of Process Control 18 (2008) 131148 www.elsevier.com/locate/jprocont

A multiple model approach for predictive control of nonlinear hybrid systems


Naresh N. Nandola, Sharad Bhartiya
*
Department of Chemical Engineering, Indian Institute of Technology Bombay, Mumbai 400 076, India Received 2 February 2007; received in revised form 20 June 2007; accepted 20 July 2007

Abstract This paper presents modeling and control of nonlinear hybrid systems using multiple linearized models. Each linearized model is a local representation of all locations of the hybrid system. These models are then combined using Bayes theorem to describe the nonlinear hybrid system. The multiple models, which consist of continuous as well as discrete variables, are used for synthesis of a model predictive control (MPC) law. The discrete-time equivalent of the model predicts the hybrid system behavior over the prediction horizon. The MPC formulation takes on a similar form as that used for control of a continuous variable system. Although implementation of the control law requires solution of an online mixed integer nonlinear program, the optimization problem has a xed structure with certain computational advantages. We demonstrate performance and computational eciency of the modeling and control scheme using simulations on a benchmark three-spherical tank system and a hydraulic process plant. 2007 Elsevier Ltd. All rights reserved.
Keywords: Nonlinear hybrid system; Multiple model control; Model predictive control

1. Introduction Hybrid systems are characterized by interactions between continuous and discrete dynamics. The term hybrid has also been used to describe processes that involve continuous dynamics and discrete (logical) decisions [13]. Applications of hybrid systems have arisen in manufacturing systems, automobile control, and computer disk drive control among others. Although the use of a hybrid system framework in modeling and control of chemical processes has emerged only recently, large continuous plants have always used logic controllers to implement safety features such as the triggering of a coolant pump and the various safety interlocks. However, current trends in the chemical process industry emphasize the need for exible processing, which invariably necessitates a greater degree of logical

Corresponding author. Tel.: +91 22 2576 7225; fax: +91 22 2572 6895. E-mail address: bhartiya@che.iitb.ac.in (S. Bhartiya).

decision-making along with the continuous control laws. Similarly, batch processes, which are naturally characterized by a sequence of event or time-driven operations, can be described through mixed continuous and logical variables. The logic component may be realized through the use of on/o valves, a speed selector switch and ifthen-else rules. The control of such hybrid systems is often based on heuristics resulting from plant operation experience. Hybrid systems and their applications have attracted researchers from control and computer science community to focus on various aspects such as stability [4], simulation [5], verication [68], identication [9], control [1,2,10,11], modeling and analysis [12,13], and optimization [14]. A number of modeling formalisms that represent hybrid systems have been proposed in the literature. These formalisms can be broadly assigned to the following three categories [15]: (i) a discrete formalism, such as nite automata, that can be extended with continuous variables resulting in hybrid frameworks such as timed automata [16] and hybrid Petri Nets [17], (ii) a continuous formalism that

0959-1524/$ - see front matter 2007 Elsevier Ltd. All rights reserved. doi:10.1016/j.jprocont.2007.07.003

132

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

can accommodate discrete variables or logical conditions by appropriately switching between system dynamics, and (iii) an approach that directly combines the continuous subsystem with its discrete counterpart through an interface. In the current work, we adopt the second modeling strategy. In particular, we present a framework that represents nonlinear hybrid systems by combining multiple, partially linearized models. Thus, the framework can represent arbitrary nonlinear hybrid dynamic systems while retaining a xed model structure. Subsequently, a model predictive control (MPC) scheme is presented that uses the multiple, partially linearized models for predicting future plant behavior. The utility of the framework is demonstrated by modeling and control of two dierent applications, namely a three-spherical tank system and a hydraulic process plant. The results conrm that the multiple linearized model approach provides superior predictions for a nonlinear hybrid system relative to a single linearized model. Further, the approach also exhibits computational advantages over the mixed logical dynamic model [2] due to its compact formulation. The current paper is organized as follows: Section 2 develops the multiple, partially linearized modeling framework. Development of the model predictive control law based on the above mentioned framework is presented in Section 3. Section 4 documents the modeling and control of the two applications. Finally, the work is concluded in Section 5. 2. Multiple linearized modeling framework for nonlinear hybrid systems Hybrid systems may involve both continuous and discrete states as well as continuous and discrete inputs. Typically, the ow-eld describing the evolution of continuous states is dependent on discrete phenomena characterized by discrete state events as well as control events due to discrete inputs. A formal description of hybrid systems may be represented by a hybrid automaton (HA) [18,19] as the following septuple (L,X,A,W,E,Inv,Act). The continuous states x 2 X & Rn of the hybrid automaton HA evolve according to the continuous dynamic ow-eld and external inputs W & Rq. The status of the discrete state and input variables determine the location l 2 L of HA. Each location maps to the ow-eld via the map Act. E is a nite set of events described by a ve-tuple l; a; Guard ll0 ; Jumpll0 ; l0 , where l 0 2 L represents the new location upon occurrence of the event and a 2 A serves as a label of the event. Prior to the transition, the continuous state X must lie in the guard set denoted by Guard ll0 . The transition from location l to location l 0 represents a jump in the continuous states x and their values are reset by Jumpll0 . The invariant Inv maps the locations to the set of subset of X. Thus, if an event occurs, Inv evaluates to false and the discrete state transits to a new discrete location. The choice of the specic model structure of the hybrid automaton is dependent on the application at hand. For example, in formal verication, a simpler model, usually

an over-approximation of the original model, is employed. Timed automata [16] or rectangular automata [15] are common choices. Similarly, representation of hybrid systems for simulations has resulted in development of various platforms such as Simulink/Stateow and Modelica that use stateow chart formalism. On the other hand, control applications as well as fault detection and diagnosis studies have led to development of various linear modeling paradigms such as piecewise ane [20] (PWA) and mixed logical dynamic [2] (MLD) models. The equivalence between MLD and a variety of other linear hybrid models has also been proven [21]. In the area of nonlinear hybrid systems, Buss et al. [22] presented the Hybrid State Model (HSM), which models the nonlinear dynamics of the system with discrete states as well as discrete control inputs and forms the starting point for development of the multiple partially linearized modeling framework. The HSM model assumes that the system is driven by continuous and discrete manipulated inputs, uc(t) and ud(t), respectively. The continuous states xc(t) evolve based on the ow-eld fl, which is dependent on the location l of the system. To enable identication of the dierent locations and the transitions between them, suitable event generating functions sj, j = 1, . . . ,ns are dened. When one or more of these functions take on a value of zero, that is sj = 0, an event is said to occur. We assume that if a function equals zero at t then it will result in a sign change, that is a positive value at t will become negative at t+ after equaling zero and vice-versa. Thus, as long as the scalar functions sj do not cross zero (that is sj 6 0 or sj P 0), no new event occurs and the state evolves according to the ow-eld fl. For example, consider the level (h) of a tank being lled whose maximum level for safe operation is hmax. We may then dene a function s1 = h hmax, which is non-positive if the level of the tank is below the threshold (location l) and non-negative if above (location l 0 ). A value of zero (s1 = 0) identies occurrence of the event that the tank has achieved its maximum safe level. A number of such functions sj, j = 1, . . . ,ns may be necessary to uniquely identify all locations of the hybrid system. The identication of the event may be represented by _sj = 0, j = 1, . . . ,ns, that is an event is said to occur if one or more event generating functions become zero. When an event occurs, the system transits to a new location accompanied by a reset in both the continuous states xc(t) and discrete states xd(t), using a prescribed map b(xc,uc,xd,ud,t). Thus, the Hybrid State Model may be represented as,
_ xc fl xc ; xd ; uc ; ud ; t _ xd 0 xc t ' if sj xc ; uc ; xd ; ud ; t 6 0;

j 1; . . . ; ns ! bxc ; uc ; xd ; ud ; t xd t y t yd t
c

1
if _j1...ns sj xc ; uc ; xd ; ud ; t 0

2
hxc ; uc ; xd ; ud ; t

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

133

where yc(t) and yd(t) represent continuous and discrete outputs, respectively. In the above equation, fl represents the ow-eld corresponding to location l. The discrete states take on a xed value until they are reset upon occurrence of an event. For example, the discrete state variable FILL_ TANK(t) = 1 may indicate permission to commence lling of the tank. The value of this state continues to be 1 until a state event occurs (such as s1 = h hmax = 0) at which point the discrete state may be reset to 0, that is FILL_ TANK(t+) = 0. To identify occurrence of an event and hence the new location and the corresponding ow-eld, one may dene appropriate binary indicator variables dj 2 {0,1} corresponding to each event generating function sj as follows: sj 6 0 $ dj 1; j 1; . . . ; ns 4

linear inequalities using equivalence with propositional logic expressions (such as Big-M constraints; see, for example, [23,24]) followed by a matrix representation for the ns equations in Eq. (8) as follows: E 1 uc t E 2 dt E 3 xt 6 E 4 9 where Ei (i = 1, 2, 3, 4) are the corresponding coecient matrices of appropriate size and d represents the vector of binary variables comprising all indicator variables dj. Thus, the modied Hybrid State Model can be written as follows: _ xc fg xc ; uc ; d x t bd dt E 1 uc t E 2 dt E 3 xt 6 E 4 xc t xc t x t bd dt
d d

10 11 12 13 14

The status of the indicator variables uniquely denes the location l and hence the ow-eld fl. Thus, the continuous state evolution map of the HSM (Eq. (1)) may be rewritten as, _ xc fg xc ; uc ; d 5

where fg is a global ow-eld that subsumes all locationdependent ow-elds fl and is parameterized by the indicator vector d, whose values are implied by Eq. (4). Note that the vector d with ns binary elements can describe 2ns locations. A change in the status of one or more elements of d corresponds to an event that may be triggered by discontinuity in states (that is, a State Event (SE)) and/or discontinuity in inputs (that is, a Control Event (CE)). This fact enables one to relate the status of the discrete states to binary variables d as follows: xd t bd dt 6

The HSM represented in Eqs. (10)(14) may be used for modeling and control of nonlinear hybrid systems. Typically, models derived from real systems will be well-posed and solution of Eqs. (10)(14) will result in a unique trajectory x(t), for a given initial condition and control input trajectory [2]. However, use of the above HSM for a model based receding horizon control scheme needs solution of a MINLP optimization problem online. Further, the future prediction will require numerous integrations of Eq. (10). The following route is adopted to simplify the control problem formulation as well as computations, (i) obtain multiple linear models by linearizing the original HSM Eq. (10) at multiple operating points characterized by continuous variables (xc, uc). Thus at each operating point, we obtain linear models corresponding to all locations; (ii) discretize the continuous time linearized multiple models to obtain a discrete-time representation; (iii) obtain the nonlinear hybrid model prediction by weighting the multiple linearized models using a Bayesian criterion. The remainder of this section discusses each of the above three steps. 2.1. Model linearization Performing a Taylor series expansion on Eq. (10) around the point (xc, uc) and retaining the binary vector d as a parameter, one may obtain a linearized model as follows: _ xc Adxc Bduc f d x t bd d E 1 uc t E 2 dt E 3 xt 6 E 4
d

where the elements of bd depend on the status of the vector d(t). In most chemical processes, the continuous states represent physical quantities and typically exhibit a switch-like behavior upon occurrence of an event rather than a sudden jump. Thus, the continuous states are reset after an event as follows: xc t xc t 7

Eqs. (6) and (7) represent the reset map b in the HSM presented in Eq. (2). The HSM allows nonlinear functions to trigger an event. In most chemical processes, however, events are generated by (i) crossing of some threshold by the state of the system resulting in a SE, and (ii) activation and deactivation of inputs resulting in a CE. Therefore, in many instances, the condition sj 6 0 used in Eq. (4) can be specied in terms of linear constraints such as xi 6 c1 or axi + bui 6 c2. Thus, one may simplify Eq. (4) as follows: a0j uc t b0j xt cj 6 0 $ dj 1; j 1; . . . ; ns 8

15 16 17

where aj and bj are coecient vectors that relate appropriate elements of input and state vectors and cj is some scalar value. The implication in Eq. (8) may be reformulated as

Note that a xed value of the parameter vector d corresponds to a unique location of the hybrid system.

134

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148


2ns X i1

The deviation form of variables has not been used as this allows representation of non-equilibrium operation, a common feature in hybrid systems applications, resulting in the ane representation in Eq. (15). Remark 1. The continuous time model in Eqs. (15)(17) is nonlinear since the system matrices are a function of the indicator variables, which in turn are based on state and control events. Next, the above model is discretized in the time domain, which in turn will enable writing the prediction equations needed in MPC. However, the presence of discrete variables makes time-discretization a non-trivial task. 2.2. Discretization of linearized hybrid model One may use a numerical integration technique like the explicit Euler method to obtain a discrete-time representation of the linear model in Eq. (15). This approach has been used in the MLD framework [2]. However, the stability and accuracy of the explicit Euler method necessitate use of a small step size. To circumvent the inaccuracies due to the approximate discretization one could discretize the system using the analytical solution to the integration of continuous time linear systems using a zero order hold. We call this method exact discretization and present details below. Exact discretization: The method begins by xing the values of binary variables d in Eqs. (15) and (16), thereby obtaining a model for a system at a xed location [25]. Since ns binary variables result in 2ns possible locations, we obtain 2ns linear models from Eqs. (15) and (16), respectively as follows: _ xc Ai xc t B i uc t f i ; x bdi ;
d

! i;k Ui xk

xk1

2ns X i1

! i;k Ci uc k

2ns X i1

! i;k f di 22

E 1 uc k

E 2 dk E 3 xk 6 E 4

23

The logical multiplier i is based on the indicator variables, and is designed to take on a value 1 if and only if the ith combination of the binary variables is encountered and zero, otherwise. This is demonstrated using the following example. Example 1. Let us assume a hybrid system with two binary variables d1 and d2 (that is d d1 d2 T ) whose values characterize the locations of the hybrid system. In this case, we have four possible locations and the same number of linearized models, which take the form shown in Eq. (21). The four logical multipliers, 1, 2, 3 and 4 correspond to the cases 0 0T , 0 1T , 1 0T and 1 1T , respectively and are dened as, 1 1 d1 1 d2 2 1 d1 d2 3 d1 1 d2 4 d1 d2 Eqs. (22) and (23) can be recast into the MLD model [2]. This is accomplished by noting that the RHS of Eq. (22) has nonlinear terms due to multiplication between the indicator variables dk, state variables xc and inputs uc . In the k k MLD models, these multiplicative terms are masked by introducing auxiliary binary and auxiliary continuous variables and their associated constraints. The increased size of the MLD model typically imposes a large computational burden in its use. On the other hand, our experience has shown that retaining the model in the nonlinear form as shown by Eqs. (22) and (23) is computationally ecient since it involves fewer numbers of variables and constraints. The linearized discrete-time model (22) and (23) can be expressed in a compact form by dening the following, Lk 1;k I 2;k I 2ns ;k I T U UT UT UTns 1 2 2 T C CT CT CTns 1 2 2 T  f f T1 f T2 f T2ns d d d 24 25 26 27

i 1; 2; . . . ; 2ns

18 19

i 1; 2; . . . 2

ns

Models for continuous states (Eq. (18)) are then discretized using the standard technique based on integration of linear time invariant systems [26]. Thus, the hybrid model takes the form, # # " # ! " ! "  xc f di Ui 0 xc Ci c k1 k uk ; d d xk1 bdi 0 0 xk 0 i 1; 2; . . . ; 2ns 20 The above equation may be rewritten in a compact form as follows: xk1 Ui xk Ci uc f di ; k i 1; 2; . . . ; 2ns 21

The 2ns models obtained above may then be combined using a corresponding scalar logical multiplier [25] i to produce a discrete-time representation of Eqs. (15) and (16), which accounts for all locations. Note that the constraints in Eq. (17) can be rewritten in discrete-time form by merely replacing the continuous time variable t by a sampling time index k. Thus, the discrete-time representation of Eqs. (15)(17) is as follows:

I is an identity matrix of appropriate size. Thus, the model in Eqs. (22) and (23) takes the form,  xk1 Lk Uxk Lk Cuc Lk f k E 1 uc E 2 dk E 3 xk 6 E 4 k 28 29

The outputs of the linearized model may be written as follows: yk Cxk 30

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

135

Eqs. (28)(30) represent the nal form of the linearized model. Note that this model describes all locations of the nonlinear hybrid system in the vicinity of a single operating point. We may obtain similar linearized discrete-time models at dierent operating points [27] characterized by the continuous states and continuous inputs (xc, uc) and nally combine them to reconstitute the nonlinear model. Methods for obtaining multiple model predictions typically consist of using past measurements to determine the validity of each model. The validity of the models may be characterized using various criteria such as Bayes rule [28] and membership functions in a fuzzy logic approach [29]. The Bayesian weighting method has been employed for multiple model predictive control [30] as well as H1 control of nonlinear processes [31]. The current work uses the Bayesian method for obtaining multiple model predictions of nonlinear hybrid systems. The next section briey reviews this method. 2.3. Model predictions using Bayesian weighting of multiple linearized models Nonlinear systems can be decomposed into several local operating regimes [32] and linear models built for each of these regimes. Determining the number of local operating regimes and identication of the operating points is a non-trivial task. Criteria for selection of local operating points and their numbers depend on insights and knowledge of the system [28,30,32]. Recently, theoretic approaches to multiple modeling have emerged which are based on a variable model structure [33]. Here the local models are treated as random models, which take on specic values based on adaptive design methods. In our work, we follow the former approach and assume that nl local regimes have been identied that can adequately describe the overall operation. Each of these regimes may be described by a local model of the form of Eqs. (28)(30). The outputs of these individual models are then used to obtain the nal weighted model. By dening new coecient matrices appropriately the weighted model takes the same form as a single model described in Eqs. (28)(30). A typical approach involves weighting the dierent linear models to reconstitute the overall model. Thus, the overall weighted model may be written as,  xk1 Lk Uavg xk Lk Cavg uc Lk f avg 31
k

wi represents the weight of the model for the ith regime. One popular approach to determining the weight wi is based on a Bayesian interpretation of the plant model mismatch [30]. Here, wi has a value between 0 and 1 and summation of all weights equals unity. The weights are calculated online as shown in Fig. 1. The model bank contains models developed around multiple operating points as discussed previously. The Bayesian weight calculator calculates the weights, wi, using the past history of residuals and a probability is assigned to each model. The recursive Bayes theorem for the ith model at the kth time instant can be used to evaluate the posterior probability as follows:   exp 1 eI Kei;k pri;k1 2 i;k   pri;k P 37 nl 1 I j1 exp 2 ej;k Kej;k p rj;k1 y where ei;k ^k yi;k represents the residual between the measurement ^k and the output prediction by the ith model y yi,k at the kth instant. pri,k is the posterior probability of the measurement being closest to the prediction of the ith linearized model at kth instant. K is a time invariant weighting matrix known as convergence matrix and typically chosen to be diagonal. In view of the similarity with the normal distribution, K can be interpreted as the inverse matrix of the residual covariance. Higher values of diagonal elements of K indicate a small residual variance and thus greater condence in the residual of each model. Thus higher the values of the elements of K, faster is the rejection of models with large residuals. The user-dened K allows strategies ranging from a winner-take-all approach (large K) to a non-discriminating averaging approach (small K). Finally, the weights wi corresponding to each model may be obtained as follows:

E 1 uc E 2 dk E 3 x k 6 E 4 k yk Cxk

32 33

where the blended system matrices depend on weighting of the dierent models as follows: nl X Uavg wi Ui 34
i1

Cavg  f avg

nl X i1 nl X i1

wi Ci  wi f i

35 36
Fig. 1. Bayesian weighting based multiple model scheme [30] for obtaining multiple, partially linearized frameworks.

136

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

Fig. 2. Schematic representation of the multiple, partially linearized (MPL) model. The MPL model combines all locations (x-axis) of the hybrid system with local information at dierent operating points (y-axis) thus representing a nonlinear hybrid system.

ables is determined online as the solution of an optimal control problem over a horizon of given length. The behavior of the system over the horizon is predicted with a model and the current plant state estimate assumed as the initial state for this prediction. While a possibly large set of control moves is computed, only the rst one is implemented. When information about the plant state is available at the next sampling instant, the model is updated and optimization repeated over a shifted horizon. The ability to systematically include constraints and the capability to handle plants with multiple inputs and outputs has made MPC an attractive technique in the process industry. One of the main issues in implementation of nonlinear MPC is computational complexity and the time required for prediction. This is further exacerbated in case of hybrid systems due to the presence of binary variables. In this work, we use a quadratic cost function of the form p m1 X X  2 y y 2 uc uc  min J
uc ;...;uc k km1 dk ;...;dkp1 ki ref Ky ki ki1 Ku i1 i0

wi;k Pnl

pri;k

j1 p rj;k

38

Note that the model priors should take on values greater than zero to ensure their participation in the overall model prediction at all k. Eqs. (31)(38) may thus be used for modeling and control of a nonlinear hybrid system. Since the model is linear only at a xed location and nonlinear otherwise, we will refer to this model as the multiple, partially linearized (MPL) model. Remark 2. The method of obtaining the MPL model may be represented schematically as in Fig. 2. The linearized hybrid model in Eqs. (28)(30) is shown as the dashed horizontal line obtained by linearizing the nonlinear hybrid state model in Eqs. (10)(14) at points P1, P2 and so on. Although these models are obtained by linearization at a point, each model accounts for all locations l1, l2, lns and is therefore nonlinear. However, at any given location, the model becomes linear time invariant with xed system matrices. Finally, these models are combined using the Bayesian weighting approach. Thus, Eqs. (31)(33), approximate the nonlinear operating range as well as all locations of the hybrid system. For comparison purposes, the discrete-time linear hybrid model using the explicit Euler method was also developed. This model takes on a similar form as in Eqs. (28)(30) and is provided in Appendix I. We will use the term MPL-Exact model when using exact discretization with the MPL framework and MPL-Euler model when using discretization by explicit Euler along with the MPL framework. In the next section we develop a model predictive control scheme for control of nonlinear hybrid systems using the MPL model. 3. MPC formulation Model predictive control (MPC) is a form of feedback control, where the current value of the manipulated vari-

39 subject to mixed integer constraints of Eq. (32) and various process and safety constraints, ymax 6 y 6 ymin uc 6 u 6 uc max min 40 41

Ky, Ku represents error penalty and move suppression, respectively and p,m are the prediction and control horizons, respectively. Remark 3. Eq. (39) shows that the binary decision variables d are propagated up to p-1 samples in future. However, these binary variables consist of those related to control events and others related to state events. Although no distinction is made for ease of notation, the binary variables indicating control events (such as status of a solenoid valve) need be propagated only over the control horizon or m instants in future. The future predictions may be obtained by propagating the Eqs. (31) and (33) for p steps in future, which results in the following prediction equations for the state and output vk H 1k xk H 2k lc H 3k k wk H 1k xk H 2k lc H 3k k The dierent vectors are dened as follows:
T T vk xT xT . . . xT k1 k2 kp1 xkp T T wk yT yT . . . yT k1 k2 kp1 ykp T lc uc uc . . . uc k k1 km1 k T k dT dT dT . . . dT d k k1 k2 kp1
T T T

42 43

Similarly, the constraints resulting from propositional logic in Eq. (32) as well as the process and safety limits in Eqs. (40) and (41) may be written as,

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

137

E 1 lc E 2 k E 3 vk1 6 E 4 d k lc min 6 6 wmin 6 wk 6 wmax


2 Lk Uavg 3 7 7 7 7 7 7 7 7 7 7 7 5

44 45 46

lc k

lc max

Coecient matrices H1k, H2k, H3k and E 1 , E 2 , E 3 , E 4 are dened as follows:

H 1k

6 Lk1 Uavg Lk Uavg 6 6 6 Lk2 Uavg Lk1 Uavg . . . Lk Uavg 6 6 6 : 6 6 : 6 6 4 : 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 Lkp1 Uavg Lkp2 Uavg . . . Lk Uavg Lk Cavg Lk1 Uavg Lk Cavg Lk2 Uavg Lk1 Uavg Lk Cavg : : : : : Lkp1 Uavg Lkp2 Uavg . . . Lk Cavg 0 0 : : Lkm2 Cavg Lkm1 Uavg Lkm2 Cavg : :

0 Lk1 Cavg Lk2 Uavg Lk1 Cavg : : : : : Lkp1 Uavg Lkp2 Uavg . . . Lk1 Cavg 0 0

... ... ... ... ... ... ... ... ... 3

H 2k

Lkp1 Uavg Lkp2 Uavg . . . Lkm2 Cavg

2 6 6 6 6 6 6 6 6 6 6 6 6 6 4 2 6 6 6 6 6 6 6 E1 6 6 6 6 6 6 4 2

7 7 7 7 0 7 7 : 7 7 7 : 7 7 Lkm1 Cavg 7 7 7 Lkm Uavg Lkm1 Cavg Lkm Cavg 7 7 : 7 7 Lkp1 Uavg Lkp2 Uavg . . . Lkm1 Cavg 7 7 7 Lkp1 Uavg Lkp2 Uavg . . . Lkm Cavg 5 . . . Lkp1 Uavg Lkp2 Cavg Lkp1 Cavg  Lk f avg

3 7 7 7 7 7 7 7 7 7 7 7 7 7 5

  Lk1 Uavg Lk f avg Lk1 f avg avg Lk2 Uavg Lk1 f avg Lk2 f avg   Lk2 Uavg Lk1 Uavg Lk f : : : : avg Lkp1 Uavg . . . Lk1 f avg . . . Lkp1 f avg   Lkp1 Uavg Lkp2 Uavg . . . Lk f 3 0 0 :: m times E1 7 0 0 E1 : : 7 7 7 : 0 : : : 7 7 : : : : : 7 7 E i diag E i E i :: :: p times ; i 2; 3 0 0 0 :: E1 7 7 0 : : :: E1 7 7 7 5 : : : :: : 0 :: E1

H 3k

p times 0 3 E4 7 6 6 E4 7 7 6 7 6 E4 6 : 7 7 6 : 5 4 p times

where Ei(i = 1,2,3,4) are coecient matrices in Eq. (32).

138

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

Coecient matrices H 1k , H 2k and H 3k may be obtained by pre-multiplying each element block of H1k,H2k and H3k by matrix C, respectively. Substituting Eq. (43) in Eq. (39) results in simplication of objective function, min J wk wref W y wk wref
lk ;k d T

solution scheme by making use of analytical gradient and Hessian to speedup the solution of online optimization. 4. Application We evaluate the MPL modeling and control strategy using simulation of two dierent applications, namely a three-tank benchmark system, which has been modied to enhance nonlinearity, and a PLC based operation of a hydraulic process plant. 4.1. Spherical three-tank system The three-tank system is based on the three-tank benchmark problem that has been used by a number of researchers [35,36]. In order to enhance the nonlinear behavior, we modify the benchmark problem to three spherical tanks instead of the cylindrical tanks, as shown in Fig. 3. The system consists of two independent pumps that deliver the liquid ows Q1 and Q2 to Tank-1 and Tank-2, respectively through the two control valves. Six independent solenoid (on/o) valves (V1, V2,V13,V23,VL1 and VN3) can be manipulated to interrupt the ows into or out of the three-tanks. Tank-1 and Tank-3 as well as Tank-2 and Tank-3 are connected through upper and lower pipes. The lower pipes are located at the bottom of the tanks while the upper pipes are located at a height hv(0.3 m). This system exhibits typical characteristics of a hybrid dynamical system. The system transits between its locations due to the logic inputs (the solenoid valves) and continuous variables (if h1 > hv then the outow dynamics in Tank-1 changes). The nonlinearity results from the spherical shape of the tanks as well as the constitutive relationship between the exit ows and the level in each tank. The six solenoid valves may be assigned binary indicator variables, whose value equals 1 when the corresponding valve is open and 0 otherwise. Thus, the opening and closing of valves may be classied as control events (CE),

Rlc k

T R0 uc W u Rlc k1 k

R 0 uc k1

47

where Wy,Wu are error penalty and move suppression weight matrices of appropriate size, respectively. Matrices R and R0 are dened as follows: 3 3 2 2 I 0 0 :: 0 0 I 7 7 6 6 7 6 I I 0 :: 0 0 7 6 0 7 7 6 6 7 7 6 6 7 6 0 I I :: 0 0 7 6 0 7 7 6 6 R6 7 and R0 6 7 7 7 6 : 6 : : :: :: :: 7 : 7 6 6 7 7 6 6 7 6 0 6 0 0 :: I 0 7 : 5 5 4 4 0 0 0 :: I I m times where I is an identity matrix whose size is determined by the number of manipulated inputs. Minimization of the above objective function subject to mixed integer constraints in Eq. (44) and the process and safety constraints in Eqs. (45) and (46) constitute the MPC law. Note that the above formulation can accommodate single partially linearized model (Eqs. (28)(30)) or the MPL model (Eqs. (31)(33)) since both these models have a similar form. Also, the MPL-Euler model discussed in Appendix I can be accommodated in the above formulation. Further, if we x the binary variables, the above MPC formulation is identical to that used for discrete-time model for the conventional non-hybrid system (see for example Ricker [34]). Although, the control law shown in Eq. (47) necessitates an online solution of an MINLP, the MPL model oers an advantage of a xed structure of the objective function and constraints. Thus, one may derive an ecient

Fig. 3. Schematic of the 3-Tank benchmark problem.

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

139

which may be captured in the dynamic model by the use of the indicator variables as follows: ph1 hmax h1 dh1 Q1 V 13 Q13V 13 V 1 Q13V 1 V L1 QL1 dt 48 dh2 Q2 V 23 Q23V 23 V 2 Q23V 2 49 ph2 hmax h2 dt dh3 ph3 hmax h3 dt V 13 Q13V 13 V 23 Q23V 23 V 1 Q13V 1 V 2 Q23V 2 V N 3 QN 50 where V1,V2,V13,V23,VL1 and VN3 represents binary indicator variables for corresponding valves, and hmax represents tank diameter (0.6 m). Variables Qi represent owrates through valves Vi and may be evaluated using the following constitutive equations, p 51 Qi3V i3 az S i3 signhi h3 j2ghi h3 j; i 1; 2 p QL1 az S L1 2gh1 52 p 53 QN az S N 2gh3 The expressions for Qi3V i depends on whether the heights hj (j = 1, 2, 3) are greater or less than hv = 0.3 m. Thus, Qi3V i V i az S i signmaxfhi ; hv g maxfh3 ; hv g p 2gjmaxfhi ; hv g maxfh3 ; hv gj; i 1; 2 54 Note that Eq. (54) represents all state events and thus we need not dene indicator variables for discrete states. Thus, xc x y h1 h2 h3 T uc Q1 Q2 ud d V 13 V 23 V 1 V 2
T

V L1

V N3

where Si, Si3, SL1 and SN are cross sectional areas of valves and assumed identical for all valves (0.95 cm2) and az is the discharge coecient, which is assumed to be unity. Next, we develop three linearized models of the form (28)(30) for the three-spherical tank system. The points of linearization are listed below (i) Model-I: h1 = h2 = 0.15 (or 25%), h3 = 0.14 (or 23%) and Q1 = Q2 = 0 (ii) Model-II: h1 = h2 = 0.25 (or 42%), h3 = 0.24 (or 40%) and Q1 = Q2 = 0 (iii) Model-III: h1 = h2 = 0.35 (or 58%), h3 = 0.34 (or 57%) and Q1 = Q2 = 0 Model-I and Model-II correspond to levels below the upper pipe connections while Model-III corresponds to a level above the upper pipe. The three points correspond to low, medium and high levels in the three tanks. Also, the points of linearization were chosen such that the continuity of the max function is maintained. Alternatively, smooth approximation of the max function may be used. Each of the three models describes all locations of the hybrid system. The values of the coecient matrices

 Uavg ; Cavg ; f avg ; Lk have not been shown owing to their extensiveness. In order to compare the accuracy of a single partially linearized model with our MPL framework, we simulate the plant model of (Eqs. (48)(54)) by increasing the ow rates Q1 and Q2 to 0.7% of their maximum value (Qi,max = 0.0015 m3/s) at t = 0. Prior to the change, the three-tanks were nearly empty and the two control valves as well as the six solenoid valves were completely closed. During the course of the simulation, a number of arbitrary changes were made in the status of the six solenoid valves. The levels in the three-tanks are shown in Fig. 4ac, respectively. The nonlinear plant (solid line) based on Eqs. (48)(54) is compared with the single Model-II (dotted line) and the MPL model (dashed-dotted). It can be noted that the MPL model consistently provides accurate predictions relative to the single partially linearized model throughout the course of the simulation. Extensive simulations with dierent inputs consistently indicate the superior performance of the MPL framework over the entire level range in the tanks. This can be explained by the fact that the MPL framework is a composite of all three models. As discussed earlier, weights for each model is calculated online based on the model residuals and are shown in Fig. 4d. The solid line with squares, dashed-dotted line with inverted triangles and dotted line with circles correspond to Model-I, Model-II and Model-III, respectively. It is observed that only one of the three models is selected at any given time by the Bayesian approach of Eqs. (37) and (38). This winner-take-all results from the large values assigned to K (diag[1000 1000 1000]). The large K has been used to reect the fact that the linearized models accurately describe the plant (nonlinear model) locally. Fig. 4d shows that MPL framework uses Model-I until approximately t = 10,000 s after which it switches to Model-III. We use the MPL model based MPC for a setpoint tracking control problem, which involves lling of empty tanks to desired levels, followed by multiple setpoint changes. To demonstrate the computational advantages of the multiple partially linearized model over the MLD model, we compare our results with a multiple MLD (MMLD) model based MPC. Three MLD models are obtained at the same operating points by introducing auxiliary variables and associated constraints. These MLD models are then used in the multiple model scheme shown in Fig. 1 with Bayesian weighting. The MPC formulation using MLD model is provided in Online Electronic Annex-I. We also consider two dierent levels of complexities in terms of independent manipulation of solenoid valves (or number of binary inputs) to study the scalability of our formulation in terms of the computation time. In the rst case, we reduce the number of binary inputs to 3 by assuming that each pair of valves V1 and V13, V2 and V23,VL1 and VN3 are switched (on/o) simultaneously. In the second case, all solenoid valves are manipulated independently resulting in six binary inputs. Both cases use a sampling time ts of 3 s,

140

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

75 50 25 0

75

h2 (%) Weight
0 5000 10000 15000

h1 (%)

50 25 0

1 75

h3 (%)

50 25 0

0.5

0 0 5000 10000 15000

Time (sec)

Time (sec)

Fig. 4. (a)(c) Comparison of predictions of multiple model MPL framework (dashed-dotted line) and a single linearized model, Model-II (dotted line) with the rst principles model (solid line) for various changes in inputs. (d) weights of the three models during the simulation. Model-I (solid line with square), Model-II (dashed-dotted line with inverted triangle) and Model-III (dotted line with circle) for MPL case.

prediction horizon, p = 5 (15 s) and control horizon, m = 2 (6 s). We consider nonlinear dynamic Eqs. (48)(54) as the plant model and MPL/MMLD framework as the prediction model. Model prediction is corrected by adding a constant plant model mismatch over a prediction horizon. Note that the MPL model based MPC results in an online MINLP optimization problem while the MMLD model based MPC results in an online MIQP optimization problem. The branch and bound strategy is used to solve the mixed integer programs. The relaxed NLP (for MINLP in MPL model based MPC) and QP (for MIQP in MMLD model based MPC) problems are solved using fmincon and quadprog in MATLAB 6.5 (Mathworks Inc, Natick, MA, USA). All simulations have been performed on a 3.0 GHz P-IV machine with 1 GB RAM. Case 1. Simultaneous switching of V1 and V13,V2 and V23,VL1 and VN3. Fig. 5 documents lling and control of the levels in the three-tanks at dierent levels using the MPL-Exact model (solid line) as well as the corresponding MMLD-Exact model (dotted line). Various characteristics of the 3-tank benchmark problem are reected in these results. For example, Fig. 5b shows that the lling of Tank-2 is faster than emptying. This can be explained by noting that Tank-2 does not have an exit at its bottom and can be emptied only by discharging to Tank-3. Similarly it takes longer to ll Tank-3 than either Tank-1 or Tank-2. Manipulated variables (Q1,Q2 and the six solenoid valves) for the MPL (solid line), and MMLD (dotted line) are shown in

Fig. 6. In order to convert the partially linearized model to MLD framework, we introduced 4 auxiliary binary variables, 27 auxiliary continuous variables and 121 linear mixed integer constraints. The resulting MPC problem is an MIQP with 14 binary variables, 139 continuous variables and 655 constraints (for p = 5 and m = 2) (see Online Electronic Annex-I). On the other hand, MPC using MPLExact approach requires an online solution of an MINLP with only 6 binary variables, 4 continuous variables and 50 constraints. Note that in this example, the binary variables represent control events and hence they need to be propagated only up to the control horizon, m = 2 (see Remark 3). Since the MPL and the MMLD frameworks are equivalent, the two solutions are nearly identical and the minor dierences can be attributed to numerical methods. However, the main advantage of the MPL framework over the MMLD framework lies in computational eciency. The mean and standard deviation of the computation times needed to calculate the control moves using the MPL-Exact model are 0.6777 s and 0.8014 s, respectively. On the other hand, the mean and standard deviation of using MMLD-Exact model based control were 438.84 s and 220.49 s for the same operation. This clearly demonstrates the eciency of the MPL model based MPC over the MMLD model based MPC. We also tested the MPL-Euler model and the MMLDEuler model with the same lling followed by level control problem. Unlike the exact discretization approach, where models corresponding to each location are obtained and then recombined using logical multipliers, the use of

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

141

75

h1 (%) h2 (%) h3 (%)

50 25
0

75 50 25
0

75 50 25
0 0

100

200

300

400

500

600

700

Time (sec)
Fig. 5. Case 1: 3 binary manipulated inputs. Model predictive control of levels h1, h2, and h3 in the 3-Spherical Tank system using the MPL-Exact model (solid line) and the corresponding MMLD-Exact model (dotted line). 100% corresponds to 0.6 m height.

x 10

x 10 15

15

Q1 (m3/s)

Q2 (m3/s)
0

0 1

V13 and V1

V23 and V2
0 0 1 200 400 600 750

Time (sec)

VL1 and VN3

0 0 200 400 600 750

Time (sec)
Fig. 6. Case 1: 3 binary manipulated inputs. Control moves for the level control problem in the 3-Spherical Tank system using the MPL-Exact model (solid line) and MMLD-Exact model (dotted line).

explicit Euler simplies the various expressions in MPL model (see Appendix I) and also reduces the number of

auxiliary variables needed in the MLD model. The MMLD-Euler based MPC results in an online optimiza-

142

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

tion problem with 6 binary variables, 34 continuous variables and 170 constraints, which is signicantly smaller than the MMLD-Exact model based MPC problem. The simulation proles for these are not presented here due to space limitation. However, the mean and standard deviation of the time required to compute each online solution during control are provided in Table 1. It is observed that the MPL-Euler model has advantages over the MPL-Exact model in terms of computation eciency. However, the MPL-Euler framework results in higher overshoots and larger settling times as compared to MPL-Exact framework, which is attributed to inadequacies associated with the explicit Euler discretization method. The mean and standard deviation of computation time per sampling instant for MPL-Euler model are 0.65 s and 0.72 s, respectively and for MMLD-Euler model they are 8.1 s and 4.54 s, respectively. These dierences can be explained by the size of optimization problem discussed above. The 3-tank application represents an integrating system. Ideally, once the three-tanks have achieved the desired set points, the controller should turn o all the valves until a new set point is implemented. If such an approach is not pursued, the controller attempts to maintain the desired level by continual opening and closing the solenoid valves due to integrating nature of the three-tank system and hence an oscillatory behavior around the vicinity of setpoints is observed in outputs. To avoid such oscillatory behavior, one could penalize excessive movement of the solenoid valves directly in the objective function in Eq. (39). In the present work, we used the simple heuristic that all valves are closed after the outputs attain their setpoints. For example, at t = 260 s all tanks achieve their prescribed level and therefore the heuristic deactivates the controller and closes all valves in order to maintain level at that particular setpoint (see Fig. 5). At time, t = 363 s the controller is reactivated as a new setpoint is implemented. To achieve the higher desired level h1, the controller increases Q1 and also opens valves V13, V1 and V23 V2 in order to achieve lower level in Tank-2. Further Q2 remains closed in order to decrease level in Tank-2. Again at time, t = 450 s the controller is deactivated as the desired setpoints are achieved.

Case 2. Independent manipulation of all valves. In Case 1, pairs of solenoid valves were simultaneously operated to reduce the size of the optimization problem. Ideally, however, it is desirable to manipulate the solenoid valves independently. This results in an optimization problem for MPL-Exact with 12 binary and 4 continuous variables and 62 constraints. The corresponding MMLD formalism resulted in an online optimization problem with 70 binary variables, 209 continuous variables and 1457 constraints. Simulation results using the MPL-Exact formulation are shown in Fig. 7 as the solid line. As expected, the current case has higher degrees of freedom and therefore performs better than Case 1. For example, implementation of the set point at t = 150 s necessitates draining of Tank 1 through VL1, while VN3 must remain closed to increase h3. However, as noted in Fig. 5c, simultaneous opening of VL1 and VN3 results in draining of Tank-3 as in Case 1. Thus, in Case 2, a simultaneous decrease in h1 and increase in h3 at t = 150 is better handled than in Case 1. The higher degrees of freedom in Case 2 also results in a superior dynamic performance. For example, the settling times of Tank-3 for Cases 1 and 2 following setpoint changes at 150 s are noted as 120 s and 80 s, respectively. However, the mean and standard deviation of the computation time for Case 2 when using MPL-Exact base MPC are 1.9 s and 2.8 s, which are higher than in Case 1 (see Table 1). The MMLD-Exact model for Case 2 resulted in an intractable online optimization problem, where not a single optimization problem could be solved in an entire day. The manipulated variable prole (Q1, Q2 and the six solenoid valves) for the MPL-Exact (solid line) is shown in Fig. 8. We also studied the control problem of Case 2 using MPL-Euler formulation discussed previously. The simulation results are documented in Fig. 7 as the dotted line. As expected, control with MPL-Exact discretization performs better than with the MPL-Euler model since it provides relatively accurate approximation of the nonlinear plant model. Control with the MPL-Euler model results in higher overshoots and larger settling times as compared to control using the MPL-Exact model. This behavior may be explained by the inaccurate integration of the nonlinear plant by the explicit Euler technique. However, the MPLEuler model requires lesser time to solve the online MINLP than when using the MPL-Exact model. The mean and standard deviation of computation time needed per online solution of the control problem with the MPL-Euler model are 0.8219 s and 1.3660 s, respectively (see Table 1). This may be explained by the fact that although the number of decision variables and constraints remain same in both MPL-Exact and MPL-Euler models, the computational overheads in evaluation of LN in Eq. A-10 is small as comk pared to Lk in Eq. (31). The manipulated variables (Q1,Q2 and the six solenoid valves) prole for the MPL-Euler is shown as the dotted line in Fig. 8. Table 1 also documents the statistics of computational eciency when using MMLD-Exact and MMLD-Euler

Table 1 Mean and Standard deviation of computation time for various case of MPC simulation of 750 s for three-spherical tank system using sampling time ts = 3 s Exact Case 1a MPL MMLD
a b *

Explicit Euler Case 2b 1.9295 2.8310


* *

Case 1a 0.6461 0.7194 8.0989 4.5365

Case 2b 0.8219 1.3660 196.88 87.5231

Mean(s) SD(s) Mean(s) SD(s)

0.6777 0.8014 438.84 220.4904

Case 1: 3 binary inputs. Case 2: 6 binary inputs. Could not solved a single optimization problem in entire day.

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

143

75

h1 (%) h2 (%) h3 (%)

50 25 0

75 50 25 0

75 50 25 0 0 100 200 300 400 500 600 700

Time (sec)
Fig. 7. Case 2: 6 binary manipulated inputs. Model predictive control of levels h1, h2, and h3 in the 3-Spherical Tank system using the MPL-Exact model (solid line) and the corresponding MPL-Euler model (dotted line). 100% corresponds to 0.6 m height.

x 10 15

x 10 15

Q1 (m3/s)

0 1

Q2 (m2/s) V23 V2 VN3

0 1

V13
0

V1
0

VL1
0 0 200 400 600 750

0 0 200 400 600 750

Time (sec)

Time (sec)

Fig. 8. Case 2: 6 binary manipulated inputs. Control moves for the level control problem in the 3-Spherical Tank system using the MPL-Exact model (solid line) and MPL-Euler model (dotted line).

as the controller models. Upon comparing the computation times between the above two cases, it is observed that con-

trol with MPL models is scalable (doubling the number of binary variables increases computational time 3 times with

144

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

MPL-Exact and 1.25 times with MPL-Euler). The computation time required for control with the MMLD-Exact model is signicantly higher (%50 times) than its corresponding MMLD-Euler model. On the other hand, for the MPL models this dierence is not signicant. This is due to the fact that in MPL models the number of decision variables and number of constraints remain same in either case and the dierence arises due to the simpler form of LN k in Eq. A-10 for MPL-Euler model than Lk in Eq. (31) for MPL-Exact model. On the other hand, MMLD-Exact model introduces far larger number of auxiliary variables and constraints than the corresponding MMLD-Euler model, thus making it computationally expensive. Thus, the MPL model provides a computationally attractive framework for control of nonlinear hybrid systems. 4.2. Hydraulic process In this example we demonstrate modeling and control of a hydraulic process reported in the literature. The problem involves discrete as well as continuous states. In practice discrete decisions are typically implemented using a programmable logic controller (PLC). However, control of a hybrid systems using MPC can integrate the PLC-like decision-making and manipulation of continuous inputs into a single control law formulation. A schematic of the hydraulic process plant is shown in Fig. 9, whose modeling and control has been reported in the literature [25]. In the hydraulic plant, water is heated in Tank-21 and Tank-22 by two separate on/o electric heaters. The warm water is then supplied to Tank-3 by means of two separate on/ o pumps. Finally, the warm water from Tank-3 exits as the nal product by an on/o pump, a part of which is recycled by a speed-regulated pump to Tank-1. Tank-1 supplies water to Tank-21 and Tank-22. Tank-1 and Tank-3 also receive cold water by means of an on/o pump and a speed-regulated pump, respectively. A rst principles model has been provided by Colmenares et al. [25] and is reproduced below, dh1 0:1154q31 q0 q11 q12 55 dt dh3 0:1154q21 q22 q23 q31 q32 56 dt dT 1 0:1154q31 T 3 T 1 q0 10 T 1 57 h1 dt dT 3 0:1154q21 T 21 T 3 q22 T 22 T 3 q23 10 T 3 h3 dt 58 dh21 0:1346q11 q21 59 dt dT 21 h21 0:13467:102QH 1 q11 T 1 T 21 60 dt dh22 0:1346q12 q22 61 dt dT 22 h22 0:13467:102QH 2 q12 T 1 T 22 62 dt

Fig. 9. Schematic diagram of the hydraulic process plant for temperature and level control in Tank-1 and Tank-3 (adapted from [25]).

where q0, q11, q12, q21, q22, q32, represent ows that have been normalized to take a value of 1 when they are active and 0 otherwise (that is, they are discrete inputs). Flow rates q23 and q31 represent continuous normalized ows and the rate of heat addition by the heaters namely QH1 and QH2 take discrete values of 0 or 1. The interpretation of all other variables is available from Fig. 9. The control objective of this process is to obtain warm water while maintaining levels in Tank-1 and Tank-3 within prescribed upper and lower limits. The operation of Tank-21 and Tank-22 is governed by discrete decisions, which may be modeled using discrete states. Each of the two tanks must ll up to a height of 15 cm and heated to a temperature of 25 C starting from 10 C before they can discharge to Tank-3. Once the tanks are ready to discharge the controller decides to discharge or the tanks can merely wait to discharge. However, once a particular tank begins discharging it cannot be interrupted until the water level drops to 5 cm. Simultaneous lling and discharging is also not permitted. Further, during discharging of a particular tank, the corresponding heater is turned o.

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

145

Also, Tank-21 and Tank-22 cannot be simultaneously discharged. However, they may be lled simultaneously. Colmenares et al. [25] used the MLD framework to model this system. However, a large numbers of auxiliary variable were arbitrarily dropped from the MLD formulation to enable reasonable computation times. We model the hydraulic process using the proposed partially linearized model by linearizing the nonlinear Eqs. (55)(62) around a xed operating point characterized by continuous variables. The operating point considered here is identical to that used by Colmenares et al. [25] at q23 = q31 = 0.5, T3 = 20 C, T1 = 15 C, T21 = T22 = 25 C, and h1 = h21 = h22 = h3 = 15 cm. The model consists of eight continuous states (h1,h3,T1,T3,h21,T21,h22,T22), two discrete states OFFLOAD_T21 and OFFLOAD_T22, two continuous inputs (q23 and q31), and seven discrete inputs (q0,q11,q12,q21,q22,QH1,QH2). We introduce 7 extra logical (binary) variables (d1,d2,d3,d4,d5,e1,e2) during the problem formulation. Of these logical variables, d1 and d3 indicate the maximum levels in Tank-21 and Tank-22, respectively. While d2 and d4 represent the corresponding minimum levels, d5 represents the permission to begin ooading either Tank-21 or Tank-22. A particular tank ooads only when d5 equals 1. As d5 is a common variable for both tanks, we have assigned a higher priority to ooad Tank-21 in case of a tie. Logical variables e1 and e2 keep information about the status of loading/ooading of Tank-21 and Tank-22, respectively and hence are directly related to the discrete states. The logical expressions are then converted to linear inequalities. Fifty-six linear inequality constraints have been introduced to convert the decision-making into

inequalities. Online Electronic Annex-II presents all logical expressions necessary to implement the logical decisionmaking. Since the current application was based around a single operating point, we used only a single partially linearized model. The original nonlinear dynamic Eqs. (55)(62) are considered as the plant model and the partially linearized model as the controller model. Note that the PLC decision-making scheme is dependent on the states of the systems as discussed above. This necessitates immediate changes in the status of discrete inputs as soon as the states reach their threshold, which in turn compels selection of prediction horizon (p) equal to control horizon (m) in the MPC problem. We use a sampling time, ts = 30 s, prediction horizon and control horizon of unity (p = m = 1), which result in an online optimization problem with 14 binary variables, 2 continuous variables and 90 constraints. Model predictions are corrected using constant output feedback. We consider setpoint changes in the temperature of the exit ow as 17 C during rst hour, 20 C during second hour, 15 C for the next two hours, 20 C for fth hour 22 C for the sixth hour and 18 C for last hour as well as 15 cm as the levels in Tank-3 and Tank-1 throughout the simulation. The simulation results of MPC are shown in Fig. 10. The oscillatory nature of all variables is due to cyclic lling and emptying of Tank-21 and Tank-22. The proles of heights in Tank-1 and Tank-3 are also closer to their setpoints. However, we could not achieve the setpoint of 22 C in Tank-3. The reason for this is that the logical decisions are designed such that we cannot get water warmer than 25 C and we require nonstop constant out ow of

24

T3 (deg.C) h3 (cm) h1 (cm)

18

12
20

15

10

20

15

10 0 1 2 3 4 5 6 7

Time (hour)
Fig. 10. Control of temperature (T3) and level (h3) in Tank-3 and level (h1) in Tank-1 of the hydraulic process plant during setpoint tracking.

146

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

water from Tank-3. During the same time, level of Tank-3 also should be maintained around 15 cm, which necessitates the supply of cold water to Tank-3 from sump via a side stream. This issue is related to reachability of hybrid

systems and is not addressed here. The simulation results for 2 continuous and 7 binary manipulated variables are shown in Fig. 11. Prole of temperatures and heights in Tank-21 and Tank-22 are shown in Fig. 12, which

Fig. 11. Manipulated inputs for control of temperature (T3) and level (h3) in Tank-3 and level (h1) in Tank-1 of hydraulic process plant. (For clarity, simulation results corresponding to 13 h are shown from the total simulation duration of 7 hours.)

20

h21 (cm) T21 (deg.C) h22 (cm) T22 (deg.C)

10 0 30 20 10 20 10 0 30 20 10

1.5

2.5

3.5

Time (hour)
Fig. 12. Levels (h21 and h22) and temperature (T21 and T22) in Tank 21 and Tank 22 of the hydraulic process plant for control of temperature and level in Tank-3 and level in Tank-1. (For clarity, simulation results corresponding to 14 h are shown from the total simulation duration of 7 h.)

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148

147

demonstrate that the hybrid MPC controller indeed implements the PLC-like decision-making in addition to the manipulation of the continuous inputs. The mean and standard deviation for the computation time of the control moves are 8.1614 s and 5.0215 s, respectively. 5. Conclusion Applications of hybrid systems are becoming increasingly common in the process industry. In this work, we presented a framework for modeling of nonlinear hybrid processes. The framework uses multiple partially linearized model representation with blending of models using Bayes theorem. This enables us to write equations for synthesis of an MPC controller, which is similar in form to those commonly used in the literature for control of conventional continuous variables processes. Further, we demonstrate modeling and control on two applications namely the three-spherical tank systems and the hydraulic process. The MPL model refrains from masking mixed and nonlinear terms using auxiliary variables, resulting in a control law that requires solution of an MINLP. If we were to pursue an MLD model the resulting control law would require solution of an MIQP, which would have a signicantly larger number of binary and mixed variables as well as constraints relative to the MPL model. The increased size of the MIQP makes it computationally unattractive relative to the MINLP with the MPL model. The main hurdle in the optimal control of hybrid systems is the requirement of an online solution to an MINLP. In the multiple model framework, the nonlinear behavior is described by models with a dened structure. Thus, the MPC formulation results in an objective function and constraints of a xed structure regardless of the underlying nonlinearity. One may therefore design optimization algorithms that exploit this feature. The computational eciency already demonstrated with the current formulation presents further opportunities to enable online control of nonlinear hybrid systems. The multi-parametric optimization for control of hybrid systems is a promising approach that signicantly reduces the online computational expense [37,38]. Another area that needs to be investigated is handling noisy measurements and unmeasured disturbances. For example, the heuristic used in the 3-tank system to avoid the oscillatory behavior may not be eective in presence of noise. This issue may be partly addressed through development of state estimators such as in [39] and development of disturbance models. Appendix I. Discretization of continuous time linear hybrid dynamic system using the Explicit Euler method Consider linearized hybrid system of the form (15)(17). Eq. (15) may be discretized using explicit Euler integration technique as follows: xc xc ts Adk xc Bdk uc f dk k1 k k k A-1

From Eqs. (16) and (A-1), discrete-time equation for both the continuous and the discrete states may be written as follows: ! ! ! xc I cs 0 xc k1 k xd 0 0 xd k1 k ! ! Adk 0 xc k ts 0 0 xd k ! ! f dk Bdk c ts uk ts 1 A-2 ts bd dk 0 where Ics is an identity matrix of size A. Eq. (A-2) may then be rewritten as xk1 HN ts AN dk xk ts B N dk uc ts f N dk k A-3

where AN(dk),BN(dk) and fN(dk) are time varying coecient matrices whose elements are polynomial of binary variables (element of vector dk). These matrices can be decomposed as follows ts AN dk An pn An pn An pn An 0 1 1 2 2 s s ts BN dk Bn pn B n pn B n pn B n 0 1 1 2 2 s s ts f N dk f n pn f n pn f n pn f n 0 1 1 2 2 s s A-4 A-5 A-6

where pn i 1; 2; 3; . . . ; s is the ith term of representative i polynomial of binary variables. Eqs. (A-4, A-5,A-6) may then be rewritten as follows ts AN dk LN UN k ts BN d LN CN k  ts f N dk LN f N k where, LN I N pn I N pn I N . . . pn I N ; k 1 2 s is a function of discrete variables i:e: dk h iT T T T T UN A n A n A n . . . A n 0 1 2 s h iT T T T T CN Bn Bn B n . . . B n 0 1 2 s  f nT f nT f nT . . . f nT T fN 0 1 2 s A-7 A-8 A-9

A-10 A-11 A-12 A-13

IN is an identity matrix of size of An . i Thus, discrete-time equation for state can be written as follows  xk1 HN LN UN xk LN CN uc LN f N A-14 k k k k while the equation for output and mixed constraints remain same as in Eqs. (29) and (30). Note that structurally, both Eq. (28) (exact discretization) and Eq. (A-14) (explicit Euler discretization) are same, the only dierence appearing in the denition of Lk and LN . The structural denition k of Lk in case of exact discretization remains same for any system while in numerical integration techniques like explicit Euler structure of LN vary system to system. However, k size of LN may be smaller than the size of Lk for the same k system. The main draw back of numerical techniques (e.g.

148

N.N. Nandola, S. Bhartiya / Journal of Process Control 18 (2008) 131148 [17] R. David, H. Alla, Petri nets and Grafcet Tools for modeling discrete event systems, Prentice-Hall, New York, London, 1992. [18] R. Alur, C. Courcoubetis, N. Halbwachs, T.A. Henzinger, P.-H. Ho, X. Nicollin, A. Olivero, J. Sifakis, S. Yovine, The algorithmic analysis of hybrid systems, Theor. Comp. Sci. 138 (1995) 34. [19] A. van der Schaft, H. Schumacher, An Introduction to Hybrid Dynamical Systems, Springer Verlag, London, 2000. [20] E.D. Sontag, Nonlinear regulation: the piecewise linear approach, IEEE Trans. Automat. Contr. 26 (1981) 346358. [21] W.P.M.H. Heemels, B. De Schutter, A. Bemporad, Equivalence of hybrid dynamical models, Automatica 37 (2001) 10851091. [22] M. Buss, M. Glocker, M. Hardt, O. von Stryk, R. Bulirsch, G. Schmidt, Nonlinear hybrid dynamical systems: modeling, optimal control, and applications, in: S. Engell, F. Goran, E. Schnieder (Eds.), Modelling, Analysis, and Design of Hybrid Systems, SpringerVerlag Inc., 2002, ISBN 3540 438 122, pp. 311335. [23] H.P. Williams, Model building in mathematical programming, third ed., John Wiley and Sons, New York, 1993. [24] R. Raman, I.E. Grossmann, Relation between MILP modelling and logical inference for chemical process synthesis, Comp. Chem. Eng. 15 (1991) 7384. [25] W. Colmenares, S. Cristea, C. De Prada, T. Villegas, MLD systems: modeling and control. Experience with a pilot process, in: Proceedings of the 2001 IEEE International Conference on Control Applications (CCA01), 57 Sep. 2001, IEEE, Mexico City, Mexico, 2001, pp. 618625 BN-610 7803 6733 7802. [26] W.L. Brogan, Modern Control Theory, third ed., Prentice-Hall, New Jersey, 1991. [27] L. Ozkan, M.V. Kothare, C. Georgakis, Model predictive control of nonlinear systems using piecewise linear models, Comp. Chem. Eng. 24 (2000) 793799. [28] K.D. Schott, B.W. Bequette, Multiple model adaptive control, in: R.M. Smith, T.A. Johansen (Eds.), Multiple model approaches to modelling and control, Taylor and Francis, 1997, ISBN 074840595X, pp. 269291. [29] B. Kuipers, K. Astrom, The composition and validation of heterogeneous control laws, Automatica 30 (1994) 233249. [30] B. Aufderheide, B.W. Bequette, Extension of dynamic matrix control to multiple models, Comp. Chem. Eng. 27 (2003) 10791096. [31] A. Banerjee, Y. Arkun, R. Pearson, B. Ogunnaike, H1 control of nonlinear processes using multiple linear models, in: Proceedings of 1995 European Control Conference, 58 Sep. 1995, Eur. Union Control Assoc, Rome, Italy, 1995, pp. 26712676. [32] R. Murray-Smith, T.A. Johansen, Multiple Model Approaches to Modeling and Control, Taylor and Francis, London, 1997. [33] X.R. Li, Z. Zhao, X.-B. Li, General model-set design methods for multiple model approach, IEEE Trans. Automat. Contr. 50 (2005) 12601276. [34] N.L. Ricker, Model predictive control with state estimation, Ind. Eng. Chem. Res. 29 (1990) 374382. [35] A. Bemporad, D. Mignone, M. Morari, Moving horizon estimation for hybrid systems and fault detection, in: Proceedings of the 1999 American Control Conference (ACC), 24 June 1999, IEEE, San Diego, CA, USA, 1999, pp. 24712475 BN-2470 7803 4990 2473. [36] J.L. Villa, M. Duque, A. Gauthier, N. Rakoto-Ravalontsalama, A new algorithm for translating MLD systems into PWA systems, in: Proceedings of the 2004 American Control Conference (ACC), Jun 30Jul 2 2004, Piscataway, NJ 08855-1331, Boston, MA, United States, 2004, pp. 12081213. [37] F. Borrelli, M. Baotic, A. Bemporad, M. Morari, Dynamic programming for constrained optimal control of discrete-time linear hybrid systems, Automatica 41 (2005) 17091721. [38] V. Dua, E.N. Pistikopoulos, Algorithms for the solution of multiparametric mixed-integer nonlinear optimization problems, Ind. Eng. Chem. Res. 38 (1999) 39763987. [39] X.D. Koutsoukos, Estimation of Hybrid Systems Using Discrete Sensors, in: 42nd IEEE Conference on Decision and Control, Dec 912 2003, Maui, HI, United States, 2003, pp. 155160.

Explicit Euler) is that a large step size (sampling time) may result in unstable behavior. Appendix II. Supplementary data Supplementary data associated with this article can be found, in the online version, at doi:10.1016/j.jprocont. 2007.07.003. References
[1] M.S. Branicky, V.S. Borkar, S.K. Mitter, A unied framework for hybrid control: model and optimal control theory, IEEE Trans. Automat. Contr. 43 (1998) 3145. [2] A. Bemporad, M. Morari, Control of systems integrating logic dynamics and constraints, Automatica 35 (1999) 407427. [3] A. Bemporad, M. Morari, Optimization-based hybrid control tools, in: Proceedings of American Control Conference (ACC), 2527 June 2001, IEEE, Arlington, VA, USA, 2001, pp. 16891703 BN-1680 7803 6495 1683. [4] R.A. Decarlo, M.S. Branicky, S. Pettersson, B. Lennartson, Perspectives and results on the stability and stabilizability of hybrid systems, Proc. IEEE 88 (2000) 10691082. [5] M. Fritz, A. Liefeldt, S. Engell, Recipe-driven batch processes: event handling in hybrid system simulation, in: Proceedings of the 1999 IEEE International Symposium on Computer Aided Control System Design, 2227 Aug. 1999, IEEE Kohala Coast, HI, USA, 1999, pp. 138143 BN-130 7803 5500 7808. [6] B.I. Silva, O. Stursberg, B.H. Krogh, S. Engell, An assessment of the current status of algorithmic approaches to the verication of hybrid systems, in: 40th IEEE Conference on Decision and Control (CDC), Dec. 47 2001, Orlando, FL, 2001, pp. 28672874. [7] M.P. Remelhe, S. Lohmann, O. Stursberg, S. Engell, N. Bauer, Algorithmic verication of logic controllers given as sequential function charts, in: 2004 IEEE International Symposium on Computer Aided Control System Design, Sep. 24 2004, Piscataway, NJ 08855-1331, United States, Taipei, Taiwan, 2004, pp. 5358. [8] O. Stursberg, A. Fehnker, Z. Han, B.H. Krogh, Verication of a cruise control system using counterexample guided search, Contr. Eng. Pract. 12 (2004) 12691278. [9] I. Homann, S. Engell, Identication of hybrid systems, in: Proceedings of the 1998 American Control Conference (ACC), 2426 June 1998, Philadelphia, PA, USA, 1998, pp. 711712 BN-710 7803 4530 7804. [10] O. Stursberg, A graph search algorithm for optimal control of hybrid systems, in: 2004 43rd IEEE Conference on Decision and Control (CDC), Dec. 1417 2004, Piscataway, NJ 08855-1331, United States, Nassau, Bahamas, 2004, pp. 14121417. [11] S. Engell, O. Stursberg, Hybrid Control Techniques for the Design of Industrial Controllers, in: Conference on Decision and Control, 2005 and 2005 European Control Conference. CDC-ECC 05. 44th IEEE Conference, 2005, pp. 56125617. [12] S. Engell, Modelling and analysis of hybrid systems, Math. Comp. Simul. 46 (1998) 445464. [13] J. Till, S. Engell, S. Panek, O. Stursberg, Applied hybrid system optimization: An empirical investigation of complexity, Contr. Eng. Pract. 12 (2004) 12911303. [14] C.K. Lee, A.B. Singer, P.I. Barton, Global optimization of linear hybrid systems with explicit transitions, Syst. Contr. Lett. 51 (2004) 363375. [15] S. Kowalewski, Introduction to the analysis and verication of hybrid systems, in: S. Engell, F. Goran, E. Schnieder (Eds.), Modelling Analysis and Design of Hybrid Systems, Springer Verlag Inc., 2002, ISBN 3540 438 122, pp. 153171. [16] R. Alur, D.L. Dill, A theory of timed automata, Theoretical Computer Science. 126 (1994) 183235.

Anda mungkin juga menyukai