Parking (envelope)#
An example of a detection algorithm for a parked car. The sensor position is intended to be either ground mounted or side mounted, either on the curb or on a pole. Perhaps on a Electric Vehicle charging station.
This example algorithm is meant as a starting point for parking detector implementations that can handle weak radar reflections as well. One issue with the use of weak reflections is that reflections from people or items near the sensor pose a risk of false detections. However, low update rate mitigates this issue, since a person needs to be relatively still in front of the sensor for consecutive frames in order to generate a detection.
The algorithm is designed to work with only one radar sweep every 10 seconds to keep power consumption low enough for a battery supply to last for several years. Designs that do not have this limitation can use a higher sweep rate.
The exclusion of moving objects leads to delayed detection of a car that just has parked. For default settings, the first two scans after a car stopped over the sensor will report false detection status. Hence, it takes up to 30 seconds before a parked car is detected with one scan every 10 seconds.
The quality of the radar data depends strongly on the design of the sensor casing. It’s important that the amount of radar waves that bounce back within the casing is minimized to enable detection of weak reflections from a parked car. If the default settings of this example detector lead to false detects when there is nothing in front of the sensor, it’s likely that the reflections within the casing are too strong for reliable detection. If that is the case, then consider a revisit of the sensor integration or tuning of the detector parameters (described below).
In the same manner, it is important that the sensor is angled towards the parking spot in a way so that the amount of reflection from a parked car is maximized.
Plots#

Figure 51 A screenshot of the parking detection plots for a sensor placed under a parked car.#
Top plot:
The envelope data
Middle plot:
The weight distribution
Bottom plot:
Detection status (True or False) for sweeps in the last measurement sequence. This plot is
cleared when a setting is changed or when data collection is restarted. Note that the first
two results are false although there is a car above the sensor. Due to the exclusion of
moving objects, the first
Technical description#
This example detector uses the Envelope service with settings that work well for detection of weak reflections in laboratory tests. Only the update rate is different from our recommended starting point for application development. This rate is set to 0.5 Hz instead of 0.1 Hz to work better for interactive exploration.
Leakage subtraction#
If the range is beyond the direct leakage (estimated for each profile, 0.10 m for profile 2 for example), the leakage subtraction is ignored in the algorithm. This is in order to generalize well for varying settings.
The default configuration for parking detection uses Profile 2 and a sweep range that starts 12 cm from the sensor. This setting excludes direct leakage caused by radar waves traveling directly between the Tx and Rx antennas. There is also an an indirect leakage of radar waves that bounce within the sensor casing. This form of leakage is very hard to avoid in typical sensor casing designs (for the above-mentioned settings). For this reason, the parking detection algorithm is designed to work as long as the leakage stays within some fixed limits.
The leakage is assumed to drop off linearly in the envelope amplitude from a sample distance
A leakage subtracted envelope
Calculation of weight and distance#
The parking detector needs to work for weak reflections with amplitudes that are not much
larger than the background noise level. The noise-level normalization ensures that the
background level is close to a typical value
A fixed threshold may be used to filter out amplitude values that are too close to the noise
level. That approach has the drawback that it adds a parameter that can be hard to find a
suitable value for. Instead, a smooth ramping is used for calculations that are likely to work
well enough over varying circumstances. Define the ramp function
With this ramp function, a smoothly filtered amplitude observable with background subtraction is calculated according to
The intensity of the radar reflection from a flat surface falls off as
From the weight function, a weight average
and
where
Detector queue and detection criterion#
Reflections from non-stationary objects and people standing near the parking sensor shall not
be classified as a parked car. For that reason, the weights and distances for a few sweeps
need to be considered and if there is a sufficiently large variation in
Value pairs
The criterion detecting a car and excluding moving objects is
where
Configuration parameters#
- class acconeer.exptool.a111.algo.parking._processor.ProcessingConfiguration#
- depth_leak_sample#
Distance from the sensor for the leak sample position
Type: floatUnit: mDefault value: 0.15
- depth_leak_end#
Worst case distance from the sensor for the end of leak reflections
Type: floatUnit: mDefault value: 0.3
- detector_queue_target_length#
Car detection criterion parameter: The number of sweep value pairs (weight, distance) in the detector queue
Type: intDefault value: 3
- weight_threshold#
Car detection criterion parameter: Minimal value of the weights in the detector queue
Type: floatDefault value: 5
- weight_ratio_limit#
Car detection criterion parameter: Maximal ratio between the maximal and the minimal weights in the detector queue
Type: floatDefault value: 3
- distance_difference_limit#
Car detection criterion parameter: Maximal difference between the maximal and minimal distances in the detector queue
Type: floatDefault value: 0.2
- history_length_s#
The time interval that is shown in the “Detection history” plot
Type: floatUnit: sDefault value: 300