# Patent

## Title
Method and apparatus for chemometric estimations of fluid density, viscosity, dielectric constant, and resistivity from mechanical resonator data

## Abstract

The present invention provides a chemometric equation to estimate fluid density, viscosity, dielectric constant and resistivity for a formation fluid sample downhole. The chemometric estimates can be used directly as estimated values for fluid density, viscosity, dielectric constant and resistivity for a formation fluid sample downhole. The chemometric estimates can also be plugged into a Levenberg-Marquardt (LM) non-linear least squares fit, as an initial estimate of the parameter to be estimated by the LM fit. If the initial parameter estimate is too far from the actual parameter values, the LM algorithm may take a long time to converge or even fail to converge entirely. The present invention estimates an initial value of a parameter that provides a high probability that the LM algorithm will converge to a global minimum.

## Background
CROSS REFERENCE TO RELATED APPLICATIONS
The patent application is a continuation in part and claims priority from U.S. patent application Ser. No. 10/144,965 filed on May 14, 2002 now U.S. Pat. No. 6,938,470 entitled “Method and Apparatus for Downhole Fluid Characterization Using Flexural Mechanical Resonators” by Rocco DiFoggio which is incorporated herein by reference and claims priority from U.S. patent application Ser. No. 60/291,136 filed on May 15, 2001 entitled “Method and Apparatus for Downhole Fluid Characterization Using Flexural Mechanical Resonators” by Rocco DiFoggio.


BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to the field of downhole fluid analysis in hydrocarbon producing wells. More particularly, the present invention relates to a method and apparatus for using a chemometric equation to estimate fluid density, viscosity, dielectric constant, and resisitivity from flexural mechanical resonator data obtained downhole in a borehole during monitoring while drilling or during wireline operations.
2. Background of the Related Art
There is considerable interest in measuring density, viscosity, dielectric constant, resistivity and other parameters for formation fluids. It is particularly useful to perform these measurements downhole at reservoir conditions of high temperature and high pressure during formation sampling, producing or drilling operations. Numerous technologies have been employed toward the end of measuring fluid parameters such as viscosity downhole. U.S. Pat. No. 6,182,499 discusses systems and methods for characterization of materials and combinatorial libraries with mechanical oscillators. U.S. Pat. No. 5,734,098 (the '098 patent) discusses a method for monitoring and controlling chemical treatment of petroleum, petrochemical and processes with on-line quartz crystal microbalance sensors. The '098 patent invention utilizes thickness shear mode (TSM) resonators, which simultaneously measure mass deposition and fluid properties such as viscosity and or density of a fluid. U.S. Pat. No. 6,176,323 (the '323 patent) discloses drilling systems with sensors for determining properties of drilling fluid downhole. The '323 patent discloses a plurality of pressure sensors positioned at different depths to determine a fluid gradient. U.S. Pat. No. 5,741,962 (the '962 patent) discloses a method and apparatus for analyzing a formation fluid using acoustic measurements.
The '962 patent invention acoustically determines density and compressibility from acoustic impedance and sound speed. U.S. Pat. No. 5,622,223 (the '223 patent) discloses a method and apparatus for characterizing formation fluid samples utilizing differential pressure measurements. The '223 patent discloses an apparatus that provides two pressure gauges at different depths to determine density from a fluid pressure gradient. U.S. Pat. No. 5,006,845 describes an invention that uses differential fluid pressure at two depths to determine fluid density. U.S. Pat. No. 5,361,632 discloses a method and apparatus for determining multiphase hold up fractions using a gradiometer and a densiometer to provide a pressure gradient to determine fluid density. U.S. Pat. No. 5,204,529 discloses a method and apparatus for measuring borehole fluid density, formation density and or borehole diameter using back-scattered gamma radiation to determine fluid density.
Flexural mechanical resonators have been used in the laboratory for rapid characterization of large numbers of fluid samples. See L. F. Matsiev, Application of Flexural Mechanical Resonator to High Throughput Liquid Characterization, 2000 IEEE International Ultrasonics Symposium, Oct. 22-25, 2000 San Juan, Puerto Rico, incorporated herein by reference in its entirety; L. F. Matsiev, Application of Flexural Mechanical Resonator to High Throughput Liquid Characterization, 1999 IEEE International Ultrasonics Symposium, Oct. 17-20, Lake Tahoe, Nevada, incorporated herein by reference in its entirety; L. F. Matsiev, Application of Flexural Mechanical Resonator to High Throughput Liquid Characterization, 1998 IEEE International Ultrasonics Symposium, Oct. 5-8, 1998, Sendai, Miyagi, Japan, incorporated herein by reference in its entirety.
The use of mechanical resonators are described in U.S. Pat. No. 6,455,316 B1 which is incorporated herein by reference in its entirety; U.S. Pat. No. 6,393,895 B1 which is incorporated herein by reference in its entirety; U.S. Pat. No. 6,336,353 B2 which is incorporated herein by reference in its entirety; U.S. patent Publication No. 2003/0041653 A1 which is incorporated herein by reference in its entirety; U.S. patent Publication No. 2003/0000291 A1 which is incorporated herein by reference in its entirety; U.S. Pat. No. 6,401,591 B2 which is incorporated herein by reference in its entirety; and U.S. Pat. No. 6,6,528,026 B2 which is incorporated herein by reference in its entirety.
An example of a method and apparatus for determining down fluid characteristics using flexural mechanical resonators is described in the parent application, U.S. patent application Ser. No. 10/144,965 filed on May 14, 2002 entitled “Method and Apparatus for Downhole Fluid Characterization Using Flexural Mechanical Resonators.” (the '965 patent application). The '965 patent application describes a method or apparatus utilizing a flexural mechanical resonator to determine density, viscosity or other fluid properties in a downhole environment. An example of a suitable algorithm for use in association with the method and apparatus described in the '965 patent application is a Levenberg-Marquardt (LM) non-linear least squares fit. The LM fit uses an initial estimate for determination of a fluid parameter. If the initial parameter estimate is too far from the actual parameter values, the LM algorithm may take a long time to converge or fail to converge at all. Thus, there is a need for a method and apparatus for accurately estimating the initial parameter inputs for the LM algorithm in determining fluid parameters.
SUMMARY OF THE INVENTION
The present invention provides chemometric equations to estimate fluid properties such as density, viscosity, dielectric constant and resistivity for a formation fluid sample in real time downhole from impedance-versus-frequency data of a mechanical resonator immersed in the fluid. These chemometric estimates can be used directly as estimates of fluid density, viscosity, dielectric constant and resistivity for a downhole formation fluid sample. The chemometric estimates also can be used as initial estimates of these parameters in a Levenberg-Marquardt (LM) iterative non-linear least squares fit of the theoretical model to the measured data. Good initial estimates are important to LM fits because, if the initial parameter estimates are too far from the actual parameter values, the LM algorithm may take a long time to converge or may fail to converge at all. The present invention provides an initial estimate of a parameter to the LM algorithm that results in a high probability that the LM algorithm will converge to a proper global minimum.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a schematic diagram of a exemplary embodiment of the present invention deployed on a wireline in a downhole environment;
FIG. 2 is a schematic diagram of an exemplary embodiment of the present invention deployed on a drill string in a monitoring while drilling environment;
FIG. 3 is a schematic diagram of a exemplary embodiment of the present invention deployed on a flexible tubing 13 in a downhole environment;
FIG. 4 is a schematic diagram of an exemplary embodiment of the present invention as deployed in a wireline downhole showing a cross section of a wireline formation tester tool;
FIG. 5 is an illustration of an example of the present invention showing a flow line and an associated resonator;
FIG. 6 is a flow chart of functions performed in an example of the present invention;
FIG. 7 lists some chemometric correlations to synthetic fluid parameter data;
FIG. 8 lists some additional chemometric correlations to synthetic fluid parameter data;
FIG. 9 is a conceptual comparison of the Levenberg-Marquardt non-linear least squares fit method to the chemometrics approach. The two methods can be used alone or in combination, with chemometrics providing the initial guesses for the LM fitting;
FIG. 10 shows the dominant effects of fluid properties on various features of the impedance plot of a tuning fork immersed in a fluid;
FIG. 11 shows a typical synthetic impedance plot used in this invention with the data plotted every 12.5 Hz;
FIG. 12 shows the numerical first derivative of the FIG. 11 curve as calculated by the Savitzky-Golay formula, (xm−2−8xm−1+8xm+1−xm+2)/12, for every 5 consecutive points, xm−2 to xm+2. The coefficient for xm is zero; and
FIG. 13 shows the numerical second derivative of the FIG. 11 curve as calculated by the Savitzky-Golay formula, (2xm−2−xm−1−2xm−xm+1+2xm+2)/7, for every 5 consecutive points, xm−2 to xm+2. 



DETAILED DESCRIPTION OF AN EXEMPLARY EMBODIMENT
The present invention provides a chemometric equation to estimate fluid density, viscosity, dielectric constant, and resistivity for a formation fluid sample downhole from the impedance-versus-frequency data of a mechanical resonator. The chemometric estimates can be used directly or as initial parameter estimates in a Levenberg-Marquardt (LM) non-linear least squares fit of the theoretical model to the measured data. Good initial estimates are important to LM fits because, if the initial parameter estimate is too far from the actual parameter values, the LM algorithm may take a long time to converge or fail to converge at all.
The parent '965 patent application describes a downhole method and apparatus using a mechanical resonator, for example, a tuning fork to provide real-time direct measurements and estimates of the viscosity, density and dielectric constant for formation fluid or filtrate in a hydrocarbon producing well.
The present invention enhances the implementation of a resonating tuning fork downhole used to estimate fluid density, viscosity, dielectric constant and resistivity. Mechanical resonators respond to the product of the density and viscosity of a fluid into which they are immersed. Symyx Technologies Incorporated of Santa Clara, Calif. has developed a model for a miniature tuning fork resonator, which, in combination with a non-linear least squares fit, enables separate determination of density and viscosity of fluid, rather than merely the product of these two properties. Prior resonators could only determine the product of density and viscosity and thus viscosity or density could not be independently determined. The present invention provides a tuning fork or flexural resonator, which is excited, monitored and its response processed using a chemometric equation or the combination of a chemometric equation and a LM non-linear least squares fit. The processing determines not only the density and viscosity of a fluid, but also the dielectric constant, resistivity and other parameters of a fluid downhole.
The present example of the invention is implemented using a resonating tuning fork downhole to estimate fluid density, viscosity, dielectric constant, and resistivity. The present invention measures the impedance versus frequency (impedance spectrum) for a flexural mechanical resonator in the vicinity of its resonant frequency. To convert this direct measurement to density, viscosity, dielectric constant and resistivity, the present invention determines a best fit between a theoretical spectrum and the measured impedance spectrum for the resonator, e.g., tuning fork, using a Levenberg-Marquardt (LM) nonlinear least squares fit algorithm. The fitting parameters provide density, viscosity, dielectric constant and resistivity values. If the initial parameter value estimates for the fitting parameters are too far from the actual parameter values, the LM fitting algorithm may take a long time to converge or may fail to converge entirely. Even if the LM algorithm does converge, it may converge to a local minimum rather than a global minimum. When logging a well in real time, the operator does not want to wait a long time for an answer nor does the operator want the algorithm to converge to the wrong answer at a local rather than a global minimum.
The present invention computes a result quickly, uses less computing resources and thus provides more useful and accurate initial estimates for the LM fitting parameters. The initial estimates provided by the present invention are robust, they do not require iteration, and they are quickly computed. The present invention uses chemometrics to obtain the initial estimates of fitting parameters. These chemometric estimations can then be used directly as estimates of a fluid parameter value or property or provided to the LM algorithm. The chemometric estimations provided to the LM algorithm provide a high probability of allowing the LM algorithm to converge quickly to the correct global minimum for the fluid parameter value estimation.
Traditional chemometrics can be defined as multiple linear regressions (MLR), principle components regressions (PCR), or partial least squares (PLS). Chemometrics can be applied either to an original data set or to a preprocessed version of the original data such as a Savitzky-Golay (SG) smoothed curve or its derivatives. When using these traditional chemometric techniques, the property-prediction equation is usually just an offset constant plus the dot product of a weights vector with the measured resonator impedance spectrum. This is a straightforward calculation that requires a relatively small amount of computer time as the calculation is non-iterative. However, chemometric equations can also be based on minimum, maximum, or zero-crossing values or other similarly derived properties of the data. In some cases, the chemometric predictions or the fits to the synthetic data are sufficiently accurate to use directly without going to the second step of applying a LM fitting algorithm.
FIG. 1 is a schematic diagram of an exemplary embodiment of the present invention deployed on a wireline in a downhole environment. As shown in FIG. 1, a downhole tool 10 containing a mechanical resonator assembly 410 is deployed in a borehole 14. The borehole is formed in formation 16. Tool 10 is deployed via a wireline 12. Data from the tool 10 is communicated to the surface to a computer processor 20 with memory inside of an intelligent completion system 30. FIG. 2 is a schematic diagram of a exemplary embodiment of the present invention deployed on a drill string 15 in a monitoring while drilling environment. FIG. 3 is a schematic diagram of an exemplary embodiment of the present invention deployed on a flexible tubing 13 in a downhole environment.
FIG. 4 is a schematic diagram of an exemplary embodiment of the present invention as deployed from a wireline downhole environment showing a cross section of a wireline formation tester tool. As shown in FIG. 4, the tool 416 is deployed in a borehole 420 filled with borehole fluid. The tool 416 is positioned in the borehole by backup arms 417. A packer with a snorkel 418 contacts the borehole wall for extracting formation fluid from the formation 414. Tool 416 contains mechanical resonator assembly 410 disposed in flow line 426. The mechanical resonator 411 or oscillator, shown in FIG. 5 as a tuning fork is excited by an electric current applied to its electrodes (not shown). The resonator response is monitored to determine density, viscosity, dielectric coefficient and resistivity of the formation fluid. Pump 412 pumps formation fluid from formation 414 into flow line 426. Formation fluid travels through flow line 424 into valve 420, which directs the formation fluid to line 422 to save the fluid in sample tanks or to line 417 where the formation fluid exits to the borehole. The present invention uses the response tuning fork to determine fluid density, viscosity and dielectric coefficient while fluid is pumped by pump 412 or while the fluid is static, that is, when pump 412 is stopped.
FIG. 5 is an illustration of an example of the present invention mechanical resonator assembly 410 showing a flow line 426 and an associated resonator 411. The resonator 411, in this case a mechanical resonating tuning fork is attached to an actuator and monitoring circuitry 450 by wires 451. The actuator and monitor circuitry 450 is associated with a processor 452. The processor 452 comprises memory, data input output capability and a central processing unit. The actuator and monitor circuitry 450 and associated processor 452 actuate the resonator associated with the fluid and measure the impedance versus frequency spectrum for the resonator associated with the fluid.
If the probe 418 is pulled away from the bore hole wall the fluid entering the tool is well bore fluid rather than formation fluid. Thus, the fluid can come from the formation or from the well bore. The processor performs a function which applies derived chemometric equations to the resonator's measured impedance versus frequency spectrum associated with the fluid to determine the fluid's viscosity, density, dielectric constant, resistivity and other fluid parameters for which chemometric equations are derived. The chemometrically determined fluid parameter values are used directly for an estimation of the fluid's viscosity, density, dielectric constant, resistivity and other fluid parameters. The chemometrically determined fluid parameter values are also used as input to the LM algorithm as an initial estimation of the fluid's viscosity, density, dielectric constant, resistivity and other fluid parameters.
Turning now to FIG. 6. an illustration is shown of exemplary functions performed in part as a computer programmed set of functions performed by the processor 452 in the present invention. In block 610, the present invention performs the function of creating a synthetic data training set for resonator response (impedance versus frequency) when the resonator is immersed in various fluids. This is done in accordance with the principles of experimental design using several values (e.g., high, medium, and low value) for each fluid property (viscosity, resistivity, density and dielectric constant). In block 620 the present invention performs the function of creating chemometric equations that correlate fluid properties to impedance versus frequency for this training set of synthetic data. Examples of chemometric correlations are shown FIGS. 7A-7F (correlations to density and viscosity 702, 704, 706, 708, 710 and 712) and in FIG. 8 (correlations to dielectric constant and conductivity 803, 809, 806 and 808 and variable definitions 810). In block 630 the present invention performs the function of applying these chemometric equations to measured resonator response so as to estimate fluid properties such as viscosity, density, dielectric constant, resistivity and other properties. These fluid parameter values, which are determined by the chemometric equations in block 630, are used directly as the final fluid property values. In block 640, the present invention performs the function of using these chemometric estimates as the starting values for a Levenberg-Marquardt non-linear least-squares fit, which in turn generates the final fluid property values. The LM algorithm function runs on processor 452 and outputs fluid parameter values.
FIGS. 7A-7F and 8A-8E illustrate correlations to a synthetic data set that were prepared using a 3-level experimental design and a theoretical model for a resonator's impedance spectrum as a function of the fluid's density, viscosity, dielectric constant and resistivity. This synthetic data set included all 81 combinations of three levels of four fluid properties, density (0.5, 1.0, and 1.5 g/cc), viscosity (0.5, 2.0, and 3.5 cPs), dielectric constant (1.5, 16, and 30), and resistivity (104, 105, and 106 ohm-meters). These levels were chosen to provide extremes of these properties that are not likely to be encountered in downhole fluids, thereby insuring that the resulting models are interpolating rather than extrapolating when applied to downhole fluids. One example of a suitable resonator is a small tuning fork, approximately 2 mm×5 mm. This tuning fork resonator inexpensive and has no macroscopically moving parts. The tuning forks can operate at elevated temperature and pressure and enables a more accurate method of determining the characteristic of a downhole fluid, than other known methods.
FIG. 9 is a conceptual comparison of applying a chemometric model to experimental data instead of performing an iterative LM non-linear least squares fit to the same data to determine the best-fit parameters. In this example, we assume that the experimental data is described by a theoretical model having the form of a parabola, Y=P1*(X−P2)2+P3. The LM method starts with guesses for the three parameters, narrowness of parabola (P1), height above X-axis (P2), and distance of the parabola's axis of symmetry from Y-axis (P3). Then, LM iterates until its corresponding parabolic curve 802 most closely overlays the experimental data points 804.
When a chemometric equation is available, applying it is both quicker and simpler than an iterative approach. In this example, the X and Y values of the lowest experimental data point are P2 and P3, respectively, and P1 simply equals one-half of the second derivative of these data points. Because the data points are evenly spaced along the X-axis, a 5-consecutive-point numerical second derivative can be obtained by standard Savitzky-Golay methods (A. Savitzky and M. Golay, “Smoothing and Differentiation of Data by Simplified Least Squares Procedures,” Anal. Chem. vol. 36, No. 8, July, 1964, pp. 1627-1639). Then, P1=(2xm−2−xm−1−2xm−xm+1+2xm+2)/14, where xm−2 to 2xm+2 are five consecutive experimental data points, preferably ones near the minimum of the parabola where experimental error would have the least effect on the calculated value of P1. 
Typically one fluid property dominates over the other properties in its influence on a particular feature of the impedance plot of a tuning fork immersed in a fluid. Therefore, we can make rough qualitative assessments of fluid properties from a simple visual inspection of the features of such plots.
FIG. 10 illustrates these dominant effects. The higher the density of the fluid, the lower the resonant frequency of the fork, so the further left that the resonant peak, 1004, appears. The higher the viscosity of the fluid, the smaller the amplitude, 1006, of the reciprocal impedance swing from the resonance peak to the anti-resonance valley. The higher the dielectric constant or conductivity of the fluid, the more that the average reciprocal impedance, 1002, rises within the same frequency range.
Unfortunately, these are only the dominant effects. Each property of the fluid has an effect on every characteristic feature in the impedance plot. Therefore, to obtain quantitative values for the properties of the fluid, the example of the present invention applies chemometrics and/or a non-linear least squares fit to the impedance data as explained in this invention.
To help the reader visualize the synthetic data described in this invention, FIG. 11 shows a typical synthetic impedance curve 1102 for a tuning fork immersed in a fluid. FIG. 12 shows the first derivative 1202 of the FIG. 11 curve. FIG. 13 shows the second derivative 1302 of the FIG. 11 curve.
The present invention is utilized to provide density, viscosity, dielectric constant, resistivity and other measured, calculated or derived fluid parameter information about a downhole fluid. The tool of the present invention provides the fluid parameter information to a processor or intelligent completion system (ICS) at the surface. The ICS is a system for the remote, intervention less actuation of downhole completion equipment has been developed to support the ongoing need for operators to lower costs and increase or preserve the value of the reservoir. Such a system is described in The Oil and Gas Journal, Oct. 14, 1996. At times called “SmartWells,” these completion systems enable oil and gas companies to study and control individual zones without well intervention. This can dramatically lower operating expenditures by reducing downtime. Also, it can allow enhanced hydrocarbon recovery via improved reservoir management. ICSs enable the operator to produce, monitor and control the production of hydrocarbons through remotely operated completion systems. These systems are developed with techniques that allow the well architecture to be reconfigured at will and real-time data to be acquired without any well intervention.
The operator, located at the surface and having access to over ride the processor/ICE 30 may make his own decisions and issue commands concerning well completion based on the measurements provided by the present invention. The present invention may also provide data during production logging to determine the nature of fluid coming through a perforation in the well bore, for example, the water and oil ratio.
The present invention has been described as a method and apparatus operating in an oil rig environment in the example embodiment, however, the present invention may also be embodied as a set of instructions on a computer readable medium, comprising ROM, RAM, CD ROM, Flash or any other computer readable medium, now known or unknown that when executed cause a computer to implement the method of the present invention. An example of an embodiment of the invention has been shown by the above example. This example, however, is for purposes of example only and not intended to limit the scope of the invention, which is defined by the following claims.

## Claims

1. An apparatus for determining the properties of a fluid downhole comprising:
(a) a resonator in contact with the fluid downhole, wherein the resonator electrical impedance is responsive to properties of the fluid;
(b) a controller that actuates the resonator;
(c) a monitor for measuring electrical impedance of the resonator and
(d) a processor that chemometrically estimates the property of the fluid using the response of the resonator to the actuation.

2. The apparatus of claim 1, wherein the processor correlates a measured resonator response with known fluid property values.

3. The apparatus of claim 1, wherein the property is viscosity.

4. The apparatus of claim 1, wherein the property is density.

5. The property of claim 1, wherein the property is dielectric constant.

6. The apparatus of claim 1, wherein the property is resistivity.

7. The apparatus of claim 1, the processor applies the chemometrically estimated property to a Levenberg-Marquardt (LM) algorithm to determine a fluid parameter value for the fluid.

8. The downhole tool of claim 7, wherein the fluid parameter value comprises a global minimum for the LM algorithm.

9. A method for determining a property of a fluid downhole the method comprising:
(a) positioning a resonator adjacent to the downhole fluid;
(b) actuating the resonator;
(c) measuring the electrical impedance response of the resonator to the actuation; and
(d) chemometrically estimating a value of a property of the fluid downhole based on the measured response while the fluid is one of (i) being pumped, and (ii) static, wherein the property of the fluid is selected from the list consisting of viscosity, density, dielectric constant and resistivity.

10. The method of claim 9, further comprising: correlating the response with known fluid property values.

11. The apparatus of claim 9, the processor applies the chemometrically estimated property to a Levenberg-Marquardt (LM) algorithm to determine a fluid parameter value for the fluid.

12. The method of claim 11, wherein the fluid parameter value comprises a global minimum for the LM algorithm.

13. A system for determining the properties of a downhole fluid, the system comprising:
(a) a surface controller that lowers a tool deployed in a well bore formed in an adjacent formation, the tool interacting with a down hole fluid;
(b) a resonator in contact with the downhole fluid;
(c) a controller that actuates the resonator; and
(d) a processor that estimates a value of a property for the downhole fluid using an electrical impedance response of the resonator and uses a chemometric equation.

14. The system of claim 13, wherein the processor applies a function applying the resonator response to a chemometric equation to determine the fluid property value.

15. The system of claim 13, wherein the processor uses a function for deriving a chemometric equation from measured resonator response correlated with known fluid property values.

16. The system of claim 13, wherein the parameter value property is viscosity.

17. The system of claim 13, wherein the parameter value property is density.

18. The system of claim 13, wherein the parameter value is dielectric constant.

19. The system of claim 13, wherein the parameter value property is resistivity.

20. The apparatus of claim 13, the processor applies the chemometrically estimated property to a Levenberg-Marquardt (LM) algorithm to determine a fluid parameter value for the fluid.

21. The system of claim 20, wherein the fluid parameter value comprises a global minimum for the LM algorithm.

22. The apparatus of claim 1 wherein the resonator comprises a mechanical resonator.

23. The apparatus of claim 1 wherein the resonator comprises a tuning fork.

24. An apparatus for determining a property of a fluid downhole comprising:
(a) a resonator in direct contact with the fluid downhole;
(b) a controller that actuates the resonator; and
(c) a processor that estimates the property of the fluid using a an electrical impedance response of the resonator to the actuation and uses a chemometric equation.

25. The method of claim 9 further comprising generating creating a synthetic data training set for resonator response.