The present paper proposes a method to classify objects' surfaces by analyzing relative spectrum of an ultrasonic echo with respect to the spectrum of an echo from a flat plane. Time-of-flight is obtained from linear phase shift between the reference echo and the echo from the object. Distance between two planes separated along longitudinal direction is obtained from frequency dips in the echo spectrum. Surface features such as an edge of a prism can be recognized by a decrease of power in higher frequencies and constant phase shift with respect to the reference echo. It is also shown that phase spectrum is useful for determining arrival time of an echo coming from an oblique surface with respect to the center axis. The theoretical analysis and some experimental data are presented.