Beamforming is an advanced signal processing technique used in sensor arrays for directional signal transmission or reception. The paper deals with a system based on an ultrasound transmitter and an array of receivers, to determine the distance to an obstacle by measuring the time of flight and – using the phase beamforming technique to process the output signals of receivers for finding the direction from which the reflected signal is received – locates the obstacle. The embedded beam-former interacts with a PID-based line follower robot to improve performance of the line follower navigation algorithm by detecting and avoiding obstacles. The PID (proportional-integral-derivative) algorithm is also typically used to control industrial processes. It calculates the difference between a measured value and a desired set of points, then attempts to minimize the error by adjusting the output. The overall navigation system combines a PID-based trajectory follower with a spatial-temporal filter (beamformer) that uses the output of an array of sensors to extract signals received from an obstacle in a particular direction in order to guide an autonomous vehicle or a robot along a safe path.