Digital signal processing techniques for accurate ultrasonic sensor measurement