DEVELOPMENT OF AN INTELLIGENT DECISION SUPPORT SYSTEM TO CONTROL THE PROCESS OF WELL DRILLING UNDER COMPLICATED CONDITIONS

6 ferences that are inaccessible for measurements. The use of the known methods based on deterministic models does not make it possible to monitor and control the process of oil and gas well drilling effectively enough to prevent complications. Some signs of complications coincide with the signs of other situations – changes in the boundaries of rocks layers, wear of equipment and chisels, shattering and collapse of rocks in a well, etc. The methods of the classical theory of control most often turn out to be ineffective for controlling such objects, because they are based mainly on the assumption of the object’s linearity. At the same time, as practice shows, the current control of identification of complications and of the drilling process is effectively performed by an experienced operator-driller. He uses his experience and professional skills in the form of fuzzy rules. That is why in order to make a decision using technical means of monitoring and control, it is advisable to use the methods of the theory of fuzzy sets and Fuzzy Logic. In this regard, it is appropriate and relevant to develop the specialized architecture of an intelligent system, which makes it possible to effectively support decision making by a driller when controlling the process of oil and gas well drilling under complicated conditions.


Introduction
Making decisions on control of the process of well drilling under complicated conditions is a sub-problem of the general problem of optimal control of this process, which is realized by the integrated system of automated control.
Oil and gas well drilling is a very complex technological process, the dynamics of which is characterized by non-stationarity, nonlinearity and irreproducibility, as well as the interrelation of most processes with the changes arising in the bore hole and the surrounding array of rocks. A variety of geological and technological conditions often leads to the occurrence of unpredictable complications and the need for making a reasonable solution within a limited period. The most important issue of improvement of operation quality in oil and gas well drilling is to reduce the number of complications and prevent accidents, which is associated with the use of the modern methods of monitoring, control, and computer equipment.
However, a whole number of issues related to the control of complications in the process of oil and gas well drilling, remain insufficiently studied and developed. This is due to the fact that there is a priori and current uncertainty and the object operates under the influence of external inter-are adapted to the results of imperfect forecasting based on synergetics [11] or artificial neural networks [12].
At the same time, the works by these authors do not pay attention to issues of creation of intelligent decision support systems in the management of the process of wells drilling under complicated conditions. However, to adapt to changing conditions, this system must change the operational parameters, such as the load on the hook, the column rotation rate, pumping flow rate of drilling pumps.
Thus, all the foregoing makes it possible to conclude that it is expedient to conduct a research into the development of an intelligent decision support system in controlling the process of wells drilling under complicated conditions, based on the methods of the theory of fuzzy sets and Fuzzy-logic [13]. This will make it possible to significantly expand the prospects for the effective use of fuzzy real-time systems to monitor and control the technological processes of drilling oil and gas wells that operate under conditions of uncertainty.

The aim and objectives of the study
The aim of this work is to create a specialized intelligent decision support system based on Fuzzy Logic methods to improve the efficiency of the process of controlling the oil and gas wells drilling and to prevent complications due to obtaining the information about the actual drilling parameters.
To accomplish the aim, the following tasks have been set: -to develop logical-linguistic Fuzzy-models for detection of complications arising in the process of oil and gas wells drilling; -to perform simulation of the developed methods and the model, as well as an intelligent decision support system in controlling the drilling process under complicated conditions.

Materials and methods to study an intelligent decision support system when controlling the wells drilling process under complicated conditions
The methodology of decision support (DS) includes the use of different methods and techniques that can be partially or fully formalized. To achieve the set goal, we carried out the theoretical research using the methods of the dimensionality theory while developing the information model of complications arising in the process of oil and gas wells drilling. The methods of modeling and identification of systems were used to simulate the control object based on the input and output data of the wells drilling process under complicated conditions. During the development of logical-linguistic models of making decision on the possibility of complication occurrence, we applied the methods of the theory of fuzzy sets and fuzzy logic methods, as well as expert estimations while constructing membership functions of fuzzy parameters. The methods of mathematical statistics were used in researching the interrelations of parameters and indicators of the process of oil and gas wells drilling. The research into the developed control system based on expert data was conducted using the methods of computer modeling. The results of questioning the experts were processed using the methods of the similarity theory and of mathematical statistics.
The methods for finding solutions with logical-linguistic models and methods are based on the knowledge of special-

Literature review and problem statement
In paper [1], an increase in the level of the drilling process automation is considered as one of the ways of achieving faster and more intelligent construction of wells. For this purpose, three new technologies aimed at improving the quality of drilling were developed. These include: software for control automation, the method of monitoring the quality of drill pipes based on the radio frequency identification, sensors for measuring parameters of drilling mud. During measurements on the platform Statfiord C in the Norwegian zone of the North Sea, these technologies were not only tested simultaneously, but also became the basis for the organization of data exchange in real time and were united into a single integrated system of automation of drilling process. It was shown that at the present time, these technologies are aimed at reduction of unproductive time during drilling operations. For this purpose, the operational guarantees are introduced directly on the drilling equipment, automation of auxiliary operations and formation of the expected values of parameters for support of decision on detection of emergencies -complications.
Only the situations, such as going beyond the permissible area of the axial velocity of the drill pipe string and the flow rate of the washing fluid, are considered as basic emergencies. The issues related to the development of an intelligent decision support system in controlling wells drilling under complicated conditions remained unresolved. Such complications include the zones with abnormally high oil pool pressures, narrowing of the bore hole, gas showing at high oil pool pressures, collapse of well walls, losses of washing fluid in a well, etc.
The reason for this is objective difficulties due to the extraordinary complexity of the control object. Indeed, this process is non-stationary, random and the one that evolves over time under conditions of a priori and current uncertainty of the structure and parameters of the control object under the influence of interferences, inaccessible for measurements. The option to overcome the corresponding difficulties can be the transition to the autonomous computer-integrated technologies of drilling works. This approach is used in paper [2], which is based on [3,4]. In study [5], it was proposed to use the models constructed based on artificial neural networks as one of the methods of the neurodynamic theory. However, this theory is at an initial stage of development and the existing results are of the local character. It was proposed to describe the way to automation of the drilling process in terms of three levels: first -the system proposes instructions for drillers, the second -makes decision with the approval of a driller, the third -steps to the autonomous system. Here the driller, who can be outside the drilling pad, intervenes only when necessary. However, automation of the drilling process requires the existence of the system that has the capability to cope with variability and uncertainty of the geo environment directly on the well, based on models [6,7] of versatile information from the ground and in-depth sensors in the on-line mode [8]. These systems should respond to such changes as lithology while maintaining optimal performance, thereby increasing performance and efficiency [9]. The basis is the use not only of measurement information, but also of the knowledge of local geology, experience of the staff of a drilling rig and drilling conditions [10]. The automated system updates the model using the real-time data. Decisions of an experienced driller ists-experts, models of human reasoning, non-classical logics and gained experience.

1. Development of logical-linguistic Fuzzy-models of complications arising in the process of drilling oil and gas wells
Intelligent Decision Support Systems (IDSS) are focused on the tasks that are poorly formalized and weakly structured in various, as a rule, dynamic situations [14]. The specific features of such tasks are: -impossibility of obtaining all objective information necessary to solve the problem, and in this connection, the need to use subjective, heuristic information; -existence of non-determinism in the process of finding solutions; -the need to correct and enter additional information in the process of finding a solution, active participation of a decision maker (DM) in it; -the need to obtain solution under conditions of time limitations.
The above factors do not make it possible to use successfully the strict algorithmic methods and models of the decision-making theory to solve such problems [15].
The general function of control to prevent complications at vertical borehole drilling is to determine the state of the control object and to identify the features of complications that require controlling influences [16].
The state of a drilling tool at every moment of time with full probability and accuracy, based on the statement of the problem of control and understanding the nature of the process of the object functioning, can be characterized with the set of the following magnitudes: is the movement of the drill pipe string, V М (t) is the mechanic velocity, р(t) is the pressure of drilling mud at the blowout of pumps, Р(t) is the axial force on the chisel, М(t) is the torque or N(t) power, consumed to rotate the drilling column; Q 1 (t) is the consumption of the drilling mud at the inlet to the well and at the outlet Q 2 (t). At transition from one instant state to another, the values of n, V m , P, M, Q 1 , Q 2 change, that is, they are functions of state and time t.
The most important influences and parameters of monitoring and control of the oil and gas well drilling process in order to prevent complications are: -input control influences Х(t)={P(t), n(t), Q 1 (t)}, which are measured in real time; -disturbance parameters А(t)={T, H, P p }, which for each interval of well drilling are assigned by geological-technical directions (GTD); -parameters that are determined by drilling modes Z(t)={x, y b.k , y b.u } are non-controlled disturbance; -physical and mechanical and abrasive properties B of rocks that are predictable by the geological-technical directions (GТD), according to the stratigraphic profile of an oil basin, but are uncontrollable and unpredictable disturbances.
Here, x is the characteristic of a chisel; y b.u. is the parameters of a drilling rig; y b.k. is the parameters of the drilling column; T is the temperature in a well; H is the force of static friction resistance; P p is the oil pool pressure.
Thus, the characteristics of the state of object Y i (t) are related to the input controllable magnitudes Х(t) and disturbing parameters in the process of drilling А(t) and parameters that are determined by drilling modes Z(t).
The general information model "input-output" of the object of control of parameters of the process of oil and gas well drilling is shown in Fig. 1.
For the correct choice of controllable magnitudes, we will determine the class of the problem of monitoring and control of the process of well drilling to prevent complications. Because the process of oil and gas well drilling is a non-stationary random process that develops over time, this control option corresponds to determining events under conditions of a priori uncertainty [17].
We will represent the complication of the process of well drilling with a single-level reference model OSI with a set of input variables х 1 , х 2 ,.., x n and one output variable y: Choose the features of complications of the well drilling process that correspond to the level of the OSI model as the input variables x i . The output variable y is an indicator of the measure of the possibility of certain complication in the process of well drilling [16].
We will introduce the following basic formalisms needed to construct fuzzy linguistic knowledge bases.
We accept that variables x j and у can take the following values.
The region of application of values of variables will be: , , where i x and i x are the lower and upper values of the input variables of the process of oil and gas well drilling x i ; i=1, 2, …, n; y and y are the lower and upper values of input variable у.
The most convenient form of representation of knowledge in the implicative form for an expert is the linguistic form that is common for humans. In this case, an expert operates with fuzzy, blurred categories [17]. x x x is the fixed values of input variables of the process of well drilling, that is, of readings of sensors, where * , Î i i x U i=1, 2, …, n. The task of decision making is to determine the output у * ÎY based on vector X * .
The necessary condition of the formal solution of such problem is the existence of dependence (1). To establish such dependence, we will consider the input variables of the process of oil and gas well drilling x i , i=1, 2,…, n and output variable у as linguistic variables [17], assigned on universal sets (2), (3).
To assess linguistic variables x i , i=1, 2, …, n and у, we will use quality terms from the following term-sets: -A i is the term-set of the input variable of the process of well drilling , 2, …, n; j=1, 2, …, m; will be considered as fuzzy sets, assigned on universal set U і and Y, determined by ratios (2)¸(5).
x is the membership function of the value of in put variable; , This stage of construction of the fuzzy model, on which the linguistic estimations of variables for formalization of membership function are determined, was named fuzzification of variables.
In accordance with (1), we will choose the MISO structure (Multi Input -Single Output) [13] of the fuzzy knowledge base. Choose also N experimental data that connect the inputs and outputs of the research object and distribute them as follows: where k j is the number of experimental data obtained from experts that correspond to output solution d j , j=1, 2, …, m, m is the number of output solutions, in addition, in the general case 1 2 ...
. ≠ ≠ ≠ m k k k Let us assume that the number of experimental data is smaller than the complete sort out of combinations of levels i l of a change in input variables, i. e. 1 where d j , j=1, 2, ..., m is the linguistic assessment of the output variable у, which is determined from term-set D; jp i a is the linguistic estimation of input variable i x in the р-th raw of the j-the disjunction, which is selected from the corresponding term-set A i , 1, ; = j p k i=1, 2,..., n; j=1, 2,..., m; k j is the number of rules that determine the value y=d j. .
Such a system of logical statements of an expert about the influence of factors { } i x on the values of output variable у will be called a fuzzy knowledge base [18][19][20][21][22].
Using the operations ( ) O  R and ( )  AND we will write down the system of logical statements (6) in the following form: ( ) x a y d j=1, 2,..., m.
To account for various types of universality of an expert in the adequacy of the rules, we use weight coefficients. Fuzzy knowledge base (7) with weight coefficients of the rules will be rewritten as follows: This knowledge base (8) is called the Mamdani knowledge base [15].
Using the knowledge matrix (Table 1) or its isomorphic system of logic statements (6) or (7), we will construct a system of fuzzy logical equations, which make it possible to determine the values of membership function of different solutions at fixed values of input variables of the process of oil and gas well drilling.
The system of logical equations will be written down in a compact form as follows: Consider the mathematical model of the system of fuzzy inference and defuzzification of the output indicator.
The basis for performing the operation of the fuzzy inference is the knowledge base containing fuzzy statements and membership functions for the appropriate linguistic terms.
The idea of the algorithm for solving this problem is to use the composition rules of output by L. Zadeh, which established the relation between one input variable of the process of oil and gas well drilling and one output variable [13,15]. This rule is generalized for the system of one output and n inputs, which corresponds to a full knowledge matrix ( Table 1).
The scheme of the process of fuzzy inference includes three stages (Fig. 2): introduction of fuzziness (fuzzification) of the input parameter of the drilling process, a fuzzy inference and bringing down to clarity (defuzzification).
Consider the raw with number j 1 on the knowledge matrix (Table 1). This raw corresponds to the following fuzzy logical statement for certain complication of the oil and gas drilling process:  (2) and (3).
Expression (10) can be represented [22] as a system of elementary statements in the following form for a particular (specific) complication that may occur in the process of well drilling: Thus, it is appropriate to use the developed logical-linguistic Fuzzy-model, which is able to ensure decision making support in real time, as the model of complications of the well drilling process.

2. Simulation of an intelligent decision support system under complicated conditions
As a result of the conducted studies of the complications of the drilling process, the features for identification of four types of complications were selected.
The research results are collected in Table 2. Table 2 Results of selecting the identification features for the main types of complications The features are partly duplicated, which is not surprising, because the same feature can be informative for several complications simultaneously. Taking this into consideration, it is advisable to present the selected features in the form of Table 3. 10 The drilling practice revealed the following features of fluid showings [23]: -an increase of drilling mud volume in tanks of the circulation system; -a rise in the flow (rate) of drilling mud from a well at the constant supply of drilling pumps; -a decrease against the calculation volume of drilling mud, which is additionally poured into a well when putting down the drill string; -an increase of gas content in the drilling mud; -an increase in mechanical drilling rate; -a change of parameters of drilling mud properties; -a change of pressures at drilling pumps. The last three features may occur not only as a result of showings, but also for other side causes.
Sticking of pipe columns is classified [23] as complications. The features, by which it is possible to determine or specify the occurrence of "sticking of a drilling tool by crush" [16]: -free circulation of the washing fluid; -"dead" state of the emergency tool, that is, if a drilling tool before a complication was at some distance from the bottom, after sticking it does not move either upward or downward and does not rotate.
The features, by which it is possible to determine the occurrence of these complications (except for the collapse of well walls at sudden and complete loss of circulation), are: -possibility of motion of a drilling tool downwards if it was raised over the bottom before complications occurred; -existence of circulation of the washing fluid, which stops when it takes long to eliminate a complication; -if a complication is liquidated with the help of a special washing tool that is put down into a well, it stops above the reducer. Table 3 shows that the most informative features that are advisable to use in identification of most complications are: -6 -a sensor of pressure of drilling mud pumping; -1 -a depth sensor (a sensor of rotations of drilling winch shaft); -8 -a sensor of the level in receiving tanks. There are also the features that are specific for particular situations: -2 -a sensor of rotor torque (only for the complication "Sticking of a drilling tool"); -7 -a sensor of drilling mud flow rate in the pumping line (only for the complication "Absorption of drilling and plugged-back mud"); -9 -a sensor of drilling mud density (only for the complication "Gas and oil showings"); -10 -a sensor of the drilling mud temperature (only for the complication "Gas and oil showings"); -12 -a sensor of hook load (only for the complication "Sticking of a drilling tool").
To assess and determine the membership function for the rule base, it is necessary to determine the degree of fuzziness of input magnitudes, which provide the information from the sensors for identifying complications. Table 3 shows the features of these complications and which sensors, that is, which parameters are the most informative for the developed IDSS.
The questionnaires for surveying the experts were developed. In total, 7 experts took part in the survey -these are drilling engineers from the Carpathian department of drilling works of the UBR, who can act as competent experts due to their experience.
Weight coefficients of rules R1-R107 are equal to 1, because at gross setting of the knowledge base, this value satisfies the requirements of a decision maker.
For the IDSS software, it is possible to use any personal computer (PC) (Fig. 3) with free virtual memory of at least 256 MB.
The simulation of the IDSS operation was carried out; in particular, the methodology of conducting an experiment on checking the serviceability of the developed IDSS in software product MATLAB Simulink was explored. The tests were carried out by the testing method. The circuit of the IDSS model in MATLAB Simulink is shown in Fig. 4.
Simulation was conducted for 5 days (120 hours). The results of the simulation are shown in Fig. 4, and these results will be used to configure the fuzzy knowledge base and weight coefficients of the rules. Consider the case of the operation of the model and the base of rules in Fuzzy Logic Controller at which х 1 =1, х 2 =17, х 3 =41, х 4 =65, х 5 =17, х 6 =1750, х 7 =0,03, х 8 =850, y=46,3. We will describe the result of operation of the fuzzy controller in MATLAB Simulink using fuzzy logic. To do this, we will use formulas from chapter 5. 1.

Discussion of results from developing the intelligent decision support system
The obtained matrix of knowledge about the well drilling process, the features, which are used to detect complications, input and output linguistic variables, as well as the circuit of the IDSS model in MATLAB, are the development of deterministic and stochastic models of various complications of the process of oil and gas well drilling. These models ensure real-time detection of changes of signals of arbitrary nature under the conditions of structural and parametric uncertainty.
The Fuzzy-approach to the formation and selection of primary information, based on the application of triangular membership functions was developed. Their unification was achieved due to the fact that different by physical content quantitative and qualitative indicators of the drilling process are displayed onto the unified universal set. The capacity of this set is equal to the number of terms, and fuzzy subsets of each of the terms are assigned on it. The general structure of the IDSS for monitoring and control of the process of oil and gas well drilling under complicated conditions was developed. To do this, the sets of controllable, uncontrollable, disturbing and output technological parameters were separated. The system ensures increased accuracy of fuzzification of input signals with membership functions of the triangular shape. This is achieved by a priori formation of analytical dependences for determining the points of intersection of membership functions of input fuzzy signals and linguistic terms.
The developed IDSS can also be used when drilling for solid mineral deposits and water, as well as on offshore drilling platforms, which greatly extends the possibilities of the practical operation results.
The restrictions include the possibility of applying the research results only for the rotary method of deep well drilling. For drilling superdeep wells by screw-baffle engines and electric drills, the designed Fuzzy-models should get further development as the basic ones in the form of the object-independent intelligent shell.
The drawback of this study is that the developed IDSS is a complex of hardware and software tools for automated collection, processing and  interpretation of geological and technological information on detection of complications only in the process of rotary drilling. In order to drill wells with submersible engines (hydraulic and electric), the IDSS must be supplemented with the information on their functioning on the well bottom. In addition, it is a part of local information-measuring systems for monitoring and control of the process of oil and gas well construction at the lower control level. In order to use the obtained information at the upper control level of an oil company, the IDSS should be supposed to transfer information from the drilling site to the server of an oil and gas company. This information as precedent remains available for retrospective viewing and analysis of complications on other drilling rigs of a company.
In the future, this drawback can be eliminated, and the IDSS will get further development through the use of the case approach and cloud technologies.
The case approach is based on the use of the precedent base in the system and is the method for solving new problems, based on already known solutions. This approach promotes the analysis and taking into account all special and non-standard situations (complications), which at a certain moment have a negative effect on the well deepening process.
In cloud technologies, the server of an oil company is used with the database of precedents, which stores specific data on the problematic situation in the process of deep-ening previously drilled wells. The base of rules is formed from applied programs that implement the necessary calculations, including the tasks of static optimization of the well drilling process.

Conclusions
1. The Fuzzy-model of complications of the process of oil and gas well drilling was developed and used in the intelligent decision support system to detect complications in real time. The Fuzzy model makes it possible to determine the composition and characteristics of the input and output variables of the intelligent system, fuzzy base of rules, the model of membership functions of linguistic variables, the model of the system of fuzzy inference and the defuzzification of the output indicator.
2. The simulation of the IDSS for complications prevention was carried out. In contrast to the known systems, the system is based on the methods of the theory of fuzzy sets and fuzzy logic and on continuous information from sensors (axial force on the chisel, rotor rotation rate, borehole drilling, drilling mud temperature). The information from sensors is read through (1¸3) s. This makes it possible to effectively prevent complications in real time over a wide range of changes in the parameters of the drilling process, to ensure the fault-free bore hole drilling.