Orestes MayoCipro, Instituto Superior Politécnico "José A. Echevarría"

Havana, Cuba

Felix Blanco, Javier AlvaradoMaraven, Petróleos de Venezuela S.A.

Maracaibo, Venezuela

A calculation procedure optimized lift-gas allocation to 41 oil wells in the Barúa-Motatán oil field in Venezuela.

The objective was to attain the most crude production with the limited gas available.

The procedure uses Lagrange multipliers to obtain an analytic expression of the optimum gas injection for each well. Unlike some numerical nonlinear programming methods, this procedure does not require an initial estimate of the allocation.

The procedure provides better results compared to the common approach of shutting in less-productive wells.

### Gas lift

Gas lift is one of the artificial lift methods used for producing crude. In this process, compressed natural gas is injected in a well to decrease the specific gravity of the crude, water, and gas mixture so that the producing capacity of the well increases.Determination of lift-gas flow rates is a dynamic and interactive process that depends on the availability of high-pressure gas from compressors. In fields where the injection lines connecting the compressors to the gas manifold are short, a fast reaction to process variations is required to limit crude production decreases.

An automated procedure is necessary because manual operations prevent instantaneous response to variations.

A response cannot be done independently to each well at the flow-control valve, because all wells are connected to a gas manifold that depends on a common gas supply. Therefore, to estimate the best gas allocation that retains the best productivity, one needs gas flow-rate information in a central control center.

In the Venezuela field, manual setting of gas flow rates was carried out at the regulating gas valve in the gas manifold. But the process became extremely vulnerable to variations caused by problems in the compressor plant, feed lines, or in other wells connected to that manifold.

The calculation procedure for gas injection-flow rates was developed within the framework of the project "automatizaci?n del campo Barúa-Motatán," with the purpose of gaining control and dependability that would result in greater crude production and reduced operating costs.

### Background

A number of papers have contributed to the study of optimized lift-gas allocation: Mayhill defined the most-efficient injection gas flow rate as that in which an increase in the expenses due to gas injection equals the benefits produced.^{1}

Radden, et al., presented an iterative procedure to find the optimum gas allocation based on the economic contribution of each well to the system's economic benefit. Their paper described a computer program used in a 1,500 well Venezuelan oil field.^{2}

G?mez proposed a procedure for generating the behavior curves of wells by fitting a second-degree polynomial, such as shown in Fig. 1 [34,295 bytes]. This polynomial then is used to determine the optimum gas distribution by seeking the wells that produce the highest increment of production due to an increment of the gas injection.^{3}

Kanu, et al., established a distribution method of equal slope and introduced the "economical slope" and its application for optimizing a group of wells.^{4}

Nishikiori mathematically formulated the optimization of crude production from a group of wells injected with gas and solved it with a numeric method of nonlinear programming.^{5}

### Operating procedures

At the end of 1995, only 5 wells in the Barúa-Motatán field were operated by means of remote terminal units (RTU) installed in the Motatán II manifold and controlled by operators at the control room in Lagunillas. By the end of 1996, all 34 wells on gas lift were totally controlled from the control room.Previously, gas flow allocation to the wells was based on reducing the supply to less-productive wells and operating the best wells at their maximum production rate.

Because of this policy, some of the less-productive wells were shut in by means of the RTU. This policy allows a fast decision to be taken as events influence gas availability.

After all the wells were automated, it became possible to apply the calculation procedure discussed in this article for optimizing lift-gas allocation.

### Operating policy

Fig. 1 represents crude production vs. lift-gas injection for a typical well.It can be observed that for low gas-injection rates, crude production rate increases more than at higher rates. For example, the slope decreases until the point of maximum production is reached. At this point the slope is zero.

The part of the curve right of the point of maximum production is not of interest, because the same production can be obtained with less gas injection by operating on the left side of the curve. Therefore, a decrease in gas injection on the right side of the curve has a lower effect in production than a decrease on the left side.

According to this, the following statement could be valid: "In gas lift processes, an optimum crude production can be obtained by increasing the gas flow rate to wells operating on the left side of the curve and decreasing gas flow rates of those operating on the right side."

On the other hand, it is logical that wells with high production should be given a priority in the gas allocation. To study these issues, an optimization procedure has been developed based on production curves and the method of Lagrange multipliers.

### Optimization problem

As stated by Gómez,^{3}the production behavior of a well with regards to the lift-gas flow rate can be modeled by a second-degree polynomial, Equation 1 (see equation box).

Although this model has been accepted by many, its validity could be questioned because of its simplicity.

Nevertheless, because this procedure is to be used in a centralized control system, the model coefficients can be updated by a simple regression procedure from data acquired from the wells that will be continuously monitored.

The objective function for maximizing total production of all the wells is shown in Equation 2, subject to the constraints of Equations 3 and 4.

Equation 4 indicates that all the gas injected should be equal to or less than the available gas flow rate. Equation 3 limits gas flow rates to positive values.

The problem established in this way conforms to a quadratic concave function limited by a convex set of linear constraints. Therefore, any solution that satisfies the Kuhn-Tucker^{4} conditions is guaranteed to be a global optimal solution.^{6}

### Lagrange multipliers

The allocation problem can be solved by means of the method of Lagrange multipliers, following the steps given by Edgar and Himmelblau,^{7}as shown by Equations 5-8.

These alternatives are established according to all the possible combinations of values of LAMBDA_{i}, LAMBDA_{n+1}, and g_{i}, summarized in the following three cases.

### Case 1

With an unlimited gas supply, Equations 9 and 10 apply. Therefore, all multipliers are equal to zero, and the solution to the system of equations, as represented in Equation 6, is Equation 11.This solution recommends that each well be operated at its maximum production point. Equation 12 is for the case when there is a gas surplus that is not injected into the wells but is used for other purposes.

### Case 2

In the case that gas availability is limited and all the gas injection flow rates are positive, g_{i}0, Equation 13 applies. Therefore, all multipliers are equal to zero, except LAMBDA

_{n+1}, and the solution of Equations 6 and 13 is given by Equations 14a or 14b.

The value of multiplier LAMBDA_{n+1} can be found by adding all the gas flow rates in Equation 14b and substituting them in Equation 13, giving Equations 15a or 15b.

Given the hypothetical situation where all the coefficients c_{i} are equal, the optimum gas flow rates are given by Equations 16a or 16b.

This means that the optimum gas lift allocation in the presence of limited availability is obtained by equally sharing the deficit among all the wells.

If we define distribution factor as Equation 17, this represents the fraction of the deficit to be discounted to the well. Then Equation 14b can be written as Equations 18a or 18b.

The solution in this case will only be valid if, as a result of applying Equation 18, positive flow rate values are obtained.

When this is not the case, the solution is found by Case 3.

### Case 3

If the gas availability is limited and some gas flow rates are zero, the wells are divided into two sets, defined by Equations 19a and 19b. This is the more general case when, as a result of a higher deficit, Equation 18 yields negative unacceptable values for some wells with low gas requirements, gi^{MAX}.

Because it is only necessary to find those flow rates with positive values, LAMBDA_{i} is set to zero in Equation 6, and then Equation 14b is now given by Equation 20, where LAMBDA_{n+1} is now defined by Equations 21 and 22.

Equation 22 is the same as Equation 18, but in this case in the terms SIGMA gi^{MAX} and SIGMA1/c_{i}, the elements corresponding to zero gas flow rates are excluded. This is equivalent to eliminating wells from the problem.

As an example, a hypothetical case is shown in Fig. 2 [40,965 bytes] with only two wells.

According to the proposed procedure, Point a matches with Case 1, from Point a to Point c, both exclusive with Case 2, and from Point c to Point d with Case 3.

Point d corresponds with an extreme case of no gas availability and all the wells being shut in.

Fig. 2 shows the classic operating policy. Well 2 is being shut in (Line ab). At Point b, the well is shut in. From there on (Line bcd), Well 1 is being shut in.

The optimum policy, according to the proposed procedure, is shown by Line ac and Line cd.

### Calculation procedure

The procedure of calculation based on the method of Lagrange multipliers, as previously described, is summarized as:^{MAX}including all wells

^{MAX}<= Q

_{avail}then calculate gi

^{*}from Equation 11

^{*}from Equation 18

^{*}( 0 for any i E G

^{+}then gi

^{*}= 0 recalculate SIGMA gi

^{MAX}and SIGMA1/c

_{i}, go to 3

### Barúa-Motatán application^{8}

Each of the 41 wells was characterized by means of Equation 1 that defines its behavior. The previously described procedure was programmed in a Microsoft Excel macro and the solution found.Also, the solution by the Solver tool was found, from three different initial values of the gas flow, gi0.

The starting points were as follows:

- gi
^{0}= values of the classic policy. - gi
^{0}= 0 - gi
^{0}= gi^{MAX}

Table 1 [42,724 bytes] shows the results obtained for the four fields at a 73.7% gas availability level and are compared with the classical operating policy. The unlimited gas supply situation is provided for reference.

Following the classical policy of operation, the production decreases to 86.2%; however, the optimum solution obtained with the proposed procedure results in only a 94.8% decrease.

This implies an increment in production of about 4,500 bo/d.

Table 2 [41,193 bytes] shows the results obtained with Excel's Solver. The information from the previous iteration is used to obtain the next iteration, as in all iterative numerical methods of nonlinear programming.

In general, these methods can rapidly reach an optimum solution on problems with numerous variables and constraints.

Theoretically, for this kind of problem, Excel's Solver should obtain a near-optimum solution in a finite number of iterations. In all cases, better results were obtained when compared with the classical operating policy.

However, the influence of the initial variables' values can be observed and only in the third case are they similar to the one obtained with the procedure proposed in this work.

It is possible to obtain a solution closer to the optimum if even lower convergence criteria were used.

Finally, in Table 3 [28,002 bytes] a comparison of the proposed method and the classical policy is shown for different available gas values.

Note the differences in crude production among both policies and also that the proposed method keeps more wells active, which is recommended from the operational point of view.

Because of these results, as well as for other reasons, the automation of the gas lift manifolds at the Barúa-Motatán oil field was carried out.

The automation included:

- Installation of actuators at the gas-lift control valves
- Installation of remote terminal units (RTU) to control gas flow and pressure to every well
- Interconnection of the RTUs with the central control system, which already obtains information on gas availability and can include the proposed procedure to determine optimum injection gas flow rate set points to the RTUs at every well.

### References

- Mayhill T.D., "Simplified Method for Gas-Lift Well Problem Identification and Diagnosis," Paper No. SPE5151, SPE 49th Annual Conference and Exhibition, Houston, Oct. 6-9, 1974.
- Radden, J.D., Sherman, T., Blann, A.G., and Blann, J.R., "Optimizing Gas-Lift Systems," Paper No. SPE 5150, SPE 49th Annual Fall Meeting, Houston, Oct. 6-9, 1974.
- Gómez, V., "Optimization of Continuos Flow Gas-Lift Systems," M.S. Thesis, University of Tulsa, 1974.
- Kanu, E.P., Mach, J., and Brown, K.E., "Economic Approach to Oil Production and GAS Allocation in Continuos Gas-Lift," JPT, October 1981.
- Nishikiori, N., Redner R.A., Doty, D.R., and Schmidt, Z., "An Improved Method for Gas-Lift Allocation Optimization," Journal of Energy Resources Technology, Vol. 117, pp. 87-92, June 1995.
- Zangwill, W.I., Non Linear Programming, Prentice Hall, Englewoods, N.J., 1969.
- Edgar T.F., and Himmelblau, D.M., Optimization of Chemical Processes, McGraw Hill, N.Y., 1988.
- Blanco, F., M.S. thesis, UNEXPO Barquisimeto, Venezuela, 1996.

### The Authors

Orestes Mayois a professor on the chemical engineering faculty of the Instituto Superior Politécnico "José A. Echeverría," Havana, Cuba. He specializes in chemical process analysis, process control, and engineering economics.Mayo's expertise lies in the application of optimization methods. He has a BS in chemical engineering from the Universidad de La Havana, an MS from the University of British Columbia, and a PhD from the Instituto Superior Polit?cnico "José A. Echeverría." He is a member of the Cuban Chemical Society.

Javier Alvaradois a project engineer in the automation department of Maraven, Petróleos de Venezuela S.A., in Maracaibo, Venezuela. He specializes in distributed control systems. Alvarado has a BS in electrical engineering from Unexpo, in Venezuela, and an MS from the Universidad de los Andes, Venezuela. He is a member of the Instrument Society of America.

Felix Blancois a control room engineer at Maraven's Barúa-Motatán oil field, at Lagunillas, Venezuela. Blanco has a BS in systems engineering from the Universidad de los Andes, Venezuela, and an MS from UNEXPO, Venezuela. He is a member of the Instrument Society of America.

*Copyright 1999 Oil & Gas Journal. All Rights Reserved.*