A kind of Coriolis mass flowmeter digital signal resolving device and method of decomposing based on harmonic wave
Technical field
The present invention relates to be used for the device and method that the Coriolis mass flowmeter digital signal resolves.
Background technology
The device that the measuring tube that utilizes the former reason of Coriolis (Coriolics) to vibrate is measured the mass rate and the density of the fluid in the flowing pipe is called coriolis mass flowmeters, in the U.S. Pat of authorizing people such as J.E.Smith-4109524 (on 08 29th, 1978), the ultimate principle and the method for relevant this flowmeter are disclosed among US-4491025 (on 01 01st, 1985) and the Re.31450 (02 month 11 days nineteen eighty-two), its key is the accurately frequency of measuring vibrations and the phase differential (or mistiming) of two paths of signals, though can realize such function with hardware circuit, the function that realizes with hardware circuit owing to various technical reasons is limited.
Adopt digital signal processor (DSP) can realize more complicated processing, influence phase differential thereby avoid that simultaneously two paths of signals is introduced uncertain delay.As the U.S. Pat-4934196 (06 month 19 days nineteen ninety) of authorizing Romano has adopted variable sample frequency, make the data block of carrying out discrete time Fourier transform (DTFT) comprise an integer vibration period, thereby avoid non-complete cycle to block the spectrum leakage that is caused, but it has increased the complicacy of hardware circuit.Authorize the mode that Chris's bridge spy's of German Endress+Hauser Flowtec AG Chinese patent CN-1455859A (09 month 05 day calendar year 2001) has adopted hardware to combine with software, control the ratio of the two paths of signals that enters differential amplifier by DSP, make differential signal and reference signal quadrature, thereby resolve phase differential by differential wave and reference signal.Authorize the fundamental frequency that the H.V. of U.S. Micro Motion, Inc Derby, T. ripple west and S. draw refined Chinese patent CN-1190461A (on 08 12nd, 1998) to adopt the adaptive notch filter (ANF) that strengthens (ALE) based on adaptive line to suppress various interference and try to achieve signal, again by the single-frequency point Fourier coefficient of Goertzel algorithm computation signal on fundamental frequency.The Chinese patent CN-1467485A that authorizes Xu Ke army of HeFei University of Technology and Xu Wenfu has done improvement to the method: replace ANF with self-adaptation funnel type wave filter (AFF), can take into account frequency-tracking ability and tracking accuracy; Replace traditional Goertzel algorithm with slip Goertzel algorithm (SGA), the change sinusoidal signal also can replace traditional Goertzel algorithm with slip Goertzel algorithm (SGA) when being fit to, and the change sinusoidal signal also can be used the calculated signals fourier coefficient less than one-period when being fit to.
The problem that exists
Can constitute orthogonal basis on the time interval in integral multiple cycle by one group of trigonometric function for periodic function, periodic function can be launched into fourier series on this orthogonal basis.When the time interval did not comprise integer basic cycle, this group trigonometric function base was not a quadrature just, adopted original formula calculating fourier coefficient will produce spectrum leakage.Adopt the variable sampling frequency can obtain effect preferably, but increased the complicacy of hardware circuit.The Goertzel algorithm can only guarantee that the calculating of fourier coefficient is to carry out on one group of sampled point near the integral multiple vibration period, because time interval still might differ less than a sampling period with the integral multiple vibration period, has a spot of spectrum leakage generation although taked the measure of windowing to still have.The Goertzel algorithm only calculates fourier coefficient on a Frequency point simultaneously, and therefore requiring signal must be undistorted sinusoidal signal, and this just requires original signal will pass through narrow band filter filtering earlier.
Adopt least square method periodic function can be carried out harmonic wave on non-orthogonal trigonometric function base and decompose, and can organize the trigonometric function that increases other frequency component in the function base at this.This harmonic wave decomposition method requires to record fundamental frequency earlier, but survey frequency always has error, has improved decomposition method for this reason, has increased by one group of degree of freedom in basis function, has improved the tolerance of described method to the fundamental frequency error.Because the method has been carried out filtering to signal at frequency domain in fact, therefore can reduce the requirement of prime time domain filtering.
Summary of the invention
The objective of the invention is to the advantage that comprehensive time domain is handled and frequency domain is handled, design a kind of Coriolis mass flowmeter digital signal resolving device and method of decomposing, the digital signal of short time is handled to obtain determining fluid mass flow and needed instantaneous phase difference of density and instantaneous frequency based on harmonic wave.
The present invention is in order to realize this purpose, adopt following technical scheme: a kind of Coriolis mass flowmeter digital signal resolving device that decomposes based on harmonic wave, it comprises: two-way vibration transducer and signal conditioning circuit thereof, the synchronous A/D converter of two-way (A/D), digital signal processor (DSP) and software algorithm wherein, it is characterized in that the coriolis mass flowmeters body contains the measuring tube of vibration, be used for the mass rate and the density of the fluid that wherein flows through are measured, said two-way vibration transducer is installed on the said measuring tube, said vibration transducer is responded to the vibration of said measuring tube and is converted thereof into electric signal, electric signal is transformed into digital signal through said signal conditioning circuit and said A/D converter, digital signal is sent into said digital signal processor, digital signal is calculated the phase differential of vibration frequency and two paths of signals by said software algorithm in said digital signal processor, obtain the mass rate and the density of measured fluid thus.
Said comb filter disposes zero point and disturbs to suppress direct current and power frequency on the frequency multiplication of 50Hz.
To through filtered signal double sampling, sample frequency is reduced to 8kHz, the aliasing that said wave filter causes the signal double sampling has the inhibition ability more than the 120dB.
Wave filter has wide passband and fixing centre frequency is arranged, and wave filter has the bandwidth of 100Hz, can cover the whole vibration frequency range of said measuring tube when work.
Said wave filter adopts finite impulse response FIR wave filter to realize, has avoided the overflow problem of the instability and the fixed point calculation of wave filter.
Method based on described resolver, press the zero passage of signal and determine fundamental frequency constantly, with least square method the signal piecemeal is carried out harmonic wave and decompose, try to achieve the discrete Fourier coefficient on each rank resonance frequency, this is different from discrete Fourier transform (DFT), the influence that it is not blocked by non-complete cycle.
Allow determined fundamental frequency that error is arranged, can estimate the influence of fundamental frequency error, and fundamental frequency is revised, described harmonic wave decomposition has following form:
Algorithm in the software can be finished in real time under the double sampling frequency of 8kHz and resolve through optimizing, and therefore allows said wave filter to have the passband of broad.
The present invention realizes broad passband filtering by comb filter and suppresses power frequency and disturb, in the time of filtering to filtered signal double sampling to reduce sampling rate, determine with least square method signal to be carried out the harmonic wave decomposition after the signal frequency, obtain the fourier coefficient of signal on fundamental frequency and each harmonic frequency.In algorithm, frequency error is estimated and compensated, interference frequency main in the passband is estimated and compensated.
In digital signal processor (DSP), adopt the comb filter of particular design to suppress direct current and power frequency is disturbed, and the aliasing when suppressing the signal double sampling.After trying to achieve the signal fundamental frequency, with least square method the signal piecemeal is carried out harmonic wave and decompose, try to achieve the discrete Fourier coefficient on each rank resonance frequency.This is different from discrete Fourier transform (DFT), the influence that it is not blocked by non-complete cycle.The method can overcome the main influence of disturbing frequency in the fundamental frequency sum of errors passband through improving.Fourier coefficient with fundamental frequency can be in the hope of the phase differential of two paths of signals.
Method of the present invention is different from the method in the mentioned patent in front, the present invention adopts fixing sample frequency, do not use the Goertzel algorithm, and realize that with least square method harmonic wave decomposes on non-orthogonal function base, and replenished function base with the tolerance frequency error.Because the method has been carried out filtering to signal at frequency domain in fact, therefore can reduce the requirement of prime time domain filtering, the present invention does not use adaptive notch filter or self-adaptation funnel wave filter.Owing to simplified algorithm, method of the present invention can be finished in real time under higher double sampling frequency and resolve.Experimental result shows that apparatus and method of the present invention can reach very high calculation accuracy.
Description of drawings
Fig. 1 is a system architecture diagram of the present invention.
Fig. 2 is the amplitude versus frequency characte (dB) of wave filter.
Fig. 3 is the phase-frequency characteristic (degree) of wave filter.
Fig. 4 is a filtering of the present invention.
Embodiment
System architecture is as shown in Figure 1: the measuring tube (not shown) that the coriolis mass flowmeters body contains vibration is used for the mass rate and the density of the fluid that wherein flows through are measured, the two-way vibration transducer is installed on the measuring tube, the vibration of vibration transducer measurement of inductance pipe also converts thereof into electric signal, electric signal is transformed into digital signal through signal conditioning circuit and A/D converter, digital signal is sent into digital signal processor, digital signal is calculated the phase differential of vibration frequency and two paths of signals by software algorithm in digital signal processor, obtain the mass rate and the density of measured fluid thus.
The amplitude versus frequency characte of comb filter and phase-frequency characteristic can suppress direct current and power frequency the zero point of disposing and disturb respectively as shown in Figures 2 and 3 on the 50Hz frequency multiplication.Passband is selected in 50Hz to 150Hz, and the bandwidth of 100Hz is arranged, and can cover whole operating frequency range.Rejection ratio more than the 120dB is arranged, for follow-up 8kHz double sampling provides anti-aliasing filter at the 4kHz place.Linear phase-frequency characteristic is arranged in passband, be equivalent to the group delay of 7.4189ms.
Filtering as shown in Figure 4, the A/D sampling rate is 48kHz, digital signal is sent to the internal buffer by DMA (directly memory access or direct memory access), buffer zone can hold the data of 12 sampled points, when buffer zone is half-full, produce interrupt request, by task A the data of these 6 sampled points are sent into the buffer circle that can hold 960 sampled points and form frame data, the Frame in the buffer circle is carried out data after FIR (finite impulse response) filtering obtains a pair of double sampling.Through 6: 1 double samplings, sampling rate was reduced to 8kHz to filtered signal.
Task B determines instantaneous frequency to filtered digital signal, and instantaneous frequency can also obtain the density of measured material except that being used for phase differential resolves.Measure to adopt and survey periodic method, the sampled data of every 100ms is found out all zero passages constantly, determine the T.T. of an integer semiperiod among half cycle issue and the 100ms, calculate average vibration period and the frequency of every 100ms thus.Zero passage is determined through linear interpolation by two sampled points of opposite in sign constantly.Frequency measurement accuracy is better than 0.005Hz.
The sinusoidal signal of distortion can be expressed as the form that harmonic wave decomposes in the formula (1) after recording fundamental frequency omega:
Consider the error delta ω of survey frequency, and can suppose that δ ω is a small amount of, then formula (1) can be expressed as formula (2):
Discretize obtains formula (3):
By least square method signal x (n Δ t) is expressed as the harmonic wave decomposed form of revising in the formula (3),
Should allow (4) to get minimum value to determine the coefficient (4) in the formula (3)
Can calculate phase differential by the coefficient of trying to achieve:
Tens batches of experiments have been done with existing sensor, the result shows in 1: 20 flow measurement range, precision index can reach for 0.1% (need not add zero stability), in 1: 50 scope, precision can reach 0.1% ± zero stability, it is leading domestic that this index has reached, international most advanced level.