The present invention provides an embodiment of an electronic device, including: an ultrasonic transmitting transducer, arranged to transmit a first ultrasonic signal, at a first time point, to an object to be tested at a first time point, wherein the first ultrasonic signal is reflected by the object to be tested to serve as a second ultrasonic signal; first, second and third ultrasonic receiving transducers, arranged to receive the second ultrasonic signal; and a processor, arranged to use Short-Time Fourier Transform to calculate a second time point, a third time point, and a fourth time point at which the first, second and third ultrasonic receiving transducers receive the second ultrasonic signal, and arranged to calculate the relative positions of the object to be tested and the ultrasonic transmitting transducer according to the second time point, the third time point, and the fourth time point. |