“All optimization and calculation steps in our in-house software are performed using MATLAB and Optimization Toolbox. Not only do these tools provide a more efficient way for teams to manage assets, but more importantly, they also save costs.”
- Peerapong Ekkawong, PTTEP
Many gas fields in Southeast Asia are characterized by relatively small, highly compartmentalized gas accumulations distributed across a wide geographic area. Companies operating in these fields typically manage hundreds of wells in addition to multibranched field networks. The operational complexity of these fields makes it difficult to optimize current production and estimate future production.
Engineers at PTT Exploration and Production (PTTEP)
used MATLAB® and Optimization Toolbox™ to develop software that maximizes gas field production and generates accurate medium-term and long-term production forecasts while accounting for strict operational constraints.
“Neither manual calculations nor commercially available software applications provided a practical solution to the optimization challenge we faced,” says Peerapong Ekkawong, petroleum engineer at PTTEP. “Building our own solution in-house with MATLAB and Optimization Toolbox enabled us to increase production by thousands of barrels per day while saving hundreds of thousands of dollars in software costs.”
PTTEP identified three core business processes that it needed to improve: snapshot optimization, medium-term forecasting, and long-term forecasting. In snapshot optimization, the objective is to maximize gas production for a field while operating within various constraints, including flow rate limits for individual pipelines, mercury levels in condensate, and CO2 limits for gas streams. For medium-term and long-term forecasting, the goal is to evaluate expected gas delivery from a field for the next 6–12 months and for the field’s expected useful life, respectively.
In the past, PTTEP engineers relied on a trial-and-error optimization process based on spreadsheets. The results produced were never fully optimized, and tended to be subjective—that is, highly dependent on the engineer performing the task. Because of the large number of wells involved, using commercially available software for optimization and forecasting proved both tedious and time-consuming. PTTEP wanted to develop its own software in-house.
PTTEP developed LINOPT, an application in which all optimizations and calculations are performed using MATLAB and Optimization Toolbox. Working in MATLAB, the team defined a system of linear equations and inequalities to represent the production network. These constraints incorporated variables, such as the gas rate of each well, and set limits such as CO2 and flow rates.
Using Optimization Toolbox, the team applied a variety of optimization techniques, including mixed-integer linear programming algorithms, to maximize the objective function, which in most cases was defined to achieve the greatest possible overall field production.
To account for the time-dependent aspect of each well’s production falloff, the team added a time-series forecast model derived from historical production data to the system of linear equations.
To use LINOPT, engineers set the limits (bounds) on the variable values. Once the MATLAB optimization is complete, results are stored in Microsoft® Excel® for the engineers to review. PTTEP is currently in the process of deploying the results on Google Cloud.
PTTEP engineers have already used LINOPT software to optimize production in several regions, including the Arthit field in the Gulf of Thailand and the Zawtika field off the coast of Myanmar.
Production increased by thousands of barrels per day. “We compared production targets generated with our conventional approach over a six-month period with the production potential generated by our MATLAB optimization in LINOPT,” says Ekkawong. “At times, the difference between the two exceeded thousands of barrels per day. These results were confirmed when we applied the optimizations in the field.”
Expenses for specialized software eliminated. “In the past we used commercially available material balance software and other packages for optimization and forecasting,” says Ekkawong. “By developing our own solution in-house with MATLAB, we eliminated annual license costs.”
Hundreds of engineer-hours saved every week. “We compared the time required for optimization and forecasting using our MATLAB based LINOPT software with the time required using our previous approach,” says Ekkawong. “The time reduction amounted to hundreds of FTE engineer-hours per week.”