Drilling Rig Operation Mode Recognition by an Artificial Neuronet

The article proposes a way to develop a drilling rig operation mode classifier specialized to recognize pre-emergency situations appearable in commercial oil-and-gas well drilling. The classifier is based on the theory of image recognition and artificial neuronet taught on real geological and technological information obtained while drilling. To teach the neuronet, a modified backpropagation algorithm that can teach to reach the global extremum of a target function has been proposed. The target function was a relative recognition error to minimize in the teaching. Two approaches to form the drilling rig pre-emergency situation classifier based on a taught neuronet have been considered. The first one involves forming an output classifier of N different signals, each of which corresponds to a single recognizable situation and, and can be formed on the basis of the analysis of М indications, that is using a uniform indication vocabulary for all recognized situations. The second way implements a universal classifier comprising N specialized ones, each of which can recognize a single preemergency situation and having a single output.


Introduction
While drilling oil-and-gas wells, the drilling rig operator has to quickly solve many technological problems including an early detection of oil-and-gas-and-water showings and mud losses while drilling, drilling optimization depending on the geological tasks, technological operations recognition and timing, choosing and maintaining an efficient drilling mode, pre-emergency situation diagnostics in real time scale, and drilling equipment operation diagnostics [1].The quality of solving the above problems firstly depends on the skills, and some ambiguous situations can demand some essentially subjective solutions.
At the same time, there exists an image recognition theory [2][3] that can process information as a set of parameters describing the recognized target, in order to conclude what is the class the recognized image (target) belongs to.That theory has been applied in different mining branches [4][5][6], so it seems prospective to use that apparatus for the automated recognition of the drilling rig recognition in order to minimize the effects of subjective factors on the drilling rig operation.
The principal functions of the drilling rig state classifying stage are 1) real-time raw information processing and 2) classified target state determination based on its indications, using a special algorithm.
The drilling rig state determination uses a ready classifier which should determine the dynamic target state already in the real time.Here, both effective and quick target state determination is crucial.

Materials and Methods
The mathematical methods for solving problems in complex technical system diagnostics have been developed for several decades.The researchers proposed numerous ways to check hypotheses and draw conclusions.In 1960s they developed analysis methods which enjoyed some expansion and raised a wave of publications.They had a common feature uniting them -evident decision-making algorithms: the diagnostic algorithm includes a set of rules that determine the raw material processing order in order to determine the diagnosis -that is to classify the system's state [7].
Many years of investigations on most different evident algorithm showed that the implicit geological problems can be solved by the evident methods with such an accuracy and a convenience, that are absolutely insufficient for their wide practical application in particular problems of diagnostics, forecasting and decision-making [8].
Implicit algorithms (that provide automatic experience accumulation and following use in teaching) have been searched for and studied for more than 50 years [9].However, first serious attempts to form the neural networks were made in 1940-1950s, when Warren S.
McCulloch and Walter Pitts proposed the principles of their brain operation theory.With the advent of low-cost computers, there was an abrupt progress in this sphere.In early 1980s, this sphere transformed into an entire brand-new science -neuroinformatics.[10].
The image recognition can be the most popular problem type to solve using neuronets today.The artificial neuron networks are mathematical simulations with their structures and functions formed as in their biological analogs (neural cells or neurons in the brain).The neuronets are formed on the basis of the idea that the neurons can be simulated as quite simple automatic devices (named as artificial neurons), and all the brain complexity, functioning flexibility and other major properties are due to the links among the neurons [11].
The biological neuron is a complex system which mathematical simulation has not been done yet.The ANN theory is based on the assumption that all that complexity is insignificant, and the brain properties can be attributed to the neuron contacts.That is why a simple simulation of a so called formal neuron [12] is used instead of precise mathematical neuron simulations.
A network type can be chosen on the basis of the problem statement and teaching data available.Teaching by a teacher requires an "expert" estimation for every teaching sample element.Sometimes it is impossible to obtain such an estimation for a great data set.In these cases the natural choice is a network taught without a teacher -for example, a Kohonen self-organizing map or Hopfield neuron network [13][14].
The estimation of the number of neurons in the hidden layers of the homogeneous neuron networks can use the formula estimating the necessary number of synaptic weights Lw (in a multilayer network with sigmoid transfer functions): where n is the input signal dimension, m is the output signal dimension, N is the number of teaching sample elements.
Estimating the necessary number of weights allows calculating the number of neurons in the hidden layers.For example, the number of neurons in the double-layer network is: By the same way, the number of neurons in networks having a greater number of layers can be calculated.Using such multilayer neuron networks is sometimes reasonable because they can have smaller dimensions of their synaptic weights of the neurons in their single layer, than double-layer networks implementing the same reflection.
Unfortunately, the above formulae can give only approximate estimations, so obtaining accurate values of the neuronet parameters requires experimental investigations in that particular target sphere.
For the drilling rig pre-emergency situation recognitions, the teaching sample size should be quite great.That is why the network teaching effectiveness is the crucial parameter for choosing the number of layers and neurons in every layer.For that, the time spent on teaching (the number of teaching algorithm iterations) and teaching accuracy (the percentage of situations truly recognized by the taught network).
To teach the neuronets, the backpropagation algorithm is widely used.It is an iterative gradient algorithm applied to minimize the root-mean-square deviation of the current output of the multilayer perceptron and desired output [15].
Major modifications of the backpropagation algorithm involve different error functions, various procedures for increment size and direction evaluation, teaching timing procedures, etc. Integral error functions for the whole set of all teaching examples as well as integral and fractional power functions can be used as error functions.
There exist two teaching modes: a series one and a pack one.While teaching a multilayer perceptron with the backpropagation algorithm, it is repeatedly offered a preset set of teaching examples.A single full cycle of offering a full set of teaching examples is called an epoch.In the series mode, the weights are corrected after feeding each example.This mode is used most often.In the pack mode of teaching, the weights are corrected after feeding all teaching examples of a single epoch to the network.Computingly, the series teaching mode is much faster.This is especially effective when the teaching set is big and highly excessive.
The classifying tasks based on the series teaching of the neuron network with the backpropagation algorithm usually use a method of a random change of the sequence of examples fed to the multilayer perceptron input, from one epoch to another.Ideally, such randomization attributes the effectively processed examples to different classes.
Ideally, all multilayer perceptron's neurons are to be taught at the same rate.However, the last layers usually have higher values of their local gradients than the first layers of the network.So, the teaching rate parameter of the backpropagation algorithm should be set to lesser values for the last layers and greater values for the first layers.To provide approximately the same teaching time for all network neurons, neurons having a greater number of inputs should have a lower value of the teaching parameter than the neurons having a lesser number of inputs.There is an opinion that it could be reasonable to specify the teaching rate parameter value inversely as the square root of the sum of its synaptic contacts -for every neuron.
The above ways to modify the basic teaching algorithm do not solve one of the major problems of this algorithm, namely they do not answer the question: What kind of the target function has been found -a local one or a global one?
To teach the neuronet to recognize the drilling rig pre-emergency situations, a modification of the backpropagation algorithm was proposed.In contrast to the standard algorithm, it features the following: 1.After reaching the local minimum (completing the teaching), a new start point is randomly generated, and teaching recommences.2. After reaching (with a preset precision Е) the same minimum value of a teaching error from different start points К times (К is an algorithm parameter), parameter R -start point generation for teaching -changes (the search radius increases), and the global extremum search continues (the neuronet is taught anew).3.After parameter R reaches Rmax (Rmax is an algorithm parameter), the neuronet is considered to be taught, and the algorithm stops.
The algorithm flowchart is shown in Figure 1.
For the preset value of parameters К and Rmax, the algorithm does the first teaching of the neuronet, saving the Wi weight values found as a local minimum point.Then, a start value of R finds new start values of the neuronet weights in a randomly chosen direction from the minimum found, and the teaching recommences.
If the search from a new start point finds a point with a lower value of the criterion, the attempt counter resets to zero, and new start points will be found from the new-found minimum with the same radius R.After reaching the same minimum point for К times (with the preset precision), the search radius redoubles, and the attempt counter resets to zero.When the radius reaches the search for the preset value of parameter Rmax , the last point is considered to be a global extremum point, and the algorithm completes its operation.

Results and Discussions
The pre-emergency situation recognition classifier based on the neuron network can be implemented in two ways.
The first way involves generating N different signals on the output, each of which corresponds to a single recognized situation and is formed on the basis of the analysis of М indications, that is using a common indication vocabulary for all recognized situations.
The alternative way includes implementing a universal classifier comprising N specialized classifiers, each of which can recognize a single pre-emergency situation and has a single output and m i inputs, with overlapable indication sets used to recognize different preemergency situation: To establish the structure of the neuronet classifier, experiments were conducted to evaluate the influence of the neuronet parameters on the effectiveness of teaching for the recognition of artificially generated situations.This Fig. shows that the optimum number of the hidden layer neurons in the case under investigation is four -which is equal to the number of classifier's inputs.Any further increase in the number of neurons is not reasonable as it prolongs the time necessary to teach the neuronet, without giving any increase in the pre-emergency situation recognition precision.

Conclusions
The results of the research conducted allowed establishing the neuronet classifier structure.It was found out to comprise a single hidden layer with the number of neurons equal to the number of classifier's inputs.
Consequently, an option of the pre-emergency situation classifier formed on the basis of several specialized classifiers with the above chosen structure will be the target of the further research.Validation of the choice and teaching algorithm parameters evaluation demands research using real geological and technological information in order to make a final decision.

Fig. 2 .
Fig. 2. The numbers of teaching iterations as a function of the number of layers and the number of neurons in each layer.