SPE-187270-MS A New Approach to Harness Data for Measuring Invisible Lost Time in Drilling Operations Vikrant Lakhanpal, Well Engineering Research Center for Intelligent Automation, University of Houston; Robello Samuel, Halliburton Copyright 2017, Society of Petroleum Engineers This paper was prepared for presentation at the SPE Annual Technical Conference and Exhibition held in San Antonio, Texas, USA, 9-11 October 2017. This paper was selected for presentation by an SPE program committee following review of information contained in an abstract submitted by the author(s). Contents of the paper have not been reviewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The material does not necessarily reflect any position of the Society of Petroleum Engineers, its officers, or members. Electronic reproduction, distribution, or storage of any part of this paper without the written consent of the Society of Petroleum Engineers is prohibited. Permission to reproduce in print is restricted to an abstract of not more than 300 words; illustrations may not be copied. The abstract must contain conspicuous acknowledgment of SPE copyright. Abstract Drilling operations can include invisible lost time (ILT), within productive time and nonproductive time (NPT). ILT is the time lost because a portion of the drilling operation is not performed at maximum efficiency. Current industry techniques use subjective decision making to calculate NPT, which only illustrates that ILT is present and does not address the root cause. By considering the dynamic downhole conditions and comparing the time necessary for various personnel to perform the same operations, a threshold time can be calculated for each operation, which is used to calculate NPT. After NPT is calculated, the real-time drilling data are converted to segmented drill-time data [i.e., the time necessary for each activity (Δt)] to convert to a time-series analysis problem. The algorithm developed decomposes the obtained time series into its intrinsic mode functions (IMFs) using the ensemble empirical mode decomposition (EMD), which tolerates residual noise in the signal. Mode mixing is a significant issue when the drilling data are converted into a time-series problem. Hence, an energy conservation principle is presented to identify and help eliminate the false mode components; thereby, only the components that truly represent the drilling activities are used for further calculations. The true characteristic IMFs are then combined with their weights to obtain a modified Δt series, which represents ILT. The weight estimation process is performed automatically to maximize the kurtosis and entropy of the Δt series. The NPT is calculated again from the modified Δt series using the technique previously described. The new NPT provides a higher value of NPT from which ILT can be computed using simple subtraction. After ILT is identified and calculated, the ILT cause can be ascertained by analyzing the drilling parameters, such as rate of penetration (ROP), weight on bit (WOB), torque, and flow rate, using an algorithm similar to the one previously discussed. The proposed method can be integrated with future management and well design plans to help improve drilling operation efficiency. The proposed workflow automates the entire calculation process, thereby reducing human interference and maximizing the time value of information. Additionally, this paper proposes another simpler analysis tool that is based on pattern analysis of the final IMF obtained from the decomposition of a time series. This observation-based tool proposes that if a process 2 SPE-187270-MS is nonproductive, then the final IMF will have a downward parabolic trend. If the personnel performance is consistent, then the final IMF will have an upward parabolic trend. This paper presents four field case studies to help prove the hypothesis of this work. Introduction Drilling time performance analysis is a fundamental step in continuous operations improvement that helps optimize performance of normal activities and identify and evaluate NPT to mitigate the causes on successive wells. The conventional method for classifying well drilling operations on a time-based scale includes productive time and NPT. However, there could be some deviations within the same tasks and similar restrictions. de Oliveira et al. (2016) showed that only the visible NPT is manually reported in the morning report system as an unexpected stop of operation (downtime) related to unavailable equipment, environmental conditions, and other issues. The time lost because of process inefficiencies is not included in the reporting system. This inefficiency is ILT (Bond et al. 1996), which is defined as the time spent beyond the target time on every operation. To measure ILT, an automated measurement system was necessary (Niedermayr et al. 2005; Andersen et al. 2009; Maidla and Maidla 2010) because this task cannot be performed by any person on the rig site or in a command center (or remote operating centers). Though there is sufficient literature, the definition of NPT and ILT varies from company to company. Thus, a set definition of these categories and an automated system to calculate NPT and invisible NPT (INPT) is necessary. Methodology This work categorizes unplanned scenarios as either NPT or productive time, with a dimension of invisible time. The idea is to create a "gray area" that defines the events as productive time, NPT, or INPT, depending on the specific case. Next, NPT and INPT is calculated from the Δt, rather than monitoring the time elapsed. The Δt series can be decomposed into its IMFs using the EMD. It can then be reconstructed by combining the IMFs with different weights to obtain a modified Δt series, which represents the INPT. EMD is a signal decomposition technique that is particularly suitable for the analysis of nonstationary and nonlinear data (Huang et al. 1998). Celebi (2012) showed that the quality of underwater images could be enhanced through EMD and a genetic algorithm (GA). First, the image [two-dimensional (2D) matrix] was decomposed into multiple IMFs using EMD. Next, coefficients or weights were imposed on each IMF. Finally, a GA can be used to optimize the weight of the IMFs to help improve the image quality by minimizing the signal entropy. This study discusses the application of these signal reconstruction concepts for time series enhancement and NPT calculation. The Δt series is reconstructed by combining the IMFs with different weights to obtain a modified Δt series, which represents the INPT. The weight estimation process is performed automatically using a GA (although any optimization algorithm can be used) that optimizes the IMF weights to maximize the kurtosis and entropy of the Δt series. The NPT calculated using this modified Δt series provides a greater NPT from which INPT can be computed by means of simple subtraction. Thus, a total INPT can be calculated using the proposed method, which can be integrated with future management and well design plans to help improve drilling operation efficiency. The following sections discuss each of the previously mentioned steps and the study results. The sections are structured in two parts. Part 1 briefly discusses the different activities considered during NPT calculation. Part 2 focuses on the signal reconstruction algorithm used to calculate INPT. SPE-187270-MS 3 Part 1: Defining Time Scales and the "Threshold" Time to Calculate NPT During this study, eight different activities were recognized for time calculations. These activities include rotary drilling, slide drilling, reaming, back reaming, in slip, rotating off-bottom, tripping in, and tripping out. While some of these activities can be classified as completely productive and nonproductive, other activities are case dependent and thus are defined in the gray area. For example, time in slip mode is NPT. However, it is crucial for the drilling assembly to be in slip mode to avoid failure caused by fatigue. The time spent in slip depends on the rig personnel performance and environmental conditions. For a specific well, a threshold value can be calculated by monitoring the time spent in slip. The threshold time is the minimum time that is necessary for the assembly to be in slip mode, which accounts for the rig conditions different personnel might have encountered. If the drilling assembly is in slip beyond the threshold time, it is considered INPT (Fig. 1). Figure 1—The chosen threshold value is 0.02. Any time beyond this threshold (orange) is considered NPT. The blue portion illustrates the productive dimension. Similarly, during tripping in and tripping out activities, the optimum speed to pull the pipe out of hole is calculated from the data. Based on this speed, the time necessary to pull out the pipe from different depths is calculated, which accounts for the rig conditions different personnel might have encountered. If the time necessary is greater than the threshold for that depth, the extra time is considered NPT. Similarly, the threshold can be calculated for all the previously mentioned activities (Eq. 1). (1) To incorporate real-time rig conditions, activities, such as reaming and back reaming, are considered in a case-specific subjective manner. If the reaming or back reaming operation is performed for necessary activities, such as hole enlargement, it is considered productive time. Otherwise, it is NPT. Fig. 2 shows the conventional classification of productive time and NPT. Fig. 3 shows the proposed classification of the activities. These activities are classified in the gray area and are treated as productive time or NPT, depending on the operation conditions. 4 SPE-187270-MS Figure 2—Conventional categorization of productive time and NPT. Figure 3—Proposed categorization of productive time and NPT. Part 2: Signal Reconstruction to Calculate INPT This section discusses how the Δt series is decomposed into its IMFs and how these IMFs are used to reconstruct a time series. The Δt series is decomposed into its IMFs using the improved EMD. It is then reconstructed by combining the IMFs with different weights to obtain a modified Δt series, which represents the INPT. Step 1: EMD. EMD provides important advantages compared to wavelet (Janusauskas et al. 2005) and Fourier transform techniques (Zhidong and Yang 2007). Although many actual systems are nonlinear and nonstationary, the data are assumed to be stationary and linear in the Fourier transform technique. In the wavelet transform technique, it is possible to use different wavelet types, and the performance can change according to this selection. However, EMD does not have basis functions and decomposes the signal based on its intrinsic properties. IMFs can contain both high- and low-frequency details at different signal locations depending on the signal characteristics. EMD uses the benefit of the sifting property of a series. It decomposes an arbitrary series into a finite number of modes or IMFs, regardless of the linear or stationary nature of a series. An IMF is a function that satisfies two conditions: • • In the entire data set, the number of extrema and the number of zero crossings should either be equal or differ at most by one. At any point, the mean value of the envelope defined by the local maxima and the envelope defined by the local minima is zero. The decomposition is based on the following assumptions: • The signal has at least two extrema: one maxima and one minima. SPE-187270-MS • • 5 The characteristic time scale is defined by the time lapse between the extrema. If the data were totally devoid of extrema and contained only inflection points, then they can be differentiated one or more times to reveal the extrema. Final results can be obtained by integration(s) of the components. The EMD process is as follows: 1. For a given data set, determine all local maxima and connect them to develop an upper envelope using a cubic spline. Likewise, determine all the local minima and connect them to develop a lower envelope using cubic spline. 2. Determine the mean of the upper and lower envelope and denote this mean as m1. The difference between the original signal and the mean becomes the first component h1 as (2) If h1 satisfies the IMF conditions, it will be the first IMF. Otherwise, new maxima and minima shall again be identified, and Steps 1 and 2 are repeated. This repeated process is known as sifting. (3) (4) Or, (5) The same steps are repeated to determine the second IMF. (6) Here, r1 is assumed to be the original signal. The previous steps are repeated to determine the second IMF, c2. Thus, after the nth iteration, the original signal can be decomposed into n number of IMFs (Eqs. 7 and 8): (7) (8) This process is repeated until the original signal becomes a monotonic function; thereby, no additional IMFs can be deduced. EMD can decompose the signal based on its intrinsic properties. However, mode mixing is a significant drawback of EMD, which implies that either a single IMF consists of signals with dramatically disparate scales, or a signal of the same scale appears in different IMF components. To address this issue, Li et al. (2016) presented an energy conservation principle and IMF superposition principle to eliminate mode mixing of the EMD. The false mode components are removed from the obtained IMF set as follows. • • • The energy conservation principle (Li et al. 2016) is used to detect whether any false mode components are present. If , IMFs are nonorthogonal and false mode components exist. Therefore, the decomposition results should be checked further. The cross-correlation coefficient between each IMF and the original signal is calculated. The IMF ci(t) with the maximum cross-correlation coefficient is selected as a real mode component. If the jth-mode component cj(t) is added to ci(t) in the time domain, the total energy decreases (i.e., , where cj(t) is a false mode component; otherwise, cj(t) is a real mode component). IMF energy can be defined as 6 SPE-187270-MS • • (9) False mode components are subtracted from the original signal. Then, the EMD process is repeated. The stop criterion indicates all false mode components are eliminated. Fig. 4 shows the set of actual IMFs obtained from the previously discussed algorithm. The new set of actual IMFs should be used for further analysis (Step 2). Figure 4—The set of actual IMFs obtained using the improved EMD algorithm. Step 2: Reconstruction and GA Optimization. To obtain an enhanced time series, the individual IMFs are summed using different weights. The enhancement approach can therefore be expressed by Eq. 10. (10) Here, T(Wi, IMFi) is the final enhanced time series. At this point, a GA (Mitchell 1999) is used to obtain the weight set automatically in an optimum manner. A GA is preferred because it is a proven approach for solving optimization problems that are based on natural selection. The GA is used to determine the optimum weight set to maximize the kurtosis and energy of the time series. This approach is selected because the entropy measures the richness of information in a signal or a series, and kurtosis is expected to maximize the features that are suppressed (DeCarlo 1997). Here, these two properties are hypothesized to represent the invisible dimension of NPT. Eq. 11 shows the objective function of the GA (kurtosis) calculation. (11) SPE-187270-MS 7 Here, n denotes the value that corresponds to the current time stamp, and s is the standard deviation of the data set. The GA is a heuristic search technique based on evolutionary biology that makes use of inheritance, mutation, selection, and crossover. A GA repeatedly modifies a population of individual solutions. At each generation, the GA randomly selects individuals from the current population to be parents and produces the children for the next generation. After several generations, the algorithm converges to the global optimum solution of the problem. Step 3: Calculating INPT. The NPT calculation algorithm developed during Part 1 is used again to calculate NPT from the modified time series obtained after the EMD-GA approach. The original time series and the reconstructed time series are compared to calculate the INPT. The invisible time features are enhanced, and the NPT calculated is higher than the NPT calculated from the original time series. The difference between the two NPTs is the INPT. Four different case studies were conducted to implement and validate the study results. In one case, the NPT calculated from the original time series was 33 hours. The NPT calculated from the optimized or enhanced time series was 47 hours. These extra 14 hours are the INPT. Fig. 5 summarizes the proposed algorithm. After ILT is identified and calculated, the ILT cause can be ascertained by analyzing the drilling parameters, such as ROP, WOB, torque, and flow rate, using the proposed algorithm. Figure 5—Proposed methodology flow chart. Quick Scan: Final IMF Analysis This paper also proposes a simple analysis tool that is based on analysis of the final IMF pattern obtained from the decomposition of a given time series. This work presents four case studies to help prove the hypothesis. Figs. 6 through 9 show the Δt plot, bit depth plot, hole depth plot, and the final IMF obtained from the decomposition of the Δt series for the four different cases. 8 SPE-187270-MS Figure 6—Case 1. Figure 7—Case 2. Figure 8—Case 3. SPE-187270-MS 9 Figure 9—Case 4. Based on the observations, it can be concluded that if a process is highly nonproductive, then the final IMF should have a downward parabolic trend. If the personnel performance is consistent, then the final IMF should have an upward parabolic trend. Conclusions The proposed novel workflow leads to a structured methodology for analyzing drilling operations and recommending corrective actions. The EMD-GA approach efficiently optimizes the time series properties based on the boundary conditions encountered during drilling. The INPT calculated using this approach can be incorporated in future drilling and management plans for quicker and more reliable decision making. Furthermore, the proposed procedure can be automated and used as a plugin with any software, thereby making the entire process quicker and simpler. This paper combines subject matter expertise and advanced analytical capabilities to simplify daily work and derive useful and reliable information from the significant gigabytes of data recorded. Acknowledgments The authors thank Halliburton and the Well Engineering Research Center for Intelligent Automation (WeRcia) at the University of Houston for permission to present this paper. Nomenclature hi = IMFi = K= mi = n= s= T= wi = x(t) = Xi = Xavg = Δt = ith component in the EMD process ith IMF kurtosis mean of the ith component in the EMD process number of time stamp standard deviation of the recorded data reconstructed, optimized, or enhanced time series weight assigned to ith IMF value corresponding to tth time stamp value corresponding to the nth time stamp average value recorded time necessary for a specific activity 10 SPE-187270-MS References Andersen, K., Sjøwall, P.A., Maidla, E.E. et al. 2009. Case History: Automated Performance Measurement of Crews and Drilling Equipment. Presented at the SPE/IADC Drilling Conference and Exhibition, Amsterdam, The Netherlands, 17–19 March. SPE-119746-MS. https://doi.org/10.2118/119746-MS. Bond, D.F., Scott, P.W., Page, P.E. et al. 1996. Step Change Improvement and High Rate Learning are Delivered by Targeting Technical Limits on Sub-Sea Wells. Presented at the SPE/IADC Drilling Conference, New Orleans, Louisiana, USA, 12–15 March. SPE-35077-MS. https://doi.org/10.2118/35077-MS. Celebi, A.T. 2012. Visual enhancement of underwater images using Empirical Mode Decomposition. Expert Syst Appl 39 (1): 800–805. https://doi.org/10.1016/j.eswa.2011.07.077. DeCarlo, L.T. 1997. On the Meaning and Use of Kurtosis. Psychol Methods 2 (3): 292–307. http:// doi.org/10.1037/1082-989X.2.3.292. de Oliveira, G.L., Zank, C.A.C., Costa, A. F. de S. et al. 2016. Offshore Drilling Improvement Through Automating the Rig State Detection Process - Implementation Process History and Proven Success. Presented at the IADC/SPE Drilling Conference and Exhibition, Fort Worth, Texas, USA, 1–3 March. SPE-178775-MS. https://doi.org/10.2118/178775MS. Feigenbaum, A.V. 1991. Total Quality Control, third edition. New York, NewYork: McGraw-Hill, Inc. Huang, N.E., Zheng, S., Long, S.R. et al. 1998. The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis. P Roy Soc Lond A Mat 454 (1971): 903–995. https://doi.org/10.1098/ rspa.1998.0193. Janusauskas, A., Jurkonis, R., Lukosevicius, A. et al. 2005. The Empirical Mode Decomposition and the Discrete Wavelet Transform for Detection of Human Cataract in Ultrasound Signals. Informatica 16 (4): 541–556. Li, Y., Liu, J., and Wang, Y. 2016. Railway Wheel Flat Detection Based on Improved Empirical Mode Decomposition. Shock Vib 2016 Article ID 4879283. http://dx.doi.org/10.1155/2016/4879283. Maidla, E.E. and Maidla, W.R. 2010. Rigorous Drilling Nonproductive-Time Determination and Elimination of Invisible Lost Time: Theory and Case Histories. Presented at the SPE Latin American and Caribbean Petroleum Engineering Conference, Lima, Peru, 1–3 December. SPE-138804-MS. https://doi.org/10.2118/138804-MS. Mitchell, M. 1999. An Introduction to Genetic Algorithms, fifth printing. Cambridge, Massachusetts: The MIT Press. Niedermayr, M., Pinckard, M.D., and Glaser, G.P. 2005. Automated method and system for determining the state of the well operations and performing process evaluation. US Patent No. 6,892,812 B2. Zhidong, Z. and Yang, W. 2007. A New Method for Processing End Effect in Empirical Mode Decomposition. Proc., International Conference on Communications, Circuits and Systems, Kokura, Japan, 11–13 July, 841–845. https:// doi.org/10.1109/ICCCAS.2007.4348181.