AWRL6844 Sbr Users Guide

Table of Contents

Overview

This lab demonstrates the use of TI 60GHz mmWave sensors AWRL6844 for in-cabin sensing applications including Vehicle Intruder Detection (ID), Child Presence Detection (CPD) and Seat Belt Reminder (SBR). CPD and SBR will share the same signal processing chain for point cloud generation. Note that this lab is tested and tuned with AWRL6844EVM board and top front console mounting. Optimization effort will be needed to achieve best performance for other antenna design and other mounting position.

The same demo binary and visualizer will be used for all three applications, i.e., ID, CPD and SBR. Different configuration files can be loaded which enable the three different applications.

In this users guide, we will focus on SBR application. Real-time demo recording clips are shown below to demonstrate the SBR performance in driving. In these video clips, front row is always occupied with a driver and a passenger holding a PC, which is not obvious due to the limitation of the camera field of view. On the second row, different people combinations are used. A 24-bottle water pack is added in several test cases to demonstrate the robustness to the non-living object.

Requirements

Hardware Requirements

Item Details
AWRL6844 Evaluation Board AWRL6844 EVM Board
Computer PC with Windows 10. If a laptop is used, please use the ‘High Performance’ power plan in Windows.
Micro USB Cable Due to the high mounting height of the EVM, a 10ft+ cable or USB extension cable is recommended.

Software Requirements

Tool Version Download Link
TI mmWave SDK MMWAVE_L_SDK_06_00_04_01 TI mmWave SDK L 06.00.04.01
MATLAB Runtime 2024b (24.2) MATLAB Runtime - use R2024b only

Calibration

In order to get the best detection performance, users should run the Out of Box Demo Range Bias and Rx Channel Gain/Phase Measurement and Compensation procedure to get the calibration coefficients for their Antenna Module and replace the default coefficients in the desired configuration file which can be found in <Radar_Toolbox_LOCATION>\tools\visualizers\AWRL6844_Incabin_GUI\src\chirpConfigs6844 with the values returned by the calibration procedure.

The following command in the chirp configuration file needs to be updated with the calibrated values.

compRangeBiasAndRxChanPhase 0 1 0 1 0 1 0 1 0 -1 0 -1 0 -1 0 -1 0 1 0 1 0 1 0 1 0 -1 0 -1 0 -1 0 -1 0 (This is the default command)

The updated command will look similar to the following (but with different values)

compRangeBiasAndRxChanPhase 0 1.00  0  0.90 0.44 0.98 0.21  1.00 -0.09 -0.65 -0.76 -0.13 -0.99  -0.47 -0.88  -0.73 -0.68  0.54 0.84 -0.03 1.00 0.31 0.95 0.61 0.79 -0.98 -0.21 -0.68 -0.79 -0.90 -0.42 -0.98 -0.19 

The instructions to run the calibration procedure is not yet available. For now, please follow the instructions provided for AWR6843 device in Out of Box demo HTML documentation given in the calibration section of the file listed below. <MMWAVE_SDK3_INSTALL_DIR>\packages\ti\demo\xwr68xx\mmw\docs\doxygen\html\index.html We will update this section soon.

Quickstart

1. Configure the EVM for Flashing Mode

Instructions for EVM setup for Flashing mode can be found in the EVM Setup Guide

2. Flash the EVM using Uniflash

Flash the binary listed below using Uniflash. Follow the instructions found in the Using Uniflash Guide
<Radar_Toolbox>\source\ti\examples\Automotive_InCabin_Security_and_Safety\AWRL6844_InCabin_Demos\prebuilt_binaries\demo_in_cabin_sensing_6844_system.release.appimage

3. Configure the EVM for Functional Mode

Instructions for EVM setup for Functional mode can be found in the EVM Setup Guide

4. Mount the EVM and Create Test Environment

Mount the sensor at the desired location securely so that the sensor is stable during runtime. Update the desired configuration file so that it reflects the device’s location. More information on mounting can be found in the section below.

5. Launch the Visualizer

⚠️ MATLAB Runtime Version R2024b (24.2)
Exact version R2024b (24.2) required.

  1. Launch the visualizer executable located at <Radar_Toolbox>\tools\visualizers\AWRL6844_Incabin_GUI\src\
  2. Double click to launch occupancy_demo_gui.exe.
  3. A black console window will appear. After 30-60sec, a configuration window will appear as shown below.

6. Config Visualizer

  1. The COM ports will be auto-populated. Users should confirm or change as needed.

  2. (Optional) Select and enable the webcam if it is connected to the PC

  3. You should see the chirp configuration file automatically selected in the Configuration dialogue. Always browse and choose the configuration file when running for the first time. If the configuration file is not the correct one, browse to select a file provided in the config_file directory: <Radar_Toolbox_LOCATION>\tools\visualizers\AWRL6844_Incabin_GUI\src\chirpConfigs6844

    📝 NOTE
    The same demo binary supports Intruder Detection, Child Presence Detection and Seat Belt Reminder mode by loading different configuration file.

  4. Press Done to start the Visualizer.

  5. The Visualizer window will appear as shown below.

  6. Press OK to start the running.

  7. The Visualizer window will start output the point cloud. After 20 frames (as a default setting), the demo will start output the occupancy decisions. The zone will be shown as green if detected as occupied.

7. Understand the Visualizer

The Visualizer window is divided into six panels as shown in the annotated picture here.

  1. Statistics: This section prints real-time information from the target: Frame number, total number of detected points and occupancy status. Processing time is also provided.

  2. Chirp Configuration: This panels shows the static chirp configuration loaded at startup time.

  3. Control: This panel provides an Exit button and a Pause button.

  4. Point Cloud and Decision: This panel display the point cloud as well as the occupancy decisions. The point clouds are not per frame based, instead, accumulated point cloud from the most recent 20 fraems are showed. The occupancy display assumes 2 row car with 5 seat. Users can modify the zone definition as needed. Users can rotate the figure to see 2D and 3D figure.

  5. ML Probability: This panel display the occupancy probability (between 0 and one) for all the zones.

  6. Ground Truth Video: A camera video can be included to the visualizer to serve as the groud truth video. However, we have observed some delays with this feature enabled.

8. Rotate the Point cloud and decision plot

Users can rotate the point cloud and decision figure to see a 3D view, a useful tool when tuning the zone definition and understand the false detection. Note that currently visualizer only displays the point within the zone definition and different color is used for different zone.

Note that by default, the TLV output data for each frame will be saved automatrically in the subfolder \fHistFiles as fHistRT_0000.mat, fHistRT_0001.mat and etc. Each file will contain TLV results for 1000 frames. These files will be overwritten at the next run. Users need to move them to avoid data files from being overwritten. Users also need to copy this files to other directory after each run to avoid files being combined non-intentionally.

Algorithm Overview

This demo can be viewed as two pieces: the point cloud detection and the high-level processing.

In order to increase performance of detection of nearly-static objects such as people sitting still in the vehicle, this lab uses multiple frames to generate range-angle heatmap, rather than a single frame. By using a sliding window of multiple frames, there is a finer granularity of detection with respect to time. The number of frames in this window is configured through CLI command sigProcChainCommonCfg (set to 4 by default).

The high level flow for this lab is described here:

  1. This demo uses the standard range processing used in most mmWave Radar demos, and is controlled by the HWA (Hardware Accelerator) to produce the radar cube.
  2. When the range processing is done for every chirp in the frame, RadarCube is ready. ARM core will send a IPC (inter-processor communication) message DPC_MSS_TO_DSS_RADAR_CUBE_READY.
  3. Upon receiving IPC message DPC_MSS_TO_DSS_RADAR_CUBE_READY, the DSP core will call DPC_ObjectDetection_execute function to start the inter-frame process for point cloud detection. The point cloud generation contains 3 steps:
    • 3D range-azimuth-elevation heatmap is generated using Capon beamforming algorithm on a coarse angle grid.
    • 2-pass CFAR is applied on both range and angle direction.
    • For every detected peak, zoom-in azimuth-elevation angle spectrum will be calculated to get accurate angle estimation.
  4. After the point cloud generation, DSP core will send out a IPC message DPC_DSS_TO_MSS_POINT_CLOUD_READY.
  5. Upon receiving this IPC message, the ARM core will post a Semaphore classifierTaskSemHandle.
  6. MmwDemo_ClassifierTask processes the feature extraction and classification (upon receiving Semaphore classifierTaskSemHandle) and posts Samaphore tlvSemHandle.
  7. MmwDemo_transmitProcessedOutputTask outputs the point cloud, features and classifier information through UART (upon receiving Semaphore tlvSemHandle).

EVM Mounting and Coordinate Transforms

The detected point cloud is all relative to the sensor. To make the occupancy decision for each seat in the car, we need to transform the point cloud from sensor coordinates to the car coordinates. The car coordinate are plotted in the figure below.

Since the point cloud will be transformed to the car’s coordinates, the zone definition for each seat need to follow the car’s coordinates as well.

There are different positions and different mounting angles that can be considered for mounting the device. To give the full flexibility, “sensorPosition” CLI is used to indicate the mounting offset in (x, y, z) and mounting rotation angle in x-y plane and y-z plane. Based on these offsets and tilting angles, the visualizer will transform the point cloud from the sensor coordinate to the car coordinate.

Next we give one example:

This indicates the sensor is mounted at (x = 0, y = 0.8m, z = 1.15m) and is tilted down by 60 degree in y-z domain to facing the floor. Please referred to the figure below to help understanding.

Antenna Configuration

In this package, we only provided an example configurations with TI xWRL6844 EVM modules. The AWRL6844 Antenna is shown in the following image along with the virtual antenna array. There are some build-in 180 phase offset between different channels.


antGeometry0 -2 -2 -3 -3 0 0 -1 -1 0 0 -1 -1 -2 -2 -3 -3
antGeometry1 0 -1 -1 0 0 -1 -1 0 -2 -3 -3 -2 -2 -3 -3 -2
antPhaseRot 1 1 1 1 -1 -1 -1 -1 1 1 1 1 -1 -1 -1 -1

Note that it is suggested to using compRangeBiasAndRxChanPhase to compensate the phase (including this 180 degree built-in phase offset), and program antPhaseRot to be all 1.

Zone Definition

In this demo, we may define 1, 2, or 3 cuboids per zone. A detected point in the point cloud residing inside any of these cuboids will be included in the calculations for determining occupancy. If your zone is a cargo area, you may need to define only one cuboid to approximate the space. An example of three cuboids can be used as follows

which is illustrated here:

Zones may overlap or be disjoint. Cuboids are defined by the cuboidDef CLI command in a chirp configuration file. All the cuboid definition follows car coordination

Example of 5 Zoness CLI Definitions

% zone 0 (driver) cuboids
cuboidDef <zoneInd> <coboidInd> <xMIn> <xMax> <yMin> <yMax> <zMin> <zMax>
cuboidDef 0 0   0.15 0.75    0.6 1.1   0.5  1.1
cuboidDef 0 1   0.15 0.75    0.3 0.9   0.5  0.85
cuboidDef 0 2   0.15 0.75   -0.4 0.7  -0.1  0.5
% zone 1 (front passenger) cuboids
cuboidDef 1 0  -0.75 -0.15   0.6 1.1    0.5  1.1
cuboidDef 1 1  -0.75 -0.15   0.3 0.9    0.5  0.85
cuboidDef 1 2  -0.75 -0.15  -0.4 0.7   -0.1  0.5
% zone 2 (2nd row driver side) cuboids
cuboidDef 2 0   0.28 0.75    1.5 2.0    0.8  1.1
cuboidDef 2 1   0.28 0.75    1.25 2.0    0.3  0.8
cuboidDef 2 2   0.28 0.75    0.95 1.4   -0.1  0.4
% zone 3 (2nd row middle) cuboids
cuboidDef 3 0  -0.2 0.2     1.5 2.0     0.8  1.1
cuboidDef 3 1  -0.2 0.2     1.4 2.0     0.35  0.8
cuboidDef 3 2  -0.2 0.2     1.25 1.4     0  0.4
% zone 4 (2nd row passenger side) cuboids
cuboidDef 4 0  -0.75 -0.28   1.5 2.0    0.8  1.1
cuboidDef 4 1  -0.75 -0.28   1.25 2.0   0.3  0.8
cuboidDef 4 2  -0.75 -0.28   0.95 1.4  -0.1  0.4

Limitations in Zone Definition

Example NULL Zone Definition To define a NULL zone, simply define a zone with a single cuboid, and set all parameters to zero. This makes it impossible for the zone assignment function to map any points to the zone, and the zone will stay silent.

% zone 3 (NULL zone)
cuboidDef 3 0   0.0 0.0  0.0 0.0  0.0 0.0

Demo Configuration File Parameters

The configuration file contains three type of CLI commands. We will focus on the ones that are specific to this demo.

Command Referance
1. Sensor front-end parameters
sensorStart Refer to the SDK L 6 Users guide located at:
sensorStop /mmwave_l_sdk_06_00_03_00/
channelCfg docs/api_guide_xwrL684x/MMWAVE_DEMO.html
chirpComnCfg section Sensor front-end parameters
chirpTimingCfg
frameCfg
factoryCalibCfg
runtimeCalibCfg
compRangeBiasAndRxChanPhase
2. CLI commands that configures the point cloud chain
dynamicRACfarCfg refer to AWR6843 CPD with Classification, Section CFAR Detection
range bin start index (first range bin processed by CFAR)
range bin end skip (ending range bins not processed by CFAR)
angle start index (first angle bin processed by CFAR)
angle end skip (ending angle bins not processed by CFAR)
search window size - “far” range, default 8
search window size - angle dimension, default 8
search window size - “near” range, default 4
guard window size - “far” range, default 6
guard window size - angle, default 4
guard window size - “near” range, default 1
“K0” cross range detection threshold (in linear) applied to first search pass, set to 8.0
“K0” cross angle detection threshold (in linear) applied to the second search pass, set to 6.0
“sidelobe” threshold used in the second search pass
second search pass enable flag
RefRangeBinIdx: 15 is recommended. Used to control the dynamic CFAR threshold in range dimension. The CFAR range detection threshold “K0” will be adjusted for shorter range bins based on K0*(refRangeBinIdx/rangeBinIdx)^2. Note that there is no dynamic threshold for angle dimension in this demo.
dynamicRangeAngleCfg refer to AWR6843 CPD with Classification, Section Range-Azimuth-Elevation Heatmap Generation
angle search step (inter-bin resolution): set to 8 degree creates a azimuth-elevation heatmap of size 17x17 for each range bin (combine with 73 degree of FOV). Smaller values create larger heatmaps, increasing memory and processing requirements.
MVDR “alpha” (diagonal loading factor): 0.03 is recommended.
Detection method: mode 2 (create range-azim-elev heatmap) is supported in this demo.
Doppler estimation method: mode 0 (Doppler is not calculated) is supported in this demo
dynamic2DAngleCfg refer to AWR6843 CPD with Classification, Section High Accuracy Angle Estimation
zoom-in Factor for finer angle estimation: 5 is recommended
Number of coarse neighboring angle bins of zoom-in. Only 1 is supported
Number of samples on each side to expand the peak of the zoomed-in azimuth-elevation heatmap, 1 is recommended.
peakExpRelThr: peak expansion sharpness threshold, set to 1.0 as default
peakExpSNRThr: peak expansion SNR threshold in linear, set to 10.0 as default
localMaxCheck: 0: No local maximum check. 1: If the coarse peak is not local maximum in the elevation domain, exclude it from the detection. 2: If the coarse peak is not local maximum in both elevation and azimuth domains, exclude it from the detection.
antGeometry0 azimuth offset of all virtual antennas, follow demo setup guide
antGeometry1 elevation offset of all virtual antennas follow demo setup guide
antPhaseRot original designed to compensate for the built-in phase offset for all virtual channels. Now, we suggested to set to [1, 1, 1, 1,1, 1, 1, 1,1, 1, 1, 1,1, 1, 1, 1], and rely on compRangeBiasAndRxChanPhase CLI to compensate the phase
fovCfg subframe number. Only -1 is supported in this demo
azimuth field of view in degrees, 73 is recommended, which covers the fov from (-73, 73) in azimuth direction.
elevation field of view in degrees, 73 is recommended, which covers fov from (-73, 73) in elevation direction.
dopplerBinSelCfg refer to AWR6843 CPD with Classification, Section Doppler Binning
Doppler Binning feature enable/disable
Doppler FFT size per frame
Starting Doppler bins, recommend set to 0
Ending Doppler bins, recommend set to 4, the symmetric negative Doppler bins will be automatically selected as well.
3. CLI commands that are specific to this demo
lowPower Not used, reserved for future
runningMode 0 - intrusion detection, 1 - SBR, 2 - CPD
sigProcChainCommonCfg numFrmPerSlidingWindow: set to 4 by default to process 4 frames together to improve the detection sensitivity for SBR/CPD mode.
sensorPosition X - offset: offset in x direction, in meter
Y - Offset: offset in y direction, in meter
Z - Offset: offset in z direction, in meter
Azimuth Tilt: counter-clockwise rotation angle in x-y plane, in degree
Elevation Tilt: counter-clockwise rotation angle in y-z plane, in degree
cuboidDef zoneInd: zone ID (start with index 0)
coboidInd: cuboid number within the zone (start with index 0). min = 0, max = 2 per zone
xMin: min X in meter (azimuth) 0 represent the center of the car
xMax: max X in meter (azimuth)
yMin: min Y in meter (depth)
yMax: max Y in meter (depth)
zMin: min Z in meter (height) 0.0 is the car floor.
zMax: max Z in meter (height) should not be higher than the car roof.
Note that the cuboid definition follows the car coordination, more details can be found in the Zone Definition.
guiMonitor point cloud data: set to 1
rangeProfile: not used
statsInfo : set to 1 to get the process time
temperatureInfo : not used
intrusionDetInfo : output the intrusionDetection info in TLV, only applicable to intruder detection mode.
occFeatures : output the features that used for occupacy detection, only applicable to SBR/CPD mode.
occClassRes : output the occupancy detection decision, only applicable to SBR/CPD mode.
featExtrCfg maxNumPtsPerZonePerFrm: maximum number of points allowed per zone
numFrmProc: number of frame to be processed before making a decision
offsCorr: need to set to 1
dbScanFilt: enable dBScan (by default) to remove scattered point cloud
dbScanEps: maximum distance to be included as a cluster in dBScan
dbScanMinPts: minimum points to be claimed as a cluster in dBScan
Note that featExtrCfg settings should match the ones used for classifier model training.
zOffset per zone height adjustment, set to zero as default. This is typically used for CPD tuning.

span>

Tuning

The key items to focus on for tuning are as follows:

Developer’s Guide

1. Import Lab Project

To import the source code into your CCS 20 workspace, a CCS project is provided in the lab at the path given below.

⚠️ Error during Import to IDE
If an error occurs, check that the software dependencies listed above have been installed. Errors will occur if necessary files are not installed in the correct location for importing.

2. Build the Lab through CCS 20

  1. Select the demo_in_cabin_sensing_6844_dss project in the Project Explorer so that it is highlighted. Right click on the project and select Rebuild Project. The project will then build.

  2. Select the demo_in_cabin_sensing_6844_mss project in the Project Explorer so that it is highlighted. Right click on the project and select Rebuild Project. The project will then build.

  3. Select the demo_in_cabin_sensing_6844_system project in the Project Explorer so that it is highlighted. Right click on the project and select Rebuild Project. The project will then build.

Note
As mentioned in the Quickstart section, pre-built binary is provided in the folder <Radar_Toolbox_LOCATION>\source\ti\examples\Automotive_InCabin_Security_and_Safety\AWRL6844_InCabin_Demos\prebuilt_binaries

Note
Images can be built in either debug mode or release mode. Debug mode will face some performance limitations due to the un-optimized DSP implementation in debug mode

Known Issues and Limitations

  1. When the number of range bins used for Dynamic CFAR is less than 29, false detections begin to occur.
    • To avoid this, keep the CFAR leftSkipSize and rightSkipSize small enough to ensure that at least 29 range bins are used.

Need More Help?