| When the ultrasonic spreads in the liquid, it carries the signal which reflects the liquid's flow velocity and can be used to calculate the flow. This is what ultrasonic flowmeter's working theory tells us. Due to its advantages on stability, non-contact measurement, accuracy, no pressure loss, easiness in fixing and energy saving , the market of flow measurement using ultrasonic technology is growing rapidly.The accuracy and real-time performance are the most important goals during measuring with ultrasonic. However, it is difficult to achieve the goals because of weak signal reception and strong noise in industrial environments. In this paper, after the gap between foreign and domestic products and the principle of the ultrasonic gas flowmeter were introduced, an improved time difference method for ultrasonic flowmeter based on DSP was given to improve the accuracy and real-time performance. Digital signal processor was also employed to calculate the time difference with correlation method, and then the hardware and software were designed.Firstly, the principle and algorithm of correlation method were expounded in time domain and frequency domain respectively. Then some simplified measures were proposed, like zero-padding reducing algorithm and combined FFT algorithm. As for the real system, the algorithm was also improved to make the system more efficient, and "echo method" was adopted to get the reference wave. In order to meet different demands in complex environments, three measures—"coherent average method", "interpolation method" and "multi-correlation method"—were put forward to increase the precision.According to correlation method, hardware was designed and the core was DSP TMS320VC5502. The transducer module, the digital signal processing circuit module and the services circuit module were designed respectively, and some measures were taken to avoid the disturbance in hardware design.With respect to software, the method of modular design was used. The main modules included system initialization module, data acquisition module, flow measurement module, interruption module, LCD module and storage module and so on. The approach of parallel bootloader based on TMS320VC5502 DSP was introduced to start the system. Besides, some measures were also adopted to avoid the disturbance in software design.After the design, some suggestions about how to fix the flowmeter were proposed. It was proved by the simulation that the accuracy and real-time performance met the requirements of the system. At last, some plans for the next research were made according to the error analysis.In conclusion, the results from the simulation have proved that it is a low-cost and high-efficiency system, and valuable for theory study and application. More importantly, it is feasible. |