COMPUTER-INTEGRATED TECHNOLOGY FOR THE EARLY DETECTION OF BREACHES IN THE BOREHOLE WALLS STABILITY IN THE DRILLING PROCESS

One of the main functions of the system of automated control over the process of drilling oil and gas wells is to prevent abnormal situations. For this purpose, there are tools of the system of intelligent support of the decision-making processes. They function under conditions of a priori and current uncertainties in terms of parameters and structure of the given object of control. In this case, of considerable importance is the improvement of subsystem of early detection and prevention of sticking drill pipe string. They occur as a result of breach in stability of the borehole walls due to brittle fracture of rocks, as well as a result of collapsing and caving. When drilling oil and gas boreholes, sticking may also occur under the influence of differential pressure. Other reasons are jamming in restrictions or groove-formations, as well as electrochemical phenomena in the well, crust-formation and seal-formation and other. However, existing means and methods for the prevention of accidents and complications when drilling boreholes into difficult-to-reach shale deposits are not oriented at large complexity of the object. It is extremely dangerous under the instability of geological and technical conditions. In this regard, the scientific and applied task is relevant of designing computer-integrated technologies for early detection of breaches in stability of the borehole walls based on the method of dynamic analysis of non-stationary signals about the process of deepening the well. For this purpose, the Karnaugh-Veitch diagrams are used that are capable of operating under conditions of a priori and current uncertainty of the process of drilling.


Introduction
One of the main functions of the system of automated control over the process of drilling oil and gas wells is to prevent abnormal situations.For this purpose, there are tools of the system of intelligent support of the decision-making processes.They function under conditions of a priori and current uncertainties in terms of parameters and structure of the given object of control.In this case, of considerable importance is the improvement of subsystem of early detection and prevention of sticking drill pipe string.They occur as a result of breach in stability of the borehole walls due to brittle fracture of rocks, as well as a result of collapsing and caving.When drilling oil and gas boreholes, sticking may also occur under the influence of differential pressure.Other reasons are jamming in restrictions or groove-formations, as well as electrochemical phenomena in the well, crust-formation and seal-formation and other.However, existing means and methods for the prevention of accidents and complications when drilling boreholes into difficult-to-reach shale deposits are not oriented at large complexity of the object.It is extremely dangerous under the instability of geological and technical conditions.
In this regard, the scientific and applied task is relevant of designing computer-integrated technologies for early detection of breaches in stability of the borehole walls based on the method of dynamic analysis of non-stationary signals about the process of deepening the well.For this purpose, the Karnaugh-Veitch diagrams are used that are capable of operating under conditions of a priori and current uncertainty of the process of drilling.
Scientists pay much attention in their research to the development of methods and analysis of the processes of interaction between the chisel and the borehole rock and between a drill pipe string and a borehole walls.In this case, the main attention is paid to the analysis of energy spent on the rotor drilling [1], analysis of work [2] and control of technical condition of chisels [3], elements of the drill string [4,5] to prevent accidents in the process of deepening the wells.Information models are developed for this purpose to control the technical condition of chisels [6], methods of identification [7][8][9], methods of optimal feeding of washing fluid to the well bottom [9], methods for determining effective clarification steps [10].Since technical condition of the drilling tools depends on the properties of rocks, a number of papers are devoted to the analysis of drillability of rocks [11][12][13][14] and methods for the evaluation of current values of drillability of rocks in the process of deepening a borehole [15].For the implementation of these methods, specific strategies for decision-making in the process of drilling are proposed [16,17], as well as automated processing of geological-technological information on the process of drilling [18] based on the systems of telecontrol [19], as well as the methods of Fuzzy Logic [20] and intelligent systems [21,22].
However, it should be noted that the approaches described above are examined mainly with regard to drilling the boreholes in general, and not in terms of stability of the boreholes' walls.
At the same time, scientific problems of preventing pre-emergency situations and complications in the process of deepening oil and gas wells are not sufficiently studied, in particular early detection of breaches in the stability of boreholes' walls.The issues of early detection of breaches in the walls of wells are almost never paid attention to in the studies of scientists.It should be noted that the difficulties of solving this problem are predetermined by a multitude of approaches to the assessment of such complications under on-line mode, the lack of information and shortcomings in the modern means of control over indicators in the process of drilling.
However, many papers of scientists notwithstanding, the task of designing computer-integrated technologies for the identification of breaches in the stability of a borehole walls in the drilling process remains relevant and very important.

The aim and tasks of the study
The aim of present work is to develop a method for the early detection of breaches in the stability of a borehole walls in the process of drilling, based on the computer-integrated technologies of minimal finite automata under an on-line mode.
To achieve the set aim, the following tasks were formulated: -substantiation and research into computer-integrated technologies for the identification of breaches in the stability of boreholes' walls during drilling, aimed at solving the problem of the prevention of emergency situations; -development of a formal mechanism for decision-making in the process of drilling boreholes based on the opera-tion of logical functions to detect breaches in the stability of a borehole walls; -synthesis of block diagram of finite automaton and the design of logical unit based on the controller MIK-51N (Ukraine) as part of a control system for the drilling process and monitoring in the oil and gas fields.

Materials and methods of research
Methodological basis of this work are general scientific and special techniques, approaches and methods of exploring complex technological processes and phenomena, namely: -logical fundamentals of synthesis of elements and devices of automation; -methods of describing the functions of logical elements; -methods of minimizing the algebra functions of logic of schematic-digital elements of the position of modern control theory; -information and production technologies of drilling oil and gas boreholes.
We apply methodological apparatus of systems and situational approaches, decision-making theory and logical fundamentals of the synthesis of elements and devices of automation, based on which we devised a computer-integrated technology for the early detection of a breach in the stability of a borehole walls in the process of drilling.
In the present paper, a set of methods and techniques was employed: -formal logic -for an analysis of generalization and systematization of material concerning methodological approaches to the selection of technologies for the early detection of breaches in the stability of boreholes; -coordinate method for assigning a function of the algebra of logic when the function is set in the form of the map of Karnaugh -coordinate map of states (a Veitch diagram) containing 2 n cells where n is the number of arguments; -analytical representation of logical functions for drawing up a formula of the examined function by its truth table ; -minimization of a function of the algebra of logic by the method of Karnaugh maps -to build, based on the synthesized operation algorithm, a block diagram of minimum complexity, that is, a scheme with a minimum number of logic elements; -methods of schemes-and systems technology for the design of contactless device for the early detection of a breach in the stability of a borehole walls; -graphic method to visualize theoretical and practical material obtained as a result of present research.

Designing a computer-integrated technology and the Boolean-based synthesis of device for the early detection of breaches in the stability of borehole walls
There are certain standards for the drilling organizations in Ukraine concerning the prevention and elimination of accidents in the process of drilling boreholes for oil and gas, but in some cases they do not provide clear instructions regarding the detection of sticking caused by breaching the stability of a borehole walls through the brittle fracture of rocks.This is because the issue of early detection, prevention and elimination of accidents when drilling wells for oil and gas is extremely complicated.It requires research and improvement based on the utilization of current information in the form of a sequence of multidimensional independent random magnitudes that characterize the examined process.
Let us assume that a sequence of multidimensional independent random magnitudes х 1 , х 2 ,…, х t is set, where t is the current point in time.Probability distribution function F(x) of these random magnitudes takes the form: where t 0 is the moment of change in properties (disorder); F 1 (x)≠F 2 (x).
The known variants of setting the problems of this class are determined mostly by assumptions on the probabilistic properties of discrete random magnitude t 0 and distribution function F 1 (x) and F 2 (x).For the case of detecting a breach in the stability of a borehole walls, when the distribution of point of considering t 0 is a priori unknown, we propose the following problem formulation: let the moment of occurrence of the disorder is preceded by infinitely long observation, at which there is an established stationary mode in the technical and hydraulic systems of washing the well, which is interrupted by false alarms.Observation is possible for the process that is described by stochastic equations.It is necessary to find such a rule that allows the detection on-line of the signs of pre-emergency situation caused by the breach in the stability of the boreholes' walls and the prevention in a timely manner of the stuck drill pipes string.
When drilling deep wells for oil and gas, sticking may occur due to various reasons, namely: -sticking under the influence of differential pressure; -jamming in restrictions or groove-formations by foreign objects or rocks; -electrochemical phenomena in the borehole, crust-formation and seal-formation; -settling of slurry, narrowing, collapsing and mountain creep; -loss of stability in a borehole wall, etc.For the early detection of breaching the stability of the well due to mountain creep and collapsing, as well as a narrowing of the wellbore or settling slurry, it is necessary to define their attributes that manifest themselves in the technical and hydraulic systems of washing the borehole.
If the collapsing of rocks occurred in the process of deepening the well, then one observes a significant increase in the working pressure of pump resulting from a reduction in the area of cross section of the annulus space.In addition, the resistance moment increases against the rotation of the drill string.When lifting the tool from the borehole, there occurs the drawing-in, and during the descent-landing, there is a place of finding fragments of the rocks that have collapsed.
By the practice of drilling, it was found that collapsing in the most severe manner is characteristic, mainly, for clay rocks.The main reason for collapsing is considered to be a breach in the stability of the boreholes' walls that is predetermined by the strained state of near-bore zone and active influence of washing liquid filtrate on the physic-mechanical properties of rocks.
Detailed studies of the origin of collapsing and the development of means of dealing with them are conducted both in Ukraine and abroad.
All collapsing is typically divided into three groups: light, medium and heavy.
Light collapsing is more often observed during the ascent of a drill string.If a collapsing occurs above the rock crushing tool, then the load on the hook with further lifting increases by approximately 20 % of the weight of a drill pipes string.Complications develop in 20 days or later after the opening of unstable interval by the borehole.The amount of drilling sludge that is generated as a result of the elimination of collapsing does not exceed 5 m 3 .Such collapsing can be easily eliminated by pumping quality washing drilling solutions.
Medium collapsing manifests itself in 3−18 days and is inherent to many categories of rocks in the non-fixed interval of a borehole.It is repeated much more often than the light collapsing in 3−10 days.While lifting the drill string, the load on hook grows by 1.5−2 times.To prevent medium collapsing, the water discharge is reduced to the minimal values while specific weight of washing solutions is enhanced.
Heavy collapsing spans the entire open space of a wellbore and is observed continuously.It occurs within the first three days after opening the unstable rocks.If a drill string happens to be in the well, then the circulation of drilling solution is disturbed and the sticking of column occurs.When the drilling tool was lifted prior to collapsing, the complicated interval is treated at maximum possible productivity of drilling pumps and careful submission of the chisel.Sometimes, working out a small interval of unstable rocks takes a lot of time.
For the classification of complications and wellbore stability, there were several factors proposed [4,5], which sufficiently characterize reasons for the occurrence and development of complications: -coefficient of rockfall formation, as the ratio of the actual volume of wellbore with consideration of caverns to the theoretical volume in the range of complication.At the narrowing of a wellbore, this coefficient is smaller than unity.If it is within 1-5, then such a complication relates to sloughing, if it is larger than 5, then to collapsing; -counter-pressure of washing fluid; -mechanical speed of drilling, which is reduced to zero; -temperature of clay rocks in a zone near the hole and temperature gradient near the walls of a borehole; -increase in the torque on the rotor of drilling installation; -humidity and kinetics of increase in humidity of rocks; -reduction in the washing fluid consumption at the outlet of the borehole to zero; -structure defects in clay rocks; the presence of irregularities, cracks, tectonic disturbances.
We shall note that each of the above-described factors has its faults, but their comprehensive use allows unambiguous detection of the initiation of collapsing under different geological engineering conditions.
Thus, the main question concerning early detection of breach in the stability of a borehole walls is to determine the drivers of this process that are subject to control under an on-line mode.
Following the methodology of the systems approach and, in particular, basic principles of interrelation and development, we shall explore this system as an open dynamic system whose functioning proceeds over a certain period.
An analysis of accidents and complications arising in the process of deepening a borehole and their classification by the information-measured attributes allowed us to establish that the main indicators of the process of drilling, which can be used for the early detection and prevention of accidents and complications, are: consumption of drilling fluid at the inlet to borehole Q 1 and outlet from it Q 2 , pressure of the drilling fluid P, torque on the rotor M р , rate of displacement of drilling equipment v, axial loading on the chisel G, or the weight of the drilling equipment, as well as temperature of the drilling fluid at inlet T1 to the borehole and outlet T2 from it.
For the case when a breach in the stability of the walls of a borehole is linked to the loss of circulation of washing fluid and mobility of the drill string, the attributes that can be used for the identification are: Let us assume that the axial effort to chisel is maintained at the constant, assigned by geological-technical order, level G=const.As an actuating element of device for the early detection of breaching the stability of the walls of a borehole, we shall take the relay type element and we shall introduce the following designations of input variables: We shall designate input variable X 1 as: 1 -controlling element of the system for early detection of breaches in the stability of a borehole walls is on; 2 -controlling element of the system for early detection of breaches in the s ty of a borehole walls is off.
Thus, one of the two values of input logical variable matches the state of each element of the system for the early detection of breaches in the stability of walls of a borehole.Similarly, the original logic variable of the system matches the actuating element.
The overall structure of the device for converting signals that characterizes the process of breaching stability of the walls of a borehole is shown in Fig. 1.In Fig. 1, we adopted the following designations: x(t) is the non-periodic, uninterrupted input signal; UDL -uninterrupted dynamic link with a known transmission function W(S); y(t) is the uninterrupted observed signal; DD is the signal y(t) discretization device with discretization step where ω m is the maximum value of spectrum density of signal y(t), which is determined from condition where m y is the maximum spectral density value of signal y(t); TD is the threshold device that converts discrete-uninterrupted (slatted) signal y[nθ] into binary Z[nθ], through the quantization by level.If the value of slatted signal y[nθ] at some point n=K exceeds the assigned level, then Z[nθ]=1, if it does not, then Z[nθ]=0; FA is the finite automaton with memory, which converts input sequence Z[nθ] into sequence U[nθ] of output signal; G is the generator of pulses, which assigns discretization frequency f D , that is, a clock cycle of finite automaton, which coincides with discretization step θ.
That is why discrete transitions of automaton are possible only in the moments of occurrence of sync pulses.
For solving the problem of synthesis of scheme of logical device for the early detection of breaches in the walls of a borehole with the drilling fluid circulation loss, we shall assign a function of the algebra of logic using coordinate method [24], with this purpose we shall map a Veitch diagram of logic function of four variables for original variable Z1 using thesaurus of informative parameters <Q, M, v, P>, which characterize the process of breaching the stability of walls of a borehole (Fig. 2).The map contains N=2n=16 cells, where n is the number of arguments.

Fig. 2. A Veitch diagram of logic function with four arguments
We shall enter 1 into elementary cells, if these cells are covered by the fields of input variables, at least one of variables a, b, c, d − for original variable Z1, which meets criteria of the formulated problem on the early detection of breach in stability of the walls in a borehole.
The first cell of the bottom line that is covered by the field of only one input variable a cannot be denoted by unity, since the consumption of drilling fluid at the outlet from a borehole may serve as an attribute of another phenomenonthe absorption of drilling fluid or karst cavities.That is why attribute a is used only in combination with other attributes, which, together with obligatory attribute α, reveal breaches in the stability of walls of a borehole.The squares that cover the areas of values of two, three and four variables a, b, c, d contain unities, all other cells -zeros.
For the cells of the Veitch diagram that contain 1, we shall compile a structural formula of the scheme of device taking into account executive body Z: where f(a, b, c, d) is the logical function of the device's scheme without executive body, φ is the structural formula of the scheme of logic device.Then for the automated system of detecting breach in the stability of walls of a borehole, logic function f(a, b, c, d) can be represented in the normal disjunctive form, that is, in the form of sum of products of input variables for each cell that contains unity: where a, b, c, d are the designations of closing contacts; ¬a, ¬b, ¬c, ¬d are the designations of disconnecting contacts; ∨ is the logic OR, ∧ is the logic AND, ¬ is the logic NO.By using structural formula (7), we synthesized a block diagram of the device (Fig. 3).
Conditions for work of reacting body Z are the conditions under which the links that affect the body produce signal 1.
However, such a block diagram is complex since it has a large number of logic elements, and gates of logic elements, as well as the housings of intelligent circuits.That is why it is a relevant task of constructing, based on the assigned algorithm (7), a block diagram of minimum complexity.As logic function (7) is assigned in perfect disjunctive normal form, then we shall use such a method for minimizing the functions of the algebra of logic as the method of Karnaugh maps [20].
Using the laws of the algebra of logic, we shall minimize in the boolean basis structural formula ( 7) by obtaining the minimal form of boolean function using this method.It is necessary to choose only such sets of algorithms, for which a Boolean function is equal to unity.Then all the squares with unity should be covered with rectangular contours -S-cubes, using the following rules [24]: -S-cube must be rectangular; -inside the contour are the squares containing only unities; -a number of squares in S-cube must be equal to 2n, n=0, 1, 2, 3,..., that is, 1, 2, 4, 8, 16,...; -the squares containing unities may be included in several S-cubes; -when drawing S-cubes, the lowest and the upper lines of the Karnaugh map are considered to be adjacent; adjacent are also considered to be the extreme left and extreme right columns; -a number of S-cubes should be as small as possible while S-cubes themselves as large as possible.
Since rank m of the miniterm, which describes the appropriate S-cube, which contains 2s individual values of the function, is equal to m=n-s, then, to determine a logic expression (term) that describes any S-cube, one should know the variables that the given S-cube does not depend on.
From the examined Karnaugh map we see that all the squares with unity can be covered by six contours that covering 4 squares.That is, in this case, the rank of miniterm is equal to n-s=4-2=2.
Contour A (Fig. 2) crosses the boundaries of variables d and b and, therefore, miniterm ac corresponds to it; contour B crosses the boundaries of variables c i b, and miniterm ad corresponds to it; miniterm ab corresponds to contour C; bd -to contour D; cd -to contour E; bc -to contour G.
Due to the fact that the contours are created by the conditions of triggering, the structural formula of finite automaton can be written down in such a minimal disjunctive form: Structural formula (7) can be realized using a computer.A structural formula of the local logical device for the detection of collapsing of the walls of a borehole with consideration of the executive mechanism Z is written down as follows: According to the obtained structural formula (10), we shall build a block diagram that is shown in Fig. 4.
Executive mechanism Z that switches on the devices for light and sound alarm will be triggered if there are signals that are the attributes of breach in the stability of walls of a borehole.
The proposed finite automaton is integrated into the architecture of automated system of drilling modes control, namely into the system of intelligent support of decision-making processes (Fig. 5).
The system of control and monitoring has a two-level hierarchical structure.The lower level is represented by the control system over local boreholes drilling process, and the second is the level of a field dispatcher.The system is implemented using the technical means of the MIKROL enterprise (Ukraine) and employs a wireless system of communication between the nodes of the system using the packet data transfer technology GPRS (Ukraine) in the GSM standard mobile networks.Such a solution allows quick and cost-efficient implementation of the system for monitoring and control of drilling installations, which are dis-persed over considerable distances within the deposit.The availability of complete coverage of the territory of Ukraine by networks of various mobile operators also contributes to the implementation of the given technology.
The system at the level of a drilling rig must have an information subsystem to control the parameters of drilling, a management node and emergency alarm and a GSM router.As a clarification device, we applied PLS MIK-51N (Ukraine), and emergency alarm is realized in the device of technological alarm system UAS-16.For wireless communication between technical means of automation, which are located in the drilling site, and the working place of a drilling foreman, and a higher level of the system, we use GSM-modems of the SQUID-1 type.Such a router can archive data on memory flash cards and send out text messages to mobile phones of the service personnel.
Logic automaton is realized in the MIK-51N controller.The text of the user program was developed in the FBD programming language (one of the languages of the IEC international standard 61131-3), in the ALPHA instrument environment (Fig. 6).
The program structurally consists of the nodes of entry and display of information and logic automaton.Entering the drilling parameters from the information subsystem is conducted through analog inputs 1−4 of the controller using the AIN algorithms.AIN units provide the analog-to-digital conversion of analog signals, and they also have the capacity to compare it with a setpoint, forming discrete signals dmax and dmin if a parameter exceeds the setpoint of comparator.Thus, by assigning the setpoint, at the outputs of the AIN units we shall receive the boolean variables that are involved in the synthesis of the automaton.

1 - 1 -
signal from a device for drilling solution consumption control at the outlet of a borehole tends to zero; 0 -signal from a device for drilling solution consumption control at the outlet from a device for consumption control at the inlet, from a sensor of drilling plant rotor torque considerably exceeds nominal value; 0 -signal from a sensor of drilling plant rotor torque corresponds to nominal value signal from a sensor of drilling solution pressure exceeds nominal value; 2 -signal from a sensor of drilling solution pressure corresponds to nominal value.p d

Fig. 1 .
Fig. 1.Structure of the device for converting signals that characterizes the process of breaching stability of the walls of a borehole , b,c,d) = (¬a b ¬c d) (¬a ¬b c d) (¬a b c d) (¬a b c ¬d) (a ¬b c ¬d) (a ¬b c d) (a b c d) (a b c ¬d) (a ¬b ¬c d) (a b ¬c d) (a b ¬c ¬d),

= 9 )Fig. 3 .
Fig. 3. Block diagram of a contactless device to detect breaches in the stability of walls of a borehole

Fig. 4 .Fig. 5 .
Fig. 4. Block diagram of logic device (finite automaton), designed for the early detection of breaching the stability of walls of a borehole with the loss of drilling fluid circulation