OTC-28108-MS Advanced Control for Gas-Lift Well Optimization Mario C M M Campos, Marcelo L Lima, and Alex F Teixeira, PETROBRAS/CENPES; Cristiano A. Moreira and Alberto S Stender, PETROBRAS/UO-RIO; Oscar F. Von Meien, PETROBRAS/SUP; Bernardo Quaresma, PUC-Rio/Tecgraf Copyright 2017, Offshore Technology Conference This paper was prepared for presentation at the Offshore Technology Conference Brasil held in Rio de Janeiro, Brazil, 24–26 October 2017. This paper was selected for presentation by an OTC 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 Offshore Technology Conference and are subject to correction by the author(s). The material does not necessarily reflect any position of the Offshore Technology Conference, its officers, or members. Electronic reproduction, distribution, or storage of any part of this paper without the written consent of the Offshore Technology Conference 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 OTC copyright. Abstract The search for improvements in the production efficiency is one of the main challenges for the production engineers responsible for an asset, mainly at moments of low prices and very strict regulations for safety, environment and quality of products. Another point is that offshore plants are becoming more complex, so advanced control systems can support the operators and play an important role to improve stability and profitability. This paper will present an advanced control algorithm for gas-lift optimization of offshore wells that aims to increase oil production. It will also show and discuss some results of the implementations of this real time advanced control system in two offshore platforms, emphasizing the economic gains and critical points to maintain this controller running with a good performance. Introduction Nowadays, the oil and gas industry have many challenges due to low prices, in particular for offshore production platforms located far from the coast. There are also increasingly stringent regulations for safety, environment and quality of products. Therefore, it is important to developed new control systems to deal with those challenges, increasing safety and profitability, also reducing operational costs. The regulatory and advanced control, as well as real time optimization systems can provide many advantages for the industrial units. Figure 1 shows a schematic automation pyramid containing the regulatory and advanced control layers. On a first level, there are sensors and actuators (instrumentation) which interact with process. On a second level, regulatory control layer is responsible for maintaining pressures, temperatures, levels, composition at their setpoints, in the presence of disturbances. Usually, we uses PID algorithm in the automation system (DCS or PLC) (Campos and Teixeira, 2006). On a third level, there are advanced control systems, which are defined as any control strategy that has functions beyond the commonly associated with the regulatory control of the plant. Among the objectives of advanced control systems are increasing stability (monitoring and improving regulatory control performance), maximizing production, improving profitability, ensuring product quality and increasing energy efficiency. 2 OTC-28108-MS Figure 1—Automation layers. These tools can also have a simplified optimization layer, based on simplified models of the process or some heuristics. These advanced control algorithms are implemented on a computer that communicates with the automation system of the plant, for example, through an OPC protocol. Advanced control systems for offshore production platforms is relatively recent (Campos and Teixeira, 2011) due to some characteristics of these processes, for instance: • • • A platform has many transients (shutdowns, different well alignments, etc.), many disturbances (for instance, slugs), uncertainties and noise. Oil and gas production is never in a steady state because it is a time-varying process (gas-oil-rate changes from year to year, water cut also changes, etc.). There are few instruments available, for example, there is not much information about pressures and temperatures profile inside subsea pipelines and wells, etc. These arguments mean that this type of process requires different advanced control algorithms, having for example adaptation strategies for each different operational condition. Our strategy is to divide the problem, and develop specific tools or modules for each issue. The advantage is to have less complex problems to be solved. On the other hand, the disadvantage is losing a bit the overall view of the problem, so it is important to have some coordination between these modules (Campos et al., 2013). The advanced control strategy developed have three main modules, each one with a specific objective: advanced control module for increased stability of regulatory control, advanced control module to eliminate or minimize instabilities due to slugs, and an advanced control module to increase oil production based on the results of a gas-lift offline optimization. Figure 2 shows the advanced control strategy proposed within its three modules. Figure 2—Advanced control developed and implemented in offshore platforms. OTC-28108-MS 3 In Campos et al. (2013) it was described the first "Stabilization" module, which is an adaptive control algorithm and shown some results and benefits. The second one is an "Anti-slug Advanced Control Module" responsible to minimize slugs, which was described in (Campos et al., 2015). This paper will present the development, implementation and results of the "Online Production Optimization" module. Online production optimization advanced control module The production optimization of an offshore involves decisions that are made by different groups (Campos and Teixeira, 2011) (Bieker, et al., 2007). Production engineers usually take into consideration measured data to calibrate well models in steady-state multiphase flow simulator, and based on their experiences, platform constraints, and results of simulations and/or mathematical optimization, define the optimum operating point for the current scenario. During this process, engineers can use decision support system based in mathematical optimization, as the BR-SiOP that means Petrobras Production Optimization System (Teixeira et al., 2013). After the optimal recommendation be validated, the operator is then responsible to actuate in the process plant, closing the optimization loop. Figure 3 shows the layers of this optimization process. Figure 3—Production optimization layers in offshore platforms. Offline gas-lift optimization is usually done based on static models, which are uncertain, and obtained on a weekly and often monthly frequency. So, it's important to have an advanced control system running every hour to verify if gas-lift flow setpoint is actually increasing oil production in face of events and disturbances, for instance, compressor shutdown. To this end, advanced control receives the desired operational regions from the gas-lift offline optimization, and tries to maximize oil production inside these boundaries (about 10% to 20% around the optimization optimum) considering others constraints. The main manipulated variables are gas-lift flow setpoints for each well. Production optimization problem In the majority of the cases, the goal of the production optimization is to maximize oil production, minimizing the flared gas and satisfying the constraints imposed by the wells, pipelines and platform process plant. This goal can be modeled by a multiobjective function that is a weighted combination of the conflicting objectives, as can be seen in Equation (1). 4 OTC-28108-MS (1) where qoj denotes the oil flow rate produced by the well j, flare denotes the flared gas, qig denotes the gas lift flow rate of each well, pwh denotes the pressure upstream topside production choke valve of each well (which is function of the choke position), y is a binary variable defining the status of each well (opened or closed), w is the weighting coefficient, qomax and flaremax are parameters used to normalize the objective function and represents the maximum oil flow rate of the platform and the maximum gas flaring allowed in the field, respectively. A platform consists of a set of equipments which are designed to separate the produced fluids and meet certain quality requirements for export and disposal. These equipments have operating limits established in the design phase or coming from their degradation with time. The occurrence of shutdown of critical platform equipments can also submit the process plant to severe constraints that should be considered during optimization. Therefore, optimization problem should consider many constraints, for instance: • • • • • • Compression capacity of a platform: , where qgpj defines the produced gas flow rate of the well j, qigj defines the gas lift flow rate of the well j and qgtc is the platform compression capacity. Lower and upper bounds in the gas lift flow rate for each well: , where yi defines min max the status of the well j, qigj and qigj define the lower and upper bound for gas lift flow rate, respectively. Lower and upper bounds in the pressure upstream topside production choke valve: where min pwhj defines the pressure upstream topside production choke valve of the well j, pwhj and pwhjmax define the lower and upper bound for the pressure upstream topside production choke valve, respectively. Treatment capacity of oil and water separators of the platform: , where qwj defines the produced water flow rate of the well j and qltc is a parameter representing the platform liquid handling capacity. Water treatment capacity of the platform (separators, hydrocyclones and flotation units): , where qwtc is a parameter defining the platform water handling capacity. Maximum burning off the gas, allowed by the environmental agencies: flare ≤ flaremax, where flaremax is a parameter representing the maximum amount of gas that is allowed flaring. The results of the optimization problem obtain for each well: ▪ Status of the well suggested by the optimizer (opened or closed); ▪ Optimum gas lift flow rate of the well; ▪ Optimum choke position. Production optimization advanced control The online production optimization advanced control explained in this section receives the desired operational regions from a gas-lift offline optimization (see Figure 4) and tries to maximize oil production inside these boundaries, also considering other constraints. The optimal region is update when necessary, for example, after a well production test, usually performed once per month, or when there is a huge disturbance OTC-28108-MS 5 in the platform due to operational problems in separators or compressors. The lower and upper bounds of the gas-lift flow rate for each well are validated by the operator considering, for example, a range of ±10% around the offline optimization optimum. Figure 4—Graphic of the oil flow rate versus gas lift flow rate for one well. For a certain choke position, oil flow rate versus gas-lift flow rate of one well has a typical characteristic plot. The main objective of the advanced control is to find out the gas-lift flow rate that maximizes oil production between its minimum and maximum limits, defined by the offline optimization. Once the gas-lift bounds are defined, the online production optimization advanced control tries to maximize the oil production based on some heuristics rules, as an expert system (model free), each well individually. The main manipulated variable of the advanced control is gas-lift flow setpoints for each well. Since there is no measurement of the produced oil flow rate in the well, the algorithm assumes that the maximum oil flow corresponds to the lowest downhole pressure (PDG). This algorithm also assumes that there is at least one downhole pressure measurement (PDG or TPT). Figure 5 shows the main controlled variables of this advanced control, and the manipulated variable which is gas-lift flow setpoints of the well. Figure 5—Main process variables related with production optimization advanced control. Figure 6 shows a simplified flowchart of the production optimization advanced control for one well. Initially, the algorithm verifies the stability of critical variables for the optimization of the well, as the choke position, upstream choke pressure, downstream choke pressure, discharged pressure of compressors, etc. The system then waits for the operator to turn on the controller, defining the search limits for the optimal gas-lift flow rate at his interface in the automation system (DCS). When the operator turns on the control, the algorithm makes a direct search in the set interval, searching for the gas-lift flow rate that correspond to the minimum downhole pressure (PDG). The idea is to change the gas-lift flow rate setpoint, wait a while 6 OTC-28108-MS for stabilizing the well, and compare whether the downhole pressure (PDG) has dropped or not. Depending on the actual response of the well, the algorithm continues or not in that search direction. Once the optimum point is found, the controller will maintain the well at this optimum point for several hours or days (tuning parameter), until a new search cycle begins. Figure 6—Simplified flowchart diagram of the production optimization advanced control. The critical point for this production optimization advanced control is to keep the gas-lift flow PID regulatory control on automatic mode and with a good performance. So, the first phase during the implementation of the advanced control is to tune these PIDs regulatory controllers in order to decrease gas-lift flow variability. A low gas-lift variability around the optimum point minimizes production losses. The oil production of the well can change over time because it is a time-varying process, for example, water cut or gas-oil-rate can change due to the reservoir conditions. As the proposed advanced controller runs periodically, it can adjust gas-lift flow setpoint to the optimum point in order to increase oil production, using the feedback variable (downhole pressure: PDG or TPT). Although, there a small loses of production during a period of time when the algorithm is searching the optimum, most of the time, the system maintains the well at the best operating point possible, therefore, maximizing oil production. Production optimization advanced control implementation The optimization advanced control uses qualitative operator and engineer knowledge to implement optimization heuristic rules. This knowledge was represented in a high level language, which can execute parallel actions, optimization steps, monitor process variables, interact with operators via interfaces, change optimization procedures during disturbances, like a compressor shutdown, etc. Online production optimization presented in this paper was implemented on a computer using the MPA environment (Module OTC-28108-MS 7 of Automated Procedures) to configure this advanced control module. The MPA software (Satuf et al., 2009) is a tool developed by Petrobras and PUC-Rio University to implement advanced automation and control strategies, for example startup procedures, fuzzy logic control, expert system strategies, etc.. The production optimization system uses qualitative operator and engineer knowledge to implement optimization heuristic rules. This knowledge (figure 6) is represented in more details in MPA flowchart diagrams (see an example in figure 7), which execute the optimization steps, monitoring the process variables, interacting with operators via interfaces, changing optimization procedures during disturbances, and so on. This flowchart language is easy to implement and maintain advanced control strategies. The controller is executed every 60 seconds to monitor critical variables. Figure 7—Optimization Advanced Control Module – Expert System implemented using MPA software. MPA runs as a windows service and the interactions with operators is through the interface configured in the automation system (for example, DCS or supervisory). Figure 8 shows the operator's interface of the production optimization advanced control, where the operator sets the maximum and minimium limits for the gaslift setpoint of each well, and also turn on or turn off the controller for each well. Figure 8—Operator's interface of the production optimization advanced control. Results and Economic Gains Figure 9 shows an example of the performance of this advanced control. The system manipulates the gaslift flow rate, respecting the minimum and maximum limits defined by the operator at the interface, seeking to minimize the downhole pressure (PDG). There are several important tuning parameters of this algorithm, such as the sensitivity or the minimum variation of the PDG to consider an real production gain, the waiting time for the stabilization of a particular well, etc. In this example of figure 9, we show 4 days of advanced 8 OTC-28108-MS control operation in a certain offshore production well. In this case, there was an average reduction of 1.0 kgf/cm2 in this period, which means an increase in its production of 1%. Figure 9—Example of operation of the production optimization advanced control. Figure 10 shows another example of the performance of this advanced control. In this case, the system increased the gaslift flow rate to lower the downhole pressure and also managed to operate at a more stable flow regime, which contributes to minimize disturbances to the production platform processes. The value of the downhole pressure reduction for the analyzed wells is usually greater than 1 kgf/cm2, contributing to an increase in production. Figure 10—Operation of the production optimization advanced control for one well. This advanced control for gas-lift optimization can bring many benefits, for instance, increases oil production and stability, reduces losses and enforces the efficient use of resources. It has already been deployed in two Petrobras offshore production platforms, allowing production gains of around 1% of the wells' potential. The results of this advanced control rely on well tuned gas-lift PID controllers, which is critical for maintaining the well's operation near the optimal point. Another key point is to have a reliable downhole pressure measurement. The new version of this algorithm is looking for an efficient inference for well production, when the downhole measurement is no longer available due to some premature failure of this sensor. Gains also depend on the controller's operating factor, that is, the percentage of time the OTC-28108-MS 9 operator turned on this advanced control in a given month. Therefore, a very important point for success of this advanced control strategy is an effective participation of operators during design, commissioning and operation, in order to give feedbacks, which help to improve controller's performance, and also to increase operating time. Conclusion This work presented an advanced control algorithm to support operators in the gas-lift optimization process. This system was implemented in two different assets from Campos Basin. The system was designed for platform with satellite oil wells, and was installed on a computer in the automation system to be accessed by operators through DCS's interface. The preliminary results obtained with the use of this advanced control are promising, showing in an average increase of about 1% of potential of each well, therefore helping to increase the total oil flow rate produced by the platform. Offshore platforms are becoming more complex and require advanced tools to support the operators and engineers to increase oil production. In this sense, there are good perspectives in using intelligent advanced control system for production optimization of offshore platforms in order to increase profitability and operational efficiency. Acknowledgements We would like to thank all technicians and engineers from Petrobras, Trisolutions, PUC-RIO (Tecgraf), UFSC (Federal University of Santa Catarina), UFRJ (Federal University of Rio de Janeirol) and UFRGS (Federal University of Rio Grande do Sul) involved in development and implementation presented in the paper, as well as their help and contribution. References American Petroleum Institute – API (2000), "Guide to Advanced Control Systems", API Recommended Practice 557, First edition. Bequette, B. W, (2007). Non-linear Model Predictive Control: A Personal Retrospective, The Canadian Journal of Chemical Engineering, Vol. 85, pp. 408-415. Bieker, H.P., Slupphaug, O. and Johansen, T.A., (2006). Real Time Production Optimization of Offshore Oil and Gas Production Systems: A Technology Survey, SPE 99446, 2006 SPE Intelligent Energy Conference and Exhibition held in Amsterdam, The Netherlands, 11–13 April. Camacho and Bordons, (1998). Model Predictive Control, Ed. Springer-Verlag, NY. Campos, M.C.M.M., Teixeira, H.C.G., Liporace, F. and Gomes, M.V., (2009). Challenges and problems with advanced control and optimisation technologies, International Symposium on Advanced Control of Chemical Process – ADCHEM-2009, Turkey, Julho 12-15. Campos, M.C.M.M. and Teixeira, A.F., (2011). Os Benefícios e Desafios da Aplicação de Técnicas de Controle Avançado e Otimização em Tempo Real em Unidades Marítimas de Produção, (in portuguese), Instituto Brasileiro de Petróleo, Gás e Biocombustíveis – IBP, VI Congresso Rio Automação, 16 e 17 de maio de 2011, Rio de Janeiro. Dalsmo, M., Halvorsen, E. and Slupphuag, O., (2002). Active Feedback Control of Unstable Wells at Brage Field, SPE 2002 SPE77650. Eikrem, G., (2006). Stabilization of Gas-Lift Wells by Feedback Control, Department of Engineering Cybernetics, Norwegian University of Science and Technology, PhD Thesis, NTNU. Godhavn et al., (2005). New Slug Control Strategies, Tuning Rules and Experimental Results, Journal of Process Control 15, pp 547-557. Hu, B., (2004). Characterizing gás-lift instabilities, Department of Petroleum Engineering and Applied Geophysics, Norwegian University of Science and Technology, PhD Thesis, NTNU. Imsland et al., (2010). Model-based optimizing control and estimation using Modelica models, Modeling, Identification and Control, Vol. 31, No. 3, 2010, pp. 107 – 121 Kaasa et al., (2007). Nonlinear Model-Based Control of Unstable Wells, Modeling, Identification and Control, Vol. 28, No. 3, 2007, pp. 69–79. 10 OTC-28108-MS Olsen, H., (2006). Anti-Slug Control and Topside Measurements for Pipeline-Riser Systems, PhD Thesis, NTNU. Plucenio, A., Pagano, D., Camponogara, E., Traple, A. and Teixeira, A., (2009). Gas-lift Optimization and Control with Nonlinear MPC, International Symposium on Advanced Control of Chemical Process, Turkey, July 12-15, ADCHEM. Plucenio, A., Ganzaroli, C. and Pagano, D., (2012). Stabilizing gas-lift well dynamics with free operating point. IFAC Workshop - Automatic Control in Offshore Oil and Gas Production, Trondheim, May 31. Qin, S. e Badgwell, T., (2003). A survey of industrial model predictive control technology, Control Engineering Practice 11, 733-764. Ribeiro, C., (2012). Controle Preditivo Multivariável em Plataformas para Produção de Petróleo com Restrição de Qualidade, M.Sc. Thesis, Federal University of Rio de Janeiro, COPPE/UFRJ. Satuf, E., Pinto, S. e Quaresma, B., (2009). Sistema automático de alinhamento para a Plataforma de rebombeio autônomo PRA-1, (in portuguese), Brazil Automation ISA 2009, São Paulo, 10 a 12 de Novembro. Sinegre, L., (2006). Dynamic study of unstable phenomena stepping in gas-lift activated wells, These Docteur de l’Ecole des Mines de Paris. Stasiak, M., Pagano, D. and Plucenio, A.,(2012). A New Discrete Slug-Flow Controller for Production Pipeline Risers, IFAC Workshop - Automatic Control in Offshore Oil and Gas Production, Trondheim, May 31, 2012. Storkaas, E., and Skogestad, S., (2003). Cascade control of unstable systems with application to stabilization of slug flow. International Symposium on Advanced Control of Chemical Process, AdChem’03 Hong Kong. Teixeira, A.F., Campos, M.C.M.M., Barreto, F.P., Rosa, V.R., Arraes, F.F. and Stender, A.S., (2013). Model Based Production Optimization Applied to Offshore Fields, OTC Brazil 2013, Offshore Technology Conference, Rio de Janeiro, Brazil.