Calibration of electromagnetic ranging tools

A method and electromagnetic ranging system for determining the location of a target well. A method may comprise taking a first measurement with an electromagnetic ranging tool at a first position and calculating a first modeled signal. Additionally, calculating a calibration for the electromagnetic ranging tool from at least the first measurement and the first modeled signal, taking a second measurement with the electromagnetic ranging tool at a second position, and calculating a calibrated measurement. The method may comprise determining a distance, direction, and/or orientation to a target wellbore using at least the calibrated measurement. An electromagnetic ranging system may comprise an electromagnetic ranging tool and an information handling system coupled to the electromagnetic ranging tool. The information handling system may be operable to calibrate the electromagnetic ranging tool, calculate a gain of the electromagnetic ranging tool, and apply the gain to a measured signal from the electromagnetic ranging tool.

BACKGROUND

The present disclosure relates to a system and method for electromagnetic ranging. Specifically, methods and systems may be disclosed for in situ calibration of an electromagnetic ranging tool.

Wellbores drilled into subterranean formations may enable recovery of desirable fluids (e.g., hydrocarbons) using a number of different techniques. Knowing the location of a target wellbore may be important while drilling a second wellbore. For example, in the case of a target wellbore that may be blown out, the target wellbore may need to be intersected precisely by the second (or relief) wellbore in order to stop the blow out. Another application may be where a second wellbore may need to be drilled parallel to the target wellbore, for example, in a steam-assisted gravity drainage (“SAGD”) application, wherein the second wellbore may be an injection wellbore while the target wellbore may be a production wellbore. Yet another application may be where knowledge of the target wellbore's location may be needed to avoid collision during drilling of the second wellbore.

Electromagnetic ranging tools may be employed in subterranean operations to determine direction and distance between two wellbores. Electromagnetic ranging tools may use different techniques to obtain current on a conductive member in the target wellbore. Without limitation, approaches may include directly injecting a current into the conductive member and/or inducing a current on a conductive member by transmitting electromagnetic waves by coil antennas positioned in a second wellbore. The induced current in turn may cause the casing to radiate a secondary electromagnetic field. In another approach, an electrode type source may be used to induce current on the conductive member. The gradient of the magnetic field radiated by the conductive member in addition to the magnetic field itself may be measured. Using a relationship between the magnetic field and its gradient, a ranging measurement may be calculated. However, use of gradient calculations may be problematic as an infinite pipe with a constant induced current may be assumed, which may lead to larger errors in determining range. Alternatively, an inversion may be used to determine the range, in which a forward model of the signal that may be received at the ranging tool may be needed. The inversion process may try to find the formation and well parameters that would match the forward model with the measurements made by the tool. However, use of the inversion process may be problematic as the gain of the electromagnetic ranging tool may be different from that used in the forward model.

DETAILED DESCRIPTION

The present disclosure relates generally to a system and method for calibrating an electromagnetic ranging system. More particularly, the electromagnetic ranging system may be calibrated in situ, for example, during drilling operations, and optionally on the surface. Calibration of the electromagnetic ranging system may help in determining the orientation and position of an underground well accurately and efficiently. An electromagnetic ranging system may comprise an electromagnetic ranging tool, which may comprise a transmitter and/or receiver. Transmission of electromagnetic fields by the transmitter and recording of signals by the receiver may be controlled by an information handling system.

Certain examples of the present disclosure may be implemented at least in part with non-transitory computer-readable media. For the purposes of this disclosure, non-transitory computer-readable media may include any instrumentality or aggregation of instrumentalities that may retain data and/or instructions for a period of time. Non-transitory computer-readable media may include, for example, without limitation, storage media such as a direct access storage device (e.g., a hard disk drive or floppy disk drive), a sequential access storage device (e.g., a tape disk drive), compact disk, CD-ROM, DVD, RAM, ROM, electrically erasable programmable read-only memory (EEPROM), and/or flash memory; as well as communications media such wires, optical fibers, microwaves, radio waves, and other electromagnetic and/or optical carriers; and/or any combination of the foregoing.

FIG. 1illustrates an electromagnetic ranging system2. As illustrated, a target wellbore4may extend from a first wellhead6into a subterranean formation8from a surface10. Generally, target wellbore4may include horizontal, vertical, slanted, curved, and other types of wellbore geometries and orientations. Target wellbore4may be cased or uncased. A conductive member12may be disposed within target wellbore4and may comprise a metallic material that may be conductive. By way of example, conductive member12may be a casing, liner, tubing, or other elongated metal tubular disposed in target wellbore4. Determining the position and direction of target wellbore4accurately and efficiently may be required in a variety of applications. For example, target wellbore4may be a “blowout” well. Target wellbore4may need to be intersected precisely by a second wellbore14in order to stop the “blowout.” Alternatively, it may be desired to avoid collision with target wellbore4in drilling second wellbore14or it may be desired to drill the second wellbore parallel to the target wellbore4, for example, in SAGD applications. In examples, target wellbore4may not be accessible and/or information about the position and structure of target wellbore4may not be available. As will be discussed in more detail, electromagnetic ranging system2may be used for determining the location of target wellbore4with respect to second wellbore14.

With continued reference toFIG. 1, second wellbore14may also extend from a second wellhead16that extends into subterranean formation8from surface10. Generally, second wellbore14may include horizontal, vertical, slanted, curved, and other types of wellbore geometries and orientations. Additionally, while target wellbore4and second wellbore14are illustrated as being land-based, it should be understood that the present techniques may also be applicable in offshore applications. Second wellbore14may be cased or uncased. In examples, a drill string18may begin at second wellhead16and traverse second wellbore14. A drill bit20may be attached to a distal end of drill string18and may be driven, for example, either by a downhole motor and/or via rotation of drill string18from surface10. The drill bit20may be a part of bottom hole assembly22at distal end of drill string18. While not illustrated, bottom hole assembly22may further comprise one or more of a mud motor, power module, steering module, telemetry subassembly, and/or other sensors and instrumentation as will be appreciated by those of ordinary skill in the art. As will be appreciated by those of ordinary skill in the art, bottom hole assembly22may be a measurement-while drilling or logging-while-drilling system.

Without limitation, electromagnetic ranging system2may comprise an electromagnetic ranging tool24. Electromagnetic ranging tool24may be a part of bottom hole assembly22. Electromagnetic ranging tool24may be used for determining the distance and direction to target wellbore4. Additionally, electromagnetic ranging tool24may be connected to and/or controlled by information handling system26, which may be disposed on surface10. In examples, information handling system26may communicate with electromagnetic ranging tool24through a communication line (not illustrated) disposed in (or on) drill string18. In examples, wireless communication may be used to transmit information back and forth between information handling system26and electromagnetic ranging tool24. Information handling system26may transmit information to electromagnetic ranging tool24and may receive as well as process information recorded by electromagnetic ranging tool24. In addition, electromagnetic ranging tool24may include a downhole information handling system28, which may also be disposed on bottom hole assembly22. Downhole information handling system28may include, without limitation, a microprocessor or other suitable circuitry, for receiving and processing signals received by the electromagnetic ranging tool24. Downhole information handling system28may further include additional components, such as memory, input/output devices, interfaces, and the like. While not illustrated, the electromagnetic ranging tool24may include one or more additional components, such as analog-to-digital converter and amplifier, among others, that may be used to process the measurements of the electromagnetic ranging tool24before they may be transmitted to surface10. Alternatively, raw measurements from electromagnetic ranging tool24may be transmitted to surface10.

In examples, electromagnetic ranging tool24may comprise a transmitter30and/or a receiver32. It should be noted that electromagnetic ranging tool24may comprise a plurality of transmitters30and/or a plurality of receivers32. The transmitter30and receiver32may be disposed along a longitudinal axis of the electromagnetic ranging tool24. Any of a variety of different transmitters30and receivers32for generating and measuring electromagnetic fields may be suitable for use, including, but not limited to, coil antenna, wire antenna, toroidal antenna and/or azimuthal button electrodes. Magnetometers may also be used as the receiver30. Without limitation, transmitter30may be energized, which may be controlled by information handling system26and/or downhole information handling system28, to produce a magnetic field that may be emitted into subterranean formation8. The magnetic field may energize conductive member12within target wellbore4by inducing eddy currents in conductive member12. WhileFIG. 1shows transmitter30on electromagnetic ranging tool24, transmitter30may be omitted and conductive member12may be energized using alternative techniques, such as by coupling a current source directly to conductive member12to generate currents. The currents within conductive member12may in turn produce a secondary magnetic field. This secondary magnetic field may radiate from target wellbore4. In examples, the secondary magnetic field may induce voltages in receiver30that may be recorded and transmitted to surface10. Using these recorded voltages, the location of target wellbore4may be determined. By way of example, the direction and distance of target wellbore4may be determined with respect to second wellbore14.

Any suitable technique may be used for transmitting signals from electromagnetic ranging tool24to surface10, including, but not limited to, mud-pulse telemetry, acoustic telemetry, and electromagnetic telemetry. While not illustrated, bottom hole assembly22may include a telemetry subassembly that may transmit telemetry data to the surface. Without limitation, a transmitter in the telemetry subassembly may be operable to generate pressure pulses in the drilling fluid that propagate along the fluid stream to surface10. At surface10, pressure transducers (not shown) may convert the pressure signal into electrical signals for a digitizer31. Digitizer31may supply a digital form of the telemetry signals to information handling system26via a communication link34, which may be a wired or wireless link. The telemetry data may be analyzed and processed by information handling system26. For example, the telemetry data could be processed to determine location of target wellbore4. With the location of target wellbore4, a driller could control the bottom hole assembly22while drilling second wellbore14to intentionally intersect target wellbore4, avoid target wellbore4, and/or drill second wellbore14in a path parallel to target wellbore4.

To accurately determine the position of target wellbore4, including distance and direction, electromagnetic ranging system2may be calibrated to ensure accurate measurements. For example, calibrated signals may be used to determine a location of target wellbore4. Based on the calibrated signal, drilling parameters of second wellbore14may be adjusted, for example, to cause bottom hole assembly22to intentionally intersect target wellbore4, avoid target wellbore4, and/or drill second wellbore14in a path parallel to target wellbore4. Calibration may be performed to take into account the gain within electromagnetic ranging system2. This is because the gain of the electromagnetic ranging system2may differ from the gain used in the forward model for inversion, the gain may differ between different electromagnetic ranging tools24even if they have the same design, and the same electromagnetic ranging tool24may even needed to be re-calibrated for different runs due to differences in gain.

As disclosed, gain represents the mismatch between the measurements taken and the derived model. Gain may fluctuate over time, if these gain fluctuation are not corrected, then they may produce errors in the determination of the location of a target wellbore4. This may reduce accuracy, which may be particularly important in well avoidance applications where the position of a target wellbore4may be determined in advance and the drilling path may be changed based on measurements from electromagnetic ranging tool24. Additionally, in well intersection applications, a slight mistake may only aggravate the situation. Gain may vary between different devices within electromagnetic ranging system2, which may make it difficult to properly account for gain in a forward model. Thus, recalibration may be performed before, during, and/or after an operation in which electromagnetic ranging system2may be used.

The calibration method may include an in situ calibration. In general, the calibration method may use known formation properties to calculate and correct gain where the target wellbore4is not present. The target wellbore4may be considered to not be present if the secondary magnetic fields emanating from it may be considered negligible compared to noise. The calibration method may be performed using information handling system26at surface10, downhole information handling system28, or a combination of information handling system26and downhole information handling system28. The in situ calibration may include positioning the electromagnetic ranging tool24in a wellbore, such as second wellbore14and then using the electromagnetic ranging tool24to generate an electromagnetic field that emanates into subterranean formation8. Receiver30may then be used to measure the electromagnetic field. Based on these measurements, and assuming a linear relation between model and the measurement, a gain coefficient may be calculated and applied to subsequent measurements. Optionally, a gain offset may also be calculated, in addition to the gain coefficient, and applied to subsequent measurements. Surface calibration may be combined with the in-situ calibration to maintain an accurate calibration during electromagnetic ranging operations.

Referring now toFIG. 2, a block diagram illustrating an example of electromagnetic ranging system2is illustrated. As illustrated, the electromagnetic ranging system2may comprise an electromagnetic ranging tool24that comprises a transmitter30and receiver32. More than one transmitter30and more than one receiver32may also be used. The transmitter30may be coupled to transmitter electronics36and receiver32may be coupled to receiver electronics38. The transmitter electronics36and receiver electronics38may include a variety of components, including analog-to-digital converters and amplifiers. Electromagnetic ranging tool24may be operable to generate and measure electromagnetic fields.

Electromagnetic ranging system2may further comprise information handling system26and downhole information handling system28. As previously described, information handling system26may be disposed at surface10(e.g., shown onFIG. 1). The downhole information handling system28, whether alone or in combination with information handling system26, may be arranged to operate to control operation of electromagnetic ranging tool24and to perform operations on the signals collected by receiver32to calibrate the electromagnetic ranging system2. The downhole information handling system28, whether alone or in combination with information handling system26, may be operable to perform operations according to the calibration disclosed herein. By way of example, downhole information handling system28, whether alone or in combination with information handling system26, may include instructions stored thereon that when executed cause the downhole information handling system28to perform operations according to the disclosed calibration method. The downhole information handling system28, whether alone or in combination with information handling system26, may control activation of transmitter30to generate a signal for calibration and also control selection of receiver32to manage processing schemes. Information handling system26, whether alone or in combination with downhole information handling system28, may be operable to process measurements from receiver32to determine location of target wellbore4. As illustrated, peripheral devices40, such as a display unit (e.g., computer monitor) or input/out devices may be coupled to information handling system26at surface10.

Electromagnetic ranging system2may further include a bus42, where bus42may provide electrical conductivity between electromagnetic ranging tool24and downhole information handling system28, for example. The bus42may include an address bus, a data bus, and a control bus, each independently configured or in an integrated format. The bus42may be realized using a number of different communication mediums that allow for the distribution of components of electromagnetic ranging system2. Use of bus42may be regulated by downhole information handling system28. Bus42may include a communication network.

The electromagnetic ranging system2may further include a telemetry subassembly44, which may utilize any suitable technique for transmitting signals from downhole information handling system28to information handling system26at surface10, including, but not limited to, mud-pulse telemetry, acoustic telemetry, and electromagnetic telemetry. By way of example, telemetry subassembly44may be operable to generate pressure pulses in the drilling fluid that propagate along the fluid stream to surface10.

The principles of operation of electromagnetic ranging tool24will now be described in more detail with respect toFIGS. 3 and 4.FIG. 3illustrates the use of electromagnetic ranging tool24for coil excitation, andFIG. 4illustrates the use of electromagnetic ranging tool24for electrode excitation. For simplicity, target wellbore4and second wellbore14are not shown inFIGS. 3 and 4, but electromagnetic ranging tool24may be disposed in second wellbore14and conductive member12may be disposed in target wellbore4as illustrated onFIG. 1. In bothFIGS. 3 and 4, a cross-section of subterranean formation8in the x-z plane is shown in which subterranean formation8is assumed to be a homogeneous formation

Referring now toFIG. 3, transmitter30in the form of a transmitting coil with a magnetic moment in the y-direction (e.g., a coil that lies in the x-z plane) may induce an electric field (E) in subterranean formation8. The electric field lines46are provided onFIG. 3. As illustrated, conductive member12may be present and have its principal axis lying in the z-direction. Since the conductive member12may be more conductive than subterranean formation8surrounding it, a strong coupling of the electric field (E) to the conductive member12may occur. This coupling may produce a conductive current (represented by current lines48) on the conductive member12and in turn a secondary magnetic field. As illustrated, by secondary magnetic field lines50, the secondary magnetic field may be represented as concentric closed loops in a homogenous formation.

Turning now toFIG. 4, use of electromagnetic ranging tool24for electrode excitation will now be described. As illustrated, transmitter30in the form of an electrode may induce an electric field ({right arrow over (E)}) with electric field lines46that emanate directly into subterranean formation8. As illustrated, conductive member12may be present and have its principal axis lying in the z-direction. Similar to coil excitation, the electric field ({right arrow over (E)}) may couple to conductive member12and produce a conductive current (represented by current lines48) on the conductive member12. However, due to the difference in shape of the electric field lines46for coil excitation and electrode excitation, the direction of the conductive current may be different on conductive member12. The current on conductive member12may in turn generate a secondary magnetic field (e.g., represented by secondary magnetic field lines50) that emanates into subterranean formation8.

For both coil excitation and electrode excitation, the magnitude of the secondary magnetic field around conductive member12may be found via the Biot-Savart law. It should be noted thatFIGS. 3 and 4only illustrate secondary magnetic field lines50in a limited space, for simplicity. If the induced current on conductive member12was constant, the Biot-Savart law would reduce to Ampere's law, such as the one shown in Equation 1 below:

H_=I2⁢⁢π⁢⁢r⁢ϕ^(1)
Wherein r is the radial distance from the target wellbore4to the measurement point ({right arrow over (r)}) assuming a cylindrical coordinate system where the z-axis coincides with the axis of the cylinder, ϕ is a unit vector in azimuthal direction for this coordinate system, and H is the magnetic field at point ({right arrow over (r)}). The equation may be used in electromagnetic ranging tools, such as electromagnetic ranging tool24, to calculate gradient of the received field in addition to the electromagnetic field itself and calculating the distance to the target wellbore4by taking a ratio of the gradient and the electromagnetic field. However, to avoid errors due to assumptions that induce current on conductive member12may be constant, inversion may be used.

Referring now toFIG. 5, ranging geometry is illustrated that may be used for constructing an example inversion. As illustrated, electromagnetic ranging tool24may be disposed in second wellbore14for use in determination location of target wellbore4. In examples, location of target wellbore4may be determined with respect to second wellbore14. Electromagnetic ranging tool24may be assumed to be in the z-direction in the Cartesian coordinate system. Target wellbore4may be at a distance D away from a reference point on bottom hole assembly22. In this example, the reference point may be the tip of drill bit20. The inclination and azimuth of target wellbore4with respect to electromagnetic ranging tool24may be shown as θ and ϕ, respectively, and {right arrow over (n)} may be a unit vector parallel to a direction of target wellbore4. The drilling mud in second wellbore14may have a mud resistivity of Rm. Second wellbore14may have a diameter of dbh. Subterranean formation8may have a resistivity of Rf.

Based on the ranging geometry illustrated onFIG. 5, an example inversion may be constructed to solve for parameters (D, θ, ϕ, and {right arrow over (n)}). This may be a total of 5 parameters, for example, as the unit vector ({right arrow over (n)}) may be defined using two of its components. An iterative type of inversion may be used or a look-up library search of proprietary information may be employed. As previously noted, inversion may use a forward model that simulates the signal that would be measured at receiver32of electromagnetic ranging tool24for a specific target well position and orientation. Parameters such as formation resistivity Rf, mud resistivity Rm, and borehole diameter dbh may be found using other tools are assumed to be known for the inversion. Additional parameters that may impact the measurements may also be incorporated into the forward model such as the target wellbore4diameter, target wellbore4resistivity, and permeability, but they are not discussed herein for simplicity. The inversion may then be implemented to find the parameters that minimize a cost function, wherein the cost function may be the difference between the forward model and actual measurements recorded by electromagnetic ranging system2.

In an iterative inversion, whenever a measurement may be made at the receiver32of the electromagnetic ranging tool24(e.g., which may be written as the matrixS), an initial guess of the target wellbore4position may be made and using other parameters, for example, that may be assumed to be known. Based on the value of the cost function, an updated guess may be calculated until the iteration converges to a solution or a maximum number of iterations is achieved. It should be noted that the measured signalSmay include different transmitter-receiver configurations and different operating frequencies, among others. Furthermore, in logging-while-drilling systems, for example, the measured signalSmay also include measurements at different azimuthal bins or this azimuthal information may be averaged out. In an inversion utilizing proprietary information, cost functions between the measured signalSand a library of modelling results (e.g., modeled signalsM) may be calculated and then a parameter set that corresponds to the minimum cost function may be returned as the answer, for example.

As described above in the description of inversion, parameters, without limitation, such as mud resistivity, formation resistivity, and second wellbore14diameter, may be found and placed into a forward model. In the following paragraphs, various non-limiting techniques for determination of mud resistivity, formation resistivity, and second wellbore14diameter will be described. It should be understood that the following description is merely illustrative and other techniques may be used to calculate these parameters.

An example technique for determining second wellbore14diameter may use a caliper tool. By way of example, a caliper tool (not illustrated) may be disposed on bottom hole assembly22and used to measure the diameter of second wellbore14. The caliper tool may comprise several legs, which may be opened to touch the wall of second wellbore14. Based on the distance the legs may open, the second wellbore14diameter may be accurately measured and logged. The caliper tool may also be used to provide information related to eccentricity and caving, which may further be incorporated into a forward model.

An example technique for measuring mud resistivity may use a mud sensor. In examples, the mud sensor may have a very shallow depth of investigation. The mud sensor may emit a current into second wellbore14and measure the voltage drop to calculate mud resistivity. The mud resistivity may then be placed into the forward model.

An example technique for measuring formation resistivity may use a resistivity tool.FIG. 6illustrates inclusion of a resistivity tool52on bottom hole assembly22. As illustrated, resistivity tool may be disposed between various sections of electromagnetic ranging tool24, such as between transmitter30and receiver32. Resistivity tool52may be an azimuthal and/or non-azimuthal propagation resistivity tool. To prevent interference between different tools, frequency of operation of resistivity tool52and electromagnetic ranging tool24may be selected to be different. Different frequencies of operation may also be required because the sensitivity to a formation and target well resistivity may be optimal at different frequencies. Filtering may be applied to reduce the interference further, and gap subs may be used to minimize coupling between electromagnetic ranging tool24and resistivity tool52. In examples, resistivity tool52may have a volume that may be sensitive to the properties of a formation, illustrated as reference number54onFIG. 6, which may be different than the sensitive volume of electromagnetic ranging tool24. Although subterranean formation8may be shown to be homogeneous, it should be understood that subterranean formation8may comprise different layers. Resistivity tool52(e.g., a propagation resistivity tool) may have a depth of investigation that may be less than twenty feet. To find formation resistivity at locations that may be further than 20 feet from resistivity tool52, an interpolation may be performed, for example, using a geological model and the resistivity information from resistivity tool52. Additionally, resistivity tool52may have different modes of operation with different depths of investigation that may benefit interpolation. Thus, the resistivity of subterranean formation8may be measured and used within forward modeling.

As previously described, gain of electromagnetic ranging system2may fluctuate over time and, if not corrected, may produce error in the determined position of target wellbore. In addition to in situ calibration, surface calibration may also be used, for example, to determine proper operation of electromagnetic ranging system2. Surface calibration may be useful, for example, in early stages of tool deployment before in situ calibration may be available. Additionally, surface calibration may also ensure that the forward model used in subsequent in situ calibration does not have a large error at the beginning. Surface calibration may be performed by many different methods for coil and electrode type electromagnetic excitations. For example, electrode excitation may depend on galvanic principles, a resistor box may be used for calibration of the electrodes on the surface. Coil excitation may depend on induction principles, a calibration test coil may be used to calibrate electromagnetic ranging system2with coils on the surface.

FIG. 7illustrates an example surface calibration of an electromagnetic ranging tool24that may include electrode excitation. As illustrated, the electromagnetic ranging tool24may include a transmitter30and receivers32. The transmitter30may include a source electrode56and a return electrode58. A resistor box60may be connected between source electrode56and a return electrode58. A voltage and/or a current may be applied between the source electrode and the return electrode, allowing for the measurement of a complex impedance. The properties of resistor box60may be known, which may allow an operator to model the expected response of electromagnetic ranging system2. For example, an ideal current level that may be transmitted within electromagnetic ranging tool24, when resistor box60may be connected, may be a known value. If the actual current level is different, electromagnetic ranging tool24may be adjusted accordingly to increase and/or decrease the gain within electromagnetic ranging tool24. Additionally, electromagnetic ranging tool24may comprise multiple frequencies of operation and/or several transmitters, both of which may be calibrated separately.

As illustrated inFIG. 8, calibration of an electromagnetic ranging tool24that may comprise coil excitation may be performed with test coil62. The test coil62may comprise known conductivity that may be used to perform surface calibration. Gain within electromagnetic ranging tool24may be found by modeling the response of test coil62and comparing it with a measured response of electromagnetic ranging tool24. This may be repeated for each combination of transmitter30and receivers32. To increase accuracy, a sweep over electromagnetic ranging tool24may be performed, and the gain may be found at the location where the maximum signal at each receiver32may be observed. Calibration may be repeated for multiple frequencies in which electromagnetic ranging tool24may operate. In addition to determination of multiplicative gain coefficient described above, gain offset may also be calculated. Gain offset may be calculated, for example, with different resistor boxes for electrode excitation or different test loops for coil excitation.

Turning now to in-situ calibration, calibration may be performed while electromagnetic ranging tool24is disposed in second wellbore14. Known formation properties may be used to calculate and correct the gain within electromagnetic ranging system2. As previously described, in-situ calibration may be performed in addition to an optional surface calibration. In examples, calibration may take a first measurement with an electromagnetic ranging tool24. The measurement may be implemented in calculating a first modeled signal M° °. As described below, the modeled signal M° ° and the first measurement may calibrate electromagnetic ranging tool24for further measurements. Calibrated, a second measurement may be performed by electromagnetic ranging tool24. The calibrated measurement may determine the distance, direction, and/or orientation to a target wellbore4. In-situ calibration may be performed in zones of subterranean formation8where target wellbore4may not be present. The target wellbore4(or other wellbores) may not be considered present if the secondary magnetic fields emanating from there is negligible compared to noise. Finding zones without other wellbores (e.g., target wellbore4) may be accomplished in several ways. During the beginning of drilling operations, there may exist prior information about the presence of wells, which may allow operators to guide electromagnetic ranging system2to areas in which other wells may be far enough away for in-situ calibration. Additionally, data measured by electromagnetic ranging system2may be evaluated to determine the presence of other wells.

FIG. 9illustrates a well detection method64that may be used to determine the presence of another well. As illustrated, at block66, a forward model may be used to calculate a modeled signalM∞assuming there is no target wellbore4. Inputs to the forward model may parameters, such as formation resistivity Rf, mud resistivity Rm, and second wellbore14diameter dbh. Determination of these parameters is described above. At block68, the modeled signalM∞may be subtracted from a measured signalS. To obtain the measured signalS, the electromagnetic ranging tool24(e.g., shown onFIG. 1) may be used to generate an electromagnetic field with resultant field measurements being obtained at receiver30. The result from the subtraction may be compared to a threshold base, which may be a noise floor of the electromagnetic ranging tool24. The noise floor of the ranging tool may be described as the level below which the received signal may no longer be distinguishable from the noise generated by electromagnetic ranging tool24and the natural, environmental noises. In examples, the “noise floor” may be in the order of the expected value of the measured noise and may be calculated by making a measurement while electromagnetic ranging tool24may not transmitting. If the result from the subtraction is less than the threshold base, it may be assumed that target wellbore4is not present (block68) and in-situ calibration may then be performed. However, if the subtraction is higher than the threshold base, target wellbore4may be present and inversion may be performed, for example, as described above, to identify the direction and distance of the target wellbore4.

Although well detection method64shown onFIG. 9may be used for determining the presence of target wellbore4, a false detection of target wellbore4may occur in some instances. For example, well detection method64may falsely detect target wellbore4if gain fluctuation may be large, thus potentially preventing in-situ calibration. While large gain fluctuations may be minimized by use of surface calibration, as described above, secondary indicators of the presence of target wellbore4may also be applied. One technique for using a secondary indicator may comprise transmitter30and/or receiver32on electromagnetic ranging tool24, in the form of tilted coils, since tilted coils may be capable of measuring cross-coupling components. While described with tilted coils, the techniques may also use other antenna capable of measuring cross-coupling components, such as multi-axial antennas. For a secondary indicator, the measured signalSmay not be averaged out over azimuthal directions for a rotating tool, but rather data may be collected at different azimuthal bins. The tilted coil configuration may be able to obtain different components of the coupling. In a homogenous medium, a uniform signal with respect to the azimuth may be measured, while, for a non-homogenous medium, the measured signal may exhibit a sinusoidal variation with respect to the azimuth. If a target wellbore4may be present, the measured signal may exhibit double sinusoidal variation with respect to the azimuth, assuming the target wellbore4may be straight and not bent.

FIG. 10illustrates a first validation method72for validating the method inFIG. 9, assuming a homogeneous formation model. In other words, the first validation method72may be used as secondary indicator to determine the presence of target wellbore4. For example, the first validation method72may be used if the determination of a target wellbore4by another method, such as that described with respect toFIG. 9, was a false detection. First validation method72may utilize cross-coupling components of the electromagnetic field that may be measured in a tilted coil configuration, for example. As described above, in a homogenous formation, a uniform signal with respect to the azimuth may be measured. The first validation method72in general may compare the difference in the modeled signalM∞and the measured signalSat different azimuthal locations to determine if there was a false detection of target wellbore4. A specific implementation of first validation method72may be described with reference toFIG. 10. At block74, the difference in the modeled signalM∞and the measured signalSmay be placed in bins corresponding to different azimuthal locations. At block76, the standard deviation of the difference in the bins may be determined. At block78, the standard deviation of the difference may be compared to a threshold. This threshold may again be calculated based on the expected noise characteristics of electromagnetic ranging tool24obtained through measurements. If the standard deviation of the difference is less than the threshold, then the difference in the signals may not be changing significantly at different azimuthal locations, indicating target wellbore4is not present. Accordingly, the detection of target wellbore4by the other technique may have been a false detection. In-situ calibration may then be performed as there is no target wellbore4present. However, if the standard deviation of the difference is greater than the threshold, then the difference in signals is changing significantly at different azimuthal locations, indicating target wellbore4is present.

FIG. 11illustrates a second validation method80for validating the method inFIG. 9, assuming a formation model that includes inhomogeneities. In other words, second validation method80may be used as a secondary indicator to determine the presence of target wellbore4. Second validation method80may also be used if the determination of a target wellbore4by another method, such as that described with respect toFIG. 9was a false detection. Second validation method80may utilize cross-coupling components of the electromagnetic field that may be measured in a tilted coil configuration, for example. As described above, in an inhomogeneous formation, measured signals may exhibit sinusoidal and/or double sinusoidal variations with respect to the azimuth. Accordingly, differences in the modeled signalM∞and the measured signalSat different azimuthal locations may be compared to determine if there was a false detection of target wellbore4.

A specific implementation of second validation method80may be described with reference toFIG. 11. At block82, the measured signalSmay be put in different sinusoidal bins. The measured signalSmay then be divided into parts (block84), for example, with uniform azimuthal variation, sinusoidal azimuthal variation, and double sinusoidal variation. Dividing the measured signalSmay be performed by sinusoidal fitting, for example, using a Fourier series expansion. At block86, gain coefficient of the electromagnetic ranging tool24may be calculated using a forward model from uniform and sinusoidally varying portions of the measured signal. Specifically, sinusoidally varying portions of the measured signal may comprise the effect from the formation and not the target well, they may be simulated using the forward model with the known formation and electromagnetic ranging tool24parameters and applying sinusoidal fitting. Then, the gain coefficient may be obtained as a ratio of the sum of the uniform and sinusoidally varying portions of the model and the sum of the uniform and sinusoidally varying portions of the measurements. At block88, the gain coefficient may be applied to the measured signalSand subtracting the corrected measured signal ({tilde over (G)}×S) from a modeled signalM∞the modeled signalM∞may be calculated, for example, using the previously described inversion. At block90, a standard deviation of this difference between the modeled signalM∞and the corrected measured signal ({tilde over (G)}×S) may be compared to a threshold. The threshold may be based on the noise characteristics of electromagnetic ranging tool24, calculated by measurements as described above. If the standard deviation of the difference is less than the threshold, then the difference in the signals may not be changing significantly at different azimuthal locations, indicating target wellbore4is not present. Accordingly, the detection of target wellbore4by the other technique may have been a false detection. In-situ calibration may then be performed as there is no target wellbore4present. However, if the standard deviation of the difference is greater than the threshold, then the difference in signals is changing significantly at different azimuthal locations, indicating target wellbore4is present.

The second validation method80shown onFIG. 11may also return a gain coefficient. This gain coefficient may be used for calibration, for example, even when target wellbore4may be present. However, accuracy of second validation method80for calibration may be limited as it does not consider the possible gain offsets. The presence of second wellbore14may also limit the accuracy of second validation method80if used for calibration even when target wellbore4is present. Thus, calibration of electromagnetic ranging system2without a target well may further increase accuracy if in-situ calibration.

As previously described, in situ calibration may be performed where there is no other well (e.g., target wellbore4) present. Techniques have been described previously for determining whether there is another wellbore present. In situ calibration may include calculating gain coefficient of the electromagnetic ranging system2. If no other well is present, the gain coefficient may be calculated in situ using known formation properties, for example. In addition to the multiplicative gain coefficient, gain offset may also be calculated in situ. The gain coefficient and optionally the gain offset may then be used to calibrate electromagnetic ranging system2. By way of example, calibrating the electromagnetic ranging system2may comprise applying calibration coefficients, such as gain coefficient and optionally the gain offset, to measured signals. Calculation of gain coefficient may include taking a ratio of a modeled signal M∞and a measured signal Siat a time where target wellbore4is not present. The modeled signal M∞may be calculated, for example, using a forward model. If multiple data points are available, calculation of gain coefficient may include taking a ratio of the difference of a modeled signal M∞at a first time and a modeled signal M∞at a second time and the difference of a measured signal Siat the first time and a measured signal Siat the second time.

Referring now toFIG. 12, an example of an in-situ calibration method92is illustrated. The in-situ calibration method92may be used in the calibration of an electromagnetic ranging tool24, for example. At block94, in-situ calibration method92may comprise measuring a signal at time t2. The measured signal may be denoted as Si. The signal may be measured at a number of different receivers32denoted as Nrec. The signal may be measured by receivers32on electromagnetic ranging tool24. The electromagnetic ranging tool24may be used to measure a signal in second wellbore14for example, by transmitting an electromagnetic filed using transmitter30and then recording electromagnetic field measuring using receivers32. At block96, in situ calibration method92may comprise determining if target wellbore4is present. Techniques for determining the presence of target wellbore4are discussed above. If it is determined that the target wellbore4is present, then no calibration is performed, as shown at block96. If target wellbore4is not present, in-situ calibration method92may move to block98for determining if a previous data point exists. By way of example, a previous data point may exist where a signal previously measured at time t1and corresponding to a different set of formation properties than the measured signal Siat time t2. If a prior data point exist at time t1, gain coefficient and gain offset may be calculated using the measured signal Siat time t1and at time t2, at block100. For example, Equation (6), below, may be used to calculate gain and offset.

For⁢⁢i=1,Nrec⁢⁢Gi=(Mi∞⁡(t⁢⁢2)-Mi∞⁡(t⁢⁢1))(Si⁡(t⁢⁢2)-Si⁡(t⁢⁢1))⁢⁢Ci=Mi∞⁡(t⁢⁢2)-Gi×Si⁡(t⁢⁢2)(6)
Wherein Nrecmay denote the number of receivers32at which measurements have been recorded so that calibration may be repeated for each of the receivers32, Giis the gain at receiver i, Ciis the offset for receiver i, Mi∞(t) may be the modeled signal at time t for receiver i, and Si(t) may be the measured signal at receiver/at time t. If the measured signals Simay depend on other parameters, such as frequency, a calibration coefficient for each different measurement set may be calculated. By way of example, gain coefficient and optional gain offset may be calculated for each frequency of a set of frequencies. If no previous data point exists, the in situ calibration method92may move to block102for determining gain coefficient as a ratio of a modeled signal Mi∞(t2) to measured signal Si(t2) and the gain offset may be set to 0 as shown below in Equation (7), for calibration.

After determination of calibration coefficients, the measured signals Sifrom electromagnetic ranging system2may be calibrated, at block104. For example, the calibration coefficients, such as gain coefficient and gain offset, may be applied to measured signals Sito calculate a calibrated signal {tilde over (S)}ias shown below in Equation (8):
{tilde over (S)}i=Gi×Si+Ci(8)

Accordingly, the disclosed methods and systems may be used for an in-situ calibration. It should be understood that the disclosed methods and systems may be modified as would be apparent to those of ordinary skill in the art with the benefit of this disclosure. For example, calibration may not be performed until at least two different data points for zones of subterranean formation8without a target wellbore4have been identified. If more than two data points have been obtained in a time frame where calibration may be applied, all those data points may be used in the calibration. A line fitting technique may be used if there are more than two data points. For example, a line that fits the data points by minimizing the error in the least square sense may be utilized, which may increase the accuracy of calibration by further reducing noise effects.

A method for determining a target well may comprise taking a first measurement with an electromagnetic ranging tool at a first position, calculating a first modeled signal, and calculating a calibration for the electromagnetic ranging tool from at least the first measurement and the first modeled signal. The method may further comprise taking a second measurement with the electromagnetic ranging tool at a second position, calculating a calibrated measurement using at least the second measurement, and determining a distance, direction, and/or orientation to a target wellbore using at least the calibrated measurement. This method may include any of the various features of the compositions, methods, and systems disclosed herein, including one or more of the following features in any combination. The first position may be downhole. The first position may be at a surface of a second wellbore. The electromagnetic ranging tool may comprise a source electrode, a return electrode, and a resistor box connected between the source electrode and the return electrode. Additionally, the method may comprise applying a voltage or a current between the source electrode and the return electrode and measuring a complex impedance. The step of determining a distance, a direction and/or an orientation to a target wellbore may comprises matching a second modeled signal to the second measurement, wherein the second modeled signal is calculated using a forward model, and inputting at least one of a formation resistivity, a mud resistivity, or a borehole diameter into the forward model. The step of electromagnetic ranging tool may be in a bottom hole assembly, wherein the method further comprises measuring formation resistivity with a resistivity tool in the bottom hole assembly. The step of calculating a calibration for the electromagnetic ranging tool may comprise calculating a gain of the electromagnetic ranging tool, wherein the gain is applied to the calibrated measurement. The electromagnetic ranging tool may be disposed in a second wellbore, the method further comprising adjusting one or more drilling parameters of the second wellbore based on the distance, direction, and/or orientation to the target wellbore that was previously determined. The step of calculating the gain may comprise calculating a ratio of the first modeled signal and a measured signal. The step of calculating the gain may comprise calculating a ratio of a difference between a second measured signal at a second time and the first measured signal at a first time and a difference between the second measurement at the second time and the first measurement at the first time to find a multiplicative gain coefficient. The step of calculating a calibration may comprise calculating a gain offset of the electromagnetic ranging tool. The method may further comprise determining whether the target wellbore is present, wherein the step of determining whether the target wellbore may be present comprises calculating whether a difference between the first measurement and the first modeled signal exceeds a threshold, and evaluating whether the determination of the presence of the target wellbore is a false detection. In examples, the method may further comprising calibrating the electromagnetic ranging tool at a surface before disposing the electromagnetic ranging tool in a second wellbore. A resistivity tool may be disposed between a transmitter and a receiver of the electromagnetic ranging tool. The method may further comprise interpolating through at least a geological model and resistivity information from the resistivity tool, and further wherein the interpolation is inserted into the first measurement. The step of calculating a calibration may comprise identifying a measured signal and a modeled signal by an azimuthal location of recording, determining a standard deviation of the azimuthal location of the measured signal and the modeled signal, and comparing the standard deviation to a threshold. The step of calculating a calibration may comprise identifying a measured signal by a sinusoidal variation, dividing the measured signal into different parts, calculating a gain coefficient using a forward model, applying the gain coefficient to a modeled signal, subtracting the measured signed from the modeled signal, and comparing a standard deviation of the modeled signal and the measured signal to a threshold.

An electromagnetic ranging system for determine the location of a target well may comprise an electromagnetic ranging tool and an information handling system coupled to the electromagnetic ranging tool, wherein the information handling system is operable to calibrate the electromagnetic ranging tool from measurements from use of the electromagnetic ranging tool in a wellbore, calculate a gain of the electromagnetic ranging tool, and apply the gain to a measured signal from the electromagnetic ranging tool. The system may include any of the various features of the compositions, methods, and system disclosed herein, including one or more of the following features in any combination. The electromagnetic ranging tool may comprise a transmitter and a receiver, wherein the transmitter may comprise a coil, a wire antenna, a toroidal antenna, or azimuthal button electrode and wherein the receiver comprises a coil or a magnetometer. The information handling system may be further operable to determine whether a target wellbore is present and determine whether the determination of the presence of the target wellbore is a false detection. The electromagnetic ranging tool may comprises a transmitter and a receiver, wherein a resistivity tool may be disposed between the transmitter and the receiver. The electromagnetic ranging tool may comprise a source electrode and a return electrode, wherein the electromagnetic ranging system may comprise a resistor box connected between the source electrode and the return electrode. The information handling system may be downhole or uphole.