Preprint of the 8th IFAC Sympoium on Advanced Control of Chemical Procee he International Federation of Automatic Control Furama Riverfront, Singapore, July 1-13, 1 Integration of RO with MPC through the gradient of a convex function Luz A. Alvarez*, Darci Odloa** LSCP/CESQ Chemical Engineering Department, Polytechnic School, Univerity of São Paulo, Av Prof Luciano Gualberto, trav. 3, 38. São Paulo, SP 558-1, Brazil.(email:*luz@pqi.ep.up.br, **odloa@up.br) Abtract: Predictive controller are uually implemented a part of a hierarchical tructure of the proce operation where the Real ime Optimization (RO) and the Model Predictive Control (MPC) are executed in eparated layer. Here, it i propoed to ue the gradient of a convex function that lin the optimizing target to the MPC controller. he convex function i a nu+1 dimenional paraboloid of the proce input, with the imum correponding to the input target reulting from the RO routine. For thi MPC controller, the infinite prediction horizon and teral tate contraint are conidered, and it operate according to the zone control trategy. Simulation reult of a linear ytem are provided. Keyword: Model predictive control, optimizing control, Real ime Optimization. 1. INRODUCION Model Predictive Control (MPC) i an optimization baed control algorithm that ue an explicit model to predict the future repone of a proce ytem. At each time tep, the MPC controller compute an input equence a a olution to an open-loop optimization problem ubject to contraint on input and tate, but only the firt input i injected into the ytem. In practice, MPC controller are implemented a part of a multilayer hierarchy of control function (Ying and Joeph, 1999; Kaman et al., ; atjewi, 8; Darby et al., 11). In thi hierarchy, the Real ime Optimization (RO) lie at a layer above the MPC layer and detere the optimal economic teady-tate etting of the proce, which can be repreented a target to ome or all of the ytem input a well a et-point to ome of the ytem output. hen, the MPC controller receive the target from the RO layer and mut follow them to reach a more profitable operating point. hi integration of RO with MPC i nown a two-layer approach. Some tudie (Zanin et al., ; Biegler and Zavala, 9; De Souza et al., 1; Ochoa et al., 1) have attempted to integrate the RO layer to the MPC controller, in uch a way that both the economic objective and the dynamic regulation are olved in one ingle layer. In everal cae, the zone control trategy i conidered when MPC receive optimizing target from an upper layer (Gonzalez and Odloa, 9; Ferramoca et al., 1) or when the economic objective i integrated to the MPC controller (Zanin et al., ; De Souza et al., 1). In thi trategy, the aim of the MPC layer i not to guide the output to exact value or et-point, but only to maintain them inide appropriate range or zone. One of the main iue in the tudy of MPC trategie i the tability of the cloed loop ytem. A popular approach to obtain a table MPC conit of adopting an infinite prediction horizon (Rawling and Mue, 1993). For table ytem, the infinite-horizon open-loop objective function i reduced to a finite-horizon objective by defining a teral tate penalty, which i obtained from the olution of a Lyapunov equation. he tability of thi controller wa demontrated for the regulator cae of ytem with contraint on the input and tate and where the ytem teady-tate lie at the origin. Odloa (4) developed a verion of the table MPC which i uitable for implementation. Conidering a prediction model in the incremental form, thi trategy can deal with the output offet. he reulting optimization problem include a teral tate contraint which i oftened by adding lac variable. he tability of the MPC that receive optimal target from an upper layer ha alo been tudied. Gonzalez and Odloa (9) preented an MPC controller with noal tability that receive input target directly from the RO layer and operate according to the zone control. Alvarez and Odloa (1) propoed a table algorithm for the integration of RO and MPC which include an intermediary layer for target recalculation. he objective of thi paper i to develop a table MPC controller which ue the gradient of a convex function of the IFAC, 1. All right reerved. 68
8th IFAC Sympoium on Advanced Control of Chemical Procee Furama Riverfront, Singapore, July 1-13, 1 input to lin the RO target to the MPC. An infinite prediction horizon and teral tate contraint are adopted a well a the zone control trategy. he paper i organized a follow. In ection we preent a previou MPC controller which incorporate the gradient of the economic function to olve the RO and MPC problem in one-ingle layer. hen, the propoed MPC i preented in the ection 3. Next, the imulation reult are dicued for a linear ytem. Finally, the concluion are preented.. HE MPC WIH ECONOMIC GRADIEN Aig to integrate RO with MPC in one ingle layer, De Souza et al. (1) propoed to include the gradient of the economic function a an additional term in the objective function of the MPC. hi approach incorporate the economic objective into the MPC controller uch that the RO and MPC are olved in a ingle optimization routine, under the tructure of one ingle layer. Conider a multivariate ytem with nu input. he economic function aociated with the predicted teady-tate can be repreented a follow: F ( ) e = feco u (1) If the vector that repreent the control action i changed to u + u, the firt order approximation to the gradient of the economic function can be repreented a follow: = dfe dfe d Fe u u u du = du + du () ς + u+ u u he above equation can be repreented a follow: ς u + u = d + G u (3) where u = u( + m 1) u( 1) i the total move of the input vector, m i the control horizon of the MPC controller, d i the gradient vector at the preent time and G i the Heian of the economic function with repect to the input. he gradient vector ς u + u can be conidered a a deviation vector in relation to the reference, which i equivalent to conidering that the gradient of the economic function i zero at the optimum. So, if bringing thi vector to zero i conidered a one of the controller objective, it will have an economic component. herefore, the et of error equation repreented in equation (3) can be included in the objective function of the MPC. In order to imize the gradient of the economic function in the control problem, De Souza et al. (1) propoed to olve the following optimization problem: Problem P1: p = + p, + p, 1 V y( j / ) y Q y( j / ) y u + u( + j / ) R u( + j / ) + ς Pς u + u u + u (4) ubject to: umax u( + j) umax, j =,1,... m 1 (5) u( + j) = j m (6) u u( + j) u, j =,1,... m 1 (7) max uing for prediction a tate-pace model in the incremental form: x( + 1) = Ax( ) + B u( ) (8) y( ) = Cx( ) (9) he weight Q, R and P are poitive definite matrice of appropriate dimenion. Notice that thi i a conventional MPC that include a term that integrate the economic objective in the optimization problem, the main idea of thi trategy i to imize the gradient of the economic function ς u + u in order to olve the economic optimization and the control problem in one ingle layer. De Souza et al. (1) howed everal advantage of thi approach, one of them i the reduction in the computational load a Problem P1 mantain the form of a QP. A ucceful application of thi approach to an indutrial ditillation ytem in an oil refinery in Brazil i reported in Porfirio and Odloa (11). It can be oberved that the method propoed by De Souza et al (1) require the economic function of the proce to be convex (in cae of imizing) or concave (in cae of maximizing), uch that the optimum will be reached where the gradient i equal to zero, or the gradient i imum. For ome procee thi condition cannot be aured, for example the economic function of the tyrene reactor conidered in Alvarez (1) ha the hape of a addle in the region around the noal operating point. hen for thi proce the method decribed in thi ection cannot be applied. Even for highly nonlinear procee that preent the convexity condition at the operating region, the preence of diturbance can change the hape of thi region. In thi cae, a diturbance can end the operating point to a neighborhood where the economic function ha more than one tationary point with imum and maximum. Notice that the economic function i calculated from the tate of the rigorou proce model, which i nonlinear in mot cae. A econd iue about thi method lie on the tability. he on-line calculation of the gradient can turn the cloed-loop ytem untable. he vector d and the matrix G, in a dynamic environment, change at each ampling time a defined by the rigorou model, and the controller may not tae into account thee change. hu, for the MPC controller, the term ςu + u Pςu + u in the objective function can act a a diturbance and turn it untable. In the ection 3 we preent a two-layer approach to integrate RO with MPC. hi approach i baed on the gradient imization, but intead of the economic function we propoe a convex target function, aug that an upper RO end optimal target for the input. It will be hown 69
8th IFAC Sympoium on Advanced Control of Chemical Procee Furama Riverfront, Singapore, July 1-13, 1 that it guarantee both economic optimality and tability of the cloed-loop ytem. 3. SABLE MPC WIH GRADIEN OF A CONVEX FUNCION Let u aume that the RO i executed in an upper layer and the olution of thi layer produce nu t optimal target for the input denoted a u i,ro where i =1, nu t. We define the following convex function: nu t e( u ( )) = ui ( i ( ) i, RO ) (1) i= 1 F K u u where u() = [u 1 () u nut ()] i the input vector. he gradient of thi function can be calculated from () and (3) and then the vector d and the matrix G are introduced into an infinite horizon MPC controller. In the ection 3.1 the tructure of the prediction model i decribed. Section 3. decribe the development of the table MPC with gradient of a convex function of the target. 3.1. Prediction model Conider a table ytem with nu input and ny output, and aume that the pole relating u i to any output y j are nonrepeated. For thi ind of ytem, Odloa (4) conider the following tate-pace model that i uitable to the implementation of MPC: x ( + 1) Iny x ( ) D u( ) d = d d x ( 1) F + + x ( ) D FN (11) x ( ) y( ) = Iny ψ d x ( ) (1) where u( ) = u( ) u( 1) x x1 x ny ny =, x R, d = ny+ 1 ny+ ny+ nd x x x x, x C, nd nd F C, Φ ψ =, ψ R Φ ny nd nu. na Φ = [1 1], Φ R F, D and D d are obtained from the tep repone model. Oberve that the input in the model defined by (11) and (1), which mean that the output integrate the input. i u( ) hen, in the model defined by (11) and (1), the tate vector can be plit in two component: x that correpond to the integrating pole produced by the incremental form of the model, and x d that correpond to the ytem mode. It can be hown that x i equal to the predicted output teady-tate and component x d correpond to the table mode of the d nd ytem. When the ytem approache to the teady-tate, component x d tend to zero. F i a diagonal matrix with e r component of the form i, where r i i a pole of the ytem and i the ampling period. It i aumed that the ytem ha nd table pole and D i the gain matrix of the ytem. o build up matrix Φ, it i alo aumed that na i the number of pole aociated to any input u i and any output y j. 3.. MPC formulation he model defined by (11) and (1) i conidered for prediction in the following MPC optimization problem (Odloa, 4): Problem P: V = u,, ( y( + j ) yp, ) Q ( y( + j ) yp, ) j = j =,, + u( + j ) R u( + j ) + S (13) ubject to (5), (6), (7) and x ( + m) y = (14) p,, where Q, R and S are poitive weighting matrice of appropriate dimenion. he lac variable ny, R are intended to improve the feaibility of the equality contraint (14), which force the output error to be mall or null. hi MPC controller conider an infinite prediction horizon. In order to avoid the cot V to be unbounded, the firt term of the objective function (13) i plit in two term, the firt one i a finite um from to m 1, and the econd one, which i an infinite um from m to +, i reduced through the teral contraint (14), and can be written in term of the component x d of the tate at +m: ( ( ), ) ( ( ), ) V = y + j y Q y + j y p p d d + x ( + m) Qx ( + m),, + u( + j ) R u( + j ) + S (15) where Q i calculated off-line from the Lyapunov equation for the dicrete time ytem defined by the equation (11) and (1): Q F QF = F ψ Qψ F (16) he controller defined by Problem P ha guarantee of tability and recurive feaibility i alo aured. he weight S hould be large enough to aure the convergence of the proce to the deired teady-tate. In order to integrate the RO target to the table MPC, the gradient of the function defined in (1) i introduced a a 7
8th IFAC Sympoium on Advanced Control of Chemical Procee Furama Riverfront, Singapore, July 1-13, 1 quadratic term into the objective function (13), correponding to a table MPC controller. hen (13) can be written a follow: ( ( ), ) ( ( ), ) V = y + j y Q y + j y p p + u( + j ) R u( + j ) ( ) ( ),, + d + G u P d + G u + S where u = ( u( + m 1 ) u( 1 )) (17) A the MPC controller i to follow target for the input, the zone control trategy wa adopted for the output (Gonzalez and Odloa, 9). It conit on conidering the output etpoint y p a variable of the optimization problem contrained to upper and lower bound that define the output zone [y, y max ]. hen the output et-point become a variable of the control problem that can be written a follow: Problem P3: V = u, yp, ( y( + j ) yp,, ) Q( y( + j ) yp,, ) + u( + j ) R u( + j ) ( ) ( ),, + d + G u P d + G u + S (18) ubject to (5) to (7), (14) and y y y (19) p, max he controller decribed by Problem P3 ha guarantee of tability ince it i derived from the Problem P, which i table (Odloa, 4), and the incluion of the gradient term doe not interrupt the convergence of the objective function. A the convex function doe not depend on the ytem tate, the computation of d i not affected by diturbance. Convergence of problem P3: Notice that if there i an optimal olution of the problem P3 at time tep : { } * u ( ) ( 1 ), *, * = u u + m yp,, for the unditurbed ytem, a feaible olution exit at time tep +1: u 1 u ( 1 ) u ( m 1 ), ɶ + = + + yɶ p, + 1 = yp,, ɶ, + 1 =, he calculation of the cot correponding to each olution * lead to the following inequality: V V ɶ + 1 he optimal value of the objective function at time +1 * follow that V V ɶ. hen we oberve that the ucceive + 1 + 1 cot of problem P3 are trictly decreaing V V and for + 1 a large enough time follow that V = V. hi mean + 1 that the objective function converge and that at teady-tate the condition y( ) yp, = and * u ( ) = hould hold. he detail of the proof of convergence of problem P3 are preented in Alvarez (1). he controller defined by problem P3 doe not uffer from the ame drawbac a the one-layer trategy defined by problem P1. On one hand, the convexity of the function i aured by the convex target function and on the other hand the tability i guaranteed. he MPC with gradient of a convex target function wa uccefully teted in imulation for a nonlinear tyrene reactor, ee Alvarez (1). It i alo important to remar that the method propoed in thi paper can be generalized to convex function with different tructure, ince the paraboloid preented in (1) i one poible convex function of the target. In comparion to the integration propoed in Alvarez and Odloa (1), thi trategy i olved in two layer. Note alo that there are le contraint and optimization variable, and for the method propoed here there i no need to force the input to follow the target with a contraint. he tructure of the MPC controller i fixed for different optimization cenario, ince the tructure of the MPC controller depend only on d and G. 4. SIMULAION RESULS he reult preented here are not intended to compare the trategy of De Souza et al (1) to the one preented in ection 3, but to how the ability of the MPC integration in two layer to follow the target, which are aumed to be the olution of an upper RO layer, even in preence of diturbance. he proce ytem conidered here i part of the FCC ytem preented in Sotomayor and Odloa (5). he FCC ubytem ha two input and three output, the manipulated input variable are the flow rate of air to the catalyt regenerator (u 1 ) and the opening of the regenerated catalyt value (u ). he controlled output are the rier temperature (y 1 ), the regenerator dene phae temperature (y ), and the regenerator dilute phae temperature (y 3 ). he tranfer function model i repreented a follow: y ( ).45..98 + 1 1.71 + 1 1 1.5.19 3.81 u1( ) y( ) = + 1 17.73 + 1.83 + 1 u( ) y3( ) 1.74 6.13 9.1 + 1 1.91 + 1 he contraint are u max = [5 11], u = [75 5], u max = [5 5], y max = [57 8 9], y = [49 55 55]. he 71
8th IFAC Sympoium on Advanced Control of Chemical Procee Furama Riverfront, Singapore, July 1-13, 1 tuning parameter conidered are m = 3, Q y = diag([1 1 1]), R = diag([.5.5]), S = 1 4.diag([1 1 1]), P=diag([1 1]). he convex function ha the following parameter: K u1 = 5; K u = 5. he initial condition for the imulation are: y = [549.5 74.3 69.6] and u = [3.6 6.]; and the RO target are initially: u RO = [ 4]. 6 Input u1 5 15 1 5 1 15 5 3 35 4 45 15 Output y1 55 5 45 5 1 15 5 3 35 4 45 8 Input u 1 5 5 1 15 5 3 35 4 45 Output y Output y3 7 6 5 4 5 1 15 5 3 35 4 45 1 8 6 4 5 1 15 5 3 35 4 45 Fig. 1. Sytem output and zone of the linear ytem controlled by the table MPC with gradient of a convex function At firt, the proce tart at non-optimal condition and the input have to reach their target. Figure 1 how the output, which are driven to a new teady-tate inide the zone, Figure how that the input tend to reach the target in a hort period of time. In Figure 4 it i oberved that the component of the gradient vector tend to zero quite rapidly. hen, at t=8, an unmeaured diturbance i introduced in the ytem. he diturbance correpond to a decreae of 3 ton/h in u 1 and an increae of 3% in u. hi diturbance remain until t=1, when the input recover the value calculated by the controller. At thi point, the econd and third output have been puhed to outide the control zone, a can be een in Figure 1. But a the input reach their target, the output are moved bac to inide the repective zone. A temporary increae in the objective function can alo be een in Figure 3. When the controller tabilize the proce, change in the input target are introduced at time t=17h. Oberve that both input approach their target very cloely but output y 3 reache it imum bound and for thi reaon the two input do not reach their target exactly. Output y 1 and y, are ept inide their zone. Fig.. Sytem input and input target of the linear ytem controlled by the table MPC with gradient of a convex function V1 V1 V1 1 x 17 8 6 4 5 1 15 6 x 14 4 15 16 17 18 19 1 3 4 5 6 4 5 3 35 4 Fig. 3. Objective function of the the table MPC with gradient of a convex function Finally, at t=8h, the zone of the third output i narrowed a the lower bound change from 55K to 6K. It can be oberved that the controller i able to adjut the output to thi new value while both input tabilize at a imum ditance to the target value. hi mean that for thi output zone, the input target are not reachable, and the controller avoid overpaing the output zone by adjuting the input to the cloet poible value. Figure 3 how that the objective function value i different to zero becaue the gradient 7
8th IFAC Sympoium on Advanced Control of Chemical Procee Furama Riverfront, Singapore, July 1-13, 1 component correponding to the econd input remain different from zero, a hown in Figure 4. d 1 d 5-5 -1 5 1 15 5 3 35 4 45 1 5-5 5 1 15 5 3 35 4 45 time Fig. 4. Gradient vector component of the convex function when linear ytem i controlled by the table MPC with gradient. 5. CONCLUSIONS In thi paper an MPC controller with an economic target repreented by the gradient of a convex function i preented. he idea of imizing the gradient of a function a a quadratic term in the MPC objective function come from the wor of De Souza et al. (1) that propoe to include the gradient of the economic function in the MPC controller reulting in a one-layer tructure. hi approach ha a lot of potential but iue a convexity and tability hould be tudied, a dicued at the end of ection. hen, for the integrating trategy preented in ection 3, intead of incorporating the economic function, it i conidered a convex function that lin the MPC to the optimizing target, reulting in a two-layer integration. he convex function i a nu+1 dimenional paraboloid of the proce input, with the imum correponding to the input target reulting from the RO layer. he controller formulation i alo baed on the infinite horizon MPC preented by Odloa (4), which i table. he output are controlled by zone intead of fixed et-point. he reultant MPC controller i table for the noal ytem. he convergence of the MPC controller i remared in ection 3. Simulation reult of the application of the two-layer trategy to an FCC ubytem howed good performance of thi controller for change in the target value and the output zone. Future wor could be focued on the extenion of thi controller to ytem with uncertainty in the model parameter, to produce a more robut integration. REFERENCES Alvarez, L. (1) Strategie with guarantee of tability for the integration of MPC and RO. PhD hei. Ecola Politécnica da Univeridade de São Paulo. Alvarez, L.; Odloa, D. (1) Robut integration of real time optimization with linear model predictive control. Comp. Chem. Eng. 34, (1) pp. 1937-1944 Biegler, L..; Zavala, V.M. (9) Large-cale nonlinear programg uing IPOP: An integrated framewor for enterprie-wide dynamic optimization. Comp. Chem. Eng., 33, pp. 575-58. Darby, M. L.; Niolau, M.; Jone, J.; Nicholon, D. (11) RO: An overview and aement of current practice. J. Proc. Cont., 1, pp. 874-884. De Souza, G.; Odloa, D.; Zanin, A. (1) Real time optimization (RO) with model predictive control (MPC). Comp. Chem. Eng. 34, pp. 1999-6. Ferramoca, A.; Limon, D.; Gonzalez, A.; Odloa, D.; Camacho, E. (1) MPC for tracing zone region. J. Proc. Cont., pp. 56-516. Gonzalez, A.; Odloa, D. (9) A table MPC with zone control. J. Proc. Cont. 19, pp. 11-1. Kamann D. E.; Badgwell.; Hawing R. B. () Robut target calculation for model predictive control. AIChE J. 45, pp. 17-14. Ochoa, S.; Wozny, G.; Repe, J. (1) Plantwide Optimizing Control of a continuou bioethanol production proce. J. Proc. Cont.,, pp. 983-998. Odloa, D. (4) Extended robut model predictive control. AIChE J. 5, pp. 184-1836. Porfirio, C.; Odloa, D. (11) Optimizing model predictive control of an indutrial ditillation column, Cont. Eng. Pract., 19, pp. 1137-1146. Rawling J. B.; Mue K.R. (1993) he tability of Contrained Receding Horizon Control. IEEE ran. Aut. Cont. 38, pp. 151-1516. Sotomayor, O.; Odloa, D. (5) Oberver-baed fault diagnoi in chemical plant. Chem. Eng. J. 11, pp. 93 18. atjewi, P. (8) Advanced control and on-line proce optimization in multilayer tructure. Annual Review in Control, 3, pp. 71-85. Ying C. M.; Joeph B. (1999) Performance and Stability Analyi of LP-MPC and QP-MPC Cacade Control Sytem. AIChE J., 45, pp. 151-1534. Zanin, A.C.; Gouvêa, M..; Odloa, D. () Integrating realtime optimization into the model predictive controller of the FCC ytem. Cont. Eng. Pract. 1, pp. 819-831. 73