xwr.rsp.jax
¶
Radar Signal Processing in Jax.
Info
This moduel mirrors the functionality of xwr.rsp.numpy.
Warning
This module is not automatically imported; you will need to explicitly import it:
Since jax is not declared as a required dependency, you will also need
to install jax yourself (or install the jax extra with
pip install xwr[jax]).
xwr.rsp.jax.AWR1642Boost
¶
Bases: RSPJax
Radar Signal Processing for the AWR1642 or AWR1843 with TX2 disabled.
Antenna Array
The TI AWR1642Boost (or AWR1843Boost with TX2 disabled) has a 1x8 linear MIMO array:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window
|
bool | Mapping[Literal['range', 'doppler', 'azimuth', 'elevation'], bool]
|
whether to apply a hanning window. If |
False
|
size
|
Mapping[Literal['range', 'doppler', 'azimuth', 'elevation'], int]
|
target size for each axis after zero-padding, specified by axis. If an axis is not spacified, it is not padded. |
{}
|
sample_swap
|
bool
|
if |
False
|
Source code in src/xwr/rsp/jax/rsp.py
xwr.rsp.jax.AWR1843AOP
¶
Bases: RSPJax
Radar Signal Processing for AWR1843AOP.
Antenna Array
In the TI AWR1843AOP, the MIMO virtual array is arranged in a 2D grid:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window
|
bool | Mapping[Literal['range', 'doppler', 'azimuth', 'elevation'], bool]
|
whether to apply a hanning window. If |
False
|
size
|
Mapping[Literal['range', 'doppler', 'azimuth', 'elevation'], int]
|
target size for each axis after zero-padding, specified by axis. If an axis is not specified, it is not padded. |
{}
|
sample_swap
|
bool
|
if |
False
|
Source code in src/xwr/rsp/jax/rsp.py
xwr.rsp.jax.AWR1843Boost
¶
Bases: RSPJax
Radar Signal Processing for AWR1843Boost.
Antenna Array
In the TI AWR1843Boost, the MIMO virtual array has resolution 2x8, with a single 1/2-wavelength elevated middle antenna element:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window
|
bool | Mapping[Literal['range', 'doppler', 'azimuth', 'elevation'], bool]
|
whether to apply a hanning window. If |
False
|
size
|
Mapping[Literal['range', 'doppler', 'azimuth', 'elevation'], int]
|
target size for each axis after zero-padding, specified by axis. If an axis is not spacified, it is not padded. |
{}
|
sample_swap
|
bool
|
if |
False
|
Source code in src/xwr/rsp/jax/rsp.py
elevation_aoa
¶
elevation_aoa(
iq: Complex64[Array, "batch slow tx rx fast"]
| Int16[Array, "batch slow tx rx fast*2"],
) -> Float32[Array, "batch doppler range"]
Estimate elevation angle of arrival (AoA).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
iq
|
Complex64[Array, 'batch slow tx rx fast'] | Int16[Array, 'batch slow tx rx fast*2']
|
raw IQ data. |
required |
Returns:
| Type | Description |
|---|---|
Float32[Array, 'batch doppler range']
|
Estimated elevation angle of arrival (AoA) in radians for each range-Doppler bin. |
Source code in src/xwr/rsp/jax/rsp.py
xwr.rsp.jax.AWR2944EVM
¶
Bases: RSPJax
Radar Signal Processing for AWR2944EVM.
Antenna Array
The AWR2944EVM has a virtual array on a 2x12 grid:
The horizontal spacing is 1/2 wavelength, and the vertical spacing is 0.8 wavelength.Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window
|
bool | Mapping[Literal['range', 'doppler', 'azimuth', 'elevation'], bool]
|
whether to apply a hanning window. If |
False
|
size
|
Mapping[Literal['range', 'doppler', 'azimuth', 'elevation'], int]
|
target size for each axis after zero-padding, specified by axis. If an axis is not spacified, it is not padded. |
{}
|
Source code in src/xwr/rsp/jax/rsp.py
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 | |
elevation_azimuth
¶
elevation_azimuth(
rd: Complex64[Array, "#batch doppler tx rx range"],
) -> Complex64[Array, "#batch doppler el az range"]
Calculate elevation-azimuth spectrum from range-doppler spectrum.
Warning
Special treatment is needed for the AWR2944EVM since the two rows of virtual elements are 0.8 wavelength apart instead of 0.5. We compute the DTFT along the elevation axis with the steering matrix corresponding to the 0.8 lambda spacing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rd
|
Complex64[Array, '#batch doppler tx rx range']
|
range-doppler spectrum. |
required |
Returns:
| Type | Description |
|---|---|
Complex64[Array, '#batch doppler el az range']
|
Computed elevation-azimuth spectrum, with windowing and padding if specified. |
Source code in src/xwr/rsp/jax/rsp.py
xwr.rsp.jax.AWRL6844EVM
¶
Bases: RSPJax
Radar Signal Processing for AWRL6844.
Antenna Array
The AWRL6844 has a 4x4 MIMO virtual array with λ/2 spacing:
TX Phase Relationship
TX1 and TX3 are in phase with each other. TX2 and TX4 are also in phase with each other, but are 180° out of phase with TX1 and TX3. Their contributions to the virtual array are negated accordingly.
Source: Table 3-1, EVM User's Guide: AWRL6844EVM IWRL6844EVM.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window
|
bool | Mapping[Literal['range', 'doppler', 'azimuth', 'elevation'], bool]
|
whether to apply a hanning window. If |
False
|
size
|
Mapping[Literal['range', 'doppler', 'azimuth', 'elevation'], int]
|
target size for each axis after zero-padding, specified by axis. If an axis is not specified, it is not padded. |
{}
|
Source code in src/xwr/rsp/jax/rsp.py
xwr.rsp.jax.CACFAR
¶
Bases: CACFAR[Array]
Cell-averaging CFAR.
Source code in src/xwr/rsp/jax/spectrum.py
xwr.rsp.jax.CASOCFAR
¶
Bases: CASOCFAR[Array]
Cell-averaging Smallest of CFAR.
Source code in src/xwr/rsp/jax/spectrum.py
xwr.rsp.jax.CalibratedSpectrum
¶
Bases: Generic[TRSP]
Radar processing with zero-doppler calibration.
Zero Doppler Calibration
Due to the antenna geometry and radar returns from the data collection rig which is mounted rigidly to the radar, the radar spectrum has a substantial constant offset in the zero-doppler bins.
- We assume that the range-Doppler plots are sparse, and take the median across a number of sample frames for the zero-doppler bin to estimate this offset.
- If a hanning window is applied, we instead calculate the offset
across doppler bins
[-1, 1]to account for doppler bleed. - This calculated offset is subtracted from the calculated spectrum.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rsp
|
TRSP
|
RSP pipeline to use. |
required |
Source code in src/xwr/rsp/jax/spectrum.py
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 | |
__call__
¶
__call__(
iq: Complex64[Array, "#batch doppler tx rx range"]
| Int16[Array, "#batch doppler tx rx range2"],
calib: Float32[Array, "doppler el az range"],
) -> Float32[Array, "batch doppler el az range"]
Run radar spectrum processing pipeline.
Note
After subtracting the calibration patch, any negative values are clipped to zero.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
iq
|
Complex64[Array, '#batch doppler tx rx range'] | Int16[Array, '#batch doppler tx rx range2']
|
batch of IQ data to run. |
required |
calib
|
Float32[Array, 'doppler el az range']
|
calibration patch to apply. |
required |
Returns:
| Type | Description |
|---|---|
Float32[Array, 'batch doppler el az range']
|
Doppler-elevation-azimuth-range real spectrum, with zero doppler correction applied. |
Source code in src/xwr/rsp/jax/spectrum.py
calibration_patch
¶
calibration_patch(
sample: Complex64[Array, "n slow tx rx fast"]
| Int16[Array, "n slow tx rx fast2"],
batch: int = 1,
) -> Float32[Array, "doppler el az range"]
Create a calibration patch for zero-doppler correction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sample
|
Complex64[Array, 'n slow tx rx fast'] | Int16[Array, 'n slow tx rx fast2']
|
sample IQ data to use for calibration. |
required |
batch
|
int
|
sample size for RSP processing. Uses batch size |
1
|
Returns:
| Type | Description |
|---|---|
Float32[Array, 'doppler el az range']
|
Patch of the doppler-range-azimuth image which should be subracted from the zero-doppler bins of the range-doppler-angle spectrum. |
Source code in src/xwr/rsp/jax/spectrum.py
xwr.rsp.jax.PointCloud
¶
Bases: PointCloud[Array]
Get radar point cloud from post FFT cube.
Source code in src/xwr/rsp/jax/aoa.py
xwr.rsp.jax.RSPJax
¶
Base Radar Signal Processing with common functionality.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window
|
bool | Mapping[Literal['range', 'doppler', 'azimuth', 'elevation'], bool]
|
whether to apply a hanning window. If |
False
|
size
|
Mapping[Literal['range', 'doppler', 'azimuth', 'elevation'], int]
|
target size for each axis after zero-padding, specified by axis. If an axis is not spacified, it is not padded. |
{}
|
sample_swap
|
bool
|
if |
False
|
Source code in src/xwr/rsp/jax/rsp.py
azimuth_aoa
¶
azimuth_aoa(
iq: Complex64[Array, "batch slow tx rx fast"]
| Int16[Array, "batch slow tx rx fast*2"],
) -> Int[Array, "batch doppler range"]
Estimate angle of arrival (AoA).
Note
The AOA bin resolution is determined by the number of bins this RSP instance is configured with.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
iq
|
Complex64[Array, 'batch slow tx rx fast'] | Int16[Array, 'batch slow tx rx fast*2']
|
raw IQ data. |
required |
Returns:
| Type | Description |
|---|---|
Int[Array, 'batch doppler range']
|
Estimated angle of arrival (AoA) index for each range-Doppler bin. |