This description relates to flowmeters.
Flowmeters provide information about materials being transferred through a conduit. For example, mass flowmeters provide a direct indication of the mass of material being transferred through a conduit. Similarly, density flowmeters, or densitometers, provide an indication of the density of material flowing through a conduit. Mass flowmeters also may provide an indication of the density of the material.
Coriolis-type mass flowmeters are based on the well-known Coriolis effect, in which material flowing through a rotating conduit becomes a radially traveling mass that is affected by a Coriolis force and therefore experiences an acceleration. Many Coriolis-type mass flowmeters induce a Coriolis force by sinusoidally oscillating a conduit about a pivot axis orthogonal to the length of the conduit. In such mass flowmeters, the Coriolis reaction force experienced by the traveling fluid mass is transferred to the conduit itself and is manifested as a deflection or offset of the conduit in the direction of the Coriolis force vector in the plane of rotation.
Energy is supplied to the conduit by a driving mechanism that applies a periodic force to oscillate the conduit. One type of driving mechanism is an electromechanical driver that imparts a three proportional to an applied voltage. In an oscillating flowmeter, the applied voltage is periodic, and is generally sinusoidal. The period of the input voltage is chosen so that the motion of the conduit matches a resonant mode of vibration of the conduit. This reduces the energy needed to sustain oscillation. An oscillating flowmeter may use a feedback loop in which a sensor signal that carries instantaneous frequency and phase information related to oscillation of the conduit is amplified and fed back to the conduit using the electromechanical driver.
In one general aspect, a multi-phase process fluid is passed through a vibratable flowtube. Motion is induced in the vibratable flowtube. A first apparent property of the multi-phase process fluid based on the motion of the vibratable flowtube is determined, and an apparent intermediate value associated with the multi-phase process fluid is determined based on the first apparent property. A corrected intermediate value is determined based on a mapping between the apparent intermediate value and the corrected intermediate value. A phase-specific property of a phase of the multi-phase process fluid is determined based on the corrected intermediate value.
Implementations may include one or more of the following features. The mapping may be a neural network configured to determine an error in the intermediate value resulting from the presence of the multi-flow process fluid. The apparent intermediate value may be determined to be within a first defined region of values prior to determining the corrected intermediate value, and the corrected intermediate value may be determined to be within a second defined region of values prior to determining the phase-specific property of a phase of the multi-phase process fluid.
The multi-phase process fluid may be a wet gas. The multi-phase process fluid may include a first phase and a second phase, the first phase may include a non-gas fluid, and the second phase may include a gas. The multi-phase process fluid may include a first phase including a first non-gas fluid, and a second phase including a second non-gas fluid, and a third phase including a gas.
Determining the first apparent property of the multi-phase process fluid may include determining a second apparent property of the multi-phase process fluid. The first apparent property of the multiphase process fluid may be a mass flow rate and the second apparent property may be a density.
One or more measurements corresponding to an additional property of the process fluid may be received. The additional property of the multi-phase fluid may include one or more of a temperature of the multi-phase fluid, a pressure associated with the multi-phase fluid, and a watercut of the multi-phase fluid, and determining an apparent intermediate value associated with the multi-phase process fluid based on the first apparent property may include determining the intermediate value based on the first apparent property and the additional property.
Determining an apparent intermediate value associated with the multi-phase process fluid based on the first apparent property may include determining a volume fraction associated with an amount of non-gas fluid in the multi-phase process fluid and a volumetric flow rate of the multi-phase fluid. Determining an apparent intermediate value associated with the multi-phase process fluid based on the first apparent property may include determining a first Froude number corresponding to a non-gas phase of the multi-phase fluid and a second Froude number corresponding to a gas phase of the multi-phase fluid.
Determining a phase-specific property of a phase of the multi-phase process fluid based on the corrected intermediate value may include determining a mass flow rate of a non-gas phase of the multi-phase fluid.
Implementations of any of the techniques described above may include a method or process, a system, a flowmeter, or instructions stored on a storage device of flowmeter transmitter. The details of particular implementations are set forth in the accompanying drawings and description below. Other features will be apparent from the following description, including the drawings, and the claims.
Implementations of any of the techniques described above may include a method or process, a system, a flowmeter, or instructions stored on a storage device of flowmeter transmitter. The details of particular implementations are set forth in the accompanying drawings and description below. Other features will be apparent from the following description, including the drawings, and the claims.
Techniques are provided for accounting for the effects of multi-phase flow in, for example, a digital flowmeter. The multi-phase flow may be, for example, a two-phase flow or a three-phase flow. In general, a two-phase flow is a fluid that includes two phases or components. For example, a two-phase flow may include a phase that includes a non-gas fluid (such as a liquid) and a phase that includes a gas. A three-phase flow is a fluid that includes three phases. For example, a three-phase flow may be a fluid with a gas phase and two non-gas liquids. For example, a three-phase flow may include natural gas, oil, and water. A two-phase flow may include, for example, natural gas and oil.
Although the digital flowmeter continues to operate in the presence of a multi-phase fluid, any properties (e.g., the mass flow rate and density of the multi-phase fluid) determined by the digital flowmeter may be inaccurate because the determination of these properties using conventional techniques is generally based on an assumption that the fluid flowing through the flowmeter is single-phase. Thus, even though the fluid is not a single phase fluid, the flowmeter may continue to operate and generate apparent values of properties such as the mass flow rate and density of the multi-phase fluid. As described below with respect to
Before the techniques are described starting with reference to
Referring to
Mass flow through the conduit 120 is related to the motion induced in the conduit in response to a driving force supplied by the drivers 115. In particular, mass flow is related to the phase and frequency of the motion, as well as to the temperature of the conduit. The digital mass flowmeter also may provide a measurement of the density of material flowing through the conduit. The density is related to the frequency of the motion and the temperature of the conduit. Many of the described techniques are applicable to a densitometer that provides a measure of density rather than a measure of mass flow.
The temperature in the conduit, which is measured using the temperature sensor 125, affects certain properties of the conduit, such as its stiffness and dimensions. The digital controller compensates for these temperature effects. The temperature of the digital controller 105 affects, for example, the operating frequency of the digital controller. In general, the effects of controller temperature are sufficiently small to be considered negligible. However, in some instances, the digital controller may measure the controller temperature using a solid state device and may compensate for effects of the controller temperature.
A. Mechanical Design
In one implementation, as illustrated in
The drivers 46 on opposite ends of the loops are energized with current of equal magnitude but opposite sign (i.e., currents that are 180° out-of-phase) to cause straight sections 26 of the loops 18, 20 to rotate about their co-planar perpendicular bisector 56, which intersects the tube at point P (
B. Conduit Motion
The motion of the straight sections of loops 18 and 20 are shown in three modes in
The drive motion shown in
The type of oscillation shown in
Other implementations may include different conduit designs. For example, a single loop or a straight tube section may be employed as the conduit.
C. Electronic Design
The digital controller 105 determines the mass flow rate by processing signals produced by the sensors 48 (i.e., the motion sensors 110) located at opposite ends of the loops. The signal produced by each sensor includes a component corresponding to the relative velocity at which the loops are driven by a driver positioned next to the sensor and a component corresponding to the relative velocity of the loops due to Coriolis forces induced in the loops. The loops are driven in the antisymmetrical mode, so that the components of the sensor signals corresponding to drive velocity are equal in magnitude but opposite in sign. The resulting Coriolis force is in the symmetrical mode so that the components of the sensor signals corresponding to Coriolis velocity are equal in magnitude and sign. Thus, differencing the signals cancels out the Coriolis velocity components and results in a difference that is proportional to the drive velocity. Similarly, summing the signals cancels out the drive velocity components and results in a sum that is proportional to the Coriolis velocity, which, in turn, is proportional to the Coriolis force. This sum then may be used to determine the mass flow rate.
1. Analog Control System
The digital mass flowmeter 100 provides considerable advantages over traditional, analog mass flowmeters. For use in later discussion.
At the output of amplifier 405, signal VA1 is of the form:
VA1=VD sin ωt+VC cos ωt,
and, at the output of amplifier 410, signal VB1 is of the form:
VB1=−VD sin ωt+VC cos ωt,
where VD and VC are, respectively, the drive voltage and the Coriolis voltage, and ω is the drive mode angular frequency.
Voltages VA1 and VB1 are differenced by operational amplifier 425 to produce:
VDRV=VA1−VB1=2VD sin θt,
where VDRV corresponds to the drive motion and is used to power the drivers. In addition to powering the drivers, VDRV is supplied to a positive going zero crossing detector 430 that produces an output square wave FDRV having a frequency corresponding to that of VDRV (ω=2πFDRV). FDRV is used as the input to a digital phase locked loop circuit 435. FDRV also is supplied to a processor 440.
Voltages VA1 and VB1 are summed by operational amplifier 445 to produce:
VCOR=VA1+VB1=2VC cos ωt,
where VCOR is related to the induced Coriolis motion.
VCOR is supplied to a synchronous demodulator 450 that produces an output voltage VM that is directly proportional to mass by rejecting the components of VCOR that do not have the same frequency as, and are not in phase with, a gating signal Q. The phase locked loop circuit 435 produces Q, which is a quadrature reference signal that has the same frequency (α) as VDRV and is 90° out of phase with VDRV (i.e., in phase with VCOR). Accordingly, synchronous demodulator 450 rejects frequencies other than a so that VM corresponds to the amplitude of VCOR at α. This amplitude is directly proportional to the mass in the conduit.
VM is supplied to a voltage-to-frequency converter 455 that produces a square wave signal FM having a frequency that corresponds to the amplitude of VM. The processor 440 then divides FM by FDRV to produce a measurement of the mass flow rate.
Digital phase locked loop circuit 435 also produces a reference signal I that is in phase with VDRV and is used to gate the synchronous demodulator 415 in the feedback loop controlling amplifier 410. When the gains of the input amplifiers 405 and 410 multiplied by the drive components of the corresponding input signals are equal, the summing operation at operational amplifier 445 produces zero drive component (i.e., no signal in phase with VDRV) in the signal VCDR. When the gains of the input amplifiers 405 and 410 are not equal, a drive component exists in VCOR. This drive component is extracted by synchronous demodulator 415 and integrated by integrator 420 to generate an error voltage that corrects the gain of input amplifier 410. When the gain is too high or too low, the synchronous demodulator 415 produces an output voltage that causes the integrator to change the error voltage that modifies the gain. When the gain reaches the desired value, the output of the synchronous modulator goes to zero and the error voltage stops changing to maintain the gain at the desired value.
2. Digital Control System
Digital-to-analog (“D/A”) converters 515 convert digital control signals from the controller 505 to analog signals for driving the drivers 46. The use of a separate drive signal for each driver has a number of advantages. For example, the system may easily switch between symmetrical and antisymmetrical drive modes for diagnostic purposes. In other implementations, the signals produced by converters 515 may be amplified by amplifiers prior to being supplied to the drivers 46. In still other implementations, a single D/A converter may be used to produce a drive signal applied to both drivers, with the drive signal being inverted prior to being provided to one of the drivers to drive the conduit 120 in the antisymmetrical mode.
High precision resistors 520 and amplifiers 525 are used to measure the current supplied to each driver 46. A/D converters 530 convert the measured current to digital signals and supply the digital signals to controller 505. The controller 505 uses the measured currents in generating the driving signals.
Temperature sensors 535 and pressure sensors 540 measure, respectively, the temperature and the pressure at the inlet 545 and the outlet 550 of the conduit. A/D converters 555 convert the measured values to digital signals and supply the digital signals to the controller 505. The controller 505 uses the measured values in a number of ways. For example, the difference between the pressure measurements may be used to determine a back pressure in the conduit. Since the stiffness of the conduit varies with the back pressure, the controller may account for conduit stiffness based on the determined back pressure.
An additional temperature sensor 560 measures the temperature of the crystal oscillator 565 used by the A/D converters. An A/D converter 570 converts this temperature measurement to a digital signal for use by the controller 505. The input/output relationship of the A/D converters varies with the operating frequency of the converters, and the operating frequency varies with the temperature of the crystal oscillator. Accordingly, the controller uses the temperature measurement to adjust the data provided by the A/D converters, or in system calibration.
In the implementation of
Because of the relationships between frequency, zero offset, amplitude, and phase, an estimate of one may be used in calculating another. This leads to repeated calculations to improve accuracy. For example, an initial frequency determination used in determining the zero offset in the sensor signals may be revised using offset-eliminated sensor signals. In addition, where appropriate, values generated for a cycle may be used as starting estimates for a following cycle.
a. Data Collection
For ease of discussion, the digitized signals from the two sensors will be referred to as signals SV1 and SV2, with signal SV1 coming from sensor 48a and signal SV2 coming from sensor 48b. Although new data is generated constantly, it is assumed that calculations are based upon data corresponding to one complete cycle of both sensors. With sufficient data buffering, this condition will be true so long as the average time to process data is less than the time taken to collect the data. Tasks to be carried out for a cycle include deciding that the cycle has been completed, calculating the frequency of the cycle for the frequencies of SVE and SV2), calculating the amplitudes of SV1 and SV2, and calculating the phase difference between SV1 and SV2. In some implementations, these calculations are repeated for each cycle using the end point of the previous cycle as the start for the next. In other implementations, the cycles overlap by 180° or other amounts (e.g., 90°) so that a cycle is subsumed within the cycles that precede and follow it.
An actual starting point for a cycle (i.e., the actual zero crossing) will rarely coincide exactly with a sampling point. For this reason, the initial sampling points (start_sample_SV1 and start_sample_SV2) are the sampling points occurring just before the start of the cycle. To account for the difference between the first sampling point and the actual start of the cycle, the approach also uses the position (start_offset_SV1 or start_offset_SV2) between the starting sample and the next sample at which the cycle actually begins.
Since there is a phase offset between signals SV1 and SV2, sv1_in and sv2_in may start at different sampling points. If both the sample rate and the phase difference are high, there may be a difference of several samples between the start of sv1_in and the start of sv2_in. This difference provides a crude estimate of the phase offset, and may be used as a check on the calculated phase offset, which is discussed below. For example, when sampling at 55 kHz, one sample corresponds to approximately 0.5 degrees of phase shift, and one cycle corresponds to about 800 sample points.
When the controller employs functions such as the sum (A+B) and difference (A−B), with B weighted to have the same amplitude as A, additional variables (e.g., start_sample_sum and start_offset_sum) track the start of the period for each function. The sum and difference functions have a phase offset halfway between SV1 and SV2.
In one implementation, the data structure employed to store the data from the sensors is a circular list for each sensor, with a capacity of at least twice the maximum number of samples in a cycle. With this data structure, processing may be carried out on data for a current cycle while interrupts or other techniques are used to add data for a following cycle to the lists.
Processing is performed on data corresponding to a full cycle to avoid errors when employing approaches based on sine-waves. Accordingly, the first task in assembling data for a cycle is to determine where the cycle begins and ends. When nonoverlapping cycles are employed, the beginning of the cycle may be identified as the end of the previous cycle. When overlapping cycles are employed, and the cycles overlap by 180°, the beginning of the cycle may be identified as the midpoint of the previous cycle, or as the endpoint of the cycle preceding the previous cycle.
The end of the cycle may be first estimated based on the parameters of the previous cycle and under the assumption that the parameters will not change by more than a predetermined amount from cycle to cycle. For example, five percent may be used as the maximum permitted change from the last cycle's value, which is reasonable since, at sampling rates of 55 kHz, repeated increases or decreases of five percent in amplitude or frequency over consecutive cycles would result in changes of dose to 5,000 percent in one second.
By designating five percent as the maximum permissible increase in amplitude and frequency, and allowing for a maximum phase change of 5° in consecutive cycles, a conservative estimate for the upper limit on the end of the cycle for signal SV1 may be determined as:
where start_sample_SV1 is the first sample of sv1_in, sample rate is the sampling rate, and est_freq is the frequency from the previous cycle. The upper limit on the end of the cycle for signal SV2 (end_sample_SV2) may be determined similarly.
After the end of a cycle is identified, simple checks may be made as to whether the cycle is worth processing. A cycle may not be worth processing when, for example, the conduit has stalled or the sensor waveforms are severely distorted. Processing only suitable cycles provides considerable reductions in computation.
One way to determine cycle suitability is to examine certain points of a cycle to confirm expected behavior. As noted above, the amplitudes and frequency of the last cycle give useful starting estimates of the corresponding values for the current cycle. Using these values, the points corresponding to 30°, 150°, 210° and 330° of the cycle may be examined. If the amplitude and frequency were to match exactly the amplitude and frequency for the previous cycle, these points should have values corresponding to est_amp/2, est_amp/2, −est_amp/2, and −est_amp/2, respectively, where est_amp is the estimated amplitude of a signal (i.e., the amplitude from the previous cycle). Allowing for a five percent change in both amplitude and frequency, inequalities may be generated for each quarter cycle. For the 30° point, the inequality is
The inequalities for the other points have the same form, with the degree offset term (x/360) and the sign of the est_amp_SV1 term having appropriate values. These inequalities can be used to check that the conduit has vibrated in a reasonable manner.
Measurement processing takes place on the vectors sv1_in(start:end) and sv2_in(start:end) where:
start=min(start_sample—SV1,start_sample—SV2), and
end=max(end_sample—SV1,end_sample—SV2),
The difference between the start and end points for a signal is indicative of the frequency of the signal.
b. Frequency Determination
The frequency of a discretely-sampled pure sine wave may be calculated by detecting the transition between periods (i.e., by detecting positive or negative zero-crossings) and counting the number of samples in each period. Using this method, sampling, for example, an 82.2 Hz sine wave at 55 kHz will provide an estimate of frequency with a maximum error of 0.15 percent. Greater accuracy may be achieved by estimating the fractional part of a sample at which the zero-crossing actually occurred using, for example, start_offset_SV1 and start_offset_SV2. Random noise and zero offset may reduce the accuracy of this approach.
As illustrated in
svt=A sin xt+δ+σεt,
where svt is the sensor voltage at time t, A is the amplitude of oscillation, xt is the radian angle at time t (i.e., xt=2πft), Λ is the zero offset, M1 is a random variable with distribution N(0,1), and [ is the variance of the noise, then the squared function is given by:
svt2=A2 sin2 xt+2A(δ+σεt)sin xt+2δσεt+δ2+σ2εt2.
When x1 is close to 2π, sin xt and sin2 xt can be approximated as x0t=xt−2Ξ and x0t2, respectively. Accordingly, for values of xt close to 2Ξ, at can be approximated as:
This is a pure quadratic (with a non-zero minimum, assuming Θ=0) plus noise, with the amplitude of the noise being dependent upon both [ and Λ. Linear interpolation also could be used.
Error sources associated with this curve fitting technique are random noise, zero offset, and deviation from a true quadratic. Curve fitting is highly sensitive to the level of random noise. Zero offset in the sensor voltage increases the amplitude of noise in the sine-squared function, and illustrates the importance of zero offset elimination (discussed below). Moving away from the minimum, the square of even a pure sine wave is not entirely quadratic. The most significant extra term is of fourth order. By contrast, the most significant extra term for linear interpolation is of third order.
Degrees of freedom associated with this curve fitting technique are related to how many, and which, data points are used. The minimum is three, but more may be used (at greater computational expense) by using least-squares fitting. Such a fit is less susceptible to random noise.
The controller then generates a first estimate of end_point (step 910). The controller generates this estimate by calculating an estimated zero-crossing point based on the estimated frequency from the previous cycle and searching around the estimated crossing point (forwards and backwards) to find the nearest true crossing point (i.e., the occurrence of consecutive samples with different signs). The controller then sets end_point equal to the sample point having the smaller magnitude of the samples surrounding the true crossing point.
Next, the controller sets n, the number of points for curve fitting (step 915). The controller sets n equal to 5 for a sample rate of 11 kHz, and to 21 for a sample rate of 44 kHz. The controller then sets iteration_count to 0 (step 920) and increments iteration_count (step 925) to begin the iterative portion of the procedure.
As a first step in the iterative portion of the procedure, the controller selects step_length (step 930) based on the value of iteration_count. The controller sets step_length equal to 6, 3, or 1 depending on whether iteration_count equals, respectively, 1, 2 or 3.
Next, the controller determines ep_int as the integer portion of the sum of end_point and 0.5 (step 935) and fills the z array (step 940). For example, when n equals 5, z[0] s[ep_int−2*step_length]2, z[1]=s[ep_int−step_length]2, z[1]=s[ep_int]2, z[3]=s[ep_int+step_length]2, and z[4]=s[ep_int+2*step_length]2.
Next, the controller uses a filter, such as a Savitzky-Golay filter, to calculate smoothed values of z[k−1], z[k] and z[k+1] (step 945). Savitzky-Golay smoothing filters are discussed by Press et al. in Numerical Recipes in C, pp, 650-655 (2nd ed., Cambridge University Press, 1995), which is incorporated by reference. The controller then its a quadratic to z[k−1], z[k] and z[k+1] (step 950), and calculates the minimum value of the quadratic (z*) and the corresponding position (x*) (step 955).
If x* is between the points corresponding to k−1 and k+1 (step 960), then the controller sets end_point equal to x* (step 965). Thereafter, if iteration_count is less than 3 (step 970), the controller increments iteration_count (step 925) and repeats the iterative portion of the procedure.
If x* is not between the points corresponding to k−1 and k+1 (step 960), or if iteration_count equals 3 (step 970), the controller exits the iterative portion of the procedure. The controller then calculates the frequency based on the difference between end_point and the starting point for the cycle, which is known (step 975).
In essence, the procedure 900 causes the controller to make three attempts to home in on end_point, using smaller step_lengths in each attempt. If the resulting minimum for any attempt falls outside of the points used to fit the curve (i.e., there has been extrapolation rather than interpolation), this indicates that either the previous or new estimate is poor, and that a reduction in step size is unwarranted.
The procedure 900 may be applied to at least three different sine waves produced by the sensors. These include signals SV1 and SV2 and the weighted sum of the two. Moreover, assuming that zero offset is eliminated, the frequency estimates produced for these signals are independent. This is clearly true for signals SV1 and SV2, as the errors on each are independent. It is also true, however, for the weighted sum, as long as the mass flow and the corresponding phase difference between signals SV1 and SV2 are large enough for the calculation of frequency to be based on different samples in each case. When this is true, the random errors in the frequency estimates also should be independent.
The three independent estimates of frequency can be combined to provide an improved estimate. This combined estimate is simply the mean of the three frequency estimates.
c. Zero Offset Compensation
An important error source in a Coriolis transmitter is zero offset in each of the sensor voltages. Zero offset is introduced into a sensor voltage signal by drift in the pre-amplification circuitry and the analog-to-digital converter. The zero offset effect may be worsened by slight differences in the pre-amplification gains for positive and negative voltages due to the use of differential circuitry. Each error source varies between transmitters, and will vary with transmitter temperature and more generally over time with component wear.
An example of the zero offset compensation technique employed by the controller is discussed in detail below. In general, the controller uses the frequency estimate and an integration technique to determine the zero offset in each of the sensor signals. The controller then eliminates the zero offset from those signals. After eliminating zero offset from signals SV1 and SV2, the controller may recalculate the frequency of those signals to provide an improved estimate of the frequency.
d. Amplitude Determination
The amplitude of oscillation has a variety of potential uses. These include regulating conduit oscillation via feedback, balancing contributions of sensor voltages when synthesizing driver waveforms, calculating sums and differences for phase measurement, and calculating an amplitude rate of change for measurement correction purposes.
In one implementation, the controller uses the estimated amplitudes of signals SV1 and SV2 to calculate the sum and difference of signals SV1 and SV2, and the product of the sum and difference. Prior to determining the sum and difference, the controller compensates one of the signals to account for differences between the gains of the two sensors. For example, the controller may compensate the data for signal SV2 based on the ratio of the amplitude of signal SV1 to the amplitude of signal SV2 so that both signals have the same amplitude.
The controller may produce an additional estimate of the frequency based on the calculated sum. This estimate may be averaged with previous frequency estimates to produce a refined estimate of the frequency of the signals, or may replace the previous estimates.
The controller may calculate the amplitude according to a Fourier-based technique to eliminate the effects of higher harmonics. A sensor voltage x(t) over a period T (as identified using zero crossing techniques) can be represented by an offset and a series of harmonic terms as:
x(t)=a0/2+a1 cos(αt)+a2 cos(2αt)+a3 cos(3αt)+ . . . +b1 sin(αt)+b2 sin(2αt)+ . . .
With this representation, a non-zero offset a0 will result in non-zero cosine terms an. Though the amplitude of interest is the amplitude of the fundamental component (i.e., the amplitude at frequency ω), monitoring the amplitudes of higher harmonic components (i.e., at frequencies lω, where k is greater than 1) may be of value for diagnostic purposes. The values of an and bn may be calculated as:
and
The amplitude, An, of each harmonic is given by:
An=√{square root over (an2+bn2)}.
The integrals are calculated using Simpson's method with quadratic correction (described below). The chief computational expense of the method is calculating the pure sine and cosine functions.
e. Phase Determination
The controller may use a number of approaches to calculate the phase difference between signals SV1 and SV2. For example, the controller may determine the phase offset of each harmonic, relative to the starting time at t=0, as:
The phase offset is interpreted in the context of a single waveform as being the difference between the start of the cycle (i.e., the zero-crossing point) and the point of zero phase for the component of SV(t) of frequency e). Since the phase offset is an average over the entire waveform, it may be used as the phase offset from the midpoint of the cycle. Ideally, with no zero offset and constant amplitude of oscillation, the phase offset should be zero every cycle. The controller may determine the phase difference by comparing the phase offset of each sensor voltage over the same time period.
The amplitude and phase may be generated using a Fourier method that eliminates the effects of higher harmonics. This method has the advantage that it does not assume thin both ends of the conduits are oscillating at the same frequency. As a first step in the method, a frequency estimate is produced using the zero crossings to measure the time between the start and end of the cycle. If linear variation in frequency is assumed, this estimate equals the time-averaged frequency over the period. Using the estimated, and assumed time-invariant, frequency ω of the cycle, the controller calculates:
and
where SV(t) is the sensor voltage waveform (i.e., SV1(t) or SV2(t)). The controller then determines the estimates of the amplitude and phase:
Amp=√{square root over (I12+I22)}, and
The controller then calculates a phase difference, assuming that the average phase and frequency of each sensor signal is representative of the entire waveform. Since these frequencies are different for SV1 and SV2, the corresponding phases are scaled to the average frequency. In addition, the phases are shifted to the same starting point (i.e., the midpoint of the cycle on SV1). After scaling, they are subtracted to provide the phase difference:
and
where h is the sample length and the midpoints are defined in terms of samples:
In general, phase and amplitude are not calculated over the same time-frame for the two sensors. When the flow rate is zero, the two cycle mid-points are coincident. However, they diverge at high flow rates so that the calculations are based on sample sets that are not coincident in time. This leads to increased phase noise in conditions of changing mass flow. At full flow rate, a phase shift of 4° (out of 360°) means that only 99% of the samples in the SV1 and SV2 data sets are coincident. Far greater phase shifts may be observed under aerated conditions, which may lead to even lower rates of overlap.
The controller then calculates the starting and ending points of new data sets (d1m2 and d2m1) with mid-points m2 and m1 respectively, and assuming frequencies of f1m2 and f2m1 (step 1015). These end points do not necessarily coincide with zero crossing points. However, this is not a requirement for Fourier-based calculations.
The controller then carries out the Fourier calculations of phase and amplitude on the sets d1 and d2m1, and the phase difference calculations outlined above (step 1020). Since the mid-points of d1 and d2m1 are identical, scale-shift_SV2 is always zero and can be ignored. The controller repeats these calculations for the data sets d2 and d1m2 (step 1025). The controller then generates averages of the calculated amplitude and phase difference for use in measurement generation (step 1030). When there is sufficient separation between the mid points m1 and m2, the controller also may use the two sets of results to provide local estimates of the rates of change of phase and amplitude.
The controller also may use a difference-amplitude method that involves calculating a difference between SV1 and SV2, squaring the calculated difference, and integrating the result. According to another approach, the controller synthesizes a sine wave, multiplies the sine wave by the difference between signals SV1 and SV2, and integrates the result. The controller also may integrate the product of signals SV1 and SV2, which is a sine wave having a frequency 2f (where f is the average frequency of signals SV1 and SV2), or may square the product and integrate the result. The controller also may synthesize a cosine wave comparable to the product sine wave and multiply the synthesized cosine wave by the product sine wave to produce a sine wave of frequency 4f that the controller then integrates. The controller also may use multiple ones of these approaches to produce separate phase measurements, and then may calculate a mean value of the separate measurements as the final phase measurement.
The difference-amplitude method starts with:
where ⊥ is the phase difference between the sensors. Basic trigonometric identities may be used to define the sum (Sum) and difference (Diff) between the signals as:
and
These functions have amplitudes of 2A1 cos(⊥2) and 2A1 sin(⊥2), respectively. The controller calculates data sets for Sum and Diff from the data for SV1 and SV2, and then uses one or more of the methods described above to calculate the amplitude of the signals represented by those data sets. The controller then uses the calculated amplitudes to calculate the phase difference, ⊥.
As an alternative, the phase difference may be calculated using the function Prod, defined as:
which is a function with amplitude A2 sin ⊥ and frequency 2f. Prod can be generated sample by sample, and ⊥ may be calculated from the amplitude of the resulting sine wave.
The calculation of phase is particularly dependent upon the accuracy of previous calculations (i.e., the calculation of the frequencies and amplitudes of SV1 and SV2). The controller may use multiple methods to provide separate (if not entirely independent) estimates of the phase, which may be combined to give an improved estimate.
f. Drive Signal Generation
The controller generates the drive signal by applying a gain to the difference between signals SV1 and SV2. The controller may apply either a positive gain (resulting in positive feedback) or a negative gain (resulting in negative feedback).
In general, the Q of the conduit is high enough that the conduit will resonate only at certain discrete frequencies. For example, the lowest resonant frequency for some conduits is between 65 Hz and 95 Hz, depending on the density of the process fluid, and irrespective of the drive frequency. As such, it is desirable to drive the conduit at the resonant frequency to minimize cycle-to-cycle energy loss. Feeding back the sensor voltage to the drivers permits the drive frequency to migrate to the resonant frequency.
As an alternative to using feedback to generate the drive signal, pure sine waves having phases and frequencies determined as described above may be synthesized and sent to the drivers. This approach offers the advantage of eliminating undesirable high frequency components, such as harmonics of the resonant frequency. This approach also permits compensation for time delays introduced by the analog-to-digital converters, processing, and digital-to-analog converters to ensure that the phase of the drive signal corresponds to the mid-point of the phases of the sensor signals. This compensation may be provided by determining the time delay of the system components and introducing a phase shift corresponding to the time delay.
Another approach to driving the conduit is to use square wave pulses. This is another synthesis method, with fixed (positive and negative) direct current sources being switched on and off at timed intervals to provide the required energy. The switching is synchronized with the sensor voltage phase. Advantageously, this approach does not require digital-to-analog converters.
In general, the amplitude of vibration of the conduit should rapidly achieve a desired value at startup, so as to quickly provide the measurement function, but should do so without significant overshoot, which may damage the meter. The desired rapid startup may be achieved by setting a very high gain so that the presence of random noise and the high Q of the conduit are sufficient to initiate motion of the conduit. In one implementation, high gain and positive feedback are used to initiate motion of the conduit. Once stable operation is attained, the system switches to a synthesis approach for generating the drive signals.
Referring to
A square wave also may be used during operation to correct conduit osculation problems. For example, in some circumstances, flow meter conduits have been known to begin oscillating at harmonics of the resonant frequency of the conduit, such as frequencies on the order of 1.5 kHz. When such high frequency oscillations are detected, a square wave having a more desirable frequency may be used to return the conduit oscillation to the resonant frequency.
g. Measurement Generation
The controller digitally generates the mass flow measurement in a manner similar to the approach used by the analog controller. The controller also may generate other measurements, such as density.
In one implementation, the controller calculates the mass flow based on the phase difference in degrees between the two sensor signals (phase_diff), the frequency of oscillation of the conduit (freq), and the process temperature (temp):
Tz=temp−Tc,
noneu—mf=tan(Ξ*phase_diff/180), and
massflow=16(MF1*Tz2+MF2*Tz+MF3)*noneu—mf/freq,
where Tc is a calibration temperature, MF1-MF3 are calibration constants calculated during a calibration procedure, and noneu_mf is the mass flow in non-engineering units.
The controller calculates the density based on the frequency of oscillation of the conduit and the process temperature:
Tz=temp−Tc,
c2=freq2, and
density=(D1*Tz2+D2*Tz+D3)/c2+D4*Tz2,
where D1-D4 are calibration constants generated during a calibration procedure.
D. Integration Techniques
Many integration techniques are available, with different techniques requiring different levels of computational effort and providing different levels of accuracy. In the described implementation, variants of Simpson's method are used. The basic technique may be expressed as;
where tk is the time at sample k, yk is the corresponding function value, and h is the step length. This rule can be applied repeatedly to any data vector with an odd number of data points (i.e., three or more points), and is equivalent to fitting and integrating a cubic spline to the data points. If the number of data points happens to be even, then the so-called ⅜ths rule can be applied at one end of the interval:
As stated earlier, each cycle begins and ends at some offset (e.g., start_offset_SV1) from a sampling point. The accuracy of the integration techniques are improved considerably by taking these offsets into account. For example, in an integration of a half cycle sine wave, the areas corresponding to partial samples must be included in the calculations to avoid a consistent underestimate in the result.
Two types of function are integrated in the described calculations: either sine or sine-squared functions. Both are easily approximated close to zero where the end points occur. At the end points, the sine wave is approximately linear and the sine-squared function is approximately quadratic.
In view of these two types of functions, three different integration methods have been evaluated. These are Simpson's method with no end correction, Simpson's method with linear end correction, and Simpson's method with quadratic correction.
The integration methods were tested by generating and sampling pure sine and sine-squared functions, without simulating any analog-to-digital truncation error. Integrals were calculated and the results were compared to the true amplitudes of the signals. The only source of error in these calculations was due to the integration techniques. The results obtained are illustrated in tables A and B.
For sine functions, Simpson's method with linear correction was unbiased with the smallest standard deviation, while Simpson's method without correction was biased to a negative error and Simpson's method with quadratic correction had a relatively high standard deviation. For sine-squared functions, the errors were generally reduced, with the quadratic correction providing the best result. Based on these evaluations, linear correction is used when integrating sine functions and quadratic correction is used when integrating sine-squared functions.
E. Synchronous Modulation Technique
First, the controller generates an initial estimate of the nominal operating frequency of the system (step 1405). The controller then attempts to measure the deviation of the frequency of a signal x[k] (e.g., SV1) from this nominal frequency:
x[k]=A sin [(α0+−α)kh+>]+M(k),
where A is the amplitude of the sine wave portion of the signal, α0 is the nominal frequency (e.g., 88 Hz), −α is the deviation from the nominal frequency, h is the sampling interval, > is the phase shift, and M(k) corresponds to the added noise and harmonics.
To generate this measurement, the controller synthesizes two signals that oscillate at the nominal frequency (step 1410). The signals are phase shifted by 0 and Ξ/2 and have amplitude of unity. The controller multiplies each of these signals by the original signal to produce signals y1 and y2 (step 1415):
and
where the first terms of y1 and y2 are high frequency (e.g., 176 Hz) components and the second terms are low frequency (e.g., 0 Hz) components. The controller then eliminates the high frequency components using a low pass filter (step 1420):
and
where ε1[k] and ε2[k] represent the filtered noise from the original signals. The controller combines these signals to produce u[k] (step 1425):
which carries the essential information about the frequency deviation. As shown, u1[k] represents the real component of u[k], while u2[k] represents the imaginary component.
The controller uses the real and imaginary components of u[k] to calculate the frequency deviation, −f (step 1430):
The controller then adds the frequency deviation to the nominal frequency (step 1435) to give the actual frequency:
f=Δf+f0.
The controller also uses the real and imaginary components of u[k] to determine the amplitude of the original signal. In particular, the controller determines the amplitude as (step 1440):
A2=4√{square root over (u12[k]+u22[k])}.
Next, the controller determines the phase difference between the two sensor signals (step 1445). Assuming that any noise (ε1[k] and ε2[k]) remaining after application of the low pass filter described below will be negligible, noise free versions of y1′[k] and y2′[k] (y1*[k] and y2*[k]) may be expressed as:
and
Multiplying these signals together gives:
Filtering this signal by a low pass filter having a cutoff frequency near 0 Hz removes the unwanted component and leaves:
from which the phase difference can be calculated as:
This procedure relies on the accuracy with which the operating frequency is initially estimated, as the procedure measures only the deviation from this frequency. If a good estimate is given, a very narrow filter can be used, which makes the procedure very accurate. For typical flowmeters, the operating frequencies are around 95 Hz (empty) and 82 Hz (full). A first approximation of half range (88 Hz) is used, which allows a low-pass filter cut-off of 13 Hz. Care must be taken in selecting the cut-off frequency as a very small cut-off frequency can attenuate the amplitude of the sine wave.
The accuracy of measurement also depends on the filtering characteristics employed. The attenuation of the filter in the dead-band determines the amount of harmonics rejection, while a smaller cutoff frequency improves the noise rejection.
F. Meter with PI Control
The controller 1505 also generates drive signals using the digitized sensor signals. The controller 1505 provides these drive signals to digital-to-analog converters 1520 that convert the signals to analog signals that are supplied to the multiplying digital-to-analog converters 1515.
The multiplying digital-to-analog converters 1515 multiply the analog signals by the gains from the controller 1505 to produce signals for driving the conduit. Amplifiers 1525 then amplify these signals and supply them to the drivers 46. Similar results could be obtained by having the controller 1505 perform the multiplication performed by the multiplying digital-to-analog converter, at which point the multiplying digital-to-analog converter could be replaced by a standard digital-to-analog converter.
e(t)=a0−a(t).
The error e(t) is used by a proportional-integral (“PI”) control block 1560 to generate a gain K0(t). This gain is multiplied by the difference of the sensor signals to generate the drive signal. The PI control block permits high speed response to changing conditions. The amplitude detector 1550, summer 1555, and PI control block 1560 may be implemented as software processed by the controller 1505, or as separate circuitry.
1. Control Procedure
The meter 1500 operates according to the procedure 1600 illustrated in
In the measurement branch 1610, the digitized sensor data is used to generate measurements of amplitude, frequency, and phase, as described above (step 1625). These measurements then are used to calculate the mass flow rate (step 1630) and other process variables. In general, the controller 1505 implements the measurement branch 1610.
In the drive signal generation branch 1615, the digitized signals from the two sensors are differenced to generate the signal (step 1635) that is multiplied by the gain to produce the drive signal. As described above, this differencing operation is performed by the controller 1505. In general, the differencing operation produces a weighted difference that accounts for amplitude differences between the sensor signals.
In the gain generation branch 1620, the gain is calculated using the proportional-integral control block. As noted above, the amplitude, a(t), of motion of the conduit is determined (step 1640) and subtracted from the desired amplitude a0 (step 1645) to calculate the error e(t). Though illustrated as a separate step, generation of the amplitude, a(t), may correspond to generation of the amplitude in the measurement generation step 1625. Finally, the PI control block uses the error e(t) to calculate the gain (step 1650).
The calculated gain is multiplied by the difference signal to generate the drive signal supplied to the drivers (step 1655). As described above, this multiplication operation is performed by the multiplying, D/A converter or may be performed by the controller.
2. PI Control Block
The objective of the PI control block is to sustain in the conduit pure sinusoidal oscillations having an amplitude a0. The behavior of the conduit may be modeled as a simple mass-spring system that may be expressed as:
{umlaut over (x)}+2ζωn{dot over (x)}+ωn2x=0,
where x is a function of time and the displacement of the mass from equilibrium, αn is the natural frequency, and N is a damping factor, which is assumed to be small (e.g., 0.001). The solution to this force equation as a function of an output y(t) and an input i(t) is analogous to an electrical network in which the transfer function between a supplied current, i(s), and a sensed output voltage, y(s), is:
To achieve the desired oscillation in the conduit, a positive-feedback loop having the gain K0(t) is automatically adjusted by a ‘slow’ outer loop to give:
{umlaut over (x)}+(2ζωn−kK0(t)){dot over (x)}+ωn2x=0.
The system is assumed to have a “two-time-scales” property, which means that variations in Kg(t) are slow enough that solutions to the equation for x provided above can be obtained by assuming constant damping.
A two-term PI control block that gives zero steady-state error may be expressed as:
K0(t)=Kpe(t)+Ki∫0te(t)dt,
where the error, e(t)(i.e., a0-a(t)), is the input to the PI control block, and Kp and Ki are constants. In one implementation, with a0=10, controller constants of Kp=0.02 and Ki=0.0005 provide a response in which oscillations build up quickly. However, this PI control block is nonlinear, which may result in design and operational difficulties.
A linear model of the behavior of the oscillation amplitude may be derived by assuming that x(t) equals AMjαt, which results in:
{dot over (x)}={dot over (A)}ejωt+jωejωt, and
{umlaut over (x)}=[Ä−ω2A]ejωt+2jω{dot over (A)}ejωt.
Substituting these expressions into the expression for oscillation of the loop, and separating into real and imaginary terms, gives:
jω{2{dot over (A)}+(2ζωn−kK0)A}=0, and
Ä+(2ζωn−kK0){dot over (A)}+(ωn2−ω2)A=0.
A(t) also may be expressed as:
A solution of this equation is:
Transforming variables by defining a(t) as being equal to log A(t), the equation for A(t) can be written as:
where Ko is now explicitly dependent on time. Taking Laplace transforms results in:
which can be interpreted in terms of transfer-functions as in
From
The root locus for varying Kp is shown in
Although the poles are purely real at point P, this does not mean there is no overshoot in the closed-loop step response. This is most easily seen by inspecting the transfer function between the desired value, a0, and the error e:
where p2 is a second-order polynomial. With a step input, ao(s)=I/s, the response can be written as Ip′(t), where p(t) is the inverse transform of 1/p2(s) and equals a1exp(−Σ1t)+a2exp(−Σ2t). The signal p(t) increases and then decays to zero so that e(t), which is proportional to p′, must change sign, implying overshoot in a(t). The set-point ao may be prefiltered to give a pseudo set-point ao*:
where Ti is the known controller parameter. With this prefilter, real controller poles should provide overshoot-free step responses. This feature is useful as there may be physical constraints on overshoot (e.g., mechanical interference or overstressing of components).
The root locus of
Another approach uses a peak-follower that includes a zero-crossing detector together with a peak-following algorithm implemented in the controller. Zero-crossing methods, however, can be susceptible to noise. In addition, results from a peal-follower are available only every half-cycle and thereby dictate the sample interval for controller updates.
Finally, an AM detector may be employed. Given a sine wave y(t)=A sin αnt, an estimate of A may be obtained from Â10.5ΞF{abs(y)}, where F{ } is a suitable low-pass filter with unity DC gain. The AM detector is the simplest approach. Moreover, it does not presume that there are oscillations of any particular frequency, and hence is usable during startup conditions. It suffers from a disadvantage that there is a leakage of harmonics into the inner loop which will affect the spectrum of the resultant oscillations. In addition, the filter adds extra dynamics into the outer loop such that compromises need to be made between speed of response and spectral purity. In particular, an effect of the filter is to constrain the choice of the best Ti.
The Fourier series for abs(y) is known to be:
As such, the output has to be scaled by π/2 to give the correct DC output A, and the (even) harmonic terms ak cos 2kωnt have to be filtered out. As all the filter needs to do is to pass the DC component through and reduce all other frequencies, a “brick-wall” filter with a cut-off below 2ωn is sufficient. However, the dynamics of the filter will affect the behavior of the closed-loop. A common choice of filter is in the Butterworth form. For example, the third-order low-pass filter with a design break-point frequency ωb is:
At the design frequency the response is 3 dB down; at 2ωb it is −18 dB (0.12), and at 4ωb it is −36 dB (0.015) down. Higher-order Butterworth filters have a steeper roll-off, but most of their poles are complex and may affect negatively the control-loop's root locus.
G. Zero Offset Compensation
As noted above, zero offset may be introduced into a sensor voltage signal by drift in the pre-amplification circuitry and by the analog-to-digital converter. Slight differences in the pre-amplification gains for positive and negative voltages due to the use of differential circuitry may worsen the zero offset effect. The errors vary between transmitters, and with transmitter temperature and component wear.
Audio quality (i.e., relatively low cost) analog-to-digital converters may be employed for economic reasons. These devices are not designed with DC offset and amplitude stability as high priorities.
If phase is calculated using the time difference between zero crossing points on the two sensor voltages, DC offset may lead to phase errors. This effect is illustrated by
More sophisticated phase measurement techniques, such as those based on Fourier methods, are immune to DC offset. However, it is desirable to eliminate zero offset even when those techniques are used, since data is processed in whole-cycle packets delineated by zero crossing points. This allows simpler analysis of the effects of, for example, amplitude modulation on apparent phase and frequency. In addition, gain mismatch between positive and negative voltages will introduce errors into any measurement technique.
The zero-crossing technique of phase detection may be used to demonstrate the impact of zero offset and gain mismatch error, and their consequent removal.
1. Compensation Technique
A technique for dealing with voltage offset and gain mismatch uses the computational capabilities of the digital transmitter and does not require a zero flow condition. The technique uses a set of calculations each cycle which, when averaged over a reasonable period (e.g., 10,000 cycles), and excluding regions of major change (e.g., set point change, onset of aeration), converge on the desired zero offset and gain mismatch compensations.
Assuming the presence of up to three higher harmonics, the desired waveform for a sensor voltage SV(t) is of the form:
SV(t)=A1 sin(ωt)+A2 sin(2ωt)+A3 sin(3ωt)+A4 sin(4ωt)
where A1 designates the amplitude of the fundamental frequency component and A2-A4 designate the amplitudes of the three harmonic components. However, in practice, the actual waveform is adulterated with zero offset Zo (which has a value close to zero) and mismatch between the negative and positive gains Gn and Gp. Without any loss of generality, it can be assumed that Gp equals one and that Gn is given by:
Gn=1+MG,
where MG represents the gain mismatch.
The technique assumes that the amplitudes Ai and the frequency ω are constant. This is justified because estimates of Zo and MG are based on averages taken over many cycles (e.g., 10,000 interleaved cycles occurring in about 1 minute of operation). When implementing the technique, the controller tests for the presence of significant changes in frequency and amplitude to ensure the validity of the analysis. The presence of the higher harmonics leads to the use of Fourier techniques for extracting phase and amplitude information for specific harmonics. This entails integrating SV(t) and multiplying by a modulating sine or cosine function.
The zero offset impacts the integral limits, as well as the functional form. Because there is a zero offset, the starting point for calculation of amplitude and phase will not be at the zero phase point of the periodic waveform SV(t). For zero offset Zo, the corresponding phase offset is, approximately,
For small phase,
with corresponding time delay
The integrals are scaled so that the limiting value (i.e., as Zo and ωc, approach zero) equals the amplitude of the relevant harmonic. The first two integrals of interest are:
and
These integrals represent what in practice is calculated during a normal Fourier analysis of the sensor voltage data. The subscript 1 indicates the first harmonic, N and P indicate, respectively, the negative or positive half cycle, and s and c indicate, respectively, whether a sine or a cosine modulating function has been used.
Strictly speaking, the mid-zero crossing point, and hence the corresponding integral limits, should be given by π/ω−tZo, rather than π/ω+tZo. However, the use of the exact mid-point rather than the exact zero crossing point leads to an easier analysis, and better numerical behavior (due principally to errors in the location of the zero crossing point). The only error introduced by using the exact mid-point is that a small section of each of the above integrals is multiplied by the wrong gain (1 instead of 1+εG and vice versa). However, these errors are of order Zo2εG and are considered negligible.
Using computer algebra and assuming small Zo and εG, first order estimates for the integrals may be derived as:
and
Useful related functions including the sum, difference, and ratio of the integrals and their estimates may be determined. The sum of the integrals may be expressed as:
SUM1s=(I1Ps+I1Ns),
while the sum of the estimates equals:
Similarly, the difference of the integrals may be expressed as:
Diff1s=I1Ps−I1Ns,
while the difference of the estimates is:
Finally, the ratio of the integrals is:
while the ratio of the estimates is:
Corresponding cosine integrals are defined as:
and
with estimates:
and
and sums:
Sum1C=I1Pc+I1Nc, and
Second harmonic integrals are:
and
with estimates:
and
and sums:
Sum2s=I2Ps+I2Ns, and
The integrals can be calculated numerically every cycle. As discussed below, the equations estimating the values of the integrals in terms of various amplitudes and the zero offset and gain values are rearranged to give estimates of the zero offset and gain terms based on the calculated integrals.
2. Example
The accuracy of the estimation equations may be illustrated with an example. For each basic integral, three values are provided: the “true” value of the integral (calculated within Mathcad using Romberg integration), the value using the estimation equation, and the value calculated by the digital transmitter operating in simulation mode, using Simpson's method with end correction.
Thus, for example, the value for (I1Ps
is 0.101353, while the estimated value (I1Ps
is 0.101358. The value calculated using the digital transmitter in simulation mode is 0.101340. These calculations use the parameter values illustrated in Table C.
The exact, estimate and simulation results from using these parameter values are illustrated in Table D.
Thus, at least for the particular values selected, the estimates given by the first order equations are extremely accurate. As Zo and εG approach zero, the errors in both the estimate and the simulation approach zero.
3. Implementation
The first order estimates for the integrals define a series of non-linear equations in terms of the amplitudes of the harmonics, the zero offset, and the gain mismatch. As the equations are nonlinear, an exact solution is not readily available. However, an approximation followed by corrective iterations provides reasonable convergence with limited computational overhead.
Conduit-specific ratios may be assumed for A1-A4. As such, no attempt is made to calculate all of the amplitudes A1-A4. Instead, only A1 and A2 are estimated using the integral equations defined above. Based on experience of the relative amplitudes, A3 may be approximated as A2/2, and A4 may be approximated as A2/10.
The zero offset compensation technique may be implemented according to the procedure 2200 illustrated in
Every 10,000 cycles, the controller checks on the slope of the sensor voltage amplitude A1, using a conventional rate-of-change estimation technique (step 2210). If the amplitude is constant (step 2215), then the controller proceeds with calculations for zero offset and gain mismatch. This cheek may be extended to test for frequency stability.
To perform the calculations, the controller generates average values for the functions (e.g., sum1s) over the last 10,000 cycles. The controller then makes a first estimation of zero offset and gain mismatch (step 2225):
Z0=−Sum1c/2, and
MG=1/Ratio1s−1
Using these values, the controller calculates an inverse gain factor (k) and amplitude factor (amp_factor) (step 2230):
k=1.0/(1.0+0.5*MG), and
amp_factor=1+50/75*Sum2s/Sum1s
The controller uses the inverse gain factor and amplitude factor to make a first estimation of the amplitudes (step 2235):
A1=k*[Sum1s/2+2/π*Zo*εG*amp_factor], and
A2=k*[Sum2s/2−4/(3*π)*Zo*εG
The controller then improves the estimate by the following calculations, iterating as required (step 2240):
x1=Zo,
x2=εG,
εG=[1+8/π*x1/A1*amp_factor]/Ratio1s−1.0,
Zo=−Sum1c/2+x2*(x1+2.773/π*A2)/2,
A1=k*[Sum1s/2+2/π*x1*x2*amp_factor],
A2=k*[Sum2s/2−4/(15*π)*x1*x2*(5−4.5*A2)].
The controller uses standard techniques to test for convergence of the values of Zo and εG. In practice the corrections are small after the first iteration, and experience suggests that three iterations are adequate.
Finally, the controller adjusts the raw data to eliminate Zo and εG (step 2245). The controller then repeats the procedure. Once zero offset and gain mismatch have been eliminated from the raw data, the functions (i.e., sum1s) used in generating subsequent values for Zo and εG are based on corrected data. Accordingly, these subsequent values for Zo and εG reflect residual zero offset and gain mismatch, and are summed with previously generated values to produce the actual zero offset and gain mismatch. In one approach to adjusting the raw data, the controller generates adjustment parameters (e.g., S1_off and S2_off) that are used in converting the analog signals from the sensors to digital data.
The difference between the positive and negative mean values has been reduced by a factor of 20, with a corresponding reduction in mean zero offset in the interleaved data set. The corresponding standard deviation has been reduced by a factor of approximately 6.
Longer term behavior is shown in
Typical values for Zo and εG for the digital Coriolis meter are Zo=−7.923e−4 and εG=−1.754e−5 for signal SV1, and Zo=−8.038e−4 and εG+6.93e−4 for signal SV2.
H. Dynamic Analysis
In general, conventional measurement calculations for Coriolis meters assume that the frequency and amplitude of oscillation on each side of the conduit are constant, and that the frequency on each side of the conduit is identical and equal to the so-called resonant frequency. Phases generally are not measured separately for each side of the conduit, and the phase difference between the two sides is assumed to be constant for the duration of the measurement process. Precise measurements of frequency, phase and amplitude every half-cycle using the digital meter demonstrate that these assumptions are only valid when parameter values are averaged over a time period on the order of seconds. Viewed at 100 Hz or higher frequencies, these parameters exhibit considerable variation. For example, during normal operation, the frequency and amplitude values of SV1 may exhibit strong negative correlation with the corresponding SV2 values. Accordingly, conventional measurement algorithms are subject to noise attributable to these dynamic variations. The noise becomes more significant as the measurement calculation rate increases. Other noise tea ins may be introduced by physical factors, such as flowtube dynamics, dynamic non-linearities (e.g. flowtube stiffness varying with amplitude), or the dynamic consequences of the sensor voltages providing velocity data rather than absolute position data.
The described techniques exploit the high precision of the digital meter to monitor and compensate for dynamic conduit behavior to reduce noise so as to provide more precise measurements of process variables such as mass flow and density. This is achieved by monitoring and compensating for such effects as the rates of change of frequency, phase and amplitude, flowtube dynamics, and dynamic physical non-idealities. A phase difference calculation which does not assume the same frequency on each side has already been described above. Other compensation techniques are described below.
Monitoring and compensation for dynamic effects may take place at the individual sensor level to provide corrected estimates of phase, frequency, amplitude or other parameters. Further compensation may also take place at the conduit level, where data from both sensors are combined, for example in the calculation of phase difference and average frequency. These two levels may be used together to provide comprehensive compensation.
Thus, instantaneous mass flow and density measurements by the flowmeter may be improved by modelling and accounting for dynamic effects of flowmeter operation. In general, 80% or more of phase noise in a Coriolis flowmeter may be attributed to flowtube dynamics (sometimes referred to as “ringing”), rather than to process conditions being measured. The application of a dynamic model can reduce phase noise by a factor of 4 to 10, leading to significantly improved flow measurement performance. A single model is effective for all flow rates and amplitudes of oscillation. Generally, computational requirements are negligible.
The dynamic analysis may be performed on each of the sensor signals in isolation from the other. This avoids, or at least delays, modelling the dynamic interaction between the two sides of the conduit, which is likely to be far more complex than the dynamics at each sensor. Also, analyzing the individual sensor signals is more likely to be successful in circumstances such as batch startup and aeration where the two sides of the conduit are subject to different forces from the process fluid.
In general, the dynamic analysis considers the impact of time-varying amplitude, frequency and phase on the calculated values for these parameters. While the frequency and amplitude are easily defined for the individual sensor voltages, phase is conventionally defined in terms of the difference between the sensor voltages. However, when a Fourier analysis is used, phase for the individual sensor may be defined in terms of the difference between the midpoint of the cycle and the average 180° phase point.
Three types of dynamic effects are measurement error and the so-called “feedback” and “velocity” effects. Measurement error results because the algorithms for calculating amplitude and phase assume that frequency, amplitude, and phase are constant over the time interval of interest. Performance of the measurement algorithms may be improved by correcting for variations in these parameters.
The feedback effect results from supplying energy to the conduit to make up for energy loss from the conduit so as to maintain a constant amplitude of oscillation. The need to add energy to the conduit is only recognized after the amplitude of oscillation begins to deviate from a desired setpoint. As a result, the damping term in the equation of motion for the oscillating conduit is not zero, and, instead, constantly dithers around zero. Although the natural frequency of the conduit does not change, it is obscured by shifts in the zero-crossings (i.e., phase variations) associated with these small changes in amplitude.
The velocity effect results because the sensor voltages observe conduit velocity, but are analyzed as being representative of conduit position. A consequence of this is that the rate of change of amplitude has an impact on the apparent frequency and phase, even if the true values of these parameters are constant.
1. Sensor-Level Compensation for Amplitude Modulation
One approach to correcting for dynamic effects monitors the amplitudes of the sensor signals and makes adjustments based on variations in the amplitudes. For purposes of analyzing dynamic effects, it is assumed that estimates of phase, frequency and amplitude may be determined for each sensor voltage during each cycle. As shown in
Linear variation in amplitude, frequency, and phase are assumed. Under this assumption, the average value of each parameter during a cycle equals the instantaneous value of the parameter at the mid-point of the cycle. Since the cycles overlap by 180 degrees, the average value for a cycle equals the starting value for the next cycle.
For example, cycle n is from time 0 to 2π/ω. The average values of amplitude, frequency and phase equal the instantaneous values at the mid-point, π/ω, which is also the starting point for cycle n+1, which is from time π/ω to 3π/ω. Of course, these timings are approximate, since ω also varies with time.
a. Dynamic Effect Compensation Procedure
The controller accounts for dynamic effects according to the procedure 2600 illustrated in
The controller then uses the estimated frequency to generate a first estimate of amplitude and phase using the Fourier method described above (step 2610). As noted above, this method eliminates the effects of higher harmonics.
Phase is interpreted in the context of a single waveform as being the difference between the start of the cycle (i.e., the zero-crossing point) and the point of zero phase for the component of SV(t) of frequency ω, expressed as a phase offset. Since the phase offset is an average over the entire waveform, it may be used as the phase offset from the midpoint of the cycle. Ideally, with no zero offset and constant amplitude of oscillation, the phase offset should be zero every cycle. In practice, however, it shows a high level of variation and provides an excellent basis for correcting mass flow to account for dynamic changes in amplitude.
The controller then calculates a phase difference (step 2615). Though a number definitions of phase difference are possible, the analysis assumes that the average phase and frequency of each sensor signal is representative of the entire waveform. Since these frequencies are different for SV1 and SV2, the corresponding phases are scaled to the average frequency. In addition, the phases are shifted to the same starting point (i.e., the midpoint of the cycle on SV1). After scaling, they are subtracted to provide the phase difference.
The controller next determines the rate of change of the amplitude for the cycle n (step 2620):
This calculation assumes that the amplitude from cycle n+1 is available when calculating the rate of change of cycle n. This is possible if the corrections are made one cycle after the raw amplitude calculations have been made. The advantage of having an accurate estimate of the rate of change, and hence good measurement correction, outweighs the delay in the provision of the corrected measurements, which, in one implementation, is on the order of 5 milliseconds. The most recently generated information is always used for control of the conduit (i.e., for generation of the drive signal).
If desired, a revised estimate of the rate of change can be calculated after amplitude correction has been applied (as described below). This results in iteration to convergence for the best values of amplitude and rate of change.
b. Frequency Compensation for Feedback and Velocity Effects
As noted above, the dynamic aspects of the feedback loop introduce time varying shifts in the phase due to the small deviations in amplitude about the set-point. This results in the measured frequency, which is based on zero-crossings, differing from the natural frequency of the conduit. If velocity sensors are used, an additional shift in phase occurs. This additional shift is also associated with changes in the positional amplitude of the conduit. A dynamic analysis can monitor and compensate for these effects. Accordingly, the controller uses the calculated rate of amplitude change to correct the frequency estimate (step 2625).
The position of an oscillating conduit in a feedback loop that is employed to maintain the amplitude of oscillation of the conduit constant may be expressed as:
X=A(t)sin(ω0t−θ(t)),
where θ(t) is the phase delay caused by the feedback effect. The mechanical Q of the oscillating conduit is typically on the order of 1000, which implies small deviations in amplitude and phase. Under these conditions, θ(t) is given by:
Since each sensor measures velocity:
where γ(t) is the phase delay caused by the velocity effect:
Since the mechanical Q of the conduit is typically on the order of 1000, and, hence, variations in amplitude and phase are small, it is reasonable to assume:
This means that the expression for SV(t) may be simplified to:
SV(t)≈ω0A(t)cos(ω0t−θ(t)−γ(t)),
and for the same reasons, the expression for the velocity offset phase delay may be simplified to:
Summing the feedback and velocity effect phase delays gives the total phase delay:
and the following expression for SV(t):
SV(t)≈ω0A(t)cos [(ω0t−φ(t)].
From this, the actual frequency of oscillation may be distinguished from the natural frequency of oscillation. Though the former is observed, the latter is useful for density calculations. Over any reasonable length of time, and assuming adequate amplitude control, the averages of these two frequencies are the same (because the average rate of change of amplitude must be zero). However, for improved instantaneous density measurement, it is desirable to compensate the actual frequency of oscillation for dynamic effects to obtain the natural frequency. This is particularly useful in dealing with aerated fluids for which the instantaneous density can vary rapidly with time.
The apparent frequency observed for cycle n is delineated by zero crossings occurring at the midpoints of cycles n−1 and n+1. The phase delay due to velocity change will have an impact on the apparent start and end of the cycle:
Based on this analysis, a correction can be applied using an integrated error term:
and
est_freqn=obs_freqn−error_sumn,
where the value of error_sum at startup (i.e., the value at cycle zero) is:
Though these equations include a constant term having a value of ⅛π2, actual data has indicated that a constant term of ⅛π is more appropriate. This discrepancy may be due to unmodelled dynamics that may be resolved through further analysis.
The calculations discussed above assume that the true amplitude of oscillation, A, is available. However, in practice, only the sensor voltage SV is observed. This sensor voltage may be expressed as:
SV(t))≈ω0){dot over (A)}(t)cos(ω0t−φ(t))
The amplitude, amp_SV(t), of this expression is:
amp_SV(t)≈ω0{dot over (A)}(t).
The rate of change of this amplitude is:
roc_amp_SV(t)≈ω0{dot over (A)}(t)
so that the following estimation can be used:
c. Application of Feedback and Velocity Effect Frequency Compensation
d. Corn sensation of Phase Measurement for Amplitude Modulation
Referring again to
Ignoring higher harmonics, and assuming that any zero offset has been eliminated, the expression for the sensor voltage is given by:
SV(t)≈A1(1+λAt)sin(ωt)
where ΣA is a constant corresponding to the relative change in amplitude with time. As discussed above, the integrals I1 and I2 may be expressed as:
and
Evaluating these integrals results in:
and
Substituting these expressions into the calculation for amplitude and expanding as a series in ΣA results in:
Assuming ΣA is small, and ignoring all terms after the first order term, this may be simplified to:
This equals the amplitude of SV(t) at the midpoint of the cycle (t=π/ω). Accordingly, the amplitude calculation provides the required result without correction.
For the phase calculation, it is assumed that the true phase difference and frequency are constant, and that there is no voltage offset, which means that the phase value should be zero. However, as a result of amplitude modulation, the correction to be applied to the raw phase data to compensate for amplitude modulation is:
Assuming that the expression in brackets is small, the inverse tangent function can be ignored.
A more elaborate analysis considers the effects of higher harmonics. Assuming that the sensor voltage may be expressed as:
SV(t)=(1+λAt)[A1 sin(ωt)+A2 sin(2ωt)+A3 sin(ωt)+A4 sin(4ωt)]
such that all harmonic amplitudes increase at the same relative rate over the cycle, then the resulting integrals may be expressed as:
and
for positive cycles, and
for negative cycles.
For amplitude, substituting these expressions into the calculations establishes that the amplitude calculation is only affected in the second order and higher terms, so that no correction is necessary to a first order approximation of the amplitude. For phase, the correction term becomes:
for positive cycles, and
for negative cycles. These correction terms assume the availability of the amplitudes of the higher harmonies. While these can be calculated using the usual Fourier technique, it is also possible to approximate some or all them using assumed ratios between the harmonics. For example, for one implementation of a one inch diameter conduit, typical amplitude ratios are A1=1.0, A2=0.01, A3=0.005, and A4=0.001.
e. Application of Amplitude Modulation Compensation to Phase
Simulations have been carried out using the digital transmitter, including the simulation of higher harmonies and amplitude modulation. One example uses f===80 Hz, A1 (t=0)=0.3, A2=0, A3=0, A4=0, ΣA=1e−5*48 KHz (sampling rate)=0.47622, which corresponds to a high rate of change of amplitude, but with no higher harmonics. Theory suggests a phase offset of −0.02706 degrees. In simulation over 1000 cycles, the average offset is −0.02714 degrees, with a standard deviation of only 2.17e−6. The difference between simulation and theory (approx 0.3% of the simulation error) is attributable to the model's assumption of a linear variation in amplitude over each cycle, while the simulation generates an exponential change in amplitude.
A second example includes a second harmonic, and has the parameters f=80 Hz, A1 (t=0)=0.3, A2 (t=0)=0.003, A3=0, A4=0, ΣA=−1e−6*48 KHz (sampling rate)=−0.047622. For this example, theory predicts the phase offset to be +2.706e−3, +/−2.66% for positive or negative cycles. In simulation, the results are 2.714e−3+/−2.66%, which again matches well.
f. Compensation to Phase Measurement for Velocity Effect
The phase measurement calculation is also affected by the velocity effect. A highly effective and simple correction factor, in radians, is of the form
where −SV(tk) is the relative rate of change of amplitude and may be expressed as:
where tk is the completion time for the cycle for which −SV(tk) is being determined, tk−1 is the completion time for the next cycle, and is the completion time of the previous cycle. −SV is an estimate of the rate of change of SV, scaled by its absolute value, and is also referred to as the proportional rate of change of SV.
Comparison of
g. Application of Sensor Level Noise Reduction
The combination of phase noise reduction techniques described above results in substantial improvements in instantaneous phase difference measurement in a variety of flow conditions, as illustrated in
It is perhaps surprising that the Fourier technique, which uses far more data, a more sophisticated analysis, and much more computational effort, results in a noisier calculation. This can be attributed to the sensitivity of the Fourier technique to the dynamic effects described above. The innermost band of data 3610 shows the same Fourier data after the application of the sensor-level noise reduction techniques. As can be seen, substantial noise reduction occurs in each ease, as indicated by the standard deviation values presented on each graph.
2. Flowtube Level Dynamic Modelling
A dynamic model may be incorporated in two basic stages, in the first stage, the model is created using the techniques of system identification. The flowtube is “stimulated” to manifest its dynamics, while the true mass flow and density values are kept constant. The response of the flowtube is measured and used in generating the dynamic model. In the second stage, the model is applied to normal flow data. Predictions of the effects of flowtube dynamics are made for both phase and frequency. The predictions then are subtracted from the observed data to leave the residual phase and frequency, which should be due to the process alone. Each stage is described in more detail below.
a. System Identification
System identification begins with a flowtube full of water, with no flow. The amplitude of oscillation, which normally is kept constant, is allowed to vary by assigning a random setpoint between 0.05 V and 0.3 V, where 0.3 V is the usual value. The resulting sensor voltages are shown in
First, as noted above, −SV(tk) may be expressed as:
This expression may be used to determine −SV1 and −SV2.
The phase of the flowtube is related to −, which is defined as −SV1−SV2, while the frequency is related to −+, which is defined as −SV1+−SV2. These parameters are illustrated in
Some correction for flowtube dynamics may be obtained by subtracting a multiple of the appropriate prediction function from the phase and/or the frequency. Improved results may be obtained using a model of the form:
y(k)+a1y(k−1)+ . . . +any(k−n)=b0u(k)+b1u(k−1)+ . . . +bmu(k−m),
where y(k) is the output (i.e., phase or frequency) and u is the prediction function (i.e., −− or −+). The technique of system identification suggests values for the orders n and m, and the coefficients ai and bj, of what are in effect polynomials in time. The value of y(k) can be calculated every cycle and subtracted from the observed phase or frequency to get the residual process value.
It is important to appreciate that, even in the absence of dynamic corrections, the digital flowmeter offers very good precision over a long period of time. For example, when totalizing a batch of 200 kg, the device readily achieves a repeatability of less that 0.03%. The purpose of the dynamic modelling is to improve the dynamic precision. Thus, raw and compensated values should have similar mean values, but reductions in “variance” or “standard deviation.”
More effective phase identification has been achieved through further simulation of flowtube dynamics by continuous striking of the flowtube during data collection (set point changes are still carried out).
b. Application to Flow Data
The real test of an identified model is the improvements it provides for new data. At the outset, it is useful to note a number of observations. First, the mean phase, averaged over, for example, ten seconds or more, is already quite precise. In the examples shown, phase values are plotted at 82 Hz or thereabouts. The reported standard deviation would be roughly ⅓ of the values shown when averaged to 10 Hz, and 1/9 when averages to 1 Hz. For reference, on a one inch flow tube, one degree of phase difference corresponds to about 1 kg/s flow rate.
The expected benefit of the technique is that of providing a much better dynamic response to true process changes, rather than improving average precision. Consequently, in the following examples, where the flow is non-zero, small flow step changes are introduced every ten seconds or so, with the expectation that the corrected phase will show up the step changes more clearly.
The effects of the technique on low (
3. Extensions of Dynamic Monitoring and Compensation Techniques
The previous sections have described a variety of techniques (physical modelling, system identification, heuristics) used to monitor and compensate for different aspects of dynamic behavior (frequency and phase noise caused by amplitude modulation, velocity effect, flowtube dynamics at both the sensor and the flowtube level). By natural extension, similar techniques well-known to practitioners of control and/or instrumentation, including those of artificial intelligence, neural networks, fuzzy logic, and genetic algorithms, as well as classical modelling and identification methods, may be applied to these and other aspects of the dynamic performance of the meter. Specifically, these might include monitoring and compensation for frequency, amplitude and/or phase variation at the sensor level, as well as average frequency and phase difference at the flowtube level, as these variations occur within each measurement interval, as well as the time between measurement intervals (where measurement intervals do not overlap).
This technique is unusual in providing both reduced noise and improved dynamic response to process measurement changes. As such, the technique promises to be highly valuable in the context of flow measurement.
I. Aeration (Two-Phase Flow)
The digital flowmeter provides improved performance in the presence of aeration (also known as two-phase flow) in the conduit. Aeration causes energy losses in the conduit that can have a substantial negative impact on the measurements produced by a mass flowmeter and can result in stalling of the conduit. Experiments have shown that the digital flowmeter has substantially improved performance in the presence of aeration relative to traditional, analog flowmeters. This performance improvement may stem from the meter's ability to provide a very wide gain range, to employ negative feedback, to calculate measurements precisely at very low amplitude levels, and to compensate for dynamic effects such as rate of change of amplitude and flowtube dynamics. The performance improvement also may stem from the meter's use of a precise digital amplitude control algorithm.
The digital flowmeter detects the onset of aeration when the required driver gain rises simultaneously with a drop in apparent fluid density. The digital flowmeter then may directly respond to detected aeration. In general, the meter monitors the presence of aeration by comparing the observed density of the material flowing through the conduit (i.e., the density measurement obtained through normal measurement techniques) to the known, non-aerated density of the material. The controller determines the level of aeration based on any difference between the observed and actual densities. The controller then corrects the mass flow measurement accordingly.
The controller determines the non-aerated density of the material by monitoring the density over time periods in which aeration is not present (i.e., periods in which the density has a stable value). Alternatively, a control system to which the controller is connected may provide the non-aerated density as an initialization parameter.
In one implementation, the controller uses three corrections to account for the effects of aeration: bubble effect correction, damping effect correction, and sensor imbalance correction.
A stall occurs when the flowmeter is unable to provide a sufficiently large driver gain to allow high drive current at low amplitudes of oscillation. If the level of damping requires a higher driver gain than can be delivered by the flowtube in order to maintain oscillation at a certain amplitude, then insufficient drive energy is supplied to the conduit. This results in a drop in amplitude of oscillation, which in turn leads to even less drive energy supplied due to the maximum gain limit. Catastrophic collapse results, and flowtube oscillation is not possible until the damping reduces to a level at which the corresponding driver gain requirement can be supplied by the flowmeter.
The bubble effect correction is based on the assumption that the mass flow decreases as the level of aeration, also referred to as the void fraction, increases. Without attempting to predict the actual relationship between void fraction and the bubble effect, this correction assumes, with good theoretical justification, that the effect on the observed mass flow will be the same as the effect on the observed density. Since the true fluid density is known, the bubble effect correction corrects the mass flow rate by the same proportion. This correction is a linear adjustment that is the same for all flow rates.
The damping factor correction accounts for damping of the conduit motion due to aeration. In general, the damping factor correction is based on the following relationship between the observed phase, φobs, and the actual phase, φtrue:
where Σ is a damping coefficient and k is a constant.
The sensor balance correction is based on density differences between different ends of the conduit. As shown in
Other correction factors also may be used. For example, the phase angle of each sensor signal may be monitored. In general, the average phase angle for a signal should be zero. However, the average phase angle tends to increase with increasing aeration. Accordingly, a correction factor could be generated based on the value of the average phase angle. Another correction factor could be based on the temperature of the conduit.
In general, application of the correction factors tends to keep the mass flow errors at one percent or less. Moreover, these correction factors appear to be applicable over a wide range of flows and aeration levels.
J. Setpoint Adjustment
The digital flowmeter provides improved control of the setpoint for the amplitude of oscillation of the conduit. In an analog meter, feedback control is used to maintain the amplitude of oscillation of the conduit at a fixed level corresponding to a desired peak sensor voltage (e.g., 0.3 V). A stable amplitude of oscillation leads to reduced variance in the frequency and phase measurements.
In general, a large amplitude of oscillation is desirable, since such a large amplitude provides a large Coriolis signal for measurement purposes. A large amplitude of oscillation also results in storage of a higher level of energy in the conduit, which provides greater robustness to external vibrations.
Circumstances may arise in which it is not possible to maintain the large amplitude of oscillation due to limitations in the current that can be supplied to the drivers. For example, in one implementation of an analog transmitter, the current is limited to 100 mA for safety purposes. This is typically 5-10 times the current needed to maintain the desired amplitude of oscillation. However, if the process fluid provides significant additional damping (e.g., via two-phase flow), then the optimal amplitude may no longer be sustainable.
Similarly, a low-power flowmeter, such as the two-wire meter described below, may have much less power available to drive the conduit. In addition, the power level may vary when the conduit is driven by capacitive discharge.
Referring to
The controller starts by setting the setpoint to a default value (e.g., 0.3 V) and initializing filtered representations of the sensor voltage (filtered_SV) and the drive current (filtered_DC) (step 4205). Each time that the procedure is performed, the controller updates the filtered values based on current values for the sensor voltage (SV) and drive current (DC) (step 4210). For example, the controller may generate a new value for filtered_SV as the sum of ninety nine percent of filtered_SV and one percent of SV.
Next, the controller determines whether the procedure has been paused to provide time for prior setpoint adjustments to take effect (step 4215). Pausing of the procedure is indicated by a pause cycle count having a value greater than zero. If the procedure is paused, the controller performs no further actions for the cycle and decrements the pause cycle count (step 4220).
If the procedure has not been paused, the controller determines whether the filtered drive current exceeds a threshold level (step 4225). In one implementation, the threshold level is ninety five percent of the maximum available current. If the current exceeds the threshold, the controller reduces the setpoint (step 4230). To allow time for the meter to settle after the setpoint change, the controller then implements a pause of the procedure by setting the pause cycle count equal to an appropriate value (e.g., 100) (step 4235).
If the procedure has not been paused, the controller determines whether the filtered drive current is less than a threshold level (step 4240) and the setpoint is less than a maximum permitted setpoint (step 4245). In one implementation, the threshold level equals seventy percent of the maximum available current, if both conditions are met, the controller determines a possible new setpoint (step 4250). In one implementation, the controller determines the new setpoint as eighty percent of the maximum available current multiplied by the ratio of filtered_SV to filtered_DC. To avoid small changes in the setpoint chattering), the controller then determines whether the possible new setpoint exceeds the current setpoint by a sufficient amount (step 4255). In one implementation, the possible new setpoint must exceed the current setpoint by 0.02 V and by ten percent.
If the possible new setpoint is sufficiently large, the controller determines if it is greater than the maximum permitted setpoint (step 4260). If so, the controller sets the setpoint equal to the maximum permitted setpoint (step 4265). Otherwise, the controller sets the setpoint equal to the possible new setpoint (step 4270). The controller then implements a pause of the procedure by setting the pause cycle count equal to an appropriate value (step 4235).
At about fifteen seconds of operation, aeration increases and the apparent density decreases further (
At about 38 seconds of operation, the level of aeration decreases and the apparent density increases (
K. Performance Results
The digital flowmeter has shown remarkable performance improvements relative to traditional analog flowmeters. In one experiment, the ability of the two types of meters to accurately measure a batch of material was examined. In each case, the batch was fed through the appropriate flowmeter and into a tank, where the batch was weighed. For 1200 and 2400 pound batches, the analog meter provided an average offset of 500 pounds, with a repeatability of 200 pounds. By contrast, the digital meter provided an average offset of 40 pounds, with a repeatability of two pounds, which clearly is a substantial improvement.
In each ease, the conduit and surrounding pipework were empty at the start of the batch. This is important in many batching applications where it is not practical to start the batch with the conduit full. The batches were finished with the flowtube full. Some positive offset is expected because the flowmeter is measuring the material needed to fill the pipe before the weighing tank starts to be filled. Delays in starting up, or offsets caused by aerated flow or low amplitudes of oscillation, are likely to introduce negative offsets. For real hatching applications, the most important issue is the repeatability of the measurement.
The results show that with the analog flowmeter there are large negative offsets and repeatability of only 200 pounds. This is attributable to the length of time taken to startup after the onset of flow (during which no flow is metered), and measurement errors until full amplitude of oscillation is achieved. By comparison, the digital flowmeter achieves a positive offset, which is attributable to filling up of the empty pipe, and a repeatability of two pounds.
Another experiment compared the general measurement accuracy of the two types of meters.
L. Self-Validating Meter
The digital flowmeter may used in a control system that includes self-validating sensors. To this end, the digital flowmeter may be implemented as a self-validating meter. Self-validating meters and other sensors are described in U.S. Pat. No. 5,570,300, titled “SELF-VALIDATING SENSORS”, which is incorporated by reference.
In general, a self-validating meter provides, based on all information available to the meter, a best estimate of the value of a parameter (e.g., mass flow) being monitored. Because the best estimate is based, in part, on nonmeasurement data, the best estimate does not always conform to the value indicated by the current, possibly faulty, measurement data. A self-validating meter also provides information about the uncertainty and reliability of the best estimate, as well as information about the operational status of the sensor. Uncertainty information is derived from known uncertainty analyses and is provided even in the absence of faults.
In general, a self-validating meter provides four basic parameters: a validated measurement value (VMV), a validated uncertainty (VU), an indication (MV status) of the status under which the measurement was generated, and a device status. The VMV is the meter's best estimate of the value of a measured parameter. The VU and the MV status are associated with the VMV. The meter produces a separate VMV, VU and MV status for each measurement. The device status indicates the operational status of the meter.
The meter also may provide other information. For example, upon a request from a control system, the meter may provide detailed diagnostic information about the status of the meter. Also, when a measurement has exceeded, or is about to exceed, a predetermined limit, the meter can send an alarm signal to the control system. Different alarm levels can be used to indicate the severity with which the measurement has deviated from the predetermined value.
VMV and VU are numeric values. For example, VMV could be a temperature measurement valued at 200 degrees and VU, the uncertainty of VMV, could be 9 degrees. In this case, there is a high probability (typically 95%) that the actual temperature being measured falls within an envelope around VMV and designated by VU (i.e., from 191 degrees to 209 degrees).
The controller generates VMV based on underlying data from the sensors. First, the controller derives a raw measurement value (RMV) that is based on the signals from the sensors. In general, when the controller detects no abnormalities, the controller has nominal confidence in the RMV and sets the VMV equal to the RMV. When the controller detects an abnormality in the sensor, the controller does not set the VMV equal to the RMV. Instead, the controller sets the VMV equal to a value that the controller considers to be a better estimate than the RMV of the actual parameter.
The controller generates the VU based on a raw uncertainty signal (RU) that is the result of a dynamic uncertainty analysis of the RMV. The controller performs this uncertainty analysis during each sampling period. Uncertainty analysis, originally described in “Describing Uncertainties in Single Sample Experiments,” S. J. Kline &. F. A. McClintock, Mech. Eng., 75, 3-8 (1953), has been widely applied and has achieved the status of an international standard for calibration. Essentially, an uncertainty analysis provides an indication of the “quality” of a measurement. Every measurement has an associated error, which, of course, is unknown. However, a reasonable limit on that error can often be expressed by a single uncertainty number (ANSI/ASME PTC 19.1-1985 Part 1, Measurement Uncertainty: Instruments and Apparatus).
As described by Kline & McClintock, for any observed measurement M, the uncertainty in M, wM, can be defined as follows:
Mtrueε[M−wM,M+wM]
where M is true (Mtrue) with a certain level of confidence (typically 95%). This uncertainty is readily expressed in a relative form as a proportion of the measurement (i.e. wM/M).
In general, the VII has a non-zero value even under ideal conditions (i.e., a faultless sensor operating in a controlled, laboratory environment). This is because the measurement produced by a sensor is never completely certain and there is always some potential for error. As with the VMV, when the controller detects no abnormalities, the controller sets the VU equal to the RU. When the controller detects a fault that only partially affects the reliability of the RMV, the controller typically performs a new uncertainty analysis that accounts for effects of the fault and sets the VU equal to the results of this analysis. The controller sets the VU to a value based on past performance when the controller determines that the RMV bears no relation to the actual measured value.
To ensure that the control system uses the VMV and the VU properly, the MV status provides information about how they were calculated. The controller produces the VMV and the VU under all conditions—even when the sensors are inoperative. The control system needs to know whether VMV and VU are based on “live” or historical data. For example, if the control system were using VMV and VU in feedback control and the sensors were inoperative, the control system would need to know that VMV and VU were based on past performance.
The MV status is based on the expected persistence of any abnormal condition and on the confidence of the controller in the RMV. The four primary states for MV status are generated according to Table 1.
A CLEAR MV status occurs when RMV is within a normal range for given process conditions. A DAZZLED MV status indicates that RMV is quite abnormal, but the abnormality is expected to be of short duration. Typically, the controller sets the MV status to DAZZLED when there is a sudden change in the signal from one of the sensors and the controller is unable to clearly establish whether this change is due to an as yet undiagnosed sensor fault or to an abrupt change in the variable being measured, A BLURRED MV status indicates that the RMV is abnormal but reasonably related to the parameter being measured. For example, the controller may set the MV status to BLURRED when the RMV is a noisy signal. A BLIND MV status indicates that the RMV is completely unreliable and that the fault is expected to persist.
Two additional states for the MV status are UNVALIDATED and SECURE. The MV status is UNVALIDATED when the controller is not performing validation of VMV. MV status is SECURE when VMV is generated from redundant measurements in which the controller has nominal confidence.
The device status is a generic, discrete value summarizing the health of the meter. It is used primarily by fault detection and maintenance routines of the control system. Typically, the device status 32 is in one of six states, each of which indicates a different operational status for the meter. These states are: GOOD, TESTING, SUSPECT, IMPAIRED, BAD, or CRITICAL, A GOOD device status means that the meter is in nominal condition. A TESTING device status means that the meter is performing a self check, and that this self check may be responsible for any temporary reduction in measurement quality. A SUSPECT device status means that the meter has produced an abnormal response, but the controller has no detailed fault diagnosis. An IMPAIRED device status means that the meter is suffering from a diagnosed fault that has a minor impact on performance. A BAD device status means that the meter has seriously malfunctioned and maintenance is required. Finally, a CRITICAL device status means that the meter has malfunctioned to the extent that the meter may cause (or have caused) a hazard such as a leak, fire, or explosion.
If the frequency does not fall within an expected range (step 4515), then the controller implements a stall procedure (step 4545) to determine whether the conduit has stalled and to respond accordingly. In the stall procedure, the controller maximizes the driver gain and performs a broader search for zero crossings to determine whether the conduit is oscillating at all.
If the conduit is not oscillating correctly (i.e., if it is not oscillating, or if it is oscillating at an unacceptably high frequency (e.g., at a high harmonic of the resonant frequency)) (step 4550), the controller attempts to restart normal oscillation (step 4555) of the conduit by, for example, injecting a square wave at the drivers. After attempting to restart oscillation, the controller sets the MV status to DAZZLED (step 4560) and generates null raw measurement values (step 4565), if the conduit is oscillating correctly (step 4550), the controller eliminates zero offset (step 4520) and proceeds as discussed above.
After generating raw measurement values (steps 4540 or 4565), the controller performs diagnostics (step 4570) to determine whether the meter is operating correctly (step 4575). (Note that the controller does not necessarily perform these diagnostics during every cycle.)
Next, the controller performs an uncertainty analysis (step 4580) to generate a raw uncertainty value. Using the raw measurements, the results of the diagnostics, and other information, the controller generates the VMV, the VU, the MV status, and the device status (step 458). Thereafter, the controller collects a new set of data and repeats the procedure. The steps of the procedure 4500 may be performed serially or in parallel, and may be performed in varying order.
In another example, when aeration is detected, the mass flow corrections are applied as described above, the MV status becomes blurred, and the uncertainty is increased to reflect the probable error of the correction technique. For example, for a flowtube operating at 50% flowrate, under normal operating conditions, the uncertainty might be of the order of 0.1-0.2% of flowrate. If aeration occurs and is corrected for using the techniques described above, the uncertainty might be increased to perhaps 2% of reading. Uncertainty values should decrease as understanding of the effects of aeration improves and the ability to compensate for aeration gets better. In batch situations, where flow rate uncertainty is variable (e.g. high at start/end if batching from/to empty, or during temporary incidents of aeration or cavitation), the uncertainty of the batch total will reflect the weighted significance of the periods of high uncertainty against the rest of the batch with nominal low uncertainty. This is a highly useful quality metric in fiscal and other metering applications.
M. Two Wire Flowmeter
As shown in
When the drive capacitor is suitably charged, the controller 4615 discharges the capacitor 4635 to drive the conduit 4625. For example, the controller may drive the conduit once during every 10 cycles. The controller 4615 receives and analyzes signals from the sensors 4640 to produce a mass flow measurement that the controller then transmits on the wires 4605.
N. Batching from Empty
The digital mass flowmeter 100 provides improved performance in dealing with a challenging application condition that is referred to as batching from empty. There are many processes, particularly in the food and petrochemical industries, where the high accuracy and direct mass-flow measurement provided by Coriolis technology is beneficial in the metering of batches of material. In many cases, however, ensuring that the flowmeter remains full of fluid from the start to the end of the batch is not practical, and is highly inefficient. For example, in filling or emptying a tanker, air entrainment is difficult to avoid. In food processing, hygiene regulations may require pipes to be cleaned out between batches.
In conventional Coriolis meters, batching from empty may result in large errors. For example, hydraulic shock and a high gain requirement may be caused by the onset of flow in an empty flowtube, leading to large measurement errors and stalling.
The digital mass flowmeter 100 is robust to the conditions experienced when batching from empty. More specifically, the amplitude controller has a rapid response; the high gain range prevents flowtube stalling; measurement data can be calculated down to 0.1% of the normal amplitude of oscillation; and there is compensation for the rate of change of amplitude.
These characteristics are illustrated in
As shown in
Of course there are still erroneous data in this interval. For example, flow generating a phase difference in excess of about 5 degrees is physically not possible. However, from the perspective of a self validating sensor, such as is discussed above, this phase measurement still constitutes raw data that may be corrected. In some implementations, a higher level validation process may identify the data from 0.4-1.0 seconds as unrepresentative of the true process value (based on the gain, amplitude and other internal parameters), and may generate a DAZZLED mass-flow to suppress extreme measurement values.
Referring to
It would be difficult to assess the true mass-flow through the flowtube, given its initially empty state. The reported total mass falls between that of the magnetic flowmeter 4810 and the weigh scale, as expected. In an industrial application, the issue of repeatability is often of greater importance, as batch recipes are often adjusted to accommodate offsets. Of course, the repeatability of the filling process is a lower bound on the repeatability of the Coriolis flowmeter total. Similar repeatability could be achieved in an arbitrary industrial batch process. Moreover, as shown, the digital mass flowmeter 100 provides a substantial performance improvement over its analog equivalent (magnetic flowmeter 4810) under the same conditions. Again, the conclusion drawn is that the digital mass flowmeter 100 in these conditions is not a significant source of measurement error.
O. Two-Phase Flow
As discussed above with reference to
The digital mass flowmeter 100 is able to maintain oscillation in the presence of two-phase flow. In summary, laboratory experiments conducted thus far have been unable to stall a tube of any size with any level of gas phase when controlled by the digital controller 105. By contrast, a typical analog control system stalls with about 2% gas phase.
Maintaining oscillation is only the first step in obtaining a satisfactory measurement performance from the flowmeter. As briefly discussed above, a simple model, referred to as the “bubble” model, has been developed as one technique to predict the mass-flow error.
In the “bubble” or “effective mass” model, a sphere or bubble of low density gas is surrounded by fluid of higher density. If both are subject to acceleration (for example in a vibrating tube), then the bubble moves within the fluid, causing a drop in the observed inertia of the whole system. Defining the void fraction I as the proportion of gas by volume, then the effective mass drops by a proportion R, with
Applied to a Coriolis flowmeter, the model predicts that the apparent mass-flow will be less than the true mass-flow by the factor R as will, by extension, the observed density.
The dashed line 4910 shows the relationship between mass-Bow error and density drop as predicted by the bubble model. The experimental data follow a similar set of curves, although the model almost always predicts a more negative mass-flow error. As discussed above with respect to
P. Application of Neural Networks
Another technique for improving the accuracy of the mass flow measurement during two-phase flow conditions is through the use of a neural network to predict the mass-flow error and to generate an error correction factor for correcting any error in the mass-flow measurement resulting from two-phase flow effects. The correction factor is generated using internally observed parameters as inputs to the digital signal processor and the neural network, and has been observed to keep errors to within 2%. The internally observed parameters may include temperature, pressure, gain, drop in density, and apparent flow rate.
The digital process sensor and driver signal data are further analyzed and processed by a sensor and driver parameters processing module 5210 that generates physical parameters including frequency, phase, current, damping and amplitude of oscillation. A raw mass-flow measurement calculation module 5212 generates a raw mass-flow measurement signal using the techniques discussed above with respect to the flowmeter 500.
A flow condition state machine 5215 receives as input the physical parameters from the sensor and driver parameters processing module 5210, the raw mass-flow measurement signal, and a density measurement 5214 that is calculated as described above. The flow condition state machine 5215 then detects a flow condition of material traveling through the digital mass flowmeter 100. In particular, the flow condition state machine 5215 determines whether the material is in a single-phase flow condition or a two-phase flow condition. The flow condition state machine 5215 also inputs the raw mass-flow measurement signal to a mass-flow measurement output block 5230.
When a single-phase flow condition is detected, the output block 5230 validates the raw mass-flow measurement signal and may perform an uncertainty analysis to generate an uncertainty parameter associated with the validated mass-flow measurement. In particular, when the state machine 5215 detects that a single-phase flow condition exists, no correction factor is applied to the raw mass-flow measurement, and the output block 5230 validates the mass-flow measurement. If the controller 5200 does not detect errors in producing the measurement, the output block 5230 may assign to the measurement the conventional uncertainty parameter associated with the fault free measurement, and may set the status flag associated with the measurement to CLEAR. If errors are detected by the controller 5200 in producing the measurement, the output block 5230 may modify the uncertainty parameter to a greater uncertainty value, and may set the status flag to another value such as BLURRED.
When the flow condition state machine 5215 detects that a two-phase flow condition exists, a two-phase flow error correction module 5220 receives the raw mass-flow measurement signal. The two-phase flow error correction module 5220 includes a neural network processor for predicting, a mass-flow error and for calculating an error correction factor. The neural network processor can be implemented in a software routine, or alternatively may be implemented as a separate programmed hardware processor. Operation of the neural network processor is described in greater detail below.
A neural network coefficients and training module 5225 stores a predetermined set of neural network coefficients that are used by the neural network processor. The neural network coefficients and training module 5225 also may perform an online training function using training data so that an updated set of coefficients can be calculated for use by the neural network. While the predetermined set of neural network coefficients are generated through extensive laboratory testing and experiments based upon known two-phase mass-flow rates, the online training function performed by module 5225 may occur at the initial commissioning stage of the flowmeter, or may occur each time the flowmeter is initialized.
The error correction factor generated by the error correction module 5220 is input to the mass-flow measurement output block 5230. Using the raw mass-flow measurement and the error correction factor (if received from the error correction module 5220 indicating two-phase flow), the mass-flow measurement output block 5230 applies the error correction factor to the raw mass-flow measurement to generate a corrected mass-flow measurement. The measurement output block 5230 then validates the corrected mass-flow measurement, and may perform an uncertainty analysis to generate an uncertainty parameter associated with the validated mass-flow measurement. The measurement output block 5230 thus generates a validated mass-flow measurement signal that may include an uncertainty and status associated with each validated mass-flow measurement, and a device status.
The sensor parameters processing module 5210 also inputs a damping parameter and an amplitude of oscillation parameter (previously described) to an amplitude control module 5235. The amplitude control module 5235 further processes the damping parameter and the amplitude of oscillation parameter and generates digital drive signals. The digital drive signals are converted to analog drive signals by D/A converters 5240 for operating the drivers 5245 connected to the flowtube of the digital flowmeter. In an alternate implementation, the amplitude control module 5235 may process the damping parameter and the amplitude of oscillation parameter and generate analog drive signals for operating the drivers 5245 directly.
The sensor and driver parameters processing module 5210 then executes a diagnose_flow_condition processing routine (step 5256) to calculate statistical values including the mean, standard deviation, and slope for each of the sensor and driver variables. Based upon the statistics calculated for each of the sensor and driver variables, the flow condition state machine 5215 detects transitions between one of three valid flow-condition states: FLOW_CONDITION_SHOCK, FLOW_CONDITION_HOMOGENEOUS, AND FLOW_CONDITION_MIXED.
If the state FLOW_CONDITION_SHOCK is detected (step 5258), the mass-flow measurement analysis process is not performed due to irregular sensor inputs. On exit from this condition, the processing routine starts a new cycle (step 5251). The processing routine then searches for a new sinusoidal signal to track within the sensor signal data and resumes processing. As part of this tracking process, the processing routine must find the beginning and end of the sine wave using the zero crossing technique described above. If the state FLOW_CONDITION_SHOCK is not detected, the processing routine calculates the raw mass-flow measurement of the material flowing through the flowmeter 100 (step 5260).
If two-phase flow is not detected (i.e., the state FLOW_CONDITION_HOMOGENOUS is detected) (step 5270), the material flowing through the flowmeter 100 is assumed to be a single-phase material. If so, the validated mass-flow rate is generated from the raw mass-flow measurement (step 5272) by the mass-flow measurement output block 5230. At this point, the validated mass-flow rate along with its uncertainty parameter and status flag can be transmitted to another process controller. Processing then begins a new cycle (step 5251).
If two-phase flow is detected (i.e., the state FLOW_CONDITION_MIXED is detected) (step 5270), the material flowing through the flowmeter 100 is assumed to be a two-phase material. In this case, the two-phase flow error correction module 5220 predicts the mass-flow error and generates an error correction factor using the neural network processor (step 5274). The corrected mass-flow rate is generated by the mass-flow measurement output block 5230 using the error correction factor (step 5276). A validated mass-flow rate then may be generated from the corrected mass-flow rate. At this point, the validated mass-flow rate along with its uncertainty parameter and status flag can be transmitted to another process controller. Processing then begins a new cycle (step 5251).
Referring again to
Of the various neural network models available, the multi-layer perceptron (MLP) and the radial basis function (RBF) networks have been used for implementations of the digital flowmeter. The MLP with one hidden layer (each unit having a sigmoidal activation function) can approximate arbitrarily well any continuous mapping. Therefore, this type of neural network is suitable to model the non-linear relationship between the mass flow error of the flowmeter under two-phase flow and some of the flowmeter's internal parameters.
The network weights necessary for accomplishing the desired mapping are determined during a training or optimization process. During supervised training, the neural network is repeatedly presented with the training set (a collection of input examples x and their corresponding desired outputs di), and the weights are updated such that an error function is minimized. For the interpolation problem associated with the present technique, a suitable error function is the sum-of-squares error, which for an MLP with one output may be represented as:
where di is the target corresponding to input xi; yi is the actual neural network output to xi; and P is the number of examples in the training set.
An alternative neural network architecture that has been used is the RBF network. The RBF methods have their origins in techniques for performing exact interpolations of a set of data points in a multi-dimensional space. A RBF network generally has a simple architecture of two layers of weights, in which the first layer contains the parameters of the basis functions, and the second layer forms linear combinations of the activation of the basis functions to generate the outputs. This is achieved by representing the output of the network as a linear superposition of basis functions, one for each data point in the training set. In this form, training is faster than for a MLP network.
The internal sensor parameters of interest include observed density, damping, apparent flow rate, and temperature. Each of these parameters is discussed below.
1. Observed Density
The most widely used metric of two-phase flow is the void (or gas) fraction defined as the proportion of gas by volume. The equation
models the mass flow error given the void fraction. For a Coriolis mass flowmeter, the reported process fluid density provides an indirect measure of void fraction assuming the “true” liquid density in known. This reported process density is subject to errors similar to those in the mass-flow measurement in the presence of two-phase flow. These errors are highly repeatable and a drop in density is a suitable monotonic but non-linear indicator of void fraction, that can be monitored on-line within the flowmeter. It should be noted that outside of a laboratory environment, the true void fraction cannot be independently assessed, but rather, must be modeled as described above.
Knowledge of the “true” single-phase liquid density can be obtained on-line or can be configured by the user (possibly including a temperature coefficient). Both approaches have been implemented and appear satisfactory.
For the purposes of these descriptions, the drop in density will be used as the x-axis parameter in graphs showing two-phase flow behavior. It should be noted that in the 3D plots of FIGS. 54 and 56-57, which capture the results from 134 on-line experiments, a full range of density drop points is not possible at high flow rates due to air pressure limitations in the flow system rig. Also, the effects of temperature, though not shown in the graphs, have been determined experimentally.
2. Damping
Most Coriolis flowmeters use positive feedback to maintain flowtube oscillation. The sensor signals provide the frequency and phase of the flowtube oscillation, which are multiplied by a drive gain, K0 to provide the currents supplied to the drivers 5245:
Normally, the drive gain is modified to ensure a constant amplitude of oscillation, and is roughly proportional to the damping factor of the flowtube.
One of the most characteristic features of two-phase flow is a rapid rise in damping. For example, a normally operating 25 mm flowtube has VA=0.3V, ID=10 mA, and hence K0=0.033. With two-phase flow, values might be as extreme as VA=0.03V, ID=100 mA, and K0=3.3, a hundred-fold increase.
3. Apparent Flow Rate and Temperature
As
Q. Network Training and On-Line Correction of Mass Flow Errors
Implementing the neural network analysis for the mass flow measurement error prediction includes training the neural network processor to recognize the mass flow error pattern in training experimental data, testing the performance of the neural network processor on a new set of experimental data, and on-line implementation of the neural network processor for measurement error prediction and correction.
The prediction quality of the neural network processor depends on the wealth of the training data. To collect the neural network data, a series of two-phase air/water experiments were performed using an experimental flow rig 5500 shown in
At the end of each batch, the Coriolis flowmeter 100 reports the batch average of each of the following parameters: temperature, damping, density, flow rate, and the total (uncorrected) flow. These parameters are thus available for use as the input data of the neural network processor.
The output or the target of the neural network is the mass-flow error in percentage:
The best results were obtained using only four input parameters to the neural network: temperature, damping, density drop, and apparent flow rate. Less satisfactory perhaps is the result that the best fit was achieved using the neural network on its own, rather than as a correction to the bubble model or to a simplified curve fit.
As part of the implementation, a MLP neural network was used for on-line implementation. Comparisons between RBF and MLP networks with the same data sets and inputs have shown broadly similar performance on the test set. It is thus reasonable to assume that the input set delivering the best RBF design also will deliver a good (if not the best) MLP design. The MLP neural nets were trained using a scaled conjugate gradient algorithm. The facilities of Neural Network Toolbox of the MATLAB® software package were used for neural network training. After further design options were explored, the best performance came from an 4-9-1 MLP having as inputs the temperature, damping, drop in density, and flow rate, along with the mass flow error as output.
Against a validation set, the best neural network provided mass flow rate predictions to within 2% of the true value. Routines for the detection and correction for two-phase flow have been coded and incorporated into the digital Coriolis transmitter.
With single-phase flow (up to t=5 sec.), the mass flow measurement has a measurement value status of CLEAR and a small uncertainty of about 0.2% of reading. Once two-phase flow is detected, the neural network correction is applied every interleaved cycle (i.e. at 180 Hz), based on the values of the internal parameters averaged (using a moving window) over the last second. During two-phase flow, the measurement value status is set to BLURRED, and the uncertainty increases to reflect the reduced accuracy of the corrected measurement. The uncorrected measurement (lower dark line) shows a large offset error of about 30%.
The master meter reading agrees with a first approximation with the corrected mass flow measurement. The apparent delay in its response to the incidence of two-phase flow is attributable to communication delays in the rig control system, and its squarewave-like response is due to the control system update rate of only once per second. Both the raw and corrected measurements from the digital transmitter show a higher degree of variation than with single phase flow. The master meter reading gives a useful measure of the water phase entering the two-phase zone, and there is a clear similarity between the master meter reading and the ‘average’ corrected reading. However, plug flow and air compressibility within the complex 3-D geometry of the flowtube may result not only in flow rate variations, but with the instantaneous mass-flow into the system being different from the mass-flow out of the system.
Using the self-validating sensor processing approach, the measurement is not simply labeled good or bad by the sensor. Instead, if a fault occurs, a correction is applied as far as possible and the quality of the resulting measurement is indicated through the BLURRED status and increased uncertainty. The user thus assesses application-specific requirements and options in order to decide whether to continue operation with the reduced quality of the corrected mass-flow rate, to switch to an alternative measurement if available, or to shut down the process. If two-phase flow is present only during part of a batch run (e.g. at the beginning or end), then there will be a proportionate weighting given to the uncertainty of the total mass of the batch.
Multiple Phase-Flows
As described below, an apparent intermediate value is determined based on, e.g., a mass flow rate and density of the multi-phase process fluid (also referred to as the bulk mass flow rate and bulk density, respectively) as determined by, for example, a Coriolis meter. Although the Coriolis meter continues to operate in the presence of the multi-phase process fluid, the presence of the multi-phase fluid effects the motion of a flowtube (or conduit) that is part of the Coriolis meter. Thus, the outputs determined by the meter may be inaccurate because the meter operates on the assumption that the process fluid includes a single phase. These outputs may be referred to as apparent properties, or raw properties, of the multi-phase fluid. Thus, in one implementation, the apparent intermediate value is determined based on apparent or raw properties of the multi-phase fluid. Other implementations may determine the intermediate value based on a corrected form of the apparent property(ies). To correct for the inaccuracies, the apparent intermediate value is input into, e.g., a neural network to produce a corrected intermediate value that accounts for the effects of using a multi-phase process fluid. The corrected intermediate value is used to determine the mass flow rate and density of each of the phases of the multi-phase process fluid. Using an intermediate value rather than the apparent mass flow rate and density of the multi-phase process fluid may help improve the accuracy of the determination of the mass flow rate and density of each of the phases of the multi-phase process fluid.
A multi-phase process fluid is passed through a vibratable flowtube (5905). Motion is induced in the vibratable flowtube (5910). The vibratable flow tube may be, for example, the conduit 120 discussed above with respect to
A first property of the multi-phase fluid may be determined based on the motion of the vibratable flowtube (5915). The first property of the multi-phase fluid may be the apparent mass flow rate and/or the apparent density of the fluid flowing through the vibratable flowtube. Thus, in the example process 5900, the first property may be the mass flow rate or the density of the multi-phase fluid. Properties determined from a multi-phase fluid may be referred to as apparent, or raw, properties as compared to true (or at lest corrected) properties of the multi-phase fluid. The apparent mass flow rate and density of the multi-phase fluid are generally inconsistent with the mass flow rate and density of each of the individual phases of the multi-phase fluid due to the effects the multi-phase fluid has on the motion of the flowtube. For example, if the multi-phase fluid has a relatively low gas volume fraction (e.g., the multi-phase fluid includes more liquid than gas), both the apparent density and the apparent mass flow rate of the multi-phase fluid obtained from the flowtube tend to be lower than the actual density and mass flowrate of the non-gas phase. Although the first property is generally an apparent property, in some implementations, the first property may be a corrected or actual property. The corrected or actual property may come, for example, from a model or a mapping.
As discussed with respect to
In general, to determine the properties of the individual phases in the multi-phase fluid, additional information (e.g., the known densities of the materials in the individual phases) or additional measurements (e.g., pressure of the multi-phase fluid or the watercut of the multi-phase fluid) may be needed at times. However, the properties of the multi-phase fluid measured by the meter are typically determined by modification or correction to conventional single-phase measurement techniques because of the effects the multi-phase flow has on the flowtube as compared to single-phase flow.
Thus, in some implementations, in addition to properties determined based on the motion of the conduit, such as the first property discussed above, additional or “external” properties of the multi-phase fluid such as temperature, pressure, and watercut may be measured and used in the process 5900, e.g., as additional inputs to the mapping or to help in determining the flowrates of the individual components of the multi-phase fluid. The additional properties may be measured by a device other than the flowmeter. For example, the watercut of the multi-phase fluid, which represents the portion of the multi-phase fluid that is water, may be determined by a watercut meter. The additional property also may include a pressure associated with the flowtube. The pressure associated with the flowtube may be, for example, a pressure of the multi-phase process fluid at an inlet of the flowtube and/or a differential pressure across the flowtube.
An apparent intermediate value associated with the multi-phase process fluid is determined based on the first property (5920). In some implementations, a second property of the multi-phase fluid also may be determined based on the motion of the conduit. For example, in such an implementation, the apparent mass flowrate of the multi-phase fluid and the apparent density of the multi-phase fluid may be determined based on the motion of the conduit, and both, of these apparent properties may be used to determine one or more apparent, intermediate values (such as liquid volume fraction and the volumetric flowrate or the gas Froude number and non-gas Froude number, as described below). In some implementations, the apparent intermediate values may be intermediate values based on one or more corrected or actual properties.
In general, the apparent intermediate value (or values) is a value related to the multi-phase fluid that reflects inaccuracies resulting from the inclusion of more than one phase in the multi-phase fluid. The apparent intermediate value may be, for example, a volume fraction of the multi-phase process fluid. The volume fraction may be a liquid volume fraction that specifies the portion of the multi-phase fluid that is a non-gas. The volume fraction also may be a gas volume fraction that specifies the portion of the multi-phase fluid that is a gas. In general, the volume fraction is a dimensionless quantity that may be expressed as a percentage. The gas volume fraction also may be referred to as a void fraction. If the multi-phase fluid includes liquids and gases, the liquid and gas volume fractions add up to 100%. In other implementations, the apparent intermediate value may be a volumetric flow rate of the multi-phase fluid.
In another implementation, the apparent intermediate values may include a non-gas Froude number and a gas Froude number. Froude numbers are dimensionless quantities that may represent a resistance of an object moving through a fluid and which may be used to characterize multi-phase fluids. In this implementation, the apparent intermediate value may be a non-gas Froude number and/or a gas Froude number. The apparent gas Froude number may be calculated using the following equation, where mga is the apparent gas mass flow rate, ρg is an estimate of the density of the gas phase based on the ideal gas laws, ρl is an estimate of the density of the liquid in the non-gas phase of the multi-phase fluid, A is the cross-sectional area of the flowtube, D is the diameter of the flowtube, and g is the acceleration due to gravity:
where
the Apparent Gas Velocity
Similarly, the non-gas Froude number (which may be a liquid Froude number) may be calculated using the following equation, where mla is the apparent liquid mass flow rate:
As discussed in more detail below, the apparent intermediate value is input into a mapping that defines a relationship between the apparent intermediate value and a corrected intermediate value. The mapping may be, for example, a neural network, a polynomial, a function, or any other type of mapping. Prior to inputting the apparent intermediate value into the mapping, the apparent intermediate value may be filtered or conditioned to reduce measurement and process noise. For example, linear filters may be applied to the apparent intermediate value to reduce measurement noise. The time constant of the linear filter may be set to a value that reflects the response time of the measurement instrumentation (e.g., 1 second) such that the filter remains sensitive to actual changes in the fluid flowing through the flowtube (such as slugs of non-gas fluid) while also being able to reduce measurement noise.
The development of a mapping for correcting or improving a multiphase measurement involves the collection of data under experimental conditions, where the true or reference measurements are provided by additional calibrated instrumentation. Generally, it is not practical to carry out experiments covering all conceivable multi-phase conditions, either due to limitations of the test facility, and/or the cost and time associated with carrying out possibly thousands of experiments. Additionally, it is rarely possible to maintain multiphase flow conditions exactly constant for any extended period of time, due to the inherently unstable flow conditions that occur within multiphase conditions. Accordingly, it is usually necessary to calculate the average values of all relevant parameters, including apparent and true or reference parameter values, over the duration of each experiment, which may typically be of 30 s to 120 s duration. Thus, the mapping may be constructed from experimental data where each data point is derived from the average of for example 30 s to 120 s duration of data.
Difficulties might arise when applying the resulting mapping in the meter during multiphase flow in real time, whereby the particular parameter values observed within the meter are not included in the mapping provided from the previously collected experimental data. There are two primary ways in which this may occur. In the first instance, although the conditions experienced by the meter, averaged over a timescale of about 15 to 120 seconds, do correspond to conditions covered by the mapping, the instantaneous parameter values may fall outside of the region, due to measurement noise and or instantaneous variations in actual conditions due to the instabilities inherent in multiphase flow. As described above, this effect can to some extent be reduced by time-averaging or filtering the parameters used as inputs into the mapping function, though there is a tradeoff between the noise reduction effects of such filtering and the responsiveness of the meter to actual changes in conditions within the multiphase flow. Alternatively, averaged parameter values may fall outside of the mapping because, for instance, it has not been economically viable to cover all possible multiphase conditions during the experimental stage.
It may not be beneficial to apply a mapping function (whether neural net, polynomial or other function) to data that falls outside of the region for which the mapping was intended. Application of the mapping to such data may result in poor quality measurements being generated. Accordingly, jacketing procedures may be applied to ensure that the behavior of the mapping procedure is appropriate for parameter values outside the mapped region, irrespective of the reasons for the parameters falling outside the mapped region. Data that is included in the region may be referred to as suitable data.
Thus, the apparent intermediate value may be “jacketed” prior to inputting the apparent intermediate value into the mapping. For implementations that include one input to the mapping, the region of suitable data may be defined by one or more limits, a range, or a threshold. In other implementations, there may be more than one input to the mapping. In these implementations, the region of suitable data may be defined by a series of lines, curves, or surfaces. Accordingly, as the number of inputs to the mapping increases, defining the region of suitable data becomes more complex. Thus, it may be desirable to use fewer inputs to the mapping. The gas and liquid Froude numbers described above are an example of apparent intermediate values that may be input into the mapping without additional inputs. Thus, use of the gas and non-gas Froude numbers may help to reduce the number of inputs into the mapping, which also may help reduce the complexity of the jacketing process. Additionally, using fewer inputs to the mapping may result in a simpler mapping, which may help reduce the computational resources used by the mapping and help increase the speed of determining corrected intermediate values based on the mapping.
An apparent intermediate value having a value that is outside of the defined region may be determined to be unsuitable for input to the mapping. In general, rules are defined to correct an apparent intermediate value that is determined to be outside of the defined region. For example, an apparent intermediate value that is outside of the defined region may be ignored by the mapping (e.g., the apparent intermediate value is not corrected by the mapping), the apparent intermediate value may not be input to the mapping at all, a fixed correction may be applied to the apparent intermediate value rather than a correction determined by the mapping, or the correction corresponding to the correction that would apply to the value closest to the apparent intermediate value may be applied. Other rules for correcting an apparent intermediate value that is outside of the defined region may be implemented. In general, the jacketing is specific to a particular mapping and is defined for each mapping.
A corrected intermediate value based on a mapping between the apparent intermediate value and the corrected intermediate value is determined (5925). The mapping may be a neural network, a statistical model, a polynomial, a function, or any other type of mapping. The neural network or other mapping may be trained with data obtained from a multi-phase fluid for which values of the constituent phases are known. Similar to the jacketing described above with respect to (5920), the corrected apparent value may be jacketed, or otherwise checked, prior to using it in further processing. A phase-specific property of the multi-phase process fluid may be determined based on the corrected intermediate value (5930). Using one or more of the apparent intermediate values discussed above rather than a value directly from the flowtube (e.g., mass flow rate of the multi-phase liquid) may improve the accuracy of the process 5900. The phase-specific property may be, for example, a mass flow rate and/or a density of the non-gas and gas phases of the multi-phase fluid.
The example process described with respect to
The digital process sensor and driver signal data are further analyzed and processed by a sensor and driver parameters processing module 6210 that generates physical parameters including frequency, phase, current, damping and amplitude of oscillation. A raw mass-flow measurement calculation module 6212 generates a raw mass-flow measurement signal using the techniques discussed above with respect to the flowmeter 500.
Rather than include a dedicated flow condition state machine, such as 5215 discussed in reference to flowmeter 5200, a multiple-phase flow error correction module with one or more neural networks receives, as input, the physical parameters from the sensor and driver parameters processing module 6210, the raw mass-flow measurement signal, and a density measurement 6214 that is calculated as described above. For example, if the process fluid involves a known two-phase (e.g., gas and liquid constituents), three-phase (e.g., gas and two-liquid constituents) or other multiple-phase flow (e.g., one or more gas and one or more liquid constituents), the determination of a flow condition state may not be necessary, in this example, the process fluid may be a wet-gas that is already known to include a gas volume fraction (gvf) and liquid volume fraction (lvf). The wet gas may include, for example, natural gas, a liquid petroleum product, and water. Accordingly, the mass-flow measurement below can automatically determine a mass-flow measurement of each phase of a multi-phase process fluid. A dedicated neural network for each multiple phase flow condition can be used in the multiple phase flow error correction module 6220. Alternatively, or additionally, a single neural network that recognizes two-phase and/or three-phase (or more constituent phases) flow conditions and applies correction factors based on the actual multiple-phase flow condition may be used.
During a multi-phase flow condition, a multiple-phase flow error correction module 6220 receives the raw (or apparent) mass-flow measurement signal and the raw density signal. The apparent mass-flow measurement and density signals reflect the mass flow and density of the multi-phase process fluid rather than the mass flow and density of each of the phases included in the multi-phase process fluid. The multiple-phase flow error correction module 6220 includes a neural network processor for predicting a mass-flow error that results from the presence of the multi-phase process fluid. The neural network processor can be implemented in a software routine, or alternatively may be implemented as a separate programmed hardware processor. Operation of the neural network processor is described in greater detail below.
The inputs to the neural network processor may be apparent intermediate values determined from the raw mass-flow measurement signal and the density measurement. In this implementation, the multiple-phase flow error correction module 6220 determines apparent intermediate values, such as the apparent intermediate values discussed above with respect to
A neural network coefficients and training module 6225 stores a predetermined set or sets of neural network coefficients that are used by the neural network processor for each multiple-phase flow condition. The neural network coefficients and training module 6225 also may perform an online training function using training data so that an updated set of coefficients can be calculated for use by the neural network. While the predetermined set of neural network coefficients are generated through extensive laboratory testing and experiments based upon known two-phase, three-phase, or higher-phase mass-flow rates, the online training function performed by module 6225 may occur at the initial commissioning stage of the flowmeter, or may occur each time the flowmeter is initialized.
The corrected intermediate values from the neural network are input to the mass-flow measurement output block 6230. Using the corrected intermediate values, the mass-flow measurement output block 6230 determines the mass flow rate of each phase of the multi-phase process fluid, in some implementations, the measurement output block 6230 validates the mass-flow measurements for the phases and may perform an uncertainty analysis to generate an uncertainty parameter associated with the validation. The sensor parameters processing module 6210 also inputs a damping parameter and an amplitude of oscillation parameter (previously described) to an amplitude control module 6235. The amplitude control module 6235 further processes the damping parameter and the amplitude of oscillation parameter and generates digital drive signals. The digital drive signals are converted to analog drive signals by D/A converters 6240 for operating the drivers 6245 connected to the flowtube of the digital flowmeter, in some implementations, the amplitude control module 6235 may process the damping parameter and the amplitude of oscillation parameter and generate analog drive signals for operating the drivers 6245 directly.
The sensor and driver parameters processing module 6210 executes an optional diagnose_flow_condition processing routine (6256) to calculate statistical values including the mean, standard deviation, and slope for each of the sensor and driver variables. The optional diagnose_flow_condition processing routine (-6256) may be utilized, for example, to identify a two-phase flow condition and/or to determine if a liquid component of the two-phase flow condition includes separate liquid constituents, such as oil and water. Based upon the statistics calculated for each of the sensor and driver variables, an optional flow condition state machine (6258) may be utilized to detect transitions between one of three valid flow-condition states: FLOW_CONDITION_SHOCK, FLOW_CONDITION_HOMOGENEOUS, AND FLOW_CONDITION_MIXED. However, if a process fluid is known to already include a heteregenous mixture, the process may automatically proceed from step 6254 to a calculation of raw mass-flow measurement 6260.
If the state FLOW_CONDITION_SHOCK is detected (6258), the mass-flow measurement analysis process is not performed due to irregular sensor inputs. On exit from this condition, the processing routine starts a new cycle (6251). The processing routine then searches for a new sinusoidal signal to track within the sensor signal data and resumes processing. As part of this tracking process, the processing routine must find the beginning and end of the sine wave using the zero crossing technique described above. If the state FLOW_CONDITION_SHOCK is not detected, the processing routine calculates the raw mass-flow measurement of the material flowing through the flowmeter 100 (6260).
If a multiple-phase flow is already known to exist in the monitored process, the material flowing through the flowmeter 100 is assumed to be, for example, a two-phase or three-phase material. For example, the material flowing through the flowmeter 100 may be a multi-phase process fluid, such as a wet gas. In this case, the multiple-phase flow error correction module 6220 determines an apparent intermediate value and, using the neural network processor(s), corrects the apparent intermediate value using (6274). Phase-specific properties of each phase of the multi-phase fluid are determined by the mass-flow measurement output block 6230 using the corrected intermediate value (6276). Processing then begins a new cycle (6251).
Referring again to
In one example, a digital flowmeter 6200 may process a flow known to be a three-phase fluid. For example, the three-phase flow may be primarily natural gas, with a liquid constituent which includes a mixture of oil and water. In other examples, the same or a similar process may be applied to a two-phase fluid or a fluid containing more than three constituents in the fluid mixture.
Specifically, flowtube operation is maintained in a three-phase flow. The basic measurements of frequency and phase, sensor amplitudes and drive gain are obtained from the sensor signals and required current. The basic measurements are used, with any available external inputs and process or application-specific knowledge to generate estimates of the overall fluid and multi-component mass and volumetric flow rates.
For example, the estimates of the overall fluid and multi-component mass and volumetric flow rates may be generated as follows. The estimates of frequency, phase, and/or amplitudes may be improved using known correlations between the values, such as, for example, a rate of change of amplitude correction. The raw estimates of the mixed mass flow and density may be produced from best estimates of frequency, phase, flowtube temperature and calibration constants. A simple linear correction is applied to the density measurement for the observed fluid pressure. In some implementations, the observed fluid pressure may be obtained from an external input. Because pressure expands and stiffens the flowtube, which may cause the raw density to be in error, a simple variable offset may work well if gas densities expected in a repeatable process or fluid mixture, while a more complete correction may include extra terms for the variable fluid density if changes in the liquid and/or gas constituent concentrations are anticipated in the process. A transmitter may include configuration parameters defining the expected liquid densities (with temperature compensation) and the gas reference density.
In a three-phase fluid mixture, a fixed water-cut (WC) may be assumed or may be measured. The water-cut is the portion of the mixture that is water. The fluid temperature is measured to calculate an estimate of the true fluid density (D1) from the water-cut and the pure oil density (Doil) and water density (Dwater). The estimate of the true fluid density accounts for the known variation of Doil and Dwater with the fluid temperature and the fluid pressure.
D1=WC %/100*Dwater+(1−WC %/100)*Doil
A model (based on, for example, the ideal gas model) for the variation of gas density (Dg) with observed fluid pressure and fluid temperature, which may be obtained from external inputs, is assumed and the raw liquid volume fraction (raw_LVF) from the raw mixture density (raw_Dm) is calculated using
raw_LVF=100*(raw—Dm−Dg)/(D1−Dg).
The raw volumetric mixture flowrates from the raw mixture are calculated using
raw—mvf=raw—mmf/raw—Dm.
A neural network trained with experimental data is used to generate corrected estimates of the raw liquid volume fraction and the raw volumetric flowrates as shown below. In the equations below, the variable “nnfunction” represents the neural network.
corrected_LVF=nnfunction(raw_LVF,raw_mvf,fluid_pressure,flowtube—DP)
corrected—mvf=nnfunction(raw_LVF,raw—mvf,fluid_pressure,flowtube—DP)
The raw liquid volume fraction (raw LVF) equals 100−gas volume fraction (GVF). Additionally, the raw liquid volume fraction is closely related to density drop. The raw volumetric flow can be scaled as velocity for example without change in approach, the Neural nets could be combined, but could use different inputs.
The liquid and gas flowrates are calculated using the following relationships:
corr_liqvf=corr_LVF/100*corr—mvf
corr_gasvf=(1−corr_LVF/100)*corr—mvf
corr_liqmf=corr_liqvf*D1
corr_gasmf=corr_gasvf*Dg
A water cut meter can be used to provide measurement used as an additional input to the neural network(s), and to help accurately separate the liquid flow into the constituent parts. To help accurately separate the liquid flow, the following relationships may be used:
corr_Watervf=WC %/100*corr_liqvf
corr_Oilvf=(1−WC %/100)*corr_liqvf
corr_watermf=corr_Watervf*Dwater
corr_Oilmf=corr_Oilvf*Doil
Alternatively or additionally, apparent gas and non-gas Froude numbers may be determined, corrected using the neural network, and then used in determining the mass flowrates of the constituent components of the multiphase fluid. For example, the gas Froude number may be determined based on the following equation where is the apparent gas mass flow rate, ρg is an estimate of the density of the gas phase of the multi-phase fluid based on the ideal gas laws, ρl is an estimate of the density of the liquid in the non-gas phase of the multi-phase fluid, A is the cross-sectional area of the flowtube, D is the diameter of the flowtube, and g is the acceleration due to gravity. The apparent gas mass flow rate is a function of the known or assumed density of the component fluids in the multi-phase flow, the apparent density of the multi-phase fluid (the apparent bulk density), and the apparent mass flow rate of the multi-phase fluid (apparent bulk mass flow rate).
where
the Apparent Gas Velocity
Similarly, the apparent non-gas Froude number (which may be the liquid Froude number) may be calculated using the following equation, where mla is the apparent liquid mass flow rate, K is the constant defined above with respect to the gas Froude number, and Vta is the apparent liquid velocity determined similarly to the apparent as velocity shown above:
The apparent gas and non-gas Froude numbers are then corrected using the neural network:
corrected_gas Froude number=nnfunction(apparent gas Froude number, apparent non-gas Froude number)
corrected_non-gas Froude number=nnfunction(apparent gas Froude number, apparent non-gas Froude number)
Once the corrected gas and non-gas Froude numbers are determined, the mass flow rate for the gas and non-gas components of the multi-phase fluid may be determined. In particular, once the corrected values of the gas and non-gas Froude numbers are obtained, all parameter values for the non-gas and gas components of the multi-phase fluid other than the mass flow rate are known. Thus, the corrected mass flow rate of the non-gas and gas components of the multi-phase fluid may be determined based on the equations above that are used to determine the apparent Froude numbers.
Additionally, as with the implementation using the liquid volume fraction and the volumetric flow as inputs to the neural network, a watercut meter may be used to help separate the multi-phase, fluid into constituent parts. For example, the watercut meter may provide a watercut (WC) of the multi-phase fluid that indicates the portion of the multi-phase fluid that is water, and the WC may be used to help separate the multi-phase fluid into constituent parts using the following equations:
corr_Watervf=WC %/100*corr_liqvf
corr_Oilvf=(1−WC %/100)*corr_liqvf
corr_Watermf=corr_Watervf*Dwater
corr_Oilmf=corr_Oilvf*Doil.
As discussed with respect to
The above description provides an overview of various digital Coriolis mass flowmeters, describing the background, implementation, examples of its operation, and a comparison to prior analog controllers and transmitters. A number of improvements over analog controller performance have been achieved, including: high precision control of flowtube operation, even with operation at very low amplitudes; the maintenance of flowtube operation even in highly damped conditions; high precision and high speed measurement; compensation for dynamic changes in amplitude; compensation for two-phase flow, and batching to/from empty. This combination of benefits suggests that the digital mass flowmeter represents a significant step forward, not simply a gradual evolution from analog technology. The ability to deal with two-phase flow and external vibration means that the digital mass flowmeter 100 gives improved performance in conventional Coriolis applications while expanding the range of applications to which the flow technology can be applied. The digital platform also is a useful and flexible vehicle for carrying out research into Coriolis metering in that it offers high precision, computing power, and data rates.
An additional application of the digital flowmeter 6200 to a three-phase fluid, e.g., a wet-gas having a gas (methane) and liquid component (oil and water) is described and shown in connection with
With respect to
Applicable modeling strategies use apparent mass flow and apparent density to apply correction factors or curve-fitting of collected data to create real measurements, such as a real-time density measurement. However, the wide range of gas densities, such as 175-900 psi, favors additional approaches as well. For example, alternative parameters have been identified, including model parameters that include two principle parameters for errors. Specifically, mixture volumetric flow (assuming no slip between phases)—based on mass/density ratio and Liquid Volume Fraction (LVF) i.e. 100%−GVF. Corrections for each are provided, using their raw values and additional pressure data (only). Given corrected values of LVF and volumetric flow, the mass flow rates of the gas and liquid components can be calculated as follows:
ml=ρl·LVF/100%·Volflow
mg=ρg·(1−LVF/100%)·Volflow
The resulting errors are shown in
The model may be expanded or modified so that basic pressure “corrections,” which may include fitting raw data through curve-fitting to directly output actual measurements, e.g., without a true correction factor, and are applied to density before we apply the neural net. Current inputs are fluid specific, e.g., volumetric flow depends on actual fluid density. The inputs may be made less dimensional, for example, by converting volumetric flow to velocity, then express the velocity as a percentage of maximum velocity that may be accommodated by the conduit, followed by normalizing the data to determine constituents. Operating pressures may include a 60 bar flow pressure, with a 2-3 bar differential, and will support higher operating pressures in the range of 150 psi-1000 psi. The detailed model calibration trials referenced in
R. Source Code Listing
The following source code, which is hereby incorporated into this application, is used to implement the mass-flow rate processing routine in accordance with one implementation of the flowmeter. It will be appreciated that it is possible to implement the mass-flow rate processing routine using different computer code without departing from the scope of the described techniques. Thus, neither the foregoing description nor the following source code listing is intended to limit the described techniques.
Source Code Listing
S. Notice of Copyright
A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by any one of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
Other implementations are within the scope of the following claims.
This application is a continuation (and claims the benefit of priority under 35 U.S.C. §120) of U.S. patent application Ser. No. 12/614,156, filed Nov. 6, 2009 and titled WET GAS MEASUREMENT, now allowed, as U.S. Pat. No. 8,126,661, and this application is a continuation (claims the benefit of priority under 35 U.S.C. §120) of U.S. patent application Ser. No. 11/846,393, filed Aug. 28, 2007 and titled WET GAS MEASUREMENT, now allowed, as U.S. Pat. No. 7,617,055, which claims the benefit of U.S. Provisional Application Ser. No. 60/823,753, filed Aug. 28, 2006, and titled WET GAS MEASUREMENT SYSTEM and the benefit of U.S. Provisional Application Ser. No. 60/913,148, filed Apr. 20, 2007, and titled WET GAS CALCULATIONS. All of these applications are incorporated by reference in their entirety.
Number | Name | Date | Kind |
---|---|---|---|
3956682 | Van Dyck | May 1976 | A |
RE29383 | Gallatin et al. | Sep 1977 | E |
4358822 | Sanchez | Nov 1982 | A |
RE31450 | Smith | Nov 1983 | E |
4419898 | Zanker et al. | Dec 1983 | A |
4422338 | Smith | Dec 1983 | A |
4491025 | Smith et al. | Jan 1985 | A |
4688418 | Cheung et al. | Aug 1987 | A |
4727746 | Mikasa et al. | Mar 1988 | A |
4757390 | Mehrgardt et al. | Jul 1988 | A |
4773257 | Aslesen et al. | Sep 1988 | A |
4782711 | Pratt | Nov 1988 | A |
4801897 | Flecken | Jan 1989 | A |
4817448 | Hargarten et al. | Apr 1989 | A |
4823614 | Dahlin | Apr 1989 | A |
4852395 | Kolpak | Aug 1989 | A |
4852410 | Corwon et al. | Aug 1989 | A |
4879911 | Zolock | Nov 1989 | A |
4891991 | Mattar et al. | Jan 1990 | A |
4895030 | Bergamini et al. | Jan 1990 | A |
4911006 | Hargarten et al. | Mar 1990 | A |
4911020 | Thompson | Mar 1990 | A |
4934195 | Hussain | Jun 1990 | A |
4934196 | Romano | Jun 1990 | A |
5027662 | Titlow et al. | Jul 1991 | A |
5029482 | Liu et al. | Jul 1991 | A |
5052231 | Christ et al. | Oct 1991 | A |
5054313 | Fitzgerald et al. | Oct 1991 | A |
5054326 | Mattar | Oct 1991 | A |
5218869 | Pummer | Jun 1993 | A |
5224372 | Kolpak | Jul 1993 | A |
5224387 | Lindenbaum et al. | Jul 1993 | A |
5228327 | Bruck | Jul 1993 | A |
5295084 | Arunachalam et al. | Mar 1994 | A |
5301557 | Cage et al. | Apr 1994 | A |
5347874 | Kalotay et al. | Sep 1994 | A |
5400653 | Kalotay | Mar 1995 | A |
5429002 | Colman | Jul 1995 | A |
5469748 | Kalotay | Nov 1995 | A |
5497665 | Cage et al. | Mar 1996 | A |
5497666 | Patten et al. | Mar 1996 | A |
5535632 | Kolpak | Jul 1996 | A |
5555190 | Derby et al. | Sep 1996 | A |
5570300 | Henry et al. | Oct 1996 | A |
5578764 | Yokoi et al. | Nov 1996 | A |
5594180 | Carpenter et al. | Jan 1997 | A |
5648616 | Keel | Jul 1997 | A |
5654502 | Dutton | Aug 1997 | A |
5687100 | Buttler et al. | Nov 1997 | A |
5732193 | Aberson | Mar 1998 | A |
5734112 | Bose et al. | Mar 1998 | A |
5774378 | Yang | Jun 1998 | A |
5804741 | Freeman | Sep 1998 | A |
5861561 | Van Cleve et al. | Jan 1999 | A |
5877954 | Klimasauskas et al. | Mar 1999 | A |
5926096 | Mattar et al. | Jul 1999 | A |
5969264 | Rivkin | Oct 1999 | A |
6073495 | Stadler | Jun 2000 | A |
6092429 | Cunningham et al. | Jul 2000 | A |
6178828 | Mattar | Jan 2001 | B1 |
6185470 | Pado et al. | Feb 2001 | B1 |
6301973 | Smith | Oct 2001 | B1 |
6309342 | Blazey et al. | Oct 2001 | B1 |
6311136 | Henry et al. | Oct 2001 | B1 |
6318156 | Dutton et al. | Nov 2001 | B1 |
6327914 | Dutton | Dec 2001 | B1 |
6505131 | Henrot | Jan 2003 | B1 |
6505519 | Henry et al. | Jan 2003 | B2 |
6551251 | Zuckerwar et al. | Apr 2003 | B2 |
7032432 | Gysling et al. | Apr 2006 | B2 |
7065455 | Henry et al. | Jun 2006 | B2 |
7096719 | Gysling | Aug 2006 | B2 |
7124646 | Henry et al. | Oct 2006 | B2 |
7134320 | Gysling et al. | Nov 2006 | B2 |
7136761 | Henry et al. | Nov 2006 | B2 |
7152460 | Gysling et al. | Dec 2006 | B2 |
7165464 | Gysling et al. | Jan 2007 | B2 |
7171316 | DeVries et al. | Jan 2007 | B2 |
7240567 | Cheesewright et al. | Jul 2007 | B2 |
7284449 | Rieder et al. | Oct 2007 | B2 |
7299705 | Gysling | Nov 2007 | B2 |
7328624 | Gysling et al. | Feb 2008 | B2 |
7343818 | Gysling et al. | Mar 2008 | B2 |
7357039 | Rieder et al. | Apr 2008 | B2 |
7380438 | Gysling et al. | Jun 2008 | B2 |
7389687 | Gysling et al. | Jun 2008 | B2 |
7617055 | Henry et al. | Nov 2009 | B2 |
20020133307 | Maginnis | Sep 2002 | A1 |
20050081643 | Mattar et al. | Apr 2005 | A1 |
20050216242 | Flax et al. | Sep 2005 | A1 |
20050229716 | Unsworth et al. | Oct 2005 | A1 |
20050229719 | Rieder et al. | Oct 2005 | A1 |
20060058971 | Logue et al. | Mar 2006 | A1 |
Number | Date | Country |
---|---|---|
0 696 726 | Feb 1996 | EP |
0 702 212 | Mar 1996 | EP |
0 827 096 | Mar 1998 | EP |
9321505 | Oct 1993 | WO |
0010059 | Feb 2000 | WO |
0208703 | Jan 2002 | WO |
Entry |
---|
DeCarlo, Joseph, “True Mass-Flow Measurement”; Fundamentals of Flow Measurement, Unit 11-2; pp. 208-220; 1984. |
Grumski, J.T., et al., “Performance of a Coriolis-type Mass Flow Meter in the Measurement of Two-phase (air-liquid) Mixtures”, ASME Fluid Engineering Division Publication FED, vol. 17, pp. 75-84, 1984. |
Henry, M.P., ““Intelligent” Behaviour for Self-Validating Sensors”, Advances in Measurement, pp. 1-7, date unknown. |
Henry, M.P., “Self-Validation Improves Coriolis Meter”, Control Engineering, 42 (6), pp. 81-86 (1995). |
Henry, M.P., “Sensor Validation and Fieldbus”, IEEE Computing and Control Engineering Journal, 6 (6), pp. 263-269. |
Henry, M.P., et al., “A New Approach to Sensor Validation”, Improved Analyser Performance, IMC, Mar. 17, 1992. |
Henry, M.P., et al., “A Self-Validating Digital Coriolis Mass-flow Meter: An Overview”, Control Engineering Practice 8 (2000), 487-506. |
Henry, M.P., et al., “A Standard Interface for Self-Validating Sensors”, Report No. QUEL 1884/91, University of Oxford, Department of Engineering Science, Sep. 1991. |
Henry, M.P., et al., “Signal Processing, Data Handling and Communications: The Case for Measurement Validation”, Mar. 1992. |
Henry, M.P., et al., “The Implications of Digital Communications on Sensor Validation”, Report No. QUEL 1912/92, University of Oxford, Department of Engineering Science, Apr. 1992. |
Henry, M.P., et al., “The Self-Validating Sensor: Rationale Definitions and Examples”, Control Engineering Practice, 1 (4), pp. 585-610, 1993. |
J. Hemp et al.; “On the Theory and Performance of Coriolis Mass Flowmeters”; Proceedings of the International Conference on Mass Flow Measurement Direct and Indirect; IBC Technical Services; 40 pages; London, Feb. 1989. |
Liu, R.P., et al., “A Neural Network to Correct Mass Flow Errors Caused by Two Phase Flow in a Digital Coriolis Mass Flow Meter”. Engineering Science Department, Oxford University. |
Luntta, E., et al., “Neural Network Approach to Ultrasonic Flow Measurements”, Flow Measurement and Instrumentation, vol. 10, pp. 35-43, 1999. |
Merriam-Webster's Collegiate Dictionary, Tenth Edition, 1998, p. 747. |
Reimann, J., “Developments in Tow-Phase Mass Flow Rate Instrumentation”, pp. 339-402. |
Skea, A.F., “Effects of Gas Leaks in Oil Flow on Single-Phase Flowmeters”, Flow Measurement and Instrumentation, vol. 10, pp. 146-150 (1999). |
Sptizer, David A., “Mass Flowmeters”, Industries Flow Measurement, Chapter 12, pp. 197-210, 1990. |
Wood et al., “A Phase-Locked Loop for Driving Vibrating Tube Densimeters,” Rev. Sci. Instrum., vol. 60, No. 3, Mar. 1989, pp. 493-494. |
Office Action for corresponding Chinese Application No. 200780040273.7, mailed Nov. 22, 2010, with English-language translation, 14 pages. |
PCT International Search Report and Written Opinion for PCT/US07177018 mailed Dec. 13, 2008, 6 pages. |
Office action issued Nov. 14, 2008 in related U.S. Appl. No. 11/846,393 now issued as Patent No. 7,617,055—13 pgs. |
Response filed Mar. 16, 2006 to Office Action dated Nov. 14, 2008 regarding related U.S. Appl. No. 11/846,393 now issued as Patent No. 7,617,055—14 pgs. |
Office action issued Aug. 9, 2010 in related U.S. Appl. No. 12/614,156 now issued as PatentNo. 8,126,661—6 pgs. |
Response filed Jan. 10, 2011 to Office Action dated Aug. 9, 2010 regarding related U.S. Appl. No. 12/614,156 now issued as Patent No. 8,126,661—10 pgs. |
Office action issued Apr. 28, 2011 in related U.S. Appl. No. 12/614,156 now issued as Patent No. 8,126,661—17 pgs. |
Response filed Aug. 29, 2011 to Office Action dated Apr. 28, 2011 regarding related U.S. Appl. No. 12/614,156 now issued as Patent No. 8,126,661—10 pgs. |
Number | Date | Country | |
---|---|---|---|
20120216626 A1 | Aug 2012 | US |
Number | Date | Country | |
---|---|---|---|
60913148 | Apr 2007 | US | |
60823753 | Aug 2006 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 12614156 | Nov 2009 | US |
Child | 13357151 | US | |
Parent | 11846393 | Aug 2007 | US |
Child | 12614156 | US |