Aiming at the problem that ultrasonic detection is greatly affected by temperature drift, this paper investigates a novel temperature compensation algorithm. Ultrasonic impedance-based liquid-level measurement is a crucial non-contact, non-destructive technique. However, temperature drift can severely affect the accuracy of experimental measurements based on this technology. Theoretical analysis and experimental research on temperature drift phenomena are conducted in this study, accompanied by the proposal of a new compensation algorithm. Leveraging an external fixed-point liquid-level detection system experimental platform, the impact of temperature drift on ultrasonic echo energy and actual liquid-level height is examined. Experimental results demonstrate that temperature drift affects the speed and attenuation of ultrasonic waves, leading to decreased accuracy in measuring liquid levels. The proposed temperature compensation method yields an average relative error of 3.427%. The error range spans from 0.03 cm to 0.336 cm. The average relative error reduces by 21.535% compared with before compensation, showcasing its applicability across multiple temperature conditions and its significance in enhancing the accuracy of ultrasonic-based measurements.
Keywords: temperature compensation; temperature drift; ultrasonic impedance; ultrasonic sensors.