摘要

The central ellipse algorithm can be employed to measure the time of flight (TOF) of the returned signal in ultrasonic range detection. However, the existing ellipse algorithm is likely to result in a considerable measuring error, because the algorithm simply treats the time corresponding to the vertical axis of the ellipse extracted from the echo signal as the TOF. To improve the measuring accuracy of the TOF, we propose a modified TOF measurement method based on the existing ellipse algorithm, where the Canny operator for edge detection in 2-D image processing is used, first, the ellipse algorithm is utilized to extract the echo pulse from the ultrasonic echo signal, from which a 2-D pulse pattern approximating an elliptical shape is obtained. Then, the Canny operator is applied to detect the boundary of the extracted elliptic pulse. Finally, the maximum gradients of the ellipse edge variation in the second and third quadrants of the coordinate system are calculated, and the TOF can be determined by averaging two time points corresponding to two maximum gradients of the edge change in two quadrants. The relevant experiments demonstrate that the modified method can obtain a more accurate TOF with approximately 30% error reduction.