CN-121977661-A - Gas ultrasonic flowmeter signal processing method based on echo signal envelope fitting
Abstract
The invention relates to the technical field of flow detection, and discloses a gas ultrasonic flowmeter signal processing method based on echo signal envelope fitting; according to the invention, the parametric mathematical model is adopted to carry out self-adaptive integral fitting on the envelope sequence of the ultrasonic echo signal, so that noise interference can be effectively inhibited and the influence of waveform distortion on measurement can be overcome. According to the method, the propagation rule of the sound wave energy is restored from the noise-containing signal through the best fitting process, and the accuracy and repeatability of flight time extraction are improved. Due to the adoption of a nonlinear optimization algorithm with higher calculation efficiency, the real-time requirement of the system is met while the measurement accuracy is ensured. The processing mode enhances the adaptability of the gas ultrasonic flowmeter under the working condition of low signal to noise ratio, improves the long-term stability of metering, provides a reliable flow measurement solution for an industrial site, and expands the application potential of the meter under the complex working condition.
Inventors
- ZHU GEHONG
- NIU ZHENYU
- ZHAO ZHENGYANG
- ZHANG KAI
Assignees
- 中国计量大学
Dates
- Publication Date
- 20260505
- Application Date
- 20260116
Claims (10)
- 1. S1, controlling an ultrasonic transducer to emit ultrasonic pulses, receiving echo signals propagated through a gas medium, and converting the echo signals into digital echo sequences; the method comprises the steps of S2, initial envelope extraction, S3b, dynamic determination of an effective fitting interval containing a main peak on the initial envelope sequence based on amplitude or gradient information of signals to eliminate far-end noise and near-end interference, S3c, model parameter fitting, wherein in the effective fitting interval, a nonlinear optimization algorithm is adopted to adjust parameters of the envelope fitting model, so that error metric values between a model output curve and the initial envelope sequence are minimum, and a set of optimal model parameters are obtained, S4, time of flight calculation, namely, the mathematical characteristics of the envelope model, which are determined based on the optimal model parameters, are simulated, on the basis of the amplitude or gradient information of the signals, the effective fitting interval is dynamically determined, so that far-end noise and near-end interference are eliminated, and S3c, model parameter fitting, namely, a nonlinear optimization algorithm is adopted in the effective fitting interval, so that the error metric values between the model output curve and the initial envelope sequence are minimum, and accordingly, the current time of flight is calculated, and the flow velocity of the ultrasonic wave are calculated according to the flow velocity and the flow velocity of the flow of the ultrasonic wave, and the flow of the ultrasonic wave is calculated by the method, and the flow of the flow is calculated, respectively, S5.
- 2. The method for processing the signal of the gas ultrasonic flowmeter based on the echo signal envelope fitting according to claim 1, wherein the initial envelope extraction step extracts the initial envelope sequence by using any one of Hilbert (Hilbert) transform, wavelet transform or detection smoothing.
- 3. The method for processing the signal of the gas ultrasonic flowmeter based on echo signal envelope fitting according to claim 1, wherein the envelope fitting function model is an asymmetric generalized gaussian function, and the mathematical expression is: Wherein f (t) is the fitted envelope magnitude, t is time, A, mu, alpha, beta 1 ,β 2 are parameters to be fitted, and represent the envelope magnitude, time position, width scale, rising edge shape factor and falling edge shape factor, respectively, and u (·) is a unit step function.
- 4. The method for processing the signal of the gas ultrasonic flowmeter based on echo signal envelope fitting according to claim 1, wherein the envelope fitting function model is a combination function of an exponential function and a polynomial function, and the mathematical expression is: Wherein A, t 0 , n and gamma are parameters to be fitted, and represent an amplitude coefficient, a time offset, a polynomial order and an attenuation coefficient respectively.
- 5. The method for processing the gas ultrasonic flowmeter signal based on the echo signal envelope fitting of claim 1, wherein the fitting interval determining step specifically includes the step of taking a maximum value point in the initial envelope sequence as a center, intercepting a certain number of data points forwards and backwards respectively, and the number of the data points is dynamically determined according to the center frequency of the ultrasonic transducer, the sampling rate and the duration of the echo signal, so that the effective area of the main peak is covered.
- 6. The method for processing the signals of the gas ultrasonic flowmeter based on the echo signal envelope fitting according to claim 1, wherein the optimization algorithm adopted in the model parameter fitting step is a nonlinear least square method, a Lychn Bei Gema quart algorithm or a trust domain algorithm.
- 7. The method for processing the signal of the gas ultrasonic flowmeter based on echo signal envelope fitting according to claim 1, wherein the flight time calculating step specifically comprises substituting the optimal model parameters obtained by fitting into the envelope fitting function model, and calculating a time point corresponding to a specific proportional amplitude on a peak point, a gravity center point or a front edge of the function model as the flight time of the ultrasonic wave.
- 8. The method of claim 1, further comprising, prior to the step of model parameter fitting, a model breaking step of calculating a signal-to-noise ratio or a waveform distortion factor of the initial envelope sequence, and if the signal-to-noise ratio is below a first threshold or the distortion factor is above a second threshold, then enabling the step of model parameter fitting, and otherwise enabling a conventional time-of-flight calculation step, the conventional time-of-flight calculation step comprising a thresholding method or a peak detection method.
- 9. The method of claim 1, further comprising, prior to the step of model parameter fitting, a model breaking step of calculating a signal-to-noise ratio or a waveform distortion factor of the initial envelope sequence, and if the signal-to-noise ratio is below a first threshold or the distortion factor is above a second threshold, then enabling the step of model parameter fitting, and otherwise enabling a conventional time-of-flight calculation step, the conventional time-of-flight calculation step comprising a thresholding method or a peak detection method.
- 10. A gas ultrasonic flow meter comprising one or more pairs of ultrasonic transducers, signal transmission/reception circuitry, an analog to digital converter and a microprocessor, wherein the microprocessor is configured to execute a computer program stored therein to implement the echo signal envelope fitting based signal processing method of any one of claims 1 to 9.
Description
Gas ultrasonic flowmeter signal processing method based on echo signal envelope fitting Technical Field The invention relates to a gas ultrasonic flowmeter signal processing method based on echo signal envelope fitting. Background The gas ultrasonic flowmeter is widely applied to natural gas and industrial gas metering and has the advantages of no pressure loss, wide range and the like. The flow is measured based on a time difference method, but in practical application, the ultrasonic attenuation is serious due to low gas acoustic impedance, the signal-to-noise ratio of an echo signal is low, and in addition, the waveform distortion is easily caused by factors such as turbulence and vibration, so that the measurement accuracy is seriously influenced. The existing signal processing method mainly depends on waveform characteristic points to identify the flight time, such as a threshold value method, a zero crossing detection method, a cross correlation method, an envelope detection method and the like, and generally has the problems of sensitivity to noise, large calculated amount, poor adaptability and the like. Although the envelope fitting method utilizes the envelope trend to improve the stability, the method still depends on a preset threshold, a linear model is difficult to fit a nonlinear envelope accurately, full waveform information is not fully utilized, and the accuracy is limited under the conditions of low signal-to-noise ratio or serious distortion. Therefore, the existing method is difficult to fundamentally solve the problem of accurate extraction of the flight time under severe working conditions. A new method capable of effectively suppressing noise, overcoming waveform distortion and being suitable for engineering realization needs to be developed so as to improve the measurement reliability and precision of the gas ultrasonic flowmeter in a complex industrial environment. SUMMARY OF THE PATENT FOR INVENTION The invention discloses a gas ultrasonic flowmeter signal processing method based on echo signal envelope fitting, which aims to solve the technical problem provided by the background. The specific embodiment is as follows: and S1, signal acquisition and preprocessing, namely controlling an ultrasonic transducer to emit ultrasonic pulses, and converting a received echo signal into a digital echo sequence. And S2, extracting an initial envelope, namely performing time domain envelope analysis on the digital echo sequence, and extracting the initial envelope sequence capable of representing the time-varying trend of the signal amplitude. And S3, envelope fitting, namely selecting a parameterized envelope fitting model from a predefined function library, wherein the function form of the model can simulate the processes of vibration starting, peak value and attenuation of an ultrasonic echo signal. On the initial envelope sequence extracted in S2, an effective fit interval containing the main peak is dynamically determined based on the amplitude or gradient information of the signal. And in the effective fitting interval, performing model parameter fitting, and adjusting parameters of the envelope fitting model by adopting a nonlinear optimization algorithm to minimize an error measurement value between a model output curve and an initial envelope sequence so as to obtain a group of optimal model parameters. And S4, calculating the flight time, namely calculating the ultrasonic flight time corresponding to the current echo signal based on the mathematical characteristics of the envelope fitting model determined by the optimal model parameters in S3. And S5, calculating the flow rate and the accumulated flow of the gas according to a time difference method by utilizing the respectively obtained ultrasonic flight time in the forward flow direction and the backward flow direction. In the step S2, the initial envelope extraction is performed by any one of hilbert transform, wavelet transform, and detection smoothing. Since echoes are affected by complex fluids, the shape of the rising and falling edges is typically asymmetric. The AGGF model has independent parameters (beta 1, beta 2) to control the shapes of two sides respectively, so that the flexibility is high and the fitting is more accurate. Therefore, the envelope fitting function model of the invention is preferably selected as an asymmetric generalized Gaussian function, and the mathematical expression is as follows: f (t) is the fitting envelope amplitude, t is time, A, t 0, n, gamma are parameters to be fitted, and respectively represent the envelope amplitude, time position, width scale, rising edge shape factor and falling edge shape factor, and u (·) is a unit step function. In addition, if the actual signal quality is better, the calculation can be selected faster, the envelope fitting function model is a combination function of an exponential function and a polynomial function, and the mathematical expression is as follows: .