ISA Transactions ∎ (∎∎∎∎) ∎∎∎–∎∎∎
Contents lists available at SciVerse ScienceDirect
ISA Transactions journal homepage: www.elsevier.com/locate/isatrans
Development of Coriolis mass flowmeter with digital drive and signal processing technology Qi-Li Hou a, Ke-Jun Xu a,b,n, Min Fang a, Cui Liu a, Wen-Jun Xiong a a b
School of Electrical and Automation Engineering, Hefei University of Technology, Hefei 230009, China Engineering Technology Research Center of Industrial Automation, Hefei 230009, China
art ic l e i nf o
a b s t r a c t
Article history: Received 6 January 2013 Received in revised form 18 March 2013 Accepted 1 May 2013 This paper was recommended for publication by Dr. Jeff Pieper
Coriolis mass flowmeter (CMF) often suffers from two-phase flowrate which may cause flowtube stalling. To solve this problem, a digital drive method and a digital signal processing method of CMF is studied and implemented in this paper. A positive–negative step signal is used to initiate the flowtube oscillation without knowing the natural frequency of the flowtube. A digital zero-crossing detection method based on Lagrange interpolation is adopted to calculate the frequency and phase difference of the sensor output signals in order to synthesize the digital drive signal. The digital drive approach is implemented by a multiplying digital to analog converter (MDAC) and a direct digital synthesizer (DDS). A digital Coriolis mass flow transmitter is developed with a digital signal processor (DSP) to control the digital drive, and realize the signal processing. Water flow calibrations and gas–liquid two-phase flowrate experiments are conducted to examine the performance of the transmitter. The experimental results show that the transmitter shortens the start-up time and can maintain the oscillation of flowtube in two-phase flowrate condition. & 2013 ISA. Published by Elsevier Ltd. All rights reserved.
Keywords: Coriolis mass flowmeter Digital signal processing Flow measurement Industrial measurement Digital drive method Transmitter development
1. Introduction CMF occupies an important position in the field of flow measurement because it can measure the true mass flowrate directly and obtain the fluid density simultaneously. CMF consists of flowtubes and an electronic transmitter. The transmitter maintains the flowtubes oscillation and performs the signal processing of the sensors attached to the flowtubes. The proper oscillation of the flowtubes is a basis for the operation of CMF, therefore the drive method is an important technique for CMF. The most common drive method is based on the analog positive feedback technique. The sensor signal is amplified and fed back into an electromagnetic driver in the electronic transmitter. This approach can ensure the phase matching between the sensor signal and the drive signal because there is little delay in the analog feedback circuitry. But the analog drive method will result in a long start-up time of the flowtubes. Especially when measuring the gas–liquid twophase flow, the analog drive system is prone to stalling. This is because the dynamics of gas–liquid two-phase flow causes high damping.
n Corresponding author at: School of Electrical and Automation Engineering, Hefei University of Technology, 193 Tunxi Road, Hefei 230009, China. Tel.: +86 13 855185198; fax: +86 551 62904435. E-mail addresses:
[email protected] (Q.-L. Hou),
[email protected] (K.-J. Xu),
[email protected] (M. Fang),
[email protected] (C. Liu),
[email protected] (W.-J. Xiong).
At this time a high drive gain is required so as to maintain the flowtube operation. But the analog drive system is unable to provide sufficient drive gain rapidly, so the flowtubes stalls. For solving this problem, digital drive methods have been studied and applied to CMF in recent years. Maginnis [1] introduced an initialization algorithm for drive control of CMF. A MDAC is used to generate the drive signal. MDAC receives the analog sensor signal from one of the pick-offs and its gain is controlled by the processing unit. MDAC outputted an analog signal, and this signal is then amplified as the drive signal. This control method is easy to be realized, and there is only one parameter which is the gain of drive signal, needs to be controlled, as the frequency and phase of the drive signal match that of the sensor signal automatically. Barger [2] also utilized this drive method. However, since the drive signal is derived from the sensor signal, there will be no output of pick-offs before the flowtubes vibrate. This will result in a long start-up time of the flowtube. Shimada [3] combined the analog drive method with the digital wave synthesis drive method based on phase-locked loop (PLL). Before the flowtubes vibrate, the analog drive method is used to perform drive activation processing. When the amplitude of the sensor signal is larger than a predetermined level, the analog drive mode is switched to the digital drive mode. However, using the analog drive method to start an initial oscillation will lead to a long start-up time.
0019-0578/$ - see front matter & 2013 ISA. Published by Elsevier Ltd. All rights reserved. http://dx.doi.org/10.1016/j.isatra.2013.05.001
Please cite this article as: Hou Q-L, et al. Development of Coriolis mass flowmeter with digital drive and signal processing technology. ISA Transactions (2013), http://dx.doi.org/10.1016/j.isatra.2013.05.001i
2
Q.-L. Hou et al. / ISA Transactions ∎ (∎∎∎∎) ∎∎∎–∎∎∎
Henry et al. [4–9] studied many drive methods of CMF. An approach of driving the conduit is to use square wave pulses [7]. The fixed (positive and negative) direct current sources are switched on and off at timed intervals to provide the required energy. The switching is synchronized with the sensor voltage phase. But it is not told us how to determine the “timed interval” and the relationship between “switching” and “phase”, i.e. how to perform switching according to the phase of the sensor signal in this reference. A random sequence mode, a positive feedback mode and a digital synthesis mode were proposed [8]. The random sequence mode is used in the start-up of flowtube, in which filtered, random frequencies are applied as a drive signal to a flowtube. Once the flowtube reaches a resonant mode of vibration, the digital flowmeter may transition to a positive feedback mode, in which the sensor signals are input through the input channels of coder–decoder (CODEC), sampled and buffered within the fieldprogrammable gate array (FPGA), and then fed back through the output channels of the CODEC to the flowtube as the drive signal. Once an oscillation of the flowtube is achieved and analyzed, a digital synthesis mode of operation may be implemented, in which the analyzed sensor signals are used to synthesize the drive signal. The digital synthesis mode was used in [9], and the pure sine waves having phases and frequencies required were synthesized and outputted through CODEC to the drivers. Fan et al. [10,11] also utilized this drive method. However, it needs a large amount of computation to synthesize the sine waves, and a large memory to buffer the sine waves. The digital drive method overcomes some limitations of the analog drive approaches. But there are two challenges in the implementation of digital drive method. The first one is that what kind of signal can be used to excite the flowtube vibration when the flowtube natural frequency is unknown. Before the flowtubes vibrate, there is no the sensor output signal. Thus the processor cannot obtain the flowtube natural frequency, and cannot determine the frequency of the drive signal. So the flowtubes cannot be excited to vibrate by the drive signal with an improper frequency, because only the drive signal frequency is very close to the flowtube natural frequency, the flowtubes can vibrate. After the flowtubes vibrate, the processor should calculate the amplitude, frequency and phase of the sensor signals in real time, and synthesize a drive waveform whose parameters must be satisfied excitation requirements to excite the flowtubes for obtaining the stable oscillation. Therefore the second one is how to obtain the parameters of the sensor signals rapidly and accurately. In other words, a digital signal processing method with both high processing accuracy and fast tracking speed is needed to track the variation of sensor signal for the drive control. There are some digital signal processing methods for CMF, including the discrete Fourier transform (DFT), PLL, digital zerocrossing, adaptive line enhancer (ALE), sliding Goertzel, discretetime Fourier transform (DTFT), etc. DFT was used to process the sensor output signals of CMF [4,7,12]. Henry et al. [4] found that Fourier-based technique was very precise. This method has good resistance to higher harmonics. However, it needs to adopt additional technique for eliminating the effect of non-integer period sampling. Freeman et al. [13] utilized the digital phase locked loop to process the signals of CMF, and Xu et al. [14] also studied on this method. This method is of high processing precision under no noise interference. But its anti-noise ability is poor. Derby et al. [15,16] introduced ALE into the signal processing of CMF. The phase difference between the sensor signals is obtained using Fourier analysis or Goertzel Fourier transform. Xu and Ni et al. [17] improved the above algorithm. However, there is a long convergence stage in Goertzel algorithm.
Zhang and Tu [18] utilized discrete-time Fourier transform (DTFT) considering negative frequency contribution to solve this problem. During the calculation, the negative frequency is considered, so the convergence process is shortened greatly and the computation accuracy is improved effectively. The simulation results for steady signals show a better performance of DTFT than that of SGA [18]. This algorithm was realized in real time by us based on a Coriolis mass flow transmitter developed with TMS320F28335 chip, and the testing results showed its high accuracy and good repeatability. However, it is found that the whole algorithm has a large amount of computation and there may be little time left for drive control. Aiming at above problems, the start-up method using the positive–negative step signal is studied and implemented for CMF in this paper. This approach can initiate the flowtube oscillation reliably when there is no knowledge of the flowtube natural frequency. This can overcome the problem of long start-up time when using analog drive method to initiate the flowtube oscillation. And this approach is more effective than that of using random sequence to excite the flowtube in [8]. Then the digital drive method based on MDAC and DDS chip is put forward. The MDAC chip can control the drive gain flexibly, and the DDS chip can synthesize the sine wave with required frequency and phase information automatically. So the large amount of computation to synthesize the sine waves and the large memory to buffer the sine waves in [8] can be saved. At the same time, a digital zerocrossing detection method based on Lagrange interpolation is used to calculate the frequency and phase difference of the sensor outputs because of its small amount of calculation and good tracking speed. During the implementation of zero-crossing method based on DSP chip, some effective measures are taken to improve the processing precision. Finally a digital transmitter is developed with TMS320F28335 DSP chip, and the drive ability tests, water flow calibrations and gas–liquid two-phase flowrate experiments are conducted to validate the digital drive and signal processing techniques, and the digital transmitter. The organization of this paper is as follows: in Section 2, the start-up method using positive–negative method is presented. Section 3 is devoted to the theory and simulation results of zerocrossing detection method. The digital drive method based on DDS and MDAC chip is outlined in Section 4. The development of transmitter, including hardware and software is given in Section 5. In Section 6, experiments of transmitter are performed to examine the performance of the transmitter. The paper ends in Section 7 with the conclusions followed by the acknowledgments and references.
2. Start-up method using positive and negative step signals In order to study the start-up of the flowtube, a model of the flowtube is built up by using the one-dimensional damped forced vibration system. Its transfer function is expressed as GðsÞ ¼
ks s2 þ 2ζωn s þ ωn 2
ð1Þ
where k is the stiffness; ωn is the natural frequency; ζ is the damping factor, and its value is very small, e.g., 0.001. When the frequency of drive signal equals to the flowtube natural frequency, the flowtubes will vibrate easily with the lowest power cost. In the beginning, the transmitter generates a particular waveform to excite the flowtubes for the start-up of the flowtubes. After the flowtubes vibrate, when the signal amplitude of the sensor attached to the flowtubes is larger than a predetermined value As, the transmitter stops exciting the flowtubes, and enters into the zero-drive mode. During this stage the transmitter
Please cite this article as: Hou Q-L, et al. Development of Coriolis mass flowmeter with digital drive and signal processing technology. ISA Transactions (2013), http://dx.doi.org/10.1016/j.isatra.2013.05.001i
Q.-L. Hou et al. / ISA Transactions ∎ (∎∎∎∎) ∎∎∎–∎∎∎
collects the sensor signal and calculates its amplitude, frequency and phase. According to these parameters, the transmitter synthesizes a sine wave for exciting the flowtubes, and enters into the sine wave-drive mode, i.e. normal operation mode. The non-linear amplitude control is adopted to help the start-up of the flowtubes, and make the amplitude of the sensor signals increase to the desired value quickly. What kind of waveform can be selected to realize the start-up of the flowtubes? Sine, triangle and step signals are chosen as the inputs, the flowtube responses are calculated by Matlab according to the above model, respectively. The simulation results show that there is only the natural frequency component of the flowtube in the step response of the flowtube. Hence an alternating positive– negative step excitation method is proposed to start the flowtube oscillation. Suppose the input x(t) is a positive step signal, xðtÞ ¼ A0 ðtÞ
ð2Þ
where A0 4 0 and is the magnitude of the step input signal. The Laplace transform of Eq. (2) is XðsÞ ¼
A0 s
or positive step at the phase 1801 (falling zero-crossing), the flowtube oscillation will be largely strengthened. Therefore, the zero-crossings of the sensor signal are detected so as to determine switching the positive and negative step drive signal. Considering the presence of noise in the circuitry, in practice, a hysteresis loop is used to avoid unwanted switching between the positive and negative steps. When the sensor signal is larger than a predetermined value b (b 4 0 and being larger than the magnitude of noise in the circuitry), the transmitter outputs the negative step drive signal to excite the flowtubes; when the sensor signal is smaller than −b, the transmitter outputs the positive step drive signal to excite the flowtubes. Simulations of start-up using the positive and negative step drive signals have been carried out by Simulink tools in Matlab. Random noise is added to the circuitry and the result is shown in Fig. 2. In the simulations, various parameters, such as the damp ratio and the damped natural frequency of the flowtubes are changed. The simulation results show that this method can initiate the flowtube oscillation. 3. Digital zero-crossing detection method
ð3Þ
Eq. (1) is multiplied by Eq. (3), and then the inverse Laplace transform is performed to obtain the step response of the flowtubes. A0 k sinðωd tÞe−st ð4Þ ωd pffiffiffiffiffiffiffiffiffiffiffi where ωd ¼ ωn 1−ζ 2 is the damped natural frequency and s ¼ ζωn . Eq. (4) shows that there is an output signal with the damped natural frequency of the flowtube in the step response. When the positive and negative step inputs with the same amplitude are applied to the flowtubes, the magnitudes of their effects are same, but their phases are opposite. The simulation results are shown in Fig. 1. As can be seen from Fig. 1, the amplitude of step response is too small for DSP to calculate the frequency because of the existence of noise. But if the positive and negative step signals are properly used to excite the flowtubes, the flowtube oscillation will be strengthened and the amplitude of the sensor signal will become large. By simulation, it is found that if a negative step is used to excite the flowtubes when the phase of the sensor signal is between −901 and +901 or a positive step is applied when the phase of the sensor signal is between +901 and +2701, the flowtube oscillation will be strengthened. Especially, applying negative step to the flowtubes at the phase 01 of the sensor signal (rising zero-crossing)
yðtÞ ¼
3
After the flowtubes vibrate, DSP must calculate the amplitude, frequency and phase of the sensor signals in real time, and then synthesizes the desired drive waveform to maintain the stable oscillation of the flowtubes. It is necessary to employ an algorithm with fast tracking ability and insensitivity to magnitude variation to process the sensor signals. The DTFT method with negative frequency contribution has high processing accuracy for stable signal. But it has a large amount of calculation. And at the same time, when the two-phase flow occurs, the sensor signal will mutate, the DTFT method may be sensitive to the mutation of signal magnitude. Therefore a digital zero-crossing detection method based on Lagrange interpolation is used to calculate the frequency and phase difference of the sensor signals. The advantages of this approach are small amount of calculation, not being sensitive to the amplitude variation, and good tracking speed because the signal parameters can be obtained in one signal cycle. A schematic diagram of the zero-crossing detection is shown in Fig. 3. The zero-crossing times of the signal are recorded, and the time interval of zero-crossing points is calculated. Thus the frequency and phase difference of the signals can be obtained. As illustrated in Fig. 3, given the zero-crossing times t L1 ; t L2 ; t L3 ; t R1 ; t R2 ; and t R3 , the signal frequency is f ¼ 1=ðt R3 −t R1 Þ
ð5Þ
The time difference and phase difference of two channels are, respectively Δt ¼ ðt R2 −t L2 Þ Δφ ¼ 360f Δt
0.015
positive step response of flowtube
ð6Þ ð7Þ
negative step response of flowtube
0.01
Sensor / V
1
Sensor / V
0.005 0
0
-1
-0.005
Drive / V
-0.01 -0.015
0
0.05
0
0.05
0.1
0.15
0.2
0.1
0.15
0.2
1.5
0
0.005
0.01
0.015
Time / S Fig. 1. Positive–negative step response of flowtube.
0.02
1 0.5 0 -0.5
Time / S Fig. 2. Simulation of positive–negative step startup.
Please cite this article as: Hou Q-L, et al. Development of Coriolis mass flowmeter with digital drive and signal processing technology. ISA Transactions (2013), http://dx.doi.org/10.1016/j.isatra.2013.05.001i
Q.-L. Hou et al. / ISA Transactions ∎ (∎∎∎∎) ∎∎∎–∎∎∎
4
Table 1 Calculation results of phase difference.
t 2L
t1L t1R
t 3L
t 2R
t 3R
Δt Fig. 3. Schematic diagram of zero-crossing detection.
134.904
Estimated Frequency True Frequency
Theoretic value of phase difference (deg)
Estimated value of phase difference (deg)
Relative Theoretic error (%) value of phase difference (deg)
Estimated value of phase difference (deg)
Relative error (%)
0.01 0.03 0.05 0.07 0.09 0.2 0.5 2.0
0.010003 0.030007 0.050009 0.070010 0.090005 0.200030 0.500067 2.000226
0.036 0.026 0.019 0.015 0.006 0.015 0.013 0.011
0.020004 0.040005 0.060015 0.080019 0.100017 0.300075 1.000244 3.000578
0.021 0.015 0.026 0.025 0.018 0.025 0.024 0.019
0.02 0.04 0.06 0.08 0.1 0.3 1.0 3.0
Frequency / Hz
134.902
The simulation result of frequency calculation is shown in Fig. 4, and the calculation accuracy of the frequency is better than 0.003%. The calculation results of phase difference are shown in Table 1. As shown in Table 1, when the values of the phase difference vary from 0.011 to 3.01 which is normal variation range, the calculation accuracy is better than 0.04%.
134.9
134.898
4. Digital drive method based on DDS and MDAC
134.896 0
2
4
6
8
Time / S Fig. 4. Simulation result of frequency.
In practice, DSP processes the discrete signals that are sampled and converted by analog-to-digital converters (ADCs). The possibility of sampling zero-crossing points directly is very small. It is necessary to perform curve fitting for the sampled data so as to obtain the zero-crossing points of the signal. Here Lagrange Quadratic interpolation is employed to fit the curve. Given the sampling sequence of the sensor signal xðnÞ, if xðn−1ÞxðnÞ o 0, then there is a zero-crossing time point between ðn−1Þ and n. The Lagrange interpolating polynomial is supposed as x ¼ at 2 þ bt þ c
ð8Þ
where t is time, and a ¼ 0:5xðn−2Þ−xðn−1Þ þ 0:5xðnÞ;
ð9Þ
b ¼ −0:5xðn−2Þð2n−1Þ þ xðn−1Þð2n−2Þ−0:5xðnÞð2n−3Þ;
ð10Þ
c ¼ 0:5xðn−2Þðn−1Þn−xðn−1Þðn−2Þn þ 0:5xðnÞðn−2Þðn−1Þ
ð11Þ
The zero-crossing points can be obtained by solving above equations. Note that the roots out of the range of ½n−1; n must be discarded. The algorithm simulations are performed to examine its processing accuracy. The spectrum analysis of sensor signals in the industrial field shows that the main noise is the second harmonic of flowtube damped natural frequency. There is also random noise. Therefore a signal model is built up as shown in the following equation: x ¼ 1:0 sinð2πf =f s nÞ þ noise1 þ noise2
ð12Þ
where f is 134.9 Hz which is the oscillation frequency of the flowtube of CMF025 type Coriolis primary instrument made by Micro Motion; fs is the sampling frequency, 3.75 kHz; the number of sampling points is 30,000; noise1 is random noise; noise2 is the second harmonic; the SNR is about 25 dB.
After two key issues, i.e. the start-up of the flowtubes and the frequency and phase difference have been resolved, we adopt a DDS chip and a MDAC chip to implement the drive method. The frequency and phase of the drive signal is controlled by a DSP chip through the DDS chip, and the amplitude is controlled through the MDAC chip. The block diagram of the digital drive method is shown in Fig. 5. The output of DDS is connected with the analog input port of MDAC. The output of MDAC is connected with a power amplifier. The power amplifier generates a drive signal to excite the flowtubes. Before the flowtubes vibrate, DDS outputs a fixed voltage value for MDAC. The gain of MDAC is adjusted by DSP according to the sensor signal. The positive or negative step signal will be generated by MDAC, and sent to the power amplifier to excite the flowtubes. After the flowtubes vibrate, DSP collects the sensor signal and calculates its amplitude, frequency and phase. Then DSP determines the frequency, phase and amplitude of the synthesized drive waveform which is required to match with the sensor signal. The frequency of drive signal equals the frequency of sensor signal calculated by above algorithm. The initial phase value of DDS output signal must be determined in order to match the phase relationship between the drive signal and sensor signal, e.g., for CMF025 type flowtube, the phase difference between the drive signal and sensor signal is 1801. This is called phase matching. Its main tasks are as follows. Before updating the drive signal, the zero-crossing points of sensor signal are calculated and the time delays of hardware (analog circuitry and ADC) and software (digital filter) must be compensated so as to obtain the actual phase value of the sensor output signal. Then according to the phase relationship between the drive signal and sensor signal and the delays caused by digital-to-analog converter (DAC) and drive circuitry are also taken into account, the initial phase of the drive signal is calculated. The amplitude of the sensor signal is calculated by Lagrange interpolation method. Suppose the calculated amplitude of the sensor signal is aðtÞ. A desired amplitude value ad is predetermined and a non-linear amplitude control method is used to provide
Please cite this article as: Hou Q-L, et al. Development of Coriolis mass flowmeter with digital drive and signal processing technology. ISA Transactions (2013), http://dx.doi.org/10.1016/j.isatra.2013.05.001i
Q.-L. Hou et al. / ISA Transactions ∎ (∎∎∎∎) ∎∎∎–∎∎∎
5
Fig. 5. Block diagram of the digital drive method based on DDS and MDAC.
Fig. 6. Block diagram of system hardware.
stable oscillation, where the error eðtÞ is calculated as eðtÞ ¼ lnðad Þ−lnðaðtÞÞ
ð13Þ
The error e(t) is set into a proportional–integral (PI) control block to calculate the gain of drive signal. Z KðtÞ ¼ K p eðtÞ þ K i eðtÞ dt ð14Þ where Kp is the proportional coefficient and Ki is the integral coefficient. DSP writes the frequency and phase into DDS, and the amplitude gain into MDAC through the digital interface. DDS outputs the sinusoid signal with the specific frequency and phase. The signal at the analog port of MDAC, that is the output of DDS, is multiplied by the signal at the digital port, that is the amplitude gain, and a signal containing the frequency, phase and amplitude information is generated by MDAC. This signal is amplified by the power amplifier, and used to drive the flowtubes.
5. Development of transmitter It is necessary to select a kind of micro-processor with high speed processing ability and abundant peripherals for implementing the various functions of Coriolis mass flow transmitter, such as calculation, control and interfaces. Therefore TMS320F28335, a DSP chip made by TI Company, which has the processing speed of 150 MIPS and abundant peripherals, like multi-channel buffer serial port (McBSP), serial port interface (SPI), serial communication interface (SCI), external interface (XINTF), pulse-width modulation (PWM), etc., is chosen to develop a Coriolis mass flow transmitter. A block diagram of the transmitter hardware is shown in Fig. 6. It consists of a digital drive system, analog signal amplifying and filtering circuits, three 24-bit ADCs, an external static random access memory, a ferroelectric nonvolatile random access memory (FRAM), a liquid crystal display (LCD), a keyboard, a SCI interface,
a low-voltage supervisor, a DAC, a voltage-to-current circuit, and a pulse outputting circuit. A block diagram of the transmitter software is shown in Fig. 7. It is designed with modularized scheme, and mainly consists of a main monitoring program, an initialization module, an interrupt module, a FRAM module, a watch dog module, an algorithm module, an outputting module, and a man–machine interface module. All these subprograms are called by the main monitoring program. After powered up, the main monitoring program calls the initialization module, and starts the conversation of ADC to collect the sensor signals. Then DSP calls the positive–negative step exciting subprogram to excite the flowtubes until the sensor signal is larger than a predetermined value As which indicates that the flowtubes have vibrated and the frequency of the sensor signal can be calculated by the algorithm above-mentioned. A flow chart of the positive– negative step exciting subprogram is shown in Fig. 8. Next DSP begins to call the algorithm to calculate the mass flowrate and control the flowtube oscillation continuously. During this procedure, DSP also controls the LCD display, keyboard input and SCI communication. In the cpu timer0 interrupt service subprogram, DSP obtains the total mass flowrate by accumulating the current instantaneous mass flowrate, and outputs the pulses and 4–20 mA direct current (DC) signals which stand for the mass flowrate. When the supplying voltage of the system falls to the reset voltage threshold, the low-voltage supervisor sends an interrupt request to inform DSP to save total flowrate in FRAM. The flow chart of the transmitter software is shown in Fig. 9. Some key approaches in implementation are presented as follows. (1) Eliminating the effect of limited effective bits in algorithm operation on the computational accuracy. It is very important how to achieve the high computation accuracy during the algorithm implementation by DSP.
Please cite this article as: Hou Q-L, et al. Development of Coriolis mass flowmeter with digital drive and signal processing technology. ISA Transactions (2013), http://dx.doi.org/10.1016/j.isatra.2013.05.001i
6
Q.-L. Hou et al. / ISA Transactions ∎ (∎∎∎∎) ∎∎∎–∎∎∎
Fig. 7. Block diagram of system software.
Fig. 8. Flow chart of positive–negative step exciting subprogram.
When the zero-crossing detection method is implemented with DSP, its accuracy will be impacted by the limited effective bits of DSP operation. Therefore some measures should be taken to ensure the accuracy of the algorithm. Since the 32-bit float type variable is used during the interpolation operation, the effective bits of the coefficients obtained by Eqs. (9)–(11) are less, and the computation error is large. Therefore the 64-bit double type variable is utilized in DSP programs to ensure high precision. The sampled data xðn−2Þ, xðn−1Þ and x(n) used in Eqs. (9)–(11) are very close to 0 due to high sampling frequency of ADC, and the sign of xðn−2Þ is opposite with that of x(n). In order to ensure the effective bits of variables in the follow-up computation, the sampled data xðn−2Þ, xðn−1Þ and x(n) will be multiplied by 100 before they are substituted into Eqs. (9)–(11).
Fig. 9. Flow chart of system software.
When solving the roots of Eq. (8), the calculation error will become larger with the value of n increasing due to the float type precision of library function. Therefore before calculation, ðn−2Þ, ðn−1Þ and n are transformed to the fixed value of 0, 1 and 2.
Please cite this article as: Hou Q-L, et al. Development of Coriolis mass flowmeter with digital drive and signal processing technology. ISA Transactions (2013), http://dx.doi.org/10.1016/j.isatra.2013.05.001i
Q.-L. Hou et al. / ISA Transactions ∎ (∎∎∎∎) ∎∎∎–∎∎∎
7
Sensor / V
4
Amplitude:2.03V,Time:15.3s
2 0 -2 -4 0
2
4
6
0
2
4
6
8
10
12
14
16
18
8
10
12
14
16
18
Drive / V
4
Fig. 10. Circuit offset effect on the algorithm.
2 0 -2 -4
Then the roots solved plus ðn−2Þ will become the true roots of Eq. (8). As above-described, Eqs. (9)–(11) are simplified as follows.
c ¼ 100xðn−2Þ
ð17Þ
(2) Overcoming the impact of circuit bias on the algorithm. There are the DC offsets in two channel conditioned signals because two sensor signal conditioning circuits cannot be completely symmetrical. Two senor signals with the same amplitude, frequency and phase but different DC offsets are shown in Fig. 10. In this figure t L1 ; t L2 ; t L3 ; t R1 ; t R2 and t R3 are zerocrossings. Since the zero-crossing detection algorithm should be employed, the effect of the circuit offset on the algorithm must be considered and overcome. Take the sensor L as an example to explain the frequency calculation, the time interval between t L1 and t L2 is less than a half cycle of signal and the time interval between t L2 and t L3 is larger than a half cycle of signal. If the zero-crossings of both t L1 and t L2 or both t L2 and t L3 are used to calculate the frequency of signal, it will results in large computational error. Therefore the zero-crossings of t L1 and t L3 are used to calculate the frequency of the signal, that is, both positive zero-crossings or negative zero-crossings are utilized for computation. When calculating phase difference between the sensor L and R, the sensor L lags behind the sensor R in phase if t L1 and t R1 are used, but the sensor R lags behind the sensor L if t L2 and t R2 are used. So when calculating the phase difference, t L1 , t R1 , t L2 and t R2 are all utilized, that is, two pairs of zero-crossings consisting of positive and negative zero-crossings are utilized to calculate the phase difference.
4
Sensor / V
ð16Þ
Amplitude:2.05V,Time:1.9s
2 0 -2 -4 0
Drive / V
b ¼ −150xðn−2Þ þ 200xðn−1Þ−50xðnÞ;
Fig. 11. Waves of startup using the analog drive method.
0.5
1
1.5
2
2.5
3
2.5
3
Positive-negative step driving
10 0
Sine wave driving
-10 0
0.5
1
1.5
2
Time / s Fig. 12. Waves of startup using the digital drive method.
0.5
Sensor / V
ð15Þ
Details between 0 and 0.13s of Fig.12
0
-0.5
Drive / V
a ¼ 0:5ð100xðn−2Þ þ 100xðnÞÞ−100xðn−1Þ;
Time / s
0
0.02
0.04
0
0.02
0.04
0.06
0.08
0.1
0.12
0.06
0.08
0.1
0.12
10 0 -10
Time / s
6.1. Start-up of flowtube The transmitter developed by us was connected with a CMF025 type primary instrument made by Micro Motion [19]. The start-up experiments using the analog drive method and digital drive method studied in this paper were both performed. The sensor signal and drive signal were sampled simultaneously by an oscilloscope and plotted in Figs. 11 and 12. The amplitude desired was set as 2.3 V. It takes 15.3 s for analog drive method to make the sensor signal increase to 90 percent of the desired value, but only 1.9 s for digital drive method. The start-up time is largely shortened. Figs. 13 and 14 are the details of Fig. 12. By comparing the start-up results using random sequence in [8], the positive– negative step signal is more effective than the random sequence. As shown in Fig. 13, the amplitude of sensor signal increases quickly when excited by positive–negative step signal, but when
1
Details between 0.22s and 0.34s of Fig.12
0 -1 0.22
Drive / V
6. Experiments of transmitter
Sensor / V
Fig. 13. Waves of positive–negative step driving.
0.24
0.26
0.24
0.26
0.28
0.3
0.32
0.34
0.28
0.3
0.32
0.34
10 0 -10 0.22
Time / s Fig. 14. Waves of sine wave driving.
using the random sequence drive method in [8], the amplitude of sensor signal does not become large until the drive controller enters into the zero-drive method.
Please cite this article as: Hou Q-L, et al. Development of Coriolis mass flowmeter with digital drive and signal processing technology. ISA Transactions (2013), http://dx.doi.org/10.1016/j.isatra.2013.05.001i
Q.-L. Hou et al. / ISA Transactions ∎ (∎∎∎∎) ∎∎∎–∎∎∎
8
6.3. Drive ability tests under gas–liquid two-phase flow condition Gas–liquid two-phase flowrate experiments were performed to test the drive ability of our transmitter. Two CMF025 type primary instruments were installed on the pipeline. The upstream primary instrument was connected with Model 2700 transmitter made by Micro Motion to form a standard flowmeter [20]. The downstream primary instrument was connected with our transmitter and was the tested flowmeter. The air flow rate added to the downstream flowtube was measured by a gas rotameter while the true water flowrate was given by the Model 2700 transmitter. The sensor signals under gas–liquid two-phase flow condition were sampled by the oscilloscope. The results are shown in Figs. 15 and 16. In Fig. 15(a), the water flow rate was 10.0 L/min, and the air flow rate was 6.0 L/min, where the gas void fraction (GVF) was Table 2 Water flowrate calibration results. Flowrate (kg/min) Relative error (%) Repeatability (%)
Sensor / V
32 13 6 2 32
0.070 0.019 −0.092 −0.047 0.061
0.01 0.01 0.03 0.03 0.01
Mixed with gas
2 0 -2
Water flow:10.0L/min.Gas flow:6.0L/min 0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
Sensor / V
0.5
Details between 0.35s and 0.55s 0
-0.5 0.35
0.4
0.45
0.5
Time / s Fig. 15. Sensor signal under two-phase condition (GVF is 37%).
0.55
Mixed with gas
2 0 -2
Water flow:4.8L/min.Gas flow:6.0L/min 0
1
2
3
4
5
6
1
Sensor / V
The transmitter developed by us was connected with a LZLG-8-30 type primary instrument made by Taiyuan Flowmeter Engineering Co., Ltd. in Taiyuan City, China, to construct an integrated CMF for conducting the water flowrate calibrations with the static weighing method according to China national industrial standards. Firstly, the valves were closed, and the zero-point of the meter was calibrated. Then the valves were opened, the upstream valve was fully opened, and the flowrate was changed by changing the opening degree of the downstream valve. The meter measured the mass flowrate and outputted the pulse signal. When the calibration started, the calibration device began to count the pulse numbers and a switcher acted simultaneously to let the fluid (water) flow to a tank to be weighed. When the calibration ended, the calibration device stopped counting the pulse and the switcher acted to let the fluid flow out through other pipeline. By comparing the pulse numbers with the weight of the fluid in the tank, the relative error can be obtained. Every flowrate was tested three times to obtain the repeatability. The precision of the calibration rig is 0.05%. The calibration results are shown in Table 2. The measurement accuracy is better than 0.10% when the turndown ratio is 16:1 and the repeatability is better than 0.05%.
Sensor / V
6.2. Water flowrate calibrations
Details between 1.65s and 1.85s 0
-1 1.65
1.7
1.75
1.8
1.85
Time / s Fig. 16. Sensor signal under two-phase condition (GVF is 55%).
about 37%. When the gas just mixed, the amplitude of the sensor signal suddenly became small. With water and air mixing, the amplitude of the sensor signal was gradually stabilized. Fig.15 (b) shows a partial enlarged curve of Fig.15(a). Although the amplitude of the sensor signal was very small, its waveform is still the sinusoidal wave, and can be used for subsequent computation. In Fig. 16, the water flow rate was 4.8 L/min, and the air flow rate was 6.0 L/min, where GVF is about 55%. As shown in Figs. 15 and 16, when the air stream was added to the flowtube, the flowtubes still vibrated and recovered quickly, even when the GVF up to 55%.
7. Conclusions (1) The step response of the flowtube is analyzed and simulated by Matlab to determine the relationship between the switching of positive–negative step signal and the phase of sensor signal, which provides the foundation of driving the flowtube by the positive–negative step signal. The positive–negative step signal is used to initiate the flowtube oscillation without knowing the natural frequency of the flowtube. In practice, the zerocrossings of the sensor signal are detected to determine for switching the positive and negative step drive signals. When detecting the zero-crossings, the sensor signal should firstly be filtered to eliminate the effect of noise, especially the effect of DC offset. A hysteresis loop is also used to avoid unwanted switching between the positive and negative step signals. (2) After the flowtube vibrates, the digital zero-crossing detection method based on Lagrange interpolation is adopted to calculate the frequency and phase difference of the sensor output signals in order to synthesize the digital drive signal. This method can reduce the amount of calculation and obtain good tracking speed. Some effective measures are put forward to raise its computational accuracy, such as increasing the effective bits of the operational data by DSP, and eliminating the effect of circuit bias on the computational accuracy of the algorithm. (3) This digital drive approach is implemented by the MDAC chip and DDS chip. The MDAC chip can control the drive gain flexibly, and the DDS chip can synthesize the sine wave with the required frequency and phase automatically. A digital Coriolis mass flow transmitter is developed with DSP chip to control the digital drive, and realize the signal processing. (4) Experiments have been performed to validate the transmitter. By connecting the transmitter with a CMF025 type primary instrument, the start-up experiment and drive ability test under two-phase flow condition have been conducted.
Please cite this article as: Hou Q-L, et al. Development of Coriolis mass flowmeter with digital drive and signal processing technology. ISA Transactions (2013), http://dx.doi.org/10.1016/j.isatra.2013.05.001i
Q.-L. Hou et al. / ISA Transactions ∎ (∎∎∎∎) ∎∎∎–∎∎∎
The results show that the digital transmitter possesses 1.9 s start-up time, which is much faster than that of the analog drive method. And the digital transmitter can maintain the flowtube oscillation under gas–liquid two-phase flow condition with the GVF up to 55%. However, the limitations of the presented work in this paper still exist. Although the transmitter is able to maintain flowtube oscillation under two-phase flowrate condition, the measurement of two-phase flowrate turns to be large errors. Thus the correcting method for two-phase flowrate measurement will be the scope for our future research. Acknowledgments This work was supported by the National High Technology Research and Development Program (Contract no. 2009AA04Z128) and China Aviation Industry Cooperative Innovation Program (Contract no. CXY2011HFGD23). References [1] Maginnis RL. Initialization algorithm for drive control in a Coriolis flowmeter. US Patent 2002/0133307A1; September 19, 2002. [2] Barger MJ, Dille JC, Scott TW, Whiteley JL. Coriolis mass flow controller. US Patent 6748813B1; June 15, 2004. [3] Hideki Shimada. Coriolis flowmeter. US Patent 2010/0268484A1; October 21, 2010. [4] Henry MP, Clarke DW, Archer N, Bowles J, Leahy MJ, Liu RP, et al. A selfvalidating digital Coriolis mass-flow meter: an overview. Control Engineering Practice 2000;8(5):487–506. [5] Henry M, Duta M, Tombs M, Yeung H, Mattar W. How a Coriolis mass flow meter can operate in two-phase (gas/liquid) flow. ISA, vol. 454; October 2004. p. 17–30. [6] Henry MP, Zamora ME. Drive techniques for a digital flowmeter. US Patent 2003/0216874A1; November 20, 2003.
9
[7] Henry MP, Clarke DW, Vignos JH. Digital flowmeter. US Patent 2002/0038186 A1; March 28, 2002. [8] Henry MP, Zamora ME. Startup and operational techniques for a digital flowmeter. US Patent 6950760B2; September 27, 2005. [9] Zamora M, Henry. MP. An FPGA implementation of a digital Coriolis mass flow metering drive system. IEEE Transactions on Industrial Electronics 2008;55 (7):2820–31. [10] Wang Shuai, Zheng De-Zhi, Fan Shang-Chun, Wang Ping, Wang Wei-Wei. Experimental study on the closed-loop control system of Coriolis mass flowmeter for oil–water two-phase flow measurement. In: Proceedings of 2010 IEEE Symposium on Industrial Electronics and Applications (ISIEA 2010); October 2010. [11] Tian Jing, Fan Shang-Chun, Zheng De-Zhi. Design of digital closed loop system of Coriolis mass flowmeter based on FPGA. Instrument Technique and Sensor 2009(Suppl.):381–3. [12] Chen Kun, Zheng De-Zhi, Fan Shang-Chun, Li Fan, Zhao Jian-Hui. Novel Coriolis mass flowmeter signal processing algorithms based on DFT and digital correlation. In: Proceedings of 2010 IEEE symposium on industrial electronics and applications (ISIEA 2010); October 2010. p. 56–60. [13] Freeman BS, Ashevillc NC. Digital phase locked loop signal processing for Coriolis mass flow meter. US Patent 5 804 741; September 8, 1998. [14] Xu Ke-Jun, Xu Wen-Fu. The signal processing method of Coriolis mass flowmeter based on a digital phase locked loop. Acta Metrologica Sinica 2003;24(2):122–8. [15] Derby HV, Bose T, Rajian S. Method and apparatus for adaptive line enhancement in Coriolis mass flow meter measurement. US Patent 5555190; September 10, 1996. [16] Cho NI, Lee SU. Tracking analysis of an adaptive lattice notch filter. IEEE Transactions on Circuits and Systems 1995;42(3):186–95. [17] Xu Ke-Jun, Xu Wen-Fu. A signal processing method based on AFF and SGA for Coriolis mass flowmeters. Acta Metrologica Sinica 2007;28(1):48–51. [18] Tu Ya-Qing, Zhang Hai-Tao. Method for CMF signal processing based on the recursive DTFT algorithm with negative frequency contribution. IEEE Transactions on Instrumentation and Measurement 2008;57(11):2647–54. [19] EMERSON Process Management. Micro Motion ELITE Coriolis flow and density meters. 〈http://www.documentation.emersonprocess.com/groups/public_pu blic_mmisami/documents/data_sheets/ps-00374.pdf〉; September 2012. [20] EMERSON Process Management. Micro Motion series 1000 and 2000 transmitters with MVD technology. 〈http://www.documentation.emersonprocess. com/groups/public_public_mmisami/documents/data_sheets/ps-00400.pdf〉; December 2012.
Please cite this article as: Hou Q-L, et al. Development of Coriolis mass flowmeter with digital drive and signal processing technology. ISA Transactions (2013), http://dx.doi.org/10.1016/j.isatra.2013.05.001i