Mathematical Problems in Engineering

Volume 2018, Article ID 1040476, 13 pages

https://doi.org/10.1155/2018/1040476

## A Numerical Computation Approach for the Optimal Control of ASP Flooding Based on Adaptive Strategies

^{1}Automation School, Beijing University of Posts and Telecommunications, Beijing 100876, China^{2}College of Information and Control Engineering, China University of Petroleum (East China), Qingdao 266580, China

Correspondence should be addressed to Shurong Li; nc.ude.tpub@gnoruhsil

Received 12 December 2017; Revised 28 April 2018; Accepted 3 May 2018; Published 31 May 2018

Academic Editor: Łukasz Jankowski

Copyright © 2018 Shurong Li and Yulei Ge. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

A numerical computation approach based on constraint aggregation and pseudospectral method is proposed to solve the optimal control of alkali/surfactant/polymer (ASP) flooding. At first, all path constraints are aggregated into one terminal condition by applying a Kreisselmeier-Steinhauser (KS) function. After being transformed into a multistage problem by control vector parameter, a normalized time variable is introduced to convert the original problem into a fixed final time optimal control problem. Then the problem is discretized to nonlinear programming by using Legendre-Gauss pseudospectral method, whose numerical solutions can be obtained by sequential quadratic programming (SQP) method through solving the KKT optimality conditions. Additionally, two adaptive strategies are applied to improve the procedure: the adaptive constraint aggregation is used to regulate the parameter *ρ* in KS function and the adaptive Legendre-Gauss (LG) method is used to adjust the number of subinterval divisions and LG points. Finally, the optimal control of ASP flooding is solved by the proposed method. Simulation results show the feasibility and effectiveness of the proposed method.

#### 1. Introduction

With the exploitation of oil, most oil fields of China have stepped into the high water cut period [1]. The production of oil cannot satisfy our demands for daily life and economic development. A series of tertiary oil recovery technologies such as chemical flooding [2], microorganism flooding [3], and carbon dioxide flooding [4] are put to use. The newly emerging alkali/surfactant/polymer (ASP) flooding which is an important tertiary oil recovery technology can enhance oil production obviously. The basic idea is to utilize three displacing agents (alkali, surfactant, and polymer), whose synergistic effects are important to enhanced oil recovery, to change the physicochemical property [5]. Since the price of displacing agents is high, how to determine the injection strategy to maximize the profit as much as possible is always a challenging problem.

The essence of determining the injection strategy for ASP flooding is an optimal control problem. In current industrial application, the index comparison method is usually adopted to select the injection strategy, in which the best one is chosen among many given feasible strategies by simulating on the numerical simulation software according to a defined index [6, 7]. This method is simple and easy to be operated, but it is too dependent on the experience of manipulators. The optimization result is not the optimum. The optimal control technology, which is first used in oil exploitation in [8], works on searching for the optimal control strategy from all feasible solutions with considering the process dynamic characteristics, and it can realize the simultaneous optimization of all variables. In addition, the whole theory is proved by mathematical method; it is scientific and reasonable. Therefore, it is suitable for the control of ASP flooding.

Some scholars have studied the optimal control for oil exploitation. Jansen et al. [9] studied the problems of optimal control and nonlinear model predictive control for water flooding, in which the control variables are bottom hole pressure and flooding rate, and the index is the maximum of net present value (NPV). Lei et al. [10] presented mixed-integer iterative dynamic programming (IDP) to optimize the polymer flooding and got good result. Ramirez et al. [11, 12] optimized the injection strategy for enhanced oil recovery of surfactant flooding with optimal control theory, in which the necessary condition of optimal control was deduced on the basis of maximum principle before being solved by gradient method. Furthermore, this method was applied to carbon dioxide flooding, nitrogen flooding, and binary system flooding [13]. Zerpa et al. [14] used field scale numerical simulation and multiple surrogates to optimize alkaline–surfactant–polymer flooding process based on UTCHEM. Ge et al. [15] developed an approximate dynamic programming method to solve the optimization of ASP flooding, in which an Actor-Critic algorithm is introduced to search the optimal injection strategy. Most of the researches are about water flooding and single chemical flooding. The optimal control for ASP flooding needs to be further studied urgently.

With regard to the research on optimal control methods, although extensive research on optimal control has been conducted, large-scale nonlinear dynamic models processing and efficient solution methods for optimal control problems are still two main barriers for the widespread industrial application of optimal control [16, 17]. Numerical methods for optimal control can be divided into two classes, which are direct methods and indirect ones. Direct methods, which include the control vector parameterization (CVP) [18], the direct multiple shooting [19], and the full discretization [20], are closely related to the discretization of the original control problem and the application of nonlinear programming technique. These methods are very popular and well suited for many practical problems [21]. What differs in these methods is how to select the kind of variables to be discretized and how to approximate the system equations. However, direct methods may bring about unsatisfactory results especially when the control variables are discontinuous, such as with switching points and singular arcs [22]. For these reasons, the reasonable discretization methods for variables and approximation methods for system equations are quite important.

As to the discretization, if the discretization grid is too coarse, this will lead to some local controls being not in the right place and the accuracy cannot meet the prespecified requirements. What is more, if the discretization grid is too fine, the computational cost will be very high and the robustness will be poor. Generally speaking, the discretization grid is determined by visually examining the obtained result which is balanced between efficiency and precision. For example, an adaptive CVP method was proposed in [23], in which the problem was discretized adaptively over time spans. The discretization was sequentially refined based on a wavelet-based analysis of the optimal solution which was obtained in the previous optimization step. Thus, the efficiency is enhanced with less loss of accuracy.

As to the approximation methods for system equations, pseudospectral method, which is a major kind of direct method, has been widely used in recent years [24]. In this method, states and controls are approximated by a series of orthogonal basis functions, such as Lagrange, Laguerre, and Legendre polynomials. Some famous pseudospectral methods have been developed in the past decades, for example, the Gauss pseudospectral method (GPM) [25], the Lobatto pseudospectral method (LPM) [26], and the Radau pseudospectral method (RPM) [27]. The most obvious difference between them is the selection of interpolation point. For smooth optimal control problems, these methods can obtain good accuracy and performance compared with traditional direct methods. But when the control is discontinuous, for example, the three-slug injection strategy of ASP flooding, there may be some problems especially in the discontinuous points. So, many adaptive methods are proposed to cope with the interpolation points and subintervals. Darby et al. [28] developed an adaptive method, in which the difference between a Legendre-Gauss-Radau approximation to the integral of the dynamics and an interpolated value of state was used to estimate the approximation error. According to this error, the interpolation points were selected under a given accuracy requirement.

Constraint handling is an important step for a control problem before being optimized. In general, the constraints are disposed by penalty function method, in which a penalty factor is introduced to convert the original problem into an unconstrained optimization problem [29]. But there is no definite theory to determine the penalty factor, which is usually obtained by experience. If the value of the factor is not chosen scientifically, this will lead to adverse impact on the optimization. In [30], the constraint aggregation method, which was expressed as the Kreisselmeier-Steinhauser (KS) function, was first proposed to transform the path constraints into a terminal condition. To regulate the parameter , an adaptive constraint aggregation method was presented by Zhang et al. [31], in which the value of was changed according to the partial differential automatically.

Many researches about the optimization algorithms have been studied. Fonseca proposed a stochastic simplex approximate gradient (StoSAG) for optimization under uncertainty, in which the gradient is estimated approximately by an ensemble of randomly chosen control vectors, known as Ensemble Optimization (EnOpt) in the oil and gas reservoir simulation community [32]. Chen and Reynolds studied the optimal control of inflow control valves and well operating conditions for the water-alternating-gas injection process [33]. Shirangi et al. developed a new methodology for the joint optimization of economic project life and time-varying well controls [34]. Sequential quadratic programming (SQP) is an effective method to solve constrained optimization problems, which has good global convergence and more than one order of local convergence and does not need to construct the penalty function factor when dealing with constraints [35]. It is suitable for the optimal control of ASP flooding. In [36], an approximate feasible direction method was put forward in which the constraint aggregation was adopted to transform all path constraints into a generalized constraint. Then SQP was applied to solve this optimal control problem. Bernardo et al. [37] presented a slug optimization method for water flooding in which the Kriging interpolation was utilized to build the model between variables and index before being optimized by SQP.

To solve the optimal control for alkali/surfactant/polymer (ASP) flooding which has discontinuous control variables, a methodology based on constraint aggregation and pseudospectral method with adaptive strategies is proposed in this paper. The rest of this article is outlined as follows. In Section 2, the specific model of ASP flooding is given and the optimal control for ASP flooding is converted into a more general problem in mathematical form. Section 3 introduces the details of the proposed methodology in this paper, such as processing the path constraints with constraints aggregation method, converting original problem into a multistage problem with CVP, introducing the new time variable, and discretizing the control problem with LG pseudospectral method. The KKT optimality condition of this optimal control problem is provided in Section 3.4. In Section 4, the adaptive strategies for the constraints aggregation and LG pseudospectral method are presented to regulate the control method. Then SQP is introduced to solve the problem. Section 5 applies the method proposed in this paper to solve the optimal control problem for ASP flooding and Section 6 contains some discussion and concluding remarks. Finally, some essential information for ASP flooding is given in the Appendix.

#### 2. Problem Formulations

As to the optimal control problem for ASP flooding, the control variables are the injection concentrations of three displacing agents (alkali, surfactant, and polymer) at all injection wells; the states cover pressure, grid concentration, and water saturation; and the performance index is the maximal NPV. This is a complex distributed parameter control problem aiming at getting the optimal injection strategy to fulfill the maximal profit. Since the three-dimensional model for ASP flooding, which includes a series of divergences and cross terms, is too complex, we only consider the one-dimensional model in this paper. In this section, we will obtain the optimal injection strategy with the method proposed in this paper.

##### 2.1. Optimal Control Model Description for One-Dimensional ASP Flooding

In view of [5, 6, 38–40], we can make the following descriptions.

Considering a long tube core with diameter and length , inject the displacing agents liquid with flow from one side at a constant speed; the core porosity is and the residual oil saturation is . On the basis of the model assumptions in [39], we add the following assumptions:(a)All adsorption processes satisfy Langmuir isothermal adsorption equation.(b)The displacing agents exist in water phase, the adsorption satisfies the generalized FICK law, and the balance is established momentarily.

On the basis of the oil/water seepage continuity equations and adsorption diffusion equations of displacing agents, combining mass balance conditions, we can obtain the following model with interaction of alkali, surfactant, and polymer fully considered.

The seepage continuity equation is

The adsorption diffusion equation of surfactant is

The adsorption diffusion equation of polymer is

The adsorption diffusion equation of alkali iswhere denotes the alkali, denotes the surfactant, denotes the polymer, is the water saturation, is the core cross section area, is the moisture content, denotes the seepage speed of water phase, and and denote the concentration and diffusion coefficient of alkali, surfactant, and polymer, respectively. denotes the core density, are the adsorbing capacity of core for different displacing agents, and is the alkali consumption.

The initial conditions are

The boundary conditions arewhere denotes the injection concentration of displacing agents, which is the control variable.

In application, the slug injection strategy is usually adopted. Suppose that there are slugs,where denotes the time node, the length of every slug is , and denotes the injection concentration of displacing agent in slug .

Furthermore, the dosage limit of displacing agents is where denotes the maximum usage of displacing agents .

The injection concentration and slug size limitations are

The other physicochemical algebraic equations can be found in the Appendix.

The maximum net present value (NPV) is chosen as the index; the specific description iswhere denotes the discount rate, and denote the volume flow rate of injection and production, and denotes the price of three displacing agents.

##### 2.2. Model Transformation

To make the problem more concise, we use () to denote all states and (the injection concentration of all displacing agents ) to denote all control variables. Since the ASP flooding model contains many partial differentials with respect to time variable and spatial variable, it is difficult to solve with conventional methods. For simplicity, the finite difference method is used to discretize the spatial grid [6]. Thus there is only the differential with respect to the time variable. Then the optimization for ASP flooding can be reformulated as in the following continuous Bolza problem [41]:where denotes the state variables including water saturation, pressure, and grid concentration. The initial state is . is the control variable including the injection concentration of displacing agents (alkali, surfactant, and polymer). The system process is described by function . The path constraints and terminal constraints are expressed as and , respectively. The whole process is optimized on the time interval . The interval of control is associated with the lower bound and upper bound, which can be reformulated to two path constraints, and . The equality constraints can be converted into the inequality constraints by introducing the relaxing factors. For example, an equation can be expressed as , in which denotes the relaxing factor.

Then we take a series of measures to process this problem. The details will be presented in the following contents.

#### 3. The Numerical Computation Approach Based on Constraint Aggregation and Pseudospectral Discretization

In this section, all path constraints are transformed into one terminal constraint by the constraints aggregation method. Furthermore, CVP is introduced to convert the original problem into a multistage problem (MSP) to cope with the situation of discontinuous control variables after the new time variable is brought in. Finally, to solve the optimal control problem, LG pseudospectral method is adopted to transform the MSP into a general discrete nonlinear programming problem (NLP) [42].

##### 3.1. Constraint Aggregation

The main idea of constraints aggregation is the KS function, which was developed by Kreisselmeier and Steinhauser in 1976 [30]. The mathematical form iswhere denotes the number of path constraints . is an approximation parameter.

KS function can generate one envelope surface which is -consecutive. This can estimate the maximal function of conservatively. The properties are as follows [43].(a)For an arbitrary , there exist the following formulas:(b)If , then (c) is a convex function, if and only if it is convex for all constraints .

From the above properties, KS function is the underestimation for feasible region. The bigger the value of is, the more accurate the estimation for the maximal constraint is. This can be obviously shown in Figure 1. What is more, if the original problem is convex, the problem after being processed by KS function is convex too.