US 20050028579 A1
A method, used in connection with a pulse-echo type sensor for determining the speed of sound in a gas, for improving the accuracy of speed of sound measurements. The sensor operates on the principle that speed of sound can be derived from the difference between the two-way travel time of signals reflected from two different target faces of the sensor. This time difference is derived by computing the cross correlation between the two reflections. The cross correlation function may be fitted to a parabola whose vertex represents the optimum time coordinate of the coherence peak, thereby providing an accurate measure of the two-way time diffference.
1. A method of processing reflection data acquired from a two-reflector sensor that measures the speed of sound in a gas, comprising the steps of:
sampling two reflection signals acquired by the sensor, thereby obtaining two reflection data sets;
computing the cross correlation between the two reflection data sets as a function of a lag time index, thereby obtaining a cross correlation function;
fitting a second degree polynomial function to the positive lobe of the cross correlation function that contains the cross correlation coherence peak;
computing the vertex of the polynomial function, thereby providing the time of occurance of the cross correlation coherence peak, which represents the travel time difference between the two reflections.
2. The method of
3. The method of
This application is a continuation-in-part of U.S. patent application Ser. No. 10/406,518, filed Apr. 3, 2003, and entitled “Device for Precision Measurement of Speed of Sound in a Gas” now U.S. Pat. No. ______, which claims priority to U.S. Provisional Application No. 60/427,099 filed Nov. 18, 2002 and entitled Device for Precision Measurement of Speed of Sound in a Gas.
The U.S. Government has a paid-up license in this invention and the right in certain circumstances to require the patent owner to license others on reasonable terms as provided for by the terms of Contract No. DE-FC21-96MC33033 for the U.S. Department of Energy.
This invention relates to the field of ultrasonic measurements, and more particularly, to processing data from a device for measuring the speed of sound in a gas using transit time of an ultrasonic pulse.
A unique physical characteristic of any gas is the speed of sound through that gas at specified pressure and temperature conditions. This characteristic, in combination with the temperature and pressure of the gas, may be used as a direct testing method for identifying individual pure gases, and may serve as one of several measurable physical parameters by which certain gas mixtures containing two or more known gas constituents may be quantitatively analyzed in terms of their concentrations.
Speed of sound measurements in gases are important to the natural gas industry because the speed of sound, in combination with the gas temperature, pressure, and the amount of non-hydrocarbon diluent gases, may be used to experimentally characterize the gas and infer the heating value energy content of the gas. This method of determining the energy content of natural gas does not require any additional information or measurements defining the hydrocarbon constituents or their concentrations. This inferential method of determining gas heating value is described in U.S. Pat. Nos. 6,604,051 and 6,704,660, assigned to Southwest Research Institute.
The inferential gas energy measurement method has been extended to a “two state” method, which is used to inferentially determine both the heating value and the nitrogen dilution concentration of gas mixtures given experimental measurements of gas pressure, temperature, speed of sound, and carbon dioxide concentration. This “two-state” method is described in U.S. patent application Ser. No. 10/401,206, entitled “Indirect Measurement of Nitrogen in a Multi-Component Gas by Measuring the Speed of Sound at Two States of the Gas”, assigned to Southwest Research Institute. Parametric studies of the two-state inferential algorithm based on 86 different natural gas mixtures having sound speeds in the range of about 1,300-1,500 ft/sec indicate that the speed of sound must be accurate to within ±0.1 ft/sec or less in the gas pressure range of 50-200 psia in order to provide suitably accurate output values of gas heating value and nitrogen concentration. This degree of accuracy requires that the speed of sound sensor provide measured and resolved values of the gas speed of sound to within about ±70 parts per million at two arbitrary but accurately measured pressure-temperature states. Obtaining an accurate inferential estimate of nitrogen, which cannot be sensed directly by other practical means, imposes this relatively high precision in speed of sound in comparison with inferential estimates of gas heating value obtained with a simpler algorithm when the nitrogen concentration is known in advance from gas chromatography measurements.
Achieving the needed accuracy in the measured speed of sound requires a precision experimental speed of sound sensing technique and a dedicated computational capability for numerically processing and analyzing the sensor output data.
Overview of Two-Reflector Pulse Echo Speed of Sound Sensors and Sensor Data Processing
One approach to measuring the speed of sound in gas involves measurement of the transit time of an ultrasonic pulse traveling over a known propagation distance in the gas. This technique typically employs one or more piezoelectric transducers to generate and detect sound waves in the frequency range of about 20 kHz to 1 MHz and higher. A particular technique known as a “pulse echo” technique uses a single transducer as both the transmitter and the receiver. The generated sound wave is reflected back to the source transducer from a target located at a known distance from the transducer, and is received by the same transducer. If the distance between the transducer and the reflecting target is D, and the measured two-way travel time is t, then the speed of sound is represented by:
To reduce the time delay error, the pulse echo method may be modified to measure a time difference between two received signals. A transmitted wave is reflected from two different targets rather than a single target. The distance, d, between the two targets is known. Using this method, the speed of sound is represented by:
With this two-reflector method, the two ultrasonic wave pulses returning to the transducer will be similar in amplitude and in waveform so that they may be accurately compared and their relative two-way travel time delay, Δt, measured. In particular, a method of cross correlation analysis may be used as the means for accurately comparing the two reflected pulses in a statistical sense and, in so doing, determine with good accuracy their relative time delay.
In operation, as further explained below, sensor 10 is capable of yielding precision measurements of the speed of sound in gas and vapor mixtures such as those comprising natural gas. It accepts a flowing stream of gas at gas inlet 115 previously brought to thermal equilibrium with the temperature of the test chamber 116, and measures the gas temperature by means of temperature sensor 117 located within chamber 16 and temperature transmitter 117 a and the gas pressure by means of pressure sensor 118 in direct fluid communication with chamber 116 and pressure transmitter 118 a, and provides for exit of the gas at gas outlet 119. The transmit-receive transducer 111 is mounted at one end of the cylindrical test chamber 116 with its active face exposed to the gas contained within the chamber 116. The electrical leads of transducer 111 are brought out of the chamber 116 via pressure-sealed electrical feedthrough terminals to maintain the pressure integrity of the chamber 116. The reflector target block 112 is made from one piece of material to provide two planar semicircular reflecting surfaces 113 and 114 accurately separated by a distance, d, along the axial length of test chamber 116 and oriented parallel to the face of transducer 111 located at a spacing, D, away from reflecting surface 113 along the axial length of the test chamber 116.
The two-reflector target 116 is made from a single target piece comprised of a material having a very low coefficient of thermal expansion. Specifically, the reflecting surfaces of the two-reflector target 116 may be made to be physically identical in all respects and made of a material such as Invar© so as to have negligible thermal expansion effects. The relative time delay between the two reflections will then be governed by the distance, 2d, which may be very accurately measured and known.
Sensor 10 is operated in the test gas by first applying an electrical excitation pulse signal to the terminals of transducer 111 causing its piezoelectric transducer element to generate a sound wave pulse in the gas. The electrical excitation pulse is typically a sinusoidal signal having a finite time duration produced by an appropriate signal generator external to the test chamber 116. The frequency of the sinusoidal pulse is adjusted to match the resonance frequency of the transducer 111 and the time duration is adjusted to be sufficiently short that the frequency spectrum of the pulse is approximately equal to or exceeds the operating bandwidth of the transducer 111. With these adjustments of the excitation signal, the sound wave produced in the gas will have the minimum rise time and the fewest number of oscillatory cycles as governed by the bandwidth of the transducer 111. In this regard, the preferred embodiment of the speed of sound sensor 10 will utilize a transducer 111 having a maximum practical bandwidth in order to produce ultrasonic pulses having the shortest practical time duration. For this purpose, piezoceramic transducers designed specifically for efficient acoustical coupling into air or other gases are preferred which have a −6 dB bandwidth in the range of 75-100 percent of the transducer resonance frequency. However, ultrasonic transducers having a −6 dB bandwidth of 40-50 percent of the resonance frequency may be used in sensor 10 to yield satisfactory speed of sound measurements under many operating conditions and accuracy requirements.
The distance, d, separating reflecting surfaces 113 and 114 is adjusted to provide a sound propagation time delay between the two reflected ultrasonic pulses sufficient to prevent the pulses from overlapping in time. For example, to ensure good time separation between the two reflected pulses, the time delay, Δt, should be about ten times greater than the duration of the pulse. Thus, for an ultrasonic pulse having a frequency f, and a time duration, δ, containing N cycles, i.e., δ=N/f, the distance, d, is, from Equation (2) above,
Referring again to
Speed of Sound Sensor with Helical Channel
A basic principle of operation of sensor 10 is that the thermal mass of the test chamber 116 is used as a heat sink to bring the test gas to the same temperature as chamber 116. This is accomplished on a continuous basis as the gas flows through sensor 10.
More specifically, as shown in
An internal path in end plate 203 a directs the equilibrated gas into an annular space 204 where it travels freely between the inner wall of the chamber 116 and a porous cylindrical metallic sleeve 205, concentric with chamber 116, through which it diffuses into the speed of sound measurement volume 206 in the inner part of the chamber 116. By traveling through the helical flow channel 200 and diffusing uniformly through the porous metal sleeve 205, the gas is assured to have the same temperature as the chamber 116. The gas throughout the measurement volume 206 will have uniform temperature.
The use of the porous sleeve 205 minimizes possible streaming flow in the gas transport motions and serves as a final point of intimate contact with the gas for thermal equalization. Sleeve 205 makes the flow more uniform by reducing jetting at the end of the helical flow channel 115 b. Another important function of porous sleeve 205 is to provide anechoic conditions within the speed of sound measurement volume 206 in the inner part of chamber 116 by reducing reflections of any ultrasonic waves that contact the sleeve 205. If desired, sleeve 205 may be made from a material that is rough surfaced as well as porous. Essentially, diffuser sleeve 205 serves the function of scattering and absorbing any ultrasonic pulse signals that reverberate within the chamber 116, thereby improving the signal-to-noise ratio of signals received by transducer 111.
Ultrasonic transducer 111 is located in the inner space 206 of chamber 116 at one end of chamber 116. It emits the short duration sound wave pulse whose time of travel between reflecting surfaces 113 and 114 is measured.
An electrical excitation voltage pulse, more specifically a repetitive sequence of triggered pulses having the form of a gated sine wave, is applied to transducer 111. The frequency of the sine wave corresponds to the resonance frequency of the transducer 111. The repetition rate of the transmitted pulses is not critical to the speed of sound measurements. However, this repetition rate is selected so that any possible reverberation within the chamber 116 dies away between successive pulses and, if necessary, is also selected to be sufficiently low that the average power delivered to transducer 111 does not exceed the power rating of transducer 111.
Each applied voltage pulse actuates transducer 111, resulting in an emitted ultrasonic pulse. The ultrasonic pulse travels through the test gas to the opposite end of chamber 116 where it is reflected from surfaces 113 and 114 on target block 112. As explained, below, transducer 111 is a broad bandwidth transducer.
Electrical connections to transducer 111 are brought out of chamber 116 at end plate 203 a by means of feedthrough terminals 207 a and 207 b to maintain the pressure integrity of the chamber 116.
Two specific examples of suitable materials for target 112 are Invar® and Super Invar®. Invar® and Super Invar® have thermal expansion coefficients of 1.5E-06 in/in/F and 0.35E-06 in/in/F, respectively. Super Invar® is a well-known steel alloy that exhibits a nearly zero coefficient of thermal expansion. This alloy consists of steel with 32% nickel, 5.5% cobalt, and smaller amounts of other elements for machinability. In reference to target 112, an important concern is dimensional stability when exposed to temperature variations, thus a good choice is Super Invar®.
A suitable construction of target block 112 is two semi-circular faces 113 and 114 of a cylinder such that the semicircular faces are oriented parallel to the face of transducer 111. By using the one-piece two-reflector rigid metal target block 112, the derived speed of sound is independent of uncertainties in the effective distance between the local mechanical-acoustical coupling interface between the transducer 111 and the test gas as well as the reflecting surfaces on the target block 112. When made of a low thermal expansion material, the spacing between faces 113 and 114 is essentially independent of temperature and, therefore, the time delay between the pulses reflected at faces 113 and 114 is also essentially independent of temperature.
Gas outlet port 119 is in fluid communication with pressure sensor 118 and 118 a and permits the pressure within chamber 116 to be determined. Gas outlet port 119 also permits the gas to exit sensor 10. Small gas flow channels 208 are located in target block 112 to allow the gas near the reflecting surface 114 to more easily move toward outlet port 119.
As an example, the distance, D, between the transducer and the near reflecting surface 113 is approximately 2 inches. A typical distance, d, between the two reflecting surfaces 113 and 114 is 0.500 inch. A typical length dimension of transducer 111 is approximately 1.5 inch. A typical length of target block 112 is 2 inches. Given these dimensions, the remainder of test chamber 116 dimensions would be sized appropriately, resulting in a total length of sensor 10 of approximately 6.5 to 7 inches. A typical diameter of transducer 111 is 1.25 inch and a typical inside diameter of porous sleeve 205 is 1.75 inch. Given these dimensions, the remainder of the chamber 116 diameter, including the helical flow channel 200 groove and the outer sleeve 201 would be sized appropriately, resulting in a total diameter of sensor 10 of approximately 2.5 inches. More specifically, the helical flow channel 200 in chamber 116 may typically have a rectangular cross-section approximately 0.09-inch deep and 0.06-inch wide and a groove-to-groove pitch of 0.125 inch. These dimensions combined with a typical outside diameter of the chamber body 116 of 2.25 inch will result in a total helical flow channel length of approximately 300 inches. At a gas flow rate of 0.2 liter/minute, the dwell time of the gas in this helical flow channel 200 is approximately 8.6 seconds.
Sensor Data Processing Correlation Methods
The above-described speed of sound sensor is an example of a “two-reflector” speed of sound sensor, that is, a speed of sound sensor that employs ultrasonic pulse-echo reflections from two target faces separated by a known distance. The experimental parameter derived from this sensing technique is the difference in the two-way travel time between the two detected reflections. This time difference is derived by numerically computing the cross correlation between the two reflections to obtain a statistically precise measure of their time separation. The current version of this speed of sound sensor is capable of providing direct measurements of sound speed in natural gas mixtures with an accuracy and resolution of approximately 0.46 ft/sec when operating at gas pressures of 60 psia or higher and when the ultrasonic pulse waveforms are digitally sampled at 50 MSamples/sec and the nitrogen concentration is provided by separate means. This accuracy corresponds to a measurement precision of about 320 parts per million for typical natural gas mixtures (sound speed: 1,400±100 ft/sec) present in transmission pipeline environments. To satisfy the speed of sound sensing accuracy required by the two-state inferential algorithm, with its ability to eliminate the need for separate information on nitrogen concentration, this present sound speed accuracy and resolution must be improved by a factor of five.
Extending the present sound speed resolution by a factor of five could be achieved by directly digitizing the reflected sound pulse waveforms at 250 MSamples/sec. However, such high-speed analog-to-digital conversion is impractical for use in robust and cost-effective commercial equipment. A more practical approach is one in which the current 50 MSamples/sec ultrasonic reflection waveforms are transferred from the sensor electronics system to a data processing module for supplemental analysis to numerically interpolate the desired precision speed of sound measurements. This approach utilizes the proven parts of the present speed of sound sensor and allows the ultrasonic waveform analysis to be performed in a high-level computational code that can provide powerful signal processing for reflection waveform cross correlation analysis, interpolation of precision values of travel time differences between the two reflections, and calculation of the desired engineering values of measured speed of sound.
The pulse reflections from the target surfaces 113 and 114 return to transducer 111 where, by reciprocal transducer action, they are detected and recorded in digital form. A signal processing unit 209 accepts the digitized pulse waveforms and performs appropriate calculations to determine the difference in travel time, Δt, between the reflected ultrasonic pulses using the cross correlation method described above in association with Equation (4). Processing unit 209 also receives and records signals representing temperature and pressure from sensor transmitters 117 a and 118 a.
The distance, d, between the two reflecting faces of target block 112 is very stable with temperature. The speed of sound is derived from the measured time difference, Δt, between the two detected pulse reflections by the relation involving distance, d, as given by Equation (2) above.
The detected sound wave pulses are digitally sampled and recorded with sufficient time resolution that their times or arrival at the transducer 111 may be measured to within a typical time resolution of about 1/fs=0.02 μsec (fs=50 MSample/sec) in order to accommodate the numerical interpolation process mentioned above and, hence, achieve the desired accuracy in the derived speed of sound. For example, to initially achieve a speed of sound measured to an accuracy of Δvgas=±0.1 percent, or less, in a methane-dominated natural gas mixture, the digital sampling rate of the ultrasonic pulse waveforms may be expressed approximately as:
For most natural gas mixtures, ultrasonic transducers having an operating resonance frequency in the range of 300-500 kHz and a bandwidth of 75-100 percent of the operating resonance frequency are capable of providing ultrasonic pulse-echo signals having acceptable signal-to-noise ratio when using two-way reflection path lengths of about 6 inches, or less. Likewise, ultrasonic pulses in the 300-500 kHz frequency range are capable of providing the desired speed of sound accuracy stated in the above example when their waveforms are sampled and digitized at a sampling rate of 48×106 samples/second. Frequencies and bandwidths outside this range may also be suitable.
Transducer 111 in
The traces in
The traces in
The physical path length, 2·d, between the two reflection faces is known and invariant. Hence, the travel time difference, ΔT, between the two reflections is a measure of the speed of sound in the gas at the measured pressure and temperature conditions in the test chamber 116.
As discussed above, a “two state” method acquires measurements at two different thermophysical states (State 1 and State 2). Because the speed of sound in the gas at State 1 conditions is different from the speed of sound at State 2 conditions, the time difference between the reflection wavelets are also different. For typical natural gas compositions at testing pressures of P1=70 psia and P2=150 psia over a wide range of energy meter ambient temperatures and for a known target separation distance 2·d=1 inch, the two-way reflection time differences will be bounded in the range of approximately 55 μsec<ΔT<65 μsec. Thus, the cross correlation function between the first and second reflection wavelets may be obtained by computing the “autocorrelation” function of the waveform, using a correlation lag-time window defined by 0≦τ≦65 μseconds, where τ is the correlation time-lag parameter.
A reasonably accurate value of the first reflection arrival time, t1, which, by the design of the gas test chamber, is in the range 100 μsec<t1<140 μsec, may be found by sorting out the maximum positive sample value of the waveform in the t1 time window and identifying its sample-time index, k1. The approximate time of arrival of the maximum positive waveform peak in the first reflection is then given by:
The sorting process referred to above may be replaced by a threshold amplitude detection process without significant loss of accuracy in the identified value of t1 for the purpose of defining the required waveform trace length and the correlation lag-time window bounds. For example, if the value, k1=6,110, were found from a given recorded waveform, the value of t1 would be:
Cross correlation computation is accomplished using the discrete-time function
In computing the cross correlation function, the product, wk·wk-p, need not be calculated for the entire waveform file since the sample points in the waveform trace in advance of the first reflection contain no information relevant to the later arriving reflection wavelets and the sample points well after the second reflection contain only residual secondary reflections within the gas test chamber. Specifically, the ultrasonic signal receiver is designed to mute the incoming signal during the first 30-40 μsec to suppress electrical feedover from the excitation pulse applied to the ultrasonic transducer and secondary reflections begin at a time equal to twice the first reflection, i.e., at 2t1. Therefore, the active elements in the waveform file may be specified to begin at a sample point wK1 somewhat earlier than the first reflection time and end at sample point wK1 slightly less than 2t1. That is, for example, by arbitrary choice, select:
In reference to Equation (9), if the indicated calculation begins at time-lag p=0, the correlation function Rp includes the autocorrelation function of the entire waveform trace. This calculated autocorrelation part of Rp contains no useable information regarding the time difference between the two reflection wavelets. Thus, in order to avoid the autocorrelation result and other unnecessary early lag-time calculations, the correlation lag-time index may start at an index point, p=P1, specified to be somewhat earlier than the first reflection time, t1. To reliably compute the cross correlation function between the first and second reflections in all anticipated gas mixtures and pressure-temperature conditions, the lag-time index must extend to p=P2 where P2 corresponds to a time somewhat greater than the upper sample-point upper bound given in Equation (11). This lag-time shift range, P1<p<P2, may be specified to eliminate the unnecessary correlation responses and minimize the computation time required to yield the cross correlation function.
The computational procedure described above is a direct time-domain implementation of the autocorrelation function in which the correlation lag time exceeds the time delay between the first and second reflections. This procedure is preferred when the correlation analysis is implemented in a microprocessor operating under firmware program execution. This time-domain procedure has the advantage that the resulting reflection wavelet coherence lag time for the two reflections is a direct indication of the reflection time delay, ΔT, required in the speed of sound calculation. The computation time of this procedure may be reduced by introducing supplemental steps of gating each reflection in an accurately defined time window and computing the cross correlation function using only the sample points in the time windows. The total time lag corresponding to ΔT is then calculated as the sum of lag time derived from the windowed reflection signals and the time separation between the two time windows. This procedure eliminates a relatively large number of correlation calculations at sample points between the sample windows but requires an accurate record of the time window end points. For the ultrasonic reflection wavelet durations shown in
When the cross correlation analysis is implemented in a compiled software code, the preferred computing procedure is one involving the Fourier transforms of the time windowed reflection wavelets. This procedure is based on the duality between the convolution process in the time domain and the cross spectral energy density in the frequency domain. This process involves computing the Fourier transforms of the two windowed reflection signals, multiplying one transform by the complex conjugate of the other transform to obtain the cross spectral density, and computing the inverse transform to obtain the cross correlation function in the time domain. This time domain result will indicate the wavelet coherence time lag associated with the windowed reflections. The total time lag corresponding to ΔT is then calculated as the sum of lag time derived from the windowed reflection signals and the time separation between the two time windows. The width of the two time windows should be approximately 1,000 sample points to fully contain the reflection wavelets and also provide a buffer time range to allow wavelet overlap and cross-over sufficient to calculate the central lobes of the cross correlation function, including the central positive coherence lobe. By adjusting the two time windows to exactly 210=1,024 sample points, the Fast Fourier Transform algorithm may be employed in the software code for very efficient computations.
For the exemplary speed of sound sensor and ultrasonic transducer, the coherence maximum of the cross correlation function shown in
Correlation Coherence Lag Time Interpolation
A statistically determined interpolation of the time shift corresponding to the coherence maximum in
The normal equations required to solve for the parabola coefficients, a1, a2, a3 are
The normal equations may be solved by determinants to yield arithmetic expressions for the parabola coefficients as follows
In practice, points on the entire parabola curve are not required in order to derive the interpolated value of the vertex point. The exact vertex point of the parabola may be found by differentiating Equation (14) and solving for the abscissa corresponding to the maximum value. By this procedure, the exact vertex point, indicated by “X” in
Speed of Sound Calibration Adjustment
There are several parameters in the speed of sound sensor system that may cause errors in the experimentally derived sound in the test gas. As noted from the expression for vgas in Equation (21), assuming that the true cross correlation coherence maximum is represented by the interpolated value, pmax, uncertainties in fs and d can independently introduce errors in the derived speed of sound. The sampling rate, fs, set by a precision crystal oscillator in the sensor electronics system, may have a slight offset from 50 MSamples/sec and may also have a small frequency-drift temperature sensitivity. The exact value of d, although measurable with good precision, may also have a small temperature sensitivity caused by thermal expansion of the dual reflector target block. These temperature-related uncertainties are minimized in the present sensor system by using temperature stabilized electronic circuitry and by fabricating the reflector block from Super Invar® material having a near-zero thermal expansion coefficient. Residual temperature and offset uncertainties in fs and d are merged in their product, fs·d, as indicated in Equation (21). Thus, since stored values of fs and d are used in computing the speed of sound, either one of these stored values may be adjusted to serve as a basis for speed of sound calibration.
Accurate values of sound speed in known natural gas mixtures at known pressure and temperature may be calculated using a thermodynamic equation of state such as that currently designated by the gas industry as AGA-10. The speed of sound sensor may, therefore, be calibrated by temporarily introducing a certified natural gas mixture into the test chamber and experimentally deriving its speed of sound, vgasREF, at accurately measured values of pressure and temperature using the reference value of dref=0.5000 inch stored in the data processing program. The true speed of sound in the certified mixture, vgasCALC, is then calculated at the same pressure and temperature. The ratio of the calculated and reference sound speeds then serves as the calibration adjustment factor for the sensor derived speed of sound. That is, the calibrated speed of sound in an unknown test gas is then expressed by:
Many variations and modifications may be made to the disclosed embodiments of the invention without departing from the spirit and principles described herein. All such modifications and variations are intended to be included within the scope of the present invention, as defined by the following claims.