Technologies and Systems for Signaling the Beginning of Accidents on Drilling Rigs Based on the Wattmeter Charts of Their Electric Motors

*Telman Aliev, Gambar Guluyev, Asif Rzayev and Fahrad Pashayev*

## **Abstract**

At present, in order to ensure accident-free operation of drilling rigs, advanced and expensive multifunctional systems of drilling monitoring and control are used. In spite of that a significant number of accidents take place and the probability of their occurrence to a certain extent depends on qualification of a driller, who, on the basis of his experience and also taking into account information from control systems, determines the current technical condition of the drilling string and beginning of possible accidents. Malfunctions are indirectly reflected in the wattmeter chart of the drill string motor. However, the information contained in the wattmeter charts, which reflects the technical condition of the drilling rigs and has a great diagnostic information potential, is not used in the control systems. Therefore, in order to exclude possible mistakes of a driller it is necessary to provide him with tools, allowing to facilitate his intuitive activity. In this regard, in order to ensure accident-free drilling process, it is proposed to create a signaling system to warn the driller about the beginning of a latent period of equipment malfunctions by analyzing the wattmeter chart with the use of possibilities of noise analysis technology and adaptive analoguedigital sampling.

**Keywords:** drilling rig, wattmeter chart, correlation, the noise, accident, malfunction, informative attribute, control, signaling

## **1. Introduction**

At present, the most widespread is rotary drilling, in which the rock-cutting tool is rotated by a special mechanism—rotary spindle or rotor through the drill string.

Various modern systems have been developed and are used to monitor and control the drilling process in order to minimize possible accidents. All these systems of control and management of the drilling process take readings of sensors in real time, carry out processing of measurements, and also perform continuous control and management of a full technological cycle of well construction, carry out forecasting for timely prevention of emergency situations [1–4].

The set of parameters to be controlled when drilling deep wells include: weight on the hook, pressure of flushing fluid at the well inlet, flushing fluid density at the well inlet, rotor torque, flushing fluid flow rate at the well outlet, flushing fluid flow rate at the well inlet, tripping speed, mechanical drilling speed, temperature at the well outlet, etc. [1–4].

Despite the use of the above-mentioned rig control systems (RCS), at present the process of well drilling is accompanied by an unreasonably high number of costly accidents. This is due to the fact that the occurrence of accidents while drilling wells is due to its features such as multifactorial and uncertain mechanisms of accidents, their regional specificity, rapidity, difficult accessibility for instrumental control, vagueness and ambiguity of the observed symptoms [1–4]. Of the above, the results of measurements made during drilling are affected by random factors and, therefore, many experts reasonably believe that the efficiency and safety of drilling with the use of existing systems largely depend on the qualification of the driller.

## **2. Problem statement**

As stated above, nowadays rotary drilling is common, when the rock-cutting tool receives rotation from a special mechanism—rotary spindle or rotor through the drill pipe string or from downhole motor [1, 2]. All these processes are inevitably reflected in the signals received from the sensors of such controlled drilling parameters as bit rotational speed *g*1ð Þ*t* , torque on the rotary spindle of the drilling rig *g*2ð Þ*t* , drill rotor torque *g*3ð Þ*t* , mechanical drilling speed *g*4ð Þ*t* , and axial load on the bit *g*5ð Þ*t* . They carry certain information about the technical condition of the drill rig.

Analysis of the operation of drilling rigs [1, 2] shows that its technical condition in addition to the above signals is also reflected on the wattmeter chart *g t*ð Þ of its electric motor. And at the beginning of the latent period of the emergency state on the rig on the wattmeter chart *g t*ð Þ along with the noise *ε*1ð Þ*t* , caused by external factors, the influence of the onset of a malfunction causes the noise *ε*2ð Þ*t* correlated with the useful signal *X t*ð Þ, which is the carrier of information about the beginning of the latent period of an accident [1–4] *g t*ðÞ¼ *X t*ðÞþ *ε*1ðÞþ*t ε*2ð Þ*t* . This occurs much earlier than the readings of measuring instruments of the RCS change, with the help of which the operating personnel performs control and makes appropriate decisions. In this case, due to the presence of correlation between the useful signal *X t*ð Þ and the total noise *ε*ðÞ¼ *t ε*1ðÞþ*t ε*2ð Þ*t* , the variance of the wattmeter chart *g t*ð Þ is determined from the expression:

$$D\_{\mathcal{g}} = M[(X(t) + \varepsilon(t))(X(t) + \varepsilon(t))] = M[X(t)X(t)] + 2M[X(t)\varepsilon(t)] + M[\varepsilon(t)\varepsilon(t)], \tag{1}$$

where

*Technologies and Systems for Signaling the Beginning of Accidents on Drilling Rigs… DOI: http://dx.doi.org/10.5772/intechopen.111666*

$$M[X(t)X(t)] = D\_X,\\ M[X(t)e(t)] = R\_{Xe}(0) \neq 0,\\ M[e(t)e(t)] = D\_{xx} \neq 0. \tag{2}$$

Consequently, the formula for determining the variance *Dg* of the wattmeter chart *g i*ð Þ Δ*t* can be represented as:

$$D\_{\mathcal{g}} \approx D\_X + 2M[X(t)e(t)] + D\_{ee},\tag{3}$$

which shows that at the beginning of the malfunction of the rig on the wattmeter chart, correlation emerges between the useful signal *X t*ð Þ and the total noise *ε*ð Þ*t* , making it difficult to monitor the onset of a malfunction using conventional techniques. For this reason, RCS does not provide the driller with adequate information about the initial latent period of the malfunction condition.

At first glance, filtering of the noise that accompanies the useful signal *g i*ð Þ Δ*t* can eliminate the influence of these errors on the control result. When the noise spectrum is stable, application of filtering technology usually gives satisfactory results. However, the noise spectrum changes over a wide range during drilling due to drastic changes in the factors of its formation. Because of this, the range of noise spectrum also changes over a wide range and often overlaps with the range of the spectrum of the useful signal. For these reasons, application of the wattmeter chart filtering technology does not achieve the desired result.

On the contrary, a more realistic variant of solving the problem comes down to using noise as a carrier of diagnostic information. However, in this case, in order to ensure the adequacy of the control results, it is also necessary to ensure the accuracy of selection of the sampling interval of the noise *ε*ð Þ*t* of the wattmeter chart *g i*ð Þ Δ*t* . Given this reason, when creating a system for signaling the beginning of a latent period of malfunctions of drilling rig equipment, based on the analysis of the wattmeter chart noise *g i*ð Þ Δ*t* it is also necessary to ensure its adaptive sampling.

## **3. Technology of measuring the wattmeter chart of the electric motor on the drilling rig**

At drilling rigs the beginning of the latent period of accidents and dynamics of its development depend on specifics of the field and technical condition of the equipment, the mode of its operation, etc. The latent period of accidents before they become explicit is always preceded by the onset of malfunction, which is reflected on the wattmeter chart. However, existing control systems do not detect this information about the beginning of the accident reflected in wattmeter charts. Because of this, the information contained in the wattmeter chart and the accompanying noise, which is an important source of information about the onset of malfunctions, is not used. At the same time, between the initial latent period and the time of the accident, there is usually enough time to take measures to prevent the accident. Due to the above, there are cases when it is not possible to prevent an accident on drilling rigs [2–4].

Below, for the 3-wire circuit of the drill string, which supplies power to its **electric motor**, we propose a circuit for measuring power (**Figure 1**), with a distinguishing feature of measuring voltages and currents of all phases relative to the artificial zero.

#### **Figure 1.**

*Schematic of the measurement of the electric motor power consumption parameters.*

As a result, unlike the traditional scheme in which the parameters were measured: *iA*, *iB*, *uAC*, *uBC*, the proposed scheme measures the parameters: *iA*, *iB*, *iC*, *uA*, *uB*, *uC*.

Experimental studies have confirmed that when malfunctions occur on drilling rigs on the wattmeter of the electric motor, by which the drilling string is driven, from a variety of geological and technical drilling conditions, from strong variations in temperature, humidity, wind, etc. the noise *ε*1ð Þ*t* emerges. From the occurrence of various defects in the mechanical parts of the string in the process of drilling (wear, bending, cracking, fatigue, etc.) the noise *ε*2ð Þ*t* forms, which has a correlation with the useful signal *X t*ð Þ of the wattmeter chart [5]. The total noise that accompanies the useful signal *X t*ð Þ wattmeter chart has the following form:

$$
\varepsilon(t) = \varepsilon\_1(t) + \varepsilon\_2(t), \tag{4}
$$

and it is reflected symmetrically in all three phases of the wattmeter chart *g i*ð Þ Δ*t* . Therefore, when forming informative attributes, reflecting the technical condition of the drilling rig, it is advisable to analyze one of the three phases. At the same time, to exclude additional errors arising during analog-to-digital conversion of the wattmeter chart, it is necessary to ensure adaptivity when selecting the sampling interval [5–9].

Note that the parameters of the wattmeter chart *iA*, *iB*, *iC*, *uA*, *uB*, *uC* also contain additional information for equipment diagnostics. For example, the difference in the sum of instantaneous values of phase currents means insulation failures, i.e. current leakage to the motor housing. Measurement according to the proposed scheme allows to determine instantaneous values of power consumption of each stator winding separately, to determine their average values for a certain period, and comparing them with corresponding previous values to make a conclusion about changes in windings (turn-to-turn short circuits).

*Technologies and Systems for Signaling the Beginning of Accidents on Drilling Rigs… DOI: http://dx.doi.org/10.5772/intechopen.111666*

## **4. Control of the beginning of a malfunction of rigs based on changes in the ratio of estimates of the total signal, the useful signal and the noise of the noisy vibration signal**

It is known that in the process of drilling from the occurrence of torsional, axial and lateral vibrations a random vibration process is formed, which is reflected on the wattmeter chart *g i*ð Þ *Δt* . Here, the drilling string in the process of operation goes into the latent period of initiation of various defects [5, 8–11], which are reflected on the wattmeter chart *g i*ð Þ *Δt* as the noise *ε*2ð Þ *iΔt* , which, starting from this moment has a correlation with the useful signals *X i*ð Þ *Δt* . Because of this, the total noise is formed from the noise *ε*1ð Þ *iΔt* , which arises from the influence of external factors and from the noise *ε*2ð Þ *iΔt* caused by various malfunctions. This affects the estimate of the correlation function *Rgg*ð Þ *μ* of the wattmeter chart, which is determined from the formula:

$$R\_{\rm{gp}}(\mu) \approx \frac{1}{N} \sum\_{i=1}^{N} g(i\Delta t) g((i+\mu)\Delta t)$$

$$\approx \frac{1}{N} \sum\_{k=1}^{N} (X(i\Delta t) + e(i\Delta t)) (X((i+\mu)\Delta t) + e((i+\mu)\Delta t)) \approx$$

$$\approx \frac{1}{N} \sum \left[ X(i\Delta t)X((i+\mu)\Delta t) + e(i\Delta t)X((i+\mu)\Delta t) + X(i\Delta t)e((i+\mu)\Delta t) + e((i+\mu)\Delta t) \right]$$

$$+ e(i\Delta t)e((i+\mu)\Delta t) \approx$$

$$\approx R\_{\rm{XZ}}(\mu) + R\_{\rm{xZ}}(\mu) + R\_{\rm{Xe}}(\mu) + R\_{\rm{ex}}(\mu) \approx \begin{cases} R\_{\rm{XZ}}(0) + 2R\_{\rm{Xe}}(0) + R\_{\rm{xc}}(0) \, \upmu \text{when } \mu = 0\\ R\_{\rm{XX}}(\mu) + 2R\_{\rm{Xe}}(\mu) \, \text{when } \mu \neq 0 \end{cases}$$

Experimental studies have shown [3, 4, 6–9] that during the drilling the estimates of *RXε*ð Þ *μ* , *Rεε*ð Þ *μ* of the wattmeter chart of electric motors of drilling rigs represent a tangible value, i.e. the inequality:

$$\begin{cases} R\_{X\epsilon}(\mu) \gg 0 \\ R\_{\epsilon x}(\mu) \gg 0 \end{cases} \tag{6}$$

(5)

takes place, and therefore there is a considerable margin of error in the estimate of *Rgg*ð Þ *μ* .

Because of this there is a difficulty in ensuring the adequacy of the results of control of the performance of the equipment using the estimate of *Rgg*ð Þ *μ* of the wattmeter chart. This is one of the factors hindering the use of traditional noisy signal analysis technologies for malfunction control on drilling rigs. At the same time [4–10], changes in the technical condition of the rig are primarily reflected in the estimates of the variance *Dg* , the wattmeter chart *g i*ð Þ Δ*t* , the variance of the useful signal *DX*, and the noise variance *Dε*.

The studies have shown that in this case an effective informative attribute of the beginning of accidents is the coefficients obtained from the ratios of these estimates, which are determined from the formulas:

$$K\_1 = \frac{D\_X}{D\_\text{g}}, K\_2 = \frac{D\_{\text{cr}}}{D\_\text{g}}, K\_3 = \frac{D\_{\text{cr}}}{D\_X}. \tag{7}$$

where

$$D\_{\mathfrak{g}} = \frac{1}{N} \sum\_{i=1}^{N} \mathfrak{g}^2(i\Delta t),\tag{8}$$

$$D\_X = \frac{1}{N} \sum\_{i=1}^{N} X^2(i\Delta t),\tag{9}$$

$$D\_{\rm cr} = \frac{1}{N} \sum\_{i=1}^{N} \varepsilon^2(i\Delta t). \tag{10}$$

However, the estimates of *DX* and *Dεε* cannot be practically determined from formulas (9) and (10).

It has been shown in [1, 2] that the estimates of *Dεε* of the variance of the total noise *ε*ð Þ *i*Δ*t* can be determined from the expression:

$$D\_{\rm tr} \approx \mathbf{R}\_{\rm tr}(\mathbf{0}) \approx \frac{1}{N} \sum\_{i=1}^{N} \left[ \mathbf{g}^2(i\Delta t) + \mathbf{g}(i\Delta t)\mathbf{g}((i+2)\Delta t) - \mathbf{2g}(i\Delta t)\mathbf{g}((i+1)\Delta t) \right]. \tag{11}$$

Due to this the estimate of the variance of the useful signal *Х*ð Þ *i*Δ*t* can be determined from the formula:

$$D\_{\mathbf{X}} = D\_{\mathbf{g}} - D\_{\mathbf{m}}.\tag{12}$$

Thus, after determining the estimates of *Dg* , *DХ*, *Dεε* from formulas (8), (11) and (12) it is possible to determine from formula (1) the estimates of coefficients *K*1, *K*2, *K*3, which can be used as informative attributes when creating a system for signaling the beginning of malfunctions of a drilling rig.

## **5. Technologies of signaling the beginning of a latent period of malfunctions on the drilling rig**

The technological process of well drilling is characterized by the following features: a large number of random factors, changing over time and affecting the quality and technical-economic indicators of work; variety of geological and technical drilling conditions; distortion of useful signals (load on the hook, torque, power consumption, mechanical drilling speed, etc.) used to determine the drilling mode parameters [1, 2]. Consequently, the main technological drilling parameters are random functions. Because of this, the existing technologies of accident control in drilling need to be improved.

To exclude the possibility of catastrophic accidents, it is advisable to duplicate in control systems several simple and reliable signaling technologies of the beginning of various malfunctions [4–9]. One of such informative attributes of control is the emergence of correlation between the useful signal *X i*ð Þ Δ*t* and the noise *ε*ð Þ *i*Δ*t* of the vibration signals *g i*ð Þ Δ*t* at the beginning of the latent period of the malfunctions on the drilling rig. The conducted studies have shown that for this purpose it is advisable to use the estimates of the relay cross-correlation functions *Rεε*ð Þ *μ* ¼ 0 between the useful vibration signal *X i*ð Þ Δ*t* and the noise *ε*ð Þ *i*Δ*t* , which can be calculated using the formula [1, 2]

*Technologies and Systems for Signaling the Beginning of Accidents on Drilling Rigs… DOI: http://dx.doi.org/10.5772/intechopen.111666*

$$R\_{X\varepsilon}^1 \approx \frac{1}{N} \sum\_{i=1}^N \text{sgn } \mathbf{g}(i\Delta t) \mathbf{g}^2(i\Delta t). \tag{13}$$

It can be shown that the result of calculation using this formula (13) is an approximate estimate of the relay cross-correlation function *R*1 *Xε* between the useful signal *X i*ð Þ Δ*t* and the noise *ε*ð Þ *i*Δ*t* .

For this purpose, taking the known notation and the condition

$$\text{sgn } g(i\Delta t) = \begin{cases} +1 & \text{when} \quad g(i\Delta t) > 0 \\ 0 & \text{when} \quad g(i\Delta t) = 0 \\ -1 & \text{when} \quad g(i\Delta t) < 0 \end{cases} \tag{14}$$

and also taking into account the known Eqs. (7) and (8)

$$\begin{cases} \text{sgn } g(i\Delta t) = \text{sgn } X(i\Delta t) \\ \text{sgn } g(i\Delta t) \cdot g(i\Delta t) = \text{sgn } X(i\Delta t) \cdot [X(i\Delta t) + \epsilon(i\Delta t)] \end{cases} \tag{15}$$

$$\begin{cases} \text{sgn } g(i\Delta t) \cdot g^2(i\Delta t) = \text{sgn } X(i\Delta t) \cdot g^2(i\Delta t) \\ \qquad \qquad \frac{1}{N} \sum\_{i=1}^N \text{sgn } X(i\Delta t) \cdot g^2(i\Delta t) = 0 \end{cases} \tag{16}$$

and also, assuming that the equality at εð Þ¼ *i*Δ*t* ε1ð Þ *i*Δ*t*

$$\begin{cases} \quad \frac{1}{N} \sum\_{i=1}^{N} \text{sgn } X(i\Delta t) \cdot X^2(i\Delta t) = 0\\ \quad \frac{1}{N} \sum\_{i=1}^{N} \text{sgn } X(i\Delta t) \cdot 2 \, X(i\Delta t)e(i\Delta t) = 0\\ \quad \frac{1}{N} \sum\_{i=1}^{N} \text{sgn } X(i\Delta t) \cdot \varepsilon^2(i\Delta t) = 0 \end{cases} \tag{17}$$

it is possible to verify the validity of formula (13) when there is no correlation between *X i*ð Þ Δ*t* and εð Þ *i*Δ*t* .

$$\begin{split} R^1\_{X\epsilon} &= \frac{1}{N} \sum\_{i=1}^N \text{sgn } g(i\Delta t) \cdot g^2(i\Delta t) = \frac{1}{N} \sum\_{i=1}^N \text{sgn } X(i\Delta t) \cdot [X(i\Delta t) + e(i\Delta t)]^2 \\ &= \frac{1}{N} \sum\_{i=1}^N \text{sgn } X(i\Delta t) \cdot X^2(i\Delta t) + \frac{1}{N} \sum\_{i=1}^N \text{sgn } X(i\Delta t) \cdot 2 \cdot X(i\Delta t)e(i\Delta t) \\ &\quad + \frac{1}{N} \sum\_{i=1}^N \text{sgn } X(i\Delta t) \cdot e^2(i\Delta t) \\ &= 0. \end{split} \tag{18}$$

However, from the occurrence of a malfunction on the rig, the noise ε2ð Þ*t* forms, which correlates with the useful signal *X i*ð Þ Δ*t* . As a result, correlation appears between the total noise εð Þ¼ *i*Δ*t* ε1ð Þþ *i*Δ*t* ε2ð Þ *i*Δ*t* and the useful signal *X i*ð Þ Δ*t* and due to this equality is fulfilled:

$$R\_{\mathbf{X}\varepsilon}^{1} = \frac{1}{N} \sum\_{i=1}^{N} \text{sgn } \mathbf{g}(i\Delta t) \cdot \mathbf{g}^{2}(i\Delta t) = \begin{cases} \mathbf{0}, \text{whenene}(i\Delta t) = \mathbf{e}\_{1}(i\Delta t) \\\ R\_{\mathbf{X}\varepsilon}(\mathbf{0}), \text{when } \mathbf{e}(i\Delta t) = \mathbf{e}\_{1}(i\Delta t) + \mathbf{e}\_{2}(i\Delta t) \end{cases} \tag{19}$$

In this case the estimate *R*1 *Xε* is non-zero. Therefore, the estimate obtained by expression (13) can be used as an informative attribute *R*1 *Xε* in control systems for signaling the beginning of a malfunction on a drilling rig. However, to increase the reliability of signaling results, as it is shown in the problem statement, it is advisable to parallelize this technology with other technologies. It is shown in literature [1, 2] that the estimate *R*2 *Xε* of the relay cross-correlation function between the useful signal *X i*ð Þ Δ*t* and the noise *ε*ð Þ *i*Δ*t* can also be calculated from the expression:

$$R\_{X\varepsilon}^2 = R\_{\text{gg}}^\*(\mu = \mathbf{0}) - 2R\_{\text{gg}}^\*(\mu = \mathbf{1}) + R\_{\text{gg}}^\*(\mu = \mathbf{2}) \tag{20}$$

which can also be represented as:

$$R\_{Xx}^2 = \frac{1}{N} \sum\_{i=1}^{N} \left[ \text{sgn } \mathbf{g}(i\Delta t)\mathbf{g}(i\Delta t) - 2 \text{sgn } \mathbf{g}(i\Delta t)\mathbf{g}((i+1)\Delta t) + \text{sgn } \mathbf{g}(i\Delta t)\mathbf{g}((i+2)\Delta t) \right]. \tag{21}$$

At the same time, taking into account the equality:

$$R\_{\rm gg}^{\*}\left(\mu=0\right) = \frac{1}{N} \sum\_{i=1}^{N} \text{sgn } \mathbf{g}\left(i\Delta t\right)\mathbf{g}\left(i\Delta t\right) = \frac{1}{N} \sum\_{i=1}^{N} \text{sgn } X\left(i\Delta t\right)\mathbf{g}\left(i\Delta t\right),\tag{22}$$

$$R\_{\rm gg}^{\*}\left(\mu=\mathbf{1}\right) = \frac{2}{N} \sum\_{i=1}^{N} \text{sgn } \mathbf{g}\left(i\Delta t\right)\mathbf{g}\left((i+1)\Delta t\right) = \frac{2}{N} \sum\_{i=1}^{N} \text{sgn } X\left(i\Delta t\right)\mathbf{g}\left((i+1)\Delta t\right), \tag{23}$$

$$R\_{\rm gg}^{\*}(\mu=2) = \frac{1}{N} \sum\_{i=1}^{N} \text{sgn } \mathbf{g}(i\Delta t)\mathbf{g}((i+2)\Delta t) = \frac{1}{N} \sum\_{i=1}^{N} \text{sgn } X(i\Delta t)\mathbf{g}((i+2)\Delta t). \tag{24}$$

formula (20) can also be represented as:

$$\begin{split} R\_{Xr}^2 &\approx \frac{1}{N} \sum\_{i=1}^N \text{sgn}X(i\Delta t)\mathbf{g}(i\Delta t) - \frac{1}{N} \sum\_{i=1}^N 2\operatorname{sgn}X(i\Delta t)\mathbf{g}(i+1)\Delta t \\ &+ + \frac{1}{N} \sum\_{i=1}^N \text{sgn}X(i\Delta t)\mathbf{g}((i+2)\Delta t), \end{split} \tag{25}$$

where

$$\mathbf{g}\left(i\Delta t\right) = X(i\Delta t) + \varepsilon(i\Delta t),\tag{26}$$

$$\mathbf{g}(i+1)\Delta t = X((i+1)\Delta t) + \varepsilon((i+1)\Delta t),\tag{27}$$

$$\mathbf{g}(i+\mathcal{Z})\Delta t = X((i+\mathcal{Z})\Delta t) + \mathbf{e}((i+\mathcal{Z})\Delta t). \tag{28}$$

In this case, before the appearance of the malfunction, the following equalities are true:

*Technologies and Systems for Signaling the Beginning of Accidents on Drilling Rigs… DOI: http://dx.doi.org/10.5772/intechopen.111666*

$$\begin{aligned} R\_{Xc}^\*(\mathbf{0}) &= \frac{1}{N} \sum\_{i=1}^N \text{sgn } X(i\Delta t)e(i\Delta t) = \mathbf{0} \\ R\_{Xc}^\*(\Delta t) &= \frac{1}{N} \sum\_{i=1}^N \text{sgn } X(i\Delta t)e((i+1)\Delta t) \approx \mathbf{0} \\ R\_{Xc}^\*(2\Delta t) &= \frac{1}{N} \sum\_{i=1}^N X(i\Delta t)e((i+2)\Delta t) \approx \mathbf{0} \end{aligned} \tag{29}$$

and due to this the estimate *R*2 *Xε* will be equal to zero, i.e.

$$R\_{Xr}^2 \approx R\_{\text{gg}}^\*(\mathbf{0}) + R\_{\text{gg}}^\*(2\Delta t) - 2R\_{\text{gg}}^\*(\Delta t) \approx \mathbf{0}.\tag{30}$$

If a malfunction occurs due to additional noise *ε*2ð Þ *i*Δ*t* , correlation occurs between *X i*ð Þ Δ*t* and εð Þ *i*Δ*t* and the following inequality takes place:

$$R\_{X\epsilon}^\*(\mathbf{0}) = \frac{1}{N} \sum\_{i=1}^N \text{sgn } X(i\Delta t)\varepsilon(i\Delta t) \neq \mathbf{0} \tag{31}$$

which causes the informative attribute *R*2 *Xε* to be non-zero, i.e.

$$R\_{\rm Xq}^2 = R\_{\rm gg}^\*(\mathbf{0}) + R\_{\rm gg}^\*(2\Delta t) - 2R\_{\rm gg}^\*(\Delta t) \neq \mathbf{0}.\tag{32}$$

Thus, when a malfunction occurs, the estimate *R*2 *Xε*ð Þ 0 will be non-zero. Consequently, during the normal technical condition of the rig, due to the lack of correlation between *X i*ð Þ Δ*t* and *ε*ð Þ *i*Δ*t* , the estimate of the relay cross-correlation function *R*2 *Xε* between the useful signal and the noise by both expressions (37) and (25) will be close to zero. It is also obvious that from the initiation of malfunctions as a result of the additional noise *ε*2ð Þ *i*Δ*t* , ð Þ *ε*ð Þ¼ *i*Δ*t ε*1ð Þþ *i*Δ*t ε*2ð Þ *i*Δ*t* values of the estimate of the relay cross-correlation function *R*2 *Xε*, due to the correlation between *X i*ð Þ Δ*t* and *ε*ð Þ *i*Δ*t* will be non-zero. Thus, the estimate obtained by expression (20), (25) is the estimate of the relay cross-correlation function *R*2 *Xε* between the useful signal *X i*ð Þ Δ*t* and the noise *ε*ð Þ *i*Δ*t* , which also can be used as an informative attribute to indicate the malfunction on the drilling rig. The distinctive feature of this algorithm is that even violations of such classical conditions as the normality of the distribution law and stationarity of signals *g i*ð Þ Δ*t* in the initiation of various malfunctions, affects the obtained estimate insignificantly. Therefore, when there is a correlation between *X i*ð Þ Δ*t* and *ε*ð Þ *i*Δ*t* , the estimate *R*2 *Xε* can be used to control the onset of accidents. This increases the reliability of the signaling system.

## **6. Technology for controlling the onset and development of malfunctions on the drilling rig**

As shown above, at the beginning of the latent period of malfunction in the process of drilling from the appearance of an additional noise *ε*2ð Þ *i*Δ*t* , the estimate of the cross-correlation function *RXε*ð Þ 0 between the useful signal *X i*ð Þ Δ*t* and the total noise *ε*ð Þ¼ *i*Δ*t ε*1ð Þþ *i*Δ*t ε*2ð Þ *i*Δ*t* is non-zero. Analysis of different versions of malfunction

initiation shows that in controlling them, it is also advisable to control the degree of their development. Naturally, with a stable initial malfunction condition, this estimate does not change over time. However, with the development of the malfunction, this estimate changes, and because of this there is an opportunity, in addition to controlling the presence of malfunctions, to control the degree of development of accidents. Analysis [3–6] has shown that, depending on the degree of development of accidents, on the wattmeter chart, correlation between the useful signal *X i*ð Þ Δ*t* and the noise *ε*ð Þ *i*Δ*t* appears at first at *μ* ¼ 1Δ*t*, then at *μ* ¼ 2Δ*t*, *μ* ¼ 3Δ*t*, then at *μ* ¼ 4Δ*t*, 5Δ*t*, 6Δ*t* and so on. This is due to the fact that the development of accidents leads to an increase in the duration of the correlation in time, i.e., at the beginning there is correlation between *X i*ð Þ Δ*t* and *ε*ð Þ *i* þ 1 Δ*t*. Then further development of the malfunction results in correlation between *X i*ð Þ Δ*t* and *ε*ð Þ *i* þ 2 Δ*t*, and then also between *X i*ð Þ Δ*t* and *ε*ð Þ *i* þ 3 Δ*t*, etc. Therefore, when controlling the degree of development of the malfunction, it is necessary to calculate the estimates corresponding to the crosscorrelation function between *X i*ð Þ Δ*t* and *ε*ð Þ *i*Δ*t* . In works [9] it is shown that it is possible to calculate the estimate *RXε*ð Þ Δ*t* in the presence of correlation between *X i*ð Þ Δ*t* and *ε*ð Þ *i*Δ*t* at *μ* ¼ Δ*t* by the expression

$$R\_{X\varepsilon}^{4} \approx \frac{1}{N} \sum\_{i=1}^{N} [\mathbf{g}(i\Delta t)\mathbf{g}(i+1) - 2\mathbf{g}(i\Delta t)\mathbf{g}((i+2)\Delta t) + \mathbf{g}(i\Delta t)\mathbf{g}((i+3)\Delta t)].\tag{33}$$

The estimate of *RXε*ð Þ 2Δ*t* in the presence of a correlation between *X i*ð Þ Δ*t* and *ε*ð Þ *i*Δ*t* at *μ* ¼ 2Δ*t* can be similarly calculated using the expression

$$R\_{Xc}^{5} \approx \frac{1}{N} \sum\_{i=1}^{N} [\mathbf{g}(i\Delta t)\mathbf{g}(i+2) - 2\mathbf{g}(i\Delta t)\mathbf{g}((i+3)\Delta t) + \mathbf{g}(i\Delta t)\mathbf{g}((i+4)\Delta t)].\tag{34}$$

In the case of correlation between *X i*ð Þ Δ*t* and *ε*ð Þ *i*Δ*t* at *m* different time shifts *μ* ¼ *m*Δ*t*, *m* ¼ 1, 2, 3, … the following generalized expression is true:

$$R\_{Xc}^{\xi} \approx \frac{1}{N} \sum\_{i=1}^{N} \left[ \mathbf{g}(i\Delta t)\mathbf{g}((i+m-1)\Delta t) - 2\mathbf{g}(i\Delta t)\mathbf{g}((i+m)\Delta t) + \mathbf{g}(i\Delta t)\mathbf{g}((i+m+1)\Delta t) \right] \tag{35}$$

Obviously, the possibility of calculating the estimates *RXε*ð Þ *μ* ¼ 1Δ*t* , *RXε*ð Þ *μ* ¼ 2Δ*t* , *RXε*ð Þ *μ* ¼ 3Δ*t* , … , *RXε*ð Þ *μ* ¼ *m*Δ*t* allows us to use them to control not only the beginning, but also the degree of further development of accidents.

Thus, as it follows from the above, using algorithms (33)-(35) makes it possible to determine appropriate informative attributes, which can be used in controlling both the beginning and the degree of development of malfunctions on drilling rigs.

## **7. Possibility of control of the beginning of the latent period of malfunctions with application of the position-vibration technology**

The conducted researches have shown, that for the control of the beginning of malfunctions on drilling rigs application of position-vibration technology (PVT) of *Technologies and Systems for Signaling the Beginning of Accidents on Drilling Rigs… DOI: http://dx.doi.org/10.5772/intechopen.111666*

the analysis of wattmeter charts is also expedient [1–4]. This is due to the fact that in the process of analog-to-digital conversion of wattmeter charts *g t*ð Þ in each sampling interval Δ*t* its amplitude quantization and the sum of the corresponding bits *qk*ð Þ *i*Δ*t* of the sample *g i*ð Þ Δ*t* represents the original signal *g t*ð Þ, (i.e.)

$$\mathbf{g}(t) \approx q\_{n-1}(i\Delta t) + q\_{n-2}(i\Delta t) + \dots \\ \quad + q\_1(i\Delta t) + q\_0(i\Delta t) = \mathbf{g}(i\Delta t). \tag{36}$$

At the same time, each bit *qk*ð Þ *i*Δ*t* of the sample *g i*ð Þ Δ*t* can be taken as a separate positional wattmeter chart and their period h i *Tk* can be determined from the expression

$$
\langle T\_{q\_k} \rangle = \langle T\_{1q\_k} \rangle + \langle T\_{0q\_k} \rangle,\tag{37}
$$

where

$$
\left< T\_{1q\_k} \right> = \frac{1}{\mathcal{Y}} \sum\_{j=1}^{\mathcal{Y}} T\_{1q\_{kj}}, \qquad \left< T\_{0q\_k} \right> = \frac{1}{\mathcal{Y}} \sum\_{j=1}^{\mathcal{Y}} T\_{0q\_{kj}}.\tag{38}
$$

Here *γ* is the number of unit and zero half-periods of the PVS for the observation time *T*, *j* is the sequential number of the *qk*th position of the PVS.

As stated above, the sum of the positional wattmeter charts *qk*ð Þ *i*Δ*t* forms the initial wattmeter chart *g i*ð Þ Δ*t* and if the malfunction on the rig is reflected in the estimate of its distribution law, it will also be reflected in the estimates of the mean frequencies *f q*0 , *f q*1 , … , *f qm* of positional wattmeter charts, which can be calculated from very simple expressions

$$\bar{f}\_{q\_0} = \frac{1}{\langle T\_{q\_0} \rangle} \bar{f}\_{q\_1} = \frac{1}{\langle T\_{q\_1} \rangle} , \bar{f}\_{q\_2} = \frac{1}{\langle T\_{q\_2} \rangle} , \dots , \bar{f}\_{q\_m} = \frac{1}{\langle T\_{q\_m} \rangle} . \tag{39}$$

It is also possible to use the relationship between the beginning of the latent period of accidents with estimates, which are determined from the expressions

$$k\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{1}}}}}}} = \frac{f}{f\_{\!\!q\_{1}}}, \Bbbk\_{\!\!q\_{1}} = \frac{f}{f\_{\!\!q\_{1}}}, \Bbbk\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q}}}}}}}}}}} }\dots}} \delta\_{\!\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q\_{\!\!q}}}}}}}}} \dots}} } } } } } } } } } } $$

$$k\_{q\_0} = \frac{\left\langle T\_{q\_1} \right\rangle}{\left\langle T\_{q\_2} \right\rangle}, k\_{q\_1} = \frac{\left\langle T\_{q\_2} \right\rangle}{\left\langle T\_{q\_3} \right\rangle}, k\_{q\_2} = \frac{\left\langle T\_{q\_3} \right\rangle}{\left\langle T\_{q\_4} \right\rangle}, \dots, k\_{q\_m} = \frac{\left\langle T\_{q\_m} \right\rangle}{\left\langle T\_{q\_{m-1}} \right\rangle}. \tag{41}$$

Obviously, using combinations of estimates of the mean frequencies of positional wattmeter charts *f q*0 , *f q*1 , *f q*2 , … , *f qm* and combinations of the ratios *kfq*0 , *kfq*1 , *kf q*2 , … , *kfm* and *kq*0 , *kq*1 , *kq*2 , … , *kqm* , it is possible to form a set of informative attributes reflecting the beginning of a malfunction on the rigs. In the general case in the absence of malfunctions the combination of approximate equalities will be fulfilled, since in the simplest case these ratios will be close values, i.e.

$$k\_{f\\_q\_0} \approx k\_{f\\_q\_1} \approx k\_{f\\_q\_2} \approx \dots \approx k\_{f\\_q\_{m-1}} \approx k\_{f\\_q\_m},\tag{42}$$

$$k\_{q\_0} \approx k\_{q\_1} \approx k\_{q\_2} \approx k\_{q\_3}, \ \dots, k\_{q\_{m-1}} \approx k\_{q\_m} \,. \tag{43}$$

However, at the beginning of the malfunction, the ratio of these estimates sharply changes, i.e., the following inequalities take place:

$$\mathbf{k}\_{\mathbf{f}\_{\cdot q\_0}} \neq \mathbf{k}\_{\mathbf{f}\_{\cdot q\_1}} \neq \mathbf{k}\_{\mathbf{f}\_{\cdot q\_2}} \neq \dots \neq \mathbf{k}\_{\mathbf{f}\_{\cdot q\_{m-1}}} \neq \mathbf{k}\_{\mathbf{f}\_{\cdot q\_m}},\tag{44}$$

$$k\_{q\_0} \neq k\_{q\_1} \neq k\_{q\_2} \neq k\_{q\_3}, \dots, k\_{q\_{m-1}} \neq k\_{q\_m}.\tag{45}$$

Due to this, they can be used as reliable informative attributes for detecting the beginning of the emergency state. At the same time, using these properties of positional wattmeter charts it is possible to considerably simplify solving problems of control of the beginning of the latent period of accidents on drilling rigs.

## **8. Technology of adaptive determination of the sampling interval in the analog-to-digital conversion of the wattmeter chart**

The conducted studies have shown that the proposed signaling system requires algorithms and technologies for adaptive determination of the noise sampling interval Δ*tε* in real time. This is due to the fact that depending on the depth of the rock-cutting tool, on changes in geological and technical drilling conditions, etc., the spectrum of wattmeter chart changes in time over a wide range, and it depends on many factors. Therefore, taking into account the change in time of both the spectrum of the useful signals *X i*ð Þ Δ*t* as well as the noise *ε*ð Þ *i*Δ*t* from the influence of these factors in order to obtain the desired estimates with the required accuracy, the sampling interval must be determined adaptively in real time. Only in this case the estimates of the required informative attributes can be determined with sufficient accuracy [1, 4]. Our studies have shown that this can be achieved by using the frequency properties of the loworder bit *q*0ð Þ *i*Δ*t* of the sample *g i*ð Þ Δ*t* of the wattmeter chart in its analog-to-digital conversion with excess frequency *f v* that is significantly higher than the traditional sampling frequency *f c*

$$f\_{q\_0} \approx \frac{N\_{q\_0}}{N} f\_v,\tag{46}$$

where *Nq*0 is the number of transitions of the low-order bit *q*0ð Þ *i*Δ*t* of the sample *gV*ð Þ *i*Δ*t* from the unit to the zero state, *N* represents the total number of samples of the analyzed signal *g i*ð Þ Δ*t* , *f q*0 is the frequency of the low-order bit *q*0ð Þ *i*Δ*t* , which represents the target sampling frequency of the wattmeter chart *g i*ð Þ Δ*t* .

In this case, as a result of the analog-to-digital conversion of the wattmeter chart with excess frequency *f v* it is necessary that the inequality *f v* ≫ *f c* holds

As a result, the current adaptive frequency *f q*0 is easily determined when the wattmeter spectrum changes in real time. This process is repeated in each control cycle to ensure that the sampling interval is adapted. This allows the adaptation of the sampling frequency of the wattmeter chart.

With the help of modern controllers, this technology is carried out as follows.

In each signaling cycle, the wattmeter chart *g i*ð Þ Δ*t* during the observation time *T* is converted into a digital code with an excess frequency *f v*, the number of samples is determined *Nq*0 at which the low-order bit *q*0ð Þ *i*Δ*t* of the sample *gV*ð Þ *i*Δ*t* has passed from a unit state to a zero state and using the ratios

*Technologies and Systems for Signaling the Beginning of Accidents on Drilling Rigs… DOI: http://dx.doi.org/10.5772/intechopen.111666*

$$f\_{q\_0} = \frac{N\_{q\_0}}{N} f\_v; \Delta t\_x = \frac{1}{f\_{q\_0}},\tag{47}$$

*f q*0 and Δ*tε* are calculated.

Experimental studies have shown that such adaptive calculation of the sampling interval Δ*tε* is easily implemented by software of modern controllers.

## **9. Example of practical application of the system for signaling the beginning of accidents on drilling rigs based to the results of the analysis of wattmeter charts of their electric motors**

It is experimentally established, the beginning of all characteristic accidents on drilling rigs is reflected that on the wattmeter charts of electric motors, and it is possible to use this information for signaling the beginning of malfunctions. Therefore, this feature of the wattmeter chart is of the most important practical interest, because using them we can increase the degree of accident-free operation of drilling rigs. Because of this, the solution of the problem, creation and practical application of intelligent systems for signaling the beginning of the latent period of failures with the use of diagnostic information contained in the wattmeter chart, can be considered a priority.

It is known that nowadays the driller intuitively identifies the occurred malfunction by the information provided from the existing monitoring and control systems on the basis of many years' experience, according to the situation in real conditions. However, sometimes his decision turns out to be belated, and a catastrophic accident is not prevented. To prevent it, **Figure 2** shows a block diagram of one of the possible variants of the system for signaling the beginning of accident, which consists of the following modules [1–4]:

1.wattmeter measurement module;

2.module of analog-to-digital conversion of the wattmeter chart, *g t*ðÞ¼ *g i*ð Þ¼ Δ*t X i*ð Þþ Δ*t ε*ð Þ *i*Δ*t* ;

**Figure 2.** *Intelligent system for signaling of the beginning of accidents ISSA.*

During the operation of the ISSA, the input of module 1, i.e. the input of the analog-to-digital converter, receives a wattmeter chart *g t*ð Þ, converting it to digital code *g i*ð Þ Δ*t* . Using formulas (12), (14)–(18), (37), (38) in module 2 the estimates of corresponding informative attributes *K*1,*K*2, *K*3, *R*1 *Xε*, *R*2 *Xε*, *R*3 *Xε*, *R*4 *Xε*, *R*5 *Xε*,*Kf q*0 n ,

*Kf q*1 , … , *Kf qm* , … , *Kq*0 , *Kq*1 , … ,*Kqm* o are determined, which are stored in the modules 31, 32, ..., 3*m*. If they exceed the experimentally set threshold value, then the corresponding signals are sent to module 6. In this case, if all the current estimates are greater than the corresponding reference estimates, then module 5 generates a warning signal and also triggers an alarm about the beginning of the accident. However, in cases where some of the estimates will be greater than the reference ones, and others will be lower than their reference ones, then only a warning signal is formed. As a result, during the system's operation, the results obtained due to the use of estimates of the proposed informative attributes allow signaling the beginning of malfunctions in real time and provide information about it to the driller.

In order to increase the efficiency of the ISSA, there is also a mode of using the information contained in the wattmeter chart during the occurrence of typical, i.e. frequently recurring malfunctions. For this purpose, during the operation of the unit, when typical malfunctions occur, at the command of the driller, reference wattmeter charts are saved into the memory of module 7 *ge*ð Þ *i*Δ*t* . This process continues for a sufficient period of time and results in the storage of reference wattmeter charts of all possible recurring malfunctions.

Then, at the request of the driller, the ISSA switches to the mode of identifying the current wattmeter charts of the malfunction that has occurred. To do this, module 8, using the formula:

$$r\_{j\epsilon} = \frac{\frac{1}{N} \sum\_{j=1}^{n} \mathbf{g}\_j(i\Delta t) \mathbf{g}\_{\epsilon}(i\Delta t)}{\frac{1}{N} \sum\_{i=1}^{n} \mathbf{g}\_j^2(i\Delta t)}\tag{48}$$

between the current *gj* ð Þ *i*Δ*t* and reference *ge*ð Þ *i*Δ*t* wattmeter charts successively determines the estimate of the correlation coefficient *rje*, where *j* is the number of current typical malfunctions, *e* is the number of reference wattmeter charts of characteristic malfunctions, *rje* is the estimate of the normalized cross-correlation function between *gj* ð Þ *i*Δ*t* and *ge*ð Þ *i*Δ*t* .

*Technologies and Systems for Signaling the Beginning of Accidents on Drilling Rigs… DOI: http://dx.doi.org/10.5772/intechopen.111666*

Due to this, by successive comparison of the obtained estimates of the correlation coefficients between the current wattmeter chart and the wattmeter chart of typical malfunctions, the number of malfunctions is determined, at which the obtained estimate *rje* has the maximum value. Based on the found number of reference wattmeter charts, modules 7, 8 identify the beginning of the emergency state of drilling rig.

Experiments have shown that using the number of records of the reference typical wattmeter charts *ge*ð Þ *i*Δ*t* at which the estimate of the normalized cross-correlation functions from the current wattmeter chart *gj* ð Þ *i*Δ*t* takes a maximum value, we can reliably determine the number of the current typical malfunction. The advantage of using ISSA to identify a malfunction in this mode is that it greatly facilitates the work of the driller in determining the malfunction that has occurred. Note that the decision to use ISSA in this mode is up to the master, and if not necessary, he may exclude this option.

## **10. Conclusion**

## **Author details**

Telman Aliev1 \*, Gambar Guluyev1 , Asif Rzayev2 and Fahrad Pashayev2

\*Address all correspondence to<EMAIL_ADDRESS>
© 2023 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

*Technologies and Systems for Signaling the Beginning of Accidents on Drilling Rigs… DOI: http://dx.doi.org/10.5772/intechopen.111666*

## **References**

[1] Aliev T. Noise Control of the Beginning and Development Dynamics of Accidents. Switzerland: Springer; 2019. p. 201

[2] Aliyev TA, Mamedov SI. Telemetric information system to prognose accident when drilling wells by robust method. Oil Industry Journal. 2002;**3**:32-34

[3] Aliev TA, Alizada TA, Rzayeva NE, et al. Noise technologies and systems for monitoring the beginning of the latent period of accidents on fixed platforms. Mechanical Systems and Signal Processing. 2017;**87**:111-123. DOI: 10.1016/j.ymssp.2016.10.014

[4] Aliyev TA, Alizada TA, Rzayeva NE. Robust technology and system for management of sucker rod pumping units in oil wells. Mechanical Systems and Signal Processing. 2018;**99**(15):47-56

[5] Dong G, Chen P. The vibration characteristics of drillstring with positive displacement motor in compound drilling. Part1: Dynamical modelling and monitoring validation. International Journal of Hydrogen Energy. 2018;**43**(5): 2890-2902. DOI: 10.1016/j. ijhydene.2017.12.161

[6] Metin M, Guclu R. Rail vehicle vibrations control using parameters adaptive PID controller. Mathematical Problems in Engineering, Hindawi. 2014: 1-10

[7] Lin CC, Wang JF, Chen BL. Traininduced vibration control of high-speed railway bridges equipped with multiple tuned mass dampers. Journal of Bridge Engineering. 2005;**10**(4):398-414

[8] Yang YB, Yang JP. State-of-the-art review on modal identification and damage detection of bridges by moving test vehicles. International Journal of Structural Stability and Dynamics. 2018; **18**(2):1850025. DOI: 10.1142/ S0219455418500256

[9] Guo W, (G), Jin J(J), Hu SJ. Profile monitoring and fault diagnosis via sensor fusion for ultrasonic welding. Journal of Manufacturing Science and Engineering. 2019;**141**(8):081001-1-81001-13. DOI: 10.1115/1.4043731

[10] Ghasemloonia A, Rideout DG, Butt SD. A review of drillstring vibration modeling and suppression methods. Journal of Petroleum Science and Engineering. 2015;**131**:150-164. DOI: 10.1016/j.petrol.2015.04.030

[11] Dong GJ, Chen P. A review of the evaluation, control, and application technologies for drill string vibrations and shocks in oil and gas well. Shock and Vibration. 2016;**2016**:1-34. DOI: 10.1155/ 2016/7418635

## **Chapter 6**