METHOD AND SYSTEM FOR LOCATING A DOWNHOLE TOOL IN STEEL-CASED HOLES
A method for locating a downhole tool in a wellbore involves obtaining, by the downhole tool, a pressure measurement in the wellbore, generating a first depth estimate based on the pressure measurement, and anticipating a passing of the downhole tool by a collar, based on the first depth estimate and a known depth of the collar. The method further involves, based on the anticipating of the passing of the downhole tool by the collar, performing, by the downhole tool, a collar detection, and based on the collar detection resulting in a detection of the collar: generating an updated depth estimate, and reporting the updated depth estimate.
Latest ARAMCO SERVICES COMPANY Patents:
- METHOD TO DETERMINE API GRAVITY OF SULFUR-RICH MARINE OILS USING AROMATIC COMPOUND CHEMISTRY
- PIEZOELECTRIC LEAF CELL SENSOR ARRAY FOR MULTIPHASE GAS-OIL-WATER FLOW METERING
- PROCESS OF CONVERTING HYDROGEN SULFIDE AND CARBON DIOXIDE TO METHANE AND SOLID SULFUR ON CARBON-BASED CATALYSTS UNDER MILDER CONDITIONS WITH REDUCED CARBON FOOTPRINT
- SYSTEM AND METHOD FOR DEPLOYING FIBER OPTIC CABLES WITH A CURED-IN-PLACE PIPE LINER
- FROZEN CHAMBER FOR DISTRIBUTED ACOUSTIC SENSING (DAS) CONFIGURATION TESTS AND DISPOSABLE DEPLOYMENT
This application claims the benefit of U.S. Provisional Application Ser. No. 63/543,493 entitled “METHOD AND SYSTEM FOR LOCATING A DOWNHOLE TOOL IN STEEL-CASED HOLES” and filed on Oct. 10, 2023, which is incorporated by reference herein in its entirety.
TECHNICAL FIELDThis disclosure relates to logging of subterranean wells. Specifically, it relates to determination of the location of a downhole logging tool within a well.
BACKGROUNDPosition, orientation, and or speed of a downhole tool may be variables of high significance. For example, when a downhole tool obtains measurements, it may be important to know the depth at which the measurements were taken. However, finding orientation, speed, and position of a tool in a downhole can be challenging. Wireline tools may use the wire length as reference for the tool's position and spooling rate is related to the tool's speed. The wire tension may also be measured to account for the elongation in wire. Emerging as an alternative to wireline tools, untethered tools do not have any well-known method to estimate orientation, position, and velocity. The ability to accurately estimate depth may be highly desirable, for untethered tools, but also for other tools.
SUMMARYThis summary is provided to introduce a selection of concepts that are further described below in the detailed description. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used as an aid in limiting the scope of the claimed subject matter.
In general, in one aspect, embodiments relate to a method for locating a downhole tool in a wellbore, the method comprising: obtaining, by the downhole tool, a pressure measurement in the wellbore; generating a first depth estimate based on the pressure measurement; anticipating a passing of the downhole tool by a collar, based on the first depth estimate and a known depth of the collar; based on the anticipating of the passing of the downhole tool by the collar, performing, by the downhole tool, a collar detection; and based on the collar detection resulting in a detection of the collar: generating an updated depth estimate, and reporting the updated depth estimate.
In general, in one aspect, embodiments relate to an untethered device comprising: a tool comprising a pressure sensor and a processor, wherein the processor: obtains a pressure measurement from the pressure sensor, generates a first depth estimate based on the pressure measurement, anticipates a passing of the untethered device by a collar, based on the first depth estimate and a known depth of the collar; based on the anticipating of the passing of the downhole tool by the collar, performs a collar detection; and based on the collar detection resulting in a detection of the collar: generates an updated depth estimate, and reports the updated depth estimate.
In light of the structure and functions described above, embodiments of the disclosure may include respective means adapted to carry out various steps and functions defined above in accordance with one or more aspects and any one of the embodiments of one or more aspect described herein.
Other aspects and advantages of the claimed subject matter will be apparent from the following description and the appended claims.
Specific embodiments of the disclosed technology will now be described in detail with reference to the accompanying figures. Like elements in the various figures are denoted by like reference numerals for consistency.
In the following detailed description of embodiments of the disclosure, numerous specific details are set forth in order to provide a more thorough understanding of the disclosure. However, it will be apparent to one of ordinary skill in the art that the disclosure may be practiced without these specific details. In other instances, well-known features have not been described in detail to avoid unnecessarily complicating the description.
Throughout the application, ordinal numbers (e.g., first, second, third, etc.) may be used as an adjective for an element (i.e., any noun in the application). The use of ordinal numbers is not to imply or create any particular ordering of the elements nor to limit any element to being only a single element unless expressly disclosed, such as using the terms “before”, “after”, “single”, and other such terminology. Rather, the use of ordinal numbers is to distinguish between the elements. By way of an example, a first element is distinct from a second element, and the first element may encompass more than one element and succeed (or precede) the second element in an ordering of elements.
In general, embodiments of the disclosure include systems and methods for locating downhole tools in steel-cased holes. Knowing the location of a downhole tool may be important for various reasons. For example, a downhole tool may be configured to collect measurements of the properties of the wellbore. In order to enable interpretation of these measurements, it may be important to correlate the measurements with depth.
Unless stated otherwise, “depth” refers to the “measured depth” (MD) or distance along the wellbore from the surface end of the wellbore or from a reference elevation near the surface end, such as the top of the tree at the well, the top of the wellhead, or the Kelly bushing height on a rig when the well was drilled. It will be understood that the measured depth at a position along the wellbore is equal to the true vertical depth (TVD) from a reference elevation to the downhole tool for the case of a vertical wellbore, and the MD will be larger than the TVD if the wellbore departs from vertical within some interval above the tool, such as if the well is deviated or has a horizontal interval or lateral. It will also be understood that a small local change in TVD can be divided by the cosine of the wellbore deviation (angle of the wellbore with respect to vertical) to approximately determine the corresponding small local change in MD. It will also be understood that if a wellbore is filled between two points with a stationary fluid having density p, then the difference in pressure between the two points will equal the difference in TVD between the points times the density.
Embodiments of the inventive method form an estimate depth. The depth estimate may be obtained, for example, based on pressure measurements (along with knowledge of the wellbore deviation and wellbore fluid density) or based on measurements.of acceleration along the direction of the wellbore. In some embodiments, a recursive estimator, such as a Kalman filter, is used to generate the estimate of depth based on using a measurement of pressure or acceleration to update a previous estimate of depth. In some embodiments, a recursive estimator forms an estimate of a state vector comprising a vehicle depth and optionally additionally comprising a vehicle speed (or time rate of change of depth). In some embodiments, a recursive estimator begins with an initial estimate of depth and updates the estimate at steps in time based on the dynamics of motion and corrects its estimate based on sensor measurements. In some embodiments, a recursive estimator such as a Kalman filter forms an estimate of both a state vector (such as a depth or optionally a depth and a speed) and a characteristic of the uncertainty in the estimate of the state vector such as a variance or a covariance matrix characterizing the uncertainty in the estimate of the state vector.
Subterranean wells are commonly lined with steel casing which prevents the wellbore from collapsing and isolates the fluids inside the well from fluids in the surrounding rock formations. This casing is constructed from joints of steel pipe connected end-to-end by couplings. Within the casing is often production tubing. The production tubing serves to convey fluids from a subsurface reservoir at the bottom of the well to the surface and protects the casing from corrosive or damaging effects of the fluid. The production tubing is constructed from joints of steel tubing connected end-to-end. Whether the untethered device is operating within the production tubing or within casing where there is no tubing, or within the annulus between casing and tubing, it is surrounded by joints of pipe connected end-to-end. The measured depth of each such pipe joint is typically determined when the casing or tubing are run into the well. Thus the connections between pipe joints can serve as reference points of known depth. In one embodiment these connections are detected by associated fluctuations of magnetic field inside the casing. In another embodiment, these connections are detected by acoustic measurement of the interior gaps between pipe joints. In another embodiment, these connections are detected by a casing collar locator which senses the thicker steel at the locations of the couplings between pipe joints. With all these techniques, the depth of the connections is accurately know, but there may be uncertainty associated with the detection of the connections such that there are some missed detections (where the untethered device passes a connection without detecting it) and some false detections (where noise in the detector leads the untethered device to believe that a connection has been detected when no connection is actually present.) The inventive method utilizes depth information from detections of pipe joint connections even when there are occasional missed detections and false alarms.
In order to improve depth accuracy compared to what would be possible using a recursive estimator operating on pressure and acceleration data alone, the depth estimates are verified against and updated based on other known data. It may not be clear whether a particular detection of a pipe connection is a false detection or which connection depth it is associated with. The inventive method is a way to carry forward multiple hypotheses about which if any pipe connection is associated with each detection, use the variances calculated by the recursive estimator for the depth estimates under each hypothesis to evaluate the relative likelihood of that hypothesis, and reject unlikely hypotheses and carry forward only the most likely candidate hypotheses.
Specifically, embodiments of the invention make use of the known location of casing collars at the joint locations between adjacent pipe sections. Based on a comparison of the estimated depth at a location where a collar is detected, a new hypothesis may be generated. Starting at that point, a Kalman filter based on the initial hypothesis and a Kalman filter based on the new hypothesis may be executed to generate separate depth estimates. Any number of additional hypotheses may be generated, as the downhole tool passes additional collars. The estimation accuracy of the hypotheses may be compared (based on known collar location), and the most accurate depth estimate may be relied upon by other operations performed by or associated with the downhole tool.
In one embodiment, each hypothesis is a set of associations between connection or collar detections and specific connection depths. In one embodiment, each hypothesis has a likelihood function associated with it which is the product of the likelihood functions of the individual detections based on the estimated depths and depth variances when the detection took place. Optionally, instead of multiplying the likelihood functions, their logarithms are added. Optionally, considering a detection to be a false alarm and not assigning it to a specific connection depth can be assigned a penalty which is multiplied to the likelihood function or added to the log likelihood function. Optionally, skipping a connection by considering the connection not to have a detection (missed detection) can be assigned a penalty which is multiplied to the likelihood function or added to the log likelihood function. In one embodiment, the false alarm and missed detection penalties would correspond to the likelihood associated with a detection with a depth error of 0.2 to 2 standard deviations.
Embodiments of the disclosure have various benefits. Embodiments of the disclosure rely on the known location of pipe joint connections or collars. Typically, the length of each pipe and their order in a wellbore is known and recorded in a well completion report. Accordingly, the location of collars or connections can be assumed to be known with good accuracy. Thus, embodiments of the disclosure can use reliable location information to continuously adjust the depth estimates for improved accuracy. However, unlike purely collar-based methods which are limited to providing readings at the collar location, embodiments of the disclosure provide accurate depth estimates between collars as well. Embodiments of the disclosure use magnetometers for the collar detection. Unlike casing collar locators that exert a strong magnetic field on the steel casing to scan for changes in the distribution of magnetic field lines in presence of changes in metal thickness at the collar, a magnetometer does not need to actively generate a magnetic field. The use of magnetometers thereby avoids issues with the untethered device getting immobilized against the steel casing as a result of the strong magnetic field. Alternatively, any other type of casing collar locator may be used, without departing from the disclosure.
In one or more embodiments, the tool (200) includes circuitry (230) that controls various functionalities of the untethered device (100). In some embodiments, the circuitry (230) includes one or more processors (238). The circuitry (230) may further include additional components such as a receiver (232), a transmitter (234), and a controller (236). The tool (200) may also include an internal battery (240) that powers various components of the untethered device (100).
In one or more embodiments, the one or more processors (238) may execute a method as further described below in reference to
In one or more embodiments, the tool (200) includes sensors (250). The sensors (250) may measure physical, chemical, geological, or structural properties along the wellbore (101) to log the wellbore (101). The measurements may be continuously performed. Example properties include elapsed time, temperature, pressure, acceleration, fluid density, fluid viscosity, fluid flow rate, magnetic field, gamma ray intensity, tool acceleration, tool rotation, and other parameters. The continuous measurements may be acquired while the tool (200) both descends and ascends through the wellbore fluid (109). In one or more embodiments, the sensors (250) include one or more magnetometers. The magnetometer(s) may be used to locate a casing collar as the untethered device passes a casing collar, e.g., as illustrated in
During the logging operation, the transmitter (224) may send data carrying the real-time measurements to one or more devices located at the surface (103) for further processing of the data. Alternatively, the data may be stored for later retrieval.
As previously noted, the untethered device (100) is configured to change its buoyancy in order to move in an uphole direction (107), e.g., after reaching a target depth (111). The change in buoyancy is achieved by releasing the ballast weight (206). Releasing of the ballast weight (206) may be achieved by dissolving the ballast weight (206) and/or by releasing the ballast weight (206) using a release mechanism (204), e.g., a magnetic release mechanism, activated by the controller (236). Upon release of the ballast weight (206), an overall (e.g., bulk) density of the untethered device (100) decreases (e.g., instantaneously) to a value that is less than that of the wellbore fluid (109). Accordingly, the untethered device (100) (e.g., the functional module remaining after release of the ballast weight (206)) is buoyant enough to float in the uphole direction (207) (e.g., referring to 100c in
While
Broadly summarized, the method determines the depth of an untethered tool using a combination of a recursive estimator which optionally also provides estimate uncertainties (such as a Kalman filter), a device for locating pipe connections, such as a magnetometer-based casing collar locator, and prior information of connection depths. The flowchart identifies operations that involve generating (e.g., using the Kalman filter) a depth estimate based on a pressure measurement. Based on the depth estimate, the passing of the downhole tool (e.g., as it is sinking) by a collar is anticipated. When the collar is detected, an update depth estimate is generated based, and the updated depth estimate is reported. A detailed description is subsequently provided, following a brief introduction of the Kalman filter that can be used to generate depth estimates and estimate uncertainties.
Table 1 summarizes a Kalman filter used in accordance with embodiments of the disclosure. The table is based on standard notation, e.g., as commonly used, to describe linear time-invariant systems (Reference notation can be found in Welch, G. (1995). An introduction to the Kalman filter. International Conference on Computer Graphics and Interactive Techniques.).
The set of equations above is for a Kalman filter that operates on pressure measurements. If an accelerometer is added to the system, the accuracy of the dynamic model estimation may be improved. In the case of an added accelerometer, the following modifications may be made:
Turning to the flowchart of
In Step 304, a pressure measurement is obtained. Optionally, an acceleration measurement may be obtained as well. As indicated in the flowchart, measurements may be periodically obtained, e.g., based on a measurement time interval Δt. At may be 0.01 s to 10 s, for example, in case of a typical downhole tool moving between 0-10 ft/s.
In Step 306, a depth estimate is generated based on the measurements, and using the hypothesis. When Step 306 is executed for the first time, the number of hypotheses is equal to the number of initial hypotheses, established in Step 302. If only one initial hypothesis exists, the estimation algorithm used in Step 306 may be parameterized using the initial hypothesis. Later, Step 306 may be executed for multiple hypotheses that may have been generated as further discussed below, and these hypotheses may be used to parameterize the estimation algorithm.
The depth estimate may be made using recursive estimation (e.g., using a Kalman filter). Based on the nature of the Kalman filter, depth estimates are made iteratively and periodically, e.g., in a loop. The Kalman filter, when executed in a loop, can be refreshed for each pressure (and optionally accelerometer) measurement, or at a reduced frequency. A higher frequency execution consumes more computing resources and, thus, energy, but may increase the accuracy and resolution of the depth estimate.
The Kalman filter may use a physical model of the downhole tool and a depth measurement that is derived from the pressure measurement. The physical model estimates the depth based on the equation of motion (1)
where d is absolute depth, d0 is reference depth, {dot over (d)} and {umlaut over (d)} are average linear speed and acceleration during the time interval Δt, respectively. If the fluid density is known and stays constant through the traveled depth, change in pressure can be used to calculate depth (2):
where ΔΠ is change in pressure, ρ is the fluid density, and θ is the well deviation angle from the vertical. The fluid density may be known, measured, or inferred from other measurements. For example, a density sensor may be placed on the tool to monitor density. Alternatively, the transient response of the pressure measurement may be monitored. More specifically, the buoyant force becomes smaller in oil compared to water due to smaller density while the drag force becomes larger due to larger viscosity. This makes the tool to rise slower in oil. Accordingly, the pressure decrease rate, in oil is expected to be slower than in water. Thus, a correlation may be established to infer density from the pressure build up speed. The deviation angle is usually known from a deviation log ran after the well completion. Both physical model and pressure measurement are prone to errors due to factors such as process noise or measurement noise. These tend to be Gaussian-type noise that may be characterized and, thus, may be known. Embodiments of the disclosure use the Kalman filter as an optimization algorithm that uses multiple sources of information to generate a depth estimate. The depth estimate (which is assumed to be optimal, based on the noise characterizations) takes a value between the measured and model-predicted values depending on their error/noise magnitude.
In Step 308, a test is performed to determine whether the depth estimate exceeds a known collar location. The depth estimate may be compared against the known casing collar depths. In other words, the passing of the downhole tool by the collar is anticipated, based on the depth estimate and based on the known collar location. The comparison may include waiting until the downhole tool passes the collar depth by a preset depth tolerance window. This depth tolerance window may establish a range of, for example, between 5-20 ft depending on the confidence in the depth estimate. Until, based on the test, the depth estimate exceeds the known collar location, the method may proceed with the execution of Step 304. Once the depth estimate exceeds the known collar location, the execution of the method may proceed with Step 310.
In Step 310, a collar detection is performed. The collar detection may involve analysis of logged magnetic field data obtained from the one or more magnetometers of the downhole tool. The axial component of the magnetic field (along the borehole axis) may be a better indicator for the presence of a collar, because radial components may also change swiftly due to distance changes from the casing wall. Accordingly, in one embodiment, the axial component is analyzed. The collar detection may be based on any other measurement principle, without departing from the disclosure.
The magnetic field data may be analyzed for a depth interval starting from a tolerance length before the assumed collar location (based on the depth estimate) to a tolerance length after the assumed collar location. The tolerance length may be set to ensure that, even in presence of uncertainty associated with the depth estimate, the magnetic field data for the depth interval captures the passing of the downhole tool by the collar. Limiting the analysis of the magnetic field data to a depth interval may provide a first pass elimination of potential false positives that may be present in the magnetic field data. A filter may be applied to the magnetic field data in the depth interval to extract the collar location. One type of filter may compute the first derivative of the magnetic field amplitude with respect to time or depth, e.g., as shown in
In Step 312, if a collar is not detected, the method may proceed with the execution of Step 304. Alternatively, if a collar is detected, the method may proceed with Step 314. Multiple collars may be detected in Step 312, with one of the detections corresponding to the actual collar and the other detection(s) being false detections. However, because it may not be possible to distinguish between true positive and false positive detections, the subsequently performed steps may be performed for all detections.
Briefly summarized, the subsequently performed steps evaluate the collar detections made using a Bayesian approach based on the estimated depth and the expected or known depth. At each collar detection a new hypothesis is created with the state inherited from its parent hypothesis. Therefore, a newly created hypothesis is a version of its parent with a small correction applied to its estimated depth. The parent continues to exist without the correction. New weights are assigned to both parent and child hypotheses based on a Bayesian probability. The child hypotheses start with new Kalman filters whose reference depth starts from the depth of the detected collar. The parent hypothesis continues with its Kalman filter assuming that the detected collar was false. As many hypotheses are created, the ones with the lowest probabilities may be eliminated. The algorithm as described is performed by execution of the subsequently discussed steps.
In Step 314, based on the detection(s) in Step 312, a new hypothesis is generated for each detection. The new hypothesis claims that the detected peak at a specific depth belongs to the collar at this depth. Therefore, the new hypothesis corrects the estimated depth of its parent to align the estimated depth to the known depth of the collar. Accordingly, in Step 314, a discrepancy between the depth estimate and the known depth may be determined in. Then, the new hypothesis may be generated such that it corrects for the discrepancy. In other words, the known depth of the detected collar is set as the reference depth for the subsequent execution of a new Kalman filter associated with the new hypothesis. Referring to the example shown in
In Step 316, weights are generated for the hypotheses. One weight is generated for each of the hypotheses. The weight may be designed to reflect the accuracy of the predictions made using the corresponding hypothesis, which may facilitate elimination of poor hypotheses, and selection of one that explains the collar detection intervals best, i.e., with a high prediction accuracy. The weight calculation may be performed using different methods.
The first weighting method is as follows:
where Wchild is the weight of the new hypothesis and TR is true detection rate of the collar detector. Accordingly, a child hypothesis is established with a weight based on its parent's success in matching the estimated depth of the collar to the expected or known depth and the detector's success in detecting collars. The parent's weight is also updated after passing a collar depth. The parent continues to exist with the assumption that there was a false negative at the depth of the collar. Therefore, its weight is updated by rescaling of its value by a false detection rate, FR. If detector characteristics are known statistically, Bayes' rule can be used to find TR and FR. The Bayesian probability can be defined as below:
where TPR and FPR are true and false positive rates of the detector, and TNR and FNR are true and false negative rates of the detector. These ratios are indicative of how selectively the detector detects or rejects a collar. RealDepth is the expected depth of collar, DetectionDepth is the depth of detected collar according to the parent hypothesis, σdepth2 is the expected or measured variance in depth. In (8), P(Collar exists) is set to 1 based on the assumption that there is a collar at this depth, e.g., based on the casing tally, or completion report. The standard deviation, σdepth, can be assumed a constant, or can be extracted from the Kalman filter's estimation covariance matrix, P, such that:
In a second weighting method, TR and FR may be founds as follows:
This modification to the calculation of FR favors either the child or the parent. For example, in an extreme case where the child is created when the detected collar depth matched exactly the expected collar depth, FR becomes 0. In another case when the detected collar depth is far from the expected collar depth, TR will be small while FR will be large. If there are multiple children born due to multiple detections, the smallest calculated FR is used to weight the parent.
In order to simplify the calculations, the weighting calculations may be performed using logarithms. This approach eliminates the exponentials, and the weighting may be performed using summation instead of multiplication such that
In Step 318, if the number of hypotheses exceeds a specified limit, the execution of the method may proceed with Step 320. Alternatively, if the number of hypotheses does not exceed the specified limit, Step 320 may be skipped, and the execution of the method may proceed with Step 322.
In Step 320, one or more hypotheses may be eliminated to ensure that the number of hypotheses does not exceed the specified limit. In one or more embodiments, the hypotheses with the lowest associated weights are eliminated. An increase in the number of hypotheses can become computationally costly when each of the hypotheses has to be evaluated. The operations of Step 320, thus, ensure that the computational cost is manageable.
In Step 322, the weights are normalized. In one embodiment, normalizing involves scaling the weights such that their sum is equal to 1. Increasingly small weights are, thus, avoided.
In Step 324, the depth estimate obtained using the hypothesis with the highest weight is used to decide on the depth, to be reported and make subsequent decisions such as changing trajectory, taking new measurements, labeling existing measurements, going to sleep etc.
While not shown in the flowchart, additional operations may be performed by the downhole tool. For example, the downhole tool may measure one or more properties within the well bore while Steps 304-324 are performed in loops. Also, while the flowchart is described in context of a downhole tool that is moving downward (sinking), the method is equally applicable to a downhole tool that is moving upward (rising).
In one embodiment, the range of fluid densities in the well may be known, but the absolute density measurement may not be available. For example, it may be known that a water well has fluid density changing between 0.98 and 1.05 g/cc. In another example, an oil well may contain oil, water and various emulsions where the density may change, for example, between 0.75 g/cc to 1.1 g/cc. Uncertainty of the density is reflected on the uncertainty of the depth measurement using pressure measurement. Depth error, or variance, can be calculated if variances of pressure measurement (σΠ2) and expected densities (or density measurements) (σρ2) are known. Since the depth measurement is inversely proportional with the density, the equation can be linearized around the mean value of the density, μρ as in (14).
Then, assuming pressure and density are independent variables, the depth measurement variance can be calculated as
where σm2, σΠ2, σρ2 are the depth, differential pressure, and density variances, respectively. μρ and μΠ are the mean values of the measured density and differential pressure, respectively. The measurement variance, R, can be varying as the variances and mean values of the differential pressure and density may be changing over time while the tool is moving.
The algorithm in
If the density is expected to change during the tool operation (e.g., oil well fluids may become stratified as oil column at the top and water column at the bottom), it is kept as a state variable in the state vector whose value can be measured or inferred. As explained in pa. 41, after a child hypothesis is created, a correction may be applied to the estimated depths starting from the last reference depth such that the estimated collar detection depth matches the true depth of that collar. This correction can be a scale factor that is applied to the density variable. As an example, if the expected distance between two collars is Δdreal and estimated depth shows Δdest between the two collars, the density can be corrected as in (16).
where ρN is the previous density that is used for the estimation and βN+1 is the corrected density that will be used for the oncoming estimations until the next collar detection event. This process can be repeated for each time a child is born to constantly tune the density. If the corrected density of the new hypothesis is outside the expected range of densities, this hypothesis is eliminated. This elimination can take place between the steps 314 and 316 before a weight is assigned.
Broadly summarized, the method merges two kinds of data about the measured depth (or distance along the well) of the untethered device: (a) detections of magnetic field anomalies that may correspond to collars that connect pipe sections and (b) sensor data which provide continuous though imperfect information about depth. After each detected pipe connection, a Kalman filter is restarted. The Kalman filter estimates (a) the additional distance travelled since the detection of the collar and (b) the variance of this distance estimate. To be robust in the case of missed detections or false detections of collars, multiple hypotheses about which collar was last detected are evaluated and kept active until they can be ruled out based on a low likelihood score.
Let x be a state vector which includes as its elements the distance the untethered device has travelled along the well since the last detected collar, d, and the velocity of the sensor along the well, {dot over (d)}. The state vector changes over time as the sensor moves within the well, and xk will be the state vector at the k-th time step, where the time between steps is dt. For example,
As time passes, the sensor moves in the well, and the state vector changes according to:
In this case,
The first row of A requires the new velocity to be equal to the old velocity. The second row of A requires the new distance to be the old distance plus the additional distance that the sensor would have travelled in time dt at its current velocity.
The additive term Buk describes the effect of any deterministic adjustments to the state vector. If the additional sensor is an accelerometer, then its measurement of the acceleration along the direction of the well can be uk. In this case,
which states that the change in velocity is dt times the acceleration and the change in distance due to the acceleration over time interval dt is equal to (1/2) dt2, though this second term generally has a small enough effect on distance that it can be ignored. The error in this model for the new state is captured in wk, which includes random forces that may act on the sensor due to bumps with the casing, turbulence in the well, etc. as well as error in any accelerometer measurement. This error has a covariance matrix Qk.
If there are additional sensor measurements that depend on one or more elements of the state vector, these will be included in a vector z. The matrix Hk relates the measurements zk to xk. Let v represent the noise or uncertainty in y, where Rx is the covariance matrix of vk, given the variance of each element of vk and the covariances between elements of vk. It is assumed in this example that the elements of vk are uncorrelated over time, such that all the elements in vk+1 are independent of all the elements of vk.
For example, if the additional sensor measures pressure, the local density of the fluid in the well is ρk, and the local deviation of the well is θk, then Hk=[0 βk cos (θk)]. The vector zk provides the change in pressure since the last collar was detected, i.e., the change in pressure that corresponds to the distance in the state vector, which is measured from the last collar.
Based on this model, an estimate of the state vector at each time step k can be established as:
-
- where {circumflex over (x)}k−, priori estimate (projection) of state based on the dynamic model and the previous state
The covariance matrix is:
where Pk−, priori estimate of the covariance matrix, and Kalman gain, Kk are defined as
A running estimate of the distance the sensor has travelled since its last reference point (known collar) may thus be generated based on the velocity of the sensor, and the covariance in the estimates of these properties.
Turning to the flowchart of
In Step 334, a measurement is obtained. The measurement may include, for example, an acceleration and/or pressure measurement.
In Step 336, running depth estimates are generated. A separate Kalman filter as previously introduced may be used to generate each of the running depth estimates. One estimate is generated per hypothesis. Each Kalman filter is executing based on the assumption that the hypothesis is true. Hypotheses are discussed in detail below, in the description of Step 342.
Steps 334 and 336 may be executed at a fixed rate, e.g., using a time step Δt, as previously discussed in reference to
In Step 338, a collar detection is performed. The detection may be performed as previously described in reference to
In Step 340, if, based on the execution of Step 338, a collar is detected, the execution of the method may proceed with Step 342.
In Step 342, hypotheses are generated for the next (N+1st) collar, i.e., the collar detected in Step 342. The hypotheses may be generated based on previously hypotheses. For each of the old hypotheses the following possibilities are considered (assuming here that the previously detected feature in the old hypothesis list was N):
-
- The current detection is a false detection. Apply the false detection likelihood penalty to the likelihood function for this hypothesis.
- The current detection was collar N+1. As a result, the true depth zT is the depth of collar N+1.
- The current detection was collar N+2. As a result, the true depth zT is the depth of collar N+2.
- Optionally consider higher collar numbers N+3 and greater.
Note that there may be only one hypothesis for N=0 if the initialization is known to be true such that initial position, velocity, pressure as well as density are known.
As previously noted, running depth estimates may be generated for each of the hypotheses, because it is initially unknown whether a hypothesis is true or false.
In Step 344, for each hypothesis a likelihood function which depends on the true depth for that possibility and the estimated depth μ is evaluated, where μ is the depth of feature N plus the distance from the state vector since the collar:
In Step 346, the hypothesis/hypotheses which has/have a likelihood function less than a threshold value α is/are discarded. Each of the remaining hypotheses are included in a new hypothesis vector. If the new hypothesis is a detection error, the number of the last collar remains the same, and the state vector of the Kalman filter remains the same. If the new hypothesis was a detection, the last detected feature is updated accordingly, and a Kalman filter is started with the current velocity estimate as the velocity state and zero as the distance state, and the variance of the distance state estimate set to zero.
To save computational time, the logarithm of the likelihood function should be used with threshold log (α), rather than evaluating the likelihood function itself.
Finally, if the depth turns out to be within a specified distance D from the depth where the ballast weight is to be released, all hypotheses except the one with the highest likelihood may be discarded, and the release of the ballast weight may be performed based on that hypothesis.
The subsequent discussion relates to detecting casing collars in vertical and deviated wells using a combination of a magnetometer and an accelerometer. The detection as described may be incorporated in the methods of
In some embodiments, a 3-axis magnetometer is used to collect data from steel cased wells. 3-axis magnetometers measure the magnetic field amplitude in 3-perpendicular axes. These axis (such as x, y, z) may be aligned with respect to the sensor package giving three orthogonal magnetic field amplitude measurements Bx, By, and Bz, respectively. To determine the direction of the measured magnetic field, it may be desirable to have the sensor package aligned with respect to the measured space's coordinate frame. For example, the measured magnetic field Bz of the magnetometer may be aligned with the borehole axis.
As previously discussed, the measured magnetic field signal may be processed to find collar locations with a better accuracy. A first derivative of the magnetic field amplitude with respect to time or depth may be taken. Alternatively, a matching filter may be used, where a filter waveform(s) in the shape of the expected magnetic field waveform(s) around the collar is convoluted with the data.
Although the axial component of the magnetic field may provide a relatively clear signal for casing collar detection, a freely falling or rising tool may not have a consistent alignment with the borehole axis due to the interactions with the borehole fluid and the casing wall. To address this concern, embodiments of the disclosure introduce a corrective step to the measured magnetic field vector.
A 3-axis accelerometer may be used to detect the direction of the Earth's gravity. The dot product of the magnetic field vector and the gravity vector then produces the magnetic field component in the direction of the gravity. Vertical wells may have small deviations from the gravity vector (i.e., <10°). Due to the small angle between the gravity vector and the borehole axis, the found magnetic field component along the gravity vector may have a large contribution from the magnetic field component along the borehole axis and a relatively small portion from the radial component.
If the cartesian coordinates of the 3-axis magnetometer and 3-axis accelerometer are aligned, the dot product can be calculated as below where individual components are multiplied with each other and summed:
If there is a deviation angle, θ, between the borehole axis and the gravity vector, the calculated magnetic field will be composed of axial and radial magnetic field components:
This means for θ<10 deg, the calculated field along the gravity will be the sum of more than 98% of the axial field and less than 17% of the radial field.
Finding the gravity vector may require some additional steps. The measured acceleration by the accelerometer, {right arrow over (α)}meas, can be described as follows:
-
- where, {right arrow over (g)} is gravitational acceleration vector, {right arrow over (α)}int is the acceleration due to interaction forces with the wellbore structure and fluids, {right arrow over (b)} is the bias due to sensor imperfections, and {right arrow over (w)} is the measurement noise and or error. In a miniaturized untethered downhole tool, an accelerometer predominantly measures the gravitational acceleration as a constant and usually as the largest contributor. Other accelerations due to interactions with the environment are usually short lived. Using a low-pass filter may filter out fast changing components such as {right arrow over (α)}induced and {right arrow over (w)}. The biases, on the other hand, cannot be filtered with a low pass filter as they may remain constant or change slowly. The low pass filter may be applied in several ways. For example, a moving average may be applied to the collected measurements. Alternatively, signals collected over time may be converted into the frequency domain via Fourier transform, and the resulting spectra may be multiplied by a low-pass filter.
The accelerometer may need an initial or periodic calibration depending on its specifications to find the linear sensitivity coefficients (c) and biases (b) that relate measured values to calibrated values (αm to αc) as shown below. This can be done by aligning axes of the accelerometer with respect to gravity and taking measurements. For example, a full calibration of an accelerometer may need at least 12 measurements taken at 12 different orientations.
The measurements can be repeated at several temperatures to also account for the temperature effects. In this case each coefficient and bias can be represented as a function of temperature as in Eq 28 and Eq 29.
However, often the contributions of some coefficients, such as cross axis sensitivities or quadratic temperature relation, can be insignificant. In such a case, the relevant terms can be neglected to simplify the calculations and to reduce the required computational power. For example, for one axis, a simplified calibration can be as in Eq 30.
The performance of the method can be further improved for rapidly moving untethered tools. This may be accomplished using a gyroscope. Gyroscopes measure the rate of rotation around principal axes. Therefore, they work better than solely using accelerometers in short time intervals. There are several methods developed to fuse accelerometer and gyroscope data to find an orientation with respect to the vertical axis (i.e., the gravitational axis).
In Step 602, for each active hypothesis, a Kalman filter is set up and propagated forward in time. The state vector at the next time step is predicted and that prediction is updated based on the sensor measurements according to the Kalman filter method. This step repeats until the next detection occurs.
In Step 603, a connection (or collar) has been detected. For each existing hypothesis, a new set of hypotheses corresponding to various possible identities of the new detection is created. The likelihood function for each new hypothesis is evaluated.
In Step 604, all hypotheses for which the likelihood function value does meet a pruning criterion, removed or “pruned” from further consideration. This may occur for likelihood functions being less than a threshold value or not being among the largest M likelihood function values, where M is a number from 2 to 100, typically 10. Optionally M can be increased as the total number of detections increases. Optionally the threshold value can be adjusted as the number of detections increases to reflect the fact that the likelihood function will decrease with the number of detections. After this pruning is complete, return to Step 602.
When the second detection occurs, the system begins building hypotheses regarding the cause of the second detection. Hypothesis 710 is replaced by hypotheses 720, 721, 722, and 723. Hypothesis 720 is that both the first and second detections were false detections. Once the false detection penalty of 0.7 is applied twice to the likelihood function, the likelihood is now 0.49, below the minimum threshold of 0.5, so hypothesis 820 is pruned. Hypothesis 721 is that the first detection was a false detection (based on hypothesis 710) and the new second detection is connection 1. By the time of the second detection, the estimated depth from the Kalman filter of 710 is much deeper than the first connection, so a small factor of 0.1 is multiplied to the likelihood function, reducing the likelihood function to 0.07 which is below the threshold, and hypothesis 721 is pruned. Hypothesis 722 is that the first detection was a false detection and second detection was connection 2. Since the Kalman filter from 710 provides an estimated depth close to the depth of connection two, the likelihood function multiplier is large, 0.9, and the accumulated likelihood function value is still 0.63, above the cutoff threshold. Hypothesis 723 is that the first detection was a false detection and the second detection is connection 3. However, the estimated depth from the Kalman filter at the time of the second detection is well above the depth of the third connection, so the likelihood function is small and hypothesis 723 is pruned. Next the hypotheses descended from hypothesis 711 are considered. These have in common the hypothesis that the first detection was connection 1 (C1). 724 attributes the second detection to a false detection, and the false detection penalty of 0.7 is multiplied by the likelihood function value from 711 to produce a new likelihood function value of 0.63 for 724. 725 attributes the second detection to connection 2. The estimated depth from the Kalman filter from 711 at the time of detection 2 is close enough to the depth of connection 2 that the likelihood function multiplier is 0.9 and the likelihood function value for 725 is 0.81. 726 attributes the second detection to connection 3, but the estimated depth from the Kalman filter from 711 is not close to the depth of connection 3 and the corresponding low likelihood function multiplier of 0.1 brings the likelihood function of hypothesis 726 down to 0.09, well below the threshold so 729 is pruned.
Embodiments may be implemented on a computer system. One or more of the operations as described can run on a computer as a postprocessing step. In this case, the data may be collected by the downhole tool, whereas the computer performing the postprocessing may not necessarily be a part of the downhole tool. Alternatively, an algorithm based on the operations as described may run live during the mission on the untethered tool's computing device to make autonomous decisions during the mission. The computing device may be based on a microcontroller without an operating system, or can be also a mini computer with an operating system.
The computer (502) can serve in a role as a client, network component, a server, a database or other persistency, or any other component (or a combination of roles) of a computer system for performing the subject matter described in the instant disclosure. The illustrated computer (502) is communicably coupled with a network (530). In some implementations, one or more components of the computer (502) may be configured to operate within environments, including cloud-computing-based, local, global, or other environment (or a combination of environments).
At a high level, the computer (502) is an electronic computing device operable to receive, transmit, process, store, or manage data and information associated with the described subject matter. According to some implementations, the computer (502) may also include or be communicably coupled with an application server, e-mail server, web server, caching server, streaming data server, business intelligence (BI) server, or other server (or a combination of servers).
The computer (502) can receive requests over network (530) from a client application (for example, executing on another computer (502)) and responding to the received requests by processing the said requests in an appropriate software application. In addition, requests may also be sent to the computer (502) from internal users (for example, from a command console or by other appropriate access method), external or third-parties, other automated applications, as well as any other appropriate entities, individuals, systems, or computers.
Each of the components of the computer (502) can communicate using a system bus (503). In some implementations, any or all of the components of the computer (502), both hardware or software (or a combination of hardware and software), may interface with each other or the interface (504) (or a combination of both) over the system bus (503) using an application programming interface (API) (512) or a service layer (513) (or a combination of the API (512) and service layer (513). The API (512) may include specifications for routines, data structures, and object classes. The API (512) may be either computer-language independent or dependent and refer to a complete interface, a single function, or even a set of APIs. The service layer (513) provides software services to the computer (502) or other components (whether or not illustrated) that are communicably coupled to the computer (502). The functionality of the computer (502) may be accessible for all service consumers using this service layer. Software services, such as those provided by the service layer (513), provide reusable, defined business functionalities through a defined interface. For example, the interface may be software written in JAVA, C++, or other suitable language providing data in extensible markup language (XML) format or other suitable format. While illustrated as an integrated component of the computer (502), alternative implementations may illustrate the API (512) or the service layer (513) as stand-alone components in relation to other components of the computer (502) or other components (whether or not illustrated) that are communicably coupled to the computer (502). Moreover, any or all parts of the API (512) or the service layer (513) may be implemented as child or sub-modules of another software module, enterprise application, or hardware module without departing from the scope of this disclosure.
The computer (502) includes an interface (504). Although illustrated as a single interface (504) in
The computer (502) includes at least one computer processor (505). Although illustrated as a single computer processor (505) in
The computer (502) also includes a memory (506) that holds data for the computer (502) or other components (or a combination of both) that can be connected to the network (530). For example, memory (506) can be a database storing data consistent with this disclosure. Although illustrated as a single memory (506) in
The application (507) is an algorithmic software engine providing functionality according to particular needs, desires, or particular implementations of the computer (502), particularly with respect to functionality described in this disclosure. For example, application (507) can serve as one or more components, modules, applications, etc. Further, although illustrated as a single application (507), the application (507) may be implemented as multiple applications (507) on the computer (502). In addition, although illustrated as integral to the computer (502), in alternative implementations, the application (507) can be external to the computer (502).
There may be any number of computers (502) associated with, or external to, a computer system containing computer (502), each computer (502) communicating over network (530). Further, the term “client,” “user,” and other appropriate terminology may be used interchangeably as appropriate without departing from the scope of this disclosure. Moreover, this disclosure contemplates that many users may use one computer (502), or that one user may use multiple computers (502).
In some embodiments, the computer (502) is implemented as part of a cloud computing system. For example, a cloud computing system may include one or more remote servers along with various other cloud components, such as cloud storage units and edge servers. In particular, a cloud computing system may perform one or more computing operations without direct active management by a user device or local computer system. As such, a cloud computing system may have different functions distributed over multiple locations from a central server, which may be performed using one or more Internet connections. More specifically, a cloud computing system may operate according to one or more service models, such as infrastructure as a service (IaaS), platform as a service (PaaS), software as a service (SaaS), mobile “backend” as a service (MBaaS), serverless computing, artificial intelligence (AI) as a service (AIaaS), and/or function as a service (FaaS).
Although only a few example embodiments have been described in detail above, those skilled in the art will readily appreciate that many modifications are possible in the example embodiments without materially departing from this invention. Accordingly, all such modifications are intended to be included within the scope of this disclosure as defined in the following claims.
Claims
1. A method for locating a downhole tool in a wellbore, the method comprising:
- obtaining, by the downhole tool, a pressure measurement in the wellbore;
- generating a first depth estimate based on the pressure measurement;
- anticipating a passing of the downhole tool by a collar, based on the first depth estimate and a known depth of the collar;
- based on the anticipating of the passing of the downhole tool by the collar, performing, by the downhole tool, a collar detection; and
- based on the collar detection resulting in a detection of the collar: generating an updated depth estimate, and reporting the updated depth estimate.
2. The method of claim 1, wherein the first depth estimate is generated using a Kalman filter.
3. The method of claim 2, wherein the Kalman filter is parameterized using a first hypothesis based on surface parameters.
4. The method of claim 3, wherein the surface parameters comprise a 0-ft depth and a 0-ft/s speed.
5. The method of claim 3, wherein generating the updated depth estimate comprises:
- determining a discrepancy between the first depth estimate and the known depth;
- generating a second hypothesis that corrects for the discrepancy; and
- generating a second depth estimate using the Kalman filter parameterized based on the second hypothesis.
6. The method of claim 5, wherein generating the updated depth estimate comprises:
- continue making depth estimates using the Kalman filter parameterized based on the first hypothesis;
- continue making depth estimates using the Kalman filter parameterized based on the second hypothesis; and
- determining, a first weight for the first hypothesis and the second weight for the second hypothesis, the first and second weights reflecting an accuracy of the depth estimates made using the Kalman filter parameterized based on the first hypothesis and the second hypothesis, respectively.
7. The method of claim 6, wherein the first weight and the second weight are assigned based on Bayesian probability.
8. The method of claim 6,
- wherein the first hypothesis and the second hypothesis are members of a plurality of hypotheses, and
- wherein generating the updated depth estimate further comprises:
- based on determining that a cardinality of the plurality of hypotheses exceeds a specified limit, eliminating a hypothesis with a lowest accuracy from the plurality of hypotheses, based on the weight associated with the hypothesis.
9. The method of claim 6,
- wherein the first hypothesis and the second hypothesis are members of a plurality of hypotheses, and
- wherein reporting the updated depth estimate comprises reporting a depth estimate associated with a hypothesis with a highest accuracy of the plurality of hypotheses, based on the weight associated with the hypothesis.
10. The method of claim 1, wherein the anticipating of the passing of the downhole tool comprises applying a depth tolerance window to the depth estimate in which the collar is expected.
11. The method of claim 1, wherein the collar detection is performed using a magnetometer.
12. The method of claim 1, wherein generating the depth estimate is further based on an acceleration measurement.
13. The method of claim 1, wherein the downhole tool is configured to obtain measurements of one or more properties along the wellbore, and wherein the updated depth estimate is used to label the measurements.
14. An untethered device comprising:
- a tool comprising a pressure sensor and a processor,
- wherein the processor: obtains a pressure measurement from the pressure sensor, generates a first depth estimate based on the pressure measurement, anticipates a passing of the untethered device by a collar, based on the first depth estimate and a known depth of the collar; based on the anticipating of the passing of the downhole tool by the collar, performs a collar detection; and based on the collar detection resulting in a detection of the collar: generates an updated depth estimate, and reports the updated depth estimate.
15. The untethered device of claim 14, wherein the tool further comprises a magnetometer, and wherein the collar detection is performed using the magnetometer.
16. The untethered device of claim 14, further comprising a ballast weight releasably attached to the tool.
17. The untethered device of claim 14,
- wherein the tool further comprises at least one sensor for obtaining a measurement of a property along a wellbore, and
- wherein the processor further labels the measurement of the property using the updated depth estimate.
18. The untethered device of claim 14, wherein the first depth estimate is generated using a Kalman filter.
19. The untethered device of claim 18, wherein the Kalman filter is parameterized using a first hypothesis based on surface parameters.
20. The untethered device of claim 19, wherein generating the updated depth estimate comprises:
- determining a discrepancy between the first depth estimate and the known depth;
- generating a second hypothesis that corrects for the discrepancy; and
- generating a second depth estimate using the Kalman filter parameterized based on the second hypothesis.
Type: Application
Filed: Oct 10, 2024
Publication Date: Apr 10, 2025
Applicant: ARAMCO SERVICES COMPANY (Houston, TX)
Inventors: Max Deffenbaugh (Houston, TX), Huseyin Rahmi Seren (Houston, TX)
Application Number: 18/911,712