The results of the case study justify the effectiveness of the closed loop ... Simultaneous Scheduling and Control, Closed Loop, Parallel CSTR, Cyclic Production.
SIMULTANEOUS SCHEDULING AND CONTROL WITH CLOSED LOOP IMPLEMENTATION ON PARALLEL UNITS Jinjun Zhuge, Marianthi G. Ierapetritou * Rutgers, The State University of New Jersey 98 Brett Road, Piscataway, NJ 08854, USA
Abstract In this work, we propose a closed loop strategy to implement simultaneous scheduling and control on chemical processes whose state variables are subject to disturbance. As presented by the previous literature, integration of scheduling and control addresses both optimal production stages and transition periods, which results in global optima of an integrated model. We apply closed loop strategy on parallel CSTRs with cyclic production and compare its performance quantitatively with open loop strategy. The results of the case study justify the effectiveness of the closed loop strategy in dealing with process disturbances. Keywords Simultaneous Scheduling and Control, Closed Loop, Parallel CSTR, Cyclic Production Introduction Scheduling problem results in the optimal production sequence, production time and resources allocation but it does not consider the dynamic behavior of the processes. When the system is subject to disturbance, rescheduling is needed. (Adhitya et al. 2007b) proposed a model-based framework for rescheduling operations to overcome the disruption effects. This framework was illustrated using a refinery case study. (Adhitya et al. 2007a) present a heuristic rescheduling strategy to guarantee real-time computational performance and minimal operational changes. On the other hand, control problem focuses on transition periods between different products. (Mahadevan et al. 2002) formulated classic control strategies (i.e. based on transfer function, such as PID) for the transition periods in polymer process. However, they did not solve the scheduling and control problem simultaneously. (Feather et al. 2004) built a mixed integer (Model Predictive Control) MPC for grade transition control. (Padhiyar et al.
* To whom all correspondence should be addressed
2006) proposed a differential evolution method to solve the optimization problem of grade transition. Traditionally production scheduling and process control problems are considered separately. However, the solutions obtained by considering scheduling are certainly suboptimal. Targeting better operating conditions in today’s strict economic environment, a number of efforts have been made towards integration of scheduling and control problems. The integration of scheduling and control results in better modeling of process operations since transitions are considered which are ignored when scheduling is considered separately. With integrated modeling, information can be shared between scheduling and control without delay. Thus, a more economical process operation is achieved (Harjunkoski et al. 2009; Mitra et al. 2009). In the literature, the existing approaches dealing with the integration of scheduling and control can be categorized into simultaneous modeling and decomposition based
methods. Using the simultaneous approach the process dynamic model is incorporated into the constraints of scheduling problem. Thus a Mixed Integer Dynamic Optimization (MIDO) problem is formed and then is discretized into Mixed Integer Nonlinear Programming (MINLP) using collocation point method (Allgor and Barton 1999). Using decomposition method, the control problem is modeled as dynamic optimization (primal problem) and the scheduling part as Mixed Integer Linear Programming (Master problem). The solution proceeds by iterating between these two subproblems until convergence is achieved (Mahadevan et al. 2002). (FloresTlacuahuac and Grossmann 2006) modeled scheduling and control simultaneously, and formed an integrated problem (MIDO), which is then discretized into MINLP with collocation point method. Their approach was tested using an application in cyclic production with CSTR. (Terrazas-Moreno et al. 2008a) extended this work and propose a Lagrangian decomposition strategy to lower the complexity of the scheduling and control subproblems. (Terrazas-Moreno et al. 2007) applied simultaneous approach in cyclic scheduling and optimal control for two polymerization systems. (Terrazas-Moreno et al. 2008b) continued their previous work, and incorporated uncertainty in product demands with discrete distributions. (Flores-Tlacuahuac and Grossmann 2010b) applied the approach of (Flores-Tlacuahuac and Grossmann 2006) to multiproduct parallel CSTR. The same authors applied the idea of simultaneous scheduling and control in PFR (Flores-Tlacuahuac and Grossmann 2010a). (Nystrom et al. 2005) proposed a decomposed model for the integration of scheduling and control in polymerization processes. In their approach, the control problem is modeled as a Dynamic Optimization (DO) and scheduling part as MILP. They iterate between these two subproblems and update the solution until the problem converges. (Nystrom et al. 2006) applied this approach to parallel polymerization lines with multiple units. The solution method of MIDO problem was addressed in a few papers. (Allgor and Barton 1999) built a general framework for MIDO problem and proposed a decomposition approach to solve MIDO, which was an iterative scheme between a master and primal problem. (Flores-Tlacuahuac et al. 2005) proposed a methodology to transform the MIDO problem into MINLP through the discretization of the dynamic model. Standard methods such as outer-approximation, is used in solving the resulting MINLP. (Harjunkoski et al. 2009) provided a review of scheduling and control integration and pointed out three main solution approaches. The first one is to convert MIDO into MINLP problem; the second to decompose the overall problem into scheduling and control subproblems; and the last one to use heuristicbased systems like agent-based approaches. Most of the simultaneous based approaches however do not implement process control using closed loop. In this study, we consider disturbance in real processes and
build a closed loop strategy for simultaneous scheduling and control, which can be regarded as real time scheduling and control. We detect the disturbance on state variables and generate new solution for the integrated problem at the point of disturbance. As a result, process reacts quickly to eliminate the effects of disturbance. More specifically, we first solve the integrated problem off-line, and obtain the scheduling solution and control input. Then the solution is implemented in the process. If the real state track the reference (pre-calculated by solving the integrated problem off line) very well (i.e. their difference is within the tolerance), no feedback is needed. If significant disturbance occurs, the difference between state and reference is feedback and the integrated problem is solved again for the remaining part of the production cycle. Thus both the scheduling solution and control input are updated, which ensure that the operation after the occurrence of disturbance is optimal. A case study about cyclic production with parallel CSTRs demonstrates that our approach is economically preferable compared to open loop strategy. Modeling the integration of scheduling and control In this study, scheduling and control are modeled simultaneously. Process dynamic model is incorporated into the constraints of scheduling problem to form an integrated problem (MIDO) which is further discretized into a Mixed Integer Nonlinear Programming (MINLP). In this work we study cyclic production (Figure 1) i.e. the production wheel is divided into five slots in which one product is produced. It should be pointed out that the scheduling part of the discretized model is the same as the one considered by (Flores-Tlacuahuac and Grossmann 2006).
Figure 1: Cyclic production of five products in five slots However, the control part and the overall objective function of our model are different in our work. To achieve economically optimal operations of chemical process, we formed the objective as maximizing profit per unit time, which can be calculated as follows:, Profit per Time = (Revenue – Inventory cost – raw material cost)/Cycle time max (1 2 3 ) 1
Np
i 1
(1)
CipWi Tc
(2)
Np
2 C
2
1
s i
i 1
Wi Gi Tc i
Timing Constraints
(3)
1 m 3 Cr u1kf ukfm hkkt Cr uk uk pk / Tc k 1 f 1 k 1 (4) where 1, 2 , 3 represent the profit rate, inventory cost
Ns Ne
Ns
rate and raw material cost rate, respectively. Unlike the objective in (Flores-Tlacuahuac and Grossmann 2006), we do not incorporate state variation in 3 . There are two reasons for this. First the state variables and manipulated variables have different dimensions so it has no physical meaning to combine them. The other is that it is difficult to quantify state variation economically. Intuitively, minimizing raw material consumed during transition periods implies that state fluctuation is restrained. Products Assignment Ns
y
1, i
(5)
y
1, k
(6)
ik
k 1 Np
ik
i 1 ' yik
yi,k 1, i, k 1
(7)
yi'1
yi, Ns , i
(8)
' zipk yik ypk 1, i, p, k
(9)
zipk yik' , i, p, k
(10)
zipk y pk , i, p, k
(11)
Np Np
t
kt
i 1 p1
(19)
tke tks pk
tks
tke1, k
tke
Tc , k
(14) Equation (12) implies that the total amount produced of each product, which can be calculated as Eq. (13), should satisfy the demand in the current production wheel. Equation (14) defines the production rate as a function of feed flow and conversion. Processing Times
ik max yik , i, k i
Ns
ik ,
, xkfn , u1kf ,
(16)
(23) (24)
f (tkf 0.5h,
0.5K1nkf
, u1kf
, ukfm )
(25)
f (tkf 0.5h,
xkfn
0.5K 2nkf
, u1kf
, ukfm )
(26)
n
K 4nkf f n (tkf h, xkfn K3nkf , u1kf
, ukfm )
1 xkn, f 1 xkfn hk K1kfn 2K 2kfn 2K 3nkf K 4nkf 6
(27)
(28)
(29) where f represents the explicit description of the dynamic and can be obtained by studying the reaction mechanics in certain reactors. The first-order derivative of the state at each step can be calculated with Eq. (23). Through the calculation of intermediate variables K1, K2 , K3 , K4 , the state of the next step is obtained by Eq. (29). Initial and Final Controlled and Manipulated Variable Values at Each Slot n xin ,k
n
xk
Np
x
n ss,i yi , k , n, k
(30)
Np
x
n ss,i yi ,k 1 , n, k
Ns
i 1
i 1
(17) Constraint (15) gives the maximum duration allowed for producing product i in slot k. Equations (16) and (17) define the time span of product i and slot k respectively.
, ukfm ), n, k , f
xkfn
n
i 1
Np
ik , k
(21)
K1nkf xkfn
i
k 1
pk
(15)
(20)
1
xkfn f n (tkf , x1kf ,
1 hk Ne
Gi F 0 (1 Xi ), i
t pi zipk , k
Dynamic Optimization Using the collocation point method applied in (Flores-Tlacuahuac and Grossmann 2006) it is found that the solution of the integrated problem is quite sensitive to initial value. Thus we used RK4 discretization method which is proved more stable for the case studies considered here. To explain this method briefly, let’s assume that each slot is divided into f elements.
from product i to p at slot k. It is assumed that Ns N p .
(13)
t
(22) Equation (18) calculates the transition time from product i to p in slot k. The starting point and ending point for each slot are obtained using Eqs. (19)-(22).
K3nkf
(12)
Np Np
i 1 p 1
If product i is assigned to slot k, binary variable yik 1 , otherwise yik 0 . Each product is assigned to one slot by Eqs. (5) and (6). Binary variable zipk indicates a transition
Wi Gi i , i
(18)
t1s 0
K 2nkf
Demand Constraints Wi DT i c , i
t pi zipk , k
n xk
Np
(31)
x i 1
n ss,i yi,1 , n, k
Ns
(32)
m uin ,k
Np
u
m ss,i yi ,k , m, k
i 1
m
uk
Np
(33)
u
m ss,i yi ,k 1 , m, k
Ns 1
i 1
m
uk
Np
(34)
u
m ss,i yi ,1 , m, k
Ns
i 1
(35) n m The steady state values for each slot xss are ,i , uss ,i computed in advance by simulating the process at steady state condition. Equations (31) and (32) produce the desired state value at each slot. Besides, the state variable xnfck and manipulated variable u mfck at each discretization point should be confined by their lower bounds (i.e. n m ) and upper bounds (i.e. n m ). xmin umin xmax umax Closed loop implementation We propose a closed loop strategy for implementing integration of scheduling and control in chemical processes whose state variables are subject to disturbance. To make it more applicable to real processes, we assume disturbance is un-measurable but can be observed as state deviation. The state is monitored at every step. A threshold is set up to determine whether the manipulated variable for the next step remain the same as reference or be updated through solving the integrated problem for the remaining slots. One limitation is that the time needed for solving the integrated problem should be less than the sample step. More specifically, as shown in Figure 2, we first solve the integrated problem off-line and obtain the scheduling solution and control input as reference. Then the solution is implemented in the process. If the state deviation from reference is less than the threshold, no update is needed. If it is greater, which means significant disturbance occurs, the current state information is feedback, and the integrated problem is solved again for the remaining part of the production cycle. New solution for the integrated problem is generated at the point of disturbance. Thus both the scheduling solution and control input are updated, which ensure that the operation after the occurrence of disturbance is optimal.
The main steps of the proposed approach are as follows: Step 1: Solve original problem, obtain the solution of scheduling and control as reference Step 2: At time point n, implement the solution, detect state deviation from reference Step 3: Compare the deviation to the threshold Step 4: If deviation is smaller than threshold, go to Step 6 Step 5: If deviation is greater than threshold, re-solve the integrated problem, generate new solution of scheduling and control, and go to Step 6 Step 6: n=n+1, go to Step 2 Case study: Cyclic Production with Parallel CSTR In order to test the effectiveness of closed loop implementation and its superiority over open loop implementation, we applied our approach in a case study and provide the quantitative comparison between open and closed loop strategy. The recipe and data set of this case study are given in (Flores-Tlacuahuac and Grossmann k 2010b). Reaction 3R P takes place in parallel 3 isothermal CSTRs with reaction rate rR kCR . Five products, A, B, C, D, and E, differentiated by CR , are manufactured in two production lines. Cyclic mode, which is shown in Figure 1, is carried out in each production line. Mass balance in the reactor generates a dynamic model as dCR Q C0 CR rR dt V
(36) where C0 is feed stream concentration and Q is the feed flow (i.e. manipulated variable). CR is concentration of the outflow. It is taken as an indicator of different product (i.e. the state variable). We are given the following values of design and kinetic parameters, C0 1 mol L , V 5000L , k 2 L2 (mol 2h) , and market information provided in Table 1. The steady state values of each product in Table 1 are calculated in advance. We take advantage of the cyclic feature within each line, and assign product that has the smallest No. to the first slot by introducing constraints in Eq. (37). This would reduce the complexity without affecting the optima. Np
i 1
Figure 2: Flow chart of closed loop implementation
iyi1
Np
iy
ik ,
i 1
k 1
(37) The objective in this case is to maximize profit per hour which is expressed in equation (1). Decision variables consist of sequence of production, production time, amount manufactured of each product, transition time and manipulated variable (i.e. feed flow rate) in transition periods. They are determined simultaneously by solving an integrated optimization problem. We formulated an MINLP on the basis of the discretized model described above. The problem has 3010 variables and 4048 constraints. It took 37s to solve it with GAMS/SBB solver on a 3GHz CPU/1GB RAM computer. The solution is obtained as shown in Figure 3. One line is
Table 1. Steady state and market information Products Q(L hour) CR (mol L) Demand Price Inventory ($ kg) cost ($ kg) (kg hour) A B C D E
10 100 400 1000 2500
0.0967 0.2 0.3032 0.393 0.5
6 4 7 6 8
200 150 130 125 120
1
State variable and Manipulated variable
fully dedicated to producing A (dash line), and the other line produces B, C, D, and E (solid line). To find an appropriate number of elements in each slot, we divided the transition period with different number of elements and found that 60 elements is an acceptable tradeoff between computational complexity and computation time.
1 1.5 1.8 2 1.7
x: State in transition periods x: State in production periods u: Control input in transition periods, scaled down as U=U/4000 u: Control input in production periods, scaled down as U=U/4000
0.9 0.8 0.7 0.6
E1
E2
0.5 Disturbance
D
0.4
C
0.3 0.2
B A
0.1 0 0
10
20
30
40
50
60
70
80
90
100
Time (Hr)
Figure 4: Closed loop implementation
State variable and Manipulated variable
x: State in transition periods x: State in production periods u: Control input in transition periods, scaled down as U=U/4000 u: Control input in production periods, scaled down as U=U/4000
0.6
E D
0.4
C 0.3
B A
0.1
0 0
10
20
30
40
50
60
70
80
90
0.7 0.6
E
0.5 Disturbance
D
0.4
C 0.3 0.2
B A
0.1 0 0
10
20
30
40
50
60
70
80
90
100
Time (Hr)
Figure 5: Open loop implementation The open loop strategy generates less profit because it uses the pre-calculated manipulated variable on the real process regardless of the existence of the disturbance. When the state variable is deviated due to disturbance, closed loop strategy implement the updated control input. However, open loop strategy does not react to disturbance, which results in less production.
Original solution Figure 3 Scheduling Solution B-E-C-D
0.7
0.2
0.8
Items
0.8
0.5
x: State in transition periods x: State in production periods u: Control input in transition periods, scaled down as U=U/4000 u: Control input in production periods, scaled down as U=U/4000
0.9
Table 2. Quantitative comparisons of closed loop implementation and open loop implementation
1
0.9
State variable and Manipulated variable
1
Disturbance is introduced to the line producing four products. The state is deviated from 0.5 to 0.45 at 50 hours. With open loop strategy, the pre-calculated solution of scheduling and control is implemented during the whole process independent of the existence of a disturbance. As shown in Figure 5, the current state information is not communicated to the controller, and control inputs remain the same as that of pre-calculated. However, the closed loop strategy reacts instantly to the disturbance, making the process go to product C instead of continuing producing E (Figure 4). Table 2 provides quantitative comparisons between closed loop and open loop implementation. Profit per hour of open loop strategy is the lowest because product E is less produced and raw material is wasted due to disturbance. The closed loop strategy gains a slightly lower profit than pre-calculated one but a higher profit than open loop strategy because it implement the updated solution, which guarantee economical operations for the remaining part in the production cycle. At the event of disturbance (i.e. state is deviated from 0.5 to 0.45), controller decreases the feed flow rate and the process goes to product C, and then goes back to E after C and D.
100
Time (Hr)
Figure 3: Solution for the original integrated problem
Cycle Time (Hr) Profit per Hr ($) Revenue per Hr ($) Cost of Inventory per Hr ($) Cost of Raw Material per Hr ($)
Closed loop Open loop Figure 4 Figure 5 B-E-C-D
100 90720.1 128767.2 16391.1
B-E1-C-DE2 100 88945.9 127637.7 16917.5
21655.9
21774.1
21655.9
100 85319.2 125047.2 18071.9
Conclusions In this study, we formulated a closed loop implementation of simultaneous scheduling and control and apply it to parallel CSTRs with cyclic production. We follow the work of (Flores-Tlacuahuac and Grossmann 2010b) in modeling the integrated problem as a MIDO problem. However, we discretize the dynamic model using Runge-Kutta method instead of using collocation points (Flores-Tlacuahuac and Grossmann 2010b), because we found that RK4 is less sensitive to initial values in searching for optima with SBB algorithm. Moreover, the state variability is not included in the objective function. We built a feedback scheme in implementing simultaneous scheduling and control to real process subject to disturbance. In this work, we assume that disturbance is unpredictable and un-measurable. When disturbance occurs, we obtain the state deviation by comparing the current state value with the reference value, and feedback the state information to controller to generate new control input if the deviation is significant. The case study results illustrate that the closed loop strategy is effective in decreasing the influence of disturbance and leads to higher profit gains. One issue that should be point out is that the optimization algorithm SBB cannot guarantee global optima in solving MINLP. Future work will focus on using parametric MPC in dealing with disturbance. Acknowledgments The authors gratefully acknowledge financial support from NSF under grant CBET 0966861. References Adhitya, A., Srinivasan, R., Karimi, I. A. (2007a). Heuristic rescheduling of crude oil operations to manage abnormal supply chain events. AIChE Journal 53(2): 397-422. Adhitya, A., Srinivasan, R., Karimi, I. A. (2007b). A modelbased rescheduling framework for managing abnormal supply chain events. Computers & Chemical Engineering 31(5-6): 496-518. Allgor, R. J., Barton, P. I. (1999). Mixed-integer dynamic optimization I: problem formulation. Computers & Chemical Engineering 23(4-5): 567-584. Feather, D., Harrell, D., Lieberman, R., Doyle, F. J. (2004). Hybrid approach to polymer grade transition control. AIChE Journal 50(10): 2502-2513. Flores-Tlacuahuac, A., Biegler, L. T., Luis Puigjaner and Antonio, E. (2005). A robust and efficient mixedinteger non-linear dynamic optimization approach for simultaneous design and control. Computer Aided Chemical Engineering, Elsevier. Volume 20: 67-72.
Flores-Tlacuahuac, A., Grossmann, I. E. (2006). Simultaneous Cyclic Scheduling and Control of a Multiproduct CSTR. Industrial & Engineering Chemistry Research 45(20): 6698-6712. Flores-Tlacuahuac, A., Grossmann, I. E. (2010a). Simultaneous Cyclic Scheduling and Control of Tubular Reactors: Single Production Lines. Industrial & Engineering Chemistry Research 49(22): 11453-11463. Flores-Tlacuahuac, A., Grossmann, I. E. (2010b). Simultaneous Scheduling and Control of Multiproduct Continuous Parallel Lines. Industrial & Engineering Chemistry Research 49(17): 7909-7921. Harjunkoski, I., Nystrom, R., Horch, A. (2009). Integration of scheduling and control--Theory or practice? Computers & Chemical Engineering 33(12): 19091918. Mahadevan, R., Doyle, F. J., Allcock, A. C. (2002). Controlrelevant scheduling of polymer grade transitions. AIChE Journal 48(8): 1754-1764. Mitra, K., Gudi, R. D., Patwardhan, S. C., Sardar, G. (2009). Resiliency Issues in Integration of Scheduling and Control. Industrial & Engineering Chemistry Research 49(1): 222-235. Nystrom, R. H., Franke, R., Harjunkoski, I., Kroll, A. (2005). Production campaign planning including grade transition sequencing and dynamic optimization. Computers & Chemical Engineering 29(10): 21632179. Nystrom, R. H., Harjunkoski, I., Kroll, A. (2006). Production optimization for continuously operated processes with optimal operation and scheduling of multiple units. Computers & Chemical Engineering 30(3): 392-406. Padhiyar, N., Bhartiya, S., Gudi, R. D. (2006). Optimal Grade Transition in Polymerization Reactors: A Comparative Case Study. Industrial & Engineering Chemistry Research 45(10): 3583-3592. Terrazas-Moreno, S., Flores-Tlacuahuac, A., Grossmann, I. E. (2007). Simultaneous cyclic scheduling and optimal control of polymerization reactors. AIChE Journal 53(9): 2301-2315. Terrazas-Moreno, S., Flores-Tlacuahuac, A., Grossmann, I. E. (2008a). Lagrangean heuristic for the scheduling and control of polymerization reactors. AIChE Journal 54(1): 163-182. Terrazas-Moreno, S., Flores-Tlacuahuac, A., Grossmann, I. E. (2008b). Simultaneous design, scheduling, and optimal control of a methyl-methacrylate continuous polymerization reactor. AIChE Journal 54(12): 31603170.