Radar

Radar is a differentiable mmWave radar simulator that turns WiTwin scenes into FMCW, OFDM or pulsed data cubes on the GPU.

Radar (witwin-radar on PyPI, imported as witwin.radar) simulates what a radar records when it looks at a WiTwin Scene. You declare the radar (carrier, waveform, antenna array, receiver chain and pose), the world (a witwin.core Scene) and the targets in it. Radar traces the propagation paths, synthesizes the waveform in native CUDA kernels, and returns a typed data cube that the built-in processing turns into range profiles, range-Doppler maps, angle spectra and point clouds.

Use Radar to generate synthetic mmWave datasets, to test a processing chain against a known ground truth, or to fit scene parameters by gradient descent. The cube is a PyTorch tensor, and loss.backward() reaches target positions, radar cross sections, mesh vertices and material permittivity.

What it looks like#

from witwin.core import Scene
from witwin.radar import Fmcw, PointTargets, Radar
 
fmcw = Fmcw.from_ti(slope_mhz_per_us=60.012, sample_rate_ksps=4400, samples_per_chirp=256,
                    chirps_per_frame=128, adc_start_us=6, idle_us=7, ramp_end_us=65)
radar = Radar(carrier=77e9, waveform=fmcw, tx=[(0.0, 0.0, 0.0)], rx=[(0.0, 0.0, 0.0)], power=15.0)
 
targets = PointTargets(positions=[(0.0, 0.0, -3.0)], rcs=1.0)
result = radar.simulate(Scene(structures=(), endpoints=[]), targets, times=(0.0,), reflections=0)
 
rd = result.frame(0).range_doppler()
print(result.cube.shape, rd.range_axis[rd.data.abs().sum(dim=(0, 1)).amax(dim=0).argmax()])

Positions are in metres, times in seconds and frequencies in hertz. The radar looks along its local -z axis. The Quickstart runs a full scene with a wall, noise and a point cloud.

What Radar covers#

AreaIncluded
WaveformsFMCW (TDM-MIMO, spectrum or beat output), OFDM, pulsed (rectangular or LFM)
Worldwitwin.core Scene and DynamicScene, line-of-sight and multi-bounce reflections through Channel, rigid motion, deformation, moving antennas
TargetsPoint targets with a radar cross section, an optional trajectory and aspect-dependent scattering; scatterers anchored on moving structures; SMPL human bodies
MotionPer-frame, per-chirp, per-ADC-sample and error-controlled adaptive resampling of a moving world
ReceiverAntenna patterns, thermal noise, oscillator phase noise, LNA gain, AGC, ADC quantization, IQ imbalance, TX-to-RX leakage
ProcessingRange profile, range-Doppler map, matched filter, CA-CFAR and OS-CFAR, FFT and phase-comparison angle of arrival, MUSIC, MVDR, beamforming, micro-Doppler, point clouds, tracking
GradientsFirst-order reverse-mode (VJP) and forward-mode (JVP) derivatives through propagation and synthesis

Note

Radar needs an NVIDIA GPU with CUDA. Propagation and waveform synthesis run only in the native CUDA library, and there is no CPU fallback.

Where to go next#