Processing curves pressure changes on the results of well test based on fuzzy regression trees

The problems arising in the use of finite-difference approximation in a situation when an analytical solution is very difficult or impossible to obtain are investigated. This paper describes the generation of fuzzy inference system based on the CART (classification and regression tree) method. The resulting fuzzy system was used to determine the parameters of the oil reservoir to the well test after tuning parameter. Computational experiments are used to demonstrate the applicability of the fuzzy system for non-linear regression analysis.


Introduction
Mathematical models of the reservoir-reservoir are created by solving the diffusion equation under various boundary conditions.Models are defined by three different components that characterize the formation, the well and its vicinity (internal boundary conditions) and the outer boundaries of the formation (external boundary conditions).In the general case, the change in pressure is first due to the influence of internal boundaries, then at intermediate times the pressure change corresponds to the basic behavior of the productive formation, and finally, after a sufficiently long time, the pressure change is determined mainly by external boundary conditions.
The general equation of fluid filtration in an oil reservoir is described by the following diffusion equation [1]: where is the pressure; -distance along the radius from the wellbore; -time; -porosity; -viscosity; -the total compressibility of the system; -absolute permeability.
To obtain analytical solutions of the diffusion Eq. ( 1), the Laplace integral transformation is applied, which leads to a smoothing of the errors of the experimental functions.In addition, based on the exact solution in images, it is possible to obtain asymptotic solutions for → ∞ and → 0 in the time domain and to use them effectively in solving inverse problems [4].
One way or another, the application of the Laplace transform is limited to those cases when the solution of the differential equation can be obtained analytically.However, this is not always the case.Therefore, if an exact solution cannot be obtained, it is possible to replace the differential equation by its finite-difference analogue [4,5].The definition of the parameters of linear and nonlinear differential equations refers to the construction of the so-called "gray box" model.The model is called so, since its mathematical structure is given in explicit form.The relationships between all parameters and variables of the model are known.The gray box model is convenient for using various methods of system identification.

Computational example
Let us consider an example of a simple model of heat propagation in an isolated metal rod of length [3].One end of the rod is heated with thermal power , at the other end a temperature measurement is performed .Under ideal conditions, this system is described by the equation of thermal conductivity (diffusion): where is the coefficient of thermal conductivity; , -rod temperature at point at the time .To obtain a time-continuous model in the state space, the second derivative on the right-hand side of Eq. ( 2) is replaced by a finite-difference approximation: where = Δ ; = 1,2, … , ; = Δ ⁄ .Such a transformation leads to a system with a finite set of states , Δ , Each of which represents a certain average temperature of the rod in the range Δ ≤ < + 1 Δ .In other words, the order of the system depends on the size Δ of the spatial grid.
As a result, the diffusion Eq. ( 1) can be represented as a time-continuous linear system in the state space: where is the state vector; -input vector; -vector of noises; -system reaction vector; -vector of initial states of the system.For our problem: Furthermore, having sufficient observations can use any suitable method for identification systems (e.g., a method of minimizing the prediction error (PEM), which is largely based on an autoregressive moving average model, taking into account external influences (ARMAX) for estimating parameter .

The derivation of the scheme
Despite the great flexibility of the described method of replacing a differential equation by a finite-difference one, it has a number of serious drawbacks.This approach should be applied with great caution, since finite-difference approximation is equivalent to direct differentiation of experimental functions and is fraught with large errors [4,5].In addition, there is, for example, a reservoir model with a non-conductive discharge, which, in fact, is two-dimensional.If we use the Laplace transform, then for this model there is an analytical expression for changing the pressure in the well.However, the use of a numerical solution of this problem for obtaining system Eq.( 4) may require an excessive number of state variables.Also, it may be noted that there are certain difficulties in creating a model of the form Eg. ( 4) for processing well test data obtained pressure recovery method.The problem is related to the dependence of the vector of initial conditions on the parameters of the formation.
In addition to the difficulties mentioned above, when working with finite differences, there is perhaps the main obstacle to the wider application of models of the type Eq. ( 4).For each new set of observations, the corresponding differential equation must be solved each time, which is associated with a large computational cost.It would be more convenient to have in advance a set of numerical solutions that would approximate the complex functional relationship between the independent variables (in this case the flow rate of the well), the parameters (in this case the formation) and the dependent variables (in this case the well pressure).For such purposes, socalled soft computing methods are widely used: neural networks and fuzzy logic inference systems [2].As shown by a number of studies [1], the latter are usually preferable.The reasons are more simple adjustment of fuzzy systems, as well as a more understandable internal structure and logic of the operation of such systems, based on rules.
Modern systems of fuzzy inference are based on the application of a particular method of structural optimization to determine the structure of its rules base [8].To solve the problems of non-linear regression, the classification and regression tree (CART) trees, which are special cases of decision trees, have gained particular popularity.With minor changes, CART can be used to identify the structure of the fuzzy rules base.Consider the basic steps necessary to generate a fuzzy logic inference system based on CART as applied to the analysis of well data.
The well test method of pressure recovery was formed on the basis of the analytical model: where -dimensionless pressure change in well test method of pressure recovery; dimensionless pressure change during well testing by lowering the level; -dimensionless time change; -dimensionless time during which production was carried out prior to the closure of the well.
Information on the reservoir and the fluid that saturates it is taken from Table .1.The total number of points over a period of 0.01 to 100 hours was 51.In general, = 50 random pressure curves were generated.Half of them were used as a training sample, the other half as a test sample.In this case, the areas of changes in the parameters , and were, respectively 0,01; 0,1 µm 2 , 0; 10 and 0,01; 0,1 m 3 /MPa.The total volume of observation points = = 2550.In view of the wide variation in the values of time and the change in pressure, instead of real values and Δ during training, we used, respectively log and log Δ .This has positively affected the entire learning process, so it is known that correct scaling of dependent and independent variables can significantly improve the conditionality of the problem [7].In accordance with the CART algorithm, a regression tree was constructed to predict the response Δ as a function of the predictors , , and .In the work, the fuzzy system performed a logical conclusion by Sugeno (in particular, the fuzzy first-order Sugeno model is used), since this simplifies the further parametric adjustment of the system [10,12].
Since the regression tree is a particular case of a decision tree, it can be represented as a set of clear rules.Denote the set of independent variables and parameters at the input of the tree as | = 1, and the dependent variable at the output of the tree as .Any rule consists of a premise and a corollary.The premise in this case is the result of a comparison with a certain threshold value in the -th node of the tree ( = 1, ).Let ∈ 1, be the index of the input variable, by which the comparison takes place in the -th node of the tree.Each tree node, except terminal nodes (leaves), has two descendants: left and right.If the result < is true, further comparisons are made in the left child node.If the result ≥ is true, further comparisons are performed in the right child node.In the future, without specifying the type of relationship, we will write down simply ∘ .Then any rule can be represented in the following general form: where ∈ 1, -the index of the node, only through which it is possible to get into the -th sheet.
In order to make the clear rule Eq. ( 6) unclear, it is necessary to fuzzy the premises and the consequence of the rule.In the premise ∘ is replaced by the operation of belonging to a fuzzy set , i.e. ∈ .This is equivalent to calculating the membership function , in which the sigmoid function was chosen: where usually = ; is configured by the user or calculated automatically.Moreover, the sign determines the type of fuzzy relation.
During the construction of the tree, a training sample was used, which can be represented as an ordered set of observations = , , … , , , = 1, .When a tree is traversed, each q-th node, including the terminal one, can be assigned a subset ⊂ as a result of the decomposition ⊆ for -th node, who is the parent of the -th node.The breakdown is carried out in accordance with ∘ .In this case, the equalities ̅ = ∑ , and = ∑ .
Let us calculate the following mean square error: As a result, the parameter in Eq. ( 7) can be associated with the following way: where erf -error function; > 0. The choice of Eq. ( 9) ensures equality of the areas under sig ; , and the Laplace function Φ ; , in the interval − ; . Experiments have shown that the choice = 1 is quite satisfactory.A consequence in the fuzzy Sugeno rule is presented in the following form [10,12]: Let us denote = , the matrix of observations of input variables that fall into the -th sheet, and = is the vector of observations of the output variable in the same sheet.Then, to find the vector of unknown parameters = , , = 0, we need to solve the following normal equations: where = | -supplemented by units to the right of the matrix of input observations.The solution Eq. ( 11) can be carried out by any suitable factorization method of the matrix .If turns out to be degenerate, then we can use the Sugeno model of zero order:

Results and discussions
After the structure of the fuzzy system has been determined, its parametric adjustment (optimization) [6,9] is required, at which both the rule conclusions and the membership functions of the terms of the input variables are adjusted at the same time.The hybrid optimization method ANFIS [8,11] (adaptive neural-fuzzy inference system), in which the linear parameters are tuned for the Kalman filter, and the non-linear parameters by the gradient method of back propagation of the error, proved particularly successful.However, in principle, all parameters can be adjusted only by the gradient method, that is, like the neural network training algorithms.Fuzzy CART 0,0492±0,0150 % 4,9307±0,3096 0,0506±0,0064 % 23,71×10 -4   In the study, the tuning was performed on the basis of ANFIS using the same training sample as in the construction of CART.To avoid retraining the fuzzy system, a test sample was tested at this stage.In Fig. 1 shows the graphs of mean-square errors obtained from the training and test samples.A square is marked by a fuzzy system having a minimum error on the test set.In Fig. 2 a cross-raft is constructed, where the normalized values produced by the fuzzy system are located along the abscissa axis and the normalized values from the test sample along the ordinate.
To simulate the random error, normally distributed, the data well testing used a random number generator with zero expectation and variance 10-4 МPа 2 .The true values of the parameters were = 0,05 mkm 2 , = 5, = 0,05 m 3 /MPа.The results of parameter estimates using the analytical model and fuzzy CART are given in Table 2.The curves of the change in pressure and its derivative obtained by both methods are shown in Fig. 3.

Conclusions
Based on the studies carried out, the following conclusions can be drawn.Fuzzy systems, whose structure of rules base are formed on the basis of CART, are really capable of approximating complex nonlinear dependencies between independent variables, parameters and dependent variables.Such systems can be successfully used to perform nonlinear regression analysis.However, they should not expect high accuracy, the resulting estimates, as in the case of analytical or numerical models.The main application of fuzzy inference systems is seen in distinguishing between candidate models.

Fig. 3 .
Fig. 3. Dynamics of pressure and its derivative

Table 1 .
Information on the formation and the fluid that saturates it

Table 2 .
Estimates of parameters and variances