**N. Yusoff**

Department of Chemical Engineering, Universiti Teknologi PETRONAS, 31750 Tronoh, Perak, Malaysia

M. Ramasamy

Department of Chemical Engineering, Universiti Teknologi PETRONAS, 31750 Tronoh, Perak, Malaysia

Department of Chemical Engineering, Universiti Teknologi PETRONAS, 31750 Tronoh, Perak, Malaysia

M. Ramasamy

Department of Chemical Engineering, Universiti Teknologi PETRONAS, 31750 Tronoh, Perak, Malaysia

This study proposes an integrated framework of scheduling and Real-Time Optimization (RTO) of a Refrigerated Gas Plant (RGP). At the top layer, a high fidelity dynamic model of RGP is subjected to scheduling of plant operating mode from natural gas liquids to sales gas and vice-versa. Set points from mode scheduling are passed down to the steady-state RTO layer. Modeling mismatch is minimized by rigorously exchanging values of key variables between dynamic and steady-state models. Optimal trajectories of set points are obtained using sequential quadratic programming algorithm with constraints. These trajectories are disjointedly implemented by Model Predictive Control (MPC) scheme and Proportional-Integral (PI) controllers for comparison. Four case studies for each mode scheduling are performed to illustrate efficacy of the proposed approach.

PDF Abstract XML References Citation

N. Yusoff and M. Ramasamy, 2009. Integrated Scheduling and RTO of RGP with MPC and PI Controllers. *Journal of Applied Sciences, 9: 3027-3033.*

**DOI:** 10.3923/jas.2009.3027.3033

**URL:** https://scialert.net/abstract/?doi=jas.2009.3027.3033

Natural gas has emerged as a major source of clean energy due to environmental factor and volatility of crude oil price. A Gas Processing Plant (GPP) faces challenges on three fronts namely: (1) at plant inlet, multiple streams of feed gas from various producers are mixed causing fluctuation in feed gas flow rate and composition, (2) within GPP, unscheduled shutdowns due to equipment malfunction often occur and (3) at GPP outlet, strict specifications of several products are regularly enforced by its customers where penalty will be imposed if these specifications are violated (Bullin, 1999). In business aspect, GPP enters into diverse agreements with gas producers. As a result, prices of feed gas vary depending, among others, on quality of gas and tenure of the contracts. In contrast, price of sales gas is tightly regulated by government. Prices of liquids namely ethane, propane, butane and condensates are floated to market values.

These challenges forces GPP to improve its operational efficiency in order to maintain profitability. An identified area of improvement is during change of plant operating mode from natural gas liquids to sales gas, or vice-versa. The change of plant mode poses a short-term (weeks) and continuous scheduling problem in which pre-configured set points are directly implemented by regulatory controllers. While, this practice has been accepted in the past, efforts are currently undertaken to improve it. This type of problem differs from batch scheduling, which receives considerable attention in operational research. Excellent reviews of batch scheduling have been published by Floudas and Lin (2004) and Mendez *et al*. (2006). Continuous scheduling is often integrated with control to give rise to Mixed Integer Dynamic Optimization (MIDO) problem. An example is the formulation of a MIDO problem on gas-phase copolymerization in fluidized bed reactor (Chatzidoukas *et al*., 2003). The authors simultaneously optimize grade transition time of a copolymer and schemes of feedforward-feedback control. In another related study on polymerization, Real-Time Optimization (RTO) and Model Predictive Control (MPC) are integrated within a dynamic framework of grade transition problem (Kadam *et al*., 2007). A method of tracking the necessary conditions for optimality with a solution model is employed to preserve a feasible and optimal operation under uncertainty. The addition of RTO layer between scheduling and control layers is necessary in order to improve plant economics, production or other suitable objectives. Since, scheduling is normally performed at a much larger time-scale (days to weeks) as compared to RTO (hours to days) and MPC (seconds to minutes), integration of the three automation layers to enhance economic benefits is difficult.

This study proposes a potential means to address this issue through an integrated approach of scheduling and RTO. This way, set points are re-calculated based on current plant conditions. The optimal set points may be implemented using regulatory or advanced controllers such as MPC scheme. A Refrigerated Gas Plant (RGP), which is low temperature separation unit and sales gas compression unit of the GPP, is employed as a test bed. Steady-state and dynamic models of RGP are simulated under HYSYS environment. Model predictive control actions are calculated using MATLAB. Communication between HYSYS and MATLAB is executed via component object module technology. Efficacy of the proposed approach is illustrated in several cases of mode scheduling from natural gas liquids to sales gas and vice-versa. As its name implies, an operating mode refers to a state whereby RGP is producing larger amount of the respective product.

**INTEGRATION OF SCHEDULING AND RTO**

In a typical scheduling scenario, new plant set points are pre-determined from early design specifications or heuristics. The set points are manually adjusted by experienced personnel to the desired levels. This practice has several drawbacks: (1) current state of the plant may change due to sustained large disturbance or major revamp activities and thus invalidate design set points and (2) manual adjustment of set points may lead to excessive energy utilization especially if target trajectory is not optimal. One way to overcome these drawbacks is to integrate scheduling tasks with Real-Time Optimization (RTO) before passing set points to control layer. The proposed approach is shown in Fig. 1.

The new methodology leverages on availability of first-principle models in both steady-state and dynamic modes. This is necessary to maintain accuracy when data are transferred between the two models. In particular, scheduling is carried out in dynamic model DM_{1} until a new steady-state is reached. Data from DM_{1} are passed to the steady-state model for target optimization task. For practical reason, only several values of key variables are exchanged to minimize mismatch between dynamic and steady-state models. Number of variables sent from dynamic to steady-state model is larger than the reverse. This is to ensure: (1) rigorous calculation is done at RTO layer and (2) feasible set points are passed to controllers for implementation at the plant. Another dynamic model DM_{2} is used to represent the plant. The only difference between DM_{1} and DM_{2} models is that the latter is at the state prior to scheduling.

Nonlinear dynamic model of a plant can be implicitly described by the following set of differential-algebraic equations:

(1) |

(2) |

(3) |

Fig. 1: | Structure of integrated scheduling and Real-Time Optimization (RTO) approach (solid line). Set points may be implement via Model Predictive Control (MPC) scheme or, alternatively, regulatory controllers. Current approaches of scheduling implementation are illustrated as dashed line |

where, x and z are differential and algebraic state variables, respectively. Process output is denoted by y whereas model and design parameters by p. Equation 1 and 2 are solved over fixed time horizon t ∈ [t_{0}, t_{f}] for given y, p and initial conditions x_{0}.

The above dynamic model is used for scheduling (DM_{1}) and control (DM_{2}) implementation. Real-time optimization is performed based on steady-state model that can be represented by Eq. 1 and 2 without the transient term. In general, an RTO problem can be written in the following form:

(4a) |

Subject to:

(4b) |

(4c) |

(4d) |

(4e) |

(4f) |

where, f_{E} is an economic objective function, g_{E} and h_{E} are sets of inequality and equality constraints, respectively. Steady-state process output y^{ss} and input u^{ss} are bounded within their corresponding minimum and maximum values. State variables x^{ss} and z^{ss} are concurrently updated via steady-state plant model.

The optimization problem (Eq. 4) is solved using sequential quadratic programming algorithm with constraints (Chamberlain and Powell, 1982). Optimization variables must be prudently selected, so that they are able to surrogate the relevant control variables employed in dynamic model.

**APPLICATION TO RGP**

Here, we shall describe application of the proposed integrated approach of scheduling and RTO. Since RGP is employed as a test bed, its process will be briefly described. Then, results from several case studies will be discussed.

**RGP model:** In the current study, steady-state and dynamic models of RGP developed by Yusoff *et al*. (2007, 2008), respectively, are used (Fig. 2). The models are based on first-principle modeling approach. Accuracy of the models reaches about 95% when validated against actual plant data. Size of the models is large with 762 Differential-Algebraic Equations (DAEs). However, modeling complexity is reduced by simulating RGP process with modular approach under HYSYS environment.

In short, the RGP processes mixed feed gas at normal plant throughput of 280 t h^{-1}. Feed gas at 20°C and 60 bar is cooled by exchanging heat with sales gas in three coldboxes (E-101, E-103, E-105), a propane refrigeration cooler (E-102) and an air cooler (E-106). To enhance vapor-liquid separation, feed gas is flashed in two stages. Most vapor is expanded in turboexpander (KT-101), whereas some in Joule-Thompson valve depending on throughput level. Liquids are fed to various stages of a demethanizer (C-101). Top product of demethanizer and that from expansion process are sent to an absorber in Gas Subcooled Process (GSP) unit to improve recovery of natural gas liquids. Bottom product of demethanizer is further processed to separate the liquids into ethane, propane, butane and condensates. Top product of absorber containing sales gas is recompressed twice to meet minimum specification of 30 bar.

**Mode scheduling:** To illustrate efficacy of the proposed approach, four studies are performed in the case of scheduling of RGP operation mode from natural gas liquids to sales gas mode as follows (case A):

• | Mode scheduling only with PI controllers (base case) |

• | Mode scheduling only with MPC controllers |

• | Integration of mode scheduling and RTO with PI controllers |

• | Integration of mode scheduling and RTO with MPC controllers |

Fig. 2: | RGP process and instrumentation flow diagram |

Table 1: | Values and bounds of optimization variables |

Table 2: | Values and bounds of constraint variables |

LMTD: Log mean temperature difference, JT: Joule-Thompson, DC: Downcomer |

The above studies are repeated for mode scheduling of sales gas to natural gas liquids (case B). In total, eight case studies are conducted. Each case is simulated for 510 min.

For scheduling only cases, set points are pre-determined from either design specifications or guidelines. In case of scheduling from natural gas liquids to sales gas mode, RGP temperature as indicated by top of absorber increases by about 20°C. A higher plant temperature is achieved partly by increasing top of demethanizer pressure from 22 to 24 barg. Since, turboexpander KT-101 discharges at the same pressure, more feed gas is diverted to Joule-Thompson (JT) valve for expansion without overloading booster (K-101) and sales gas (K-102) compressors to meet specification of sales gas pressure. Coupling the effect of higher feed gas flow to Gas Subcooled Process (GSP) unit by 7.8 t h^{-1}, value of sales gas increases substantially for RGP to yield higher profit margin.

In the integrated approach, set points are optimized at the current plant state before implemented by controllers. Values of set points and constraints for all cases are shown in Table 1 and 2, respectively. Pre-cooling of feed gas has been shifted more heavily on coldbox E-101 with its exit stream temperature decreases by 3.1°C. Load on cooler E-102 reduces a little due to higher set point for its exit stream temperature by 0.4°C. Similarly, feed gas vapor entering coldbox E-103 is subjected to less cooling. The vapor is now exiting the coldbox by 3.7°C hotter. This phenomenon causes demethanizer tray 35 temperature to rise significantly to 15.2°C from it previous condition of 5°C. Consequently, more ethane and propane escape demethanizer as vapors at the top instead of liquids at the bottom.

**Real-time optimization:** Seven variables are selected as optimization variables. Descriptions and bounds of these variables are shown in Table 1. For practical reasons, only inequality constraints are specified. This way, feasible solution can be obtained faster and/or within RTO sampling interval of 200 min. The long sampling interval is necessary to match the open-loop settling time of MPC controller. Total number of constraints is thirty four including product specifications as well as limits in plant throughput, equipment and processes (Table 2). The solution to the optimization problem (Eq. 4) is a set of targets that are passed to control layer for implementation.

**Control:** Control layer consists of two sub-layers namely MPC and regulatory control layers. For safety and reliability reasons, direct communication between MPC and plant is currently prohibited by Tatjewski (2008). The MPC action can only be implemented through regulatory controllers, which may take over from MPC if and when the need arises. Between the two controllers, MPC is the preferred one due to its capability in handling multivariable control with constraints (Huang and Riggs, 2002). Both PI and MPC controllers are tuned for set point changes.

In case of scheduling from sales gas to natural gas liquids mode, RGP is cooled to -92°C. This is achieved partly by lowering temperature of streams exiting all three coldboxes and cooler as specified in Table 1. Feed gas flow to GSP unit is also increased significantly from 1.2 to 34.5 t h^{-1}. In addition, top of demethanizer pressure is decreased from 24 to 22 barg. This procedure induces higher recovery of liquids. Optimal set points are obtained for maximizing value of natural gas liquids while maintaining operational stability at new conditions. Set points of streams exiting cooler E-102 and coldbox E-103 are increased by 0.9 and 1.7°C, respectively. At the same time, set point of demethanizer tray 35 temperature is reduced to 0.4°C from the previous state of 5°C. This action reduces both cooling and reboiling loads and thus operational expenses. Feed gas flow to GSP unit is decreased by almost one-half to reduce heat exchange between processed gas and sales gas at coldbox E-105. On the other hand, more feed gas flows to turboexpander KT-101 that is mechanically linked to booster compressor K-101. In turn, this action also reduces expenses, since operating sales gas compressor K-102 is much more expensive than maintaining turboexpander-compressor.

During simulation, set points are only introduced to the plant after 30 min to show that plant is previously at steady-state level. At the end of experiments in all cases, new steady-states are reached. As an example, dynamic trajectories and final states of RGP profit are shown in Fig. 3. Figure 3a and b refer to mode scheduling from natural gas liquids to sales gas and bottom two figures refer to the other mode scheduling. Results from scheduling only cases are presented on Fig. 3a and c whereas those from integrated approach on Fig. 3b and d. In general, change of plant mode from natural gas liquids to sales gas results in higher profit margin. The reverse is true for the other mode scheduling. Economic results are tabulated in Table 3. For fair comparison of different online procedures, instantaneous values are averaged out over the entire simulation time as (Ferrer-Nadal *et al*., 2007):

(5) |

where, F_{E} and , respectively, denote instantaneous and average economic parameters namely profit, revenues and expenses over time horizon [t_{0}, t_{f}].

Profit is taken as a function of revenues and expenses (Yusoff *et al*., 2007). Revenues are derived from the values of sales gas and natural gas liquids. Expenses are due to costs of feed gas and operation. The operational costs include those emanate from refrigeration and reboiler duties, compressor fuel gas, turboexpander maintenance and pumping actions.

Table 3: | Average values (RM min^{-1}) of economic parameters over 510 min simulation time |

Fig. 3: | Dynamic trajectories of RGP profit for Cases (a, b) A and (c, d) B |

**Case A (Natural gas liquids to sales gas mode):** Four studies are performed in this case of mode scheduling from natural gas liquids to sales gas mode. Case A1 is the base case where scheduling is implemented by PI controllers. If the same set points are implemented by MPC controller as in Case A2, RGP profit increases by 0.1%. This is achieved by an increase in revenue from sales gas by the same quantum but decrease in revenue from liquids by 0.5%. At the same time, operational expenses decrease by 1.3% due to efficiency of MPC controller in bringing plant to a new state optimally.

Case A3 and A4 show that additional benefits can be achieved if scheduling set points are optimized at RTO layer before they are implemented by controllers. Profit increases by 0.4 and 0.5%, respectively, for Cases A3 and A4. Revenue from sales gas increases by 0.9% in both cases. However, sharp declines in revenue from liquids are noticed at 4.6 and 4.7% for Cases A3 and A4, respectively. In term of operating expenses, PI controllers manage to obtain reduction by 1.3% whereas MPC scheme by 4.4%.

**Case B (Sales gas to natural gas liquid mode):** Similar to Case A, four case studies are carried out in Case B. This time, scheduling is performed from sales gas to natural gas liquids mode. Case B1 is used as a basis to be consistent with studies done is Case A. In Case B2, negligible benefit is achieved even though set points are implemented by MPC controller. This happens because economic parameters almost cancel each other out with 0.6% reduction in operating expenses is matched with 0.1% reduction in revenue.

Integrated approach of scheduling and RTO are represented in Cases B3 and B4. In terms of profit, the benefit is 0.3% for both cases. This is achieved at slightly different means by PI and MPC controllers. The former increases revenue from sales gas by 0.4%, whereas the latter by 0.5%. PI and MPC controller actions reduce revenue from liquids by 1.7 and 1.9%, respectively. However, gap between both controllers shrinks to 0.1% in terms of benefit derived from operating expenses. For this particular case, the reduction indicates that optimal set points sent by the integrated approach may be executed by either PI or MPC controllers since the latter may have exhausted all efforts in obtaining optimal trajectory for its manipulated variables.

A new approach of integrating scheduling and real-time optimization is illustrated using Refrigerated Gas Plant (RGP) as a test bed. Efficacy of the proposed approach has been demonstrated in several cases of scheduling of RGP from natural gas liquids to sales gas and vice-versa. Both PI and MPC controllers are employed to implement the newly calculated set points. MPC controller brings in additional benefit because RGP is taken to another state optimally.

Financial support from Universiti Teknologi PETRONAS is greatly appreciated.

- Floudas, C.A. and X. Lin, 2004. Continuous-time versus discrete-time approaches for scheduling of chemical processes: A review. Comput. Chem. Eng., 28: 2109-2129.

Direct Link - Mendez, C.A., J. Cerda, I.E. Grossmann, I. Harjunkoski and M. Fahl, 2006. State-of-the-art review of optimization methods for short-term scheduling of batch processes. Comput. Chem. Eng., 30: 913-946.

Direct Link - Chatzidoukas, C., J.D. Perkins, E.N. Pistikopoulos and C. Kiparissides, 2003. Optimal grade transition and selection of closed-loop controllers in a gas-phase olefin polymerization fluidized bed reactor. Chemical Eng. Sci., 58: 3643-3658.

Direct Link - Kadam, J., B. Srinivasan, D. Bonvin and W. Marquardt, 2007. Optimal grade transition in industrial polymerization process via NCO tracking. AIChE J., 53: 627-639.

Direct Link - Chamberlain, R.M. and M.J.D. Powell, 1982. The watchdog technique for forcing convergence in algorithms for constrained optimization. Math. Programm. Study, 16: 1-17.

Direct Link - Tatjewski, P., 2008. Advanced control and on-line process optimization in multilayer structures. Ann. Rev. Control, 32: 71-85.

Direct Link - Huang, H. and J.B. Riggs, 2002. Comparison of PI and MPC for control of a gas recovery unit. J. Process Control, 12: 163-173.

CrossRefDirect Link - Ferrer-Nadal, S., I. Yelamos-Ruiz, M. Graells and L. Puigjaner, 2007. An integrated framework for on-line supervised optimization. Comput. Chem. Eng., 31: 401-409.

Direct Link