Obstacle detection#
The Obstacle Detector is an example of a simple obstacle detection algorithm based on the synthetic aperture radar (SAR) principle. The main goal of the obstacle detector is to find obstacles in front of the sensor and estimate their distance and angle. In an application where the sensor is installed on a robot (such as vacuum cleaners or lawn mowers), the object data can be used to issue movement commands to the robot to avoid and circumnavigate the found obstacles. Note that the half power beam width (HPBW) along the H- and E-plane of the sensor is 60 and 40 degrees, respectively.

At the core of the detection algorithm is a fast Fourier transform (FFT), which is used to improve the signal-to-noise ratio (SNR) of obstacles in the vicinity of the radar sensor for extraction of angle
Four basic steps are repeated in this algorithm:
Collecting radar sweeps
at a sweep frequencyPerform FFT of
consecutive sweeps and estimate the power spectral density (PSD)Perform peak detection on the PSD
Report distance
and estimate of angle for found peak (obstacle)
Sweep collection#
Each radar sweep
With a sweep frequency
Note that for Acconeer’s radar module
where
On the other hand, for static background amplitude and phase are constant. Static background usually originates from reflections of enclosure or other parts attached close to or in front of the sensor.

Next, we create a sweep matrix of

Once the sweep matrix is filled, it will be further processed with each following sweep to extract angle and distance from potential obstacles.
FFT and PSD#
The FFT is performed along the x-Axis of the 2 dimensional sweep matrix, i.e. along the time axis.
Thus, each bin
Note that
When computing the FFT, delay points of a moving object will coherently add for the bin with the matching phase shift, resulting in an increased amplitude. For all other delay points and other bins, the complex addition of random phase will result in significantly reduced amplitudes compared to the amplitude in the original sweeps. To visualize this concept, the python example calculates the power spectral density (PSD), i.e. the amplitude squared of the complex-valued FFT matrix.
Note that generally obstacles can move towards or away from the radar sensor (or the sensor towards or away from objects).
Hence, a phase shift from
For special cases, where only one direction of motion occurs, this can be extended to

In the python example, the x-Axis of the FFT matrix already shows velocity, ranging from
To visualize the coherent addition of sweeps at the matching bin, the example also shows the envelope of the current complex sweep (blue solid line) and the envelope along the bin of the global maximum in the FFT matrix (dashed orange line).

The bin with the global peak is here around
Peak detection#
The example uses the most basic peak detection, which only identifies the global maximum. With a more advanced implementation, local maxima could also be identified so that multiple obstacles may be reported simultaneously. Each found peak is interpreted as an obstacle at a certain distance (y-Axis) with a certain velocity (x-Axis). It should be noted that it might be necessary to employ background subtraction or restricting peak-finding to bins corresponding to non-zero velocity in order to exclude peaks from static objects or general noise in the FFT.
Distance and angle#
In the final step, the example calculates the angle

We assume that the radar sensor is moving at a constant velocity
Note that between consecutive sweeps
the robot travels a fixed distance
In order to calculate the angle
The velocity
For calculation of the actual value of
and for the robot bin
which results in
Note that in this example, since we set
Finally, if the example finds an obstacle in the FFT matrix, it prints the obstacle distance, velocity and angle at the lower left side of the FFT matrix, taking above assumptions into account.
Configuration parameters#
- class acconeer.exptool.a111.algo.obstacle_detection._processor.ProcessingConfiguration#
- fft_length#
- Type: intDefault value: 16
- threshold#
- Type: floatDefault value: 0.05
- downsampling#
- Type: intDefault value: 1
- calib#
- Type: intDefault value: 10
- bg_offset#
- Type: floatDefault value: 1.6
- static_threshold#
- Type: floatDefault value: 0.1
- close_threshold_addition#
- Type: floatDefault value: 0.1
- static_distance#
- Type: floatDefault value: 45
- static_grad#
- Type: floatDefault value: 6
- close_dist#
- Type: floatDefault value: 16
- static_freq#
- Type: floatDefault value: 2
- nr_peaks#
- Type: intDefault value: 1
- edge_to_peak#
- Type: floatDefault value: 1
- peak_hist#
- Type: intDefault value: 500
- robot_velocity#
- Type: floatUnit: cm/sDefault value: 6
- use_parameterization#
- Type: boolDefault value: False
- background_map#
- Type: boolDefault value: True
- threshold_map#
- Type: boolDefault value: False
- show_line_outs#
- Type: boolDefault value: False
- velocity_history#
- Type: boolDefault value: True
- angle_history#
- Type: boolDefault value: True
- distance_history#
- Type: boolDefault value: True
- amplitude_history#
- Type: boolDefault value: True
- sensor_separation#
- Type: floatUnit: cmDefault value: 15