Image Based Inspection of Well Equipment

SA521422289B1Active Publication Date: 2024-02-22SAUDI ARABIAN OIL CO
View PDF -1 Cites 0 Cited by

Patent Information

Application Number
SA521422289
Authority / Receiving Office
SA · SA
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-06-16
Publication Date
2024-02-22
Estimated Expiration
2039-12-16
Patent Text Reader

Abstract

One or more images of a tubular being run into a well are captured. The one or more images can be captured by an image sensor. The tubular includes a first tubular section and a second tubular section connected together by a connection. An onsite edge gateway local to the image sensor is configured to perform various operations. Based on the captured one or more images, an elevation of the connection relative to a reference elevation of the well is determined. Based on the determined elevation, an operating condition is determined. It is determined whether the operating condition is included in an automation rule. In response to determining that the automation rule includes the operating condition, a signal is transmitted to drive a controllable device. Fig 3A.
Need to check novelty before this filing date? Find Prior Art

Description

<h2 style=";text-align:left;direction:ltr">Full description<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Background of the invention<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> This disclosure relates to, for example, a drilling pipeline being extended into a well.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Drilling rigs are used to drill and produce hydrocarbons from a well and comprise a large number of components and tools that perform complex and often time-consuming operations. Drilling a well is a challenging procedure due to the inability to see the well path, the rock formations, and the harsh environment downstream. These factors, along with the many uncertainties and variables involved during drilling on a drilling rig, create a dynamic drilling process.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Norwegian Application No. 343139 b1 relates to a method for aligning a first axially movable tube with a second substantially stationary tube to prepare a threaded end portion of the first tube to engage with a tip end portion of the second tube.<h2 style=";text-align:left;direction:ltr">The method comprises the following steps: a) determining, by triangulation, the position of the centerline of the second tube; b) before the threaded end portion of the first tube touches the threaded end portion of the second tube, determining, by triangulation, the position of the center end portion of the first tube nearest to the second tube; c) calculating the direction and magnitude of any horizontal deviation between the centerline of the second tube and the center end portion of the first tube facing the second tube; d) outputting a first pilot signal indicating the direction and magnitude of the horizontal deviation calculated in step c); e) moving the first tube in accordance with the first pilot signal; then moving the threaded end portion of the first tube to meet the threaded end portion of the second tube; g) determining the direction vector of the first and second tubes; h) calculating the direction and magnitude of any tilt of the direction vector of the first tube relative to the direction vector of the second tube; i) outputting a second pilot signal indicating the direction and magnitude of the tilt calculated in step h); j) adjusting the tilt of the first tube in accordance with the second pilot signal; and k) rotating the first tube so that the threads of the first tube interlock with the threads of the second tube.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> General description of the invention<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> This disclosure describes techniques that can be used to inspect well equipment. Monitoring many components during operations on a drilling rig can be difficult and inefficient, and delays or malfunctions in machinery and components can negatively impact time and cost during a drilling operation. Some aspects of the described subject matter can be implemented as a method, for example, to optimize operations on a drilling rig. One or more images are taken of a pipe running through a well. The pipe includes a first and a second pipe section connected to each other by a joint. The joint height is determined relative to the well reference height based on the one or more captured images. An operating condition is established based on the determined height. It is determined whether the operating condition is included in an automated operating rule. In response to the determination that the automated operating rule includes the operating condition, a signal is sent to drive a controllable device.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> This, and other aspects, may include one or more of the following features.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The operating condition may include the alignment position of the joint relative to the wellbore blowout preventer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The automation base may include a condition where the connection is aligned with the blowout preventer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The controllable device may include a remote control panel. Operation of the controllable device may include displaying a representation of the operating status on the control panel.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The controllable device may include an alarm. Operation of the controllable device may include setting off the alarm.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The controllable device may include a working tool that drives the tubing into the well. Operating the controllable device may include adjusting the rate at which the working tool drives the tubing into or out of the well.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The controllable device may include an explosion preventer. Operation of the controllable device may include closing the explosion preventer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The flow rate of the pipe in the well can be determined based on at least two captured images.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Determining the joint height may include distinguishing the joint from the first and second tube sections.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The first tubular section may include a first drill pipe. The second tubular section may include a second drill pipe. The joint may include a coupling. Distinguishing the joint from the first and second tubular sections may involve identifying a coupling based on the outside diameter of the coupling.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Certain aspects of the described subject matter can be implemented as a system. The system includes an image sensor and an on-site edge gateway local to the image sensor. The image sensor is configured to capture an image stream of a pipe running in a well. The pipe includes a first tubular section and a second tubular section connected to each other by a connector. An on-site edge gateway is communicatively connected to the image sensor. The on-site edge gateway is configured to perform operations. The operations include receiving an image stream from the image sensor. The operations include determining the height of the connector relative to a reference well height from the image stream. The operations include establishing an operating condition based on the determined height. The operations include determining whether the operating condition is contained in an automation rule. The operations include transmitting a signal to operate a remotely addressable device in response to a determination that the automation rule contains the operating condition.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> This, among other aspects, may include one or more of the following features.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The image sensor can be mounted in a fixed position.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The image sensor can be portable.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The gateway edge at the site may include one or more processors and computer-readable storage media associated with the one or more processors. The computer-readable storage media may store programming instructions for execution by one or more processors. The programming instructions may direct the one or more processors to perform operations.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Establishing an operating condition may include determining the alignment position of the joint relative to the wellbore blowout preventer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The automation base may include a condition where the connection is aligned with the blowout preventer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The system may include a controllable device.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The controllable device may include a control panel. Operation of the controllable device may include displaying a representation of the operating status on the control panel.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The controllable device may include an alarm. Operation of the controllable device may include setting off the alarm.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The controllable device may include a working tool configured to work the tubing into the well. Operating the controllable device may include adjusting the rate at which the working tool works the tubing into or out of the well.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The controllable device may include an explosion preventer. Operation of the controllable device may include closing the explosion preventer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The edge gateway can be configured on-site to determine the rate at which the tubing is run in the well based on at least two captured images received from the image sensor.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> An edge gate can be configured on site to distinguish the joint from the first and second tubular sections.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Details of one or more embodiments of the subject matter of this specification are given in the detailed description, accompanying drawings, and protective elements. Other features, aspects, and advantages of the subject matter will become apparent from the description, protective elements, and accompanying drawings.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Brief explanation of the drawings<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 1 is a schematic view of a drilling rig system as an example of a well.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 2 is a partial schematic view of the example blowout preventer and drill pipe for the drilling rig system in Figure 1.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 3a is a schematic view of an example monitoring system for the drilling rig system in Figure 1.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 3b is a block diagram showing an example of a monitoring system for the drilling rig system in Figure 1.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figures 4a, 4b, and 4c are schematic views of the various forms of the example blowout preventer and drill pipe.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 5 is an example control loop flow diagram for an example edge gate on-site monitoring system in Figure 3a.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figures 6 and 7 are partial schematic views of the monitoring system in Figure 3a.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 8 is a partial schematic view of the overall perspective of the drilling rig system in Figure 1.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 9 is a partial flowchart of a general view of the drilling rig system in Figure 1.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 10 is a block diagram showing an example of an edge gateway in situ.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Detailed description:<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">This disclosure describes intelligent monitoring, inspection, and control of well components on a drilling rig, including image-based inspection and analysis of well components and equipment for positive verification, dimensional analysis, identification of non-standard components, or other failure modes, which can lead to safer and more efficient operations. A monitoring system includes an image sensor and an on-site edge gateway positioned on a drilling rig to monitor equipment and other well components. The well components monitored by the monitoring system can vary based on the target object of the image sensor, such as tools on a drilling pipeline, casing components, other well tools, or other well components on a drilling rig. The image sensor, such as one or more cameras, is positioned around a drilling rig and directed at a target component or group of components, providing real-time image feeds, such as photo or video feeds, to a gateway computing system located at a location on the drilling rig. For example, the position of drilling pipeline tie-ins during drilling operations may be monitored.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">If a tieback (or other component) is placed in the area of ​​a closing blowout preventer (BOP), this position can reduce the probability of the BOP functioning properly if the BOP is shut down in response to a well accident. The methods and systems described herein can be used to monitor the dynamic position of these drilling pipeline elements to enhance well control and safety. In some embodiments, the automated response includes integrating BOP closing command and winch control functions with drawdown actions to prevent improper BOP closure. In some embodiments, the automated response includes moving the drilling pipeline to increase the probability of properly and safely closing the well. The described technologies can utilize one or more of the following: automation, the industrial Internet of Things (IOT), big data analytics, and artificial intelligence. The described concepts can also be applied to other areas of drilling operations, such as drilling pipeline dynamics analysis, drilling fluid flow analysis, and formation cuttings analysis.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The gateway receives image feeds from the image sensor(s) and processes and analyzes the image feed to determine an operating variable for the target well equipment. The gateway can determine the operating condition of the target well equipment based on the defined operating variable. The gateway can suggest, act on, or both suggest and act on a fix based on the defined operating condition. An on-site edge gateway is an edge / fog gateway, where the computing system components that perform the analysis are located locally on the rig. For example, an on-site edge gateway can perform operations without the need to transfer information and data or outsource analysis to a remote computing system to suggest or act on a fix for a specific operating condition. Edge / fog computing can be advantageous in some ways for computing in a cloud environment. The cloud, which can cover a wider geographic area, can involve data transfers from various sensors and devices, resulting in increased network traffic and, in some cases, latency.<h2 style=";text-align:left;direction:ltr">Edge / fog computing reduces the number of switches and host devices between data sources and destinations and can reduce the time between data acquisition and intelligent analytics. Edge / fog computing can enable rapid decision-making and interrogation of high-frequency data that are typically not possible with cloud-type infrastructure. Furthermore, the cloud can also present security and privacy concerns associated with data transmission. In contrast, most data in edge / fog computing is confined to the edge of a local network, and minimal (if any) data is transmitted outside the local network. In cases where data transmission outside the local network is required, an edge / fog gateway can, for example, transmit only truncated, actionable information rather than all the acquired data. This not only improves security and reduces privacy risks but also reduces the bandwidth required for data transmission. This monitoring system is capable of continuously monitoring well components in real time. The monitoring system can perform continuous image and signal processing to extract information on operational variables.<h2 style=";text-align:left;direction:ltr">A monitoring system can identify operational conditions such as faults and anomalies in a well component. The monitoring system can suggest a fix if a defined operational condition reaches the failure threshold of the well component. In a highly dynamic environment (such as drilling operations), it can be useful to make critical, time-sensitive decisions close to operations. Edge / fog computing is well-suited for such dynamic applications.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">On traditional drilling rigs, inspection of drilling pipeline components or other components is performed by personal visual inspection or non-destructive inspection, such as ultrasonic or electromagnetic inspection. These inspections and orders can be time-consuming, inefficient, and prone to human error, potentially leading to lost time and unplanned drilling costs. The monitoring system of the current disclosure provides real-time monitoring of well components using image sensors and advanced processing techniques. The monitoring system can map failure modes of well components from image feeds to the image sensors. Based on the mapped failure mode(s), the monitoring system can suggest action item options to the well operator or effectively address the action item. For example, the monitoring system could suggest an action item that addresses the failure mode, such as adjusting the drilling pipeline position so that the wellbore can be successfully and safely closed in response to a leak detection in the wellbore. The monitoring system provides synchronization of drilling operations and well control processes for the safety and predictive maintenance of well components on a drilling rig.<h2 style=";text-align:left;direction:ltr">For example, a monitoring system monitors and can inspect the drilling pipeline, as well as various instruments and equipment on a drilling rig, and can use edge / fog computing-based smart analytics to facilitate the relationship between drilling and well control. The monitoring system provides a dynamic, interconnected network of components that utilize smart sensors and smart devices to acquire data and enable actuators to respond to sensor information. The monitoring system can be used to facilitate data transfer between devices. The monitoring system can use machine learning and big data analytics to process, enrich, and display data to initiate automated movement or trigger an actuator movement.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 1 is a partial schematic perspective view of a drilling rig system 100 for drilling and producing a well. The well may extend from the surface through the ground into one or more subterranean areas of interest. An embodiment of the drilling rig 100 includes a drilling floor 102 positioned above the surface, a wellhead 104, a drilling rig pipeline assembly 106 supported by the drilling rig structure, a fluid circulation system 108 for filtering used drilling fluid from the wellbore and supplying clean drilling fluid to the drilling rig pipeline assembly 106, and a monitoring system 300 (comprising an image sensor 301 and an in-situ edge gate 303, described in more detail below) for real-time monitoring of one or more components on the drilling rig system 100. For example, the example of the drilling rig system 100 in Figure 1 is shown as a drilling rig capable of conducting a drilling operation with the drilling rig system 100 supporting the drilling rig pipeline assembly 106 above the wellbore. The wellhead 104 may be used to support the casing or other well components or equipment in the wellbore of the well.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The drilling derrick or drilling mast is a support frame mounted on the drilling floor 102 and positioned above the wellbore to support the components of the drilling derrick pipeline assembly 106 during drilling operations. The upper rollers 112 form the longitudinally mounted top of the drilling derrick and are connected to the moving rollers 114 by a drilling line comprising a set of wire ropes or cables. The upper rollers 112 and the moving rollers 114 support the drilling derrick pipeline assembly 106 via a rotator 116, a drill rod (kelly) 118, or an overhead drive system (not shown). The longitudinal movement of the moving rollers 114 relative to the upper rollers 112 of the drilling derrick pipeline assembly 106 moves the drilling derrick pipeline assembly 106 longitudinally up and down. The swivel 116, connected to and attached to the moving rollers 114 and the swivel hook, allows free rotation of the drilling rig assembly 106 and provides a connection to the drilling rig hose 120, which is a hose that flows drilling fluid from the drilling fluid supply of the circulation system 108 to the drilling rig assembly 106. A standpipe 122 mounted on the drilling rig floor 102 directs at least a portion of the drilling rig hose 120 to a location close to the drilling rig assembly 106.<h2 style=";text-align:left;direction:ltr">The drill rod 118 is a hexagonal device suspended from the rotary shaft 116 and connected to a longitudinal top of the drill pipe assembly 106, and the drill rod 118 rotates with the drill pipe assembly 106 when the rotary table 142 of the drill pipe assembly rotates.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In the drilling rig system example 100 of Figure 1, the drilling rig assembly 106 consists of drill pipe with a drill bit (not shown) at the longitudinal lower end of the drill pipe. The drilling rig assembly 106 is described in more detail later, and a more detailed view is shown in Figure 2. The drill pipe may include hollow steel tubes, and the drill bit may include cutting tools, such as blades, cutters, rollers, cutters, or a combination of these, to cut the formation and shape the wellbore. The drill bit rotates and penetrates the rock formations below the surface under the combined effect of the axial load and the rotation of the drilling rig assembly 106. In some embodiments, the drill shaft 118 and the rotary shaft 116 may be replaced by an overhead motor that allows the drilling rig assembly 106 to rotate and drill. The wellhead assembly 104 may also include a hoist 124 and a wireline anchor 126, wherein the hoist 124 includes a winch that serves as a hoisting system for winding the drill line on a reel in and out to raise and lower the drill line assembly 106 by means of a quick line 125.<h2 style=";text-align:left;direction:ltr">The wireline anchor 126 secures the drill line opposite the rig 124 with wireline anchors 127 and can measure the suspended load (or hook load) on the swivel hook. The weight on the bit (WOB) can be measured when the drill bit is at the bottom of the wellbore. The wellhead assembly 104 also includes a blowout preventer 150 positioned on the surface 101 of the well and below (but often connected to) the drilling floor 102. The blowout preventer 150 prevents a wellbore blowout caused by formation fluid entering the wellbore, displacing the drilling fluid, and flowing to the surface at greater than atmospheric pressure. The blowout preventer 150 can seal around (and, in some cases, through) the drilling pipeline assembly 106 and seal the space between the drilling pipeline and the wellbore wall. The blowout preventer 150 is described in more detail below.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">During the well drilling process, the circulation system 108 circulates the drilling fluid from the wellbore to the drilling pipeline assembly 106, filters the used drilling fluid from the wellbore, and delivers clean drilling fluid to the drilling pipeline assembly 106. An example of the circulation system 108 includes a fluid pump 130 connected through a fluid and delivering drilling fluid to the drilling pipeline assembly 106 via a drill rod hose 120 and a standpipe 122. The circulation system 108 further includes an outflow line 132, a drilling mud vibrator 134, a settling hole 136, and a suction hole 138. During the drilling process, the circulation system 108 pumps the drilling fluid from the surface, through the drilling pipeline assembly 106, out of the drill bit and behind the annulus of the wellbore, where the annulus is the space between the drill pipe and the formation or casing. The density of the drilling fluid is intended to be greater than the formation pressures to prevent formation fluids from entering the annulus and flowing to the surface and less than the mechanical strength of the formation, as a higher density may cause the formation to fracture, thus creating a path for drilling fluids to enter the formation.<h2 style=";text-align:left;direction:ltr">Aside from controlling the well, drilling fluids can also cool the drill bit and lift rock cuttings from the drilled formation above the annulus and to the surface to be filtered and treated before being pumped back down the 106 drilling pipeline assembly. The drilling fluid returns to the annulus with the rock cuttings and flows out to the outflow line 132, which connects to and supplies the fluid to the drilling mud vibrator 134. The flow line is an inclined pipe that directs the drilling fluid from the annulus to the drilling mud vibrator 134. The drilling mud vibrator 134 includes a grid-like surface to separate the coarse rock cuttings from the drilling fluid, and the fine rock cuttings and drilling fluid then pass through the settling hole 136 to the suction hole 136. The circulation system 108 includes a mud hopper 140 into which materials (e.g., to provide dispersion, rapid wetting, and uniform mixing) can be introduced into the circulation system 108. The fluid pump 130 circulates the drilling fluid up the vertical pipe 122 through the rotor 116 and back to the drilling pipeline assembly for return to the well.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The wellhead assembly 104 can take a variety of forms and include a number of different components. For example, the wellhead assembly 104 can include additional or different components than the example shown in Figure 1. Similarly, the circulation system 108 can include additional or different components than the example shown in Figure 1.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Figure 2 illustrates pipe 101 in relation to the blowout preventer 150 at the top of the well. Pipe 101 may comprise multiple tubular sections 103 connected end-to-end by couplings 105 (e.g., welded couplings, threaded couplings, joint couplings, or combinations thereof). As one example, pipe 101 may be part of a drill pipe assembly, tubular sections 103 may be drill pipe, and couplings 105 may be a coupling that connects drill pipe together. Pipe 101 may be run into or out of the well through blowout preventer 150.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The following description describes the systems and methods as they apply to the operation of tubing extension 101 in a well, but it should be recognized that the systems and methods may also optionally be applied to the operation of tubing extension 101 outside the well. The blowout preventer 150 is a valve (or set of valves) at the top of the well that can be closed to seal the well to prevent a blowout, which is the uncontrolled release of formation fluid from the well. The blowout preventer 150 may include multiple blowout preventer valves. For example, the blowout preventer 150 may include one or more annular blowout preventers 151, one or more piston blowout preventers 153, or a combination of both.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Each annular blowout preventer 151 can be a doughnut-shaped rubber plug that can seal around a variety of pipe sizes 101 to prevent flow from the annulus between the pipe 101 and the casing (or open hole). Even while closed, the annular blowout preventer 151 can allow rotation and movement of the pipe 101 without breaking the plug. Typically, the blowout preventer 150 includes at least one annular blowout preventer 151 on top and one or more piston blowout preventers 153 below the annular blowout preventer 151 (as illustrated in FIG. 2).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Each piston blowout preventer 153 may comprise two halves 153A and 153B (often called pistons or piston rollers) that can be forced together to seal the well. The piston rollers (153A, 153B) may be forced together using hydraulic cylinders. Piston rollers 153A and 153B may be composed of steel and have elastomer components on their sealing surfaces. Piston rollers 153A and 153B may be provided in a variety of shapes. For example, in the case of open-hole wells, piston rollers 153A and 153B may be flat at the mating surfaces.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, the piston spools 153A and 153B are designed to have a circular spacer in the middle corresponding to the diameter of the tubing 101 being extended into the well so that they can close the well when the tubing 101 is in the hole, or to deliver the tubing 101 from the closed piston spools 153A and 153B. In some embodiments, the piston spools 153A and 153B are operable to shear the tubing 101, wherein the piston spools 153A and 153B are equipped with reciprocating steel-cutting tool surfaces to enable them to close the shear through the tubing 101 and seal the well after the tubing 101 has been cut.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In cases where the blowout preventer 150 must be sealed to prevent the uncontrolled release of formation fluid from the well, components of the blowout preventer 150 that seal around or through tubing 101 should preferably avoid fittings 105 or other incompatible shapes or sizes. For example, if the pipe 101 is part of a drilling pipeline, and the fittings 105 are couplings, it is preferable that the closing component(s) of the blowout preventer 150 (such as the piston spools 153a and 153b) is not aligned with any of the couplings 105, so that the risk of the blowout preventer 150 not successfully sealing or shearing the pipe 101 is mitigated or eliminated. In the example shown in Figure 2, it would be acceptable to close the two upper piston blowout preventers 153, but closing the lower piston blowout preventer 153 may be undesirable, as the piston spools 153a and 153b of the lower piston blowout preventer 153 are aligned with the lower coupling 105.<h2 style=";text-align:left;direction:ltr">The systems and methods described in this disclosure may be used to identify such conditions (e.g., aligning piston spools 153A and 153B with a joint 105) and prevent undesirable outcomes (e.g., closing piston spools 153A and 153B around or through the joint 105) or remove tubing 101 from such conditions (e.g., by moving the tubing so that neither joint 105 is aligned with either piston spool 153A or 153B). In some embodiments, the analysis and response may be fully automated by the monitoring system 300 in response to a command to shut down (i.e., close) the blowout preventer 150. The automated response may allow for a rapid, safe, and successful shutdown of the well.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The drilling rig system 100 shown in Figure 1 may include a monitoring system 300 that monitors a component of the drilling pipeline assembly 106. Referring to Figure 3A, the monitoring system 300 may be used to monitor the tubing 101 being laid in the well. The monitoring system 300 includes an image sensor 301 (e.g., a camera) that can capture one or more images or videos of the tubing 101 being laid in the well. The image sensor 301 may provide the one or more captured images or videos as an image feed. The image sensor 301 is communicatively coupled to an edge gateway at the location 303 that is local to the image sensor 301 (i.e., located close to the image sensor 301). In some embodiments, the image sensor 301 can communicate wirelessly with the on-site edge gateway 303, for example, via Bluetooth®, Wi-FiTM, ZigBee, cellular connectivity, or near-field communication (NFC). In some embodiments, the image sensor 301 can communicatively couple to the on-site edge gateway 303 via a wired connection.<h2 style=";text-align:left;direction:ltr">The edge gateway at location 303 may be configured to receive and process image feeds from the image sensor 301.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The image sensor 301 can provide detection and capture an image feed of the component during scaling or component operation. The image sensor 301 can take various forms. For example, the image sensor 301 can include a camera, such as a smart, waterproof, high-resolution, wireless camera, or a combination of these features. For example, the image sensor 301 can include a charge-coupled device (CCD) camera, a machine vision camera, a CCD machine vision camera, a digital camera, an infrared camera, an X-ray camera, a thermal camera, an acoustic camera, an ultraviolet camera, an ultrasound camera, a magnetic resonance imaging (MRI) camera, a point cloud scanner, a laser scanner, a lidar scanner, or a combination of these. In some cases, the image sensor 301 includes an optical filter, such as an ultraviolet (UV) filter, an infrared (IR) filter, a combination of these, or another type of filter.<h2 style=";text-align:left;direction:ltr">In some embodiments, the image sensor 301 may have sufficient resolution to identify components or defects with sizes in the range of approximately 50 micrometers. The image sensor 301 is a non-expansive image capturer of the component and provides an image feed to the gate 303. While the monitoring system 300 of Figure 3a illustrates only one image sensor 301, the monitoring system 300 may include more than one image sensor, such as a plurality of cameras positioned around the drilling pipeline component. In some embodiments, the plurality of image sensors may provide an image feed representing a 3D model of the gate component 303. For example, multiple image sensors 301 may be evenly or unevenly positioned around a component to provide an image feed to the gate 303 representing a 3D view of the component. For example, multiple image sensors 301 may be at various positions and angles to provide an image feed to the gate 303 representing a 3D view of the component. The image sensor 301 may be located anywhere around the drilling rig system 100, since the image sensor 301 is directed at the component to provide an image feed to the component.<h2 style=";text-align:left;direction:ltr">In some embodiments, the image sensor 301 is mounted on a movable support that can move and position the image sensor 301, for example, to follow a particular component across multiple views or during component movement, transition from one component to another, or a combination thereof.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, the monitoring system 300 includes an acoustic sensor in addition to or instead of the image sensor 301. The acoustic sensor can capture the audio and provide an audio feed to the gateway 303. In some embodiments, the on-site edge gateway 303 can process the audio feed from the acoustic sensor in conjunction with the image feed from the image sensor(s) 301 to determine one or more characteristics or components of the drilling rig (e.g., a pipe 101 being extended into the well).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The edge gateway 303 is positioned on-site, or locally, on the drilling rig and serves as an edge / fog computing system. In other words, the edge gateway 303 includes on-site computing components, where the computing components that analyze the image feed from the image sensor(s) 301 are located locally on the drilling rig. This edge / fog computing configuration of the gateway 303 enables processing and analysis to occur locally at the gateway 303, for example, without the need to transfer information and data or outsource the analysis to a remote computing system to operate. The gateway 303 includes one or more processors and computer-readable storage media used to receive and analyze input from the image sensor 301, as described in more detail later. For example, the edge gateway 303 can be a PC, a processing board, a programmable logic gate, an edge / fog computer, or any suitable computing device with input and output capabilities.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The image sensor 301 provides an image feed of one or more well components to the site edge gateway 303, and the gateway 303 identifies existing or potential failures in the integrity, position, or dimensions of the component(s). For example, the site edge gateway 303 may determine the height of a joint 105 of tubing 101 relative to a well reference elevation (e.g., a well reference elevation could be the drill floor elevation or a wellhead elevation). In some embodiments, the reference elevation need not be visible in one or more images captured by the image sensor 301. For example, the site edge gateway 303 may be interpolated with data or calibrated with data that includes known information, such as a known height of the image sensor 301 relative to the reference elevation, a known distance of the image sensor 301 from the tubing 101, or another reference point that is a known distance away from the reference elevation. The 303 gateway can also suggest (and in some cases, act on) a fix or reaction to the state assigned to the component(s), all in real time.<h2 style=";text-align:left;direction:ltr">Real time, for example, could mean that an image feed is continuously and instantly provided from the image sensor 301 to the gateway 303, and that the identification and determination of a particular operating variable, operating state, and failure mode of a component feature occurs instantly.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The site edge gateway 303 receives an image feed from the image sensor(s) 301 and is configured to process and analyze one or more images captured by the image sensor 301 to identify one or more features or components of the drilling rig (e.g., tubing 101 being extended into the well). Processing and analyzing the image feed may include determining an operating variable for the target well component, establishing an operating condition for the well component from the operating variable, and, in some cases, determining that the operating condition meets a failure threshold for the component or a nearby component or system. The failure threshold may include, for example, a minimum distance between a drilling rig's coupling and a blowout preventer (BOP). Based on this determination, the gateway 303 may prompt an automation rule. The automation rule may vary and may include sending a signal or instruction to operate a controllable device, as described in more detail later. In some cases where the operating condition of the component meets the failure threshold, the gateway 303 may propose, act, or propose and act upon a proactive preventive action.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Image processing can include, for example, preprocessing, image enhancement, image segmentation, feature extraction, image classification, target detection, pattern recognition, edge detection, wavelet, pixel, texture, contact component-based approaches, principle and independent component analysis, descriptor-based methods, linear filtering, anisotropic diffusion, gray-level segmentation, parametric methods, machine learning, artificial intelligence, spatial domain filtering, frequency domain filtering, or combinations of these. In some embodiments, image processing includes comparing the captured image(s) to a standard or model.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The well component examined by the monitoring system 300 may vary, for example, based on the target of the image sensor 301. For the example drilling rig system in Figure 1, the image sensor 301 may be directed at one component of the drilling rig system 106, such as drill pipe. However, the image sensor 301 may be directed at and provide an image feed to another component of the drilling rig system 106, or another component on the drilling rig system 100. For example, a well component may include drill pipe, drill pipe connections (such as couplings), drill pipe rings, heavy-duty drill pipe and rings, cross-links, tubing, fasteners, packing, drilling tractors, downhole motors, reamers, drill bits, drill bit sub-connections, casing components such as casings, liners, casing rings, and casing concentrics, or a combination of these components, or other components. In some examples, the image sensor 301 is directed to a component of the drilling rig system 100, such that the monitoring system 300 inspects and monitors the integrity of a component of the drilling rig system 100 during operation of the drilling rig system 100.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the in-situ edge gateway 303 is configured to distinguish joints 105 from tubular sections 103 of the pipe 101 based on one or more images captured from the image sensor 301. For example, the in-situ edge gateway 303 can perform target detection to identify joints 105. For example, in cases where joints 105 have a different outside diameter than the tubular sections 103 (typical of coupling joints 105 that connect tubular sections of drill pipe together 103), the in-situ edge gateway 303 can process one or more images from the image sensor 301 and identify joints 105 based on the different outside diameter of the joints 105 compared to the tubular sections 103. In some embodiments, the in-situ edge gateway 303 can be calibrated to detect a particular characteristic corresponding to the joint 105 (e.g., a distinct outside diameter or color) to identify joints 105 of the pipe 101. In some embodiments, the site edge gateway 303 is configured to detect dynamic features, such as the vibration of the pipe 101 when the pipe 101 is extended or removed from the well.<h2 style=";text-align:left;direction:ltr">To ensure accurate monitoring, it may be desirable that the image sensor 301 be positioned and angled such that at least one joint 105 (or other corresponding feature of the joints 105) is visible to the image sensor 301 at all times while the tubing 101 is extended into the well.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Based on the specified elevation of the joint 105 relative to the well reference elevation, the location edge gate 303 is configured to generate an operating condition and determine whether the automation rule includes operating conditions. For example, the operating condition may be the alignment position of the joint 105 relative to the blowout preventer 150, and the automation rule may be the condition in which the joint 105 is aligned with the blowout preventer 150. The location edge gate 303 may be configured to determine the alignment position, for example, based on a known elevation of the blowout preventer 150 relative to the well reference elevation and a specified elevation of the extension 105 relative to the well reference elevation. The alignment position of the joint 105 relative to the blowout preventer 150 may be an alignment position of the joint 105 relative to the pistons 153A and 153B of the piston blowout preventer 153. In some embodiments, the automation rule is a comparison of the operating conditions to a threshold value. If the operating condition is within or equal to the threshold value, the automation rule can be considered to not include the operating condition.<h2 style=";text-align:left;direction:ltr">If the operating condition exceeds a threshold value, the automation rule may be deemed to include the operating condition, and appropriate action must be initiated in response. For example, if the site gate edge 303 determines that one of the tie-downs 105 is within 1 foot (an example of a threshold "circumference" value) of being aligned with any of the piston blowout preventers 153, the operating condition is determined to be within the automation rule.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">If the edge gateway at location 303 determines that an operating condition is included in the automation rule (e.g., the alignment position of the joint 105 relative to the blast preventer 150 is such that the joint 105 is aligned with the blast preventer 150), the edge gateway at location 303 is configured to send a signal to operate a device that can be controlled at a remote location (e.g., a control panel 350 located in a control room). For example, the signal could cause the control panel 350 to display a warning to the operator that the blast preventer 150 is not in a desired shutdown state. The operator can then take necessary actions, e.g., adjust the position of the pipe 101 or only those components of the blast preventer 150 that are in a desired shutdown state. In some embodiments, the edge gateway at location 303 can make the determination and initiate a response automatically. For example, the signal sent by the gateway 303 may cause the control panel 350 to send another signal to automatically adjust the position of the pipe 101 (or adjust the extension speed of the pipe 101), such that the joint 105 is no longer aligned with the blowout preventer 150.<h2 style=";text-align:left;direction:ltr">For example, the signal sent by gateway 303 could directly cause the extension system (which extends the tubing 101 into the well) to adjust its speed, such that the connection 105 is no longer aligned with the blowout preventer 150.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, if the location edge gateway 303 determines that the alignment position of the joint 105 relative to the blowout preventer 150 is such that the joint 105 is not aligned with the blowout preventer 150, the location edge gateway 303 may transmit a signal causing the control panel 350 to display a "green light" to an operator, the green light representing that the blowout preventer 150 is in the closed state without the risk of the blowout preventer 150 closing around or through the joint 105. In some embodiments, the location edge gateway 303 may make the determination and automatically initiate a response. For example, if the location edge gateway 303 determines that the blowout preventer 150 is in a desired state of closure, the gateway 303 may transmit a signal that automatically closes the blowout preventer 150 in response to a well shutdown command.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">As illustrated in Figure 3A, the blowout preventer 150 can include multiple piston blowout preventers 153 and multiple connections 105, and the location edge gate 303 can make applicable selections for each of the connections 105 with respect to each of the piston blowout preventers 153. For example, in Figure 3A, the lower connection 105 is aligned with the lower piston blowout preventer 153 but not aligned with the other two piston blowout preventers 153. The location edge gate 303 can determine this configuration and provide a signal representing this condition to the control panel 350. In some embodiments, the signal can cause the control panel 350 to display a warning to the operator that the lower piston blowout preventer 153 is not in a desired state for closure even though the other two blowout preventers are in a desired state. The operator may then choose to close one or both of the other piston blowout preventers 153 while leaving the lower piston blowout preventer 153 open.<h2 style=";text-align:left;direction:ltr">In some embodiments, the in-situ rim gate 303 can continue to monitor the tubing 101 being extended into the well, and once the in-situ rim gate 303 determines that none of the piston blowout preventers 153 are aligned with any of the connections 105, the in-situ rim gate 303 can send a signal that causes the controller 350 to display a “green light” to the operator. The operator can then choose to close any of the piston blowout preventers 153. In some embodiments, the signal can cause the controller 350 to automatically adjust the position of tubing 101 (or adjust the operating speed of tubing 101) such that none of the connections 105 are aligned with any of the piston blowout preventers 153. In some embodiments, the signal can be sent to one or more actuators (which can be binary or continuous) that can execute or initiate an action (such as adjusting the position of tubing 101) when actuated. Some of the non-limiting examples of actuators include pneumatic, electric, electromagnetic, electromechanical, micro, and nano actuators.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the site edge gateway 303 can be configured to determine the lay-up speed of the pipe 101 being laid into the well. For example, the site edge gateway 303 can process two images captured by the image sensor 301 to determine how far a reference point (e.g., the joint 105) has moved between the two image captures. Based on the distance and time between the two image captures, the site edge gateway 303 can determine the lay-up speed of the pipe 101 being laid into the well. In some embodiments, a predicted lay-up speed of the pipe 101 can be entered into the site edge gateway 303, and the site edge gateway 303 can compare the determined lay-up speed with the predicted lay-up speed of the pipe 101 to verify that the pipe 101 is being laid into the well as planned. If the difference between the expected lay-up speed and the specified lay-up speed of the pipe 101 exceeds a limiting lay-up speed difference tolerance value, the site edge gate 303 may send a warning signal to the control panel 350 to alert the operator that the pipe 101 is being laid into the well at a speed that is not consistent with the plan.<h2 style=";text-align:left;direction:ltr">In some embodiments, the edge gate at location 303 may send a signal to automatically adjust the pipe laying speed 101, such that the difference between the expected laying speed and the set laying speed 101 is reduced to within the limit operating speed difference tolerance value.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">An operator in the control room may decide that the blowout preventer 150 should be closed (for example, because a well leak has been detected). The operator may use the control panel 350 to send a signal to the location edge gate 303 indicating that the blowout preventer 150 is to be closed. In some embodiments, the location edge gate 303 may be configured (in response to receiving a signal indicating that the blowout preventer 150 is to be closed) to determine whether the blowout preventer 150 is in a desired state of closure (e.g., none of the connections 105 is aligned with any of the piston blowout preventers 153) based on the height of one or more of the connections 105 and the specified (or input) extension velocity of the pipe 101. If the location edge gate 303 determines that the blowout preventer 150 is in a desired state of closure, the location edge gate 303 may be configured to automatically close the blowout preventer 150 (e.g., the location edge gate 303 may signal the blowout preventer 150 to close the annular blowout preventer 151 and one or more of the piston blowout preventers 153).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">If the location edge gate 303 determines that the blowout preventer 150 is not in a desired state of closure, the location edge gate 303 may be configured to perform one or more of the following actions. The location edge gate 303 may be configured to determine the next state in which the blowout preventer 150 is in a desired state of closure (e.g., determining the time it will take for the tubing 101 to be extended into the well to be in a position where none of the connections 105 is aligned with any of the piston blowout preventers 153) based on one or more of the heights of the connections 105 and the specified (or input) extension velocity of the tubing 101. The location edge gate 303 may be configured to wait until the next specified state in which the blowout preventer is in a desired state of closure and then automatically close the blowout preventer 150.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some cases, there is insufficient time to wait for the blowout preventer 150 to reach the desired shutdown state. In such cases, the in-situ rim gate 303 may be configured to determine a suitable position adjustment for the tubing 101 that places the blowout preventer 150 in the desired shutdown state. The suitable position adjustment may be determined based on one or more of the joint heights 105 and the specified (or input) laydown speed of the tubing 101. The position adjustment may include increasing the laydown speed of the tubing 101 in the well or decreasing the laydown speed of the tubing 101. The in-situ rim gate 303 may be configured to automatically move the tubing 101 according to the specified laydown (e.g., the in-situ rim gate 303 may transmit a signal that causes the tubing 101 to move according to the specified laydown). Once the position of the pipe 101 with respect to the blowout preventer 150 places the blowout preventer 150 in the desired shut-down state, the rim gate at location 303 may be configured to stop the extension of the pipe 101 into or out of the well (e.g., the rim gate at location 303 may transmit a signal to stop the mechanism by which the pipe 101 is extended into the well).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the location edge gate 303 may be configured to determine whether the tubing 101 is being extended into the well in an uncontrolled manner. For example, the location edge gate 303 may detect whether the tubing 101 is being extended into the well at a speed other than the expected extension speed. In response to determining that the tubing 101 is being extended into the well in an uncontrolled manner, the location edge gate 303 may be configured to automatically perform operations to mitigate the potential for adverse outcomes. For example, the location edge gate 303 may be configured to automatically reduce the extension speed of the tubing 101 being extended into the well. For example, the location edge gate 303 may be configured to close the extension tool used to extend the tubing 101 into the well. For example, the location edge gate 303 may be configured to close the blowout preventer 150 (as described previously).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 3b illustrates another example of a monitoring system 300. As previously stated, the monitoring system 300 includes an image sensor 301 and an in-situ edge gateway 303. The monitoring system 300 may include additional sensors (e.g., sensors 301a, 301b, ..., 301n). The additional sensors (e.g., sensor 301a) may include one or more additional image sensors, one or more acoustic sensors, one or more heat sensors, one or more vibration sensors, or any combination of these sensors. Each of the additional sensors (e.g., sensors 301a and 301b) may be located on the drilling platform, e.g., above the surface or downhole (i.e., within the wellbore). One or more sensors (301, 301a, 301b, ..., 301n) may be wirelessly extended to the edge gateway at location 303. In some embodiments, all sensors are wirelessly extended to the edge gateway at location 303.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The edge gateway at location 303 may include one or more applications that can be executed to cause the gateway 303 to perform various operations. The edge gateway at location 303 may acquire data from one or more sensors (e.g., an image sensor 301 and one or more additional sensors 301a, 301b, etc.), and the data may be sent to a processing layer, where one or more processing operations may be performed. For example, the processing operations at the processing layer may include analog signal processing, digital signal processing, image / video processing, pattern recognition, edge detection, wavelet transform processing, pixelation processing, texture processing, component-based approach connection operations, principal component analysis, independent component analysis, descriptor-based methods, linear filtering, axisymmetric diffusion operations, gray-level segmentation, image sharpening, spatial domain filtering, frequency domain filtering, or any combination of these operations. The processed data from the processing layer may be sent to an analysis module. The analysis module may perform one or more analysis operations.<h2 style=";text-align:left;direction:ltr">For example, the analysis processes in the analysis module may include machine learning or artificial intelligence algorithms, e.g., based on detection, failure, or prediction models. These algorithms may be based on data-driven models, physics models, or models that are both physics and data-driven. The analysis processes are performed to identify patterns in the data. Predictions may be made from the identified patterns to mitigate or prevent problems, e.g., associated with incorrect pipe placement 101 or the spacing of couplings relative to the blowout preventer 150. The acquired data, processed data, results of the processing processes, results from the analysis processes, or a combination thereof may be stored on the edge gateway at site 303.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The in-place edge gateway 303 can communicate with and actuate other components of the drilling rig system 100. For example, the in-place edge gateway 303 can automatically initiate an intervention procedure on the drilling rig system 100 or provide an alert to the operator to instruct the operator to perform a manual intervention procedure on the drilling rig system 100. The in-place edge gateway 303 can send a signal to actuate a component of the drilling rig system 100 (e.g., trigger an alarm or close a valve). The in-place edge gateway 303 can send a signal to initiate drilling dynamics or measurement operations. The in-place edge gateway 303 can send a signal to initiate, alter, or stop drilling hydraulics or measurement operations. The in-place edge gateway 303 can send a signal to issue a warning or alarm, trigger a safety mechanism, or initiate another health and safety action. The in-place edge gateway 303 can send a signal to optimize drilling, automation, or both. For example, the in-place edge gateway 303 can provide a variable used in drilling optimization, automation, or both.<h2 style=";text-align:left;direction:ltr">In some embodiments, one or more variables may be sent to the edge gateway at location 303 from one or more components of the drilling rig system 100 to enhance operations and calculations performed by the edge gateway at location 303. All operations and calculations performed by the edge gateway at location 303 occur locally on the drilling rig.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In some embodiments, the site edge gateway 303 may be communicatively coupled to a cloud. The cloud may be used to store data obtained by the site edge gateway 303. The cloud may be used to store large amounts of data, e.g., terabytes of data. Various operations may be performed in the cloud separately from the site edge gateway 303. For example, deep learning algorithms, machine learning algorithms, artificial intelligence algorithms, big data analytics, or any combination of these operations may be performed in the cloud. In some embodiments, one or more optimization variables may be determined by any one or more of these operations, and one or more optimization variables may be transmitted to the site edge gateway 303 to optimize operations and calculations performed by the site edge gateway 303. Operations performed in the cloud need not be performed locally on the drilling rig.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figures 4A, 4B, and 4C illustrate the development of tubing 101 being extended into the well. In Figure 4A, one of the connections 105 of tubing 101 is aligned with the upper piston blowout preventer 153, while the other two piston blowout preventers 153 are not aligned with either connection 105. The rim gate at location 303 (not shown in this figure) can identify this formation and send a signal, for example, to a control panel 350 at a remote location representing this formation. For example, the signal can cause the control panel 350 to display a representation of the formation to an operator showing that the upper piston blowout preventer 153 is not closing, while the other two piston blowout preventers 153 are the opposite.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In Figure 4B, one of the connections 105 of the pipe 101 is aligned with the middle piston blowout preventer 153, while the other two piston blowout preventers 153 are not aligned with either of the connections 105. The location edge gate 303 (not shown in this figure) can identify this configuration and send a signal, for example, to the control panel 350 at a remote location representing this configuration. For example, the signal can cause the control panel 350 to display a representation of the configuration to an operator showing that the middle piston blowout preventer 153 is not suitable for closing, while the other two piston blowout preventers 153 are the opposite.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In Figure 4C, one of the connections 105 of the pipe 101 is aligned with the lower piston blowout preventer 153, while the other two piston blowout preventers 153 are not aligned with either connection 105. The location edge gate 303 (not shown in this figure) can identify this configuration and send a signal, for example, to the control panel 350 at a remote location representing this configuration. For example, the signal can cause the control panel 350 to display a representation of the configuration to an operator showing that the lower piston blowout preventer 153 is not in a position to close, while the other two piston blowout preventers 153 are the opposite.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 5 is a block diagram illustrating an example of the various inputs, outputs, and functions of the edge gateway at location 303. The edge gateway at location 303 can accept as input data operator input variables, camera input variables, data from the data log, and images from the image sensor 301. Although not shown, the edge gateway at location 303 can accept additional data as input, such as audio data from the audio sensor. In some embodiments, the operator input is considered a "low-frequency" data type, where the data input may change, for example, less than once per day on average.<h2 style=";text-align:left;direction:ltr">Some non-limiting examples of operator data input variables include the expected operating speed of tubing 101 in the well (or the minimum expected lay-up speed, or the maximum expected lay-up speed, or both), tubing dimensions 101 (which may include the dimensions of tubular sections 103 or joints 105, or both), blow-out preventer dimensions 150 (which may include the dimensions of blow-out preventer components 150), rotary table dimensions and operating characteristics 142, rig system operating and design variables 100 (such as the maximum lay-up speed and heel depth), and limit tolerance values. In some embodiments, camera input is considered a "high-frequency" data type, where the data input may change, for example, once every five seconds, once every second, or faster.<h2 style=";text-align:left;direction:ltr">Some non-limiting examples of camera input variables include the height of the image sensor 301 relative to the well reference height, the distance of the image sensor 301 from the tubing 101, the distance of a reference point from the image sensor 301, the height of the blowout preventer 150 relative to the well reference height (which may include the relative height(s) of one or more annular blowout preventers 151, the relative height(s) of one or more piston blowout preventers 153, or a combination thereof), and calibration data.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The on-site edge gateway 303 can process input data and generate output data. Some non-limiting examples of output data include deviations of an actual drilling operation from a predicted drilling operation, drilling log data, raw data received from another device (such as image data captured by the image sensor 301), processed data (such as the results of image processing of the image data captured by the image sensor 301), detected vibration of the pipe 101, a signal representing the conformation of the pipe 101 (and its connections 105) with respect to the blowout preventer components 150 (such as the alignment of any of the connections 105 with the piston rollers 153a and 153b of any of the piston blowout preventers 153), and a signal to trigger an actuator based on detected operating conditions that meet operating criteria.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> In some embodiments, the actuator takes an action in response to an output of the site edge gate 303. In some embodiments, the output of the site edge gate 303 automatically causes an action to be initiated (e.g., the site edge gate 303 directly sends a signal to an actuator to adjust the position of the pipe 101).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In the example shown in Figure 6, the reference elevation for the well is the rotary table 142 (RT) located on the drilling floor. Because the rotary table 142 is higher than the components of interest, the following "elevations" are presented as "depths," which can be understood as the negative of the elevation (i.e., equal in magnitude but opposite in sign). The annular blowout preventer 151 (AP 1) has a depth of 11.8 feet. The upper piston blowout preventer 153 (RP 1) has a depth of 13.2 feet. The middle piston blowout preventer 153 (RP 2) has a depth of 15.9 feet. The lower piston blowout preventer 153 (RP 3) has a depth of 18.1 feet. Figure 7 shows the same example shown in Figure 6 and identifies the various connections 105 (TJ0, TJ1, TJ2, TJ3, TJ4). In a particular case shown in Figure 7, the lower connecting rods 105 (TJ0) are aligned with the upper piston blowout preventer 153 (RP 1).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The concepts described in this disclosure may optionally be applied in various ways to monitor other properties of the drilling rig. For example, Figure 8 shows an overview of the rotary table 142 and the pipe 101 being extended into the well. System 300 may be used to monitor the position of the pipe 101 relative to the rotary table 142. The image sensor 301 may capture such images of the rotary table 142 and the pipe 101, and the location edge gateway 303 may process the images to determine the displacement 801 of the center axis of the pipe 101 from the center axis of the rotary table 142. If the displacement 801 exceeds a limiting center axis position tolerance value, the location edge gateway 303 may send a signal, for example, to the control panel 350 to alert the operator that the pipe 101 is too off-center or to automatically engage a trigger (or make another adjustment) that would result in the center position of the pipe 101 being adjusted.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 9 is a flowchart of an example of method 900 for monitoring a drilling rig system (such as the drilling rig system 100). For clarity of presentation, the following description generally describes method 900 in the context of other figures in this description. However, it will be understood that method 900 may be implemented by any suitable system, environment, software, hardware, or combination of systems, environments, software, and hardware, as appropriate. For example, monitoring system 300 (or any system incorporating monitoring system 300) may be used to implement method 900. In some embodiments, various steps of method 900 may be operated in parallel, in combination, in loops, or in any order.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In step 902, one or more images are captured of a pipe (such as pipe 101) being run in the well. Pipe 101 includes a first pipe section and a second pipe section (such as pipe sections 103) connected together by a joint (such as joint 105). Pipe 101 may, for example, be a drill pipe line comprising drill pipes 103 connected together by couplings 105. One or more images may, for example, be captured by the image sensor 301 of the monitoring system 300. The one or more images may be provided as an image feed to the site edge gateway 303 of the monitoring system 300.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In step 904, the joint height 105 is determined relative to the well reference height based on one or more captured images (from step 902). The in-situ edge gateway 303 may process and analyze one or more images provided as image feeds from the image sensor(s) 301 to determine the joint height 105. The reference height may be, for example, the drilling floor 102. In some embodiments, the heights of multiple joints 105 are relative to the reference height in step 904. Determining the joint height 105 in step 904 may include distinguishing the joint 105 from the first and second tube sections 103. As previously described, the in-situ edge gateway 303 may perform image processing (e.g., edge detection) to identify one or more components based on known properties. For example, couplings 105 typically have larger outside diameters than drill pipe 103, so the site edge gate 303 can distinguish couplings 105 from drill pipe 103 by detecting the larger outside diameter relative to the pipe diameter 101.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In step 906, an operating condition is created based on the specified elevation (from step 904). The operating condition may be, for example, an alignment position of the joint 105 relative to another component of the drilling rig system 100 (such as the blowout preventer 150). In some embodiments, the alignment position is relative to one of the components of the blowout preventer 150, for example, the pistons and 153b of the piston blowout preventer(s) 153. For example, if it is determined that the joint 105 is aligned with the pistons 153a and 153b of one of the piston blowout preventers 153, an alignment position is created that represents the alignment of the joint 105 with the pistons 153a and 153b. In some embodiments, the rate at which the pipe 101 is being extended into (or out of) the well may be determined based on at least two images captured by the image sensor 301. For example, based on the time difference between the two captured images and the displacement of the joint 105 between the two captured images, the site edge gateway 303 may calculate the rate at which the pipe 101 is being extended into the well.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In step 908, it is determined whether the automation rule includes the operating condition created in step 906. The automation rule may be, for example, the condition in which the joint 150 is aligned with the blowout preventer 150 (or a component of the blowout preventer 150, such as the piston blowout preventer 153).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">In response to the determination that the automation rule includes the operating conditions in step 908, a signal is sent in step 910 to operate a controllable device. In some embodiments, the controllable device is located remotely (e.g., at a location other than local to the drilling rig). For example, the controllable device is located in a control room. In some embodiments, the controllable device includes a control panel in the control room (such as control panel 350), and the signal may prompt the control panel to display a representation of the operating condition (from step 906). In some embodiments, the controllable device includes an alarm (remote or local), and the signal may trigger the alarm (audio or visual). In some embodiments, the controllable device includes an extender that extends tubing 101 into or out of the well, and the signal causes the extender to adjust the rate at which the extender extends tubing into or out of the well. In some embodiments, the controllable device includes a blowout preventer 150, and the signal causes the blowout preventer 150 to close.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Figure 10 is a block diagram of an example of a computer system 1000 that can be used to provide computing functions associated with the algorithms, methods, functions, processes, flows, and procedures described in the present disclosure, according to some embodiments of the present disclosure. In some embodiments, the edge gateway at location 303 may be the computer system 1000 or include the computer system 1000. In some embodiments, the edge gateway at location 303 may communicate with the computer system 1000.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The computer device 1002 illustrated is intended to include any computing device such as a server, desktop computer, embedded computer, laptop / notebook computer, wireless data port, smartphone, personal data assistant (PDA), tablet computer, and one or more processors within such devices, including physical instances, virtual instances, or both. Computer 1002 may include input devices such as keyboards, keyboards, and a touch screen that can accept user information. Also, Computer 1002 may include output devices that can transmit information associated with the operation of Computer 1002. The information may include digital data, visual data, audio information, or a combination of information. The information may be presented in a graphical user interface (UI) or a graphical user interface (GUI). In some models, inputs and outputs include display ports (such as DVI-I + 2x display ports), USB 3.0 ports, GbE ports, isolated DI / O ports, SATA-III (6.0 Gb / s) ports, mPCIe slots, a combination of these, or other ports.<h2 style=";text-align:left;direction:ltr">In edge gateway cases, computer 1002 may include a Smart Embedded Management Agent (SEMA), such as ADLINK SEMA 2.2 Embedded, and video synchronization technology, such as Quick Sync Video supported by ADLINK MSDK+. In some examples, computer 1002 may include an ADLINK MXE-5400 Series processor-based fanless embedded computer, although computer 1002 may take other forms or include other components.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Computer 1002 can act as a client, network component, server, database, server, or other component of a computer system to implement the subject matter described in the present disclosure. Computer 1002 is scalably coupled to a network 1030. In some embodiments, one or more components of computer 1002 can be configured to operate in various environments, including cloud-based environments, local environments, international environments, and a combination of these environments.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">At a high level, computer 1002 is an electronic computing device capable of receiving, transmitting, processing, storing, and managing data and information related to the subject matter described. In accordance with some embodiments, computer 1002 may further include, or be interconnected with, an application server, a mail server, a web server, a caching server, a streaming data server, or a combination of servers.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Computer 1002 may receive commands over the network 1030 from a client application (e.g., executed on another computer 1002). Computer 1002 may respond to the received commands by processing the received commands using software applications.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Commands may also be sent to computer 1002 from internal users (e.g., from the command unit), external (or third) parties, automation applications, entities, individuals, systems, and computers.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Each component of the computer 1002 can communicate using the system bus. In some embodiments, any or all of the computer components 1002, including hardware or software components, can interact with each other or with the interface 1004 (or a combination of both), via the system bus. Interfaces may be an application programming interface (API), a service layer, or a combination of an API and a service layer. An API can include specifications for procedures, data structures, and object classes. An API can be either language-independent or language-dependent. An API can refer to an entire interface, a single function, or a set of APIs.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The service layer may provide software services to computer 1002 and other components (whether or not illustrated) that are connectively coupled to computer 1002. The functionality of computer 1002 may be accessible to all consumers of the service using this service layer. Software services, such as those provided by the service layer, may provide reusable functionality defined through a particular interface. For example, the interface may be software written in Java, C++, or a language that provides data in extensible markup language (XML) format. While illustrated as an integrated component of computer 1002, in alternative embodiments, the API or service layer may be self-contained components with respect to other components of computer 1002 and other components connectively coupled to computer 1002. Furthermore, any or all portions of the API or service layer may be implemented as sub-modules or children of another software module, enterprise application, or hardware module without departing from the scope of the present disclosure.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Computer 1002 may include an interface 1004. Although illustrated as a single interface 1004 in Figure 10, two or more interfaces 1004 may be used according to the particular needs, desires, or applications of computer 1002 and the described function. Interface 1004 may be used by computer 1002 to communicate with other systems connected to the network 1030 (whether or not illustrated) in a distributed environment. In general, interface 1004 may include, or be implemented using, logic coded in software or hardware (or a combination of software and hardware) operable for communication with the network 1030. More specifically, interface 1004 may include software supporting one or more communication protocols associated with the communications. Further, the network 1030 or the interface hardware may be operable for extending physical signals into and out of the computer illustrated 1002.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Computer 1002 includes a processor 1005. Although illustrated as a single processor 1005 in Figure 10, two or more processors 1005 may be used according to the needs, desires, or particular applications of computer 1002 and the functions described. In general, processor 1005 can execute instructions and can process data to perform computer operations 1002, including operations using algorithms, methods, functions, processes, flows, and procedures as described in the present disclosure.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Computer 1002 may also include a database 1006 that can hold data for computer 1002 and other networked components 1030 (whether or not shown). For example, database 1006 may be an in-memory, conventional, or memory database that stores data consistent with the present disclosure. In some embodiments, database 1006 may be a combination of two or more different types of databases (e.g., a combination of in-memory and conventional databases) according to the needs, desires, or particular applications of computer 1002 and the functions described. Although illustrated as a single database 1006 in Figure 10, two or more databases (of the same, different, or combination of types) may be used according to the needs, desires, or particular applications of computer 1002 and the functions described. While database 1006 is illustrated as an internal component of computer 1002, in alternative embodiments, database 1006 may be located external to computer 1002.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The computer 1002 also includes a memory 1007 that can hold data for the computer 1002 or a plurality of networked components 1030 (whether or not illustrated). The memory 1007 can store any data consistent with the present disclosure. In some embodiments, the memory 1007 can be a combination of two or more different types of memory (e.g., a combination of semiconductor and magnetic storage) according to the particular needs, desires, or applications of the computer 1002 and the functions described. Although illustrated as a single memory 1007 in Figure 10, two or more memories 1007 (of the same, different, or a combination of types) may be used according to the particular needs, desires, or applications of the computer 1002 and the functions described. While the memory 1007 is illustrated as an internal component of the computer 1002, in alternative embodiments, the memory 1007 can be located external to the computer 1002.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">An application may be an algorithmic software engine that provides functionality according to the needs, desires, or specific applications of computer 1002 and the functions described. For example, an application may be one or more components, modules, or applications. Multiple applications may be executed on computer 1002. Each application may be located inside or outside the computer.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The computer 1002 may also include a power supply 1014. The power supply 1014 may include a rechargeable or non-rechargeable battery that can be configured to be either user-replaceable or non-user-replaceable. In some embodiments, the power supply 1014 may include power conversion and management circuitry, including recharging, standby, and power management functions. In some embodiments, the power supply 1014 may include a power plug to allow the computer 1002 to be connected to a wall outlet or power source, for example, to supply power to the computer 1002 or to recharge a rechargeable battery.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">There may be any number of computers 1002 connected to, or outside, a computer system comprising computer 1002, with each computer 1002 connected via network 1030. Furthermore, the terms "client," "user," and other appropriate terms may be used interchangeably, as appropriate, without departing from the scope of the present disclosure. Furthermore, the present disclosure assumes that multiple users may use a single computer 1002 and one user may use multiple computers 1002.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Embodiments of the subject matter and the functional operations described in this specification may be implemented in digital electronic circuits, in physically embedded computer software or firmware, in computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of these. Software embodiments of the subject matter described may be implemented as one or more computer programs. Each computer program may include one or more computer program instruction units encoded on an intangible, non-transiting, computer-readable computer storage medium for execution by, or to control the operation of, a data processing device. Alternatively, or in addition, the program instructions may be encoded in / on an artificially generated propagating signal. For example, the signal may be a machine-generated electrical, optical, or electromagnetic signal generated to encode information for transmission to a suitable receiver for execution by the data processing device.<h2 style=";text-align:left;direction:ltr">A computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random-access memory or serial memory device, or a combination of computer storage media.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The terms "data processing device," "computer," and "electronic computer" (or their equivalent as understood by one of ordinary skill in the art) refer to hardware components for data processing. For example, a data processing device can include all types of equipment, devices, and machines for data processing, including, for example, a programmable processor, a computer, multiple processors, or computers. The device can also include special-purpose logic circuits, including, for example, a central processing unit (CPU), a field programmable gate array (FPGA), or an application-specific integrated circuit (ASIC). In some embodiments, the data processing devices or special-purpose logic circuits (or a combination of data processing devices or special-purpose logic circuits) can be hardware-based, software-based, or a combination of both hardware and software.<h2 style=";text-align:left;direction:ltr">The device may optionally include code that creates an execution environment for computer programs, e.g., code that constitutes the firmware of a processor, a protocol stack, a database management system, an operating system, or a combination of execution environments. The present disclosure assumes the use of data processing devices with or without conventional operating systems, e.g., Linux, Unix, Windows, Mac OS, Android, or iOS.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">A computer program, which may be referred to or described as a program, software, software application, module, software unit, text, or code, may be written in any form of programming language. Programming languages ​​may include, for example, compiled languages, interpreted languages, declarative languages, or procedural languages. Programs may be used in any form, including as stand-alone programs, modules, components, subfunctions, or units for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program may be stored in a portion of a file containing other programs or data, for example, one or more pieces of text stored in a markup language document, in a single file dedicated to the program in question, or in multiple formatted files storing one or more modules, subprograms, or pieces of code. A computer program may be used for execution on a single computer or on multiple computers located, for example, at a single site or distributed over multiple sites interconnected by a communications network.<h2 style=";text-align:left;direction:ltr">While the software components described in the various figures may appear as individual modules that implement different features and functionality through different objects, methods, or operations, the software can instead include a number of submodules, third-party services, components, and libraries. Conversely, the features and functionality of different components can be combined into individual components as appropriate. The thresholds used to make computational determinations can be specified statically, dynamically, or both.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">The methods, operations, or logic flows described in this specification may be implemented by one or more programmable computer devices that execute one or more computer programs to perform functions by operating on input data and generating outputs. The methods, operations, or logic flows may also be implemented by, and the device may also be implemented as, a dedicated logic circuit, for example, a central processing unit (CPU), a field programmable gate array (FPGA), or an application-specific integrated circuit (ASIC).<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Computers suitable for executing a computer program can be based on one or more general-purpose microprocessors, special-purpose microprocessors, and other types of CPUs. The components of a computer are a central processing unit (CPU) to perform or execute instructions and one or more memory devices to store instructions and data. Generally, a CPU can receive instructions and data from (and write data to) memory. A computer can also include, or be coupled with, one or more mass storage devices to store data. In some embodiments, a computer can receive data from, and transfer data to, mass storage devices including, for example, magnetic disks, magnetic-optical disks, or optical disks.<h2 style=";text-align:left;direction:ltr">Furthermore, a computer may be integrated into another device, for example, a mobile phone, a personal data assistant (PDA), a portable audio or video player, a game console, a receiver for a global positioning system (GPS), or a portable storage device such as a universal serial bus (USB) flash drive.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Computer-readable media (transient or non-transient, as applicable) suitable for storing computer program instructions and data can include all forms of permanent / non-permanent and volatile / non-volatile memory devices, media, and memory devices. Computer-readable media can include, for example, semiconductor memory devices such as random access memory (RAM), read-only memory (ROM), phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), and flash memory. Computer-readable media can also include, for example, magnetic devices such as tape, cartridges, cassettes, and internal / removable disks.<h2 style=";text-align:left;direction:ltr">Computer-readable media can also include, for example, digital video discs (DVDs), CD-ROMs, DVD+ / -Rs, DVD-RAMs, DVD-ROMs, HD-DVDs, and Blu-ray discs. Memory can store various objects or data, including caches, classes, frameworks, applications, modules, backup data, functions, web pages, web page templates, data structures, database tables, repositories, and dynamic information. The types of objects and data stored in memory can include variables, variables, algorithms, instructions, rules, constraints, and references. In addition, memory can include registers, policies, data security or access, and report files. The processor and memory can be complemented by or integrated with special-purpose logic circuits.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Embodiments of the subject matter described in the disclosure may be implemented on a computer having a display device to provide interaction with the user, including displaying information to (and receiving input from) the user. Types of display devices may include, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), a light-emitting diode (LED), and a plasma display. Display devices may include a keyboard and pointing devices, including, for example, a mouse, a trackball, or a trackpad. User input to the computer may be provided through the use of a touchscreen, such as a pressure-sensitive tablet surface or a multi-touch display using a capacitive or electrical sensor. Other types of devices may be used to provide interaction with the user, including receiving user feedback, including, for example, sensory feedback, including visual, auditory, or tactile feedback. User input may be received in the form of audio, speech, or touch input.<h2 style=";text-align:left;direction:ltr">In addition, the computer can interact with the user by sending documents to and receiving documents from a device used by the user. For example, the computer can send web pages to a web browser on the user's client device in response to commands received from the web browser.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> The term "graphical user interface" (GUI) can be used in either the singular or plural forms to describe one or more graphical user interfaces (GUIs) and each of the display methods for a given GUI. Therefore, a GUI can represent any graphical user interface (GUI), including, but not limited to, a web browser, a touch screen, or a command-line interface (CLI), that processes information and efficiently delivers information results to the user. In general, a GUI can include a set of user interface (UI) elements, some or all of which are associated with a web browser, such as interactive fields, drop-down menus, and buttons. These and other UI elements can relate to or represent the functionality of a web browser.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Embodiments of the present subject matter described in this specification can be implemented in a computing system that includes a back-end component, for example, a data server, or that includes a middleware component, for example, an application server. Furthermore, the computing system can include a front-end component, for example, a client computer with a graphical user interface, or both, or a web browser through which a user can interact with the computer. The system components can be interconnected by any form or medium of wired or wireless digital data communications (or a set of data communications) in a communications network. Examples of communications networks include a local area network (LAN), a radio access network (RAN), a metropolitan area network (MAN), a wide area network (WAN), Worldwide Interoperability for Microwave Access (WIMAX), and a wireless local area network (WLAN) (for example, using 802.11 a / b / g / n or 802.<h2 style=";text-align:left;direction:ltr">20 or a combination of protocols), all or part of the Internet, or any other communication system or systems at one or more locations (or a group of communication networks). A network can communicate, for example, with Internet Protocol (IP) packets, Frame Relay frames, asynchronous transfer mode (ATM) cells, voice, video, data, or a combination of communication types between network addresses.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> A computing system can include clients and servers. The client and server can generally be remote from each other and usually interact over a network. The client-server relationship can be established by computer programs running on the computers involved, which have a client-server relationship.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Clustered file systems can be any type of file system that can be accessed from multiple servers for reading and updating. Consistent locking or tracking may not be necessary because locking for a swap file system can be performed at the application layer. Furthermore, single-code data files can be different from non-single-code data files.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> While this specification contains numerous implementation details, they should not be construed as limitations on the scope of what may be claimed to be protected, but rather as descriptions of features that may be specific to particular embodiments. Some of the features described in this specification may also be implemented in the context of separate embodiments, together, in a single embodiment. Conversely, many of the features described in the context of a single implementation may also be implemented in multiple implementations, separately, or in any appropriate subset. Furthermore, although the features described previously may be described as operating in certain combinations and even initially claimed as such, in some cases one or more of the features may be removed from the claimed combination, and the claimed combination may be directed to a subset or variation of a subset.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Certain embodiments of the subject matter are described. Other embodiments, modifications, and variations of the described implementations are within the scope of the following claims, as will be apparent to those skilled in the art. While the operations in the drawings or claims are described in a particular order, this should not be understood to require that these operations be performed in the specific order shown or in sequential order, or that all of the operations shown be performed (some operations may be considered optional), to achieve the desired results. In certain circumstances, multitasking or parallel processing (or a combination of multitasking and parallel processing) may be beneficial and implemented as appropriate.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Furthermore, the separation or integration of various system modules and components in the previously described embodiments should not be understood to require such separation or integration in all embodiments, and it should be understood that the described software components and systems can generally be integrated together in a single software product or bundled into multiple software products.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr">Accordingly, the examples of embodiments described above do not limit or restrict the present disclosure. Other changes, substitutions, and modifications are also possible without departing from the spirit and scope of the present disclosure.<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> Furthermore, any application claimed to be protected is deemed to be applicable to at least a computer-implemented method; a non-transitional computer-readable medium that stores computer-readable instructions for executing the computer-implemented method; and a computer system comprising computer memory interoperably coupled to a hardware processor configured to execute the computer-implemented method or instructions stored on a non-transitional computer-readable medium.

Claims

Claim 1. A method, comprising: taking one or more photographs of a pipe being extended into a well, the pipe comprising a first tubular section and a second tubular section connected together by a joint; based on the one or more photographs taken, determining the joint's height relative to a well-specific reference height; based on the determined height, establishing an operating condition, wherein the operating condition includes an alignment position of the joint relative to a well blowout preventer 150; determining whether an automation rule includes an operating condition, wherein the automation rule includes a condition in which the joint is aligned with the blowout preventer; and in response to the determination that the automation rule includes an operating condition, transmitting a signal to drive a controllable device, wherein the controllable device includes an alarm means, and operating the controllable device includes activating the alarm means.

2. The method according to claim 1, wherein the controllable device includes a control panel at a remote location, and operating the controllable device includes displaying a representation of the operating condition on the control panel.

3. The method according to claim 1, wherein the controllable device includes a splicer that extends the tubing into the well, and operating the controllable device includes adjusting the rate at which the splicer extends the tubing into the well.

4. The method according to claim 1, wherein the controllable device includes a blowout preventer, and operating the splicer includes closing the blowout preventer.

5. The method according to claim 1, wherein the rate at which the tubing is extended into the well is determined based on at least two photographs taken.

6. The method according to claim 1, wherein determining the joint height includes distinguishing the joint from the first and second tubular sections.

7. The method according to claim 6, wherein: the first tubular section includes a first drill pipe; the second tubular section includes a second drill pipe; the joint includes a splicer; and distinguishing the joint from the first and second tubular sections includes identifying the splicer based on detecting an outside diameter of the splicer.

8. A system, comprising: an image sensor 301 configured to capture an image stream of a pipe being laid in a well, wherein the image sensor 301 is mounted, the pipe comprising a first tubular section and a second tubular section connected to each other by a connector; and an on-site edge gateway local to the image sensor 301 and communicably coupled to the image sensor 301, the on-site edge gateway configured to perform operations including: receiving an image stream from the image sensor 301; determining, from the image stream, the height of the connector relative to a reference height of the well; establishing, based on the determined height, an operating condition; determining whether an automation rule includes the operating condition; and, in response to the determination that the automation rule includes the operating condition, transmitting a signal to operate a remotely controllable device.

9. The system according to claim 8, wherein the image sensor 301 is mounted in a fixed position.

10. The system according to claim 8, wherein the gate edge at the site includes one or more processors and a computer-readable storage medium associated with the one or more processors that stores programming instructions for execution by the one or more processors, and the programming instructions direct the one or more processors to perform operations.

11. The system according to claim 10, wherein establishing an operating condition includes determining the alignment position of the joint relative to the well blowout preventer 105.

12. The system according to claim 11, wherein the automation rule includes a condition in which the joint is aligned with the blowout preventer.

13. The system according to claim 12, wherein the controllable device includes: the controllable device includes a control panel; and the operation of the controllable device includes displaying a representation of the operating condition on the control panel.

14. The system according to claim 12, wherein the controllable device includes: the controllable device includes an alarm; and the operation of the controllable device includes raising the alarm.

15. The system according to claim 12, comprising the controllable device, wherein: the controllable device includes a splicer configured to extend the tubing into the well; and operation of the controllable device includes adjusting the rate at which the splicer extends the tubing into the well.

16. The system according to claim 12, comprising the controllable device, wherein: the controllable device includes a blowout preventer; and operation of the controllable device includes closing the blowout preventer.

17. The system according to claim 10, wherein the on-site flange gate is configured to determine the rate at which the tubing is extended into the well based on at least two images taken by the image sensor 301.

18. The system according to claim 10, wherein the on-site flange gate is configured to distinguish the splicer from the first and second tubular sections.

19. A method, comprising: taking one or more photographs of a pipe being extended into a well, the pipe including a first tubular section and a second tubular section connected together by a joint; based on the one or more photographs taken, determining the joint height relative to a well-specific reference height; determining the rate at which the pipe is being extended into the well based on at least two photographs taken of one or more photographs; based on the height determined, establishing an operating condition; determining whether an automation rule includes an operating condition; and in response to the determination that the automation rule includes an operating condition, transmitting a signal to operate a remote controllable device.

20. A method, comprising: taking one or more photographs of a pipe being extended into a well, the pipe comprising a first tubular section and a second tubular section connected together by a joint; based on the one or more photographs taken, determining the joint height relative to a well-specific reference height, wherein determining the joint height comprises distinguishing the joint from the first and second tubular sections; based on the determined height, establishing an operating condition; determining whether an automation rule includes an operating condition; and in response to determining that the automation rule includes an operating condition, transmitting a signal to operate a remotely controllable device.

21. The method according to claim 20, wherein: the first tubular section comprises a first drill pipe; the second tubular section comprises a second drill pipe; the joint comprises a coupling; and distinguishing the joint from the first and second tubular sections comprises identifying the coupling based on detecting an outer diameter of the coupling.22- The method according to claim 20, the operating condition includes an alignment position of the joint relative to the well blowout preventer 105; wherein the automation rule includes a condition in which the joint is aligned with the blowout preventer.