Development of an Intelligent System for the Analysis of both Static and Real-time Oil and Gas Well Drilling Data

The growing demand of digital oilfield in oil and gas industry leads extensive research on the development of engineering software for the analysis of real-time oil and gas drilling data. The Intelligent Drilling Advisory system (IDAs) is an engineering software and being developed to provide a way for the drilling engineers to visualize, collaborate and analyze drilling operational data in real-time in an office environment. WITSML (Wellsite Information Transfer Standard Markup Language) is a web-based oil and gas industry standard used to conduct transfer of drilling data between the developing system (IDAs) and onsite or remote WITSML servers. IDAs uses WITSML SOAP interfaces to retrieve both static and real-time drilling data updating from the server and provide meaningful analysis using different engineering modules for enhanced decision-making to the ongoing drilling operation. The intelligent system is successfully tested with real WITSML servers to verify the functionalities of the engineering modules, as well as, the system itself.


Introduction
The researchers and drilling engineers have been working to develop an advanced engineering tool or software for the oil and gas industry since many years which can provide safer, efficient and cost-saving drilling operations.The visualization and analysis of the real-time drilling data can lead to reduce the complexity of drilling operation as well as drilling cost.To fulfill this goal, the Intelligent Drilling Advisory system (IDAs) is being developed which performs as an efficient engineering tool for visualization, collaboration and analysis of both static and real-time (dynamic) drilling operational data (Tahmeen et al., 2008).Examples of such drilling data analysis include real time total frictional pressure losses in well fluid circulating system, bit wear estimation, torque and drag analysis and trending of d-exponents to predict formation pore pressure etc. and these are discussed in the engineering modules section below.The Wellsite Information Transfer Standard Markup Language (WITSML), an industry standard language, is used for well-site data transmission between our developing system (IDAs) and operational drilling data servers.IDAs supports both WITSML versions 1.2.0 and 1.3.1.1.The version 1.3.1.1 is the most current stable version used in oil industry although the version 1.4.0 is being developed and currently active.
Wellsite Information Transfer Specification (WITS) has been used as an industry standard since mid 80s (Energistics, 2005).WITS uses binary file format for transferring drilling data which is almost non-human readable (Sellick, 2008).It does not have any standard programming interface and limited data objects.Later 'Energistics' has developed a user-friendly secure web-based industry standard, WITSML (Wellsite Information Transfer Standard Markup Language) that uses standard XML document format for drilling data transmission.The supporting and historical documentation of WITSML standard and its basic feature are available in the website of 'Energistics' (Energistics, 2005).WITSML is platform and language independent.It is object oriented and offers rich data objects.The WITSML standard consists of a set of data objects such as 'log', 'trajectory', 'realtime' and 'mudLog' and some API (Application Programming Interface) functions.A WITSML data object is a logical organization of data items related to specific operation involved in drilling a well and always represented as XML document.The WITSML API defines interfaces that can be implemented by a WITSML server for transporting WITSML data objects between client system and server using SOAP (Simple Object Access Protocol) web service.It has two types of interfaces: PUBLISH and STORE (WITSML, 2005).SOAP is an industry standard and this protocol is used by the client application (IDAs) for sending requests to and receiving responses from Web Services.The Web service response is an XML document that describes the Web service.This document is called Web Service Description Language (WSDL).The WITSML standard includes two WSDL files which are used to expose PUBLISH and STORE interfaces to SOAP clients.
The user-friendly intelligent system (IDAs) retrieves well site information, both static and dynamic, in XML document format from any onsite or remote WITSML server using WITSML STORE API functions.There are seven STORE interface functions (WITSML, 2005) to perform data transformation between WITSML server and SOAP client (IDAs).The STORE API functions are as follows: WMLS_AddToStore -Add one new object to the server.
WMLS_DeleteFromStore -Delete one existing object from the server.
WMLS_GetBaseMsg -Get the fixed 'base' description of a return value.
WMLS_GetCap -Get the server's Capabilities object.
WMLS_GetFromStore -Get one or more objects from the server.
WMLS_GetVersion -Retrieve the data version(s) that are supported.
WMLS_UpdateInStore -Update one existing object on the server.
IDAs is able to use almost all STORE API functions and it extensively uses 'WMLS_GetFromStore' STORE API to retrieve drilling data from the server.The user is able to visualize operational drilling data and analyze the data using different engineering modules of the system, which leads to improve decision-making to ongoing and future drilling operations based on historical and current drilling data.WITSML standard drilling data can be both depth and time based and is updated in every 1 second by the server too.This information makes the server much more trusted data source in terms of reporting and benchmarking.WITSML APIs are currently being tested in the oil and gas industry to automate reporting and drilling for the next generation drilling rigs that will be fully automated in the next decades to come.The use of WITSML is enabling asset teams and business units amongst operators to identify and reduce the invisible lost time to improve drilling performances (Oort et al., 2008).

System Architecture
The intelligent system is developed to retrieve the static or real-time (dynamic) drilling data from any WITSML server and remotely display and analyze the data at multiple locations like onshore drilling centers or any office location of drilling and operational engineers.Our system is a SOAP Client which allows the user to access WITSML data source and executes WITSML method at remote Web Services.The overall architecture mainly includes three parts as shown in Figure 1 and our system basically consists of two of them shown in the 'Office Location' site.The three necessary parts are explained in the following sections.

WITSML Data Source
The oil drilling data is transferred from oil rig sensors to a WITSML data server by the well site service company.The well site service company is, generally, a diversified solutions provider for the oil and gas industry.A service company provides offshore and land drilling services including efficient drilling rigs, rental equipment and services utilized in the completion and production stages of a well and workforce accommodations and logistics.The WITSML SOAP server invokes WITSML API for data exchange between server and SOAP client.A WITSML server is a source of both static and real-time (dynamic) drilling data.
IDAs is not developed including this WITSML data source.This section is a requirement of the system to retrieve oil drilling data for the visualization and analysis.

Server Authentication
This section is the key step to start working with our system.The system needs proper server authentication to retrieve drilling data from a WITSML server using web service protocol.A valid URL (Uniform Resource Locator), Username/Login name and Password are required for proper server authentication.The URL is the address of a specific website of a WITSML server.The system supports the existing standard URL schemes, like, HTTP (Hypertext Transfer Protocol) and HTTPS (Hypertext Transfer Protocol Secure).HTTPS is a combination of HTTP with SSL (Secure Socket Layer) or TSL (Transparent Layer Security) protocol to provide encryption and secure identification of the server.The user needs a personal login account to get access of a specific WITSML server.The unique username and password can be any combination of letters and numbers.For the invalid authentication request by the SOAP client (IDAs), the server promptly denies the access request.

Visualization, Collaboration and Analysis
The drilling data retrieval process is performed by the user of the system after successful well selection, as well as, the required channels selection procedures.Currently, Energistics does not provide a universal channel nomenclature standard for WITSML and therefore the users have to select required channels for the system to recognize and perform the correct analysis.The system supports the visualization and analysis of both static and real-time (dynamic) drilling data available in the WITSML server.This data can also be collaborated amongst the drilling, sub-surface and reservoir teams to effectively plan, geo-steer, prevent non-productive drilling time and finally maintain a knowledge database for future play back and planning of wells.All these components are very critical in drilling a well on paper (DWOP) and the technical limit process (Poupet et al., 2000) to aid in drilling a well cost effectively and within minimum surprises.The procedure of drilling data visualization and analysis are explained, in details, in the following sections of this article.

Visualization and Analysis of Drilling Data
The process to retrieve drilling operational data from the WITSML Data Source to our SOAP client plays an important role in the system.After successful data collection from the WITSML server, the user can visualize both static and dynamic drilling data and perform analysis using different engineering modules.

WITSML Data Collection and Visualization
The overall data collection process by the system is briefly explained in Figure 2. A WITSML server is a source of both static and real-time (dynamic) drilling data.The system sends request to the WITSML data source with valid URL, Username and Password.The server then verifies the request and sends messages/data back to the client in response.With successful server access, the system develops a specific query template and sends the query request to the server to get information about the available drilling wells for that particular authorization.The user/client can choose a well from the list and the system (IDAs) sends another request to the data source to get available index type included in the well of interest such as measured depth and date time.The system receives the appropriate Web service response by using the formats specified by the WITSML STORE WSDL document.
The WITSML data source, usually, stores drilling data in three different index types: depth, time and 1 second type as mentioned in the previous section.The depth-and time-indexed data can be static or dynamic drilling data, where as, 1 second-index type includes dynamic (real-time) drilling operational data.It is necessary to check the corresponding WITSML data object before selecting the index type by the user.The index type is selected to retrieve the name and corresponding unit of drilling parameters or channels, available in the specified well.The parameter selection is the final step performed by the user for retrieving static or dynamic drilling data.The system sends SOAP request to the Web service for the selected parameters and receives corresponding drilling data stored in the WITSML data source.The frequency of the data source is dependent on the server, service provider hosting the WITSML server and the internet speed of the client machine.Then the system displays the selected drilling data in 2D graphical format, as well as, numerically in a spreadsheet based on the selected index type.

Drilling Data Analysis
The Intelligent Drilling Advisory system (IDAs) provides meaningful analysis of both static and dynamic drilling operational data using different engineering modules.Four engineering modules are currently included into the system to provide meaningful drilling data analysis.

Engineering Modules
The modules included into the system are 'Hydraulics' module, 'Bit Wear Estimation' module, 'Torque and Drag Analysis' module and 'Pore Pressure Prediction' module.The 'Hydraulics' engineering module dynamically calculates the individual and total frictional pressure losses (Standpipe Pressure) in the well fluid circulating system using rheological models.These pressure losses can be compared to the actual standpipe pressure and used to design bits, bottom-hole assembly and nozzles for maximum performance and also prevent major catastrophic events such as stuck pipe by determining the optimum flow needed to clean the hole.The four rheological models used in the system to evaluate fluid behavior are the Newtonian model, Bingham Plastic model, Power law model and API Power-law model (Bourgoyne et al., 1986).The 'Torque and Drag Analysis' module uses a new 3-dimensional wellbore friction model (Aadnoy et al., 2010) which is capable of calculating torque and drag for different drilling modes, such as hoisting, drilling, sliding and tripping.This module is considered as an important real-time drilling analysis tool which can predict as well as, prevent some problems in drilling operations, such as tight holes and cutting bed accumulations.These modules will also lead us for defining and monitoring trends with alarms and logics to help predict and prevent problems in real time before the event happens.Hoisting and tripping torque and drag can be useful to run casing and liner to bottom at the end of drilling.The 'Pore Pressure Prediction' module calculates the formation or pore pressure during drilling operation.A modified approach from the conventional compact trend (d-exponents) model (Bourgoyne et al., 1986) is used for a better prediction of formation pressure to avoid severe drilling problems including stuck pipes due to wellbore stability failures, kick or even a blow out.Some of the methods used to trend the normal compactions are from logging-while drilling tools in realtime or pre-existing wire line logs such as sonic, resistivity that can measure porosity of formations and even d-exponents that are measured in real time from surface drilling parameters.The 'Bit Wear Estimation' module can estimate the bit wear while drilling and thus helps to improve drilling efficiency by reducing unnecessary work load, pre mature bit trips, drilling cost and time.Bit wear estimation also helps us to prevent safety related incidents because tripping in the oilfield industry accounts for 30% of safety related injuries (Sixma et al., 2005).The real-time bit wear model and its implementation into IDAs are briefly discussed in the following section.

Bit Wear Estimation Module
The system uses a newly developed real-time bit wear model (Rashidi et al., 2008) which is a combination method of the rock energy (Mechanical Specific Energy, MSE) model and formation drillbility from the rate of penetration (ROP) model.The ROP and MSE models are competitively using in oil industry to analyze drilling performance and perform a continuous drill-off test respectively.The MSE model is mainly used to analyze instantaneous drilling performance, also known as continuous drill off test whereby drilling parameters such as WOB and RPM are varied in comparison with the lithology to obtain the optimum value for effective ROP and less down hole vibrations such as lateral, bit bounce (axial) and torsional (stick-slip) that ultimately leads to bit wear.The ROP model on the other hand is utilized for pre-planning, well design and post well analysis.The following two equations are the generalized expressions of these two models: In equation ( 1), the weight on bit (WOB), rate of penetration (ROP) and rotary speed (RPM) are drilling parameters and D B is the diameter of drilling bit.The bit sliding friction coefficient ( ) is a dimensionless number and has different value for rollercone and PDC bits.The formation drillability, f 1 is obtained from equation ( 2).The new real-time bit wear model proposed by (Rashidi et al., 2008), is developed based on equations (1) and ( 2) and the fractional bit wear can be estimated from the following equations when the bit is in hole: The coefficient K 1 and constant B are determined to calculate fractional bit wear out, h.
The new real-time bit wear model is slightly modified and then implemented in 'Bit Wear Estimation' module of the system to estimate real-time fractional bit wear while drilling.The overall program flow chart of the calculation process is shown in Figure 3.The system retrieves drilling operational parameters such as WOB, ROP, surface rpm, flow and mud density from the WITSML data source as input to the IDAs as explained in the previous section.Sometimes some drilling data may contain impractical and null values such as -999.25,caused by the vibration of the measurement tools or surrounding disturbances such as the result of poor telemetry and loss of data transmission mechanism due to noisy pumps.This impractical data should be controlled properly to get meaningful and valid results from the analysis.The system automatically performs quality control on the impractical drilling data by filtering these data points based on set boundaries consist of practical range of drilling parameters and thus provides successful analysis.According to the new model, the mechanical specific energy (MSE) is a function of inverse of formation drillability as shown in equation ( 3).The formation drillability is obtained from ROP model of equation ( 2) using drilling operational data and drilling bit information of that particular well drilling system such as, bit depth in, bit diameter, bit type and jet sizes including the number of nozzles in drilling bit.Then the coefficient K 1 is calculated using equation (3).The normalized factor is automatically determined by the system to provide the normalization of inverse of K 1 and the system calculates constant B to proceed to the final step of the bit wear estimation process.Finally, the instantaneous fractional bit wear (h) is estimated using equation ( 4) and the dull grade bit wear (BG) is approximated by eight times of the corresponding fractional bit wear.

System Requirements for IDAs
The drilling operational data transmission between WITSML data source and IDAs uses SOAP Web service protocol.Therefore, wired or wireless internet connection is an important requirement on user's computer.
The basic hardware and software requirements for IDAs are as follows:

Hardware Requirements
The minimum requirement is 1.6 GHz CPU, 384 MB RAM and 1024x768 display.The recommended requirement is 2.2 GHz or higher CPU and 1024 MB or more RAM.On Windows Vista, the recommended requirement is 2.4 GHz CPU and 768 MB RAM.

IDAs Testing, Results and Discussions
The Intelligent Drilling Advisory system (IDAs) is successfully tested with WITSML Data Sources compatible of both version 1.2.0 and version 1.3.1.1.The system retrieves data from a real WITSML data source, which manages and stores drilling operational data of some wells in Alberta, Canada.Usually the data source provides static or real-time data of many drilling parameters of a particular well.The user of the system can choose the required parameters for data visualization, collaboration and analysis.
For example, drilling data of different bit run sections of two wells in Alberta, Canada is retrieved from a WITSML server and tested by IDAs to estimate instantaneous bit wear using 'Bit Wear Estimation' module of the system.As a first step to work with this module, the user needs to choose required drilling parameters and the corresponding units of the parameters from the 'Parameter Selection' page of this module.Figure 4 represents the parameter selection procedure of 'measured depth' index type drilling data set of pre-drilled oil drilling well in Alberta and, the corresponding units of the parameters to perform the bit wear analysis.The system user can select the required parameters and units by considering available information shows in 'Curve Information' table for that particular well.The corresponding drilling bit information such as bit diameter, bit type and jet sizes can be obtained from other source of that data server and these bit information are then implemented into 'Other Parameter' page of the module to perform the successful analysis.
Figure 5 shows the results of quality control on two drilling parameters performed by the system to estimate bit wear more accurately.The first chart shows the original ROP versus depth whereas; the second chart is the corresponding result of quality control on ROP.Similarly, chart three and chart four of Figure 5 are the original and controlled data of WOB, respectively.Table 1 summarizes the information of drilling bits including the reported dull bit wear grades (BG) provided by the data server and the estimated BG analyzed by the system, for different bit run sections of the two Alberta wells.The corresponding 2D graphical representations are shown in Figures 6 to 10.In each figure, the first five charts are the graphical views of the retrieved drilling data based on hole-depth of the analyzed wells having frequency in every 0.2 m and the rest of the charts show the corresponding results from bit wear analysis.The user can also view the drilling operational data and the corresponding analysis in spreadsheets as shown in Figure 11.The good agreement between reported and calculated bit wear verifies that this module, as well as IDAs, can be applied in oil industry successfully to estimate the real-time bit wear changes while drilling.
The system is successfully tested and verified for all available engineering modules.The meaningful results and information provided by IDAs can improve the critical decision-making by the engineers to perform optimized drilling operation in real time.This estimation can be very helpful to development wells in optimizing drilling rates and exploratory wells to collect drilling data that can be applied to the developmental phase of drilling once exploration is done.

Conclusion and Future Work
This article presents a newly developed and user-friendly real-time drilling engineering tool, the Intelligent Drilling Advisory system (IDAs), for oil industry to visualize, collaborate and analysis of both static and real-time (dynamic) drilling operational data.A Web-based industry standard WITSML (Wellsite Information Transfer Standard Markup Language) is used to transfer drilling operational data from a WITSML data source to the developed SOAP client system.The system supports standard WITSML of version 1.2.0 and version 1.3.1.1.IDAs sends SOAP request to a WITSML server and receives corresponding Web service response such as drilling data, to perform analysis on the basis of oil industry requirement using different engineering modules.Currently, four engineering modules are included into the system to provide meaningful analysis of drilling data and help drilling and well construction engineers to improve decision making in the complex drilling operation.
The system is successfully tested and verified with actual WITSML data sources and WITSML servers in Canada and Norway and thus reveals an important role in oil industry to increase overall drilling efficiency and safety of real-time oil drilling operation, as well as, to reduce the overall drilling cost.
In Future, the quality control procedure of the drilling data will be improved with standard algorithm and the existing modules will be modified in advance methods to get better performance from the system.More engineering modules will be included into the system to provide valuable information to the drilling engineers for better drilling optimization and thus upgrading the intelligent system as a complete real-time engineering tool for oil industry.The future module such as, swab/surge module, based on pore pressure prediction, will play an important role in drilling automation by controlling tripping speeds that can help to avoid having well control and wellbore failure events.Drilling automation will involve all these modules and built-in logics to perform drilling in much more intelligent, collaborative and cost efficient way for the late 21 st century.

Figure 4 .Figure 8 .Figure 10 .
Figure 4. Representation of parameter and corresponding unit selection process Microsoft Visual Studio 2005 or later.The recommended version is Microsoft Visual Studio 2008. Microsoft .NET Framework version 2.0 or later.The recommended requirement is version 3.5.The Microsoft .NET Framework is a software technology that is available in several Microsoft Windows operating systems such as, Windows XP, Windows Server 2003 and as a built-in technology in Microsoft Visual Studio.It includes a large library of pre-coded solutions to common programming problems.The pre-coded solutions that form the framework's Base Class Library cover a large range of programming needs in a number of areas, including user interface, data access, database connectivity, web application development, numeric algorithms, and network communications.
Architecture  x86 Processor: Usually 32-bit CPU. WoW64 or x64(WOW) Processor: Usually 64-bit CPU.WOW64 (Windows 32-bit on Windows 64-bit)is a subsystem of the Windows operating system that is capable of running 32-bit application and is included on all 64-bit versions of Windows.