xwr.radar.raw
¶
Raw, unabstracted commands.
These commands are commonly issued by dumping the text file output of the TI demo visualizer onto a serial port. However, this is not great for debugging, and the individual parameters are not documented. We instead split each command into a documented and individually callable function.
xwr.radar.raw.APIMixins
¶
Mixins capturing the raw TI Demo API.
Source code in src/xwr/radar/raw.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
|
adcCfg
¶
Configure radar subsystem ADC.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
numADCBits
|
ADCDepth
|
ADC bit depth |
BIT16
|
adcOutputFmt
|
ADCFormat
|
real, complex, and whether to filter the image band. |
COMPLEX_1X
|
Source code in src/xwr/radar/raw.py
adcbufCfg
¶
adcbufCfg(
subFrameIdx: int = -1,
adcOutputFmt: ADCFormat = COMPLEX_1X,
sampleSwap: SampleSwap = MSB_LSB_IQ,
chanInterleave: int = 1,
chirpThreshold: int = 1,
) -> None
ADC Buffer hardware configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
subFrameIdx
|
int
|
subframe to apply to; if |
-1
|
adcOutputFmt
|
ADCFormat
|
real/complex ADC format. |
COMPLEX_1X
|
sampleSwap
|
SampleSwap
|
write samples in IQ or QI order. We assume |
MSB_LSB_IQ
|
chanInterleave
|
int
|
only non-interleaved (1) is supported. |
1
|
chirpThreshold
|
int
|
some kind of "ping-pong" demo parameter. |
1
|
Source code in src/xwr/radar/raw.py
channelCfg
¶
Channel configuration for the radar subsystem.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rxChannelEn
|
int
|
bit-masked rx channels to enable. |
15
|
txChannelEn
|
int
|
bit-masked tx channels to enable. |
5
|
cascading
|
int
|
must always be set to 0. |
0
|
Source code in src/xwr/radar/raw.py
chirpCfg
¶
chirpCfg(
chirpIdx: int = 0,
profileId: int = 0,
startFreqVar: float = 0.0,
freqSlopeVar: float = 0.0,
idleTimeVar: float = 0.0,
adcStartTimeVar: float = 0.0,
txEnable: int = 0,
) -> None
Radar chirp configuration.
See the mmWave SDK user guide, Table 1 (Page 19).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
chirpIdx
|
int
|
Antenna index. Sets |
0
|
profileId
|
int
|
chirp profile to use. |
0
|
startFreqVar
|
float
|
allowed frequency tolerance; documentation states only 0 is tested. |
0.0
|
freqSlopeVar
|
float
|
allowed frequency tolerance; documentation states only 0 is tested. |
0.0
|
idleTimeVar
|
float
|
allowed time tolerance; documentation states only 0 is tested. |
0.0
|
adcStartTimeVar
|
float
|
allowed time tolerance; documentation states only 0 is tested. |
0.0
|
txEnable
|
int
|
antenna to enable; is converted to a bit mask. |
0
|
Source code in src/xwr/radar/raw.py
compRangeBiasAndRxChanPhase
¶
compRangeBiasAndRxChanPhase(
rangeBias: float = 0.0, rx_phase: list[tuple[int, int]] = [(0, 1)] * 12
) -> None
Set range bias, channel phase compensation.
Note
rx_phase must have one term per TX-RX pair.
Source code in src/xwr/radar/raw.py
flushCfg
¶
frameCfg
¶
frameCfg(
chirpStartIdx: int = 0,
chirpEndIdx: int = 1,
numLoops: int = 16,
numFrames: int = 0,
framePeriodicity: float = 100.0,
triggerSelect: int = 1,
frameTriggerDelay: float = 0.0,
) -> None
Radar frame configuration.
Warning
The frame should not have more than a 50% duty cycle according to the mmWave SDK documentation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
chirpStartIdx
|
int
|
chirps to use in the frame. |
0
|
chirpEndIdx
|
int
|
chirps to use in the frame. |
1
|
numLoops
|
int
|
number of chirps per frame; must be >= 16 based on trial/error. |
16
|
numFrames
|
int
|
how many frames to run before stopping; infinite if 0. |
0
|
framePeriodicity
|
float
|
period between frames, in ms. |
100.0
|
triggerSelect
|
int
|
only software trigger (1) is supported. |
1
|
frameTriggerDelay
|
float
|
does not appear to be documented. |
0.0
|
Source code in src/xwr/radar/raw.py
lvdsStreamCfg
¶
lvdsStreamCfg(
subFrameIdx: int = -1,
enableHeader: bool = False,
dataFmt: LVDSFormat = ADC,
enableSW: bool = False,
) -> None
Configure LVDS stream (to the DCA1000EVM); LvdsStreamCfg
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
subFrameIdx
|
int
|
subframe to apply to. If |
-1
|
enableHeader
|
bool
|
HSI (High speed interface; refers to LVDS) Header enabled/disabled flag; disabled for raw mode. |
False
|
dataFmt
|
LVDSFormat
|
LVDS format; we assume |
ADC
|
enableSW
|
bool
|
Use software (SW) instead of hardware streaming; causes chirps to be streamed during the inter-frame time after processing. We assume HW streaming. |
False
|
Source code in src/xwr/radar/raw.py
profileCfg
¶
profileCfg(
profileId: int = 0,
startFreq: float = 77.0,
idleTime: float = 267.0,
adcStartTime: float = 7.0,
rampEndTime: float = 57.14,
txStartTime: float = 1.0,
txOutPower: int = 0,
txPhaseShifter: int = 0,
freqSlopeConst: float = 70.0,
numAdcSamples: int = 256,
digOutSampleRate: int = 5209,
hpfCornerFreq1: HPFCornerFreq1 = KHZ175,
hpfCornerFreq2: HPFCornerFreq2 = KHZ350,
rxGain: int = 30,
) -> None
Configure chirp profile(s).
See the ramp timing calculator in mmWave Studio for chirp timing details, and the AWR1843 Datasheet for frequency and sample rate constraints.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
profileId
|
int
|
profile to configure. Can only have one in
|
0
|
startFreq
|
float
|
chirp start frequency, in GHz. Can be 76 or 77. |
77.0
|
idleTime
|
float
|
chirp timing; see the "RampTimingCalculator". |
267.0
|
adcStartTime
|
float
|
chirp timing; see the "RampTimingCalculator". |
7.0
|
rampEndTime
|
float
|
chirp timing; see the "RampTimingCalculator". |
57.14
|
txStartTime
|
float
|
chirp timing; see the "RampTimingCalculator". |
1.0
|
txOutPower
|
int
|
not entirely clear what this does. The demo claims that only '0' is tested / should be used. |
0
|
txPhaseShifter
|
int
|
not entirely clear what this does. The demo claims that only '0' is tested / should be used. |
0
|
freqSlopeConst
|
float
|
frequency slope ("ramp rate") in MHz/us; <100MHz/us. |
70.0
|
numAdcSamples
|
int
|
Number of ADC samples per chirp. |
256
|
digOutSampleRate
|
int
|
ADC sample rate in ksps (<12500); see Table 8-4 in the AWR1843 Datasheet. |
5209
|
hpfCornerFreq1
|
HPFCornerFreq1
|
high pass filter corner frequencies. |
KHZ175
|
hpfCornerFreq2
|
HPFCornerFreq2
|
high pass filter corner frequencies. |
KHZ350
|
rxGain
|
int
|
RX gain in dB. The meaning of this value is not clear. |
30
|
Source code in src/xwr/radar/raw.py
xwr.radar.raw.BoilerplateMixins
¶
Mixins capturing non-relevant parts of the TI AWR Demo API.
These configuration class are required for the software to not cause an error, but are not actually relevant to the output.
Note
The arguments used here are generally not fully documented. If there are any use cases for these commands, we can properly document them and move them to the main API.
Source code in src/xwr/radar/raw.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
|
CQRxSatMonitor
¶
CQRxSatMonitor(
profile: int = 0,
satMonSel: int = 3,
priSliceDuration: int = 5,
numSlices: int = 121,
rxChanMask: int = 0,
) -> None
Saturation monitoring.
Source code in src/xwr/radar/raw.py
CQSigImgMonitor
¶
Signal/image band energy monitoring.
Source code in src/xwr/radar/raw.py
analogMonitor
¶
aoaFovCfg
¶
aoaFovCfg(
subFrameIdx: int = -1,
minAzimuthDeg: int = -90,
maxAzimuthDeg: int = 90,
minElevationDeg: int = -90,
maxElevationDeg: int = 90,
) -> None
FOV limits for CFAR.
Source code in src/xwr/radar/raw.py
boilerplate_setup
¶
Call mandatory but irrelevant commands.
Source code in src/xwr/radar/raw.py
calibData
¶
Save/restore RF calibration data.
Source code in src/xwr/radar/raw.py
calibDcRangeSig
¶
calibDcRangeSig(
subFrameIdx: int = -1,
enabled: int = 0,
negativeBinIdx: int = -5,
positiveBinIdx: int = 8,
numAvgFrames: int = 256,
) -> None
DC range calibration at radar start.
TI's note
Antenna coupling signature dominates the range bins close to the radar. These are the bins in the range FFT output located around DC.
When this feature is enabled, the signature is estimated during the first N chirps, and then it is subtracted during the subsequent chirps
Info
Rover performs this step during offline data processing.
Source code in src/xwr/radar/raw.py
cfarCfg
¶
cfarCfg(
subFrameIdx: int = -1,
procDirection: int = 1,
averageMode: int = 0,
winLen: int = 4,
guardLen: int = 2,
noiseDivShift: int = 3,
cyclicMode: int = 1,
threshold: float = 15.0,
peakGroupingEn: int = 1,
) -> None
Configure CFAR.
Note
This command must be called twice for procDirection=0, 1
.
Source code in src/xwr/radar/raw.py
cfarFovCfg
¶
cfarFovCfg(
subFrameIdx: int = -1,
procDirection: int = 0,
min_meters_or_mps: float = 0,
max_meters_or_mps: float = 0,
) -> None
Range/doppler limits for CFAR.
Note
Must be called twice for procDirection=0, 1
.
Source code in src/xwr/radar/raw.py
clutterRemoval
¶
extendedMaxVelocity
¶
guiMonitor
¶
guiMonitor(
subFrameIdx: int = -1,
detectedObjects: int = 0,
logMagRange: int = 0,
noiseProfile: int = 0,
rangeAzimuthHeatMap: int = 0,
rangeDopplerHeatMap: int = 0,
statsInfo: int = 0,
) -> None
Set GUI exports.
Note
We disable everything to minimize the chances of interference.
Source code in src/xwr/radar/raw.py
lowPower
¶
measureRangeBiasAndRxChanPhase
¶
measureRangeBiasAndRxChanPhase(
enabled: int = 0, targetDistance: float = 1.5, searchWin: float = 0.2
) -> None
Only used in a specific calibration procedure.
Source code in src/xwr/radar/raw.py
multiObjBeamForming
¶
Configure multi-object beamforming.