# Patent application title: Method of Acquiring Viscosity of A Downhole Fluid

##
Inventors:
Shigeru Sato (Inagi-Shi, JP)

Assignees:
SCHLUMBERGER TECHNOLOGY CORPORATION

IPC8 Class: AE21B4908FI

USPC Class:
16625001

Class name: Wells processes with indicating, testing, measuring or locating

Publication date: 2015-04-30

Patent application number: 20150114625

## Abstract:

Methods of acquiring viscosity of a downhole fluid in a wellbore
penetrating a subterranean formation is provided. The downhole fluid is
measurable by a vibrating wire viscometer positionable in the wellbore.
The method involves acquiring a signal of the downhole fluid from the
viscometer, generating an initial estimate of the viscosity parameter
based on measured viscosity signal parameters and by selectively
adjusting the viscosity signal, and generating final estimates of the
viscosity parameters by performing Kalman filtering on the initial
estimates.## Claims:

**1.**A method of acquiring viscosity of a downhole fluid in a wellbore penetrating a subterranean formation, the downhole fluid measurable by a vibrating wire viscometer positionable in the wellbore, the method comprising: acquiring a signal of the downhole fluid from the viscometer; generating an initial estimate of the viscosity parameter based on measured viscosity signal parameters and by selectively adjusting the viscosity signal; and generating final estimates of the viscosity parameters by performing Kalman filtering on the initial estimates.

**2.**The method of claim 1, wherein the acquiring comprises passing a voltage through a wire of the viscometer.

**3.**The method of claim 1, wherein generating initial estimates comprises: obtaining a digitized signal; measuring noise amplitude and time interval of the viscosity signal above a noise level; obtaining an analog signal; measuring an initial voltage; obtaining frequency by counting the number of positive or negative peaks in the time interval and dividing the number of peaks by the time interval; and obtaining the damping factor.

**4.**The method of claim 1, wherein the generating initial estimates comprises: preprocessing the viscosity signal; and determining initial values of states of the viscosity signal.

**5.**The method of claim 4, wherein the preprocessing comprises: determining a noise variance of a baseline of the viscosity signal; removing an offset of the viscosity signal; and removing a part of the viscosity signal below the noise variance.

**6.**The method of claim 4, wherein the determining initial values comprises estimating a coarse resonance frequency, a course damping rate, and a coarse value of an initial amplitude.

**7.**The method of claim 1, wherein the generating final estimates comprises performing Kalman filtering of the initial estimates.

**8.**The method of claim 7, wherein the performing comprises initializing the Kalman filter and performing the Kalman filtering.

**9.**The method of claim 1, wherein the Kalman filter is one of an extended Kalman filter and an unscented Kalman filter.

**10.**The method of claim 1, further comprising validating the estimated viscosity parameters by comparing the estimated viscosity parameters with viscosity parameters estimated using signal modulation.

**11.**The method of claim 1, wherein the viscosity parameters comprise noise, voltage, frequency, damping factor, time interval, amplitude, number of signal peaks, and signal offset.

**12.**A method of acquiring viscosity of a downhole fluid in a wellbore penetrating a subterranean formation, the downhole fluid measurable by a vibrating wire viscometer positionable in the wellbore, the method comprising: acquiring a signal of the downhole fluid from the viscometer by passing a voltage through a wire of the viscometer; generating an initial estimate of the viscosity parameter based on measured viscosity signal parameters and by selectively adjusting the viscosity signal; generating final estimates of the viscosity parameters by performing Kalman filtering on the initial estimates; and validating the estimated viscosity parameters.

**13.**The method of claim 12, wherein the acquiring comprises applying a shot sine or cosine wave electric voltage on the edges of a wire of the viscometer to induce an electric current, and generate an electromagnetic force on the wire.

**14.**The method of claim 12, wherein the generating the initial estimate comprises passing a signals from a constant initial voltage, a oscillating damping signal, a digital peak counter, and a voltage meter to a central processing unit.

**15.**The method of claim 15, wherein the generating the initial estimate further comprises passing signals back from the central processing unit to the digital peak counter and the voltage meter.

**16.**The method of claim 16, wherein the generating the initial estimate further comprises generating a number of peaks at the central processing unit by passing the oscillating damping signal from a high pass filter for filtering and from the high pass filter to a differential analog circuit, and on to a digital peak counter.

**17.**The method of claim 17, wherein the generating the initial estimate further comprises generating a voltage at the central processing unit by passing the signal from the high pass filter to the low pass filter, and on to a logarithmic analog circuit and a voltage meter.

**18.**The method of claim 12, wherein the validating comprises comparing the estimated viscosity parameters with viscosity parameters estimated using signal modulation.

**19.**The method of claim 12, wherein the validating comprises estimating using signal modulation, the estimating comprising: modulating the viscosity signal; filtering the modulated signal; determining frequency and phase of the modulated signal; and determining decrement and amplitude of the modulated signal.

**20.**A method of acquiring viscosity of a downhole fluid in a wellbore penetrating a subterranean formation, the downhole fluid measurable by a vibrating wire viscometer positionable in the wellbore, the method comprising: acquiring a signal of the downhole fluid from the viscometer by passing a voltage through a wire of the viscometer; generating an initial estimate of the viscosity parameter based on measured viscosity signal parameters and by selectively adjusting the viscosity signal; generating final estimates of the viscosity parameters by performing Kalman filtering on the initial estimates; validating the estimated viscosity parameters; and selectively adjusting the generating based on the validating.

## Description:

**BACKGROUND**

**[0001]**The present disclosure relates generally to wellsite operations. In particular, the present disclosure relates to downhole methods and apparatuses, such as vibrating wire viscometers used for acquiring viscosity of downhole fluids.

**[0002]**Wellbores are drilled to locate and produce hydrocarbons. A downhole drilling tool with a bit at an end thereof is advanced into the ground to form a wellbore. As the drilling tool is advanced, drilling mud is pumped through the drilling tool and out the drill bit to cool the drilling tool and carry away cuttings. The fluid exits the drill bit and flows back up to the surface for recirculation through the drilling tool. The drilling mud is also used to form a mudcake to line the wellbore.

**[0003]**During a drilling operation, various downhole evaluations may be performed to determine characteristics of the wellbore and surrounding formations. In some cases, the drilling tool may be provided with devices to test and/or sample the surrounding formation and/or fluid contained in reservoirs therein. In some cases, the drilling tool may be removed and a downhole wireline tool may be deployed into the wellbore to test and/or sample the formation. These samples or tests may be used, for example, to determine whether valuable hydrocarbons are present.

**[0004]**Formation evaluation may involve drawing fluid from the formation into the downhole tool for testing and/or sampling. Various devices, such as probes or packers, may be extended from the downhole tool to establish fluid communication with the formation surrounding the wellbore and to draw fluid into the downhole tool. Downhole tools may be provided with fluid analyzers and/or sensors, such as viscometers, to measure downhole parameters, such as fluid properties. Examples of downhole devices are provided in Patent/Publication Nos. EP2282192, U.S. Pat. No. 7,194,902, U.S. Pat. No. 7,222,671, U.S. Pat. No. 7,458,252, U.S. Pat. No. 8,307,698, U.S. Pat. No. 8,322,196, US2010/0241407, US2011/0023587, US2011/0030455 and US2011/0083501, the entire contents of which are hereby incorporated by reference herein.

**SUMMARY**

**[0005]**In at least on aspect, the present disclosure relates to a method of acquiring viscosity of a downhole fluid in a wellbore penetrating a subterranean formation. The downhole fluid is measurable by a vibrating wire viscometer positionable in the wellbore. The method involves acquiring a signal of the downhole fluid from the viscometer, generating an initial estimate of the viscosity parameter based on measured viscosity signal parameters and by selectively adjusting the viscosity signal, and generating final estimates of the viscosity parameters by performing Kalman filtering on the initial estimates.

**[0006]**In another aspect, the disclosure relates to a method of acquiring viscosity of a downhole fluid in a wellbore penetrating a subterranean formation. The downhole fluid is measurable by a vibrating wire viscometer positionable in the wellbore. The method involves acquiring a signal of the downhole fluid from the viscometer by passing a voltage through a wire of the viscometer, generating an initial estimate of the viscosity parameter based on measured viscosity signal parameters and by selectively adjusting the viscosity signal; generating final estimates of the viscosity parameters by performing Kalman filtering on the initial estimates; and validating the estimated viscosity parameters.

**[0007]**Finally, in another aspect, the disclosure relates to a method of acquiring viscosity of a downhole fluid in a wellbore penetrating a subterranean formation. The downhole fluid is measurable by a vibrating wire viscometer positionable in the wellbore. The method involves acquiring a signal of the downhole fluid from the viscometer by passing a voltage through a wire of the viscometer, generating an initial estimate of the viscosity parameter based on measured viscosity signal parameters and by selectively adjusting the viscosity signal, generating final estimates of the viscosity parameters by performing Kalman filtering on the initial estimates, validating the estimated viscosity parameters, and selectively adjusting the generating based on the validating.

**[0008]**This 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.

**BRIEF DESCRIPTION OF THE DRAWINGS**

**[0009]**Embodiments of the downhole viscosity measurement method are described with reference to the following figures. The same numbers are used throughout the figures to reference like features and components.

**[0010]**FIGS. 1.1 and 1.2 depict schematic views, partially in cross-section, of a wellsite with a downhole drilling tool and a downhole wireline tool, respectively, deployed into a wellbore for measuring downhole viscosity in accordance with embodiments of the present disclosure;

**[0011]**FIGS. 2.1-2.3 are schematic views illustrating various portions of a downhole tool having a formation evaluation tool, a viscometer, and a viscosity unit therein in accordance with embodiments of the present disclosure;

**[0012]**FIG. 3 is a flow chart depicting a method of acquiring viscosity parameters of a downhole fluid in accordance with embodiments of the present disclosure;

**[0013]**FIGS. 4.1-4.2 are graphs illustrating a base method in accordance with embodiments of the present disclosure;

**[0014]**FIGS. 5.1-5.4 are graphs illustrating the alternate method in accordance with embodiments of the present disclosure;

**[0015]**FIGS. 6.1-6.2 are graphs of a signal estimation illustrating a low viscosity case in accordance with embodiments of the present disclosure;

**[0016]**FIGS. 7.1-7.5 are graphs illustrating errors of state estimates in accordance with embodiments of the present disclosure;

**[0017]**FIGS. 8.1-8.4 are graphs illustrating histograms of estimate errors in accordance with embodiments of the present disclosure;

**[0018]**FIG. 9 is a graph of a signal estimation illustrating a high viscosity case in accordance with embodiments of the present disclosure;

**[0019]**FIGS. 10.1-10.5 are graphs illustrating errors of state estimates in accordance with embodiments of the present disclosure;

**[0020]**FIGS. 11.1-11.4 are graphs illustrating histograms of estimate errors in accordance with embodiments of the present disclosure;

**[0021]**FIGS. 12.1-12.2 are graphs of a signal estimation illustrating an extension of the high viscosity case of FIG. 9 in accordance with embodiments of the present disclosure;

**[0022]**FIGS. 13.1-13.5 are graphs illustrating errors of state estimates in accordance with embodiments of the present disclosure;

**[0023]**FIGS. 14.1-14.4 are graphs illustrating histograms of estimate errors in accordance with embodiments of the present disclosure;

**[0024]**FIG. 15 is a graph of a signal estimation illustrating an extension of the high viscosity case of FIG. 12 in accordance with embodiments of the present disclosure;

**[0025]**FIGS. 16.1-16.5 are graphs illustrating errors of state estimates in accordance with embodiments of the present disclosure; and

**[0026]**FIGS. 17.1-17.4 are graphs illustrating histograms of estimate errors in accordance with embodiments of the present disclosure.

**DETAILED DESCRIPTION**

**[0027]**The description that follows includes exemplary apparatuses, methods, techniques, and instruction sequences that embody techniques of the inventive subject matter. However, it is understood that the described embodiments may be practiced without these specific details.

**[0028]**The present disclosure relates to formation evaluation involving measurements of downhole fluid. In particular, the disclosure describes apparatuses and methods for determining viscosity parameters of downhole fluid. A formation evaluation tool with a vibrating wire viscometer is positionable in a downhole tool and deployable into a wellbore for obtaining signals from downhole fluid drawn into the downhole tool. Initial estimates of viscosity parameters may be made based on viscosity signals measured using circuitry or based on an analysis of the signal. Final estimates of viscosity parameters may be made from the initial estimates using Kalman filtering (extended or unscented).

**[0029]**FIGS. 1.1 and 1.2 depict environments in which subject matter of the present disclosure may be implemented. FIG. 1.1 depicts a downhole drilling tool 10.1 and FIG. 1.2 depicts a downhole wireline tool 10.2 that may be used for performing formation evaluation. The downhole drilling tool 10.1 may be advanced into a subterranean formation F to form a wellbore 14. The downhole drilling tool 10.1 may be conveyed alone or among one or more (or itself may be) measurement-while-drilling (MWD) drilling tools, a logging-while-drilling (LWD) drilling tools, or other drilling tools. The downhole tool 10.1 is attached to a conveyor (e.g., drillstring) 16 driven by a rig 18 to form the wellbore 14. The downhole tool 10.1 includes a probe 20 adapted to seal with a wall 22 of the wellbore 14 to draw fluid from the formation F into the downhole tool 10.1 as depicted by the arrows.

**[0030]**The downhole drilling tool 10.1 may be withdrawn from the wellbore 14, and the downhole wireline tool 10.2 of FIG. 1.2 may be deployed from the rig 18 into the wellbore 14 via conveyance (e.g., a wireline cable) 16. The downhole wireline tool 10.1 is provided with the probe 20 adapted to seal with the wellbore wall 22 and draw fluid from the formation F into the downhole tool 10.2. Backup pistons 24 may be used to assist in pushing the downhole tool 10.2 and probe 20 against the wellbore wall 22 and adjacent the formation F.

**[0031]**The downhole tools 10.1, 10.2 may be also provided with a formation evaluation tool 28 with a viscometer 30 for measuring downhole parameters. The formation evaluation tool 28 includes a flowline 32 for receiving the formation fluid from the probe 20 and passing the fluid to the viscometer 30 for measurement as will be described more fully herein. A surface unit 34.1 may be provided to communicate with the downhole tool 10.1, 10.2 for passage of signals (e.g., data, power, command, etc.) therebetween.

**[0032]**While FIGS. 1.1 and 1.2 depict specific types of downhole tools 10.1 and 10.2, any downhole tool capable of performing formation evaluation may be used, such as drilling, coiled tubing, wireline or other downhole tool. Also, while FIGS. 1.1 and 1.2 depict the formation evaluation tool 28 in a wellbore 14, it will be appreciated that the formation evaluation tool 28 and/or viscometer 30 may be used at a surface and/or downhole location at the wellsite, and/or at an offsite facility for measuring fluid parameters.

**[0033]**FIGS. 2.1-2.3 depict portions of the downhole tool 10, which may be either of the downhole tools 10.1 or 10.2 of FIG. 1.1 or 1.2. FIG. 2.1 shows a portion of the downhole tool depicting the formation evaluation tool 28, viscometer 30, and viscosity unit 34.2 therein. FIG. 2.2 depicts the viscometer 30 in greater detail. FIG. 2.3 depicts the viscosity unit 34.2 in greater detail, with an example output 231 generated therefrom.

**[0034]**As shown in FIG. 2.1, the probe 20 may be extended from the downhole tool 10 for engagement with the wellbore wall 22. The probe 20 is provided with a packer 36 for sealing with the wellbore wall 22. Packer 36 contacts the wellbore wall 22 and forms a seal with a mudcake 38 lining the wellbore wall 22.

**[0035]**The formation evaluation tool 28 may be provided with one or more flowlines 32 for drawing fluid into the downhole tool 10 through an inlet 44 in the probe 20. While one probe 20 with one inlet 44 is depicted, one or more probes, dual packers and related inlets may be provided to receive downhole fluids and pass them to one or more flowlines 32. Examples of downhole tools and fluid communication devices, such as probes, that may be used are depicted in U.S. Pat. No. 7,458,252, previously incorporated herein.

**[0036]**A sample chamber 46 is also coupled to the flowline 32 for receiving the downhole fluid. Fluid collected in the sample chamber 46 may be collected therein for retrieval at the surface, or may be exited through an outlet 48 in housing 50 of the downhole tool 10. Optionally, flow of the downhole fluid into and/or through the downhole tool 10 may be manipulated by one or more flow control devices, such as a pump 52, the sample chamber 46, valve 54 and/or other devices. Optionally, a surface unit 34.1 and/or viscosity unit 34.2 may be provided to communicate with the formation evaluation tool 28, the viscometer 30, and/or other portions of the downhole tool 10 for the passage of signals (e.g., data, power, command, etc.) therebetween.

**[0037]**The flowline 32 extends into the downhole tool 10 to pass downhole fluid to the formation evaluation tool 28. The formation evaluation tool 28 may be used to analyze, test, sample and/or otherwise evaluate the downhole fluid. One or more sensors S may optionally be provided to measure various downhole parameters and/or fluid properties. The sensor(s) S may include, for example, gauges (e.g., quartz), densitometers, viscometers, resistivity sensors, nuclear sensors, and/or other measurement and/or detection devices capable of taking downhole data relating to, for example, downhole conditions and/or fluid properties.

**[0038]**The viscometer 30 is positioned in the formation evaluation tool 28 and is coupled to the flowline 32 for receiving the downhole fluid. An example viscometer 30 which may be used is shown in FIG. 2.2. The viscometer 30 may be any downhole vibrating wire viscometer capable of measuring viscosity of downhole fluids. The viscometer 30 includes a metal wire 233 clamped in a magnetic field between permanent magnets 235. Examples of viscometers are provided in EP2282192, U.S. Pat. No. 7,194,902, U.S. Pat. No. 7,222,671, U.S. Pat. No. 8,307,698, U.S. Pat. No. 8,322,196, US2011/0023587, US2011/0030455 and US2011/0083501, previously incorporated by reference herein.

**[0039]**The viscometer 30 may be used to measure fluid parameters of the downhole fluid. The viscometer 30 may be used to generate outputs, such as graph 231 as shown in FIG. 2.2. The graph 231 may be generated using, for example, the viscosity unit 34.2. Graph 231 shows a plot of a measured signal 237 with an output (O) (y-axis) versus time (t) (x-axis) generated from the vibrating wire viscometer 30. The graph 231 depicts attenuation measured by the viscometer 30 when exposed to downhole fluid.

**[0040]**FIG. 2.3 depicts an example viscosity unit 34.2 that may be used with the viscometer 30 for operation therewith. The viscosity unit 34.2 may be used, for example, to apply a shot sine or cosine wave electric voltage on the edges of the wire 233 (FIG. 2.3). The voltage may be used to induce an electric current, and generate an electromagnetic force on the wire 233. The mechanical resonance of the wire 233 is excited and attenuated by drag force as the wire 233 is exposed to downhole fluid. The attenuation contains information concerning the viscosity of the downhole fluid.

**[0041]**The viscosity unit 34.2 is usable in collecting, analyzing, processing, controlling, and/or otherwise performing operations relating to the measurement of viscosity of downhole fluids. As shown, the viscosity unit 34.2 includes a central processing unit (CPU) 256, a database 258, and circuitry 260. The CPU 256 is coupled to the database 258 and the circuitry 260 for operation therewith.

**[0042]**The circuitry 260 includes constant initial voltage (V0) 262, oscillating damping signal 264, high pass filter 266, differential analog circuit 268, digital peak counter 270, low pass filter 272, logarithmic analog circuit 274, and voltage meter 276. Signals passed from the constant initial voltage 262, oscillating damping signal 264, digital peak counter 270, and voltage meter 276 are passed to the CPU 256. The CPU 256 passes signals back to the digital peak counter 270 and the voltage meter 276.

**[0043]**The oscillating damping signal 264 passes a signal to the high pass filter 266 for filtering. The signal is passed from the high pass filter 266 to the differential analog circuit 268, and on to the digital peak counter 270 to generate a number of peaks (N) at the CPU 256. The signal is also passed from the high pass filter 266 to the low pass filter 272, and on to the logarithmic analog circuit 274 and voltage meter 276 to generate voltage V(0)-V(t) at the CPU 256.

**[0044]**FIG. 3 is a flow chart depicting a method (300) of acquiring downhole viscosity parameters. The viscosity parameters may include, for example, noise (σ), voltage (V0), frequency (f), damping factor (λ), time interval, amplitude, number of signal peaks, signal offset, among others. FIGS. 4-17.4 are graphs depicting various measurements that may be performed in association with the method 300.

**[0045]**The method involves 380--generating a viscosity signal of a viscometer, 382, estimating viscosity parameters using Kalman Filtering, 388--validating the estimated viscosity parameters, and 390--selectively adjusting the generating based on the validating. The generating (380) the viscosity signal may involve deploying a downhole tool with a viscometer into a wellbore and generating the viscosity signal with the viscometer (see, e.g., FIG. 2.2).

**[0046]**The estimating (382) viscosity parameters using Kalman Filtering may involve 384--generating initial estimates of the viscosity parameters. The generating (384) may involve 384.1--obtaining the initial estimates of the viscosity parameters based on measured viscosity signal parameters, or 384.2--obtaining the initial estimates of the viscosity parameters by selectively adjusting the viscosity signal.

**Estimating Initial Viscosity Parameters**

**[0047]**The obtaining 384.1 involves 384.1.1--obtaining digitized viscosity signal, 384.1.2--measuring noise amplitude and time interval of the viscosity signal above a noise level, 384.1.3--obtaining an analog signal, 384.1.4--measuring an initial voltage, 384.1.5--obtaining a frequency of the viscosity signal by counting a number of positive or negative peaks in the time interval and dividing the number of the peaks by the time interval, and 384.1.6--obtaining a damping factor of the viscosity signal.

**[0048]**The obtaining 384.1 may be performed, using, for example, the circuitry of FIG. 2.3. The CPU 256 may be used to obtain measurements 384.1-384.4 for generating the viscosity parameters, such as noise (σ), voltage (V0), frequency (f), and damping factor (λ), from the signals received from the circuitry 260 and/or. The measuring (384.1.4) initial voltage may involve obtaining the exciting step voltage or amplitude of the exciting sine voltage to the wire (which may be a known value), removing a constant offset of the viscosity signal, and removing a DC component of a high pass filter circuit from the viscosity signal. The damping factor may be obtained (384.1.6) by applying a low pass filter to an oscillating damping signal to retrieve a damped envelop curve, applying the viscosity signal to a logarithmic circuit, measuring voltage of the viscosity signal at beginning and ending points, and determining a voltage by obtaining a slope of the time interval by dividing a difference between the beginning and the ending points by the time interval.

**[0049]**By way of example, the obtaining 384.1 may involve obtaining measurements after digitizing the signal to generate an analog signal. Using the analog signal, the initial voltage (V0) may be measured over time (t). An input signal may be represented by the following:

**V**(t)=V

_{0}e.sup.-λt sin(2πft+δ) Eqn. (1)

**[0050]**An exciting step voltage or amplitude of an exciting sine voltage applied to the wire may be designed to be a known constant value. Offset of the analog signal may be removed from the analog signal using, for example, the high-pass filter circuit 266 applied to remove a DC component from the analog signal. Frequency (f) may be measured using the analog circuit 268 to generate positive and negative peaks from an oscillating signal. The frequency (384.1.5) may be determined by counting the number of positive or negative peaks in a time interval. The frequency may be determined from the number of the peaks is divided by the time interval.

**[0051]**The damping factor (λ) may be obtained (384.1.6) by using a low pass filter applied to the oscillating damping signal to retrieve the damped envelop curve based on the following:

**V**(t)=V

_{0}e.sup.-λt Eqn. (2)

**[0052]**The oscillating damping signal may be applied to a logarithmic circuit 274 based on the following:

**log**[V(t)]=-λt+log [V

_{0}] Eqn. (3)

**[0053]**Voltages (V(0)-V(t)) of the signal may be measured at beginning and ending points. Voltage differences between the ending points may be divided by the time interval to give a slope corresponding to a damping factor based on the following:

**λ = log [ V ( 0 ) ] - log [ V ( t ) ] t Eqn . ( 4 ) ##EQU00001##**

**[0054]**The 384.2--obtaining the initial estimates of the viscosity parameters may be performed by selectively adjusting the viscosity signal. This obtaining (384.2) may be performed by 384.2.1--pre-processing the viscosity signal and 384.2.2 determining initial states of the viscosity signal. The preprocessing (384.2.1) may involve 384.2.1.1--determining a noise variance of a baseline of the viscosity signal, 384.2.1.2--removing an offset of the viscosity signal, and 384.2.1.3--removing a part of the viscosity signal below the noise variance. The determining (384.2.2) may involve estimating a coarse resonance frequency (384.2.2.1), a course damping rate (384.2.2.2), and a coarse value of an initial amplitude (384.2.2.3).

**[0055]**In an example, the pre-processing (384.2.1) may involve determining noise variance of the signal before or after ring down of the signal, and removing portions of the signal. This removal may involve removing offsets to provide signal symmetry about the zero signal line as shown in FIG. 5.1. For example, an offset portion 584 of the signal 237 may be removed using average subtraction.

**[0056]**Removing portions of the signal may also involve removing portions below the noise. This removal may involve detecting crosspoints 586 at times t1-t6 of FIG. 5.1 based on the following:

**y**(t

_{i}+1)y(t

_{i})<0 Eqn. (5)

**[0057]**A half cycle time of the first interval may then be determined based on the following:

**T**

_{1}=t

_{2}-t

_{1}Eqn. (6)

**[0058]**Additional intervals may also be determined using the following:

**T**

_{i}=t

_{i}+1-t

_{i}Eqn. (7)

**If Ti**<T1/2, then the interval and the remainder may be discarded.

**[0059]**Initial estimates of viscosity parameters, such as noise amplitude, frequency, damping factor, and viscosity, may be determined. Noise amplitude may be estimated from a measurement of noise amplitude from the signal output 237. The noise amplitude may be measured prior to applying the one shot sine/cosine wave electric voltage as shown in FIG. 5.2.

**[0060]**A course estimate of frequency may be determined by calculating the number (N) of crosspoints 586. The number N may be an odd integer. Time coordinates of the crosspoints 586 may be determined from interpolation of two data points yi+1 and yi when the following equation applies:

**y**

_{i}+1*y

_{i}>0 Eqn. (8)

**The frequency f may then be determined based on the following**:

**f**=(N-1)/(2(t

_{N}-t

_{1})) Eqn. (9)

**[0061]**A course estimate of the damping factor (or rate) may be determined by calculating the absolute value of the data |y.sub.(t)|. The data may be divided into each half cycle interval ti, pi as shown in FIG. 5.3. A maximum point 588.1-588.4 in each interval ti, pi may then be determined as shown in FIG. 5.3. A line 590 may then be fit to the data for the damping factor based on the following:

**log**(p

_{i})=-λt

_{i}Eqn. (10)

**[0062]**A course estimate of an initial amplitude (V) may be determined by selecting a first maximum point 588.1 from graph of FIG. 5.4. An initial amplitude may then be calculated from the following:

**V**=p

_{1}e.sup.λt

^{1}Eqn. (11)

**Estimating Final Parameters**

**[0063]**Final estimates of the viscosity parameters may be generated (386) by performing Kalman filtering of the initial estimates (generated (384) from either the obtaining 384.1 or 384.2). The generating (386) may involve performing an extended Kalman filtering (EKF) (386.1) or an unscented Kalman filtering (386.2) of the initial estimates. The extended Kalman filtering 386.1 may involve 386.1.1--initializing the EKF and 386.1.2--performing the EKF.

**[0064]**The initializing (386.1.1) may involve initializing the state vector with the initial estimates, setting the measurement noise, and setting an initial covariance matrix based on a priori information. The performing (386.2.2) the extended or unscented Kalman filtering may involve computing a priori estimates of a covariance matrix, computing a Kalman gain, computing a priori state estimates, computing a posterior state estimate, computing a posterior covariance matrix, repeating the computing of the priori estimate of the covariance matrix, and obtaining the final estimate values of the states.

**[0065]**The EKF (386.1) may involve providing a stochastic estimate, such as a Kalman filter, to remove error. The Kalman filter may involve initializing a state vector based on the coarse estimates, setting the measurement noise based on the noise variance, and setting an initial covariance matrix based on prior information.

**[0066]**The Kalman filter may then be used to estimate the damping factor and the frequency, at every sampling time. Kalman filters are provided, for example, in "Applied Optimal Estimation," Technical Staff: The Analytic Sciences Corporation, edited by Arthur Gelb, The MIT Press, (1989). Various Kalman filters may be used to overcome the non-linear measurement equation. A first extended Kalman filter employing a first order partial derivative of the measurement matrix with respect to the state variables, a second extended Kalman filter employing second order partial derivative of the measurement matrix with respect to the state variables, or an unscented Kalman filter employing sigma points may be used.

**[0067]**The coarse estimates of the viscometer parameters (e.g., initial voltage, the frequency, the damping factor, and noise amplitude) may be input into a Kalman filter as initial coarse values. The accuracy of these measurements may be used for an initial covariance matrix as uncertainty of the initial values. This uncertainty can be, for example, from about several percentages to about ten percentages. The measurement analog circuits may not require high accuracy. The Kalman filter may be used to address remaining errors for better accuracy.

**[0068]**The Kalman filter may be designed to model the output 237 of the viscometer 30 (e.g., FIG. 2.2) into a linear dynamic system using the following:

**V**(t)=Ae.sup.-λt cos(θ(t) Eqn. (12)

**where A**=amplitude, λ=Δω=damping factor, and θ=(ωt+φ0)=angle. The phase and the frequency have been combined into the angle. The decrement and the frequency have been combined into the damping factor. The number of estimate parameters may be reduced to the extent possible to eliminate unnecessary estimation efforts and/or latent accuracy for necessary parameters to estimate such unnecessary parameter values.

**[0069]**In this model, the measurement equation may be non-linear. There are various non-linear Kalman filters that may be used with non-linear models. The Kalman filter may be selected, for example, based on their performances depending on severity of non-linearity of the model and computation cost. Taking account of computation downhole, the simplest one may be chosen first, which is the first-order extended Kalman filter.

**[0070]**The model system of Kalman filter consists of two parts: 1) the system equation, and 2) the measurement equation. The system equation may be based on the following:

**x**. = [ θ . ω . A . λ . ] = f x = [ 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ] [ θ ω A λ ] Eqn . ( 13 ) ##EQU00002##

**where state vector x**=[θ ω A λ]

^{T}and the dot on the top of each variable implies a time derivative. Equation (20) indicates that time derivative of the angle is equivalent to angular frequency and that others are constant in time. This equation plays a role of constraints in the estimation process.

**[0071]**The system equation may be based on the following:

**y**=h(x)=Ae.sup.-λt cos(θ)+w Eqn. (14)

**where w is a white noise amplitude**. Equation (14) is non-linear and may be linearized using a Taylor expansion series. The first order term in the expansion series may be taken using the following:

**δ y = δ y δ x δ x = [ δ y δ θ δ y δ ω δ y δ A δ y δ λ ] [ δ θ δ ω δ A δ λ ] Eqn . ( 15 ) ##EQU00003##**

**[0072]**The observability (Ξ) of the dynamic system suggests that the number of estimate variables is too much for the available measurement. The observability condition has a rank of four. However, the rank of Ξ is two as indicated by the observability matrix below:

**Ξ = [ ∂ y T ∂ x ∂ y T ∂ x f ∂ y T ∂ x f 2 ∂ y T ∂ x f 3 ] Eqn . ( 16 ) ##EQU00004##**

**This non**-observability may be compensated by posing constraints of the initial values of each parameter.

**[0073]**The Estimated Kalman Filter (EKF) may then be initialized by selecting a vector using the following:

**x**

_{0}[θ

_{0}ω

_{0}A

_{0}λ

_{0}]

^{T}Eqn. (17)

**[0074]**An initial covariance matrix, P

_{0}(uncertainty of x

_{0}) may then be selected using the following:

**P**

_{0}=E((x

_{0}-{circumflex over (x)}(x

_{0}-{circumflex over (x)})

^{T}) Eqn. (18)

**where x is a state vector**, {circumflex over (x)} is a true value, and E implies an averaging operation.

**[0075]**Using Eqns. (17) and (18), a Kalman loop may be processed to obtain a final estimate of the state vector (x). The Kalman loop may involve providing system and measurement equations, determining a Kalman gain (K), determining a prior state estimate (x

_{k}.sup.-), determining a posterior state estimate (x

_{k}.sup.+), determining a posterior covariance matrix (P

_{k+1}.sup.+), and repeating until final estimated values of the states are achieved.

**[0076]**FIGS. 6-17 depict application of the methods to various cases. For each of the cases, signals (e.g., 273 of FIG. 2.2) were synthesized based on actual data with signal characteristics as set forth in Table 1 below:

**TABLE**-US-00001 TABLE 1 Variable Amount Number of Cycles 2~200 Number of data points in a cycle ~20 S/N Ratio 32~40 dB Frequency 0.8~6 kHz Decrement 0.001~0.2 Viscosity 0.1~200 mPa sec

**One hundred**(100) time Monte Carlo simulations were conducted to evaluate the estimate error. In every simulation, white noise was added to a theoretical signal.

**[0077]**FIGS. 6.1-8.4 depict a first case involving a relatively low viscosity fluid. In this case, the fluid has a viscosity of 3 mPa-sec; frequency=1.3 kHz; decrement=0.02; S/N ratio=32 dB; sampling frequency=26 kHz. FIG. 6.1 shows a graph 600 of a signal (O) (y-axis) over time (t) (x-axis). The graph 600 depicts synthesized data plotted with the true signal (without noise) and the estimate result. FIG. 6.2 is a close up view of a portion 6.2 of the graph 600 of FIG. 6 depicting the true 600.1, true+noise 600.2, and estimated 600.3 curves in greater detail.

**[0078]**FIGS. 7.1-7.5 are plots 700.1-700.5 of estimated errors for each of the viscosity parameters, namely viscosity, angle, damping factor, amplitude, and phase, for the signal of FIG. 6. In each plot, the dot-lines represent theoretical standard deviations calculated in the Kalman filtering and the square line represents the estimate error. These plots indicate that each viscosity parameter estimate converges relatively quickly, for example, in about a half of the graph's data length.

**[0079]**FIGS. 8.1 and 8.2 are histograms 800.1 and 800.2 of estimated errors of ω

_{e}and λe, respectively. The errors of ωb and λb of the base method are also shown in histograms 800.3, 800.4 of FIGS. 8.3 and 8.4, respectively, for comparison. The graphs 8.1-8.2 of the alternative method indicate a narrower error distribution than that of the base method depicted in graphs 8.3-8.4.

**[0080]**FIGS. 9-11.4 depict a second case involving a relatively high viscosity fluid. In this case, the fluid has operating parameters including a viscosity=200 mPa-sec; frequency=1.45 kHz; decrement=0.2; S/N ratio=32 dB; sampling frequency=29 kHz. FIG. 9.1 shows a graph 900 of a signal (y-axis) over time (x-axis). The plot 900 depicts synthesized data plotted with the true signal (without noise) and the estimate result.

**[0081]**FIGS. 10.1-10.5 are plots 1000.1-1000.5 of estimated errors for each of the viscosity, angle, damping factor, amplitude, and phase is plotted for the signal of FIG. 9. These plots indicate that each state estimate converges relatively quickly, for example, in about a half of the graph's data length. In each plot, the dot-lines represent theoretical standard deviations calculated in the Kalman filtering and the square line represents the estimate error.

**[0082]**FIGS. 11.1 and 11.2 are histograms 1100.1 and 1100.2 of estimated errors of ωe and λe, respectively. The errors of ωb and λb of the base method are also shown in histograms 1100.3, 1100.4 of FIGS. 11.3 and 11.4, respectively, for comparison. The graphs 11.1-11.2 of the alternative method indicate a narrower error distribution than that of the base method depicted in graphs 11.3-11.4.

**[0083]**To enhance accuracy, the approximation of FIGS. 9-11 may be extended up to the second order in a Taylor expansion series based on the following:

**y**= ∂ y ∂ x x + 1 2 x T ∂ 2 y ∂ x 2 x = [ ∂ y ∂ θ ∂ y ∂ ω ∂ y ∂ A ∂ y ∂ λ ] [ θ ω A λ ] + 1 2 [ θ ω A λ ] [ ∂ 2 y ∂ θ 2 ∂ 2 y ∂ ω ∂ θ ∂ 2 y ∂ A ∂ θ ∂ 2 y ∂ λ ∂ θ ∂ 2 y ∂ θ ∂ ω ∂ 2 y ∂ ω 2 ∂ 2 y ∂ A ∂ ω ∂ 2 y ∂ λ ∂ ω ∂ 2 y ∂ θ ∂ A ∂ 2 y ∂ ω ∂ A ∂ 2 y ∂ A 2 ∂ 2 y ∂ λ ∂ A ∂ 2 y ∂ θ ∂ λ ∂ 2 y ∂ ω ∂ λ ∂ 2 y ∂ A ∂ λ ∂ 2 y ∂ λ 2 ] [ θ ω A λ ] Eqn . ( 19 ) ##EQU00005##

**[0084]**A second-order extended Kalman filter may be applied to the synthetic data of FIGS. 8-11 to generate the results as shown in FIGS. 12.1-14.4. FIGS. 12.1-14.4 depict an extension of the second case involving a relatively high viscosity fluid using the same operating parameters. FIG. 12.1 shows a graph 1200 of a signal (y-axis) over time (t) (x-axis). The graph 1200 depicts synthesized data plotted with the true signal (without noise) and the estimate result. FIG. 12.2 is a close up view of a portion 12.2 of the graph 1200 of FIG. 12 depicting the true 1200.1, measurement 1200.2, and estimated 1200.3 curves in greater detail.

**[0085]**FIGS. 13.1-13.5 are plots 1300.1-1300.5 of estimated errors for each of the viscosity, angle, damping factor, amplitude, and phase are plotted. These plots indicate that each state estimate converges relatively quickly, for example, in about a half of the graph's data length. In each plot, the dot-lines represent theoretical standard deviations calculated in the Kalman filtering and the square line represents the estimate error.

**[0086]**FIGS. 14.1 and 14.2 are histograms 1400.1 and 1400.2 of estimated errors of we and λe, respectively. The errors of ωb and λb of the base method are also shown in histograms of FIGS. 14.3 and 14.4, respectively, for comparison. FIGS. 14.1-14.2 of the alternative method indicate a narrower error distribution than that of the base method depicted in the histograms 1400.3, 1400.4 of FIGS. 14.3-14.4 and the alternative methods of graphs 13.1-13.4. The results also indicate that the error distributions are located symmetrically about zero error with no offset.

**[0087]**Accuracy of prior information may be relaxed by introducing another independent measurement in Eqn. (21), such as a signal in off phase, to the existing signal of Eqn. (20) as indicated below:

**V**(t)=V

_{0}e.sup.-λt cos(θ(t)) Eqn. (20)

**V**(t)=V

_{0}e.sup.-λt sin(θ(t)) Eqn. (21)

**[0088]**The new independent measurement may be used to increase the rank of the matrix (Ξ) (Eqn. (23)), and to improve the observability of the dynamic system. The rank of the matrix may also be increased by reducing the number of estimate states. For example, if the signal amplitude (V

_{0}) is measured with hardware, the number of estimate states may be reduced by one. This may also be used to improve the observability.

**[0089]**FIGS. 15-17.4 depicts the second case of FIGS. 9-11 with the additional independent measurement and with the same operating parameters. FIG. 15.1 shows a graph 1500 of a signal (y-axis) over time (x-axis). The plot 1500 depicts synthesized data plotted with the true signal (without noise), the measurement, and the estimate result.

**[0090]**FIGS. 16.1-16.5 are plots 1600.1-1600.5 of estimated errors for each of the viscosity, angle, damping factor, amplitude, and phase is plotted for the signal of FIG. 15. These plots indicate that each state estimate converges relatively quickly, for example, in about a half of the graph's data length. In each plot, the dot-lines represent theoretical standard deviations calculated in the Kalman filtering and the square line represents the estimate error.

**[0091]**FIGS. 17.1 and 17.2 are histograms of estimated errors of ωe and λe, respectively. The errors of ωb and λb of the base method are also shown in histograms of FIGS. 17.3 and 17.4, respectively, for comparison. The graphs 17.1-17.2 of the alternative method indicate a narrower error distribution than that of the base method depicted in graphs 17.3-17.4.

**Validating**

**[0092]**Referring back to FIG. 3, numerical simulations using the Kalman loop may be performed to generate the final estimated viscosity parameters, and the results validated (388) with other estimates for verification. Validating (388) the estimated viscosity parameters may involve 388.1--estimating the viscosity parameters using signal modulation, and 388.2--comparing the viscosity parameters estimated using the signal modulation (388.1) with the viscosity parameters generated using the Kalman Filtering (382).

**[0093]**The signal modulation estimation (388.1) involves 388.1.1--modulating the signal 237, 388.1.2--filtering the signal 237, and 388.1.3, 388.1.4--determining viscosity parameters (e.g., frequency, phase, decrement and amplitude) from the signal 237. The modulating (388.1.1) may involve modulating sine/cosine of the signal 237. The filtering (388.1.2) may involve low pass filtering using, for example, low pass filter 272. The determining (388.1.3, 388.1.4) may involve determining frequency and phase, and determining decrement and amplitude.

**[0094]**The voltage signals 237 of the damping vibration are measurable to compute fluid viscosity using, for example, Faraday's law. Viscosity may be determined, for example, using a least squares calculation. Examples of viscosity calculations are provided in US2010/0241407, previously incorporated by reference herein.

**[0095]**The attenuation signal 237 may be modeled as a function of time based on the following:

**V**(t)=Ae.sup.-Δωt cos(ωt+φ

_{0}) Eqn. (22)

**where V**=signal, t=time, A=amplitude, Δ=decrement, ω=angular frequency, and φ0=phase. Attenuation may be determined by performing modulation, filtering, determining frequency and phase, and determining decrement and amplitude. The modulation may be sine/cosine modulation involve multiplying the signal 237 by an oscillation with the reference frequency (ωref) as follows:

**x**( t ) = A - Δ ω t cos ( ω t + φ ) sin ( ω ref t ) = 1 2 A - Δ ω t { sin [ ( ω - ω ref ) t + φ ] + sin [ ( ω + ω ref ) t + φ ] } Eqn . ( 23 ) y ( t ) = A - Δ ω t cos ( ω t + φ ) cos ( ω ref t ) = 1 2 A - Δ ω t { cos [ ( ω - ω ref ) t + φ ] - cos [ ( ω + ω ref ) t + φ ] } Eqn . ( 24 ) ##EQU00006##

**The reference frequency**(ωref) may be chosen to be a difference between the detected frequency (ω) and a second notch of the low pass filter 272.

**[0096]**Filtering (388.1.2) may be low pass filtering involving selective removal of portions of the signal 237 using, for example, the low pass filter 272. The modulated signal 237 consists of a low-frequency component and a high-frequency component. The high-frequency component may be removed with the low pass-filter 272. The cut-off frequency of the low pass filter 272 may be selected to be the measured resonance frequency based on the following:

**x**' ( t ) = 1 2 A - Δ ω { sin [ ( ω - ω ref ) t + φ ] } 0 0 Eqns . ( 25 ) y ' ( t ) = 1 2 A - Δ ω { cos [ ( ω - ω ref ) t + φ ] - 0 0 Eqns . ( 26 ) ##EQU00007##

**[0097]**A resonance frequency and phase may be determined (388.1.3) from an arctangent of x' and y' based on the following:

**tan**- 1 ( y ' x ' ) = ( ω - ω ref ) t + φ Eqn . ( 27 ) ##EQU00008##

**[0098]**The resonant frequency (ω) and the phase (φ) may be estimated using the method of least squares as depicted in FIG. 4.1. FIG. 4.1 is a graph 400.1 depicting the arctangent of y'/x' over time (t). Slope (ω-ωref) of a fitting line 486.1 and the y-interception give the phase (φ) for the graph 400.1.

**[0099]**The decrement (Δ) and the amplitude (A) may be estimated (388.1.4) using a logarithmic graph as depicted in FIG. 4.2. FIG. 4.2 is a graph 400.2 depicting the decrement (A) over time (t). The decrement (Δ) and the amplitude (A) of the signal may be calculated from a logarithmic graph of the norm of x' and y' based on the following:

**Δ = ln ( x ' 2 + y ' 2 ) = - Δ ω t + ln ( A 2 ) Eqn . ( 28 ) ##EQU00009##**

**[0100]**The slope (Δω) of a fitting line 486.2 is equivalent to the product of the decrement (Δ) and the amplitude (A). A y-interception of the fitting line 486.2 may be used to determine the amplitude (A). The base method may be used to provide estimates of the viscometer parameters, such as resonant frequency (ω), the phase (φ), decrement (Δ), and the amplitude (A).

**[0101]**Referring back to FIG. 3, the extended estimating 388.1 may be used to remove error. Various errors in the signal may occur, for example, due to signal noises, computation result errors, high viscosity downhole fluids, few available oscillation cycles, noise amplitudes, etc. In an example, few oscillations may result from quick attenuation of the signal quickly attenuates below noise amplitudes, and/or the number of data points may be too few to retain sufficient accuracy in the method of least squares. The Kalman filtering method (382) may optionally be used where accuracy may be reduced, for example, with high viscosity fluids, attenuation may be too strong to obtain enough oscillation cycles, and/or where the signal attenuates quickly down below a noise amplitude.

**[0102]**The Kalman filtering method (382) may be used to determine various viscosity parameters, such as damping factor, decrement (Δ), frequency (ω), amplitude (A), and phase (φ). In some cases, the amplitude (A) and the phase (φ) may not be necessary parameters for estimating viscosity, and decrement (Δ) and frequency (ω) may be necessary parameters. The viscosity parameters may be estimated. For example, a set of the frequency and phase may be estimated with a set of the decrement and the amplitude. This implies that an error budget may be shared by the parameters. A latent accuracy of necessary parameters, decrement (Δ) and frequency (ω) may be implied.

**[0103]**Various methods, such as the estimating 382, 388.1 may be used to estimate the various viscosity parameters. Estimates made using the various methods provided herein may be compared 388.2 for further analysis. Differences in the estimates may indicate a problem with measurements, calculation, assumptions or other issues. The comparisons may be used to provide alerts of potential problems in the operation or methods used herein. Based on the validating (388), adjustments (390) may be selectively made to the operations, such as the frequency used for measurement with the viscometer (e.g., 150 of FIG. 2.2).

**[0104]**Plural instances may be provided for components, operations or structures described herein as a single instance. In general, structures and functionality presented as separate components in the exemplary configurations may be implemented as a combined structure or component. Similarly, structures and functionality presented as a single component may be implemented as separate components. These and other variations, modifications, additions, and improvements may fall within the scope of the inventive subject matter.

**[0105]**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. In the claims, means-plus-function clauses are intended to cover the structures described herein as performing the recited function and not only structural equivalents, but also equivalent structures. Thus, although a nail and a screw may not be structural equivalents in that a nail employs a cylindrical surface to secure wooden parts together, whereas a screw employs a helical surface, in the environment of fastening wooden parts, a nail and a screw may be equivalent structures. It is the express intention of the applicant not to invoke 35 U.S.C. §112, paragraph 6 for any limitations of any of the claims herein, except for those in which the claim expressly uses the words `means for` together with an associated function.

User Contributions:

Comment about this patent or add new information about this topic: