AWRL6844 CPD User Guide
Table of Contents
Overview
This example 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 example is tested and tuned with AWRL6844EVM board and and the device is mounted in the front console of the vehicle. Optimization effort will be needed to achieve best performance for other antenna designs and other mounting positions.
In this users guide, we will focus on the CPD application. Real-time demo recording clips are shown below to demonstrate the CPD performance in different test scenerios. The accumulated point cloud displays across 30 frames. The blue box indicates a child is detected and the green box indicates an adult is detected. The classifier outputs the per-seat decision. A per-car decision is added at the visualizer level.
Requirements
The same hardware and software requirement between CPD and SBR mode. Users can refer to SBR user’s guide for details.
Quickstart
The same visualizer is shared between CPD and SBR mode. Users can refer to SBR User’s Guide for details and make the following modification to the procedure:
Load the cpd.cfg as an example CPD configuration file when starting the demo visualizer.
Note
If performance needs to be improved, please review configuration settings. Every car is different and may need modifications to the configuration file to improve performance. See the SBR User’s Guide Section “EVM Mounting and Coordinate Transforms” for detailed description on properly measuring the car for the right configuration settings.
Understand the Visualizer
The visualizer window is divided into eight panels as shown in the annotated picture below.
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.
Tuning Parameeters: This panels shows the tuning parameters users can change on the fly. The updated parameter will be sent to the target and applied immediately. The two most important tuning parameters are included.
zOffsetis crucial to the child vs adult classification;macroDopMapScaleCfgis crucial to the living vs non-living object classification.Control: This panel provides a Save button, a Reset and Pause button, and an Exit button.
- The demo will run continuously for one session with a pre-determined time frame and pause. The pre-determined time is defined as
Display/Save Time Window (Frames)in the starting GUI. - If the
Savebutton is enabled and a save file name is provided, the TLV information (including point cloud and classifier decision) will be recorded at the end of the session. The saved file will be stored in the.\fHistFiles\folder by default. - If the
Resetbutton is clicked andPausebutton is clicked to unpause, a new session will start. Users can change the save file name to start a new recording. - The exit button can be clicked at any time to exit the visualizer.
- The demo will run continuously for one session with a pre-determined time frame and pause. The pre-determined time is defined as
Point Cloud and Decision (Zones Plot): This panel displays the point cloud as well as the CPD decisions. The point cloud is not per frame based, but rather, displayed as an accumulation from the most recent 30 frames. The occupancy display assumes 2 row car with 5 seats. Users can rotate this plot to see a 3D view. On top of the point cloud, the per-car CPD decision is displayed. If there is any adult occupied in the car, the plot will be highlighted in Green; in a child-only situation, the plot will be highlighted in Blue.
ML Probability: This panel displays the soft decision from the ANN-based CPD network. It is a per-zone decision, and the probability of child occupancy is displayed.
CPD decision: This panel displays the hard-decision of CPD. Based on the per-zone soft decision from the CPD network, a simple logic is applied inside the visualizer to generate the per-car decision. A hard decision over time is displayed in the plot where 0 indicates no life detection; 1 indicates adult occupied; 2 indicates child only.
Occupancy Probability: This panel displays the soft decision from the LPD network. There are multiple seat zones, but only the zone with highest occupancy probability will be displayed.
MacroDoppler Spectrum: The macroDoppler spectrum is displayed for the seat zone with highest occupancy probability.
Algorithm Overview
This demo can be viewed as two pieces: the point cloud detection and the high-level processing.
Point Cloud Detection
The point cloud detection is based on the AWR6843 CPD demo with classification. Additional information related to that part of the algorithm can be viewed in the AWR6843 CPD With Classification Users Guide
High-Level Processing
A block diagram of the high-level processing is provided below.
For child presence detection, there are two classifiers: LPD (Life Presence Detection) network and CPD (child presence detection) network. The LPD network is used to identify life presence in the car vs other moving object, and the CPD model is used to identify child vs adult.
LPD network
When looking at human vs. other moving object, their point clouds can be similar, but their moving pattern (breathing rate) will be different. Traditionally, to calculate the breathing rate, the following is done:- The static clutter removal will be used to remove non-moving object.
- Range selection and angle beamforming are used to focus on the location of the chest (assumes known chest location).
- The chest movement is then tracked by monitoring the phase change across time.
For in-cabin applications, similar concepts are borrowed to develop the LPD network. Note that since the chest location is unknown in this demo, multiple pre-defined locations, called voxels, are monitored and tracked at the same time.
- The radarCube data after clutter removal is used to calculate the energy and phase for each voxel.
- The behavior of each voxel is recorded across a time window.
- These voxel behaviors are combined to form a moving pattern, referred to as the macroDoppler feature, and fed into a CNN-based network.
Since the same model is trained for different seat zones, a tunable scaling factor is introduced for each zone to help adapt to different seats in different cars.
For voxel generation, the range and angle of the voxels are chosen in the following way:
- Number of voxels is set to
30per zone by default but can be modified as long as MIPS and memory allows it. - Angle for each zone is calcuated (inside the target code) based on the direction of the sensor to the centers of each zone.
- Range is pre-determined as (minimum range bin per zone ~ minimum range bin per zone + number of voxels per zone). The minimum range bin per zone can be calculated as the minimum range between the sensor to each zone region.
CPD network
Similar to SBR, the CPD model is based on point cloud. The point cloud is first transformed into world (car) coordinates and assigned to different seat zones. The points in each zone will be normalized in the XY domain, so that the same classifier can be trained for all the seat zones. Points are buffered across N frames (N = 30 for CPD mode) in a sliding window and then used for feature calculation. The calculated features are then fed into the ANN-based classifier to get a per-seat soft decision (probability of child vs. adult). In the visualizer, a per-car decision is derived from these per-seat decisions. There are a total of 22 features for the CPD model, including the total number of points, the volume of the points, the mean/std/max/min/range of SNR, x-value, y-value, and z-value of the accumulated point.
The EVM mounting, antenna configuration and zone definitions are also the same between CPD and SBR mode. Users can refer to the SBR User’s Guide for more details.
Demo Specific Configurations
Some of demo configuration file parameters are the same between CPD and SBR mode while others are unique to CPD mode. For the common parameters, the default values are given below. For the unique parameters, these are explained in more detail later.
| Command | Referance |
|---|---|
| 1. | Point cloud related CLI commands that are configured differently for CPD mode |
dynamicRACfarCfg |
refer to the CFAR Detection section of AWR6843 CPD with Classification |
| leftSkipSizeRange | range bin start index, default 5 |
| rightSkipSizeRange | range bin end skip, default 10 |
| leftSkipSizeAngle | angle start index, default 1 |
| rightSkipSizeAngle | angle end skip, default 1 |
| searchWinSizeRange | search window size - “far” range, default 8 |
| searchWinSizeAngle | search window size - angle dimension, default 8 |
| searchWinSizeNear | search window size - “near” range, default 8 |
| guardSizeRange | guard window size - “far” range, default 10 |
| guardSizeAngle | guard window size - angle, default 4 |
| guardSizeNear | guard window size - “near” range, default 10 |
| threRange | “K0” cross range detection threshold, default 7.0 |
| threAngle | “K0” cross angle detection threshold, default 6.0 |
| threSidelobe | “sidelobe” threshold, default 0.5 |
| enSecondPass | second search pass enable flag, default 1 |
| rangeRefIndex | for CPD mode, default to 1 to disable dynamic threshold. |
Note that the CFAR thresholds is set lower to help the low SNR cases like baby in footwell or in 2nd row rear-facing; the guard window and search window size for “near” are set to be the same as “far” to disable the “near” option. |
|
dynamic2DAngleCfg |
refer to the High Accuracy Angle Estimation section of AWR6843 CPD with Classification |
| zoomInFactor | zoom-in Factor for finer angle estimation: default 5 |
| zoominNn8bors | number of coarse neighboring angle bins of zoom-in: set to 1 |
| peakExpSamples | number of samples on each side to expand the peak: default 1 |
| peakExpRelThr | peak expansion sharpness threshold, default 1.0 |
| peakExpSNRThr | peak expansion SNR threshold in linear, default 7.0 |
| localMaxCheck | set to 2 |
| Note that the peak expansion SNR threshold is set lower in CPD mode to help the low SNR cases like baby in footwell or in 2nd row rear-facing | |
| 2. | High-level processing CLI commands that are configured differently for CPD mode |
featExtrCfg |
Note that featExtrCfg settings should match the ones used for classifier model training. |
| maxNumPtsPerZonePerFrm | maximum number of points allowed per zone, not appied when dbScan is disabled. |
| numFrmProc | number of frame to be processed before making a decision, default 30 |
| offsCorr | enable offset correction in x-y plane, set to 1 |
| dbScanFilt | set to 0 to disable dBScan clustering |
| dbScanEps | maximum distance to be included as a cluster in dBScan, not applied when clustering is disabled. |
| dbScanMinPts | minimum points to be claimed as a cluster in dBScan, not appied when clustering is disabled. |
| 3. | CLI commands that are unique to the CPD mode |
runningMode |
|
| demoMode | 0 - intrusion detection, 1 - SBR, 2 - CPD, set to 2 |
| LPDMode | 0: apply ANN-based LPD; 1: apply CNN-based LPD; default 1 |
macroDopplerCfg |
Parameter related to macroDoppler calculation |
| enable | Enable macroDoppler calculation, set to 1 |
| delayLineLen | Total number of frames tracked for macroDoppler calculation, valid between 1 ~ 64, default 40 frames. A larger value can result in better performance, but increase system delay. This value needs to match the value used in LPD training to achieve best performance. |
macroDopNumVoxelCfg |
Number of voxels generated per zone, default 30 30 30 30 30, a bigger value may fail in memory allocation. |
macroDopRngBinOffsetCfg |
Minimum range bins for the voxels generated per zone, default 5 5 20 14 20; the value is related to minimum distance between mounting position and each defined seat zone. The current default value is set based on front mounting, and may need to be updated when sensor mounting position changes to center, side, or back mounting. This value also indicates the max range bin for the voxels are 34 34 49 43 49, which equals macroDopNumVoxelCfg + macroDopRngBinOffsetCfg - 1. |
zOffset |
Per zone height adjustment, default 0 0 0 0 0 for total 5 zones. This is important for CPD tuning. The zOffset is given in meters and is subtracted for all point cloud detections in the z-axis for a given zone. This can be used for calibrating for child vs. adult classification by observing the measured height and compensating. For example, if an adult is detected too short in a given zone, then the zOffset should be negative for that zone to compensate. Similarly, if a baby or child is detected to be too tall, then the zOffset should be positive for that zone to compensate. By calibrating the zOffset, the height estimation accuracy in each zone can be modified to improve classification results. TI has found that height accuracy is important to child and adult classification accuracy zOffset is added as a live-tuning parameter, meaning users are able to modify zOffset in the visualzier to apply the change immediately
without restart the visualzier. |
macroDopMapScaleCfg |
Per zone scalar applied to the input of the CNN-model. If a baby in 2nd-row footwell is not detected, users can increase the scalar to help. If the non-living object in 1st-row is false detected as human, users can decrease the scalar to help. TI has found that scalar is important to the accuracy of LPD decision when adapt to a new car or slightly different mounting position. macroDopMapScaleCfg is also added as a live-tuning parameter, meaning users are able to modify macroDopMapScaleCfg in the visualzier to apply the change immediately without restart the visualzier. |
Tuning
The key items to focus on for tuning are as follows:
Proper mounting
The LPD/CPD classifer model has been trained with the sensor mounted at the front overhead console position and tested with or without 180 degree of rotation in x-y plane.
% Sensor position and tilt angles
% <xOffset> <yOffset> <zOffset> <azimuthTilt> <elevationTilt>
sensorPosition 0 0.8 1.15 0 -60
% Sensor position and tilt angles with 180 degree of rotation
sensorPosition 0 0.8 1.15 180 -120
The performance will be similar to our findings when the sensor is mounted in the front overhead position and a similar tilting angle as our tests, even in different cars. For other positions, like center mount, side mount, and back mount, the performance has not been tested at this time.Accurate zone definition
Follow the same procedure as described in the Tuning section of the SBR User Guide to match the zone definition with car interior spacing.The LPD and CPD Classifier
The classifiers are trained with the following feature extraction parameters. Modification of these paramters can result in non-optimal solutions.
% SBR feature extraction parameters
featExtrCfg 200 30 1 0 0.4 10Point Cloud Tuning
Point cloud quality is important to the classifier. Users can adjust CFAR detection thresholdthreRangeandthreAngleindynamicRACfarCfgto achieve richer point cloud. Note that lower CFAR detection thresholds result in richer point cloud but higher false detection ratio. Users can also lowerpeakExpSNRThrin dynamic2DAngleCfg to lower the point cloud extension threshold to include more neighboring points next to the detected peak.Additional zone adjustment
For CPD, the CFAR setting is lowered to help on the 2nd-row rear-facing baby and footwell area behind the seat. This change makes the detection more sensitive to false detection from the static leakage compared to the CFAR for SBR. If consistent false points are observed from certain areas, such as headrest and storage area, consider adjusting the zone definition to remove those areas.Static leakage and uniform chirping
In an ideal case, the chirp-to-chirp variation for static objects should be only thermal noise. However, in reality, some variation can be observed (the so-called static leakage) above the thermal noise level. This static leakage level can be related to both chirp configuration and thermal conditions. Higher leakage and more random point clouds can be observed when the device is warming up for the first time. After the intial warm up (several frames), the leakage level is observed around 50~60dB lower than the actual static power. The reason behind this chirp-to-chirp variation is due to the small temperature changes inside the device. When we have long frame idle times between active chirping, the device goes through warm-up and cool-down cycle. To solve this problem, uniform chirping is implemented (also called continous bursting), i.e., the chirps are sending uniformly without long frame idle time. As an example below, 50 bursts are sent out instead of 32, and only the first 32 bursts are used for signal processing and rest of the bursts are not being used.
| Normal burst | Continuous bursting |
|---|---|
| frameCfg 4 12 4000 32 200 0 | frameCfg 4 12 4000 50 200 0 |
| sigProcChainCommonCfg 4 32 200 0 0 | sigProcChainCommonCfg 4 32 200 0 0 |
- Live-tuning
As mentioned earlier,zOffsetis crucial to the child vs adult classification;macroDopMapScaleCfgis crucial to the living vs non-living object classification. Therefore, both parameters have been added as a live-tuning parameter, meaning users are able to modifymacroDopMapScaleCfgin the visualizer to apply the change immediately without restarting the visualizer.zOffsettuning: if an adult is detected too short in a given zone, then thezOffsetshould be negative for that zone to compensate. Inversely, if a baby or child is detected to be too tall, then the zOffset should be positive for that zone to compensate.macroDopMapScaleCfgtuning: if a baby-doll in the 2nd-row footwell is not detected, users can increase the scalar to help. If the non-living object in the 1st-row is falsely detected as a living object, users can decrease the scalar to help.
Known Issues and Limitations
There are some zone definition limitations due to the voxel generation.
- Each zone has to have 3 cuboids defined.
- The first two zones should be used for the upper body.
- The third zone should be used for the footwell region.
Need More Help?
- Search for your issue or post a new question on the mmWave E2E forums
- Visit the SDK User’s Guide for more documentation on various algorithms used in this demo.