Abstract:Addressing the difficulty in accurately determining the arrival time of echo signals in time-difference ultrasonic gas flowmeters due to inevitable external influences such as circuit noise, acoustic noise, and environmental noise, which distort the initial segment of echo signals and result in a low signal-to-noise ratio, a precise positioning method for echo signal arrival time based on K-SVD dictionary learning for noise reduction is proposed to enhance the detection accuracy of ultrasonic flowmeters. The method involves using the OMP algorithm to perform sparse representation on the matrix constructed from multiple sets of extracted echo signal data, followed by iterative updating of the dictionary using SVD. The two parameters of dictionary size and sparsity are optimized through the control variable method to train an optimal dictionary learning model capable of adaptively extracting echo signal features, forming a complete dictionary, and reconstructing the echo signal to eliminate waveform distortion caused by noise interference in the initial signal segment. Calibration experiments conducted on a critical flow Venturi nozzle-based gas flow standard device show that directly using a threshold method to locate the arrival time of unprocessed echo signals results in significant errors in the final flow calculation. However, applying K-SVD dictionary learning-based noise reduction to process echo signals can effectively improve the accuracy of locating the arrival time, leading to more accurate flow information. Specifically, the indication error in the high flow range is reduced from 1.32% to 1.02%, and the repeatability is improved from 0.154% to 0.054%. In the low flow range, the indication error is decreased from 3.69% to 1.46%, and the repeatability is enhanced from 1.152% to 0.126%. The optimized measurement results meet the national accuracy standard of Grade 1.0.