Smart presence#

Smart presence will divide the presence detection range into multiple zones. The algorithm is based on the presence detector, see Presence detection, and has the same configuration possibilities, with the addition to create multiple zones in the detection range.

Detection zones#

For any chosen range, the range will be divided into the chosen number of detection zones with equal size. The maximum number of detection zones is the number of points in the chosen range. To increase the maximum number of zones without extending the range, the step size can be decreased. This will increase the number of sampling points and thereby increase the power consumption. To get better distance resolution in the zone detections, the chosen profile can be decreased. However, it should be remembered that the chosen profile needs to be large enough to get sufficient SNR in the complete range. Furthermore, the chosen range is the range with optimal energy. Hence, detection can be seen both before the start point and beyond the end point. The amount of extended detection is dependent on the chosen profile and can be estimated to never exceed twice the full width at half maximum envelope power, see Radial resolution.

Detection types#

As for the presence detector, both fast and slow motions are considered. The zone detections can either be used separately for the two detection types or all detected zones, independent of detection type, can be used. For both slow and fast motions, the zone with the highest presence score is returned together with the detection result for all zones. The default for smart presence is to use both fast and slow motion detection to get fast detection, while at the same time having a stable detection when someone is standing still. Since the fast presence detection has lower time constants in the filtering it is more responsive than the slow motion detection, thus the zone detections for fast and slow motions can differ. The max_presence_zone is the zone with the most presence. However, the fast presence is prioritized due to faster responsiveness, i.e., if fast presence is detected (regardless of if slow presence is detected or not), the zone with highest fast presence score is returned. If only slow presence is detected, the zone with highest slow motion presence score is returned.

GUI#

In the GUI, the fast and slow presence score together with their respective threshold is displayed for easy adjustments. The detection zones are displayed in a circle sector with different colors showing detection and detection type. In the circle sector, it is possible to have only the distance with the maximum presence score displayed or to show all detected zones. The example upper plots show that fast motions are not detected, and slow motions are detected. The lower plot displays the range which is set to 1-3 m and that slow motions are detected in the second zone.

../../../../_images/a121_smart_presence_gui.png

Tests#

Test setup#

In these tests the A121 EVK was used. The EVK was mounted on a wall at the same height as the test person’s torso.

../../../../_images/smart_presence_setup.png

Test cases#

1. Human walking from Zone 3 -> Zone 1 (1-3 meters range)

2. Human walking through all zones from the side (1-3 meters range)

3. Human walking from Zone 3 -> Zone 1 (1-5 meters range)

4. Human walking through all zones from the side (1-5 meters range)

Configuration#

Table 14 Smart presence configuration#

Range start

1 m

Range end

3 m / 5 m

Frame rate

10 Hz

Sweeps per frame

32

HWAAS

16

Inter frame idle state

Deep sleep

Enable intra frame detection

True

Intra detection threshold

1.30

Intra time constant

0.15 s

Intra output time constant

0.50 s

Enable inter frame detection

True

Enable phase boost

False

Inter detection threshold

1.0

Inter fast cutoff frequency

20.0 Hz

Inter slow cutoff frequency

0.2 Hz

Inter time constant

0.5 s

Inter output time constant

3.0 s

Inter presence timeout

3 s

Number of zones

3

Results#

1. Human walking from Zone 3 -> Zone 1 (1-3 meters range)

../../../../_images/smart_presence_test1_a.png ../../../../_images/smart_presence_test1_b.png
Table 15 Smart presence test results. All zones were detected successfully when walking towards the sensor and each zone was successfully detected when passing by.#

Zone

Walk towards

Pass by

0 (1-3 m range)

X

X

1 (1-3 m range)

X

X

2 (1-3 m range)

X

X

0 (1-5 m range)

X

X

1 (1-5 m range)

X

X

2 (1-5 m range)

X

X

Configuration parameters#

class acconeer.exptool.a121.algo.smart_presence._ref_app.RefAppConfig(*, start_m: float = 0.3, end_m: float = 2.5, profile: Optional[Profile] = None, step_length: Optional[int] = None, frame_rate: float = 12.0, sweeps_per_frame: int = 16, hwaas: int = 32, inter_frame_idle_state: IdleState = IdleState.DEEP_SLEEP, intra_enable: bool = True, intra_detection_threshold: float = 1.3, intra_frame_time_const: float = 0.15, intra_output_time_const: float = 0.3, inter_enable: bool = True, inter_detection_threshold: float = 1, inter_frame_fast_cutoff: float = 6.0, inter_frame_slow_cutoff: float = 0.2, inter_frame_deviation_time_const: float = 0.5, inter_output_time_const: float = 2, inter_phase_boost: bool = False, inter_frame_presence_timeout: Optional[int] = 3, num_zones: int = 7, show_all_detected_zones: bool = False)#
num_zones: int#

Maximum number of detection zones.

show_all_detected_zones: bool#
end_m: float#

End point of measurement interval in meters.

frame_rate: float#

Frame rate in Hz.

hwaas: int#

Number of HWAAS.

inter_detection_threshold: float#

Detection threshold for the inter-frame presence detection.

inter_enable: bool#

Enables the inter-frame presence detection used for detecting slower movements between frames

inter_frame_deviation_time_const: float#

Time constant of the low pass filter for the inter-frame deviation between fast and slow.

inter_frame_fast_cutoff: float#

Cutoff frequency of the low pass filter for the fast filtered absolute sweep mean. No filtering is applied if the cutoff is set over half the frame rate (Nyquist limit).

inter_frame_idle_state: IdleState#

Sets the inter frame idle state.

inter_frame_presence_timeout: Optional[int]#

Number of seconds the inter-frame presence score needs to decrease before exponential scaling starts for faster decline.

inter_frame_slow_cutoff: float#

Cutoff frequency of the low pass filter for the slow filtered absolute sweep mean.

inter_output_time_const: float#

Time constant for the output in the inter-frame part.

inter_phase_boost: bool#

Enables the inter-frame phase boost. Used to increase slow motion detection.

intra_detection_threshold: float#

Detection threshold for the intra-frame presence detection.

intra_enable: bool#

Enables the intra-frame presence detection used for detecting faster movements inside frames.

intra_frame_time_const: float#

Time constant for the depthwise filtering in the intra-frame part.

intra_output_time_const: float#

Time constant for the output in the intra-frame part.

profile: Optional[Profile]#

Sets the profile. If no argument is provided, the highest possible profile without interference of direct leakage is used to maximize SNR.

start_m: float#

Start point of measurement interval in meters.

step_length: Optional[int]#

Step length in points. If no argument is provided, the step length is automatically calculated based on the profile.

sweeps_per_frame: int#

Number of sweeps per frame.

Reference app result#

class acconeer.exptool.a121.algo.smart_presence._ref_app.RefAppResult(*, zone_limits: ndarray[Any, dtype[float64]], presence_detected: bool, max_presence_zone: Optional[int], total_zone_detections: ndarray[Any, dtype[int64]], inter_presence_score: float, inter_zone_detections: ndarray[Any, dtype[int64]], max_inter_zone: Optional[int], intra_presence_score: float, intra_zone_detections: ndarray[Any, dtype[int64]], max_intra_zone: Optional[int])#
zone_limits: numpy.ndarray[Any, numpy.dtype[numpy.float64]]#

The upper limit for each zone.

presence_detected: bool#

True if presence was detected, False otherwise.

max_presence_zone: Optional[int]#

The zone for maximum presence score if presence detected, else None.

total_zone_detections: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#

Detection result for all zones.

inter_presence_score: float#

A measure of the amount of slow motion detected.

inter_zone_detections: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#

Slow motion presence detection result for all zones.

max_inter_zone: Optional[int]#

The zone for maximum slow motion presence score if slow presence detected, else None.

intra_presence_score: float#

A measure of the amount of fast motion detected.

intra_zone_detections: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#

Fast motion presence detection result for all zones.

max_intra_zone: Optional[int]#

The zone for maximum fast motion presence score if fast presence detecte, else None.