High Integrity, Real-time Model-based Blending Management System Parthasarathy, P.V., Erickson D.E., Kowta, R., Multiphase Solutions Inc.

Size: px
Start display at page:

Download "High Integrity, Real-time Model-based Blending Management System Parthasarathy, P.V., Erickson D.E., Kowta, R., Multiphase Solutions Inc."

Transcription

1 High Integrity, Real-time Model-based Blending Management System Parthasarathy, P.V., Erickson D.E., Kowta, R., Multiphase Solutions Inc. Copyright 2008, Society of Petroleum Engineers This paper was prepared for presentation at the SPE Gulf Coast Section 2008 Digital Energy Conference and Exhibition held in Houston, Texas USA, May This paper was selected for presentation by a Gulf Coast Section Program Committee following review of information contained in an abstract submitted by the author(s). Contents of the paper have not been reviewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The material does not necessarily reflect any position of the Society of Petroleum Engineers, its officers, or members. Electronic reproduction, distribution, or storage of any part of this paper without the written consent of the Society of Petroleum Engineers is prohibited. Permission to reproduce in print is restricted to an abstract of not more than 300 words; illustrations may not be copied. The abstract must contain conspicuous acknowledgment of SPE copyright. Abstract This paper describes a real-time model-based advanced control application that was developed to maximize the blending of low quality gas into a gas gathering facility in UK. The facility already had a blending management system that was not model based and therefore was conservatively programmed. With the new system the facility operates at a lower margin above the gas quality limit. To achieve this in a safe manner the blending management system was designed with four important components. The first component is a real-time filtering model that utilizes advanced filtering logic to check and preprocess the integrity of the incoming data. The filtered data then feeds a high-fidelity real-time online process model of the facility with rigorous thermodynamic modeling of the dewpoint trains. This online process model predicts the wobbe of the blended gas at various points in the plant. The difference between the predicted and measured points is used by the third component in the chain, the Advanced Reconciliation Module, to reconcile the inlet flow rate and composition measurements so that the predictions at the sales point match the measurements. The outputs of the reconciliation module are instrument error estimates which are then used by the last component, the Wobbe Control Module (WCM), to predict the outlet wobbe so adjustments can be made to the production from the lower quality field, i.e., feed forward control. The new blending management system, by lowering the wobbe control point, has enabled the operator of the facility to develop and produce two additional low quality fields and tie them into the facility. The system has been in operation with the new fields in production for over four months without a single shutdown being triggered.

2 2 [Paper Number] Introduction ConocoPhillips UK (CoP) operates the Theddlethorpe Gas Terminal (TGT) that gathers wet gas production from various offshore and onshore fields and dewpoints the gas before selling it to the National Grid system. The bulk of the production comes from three offshore fields operated by ConocoPhillips, namely the Lincolnshire Offshore Gas Gathering System (LOGGS), the Caister-Murdoch System (CMS), and the Viking platform in the Southern North Sea (SNS) area. The processing equipment at TGT ensure that the dewpoint and the wobbe index specifications of the exported gas meet contractual limits. A minimum wobbe index limit is set in the gas sales contract. When lower wobbe gas is sold to the National Grid, a portion of the grid needs to be isolated and blown down. Gas from CMS has the potential to have a lower wobbe index than the minimum acceptable limit and therefore a gas blender is installed at TGT to blend CMS gas with gas from other sources that have a higher wobbe index. A Blending Management System (BMS) was designed to control the blend ratios required to maintain the acceptable wobbe. In addition, the BMS was designed to take a number of executive actions when low wobbe is detected to ensure that below specification gas is not exported from the terminal. Recently Multiphase Solutions Inc. (MSi) implemented a model-based high integrity BMS to replace the older BMS. This has created benefits including the opportunity for CoP to develop and reliably produce from two new offshore fields that have the potential to reduce CMS wobbe even more. This paper talks about the design and lessons learned from the implementation of the BMS. This paper also demonstrates using field data that the new BMS system has been performing its intended function of maintaining the quality of the exported gas. The prudent design of the BMS system has brought about other practical side benefits to CoP. These are also illustrated through field data and screenshots. In the realm of real-time optimization (RTO) this application is one of the few documented live applications to combine real-time transient process modeling, statistical data reconciliation, advanced data filtering, and an adaptive control algorithm all into one package. This closed-loop control application was implemented without any pilot testing and commissioned without any disruptions to production. The next section briefly covers the functional requirements of the BMS system. Following this, the design of the new BMS system is discussed at a high level and then in detail. As part of the discussions, field data is presented to show how each of the components of the BMS system add benefit to the operations beyond satisfying their basic functional requirements. The BMS is also shown to control the CMS flow rate to maintain the sales wobbe at the target. BMS Functional Requirements The new BMS project comprised the following work scope: replace the old BMS with a high-integrity BMS to allow getting the operating wobbe control point to be closer to the newly negotiated contract wobbe limit, replace the old metering database system with a new metering database system, install a Programmable Logic Controller (PLC) whose role is to interface with the plant s existing Distributed Control System (DCS) and ESD system. All executive commands are transmitted from the BMS to the DCS and ESD systems via the PLC. In addition to this, the PLC monitors directly the sales gas wobbe value from the wobbe anlysers. In the event of off specification gas being detected, the system will initiate partial or total plant shutdown commands sent to the ESD system. Outside of the scope of the BMS project, new Gas Chromatographs (GCs) and fiscal-quality metering supporting latest industry-standard communication protocols were installed to replace the older, slower instruments that were built upon supplier-specific protocols. Three redundant wobbe analyzers were also installed at the sales point for high-integrity wobbe monitoring to enable emergency plant shutdown as a last resort. The design, supply, and installation of the PLC and the metering database system were subcontracted by MSi other vendors. The BMS system serves two purposes: during normal operation, BMS sends flow rate setpoints to the CMS inlet flow rate controller to control the blended wobbe at the user-specified target; when upset conditions such as a nitrogen spike on LOGGS or CMS occur, BMS reacts with more aggressive actions including direct control of CMS inlet valve, CMS plant shutdown, and TGT plant shutdown. The normal mode of controlling the export wobbe at the target results in the maximum possible production of CMS gas. BMS Design In this section the design of the BMS system is discussed in detail. The high-level design of BMS was performed at the proposal stage because CoP s specifications were left intentionally open as to the design of the BMS. At the proposal stage, CoP encouraged the bidders to propose the design so they could evaluate the bidders expertise. MSi proposed four designs from which CoP picked one. Figs. 1a, 1b, 1c, and 1d illustrate the four designs that were proposed. The design in Fig. 1d was chosen by CoP for BMS. The flow of the BMS shown process in Fig. 2 closely resembles the process flow described in Bieker, Slupphaug, and Johansen (2006). Unlike some other documented RTO cases (Clay, Stoisits, Pritchett, Rood, and Cologgi, 1998; Reeves, Harvey, and Smith, 2003; McKie, Rojas, Quintero, Chacón Fonseca, and Perozo, 2001), the BMS uses a transient process model for the optimization. The reason for needing a transient model and some of the challenges in implementing a transient process model will be discussed later.

3 [Paper Number] 3 Primary Components of BMS BMS comprises four major calculation units: a real-time filtering (RTF) module, a transient process model of the TGT facility, a statistical data reconciler, and a wobbe control module (WCM). The instrumentation skews at TGT, especially those of the GCs, are comparable to the residence time of the plant. The residence time for the gas in the plant was estimated to be between 2 and 4 minutes depending on the flow rate. The gas chromatographs have a cycle time of approximately 1 minute. Besides cycle time, GCs also have a travel time for the samples which could be quite significant. Fig. 3 shows the lag between the CMS N2 analyzer and the CMS GC. This particular problem was highlighted by the statistical data reconciler which has a built in module for analyzing phase lag between two signals. When BMS brought this particular problem to the attention of the operators, the tuning of the controller on the sample line was adjusted to alleviate the problem. To deal with instrument skews, another component called the lagged process historian (LPH) was essential to the successful implementation of BMS. With the addition of the LPH, the component cycle is subtly different than what is shown in Fig. 2. The process data is first acquired. Then the RTF filters the data by performing various consistency checks. The filtered data gets stored in the LPH. When new GC data gets published, the time at which the analysis started, which is usually 1-2 minutes in the past, is also made available by the metering database. When LPH detects a new GC result, it writes the result back in time taking into account the analysis start time and a user configurable sample travel time. By timestamping the GC results in the past, LPH minimizes the time skew between the acquired process data. If one takes a look at the data in LPH, say 15 minutes in the past, these are likely to have very little time skew. Therefore, the real-time transient process model was configured to run using data published in the LPH 15 minutes in the past, making the model a lagged online model (LOM). The LOM s function is two-fold: one is to estimate the wobbe drop across the dewpoint train using a rigorous thermodynamic model and real-time process data, and the other is to provide comparison points for the statistical data reconciler. The LOM models the plant starting from just downstream of the inlet slug catchers, and includes the blender, dewpoint trains and all the piping volumes and pressure drop elements (bends, valves, etc.) around these units. Because the conditions (pressure and temperature) in the dewpoint trains are controlled within tight tolerances, the wobbe drop across the dewpoint train does not experience fast transients. Therefore the LOM calculates a short-term moving average of the wobbe drop across the dewpoint train which is used in the WCM. The statistical data reconciler, labeled advanced reconciliation module (ARM), compares LOM predicted sales gas flow rate and composition with the filtered measurements of the same quantities. Based on the differences, the ARM corrects the inlet flow rate measurements and compositions to achieve a complete molar balance. Instead of performing a steady-state component balance using a least-squares approach, ARM uses a control algorithm to slowly move the inlet measurements to achieve the component balance at the outlet. The ARM algorithm is discussed later. The WCM uses LOM-estimated wobbe drop in the dewpoint train and the ARM-estimated inlet measurement biases to perform advanced control and writes a flow rate setpoint to the CMS inlet flow rate controller. The BMS component cycle incorporating the lagged process historian and the time lagged online and ARM modules are represented in Fig. 4. Real-time Filtering RTF is the first level of data filtering in the BMS component cycle. RTF acquires data from the process (step (1) in Fig. 4) via the metering database and handles communication losses, data outside limits, and temporary data losses during calibration. The filtering of GCs includes consistency checks such as a limit on the unnormalized total, and bounds on deviation between nitrogen analyzer results and GC results for nitrogen (only for CMS and LOGGS). An instance of RTF performing data filtering on an inlet GC is shown in Fig. 5. RTF also calculates a best estimated sales wobbe from the three wobbe analyzers available. During the commissioning phase, BMS highlighted a problem with one of the wobbe analyzers which was caused by an out-of-tune temperature controller in the wobbe analyzer. This is shown in Fig. 6. After performing all the consistency checks, RTF adds the ARM-calculated biases to the appropriate inlet meters and GC measurements (step (2) in Fig. 4). These scaled measurements are output to the LPH for subsequent use in the online process model (step (3) in Fig. 4). Lagged Online Model The reason for lagging the transient online model was explained earlier. This was a critical design feature that enabled the online model to produce comparable predictions at the sales point. The setup of the online model boundary conditions also required careful analysis. At the inlet of the facility, the online model uses the filtered, scaled flow rates and compositions, and inlet temperatures from each field. At the outlet of the facility there are sales flow rate meters, and pressure measurements upstream of the sales flow control valves. If the measured flow rates are used as the outlet boundary in LOM, it cannot provide an independent estimate of the sales flow rate for ARM. If the measured pressure is used, then the LOM will be unable to model the packing and unpacking behavior of the plant. To get around these problems, the LOM was configured to have a control valve at the outlet. A PID controller was setup in the LOM to control the model-predicted blender pressure to match the measured blender pressure. The outlet boundary pressure used in LOM was the lowest possible National Grid pressure. Although there is no blender pressure control at TGT and the sales valves are controlled on flow, the LOM was setup as described to accurately capture the packing and unpacking behavior of the plant. With this setup, LOM was able to provide

4 4 [Paper Number] an independent estimate of flow rate out of TGT that can be compared to the metered flows at the same point. Fig. 7 shows that the model controller was able to effectively control the model predicted pressures to match the measured pressures in the plant during an unpacking and packing event. Besides tracking the blended composition through the TGT facility, the online model also provides an estimate of the fraction of flow from each source at the sales point. This information is critically important for ARM and is transferred from LOM to ARM in step (5) of Fig. 4. Advanced Reconciliation Module The ARM is a gross error detection algorithm. Its outputs are gross errors (or biases) in the inlet flow rate meters and GCs. Traditionally, this is formulated as a least-squares minimization problem (Narasimhan and Jordache, 1999). This traditional approach works well in a steady-state system. The ARM uses a control approach to slowly move the biases so that the LOM predicted sales flow rate and compositions match the corresponding measurements. It was mentioned earlier that the ARM has a built-in module for analyzing phase lag between two signals. Instrument time skews were identified early on as a source of significant errors during transient events. Figs. 8 and 9 illustrate this. Not only do time skews make the errors potentially larger in magnitude, they could also result in the model errors changing signs during a transient. A phase shifting algorithm was employed to avoid this kind of error. Besides guiding ARM in the right direction, the algorithm also highlighted problems in field instrumentation as shown earlier in Fig. 3. In order to perform these phase shifts, ARM relies on getting historical data from the lagged process historian (step (7) of Fig. 4). The reason a control algorithm was employed was twofold: the traditional formulation requires estimates of instrument accuracies and the distribution of error is proportional to these parameters, which were unavailable for some of the older instruments that are in use; the traditional formulation does not take advantage of sharp transients, in say one source, which present opportunities to do tuning by difference. Consider a sphere arriving from one of the fields. The operators choke back on the inlet control valves during a sphere arrival for slug control. This results in a period of approximately 20 minutes where the flow rate from that field is lower than its previous steady state. This would result in a change of model errors at the outlet directly proportional to the change in the proportion of flow from that field. ARM uses the information from LOM about the fraction of each source at the outlet and looks for such transients. When such a transient occurs, any calculated change in error is directly attributed to the field that undergoes the transient. During steady-state operations, errors are distributed in proportion to the flow rates from each field. Wobbe Control Module The Wobbe control module calculates a CMS flow rate setpoint so that the predicted Wobbe at the outlet based on inlet information and other model calculated values are moved closer to the wobbe target. In general, the wobbe at sales point can be calculated using the following expression:...eq. 1 where the subscript i indicates the 5 sources CMS, LOGGS, Viking, Pickerill, and Saltfleetby in that order. Given a target wobbe setpoint W sp, the CMS flow rate at the inlet can be calculated as...eq. 2 assuming W 1 is lower than W SP. Another way to calculate the CMS flow rate is to calculate how much additional CMS flow rate can be added while keeping the sales wobbe above the low wobbe limit. Note that the W D term drops out of this equation....eq. 3 If W 1 is greater than W sales the CMS flow rate is set to the user specified maximum CMS flow rate F nom. Apart from these deterministic calculations for F 1 an adaptive control algorithm is also applied. Depending on where the sales wobbe is with respect to the target, the adaptive control algorithm may limit the rate at which the CMS flow rate setpoint is changed. The WCM selects the least CMS flow rate setpoints out of all these methods. In all these calculations, the scaled values for flow rates and wobbe indices are used for the sources. Besides using the ARM-adjusted measurements, the WCM applies a reverse bias on the calculated flow rate setpoint. After doing this, the WCM has to convert the standard volume rate setpoint into an energy rate setpoint because the flow rate controller works on an energy basis. Unfortunately, the ratio of the energy rate to the flow rate as measured by the flow meters usually does not match the GHV calculated by BMS using the GC data (due to incorrect tail characterization). RTF does additional filtering so that WCM can convert the energy setpoint to a consistent basis as understood by the inlet controller. The WCM includes several other features including ladder logic for CMS and plant shut downs. These features are beyond the scope of this discussion.

5 [Paper Number] 5 The final test for WCM was done by moving the wobbe target to the MJ/m 3 level in steps. At each step, the LOGGS flow rate was also stepped down to force BMS to reduce the CMS flow rate. The result of this test is shown in Fig. 10. Plant Blend Forecast The transient model is also used in a look-ahead forecast mode in the Plant Blend Forecast (PBF) module. This module holds all the boundary conditions the same and does a 15-minute look ahead to guide the operators ahead of time of changes that might be made by the WCM. An interesting side benefit that was highlighted by PBF was a calibration error on the DCS link to the CMS flow meters. When PBF starts up, it performs data validation. One of the validation steps is to verify if the current CMS flow rate is lower than the maximum CMS flowrate F nom. In fact PBF even allows an overshoot of 5% over the nomination to allow for controller lag. If the flow rate is beyond 105% of the F nom, PBF calculation module changes its status to unreliable which raises an alarm on the operator control station. When the operators brought this to MSi s attention, MSi s maintenance team determined that the actual CMS flow rate was consistently over the nomination and that it frequently crossed the 5% threshold allowed by PBF. It turned out that the CMS flow rate indication in the DCS was different than the value in the metering database. The 4 CMS flow computers have a 4-20mA analog output to the DCS, which should pass the same values as the digital output to the MDC. Unfortunately, CoP discovered that these outputs can drift, which was the case in this instance. After recalibrating the analog outputs, The CMS flow rate on the BMS matched the DCS flow indication to within 1%. Now the alarm is used as an indication of when to recalibrate the flow computer analog outputs. Offline Process Model To allow offline validation of WCM, an offline transient process model was configured as part of the BMS project. This module called Field Data Generator (FDG) allowed a matrix of tests to be run through the BMS system before it was even installed in the control room. FDG also includes noise generators that allow the user to configure gross errors and noise levels in every signal that is transferred to BMS. Because of the extensive tests that were run prior to commissioning phase, the cut-over from the old system to the new system was performed without a single interruption to the operation of the facility. Conclusions 1. A closed-loop model-based advanced control system was implemented to maximize the gas production from lower gas quality field. The system uses real-time transient modeling, statistical data reconciliation, real-time data filtering, and an advanced control algorithm. 2. The prudent design of the system has resulted in additional benefits that are outside the functional requirements of the system. The design of data filters and data reconciliation algorithms is an important part of this process. 3. Time skew is a significant effect to be designed around when doing real-time transient process models, especially when GCs are used as input to the model. The lagged process historian is a viable solution to this problem when the residence time of the facility being modeled is comparable to the cycle time of the GCs. 4. Offline models help validate an online system and ensure easier commissioning of the online system. Nomenclature W sales Wobbe at sales point W D Wobbe drop across the dewpoint trains i Source index: 1 = CMS, 2 = LOGGS, 3 = Viking, 4 = Pickerill, 5 = Saltfleetby F Molar flow rate W sp User-specified target wobbe W L Low wobbe limit at which BMS takes direct control over CMS inlet flow control valve W LL Low-low wobbe limit at which the CMS inlet facility is shut down W LLL Extra-low wobbe limit at which a plant shutdown is triggered F nom Maximum flow rate allowed from the CMS field Acknowledgements The authors thank J-P. van Frank from Production Services Network for getting approvals from CoP for publishing this work, and Dale Allison and Phil Deveraux from ConocoPhillips for their guidance through out the execution of the BMS project. Bibliography Bieker, H. P., Slupphaug, O., and Johansen, T. A. (2006). Real Time Production Optimization of Offshore Oil and Gas Production Systems: A Technology Survey. Paper SPE presented at Inelligent Energy Conference and Exhibition, Amsterdam, The Netherlands, April. Clay, R. M., Stoisits, R. F., Pritchett, M. D., Rood, R. C., and Cologgi, J. R. (1998). An Approach to Real-Time Optimization of the Central Gas Facility at the Prudhoe Bay Field. Paper SPE presented at SPE Annual Technical Conference and Exhibition, New Orleans, Louisiana, September. Litvak, M. L., Hutchins, L. A., Skinner, R. C., Darlow, B. L., Wood, R. C., and Kuest, L. J. (2002). Prudhoe Bay E-Field Production Optimization System Based on Integrated Reservoir and Facility Simulation. Paper SPE presented at SPE Annual Technical Conference and Exhibition, San Antonio, Texas, 29 September - 2 October. McKie, C. J., Rojas, E. A., Quintero, N. M., Chacón Fonseca, J. R., and Perozo, N. J. (2001). Economic Benefits From Automated Optimization of High Pressure Gas Usage in an Oil Production System. Paper SPE presented at SPE Production and Operations Symposium, Oklahoma City, Oklahoma, March.

6 6 [Paper Number] Mohaghegh, S. D., Hutchins, L. A., and Sisk, C. (2008). Building the foundation for Prudhoe Bay oil production optimisation using neural networks. Int. J. Oil, Gas and Coal Technology, 1 (1/2), Narasimhan, S., and Jordache, C. (1999). Data Reconciliation and Gross Error Detection: An Intelligent Use of Process Data. Houston, Texas, USA: Gulf Publishing Company. Reeves, D., Harvey, R. J., and Smith, T. (2003). Gas Lift Optimization: Real Time Data to Desktop for Optimizing an Offshore GOM Platform. Paper SPE presented at SPE Annual Technical Conference and Exhibition, Denver, Colorado, 5-8 October.

7 [Paper Number] 7 Figures and Tables (a) Simple design with no statistical reconciliation (b) Base design plus simplified reconciliation (wobbe balance) (c) Base design plus advanced reconciliation to correct Inlet flow rates and compositions Fig. 1 BMS designs proposed at proposal stage (d) Additional forecasts to enable better feed-forward control Model updating Statistical Reconciler Data Filtering Plant Advanced Control Fig. 2 BMS Components Cycle

8 8 [Paper Number] Fig. 3 Skew in CMS GC caused by long sample travel time 2 9 Metering DB 1 Real time Filtering 7 Control Module Process Model Legend I/O at time t I/O at time t 15 Lagged Historian Plant 6 Statistical Reconciler Fig. 4 BMS component cycle inlcuding lag effect Fig. 5 RTF filters out bad data

9 [Paper Number] 9 Fig. 6 Plot showing oscillatory behavior of wobbe analyzer B Fig. 7 Plot showing comparison between LOM predicted and measured pressures Fig. 8 Outlet wobbe error because the model picks up an inlet composition transient later than when it happened.

10 10 [Paper Number] Fig. 9 Model errors reduced and in consistent direction after phase shifting Fig. 10 BMS final test results showing wobbe target cut in steps between 09:45 and 10:40 (flow rate values intentionally masked)