Patent Description:
Ultrasound technology is utilized for measuring fluid/gas velocity through a pipe of known dimensions, with ultrasound transducers placed within the pipes to determine the fluid/gas velocity and the fluid/gas volume flow, which is measured by multiplying fluid/gas velocity by the interior area of the pipe. Cumulative fluid volume may be measured by integrating fluid flow over time. To provide ultrasonic flow metering, two transducers are spaced apart within a pipe such that a first signal is sent in the upstream direction and a second signal is sent in the downstream direction. The time-of-flight (TOF) for both signals is measured, with the difference between the two measurements indicating the amount of flow within the pipe. Reciprocal operation in the two directions is critical as the measurements must attain a high degree of accuracy, such as to detect small leaks. A tuned flow meter can detect a difference in TOF in the range of picoseconds. Providing the necessary reciprocal operation means attaining zero differential TOF at zero flow despite mismatches in transducer pairs. Achieving this goal requires perfect matching of electrical impedances between the transmitting circuit and the receiving circuit. A common way to attain matching is by designing the ultrasonic hardware to be voltage transmit, i.e., with close to zero impedance on the driver side, and current receive, i.e., with close to zero impedance on the receiver side. Attaining zero impedance places stringent requirements on both the driver and the receiver circuits to behave as ideal circuits.

Several factors further complicate this process. For example, although a known offset of the signals may be corrected during processing of the signals, any offset present between the two circuits will vary with the ambient and propagation medium temperature. Thus, to apply such corrections during processing, a temperature gauge is necessary for accurate flow measurements. The standards for flow meters require testing of the meter at zero flow over a range of temperatures.

Also, the standards further require that flow meters be designed for a life span of <NUM>-<NUM> years. Over time, changes can occur, either within the pipe or to the transducer itself (such as sedimentation, corrosion, aging), causing drifting of the acoustical impedance. When this occurs, the flow meter may need to be either retuned or replaced, both of which require attention from a technician.

Further, upstream and downstream signals need to match point for point for perfect reciprocity, but when flow is occurring within the pipe, this type of matching is both tedious and difficult to perform. Stopping the flow is often undesirable or impossible in the field. <CIT> discloses an ultrasonic flowmeter.

The invention comprises a method of auto-tuning a first circuit associated with an upstream transducer UPT and a second circuit associated with a downstream transducer DNT for reciprocal operation in an ultrasonic flowmeter according to claim <NUM>.

The invention further comprises an integrated circuit chip for auto-tuning a first circuit operably connected with an upstream transducer UPT and a second circuit operably connected with a downstream transducer DNT for reciprocal operation in an ultrasonic flowmeter according to claim <NUM>.

In the drawings, like references indicate similar elements. Different references to "an" or "one" embodiment are not necessarily to the same embodiment, and such references may mean at least one. Further, when a particular feature, structure or characteristic is described in connection with an embodiment, such feature, structure or characteristic may be effected in connection with other embodiments, irrespective of whether explicitly described.

In the following detailed description, numerous specific details are set forth to provide a more thorough understanding of example embodiments. However, embodiments may be practiced without these specific details.

A lack of reciprocity in the upstream/downstream signals results in a frequency offset of the received wave. Digital signal processing techniques are disclosed to estimate how closely upstream and downstream waveforms match by estimating the difference in resonating frequency and/or amplitude between the upstream signal and the downstream signal. Instead of attempting a point-for-point match in the signals, the difference between the maximum amplitude of the upstream signal and the downstream signal is useful to detect a mismatch and estimate its magnitude. Similarly, the difference between the center frequency of a fast Fourier transform (FFT) of the upstream signal and the downstream signal can additionally be used to detect a mismatch and estimate its magnitude. When a mismatch is detected, one of the following two techniques can be utilized: adaptively tune the impedance of the transmitter or the receiver so that the same frequency is received in the two directions; or provide compensation in digital processing of the signals with no tuning of the impedances.

A combination of these two techniques can also be used. Tuning of the impedance can be automatically performed by adjusting two components of the impedance - resistance and capacitance - using variable resistors and capacitors in the circuitry. Tuning the impedance can be done on the fly, with no need to stop the flow in order to measure the zero flow offset.

Advantages of the disclosed device and method include at least the following: (a) digital techniques are employed, providing the capability of adaptive tuning in response to changes in transducer characteristics over time and temperature changes; (b) because digital techniques are employed, auto-tuning techniques can be used instead of requiring manual tuning, thereby saving calibration time and reducing the solution's overall cost; and (c) when changes are made to a system, such as adding additional circuitry in front of the existing electronics, the impedance of the transducer circuit can change. The disclosed digital techniques can adjust the transducer circuit impedance to correct for such changes.

<FIG> shows an example of a system <NUM> in which the disclosed embodiments can be practiced; system <NUM> includes two ultrasonic transducers, UT1 and UT2, placed within a pipe for fluid/gas velocity measurement. Many alternative configurations are possible for the arrangement of the transducers, and <FIG> is just an example for the purpose of illustrating the basic ideas for ultrasound measurement of fluid velocity. UT1 and UT2 are mounted inside pipe <NUM>, and a gas or fluid is flowing through the pipe in the indicated direction with velocity V. The distance between ultrasonic transducers UT1 and UT2 is shown as L and the angle between the dashed line connecting the transducers and the wall of the pipe is Θ. Propagation time t12, also called TOF, is the time for an ultrasonic signal to travel from UT1 to UT2 within the medium, whether gas or fluid. Likewise, propagation time t21 is the TOF for an ultrasonic signal to travel from UT2 to UT1 within the medium. If C is the velocity of the ultrasonic signal in the medium and V is the velocity of the medium in pipe <NUM>, these propagation times are given by equations (<NUM>) and (<NUM>):
<MAT>
<MAT>.

The angle Θ and the distance L are known, and the objective is to measure the fluid velocity V. If the velocity C of the ultrasonic signal in the fluid is known, then only the difference between propagation times t12 and t21 is needed. However, the velocity C is a function of temperature, and a temperature sensor may or may not be included based on the target cost of the measurement system. Measuring two different propagation times (t12 and t21) cancels the variability of C. Combining equations (<NUM>) and (<NUM>) yields equation (<NUM>) for the fluid velocity V:
<MAT>
Therefore, the measurement of two ultrasonic propagation times (t12 and t21) is necessary to determine fluid velocity without knowing the velocity of an ultrasonic signal in the fluid.

<FIG> shows a circuit diagram of an ultrasonic measurement system that can be used to practice an embodiment of the disclosure. System <NUM> includes ultrasonic transducers UT1 and UT2, circuit <NUM> for controlling the transducers and interpreting the results, and communication module <NUM>, which is operable to transmit flow information to a base station (not specifically shown). Circuit <NUM> can be embodied as a computer chip capable of interfacing with ultrasonic transducers UT1, UT2 and with communication module <NUM>. Referring back to <FIG>, signal r12 is the ultrasonic signal sent by transducer UT1 and received from transducer UT2. Likewise, signal r21 is the ultrasonic signal sent by transducer UT2 and received from transducer UT1.

Circuit <NUM> includes multiplex circuits <NUM> (MUX2) and <NUM> (MUX1) which are controlled by signals on control bus <NUM>. MUX1 is coupled to receive an excitation signal from drive circuit <NUM> in response to micro control unit (MCU) <NUM>. MCU <NUM> is coupled to memory circuit <NUM> and to display circuit <NUM>. MCU <NUM> is also coupled to crystal oscillator circuit <NUM>, which controls measurement times, and to crystal oscillator circuit <NUM>, which controls excitation and sampling frequencies.

When a logical <NUM> from control bus <NUM> is applied to MUX1, the excitation signal from drive circuit <NUM> is applied to UT1. UT1 responsively transmits an ultrasonic signal to UT2. UT2 produces received signal r21, which is applied to MUX2. The logical <NUM> applied to MUX1 is also applied to MUX2 so that r21 is applied to programmable gain amplifier (PGA) <NUM>. PGA <NUM> amplifies r21 and applies it to filter <NUM>. The filtered signal is then applied to signal processing unit <NUM> to calculate alignment points for r21. Similarly, when a logical <NUM> from control bus <NUM> is applied to MUX1, the excitation signal from drive circuit <NUM> is applied to UT2. UT2 responsively transmits an ultrasonic signal to UT1. UT1 produces received signal r12, which is applied to MUX2. The logical <NUM> applied to MUX1 is also applied to MUX2 so that r12 is applied to programmable gain amplifier (PGA) <NUM>. PGA <NUM> amplifies r12 and applies it to filter <NUM>. The filtered signal is then applied to signal processing unit <NUM> to determine respective alignment points. The MCU calculates the differential time of flight and fluid flow from the alignment points. The result is applied to communication module <NUM> and transmitted to a base station. The MCU also applies the result to display <NUM>.

<FIG> is a diagram of received upstream and downstream ultrasonic signals when the driver circuit for one transducer and the receiver circuit for the other transducer have different impedance values. The two signals are generated by respective excitation pulses and have been adjusted for transmit time difference. In this figure, the upstream signal is shown as a solid line, while the downstream signal is shown as a dotted line. While the differences can be subtle, both the amplitude of the signals and their frequencies are unmatched. <FIG> is a similar diagram of received upstream and downstream ultrasonic signals when the driver and receiver impedances are matched; the signals are also adjusted for transmit time difference. The signals are more closely matched in this latter figure, both in amplitude and in frequency, and appear to overlie each other. A method of detecting and using these properties will now be discussed with respect to the remaining figures.

<FIG> depicts the envelope of the received waveforms for a number of downstream signal transmissions between two transducers, with the x axis showing sampling points during the received signal and the y axis showing the measured amplitude of the signal. In this example, the impedance value in the receiving transducer circuit was held at <NUM> Ohms, while impedances having the values shown in the inset box were used in the transmitting transducer circuits, with the results measured in a flow laboratory. The results illustrate the differences in the waveform envelope when the impedance of the transmitting transducer circuit is mismatched with the impedance of the receiving transducer circuit. In the outermost envelope, when the mismatch is the greatest, the envelope contains greater fluctuations, becoming smoother as the mismatch is less. As the impedance value on the transmitting transducer circuit comes closer to matching the impedance value on the receiving transducer circuit, the waveforms grow closer together and at the scale shown, some signals partially overlie each other. By comparing the maximum amplitude of the upstream signal with the maximum amplitude of the downstream signal, mismatched transducers can be detected and a correction routine can be implemented.

<FIG> contains some of the same information shown in <FIG>, although this latter figure concentrates on the maximum amplitude of the waveform, rather than the entire waveform. <FIG> is a graph depicting the difference in maximum amplitude between an upstream signal and a downstream signal as a resistor value in one transducer circuit is varied. As before, the receiving transducer circuit was held at <NUM> Ohms resistance. The x axis of the graph shows the resistance of the transmitting transducer circuit, while the y axis charts the absolute value of the difference between the maximum amplitude of the downstream signal and the maximum amplitude of the upstream signal, i.e., |max(DNS)-max(UPS)|. The difference in amplitude approaches zero as the value of the resistors approach a match.

This same idea is further illustrated in <FIG>, which show a small portion of the waveforms of the upstream signal and the downstream signal near the maximum amplitude. In both figures, the receiving transducer circuit has a <NUM> ohm fixed resistor. In <FIG>, the transmitting transducer circuit has a <NUM> ohm resistor, with the two transducer circuits thus mismatched by <NUM> ohms. The two signals were sent at zero flow. The mismatch is clearly shown by the difference in maximum amplitude of the upstream and downstream signals. In <FIG>, the transmitting transducer circuit has a <NUM> ohm resistor, giving it a match to the receiving transducer circuit. As this figure shows, when the two transducer circuits are matched, their maximum amplitudes also match in a point-for-point fashion.

<FIG> demonstrate the second technique for measuring the difference between the two signals, i.e., comparing the frequency. When an FFT is applied to a sine wave to graph the sine wave into the frequency domain, the sine wave is transformed to a single line at the appropriate frequency. Using the same FFT, growing and decaying signals, such as the transmitted signals used in ultrasonic flow detection, will be represented in the frequency domain by more of a bell curve, such as the curves in <FIG>. In both of these figures, the x axis is the frequency and the y axis is the amplitude. <FIG> is a plot of the FFT of both the upstream signal and the downstream signal for the mismatched transducer circuits of <FIG>. The offset of the center frequencies of the two signals, which is an indicator of their mismatch, is clearly visible in this figure. In contrast, the signals shown in <FIG> correspond to the matched transducers of <FIG>. The center frequencies in the FFTs of the upstream signal and the downstream signal are closely matched in this graph. For example, the FFTs match point for point.

Thus far, it has been demonstrated that a mismatch can be detected between a pair of transducers by comparing the maximum amplitudes of the two signals and also by comparing the center frequencies of the FFTs of the signals. What remains is a method of determining a correction that can be applied to bring the transducers back into matching. <FIG> show two-port equivalent representations of a flow meter operable to transmit and receive in both an upstream and a downstream direction; these figures also point out the impedance values that must match in each direction. In <FIG>, a signal is being transmitted upstream from transducer T1 to transducer T2, with T1 the signal generator and T2 the termination point. To adjust the upstream signal, transmitter driver impedance ZS <NUM> is matched to receiver load impedance ZL <NUM>. Similarly, in <FIG>, a signal is being transmitted downstream from T2 to T1, with T2 the signal generator and T1 the termination point. To adjust the downstream signal, transmitter driver impedance ZS <NUM> is matched to receiver load impedance ZL <NUM>. After a determination is made that a correction is necessary, the correction can be applied to either the driver side circuitry or to the receiver side circuitry. Accordingly, one side can remain fixed, while the other side is varied, as explained more fully below, to determine matching settings.

For a modeled pair of upstream/downstream transducers having a mismatch of <NUM>% using Spice, a method for automatically tuning the driver/receiver impedances of the transducer pair was tested. In this method, the appropriate impedance (e.g., the driver impedance - transmit side) was held constant while both the resistive and the capacitive contributions to the corresponding impedance (e.g., the load impedance - receive side) are varied in a stepwise manner across respective ranges. Because the ideal values of the resistive and capacitive contributions are known, the respective ranges are selected as being on both sides of the ideal values. In the disclosed test, the resistive component was varied from a value of <NUM>-<NUM> Ohms in steps of <NUM> Ohm; the capacitive component was varied from a value of <NUM> pF to <NUM> pF in steps of <NUM> pF. To provide for orderly testing, the resistance was first held constant while the range of capacitance values were tested, then the resistance was changed by one step and the process repeated until all values had been tested. At each setting, both an upstream and a downstream signal were sent, data was captured, and a number of calculations were made on the signals. A portion of the results are illustrated in the table of <FIG>, specifically the portion closest to the final match. The first calculation we shall discuss is the average of the absolute difference between the periods of the upstream and downstream signals as they grow and decay, i.e. average(abs(per1-per2)). The period of a signal is the inverse of the frequency, so that this calculation provides a value that indicates the difference in the center frequencies of the two signals. <FIG> provides a graph of this calculation, with the data points shown on the x axis and the magnitude of the difference on the y axis. In this illustration, the difference first starts low, rises until the value reaches a peak and starts to decline. As the various resistance/capacitance values are moved through, the dips in the magnitude drop lower until the value reaches a global minimum near the midpoint of this figure and starts to rise again. The global minimum indicates the setting that provides the best match.

The second calculation averages the absolute difference in each zero crossing for the two signals, i.e., average(abs(zc1-zc2)). This is another method of measuring the difference in the phase of the two signals and thus how closely they match. A graph of this second calculation is shown in <FIG>. Both the first and second calculations can be used when the computing power is not available to calculate the FFT of the signals. The second calculation can also clearly indicate the best matching values. The third calculation shown is the difference in the maximum amplitude of the two signals, i.e., max(Y1-Y2); the associated graph is shown in <FIG>. Notably, both the calculation of <FIG> and the calculation of <FIG> can be used, even when stopping the flow is not feasible or desirable. This last graph also exhibits a regularity that can be advantageous. As shown in this figure, each parabolic section represents one value of the resistance as the various capacitances are moved through.

In reviewing the data thus collected, a shortcut can be used to avoid running through the entire range of resistance and capacitance to determine the best values. When the resistive contribution to the impedance is held constant while the capacitive contribution is varied, the local minimum in the difference in amplitude calculation (i.e., max(Y1-Y2)) will identify the value of the capacitive contribution that will also provide the global minimum. Knowing this value means that the capacitive value can then be held at the value that provides a local minimum while the resistive value is varied to determine a value of the resistive contribution that provides the global minimum difference. The same idea holds true when the test starts by holding the capacitive contribution constant while the resistive contribution is varied. The local minimum in the difference in amplitude calculation will then also identify the global minimum value of the resistance to be used. This determined minimum resistance can then be held constant while the capacitive value is changed to discover the global minimum difference that indicates the components of the two transceivers are tuned.

Using this knowledge, a method of automatically tuning the driver/receiver circuitry of an upstream transducer and a downstream transducer to each other for reciprocal operation in an ultrasonic flowmeter is shown in <FIG>. Flowchart 1200A illustrates the first part of this method, i.e., determining whether a pair of transducers matches each other. The method begins with exchanging (<NUM>) signals between an upstream transducer and a downstream transducer. This exchange of signals is part of the normal operation of the ultrasonic flow meter. This operation includes sending a signal from the upstream transducer, which is received at the downstream transducer, and also includes sending a signal from the downstream transducer, which is received at the upstream transducer. These signals can be sent in any desired order. After the signal data is received, the maximum amplitude of the upstream signal can be compared (<NUM>) to the maximum amplitude of the downstream signal. The center frequency of an FFT of the upstream signal can also be compared (<NUM>) to the center frequency of an FFT of the downstream signal. The two comparisons are shown as alternate paths that can be followed to emphasize that the method can be practiced using only one of these comparisons or can use a combination of the two paths. Likewise, these comparisons can be made in any order. The two comparisons are examined to determine (<NUM>) whether the two signals match. If the two signals match, no correction is necessary and the method continues to monitor the exchanged signals and to watch for any changes. If the two signals do not match, the mismatch is corrected (<NUM>). In at least one embodiment, this correction can be made by adjusting the results of the flow meter's measurements using the detected offset and available temperature information. In at least one embodiment, however, the impedance of the circuit associated with one of the transducers will be adjusted to correct the mismatch, as shown in the following figure.

The method of flow chart 1200B begins by setting (<NUM>) a first component of the impedance to the first value in a first range of values and setting (<NUM>) a second component of the impedance to the first value in a second range of values. As is discussed above, the two components of impedance that are adjusted according to an embodiment of the disclosure are resistance and capacitance. Either of these components can be used as the first component while the other component becomes the second. The ranges over which each component will be varied can be determined in a conventional manner according to known parameters for these components. The value of a data point corresponding to the current values of the first and second components is determined by exchanging (<NUM>) signals between the upstream and downstream transducers and determining (<NUM>) the absolute value of the difference in maximum amplitude of the upstream signal and the downstream signal. In at least one embodiment, the difference in center frequencies of an FFT on each signal is also determined (<NUM>). The method determines (<NUM>) whether a local minimum of the data points has been found. If not, the value of the second component is incremented (<NUM>) to the next value in the range and the value of the corresponding data point is determined. Finding the local minimum requires finding two or more data points. As long as the value of the data points is decreasing, i.e., the difference in the signals becomes less, it cannot be determined whether the local minimum has been reached. However, after the value of the data points starts increasing, the local minimum can be determined to be the data point having the lowest value. At this point, the second component is set (<NUM>) to the value corresponding to the local minimum.

The method continues by incrementing (<NUM>) the first component of impedance to a next value in the first range of values. The method exchanges (<NUM>) signals between the upstream and downstream transducers and determines (<NUM>) the absolute value of the difference in maximum amplitude of the upstream signal and the downstream signal. In at least one embodiment, the difference in center frequencies of an FFT on each signal is also determined (<NUM>). A determination will be made (<NUM>) whether a global minimum in the value of the data points has been located. As before, finding the global minimum requires finding two or more data points. As long as the value of the data points is decreasing, a determination cannot be made about whether the global minimum has been reached. However, after the value of the data points starts increasing, the global minimum can be determined to be the data point having the lowest value. At this point, the first component is set (<NUM>) to the value corresponding to the global minimum. This completes the method, as the two transducer circuits are now tuned to each other. The normal operation of the flow meter can continue at this point. Comparison of the signals can continue to operate, and further corrections can be applied as necessary.

Claim 1:
A method of auto-tuning a first circuit associated with an upstream transducer UPT (T1) and a second circuit associated with a downstream transducer DNT (T2) for reciprocal operation in an ultrasonic flowmeter, the method comprising:
exchanging signals between the upstream transducer and the downstream transducer; characterised in that the method further comprises:
comparing respective maximum amplitudes of an upstream signal and a downstream signal; and
responsive to determining that the respective maximum amplitudes do not match, correcting the mismatch;
wherein correcting the mismatch comprises adjusting an impedance value in at least one of the first circuit and the second circuit.