Skip to main content

WiTwin Radar

WiTwin Radar is a GPU-accelerated, differentiable radar simulator. You describe a world with witwin.core (meshes, materials, moving structures), say where the scatterers are and how a radar is built, and Radar returns the cube the radar would record: FMCW, OFDM or pulsed, MIMO, through a modelled receive chain, with typed signal-processing products (range-Doppler maps, detections, point clouds, tracks, images) on top. One-way propagation comes from witwin.channel; Radar composes round trips, scatters off point, structure and physical-optics mesh targets, applies antennas and the receiver, and synthesizes the waveform in native CUDA. Gradients flow back to target positions, trajectories, cross sections, mesh vertices, antenna patterns, the radar's pose and gains.

Install

pip install "witwin-radar[channel]"
witwin-radar-doctor
  • Simulation needs an NVIDIA GPU with CUDA. The wheels ship one native library built for torch==2.10.0 (CUDA 12.8); witwin-radar-doctor checks Torch, the native library and Channel and runs a GPU smoke test, with a fix for each problem it finds.
  • The channel extra installs witwin-channel 0.6 on CPython 3.10-3.13, the versions Channel publishes. Radar installs on 3.10-3.14, but on 3.14 the extra installs nothing, so scene-driven simulation needs 3.10-3.13.
  • Channel picks its ray-tracing backend when it compiles a scene: OptiX where the driver provides it, otherwise a pure-CUDA tracer. witwin-channel-doctor reports which one a machine gets.
  • Linux (wheels target manylinux_2_28_x86_64) and Windows x86_64 are supported. Building from source: CONTRIBUTING.md.

Quickstart

One FMCW radar, one target 3 m away walking toward it at 1 m/s, one Range-Doppler map:

import torch
from witwin.core import Scene
from witwin.radar import Fmcw, PointTargets, Radar

chirp = Fmcw(slope=60e12, sample_rate=4.4e6, samples_per_chirp=256, chirps_per_frame=64,
             adc_start=6e-6, idle=7e-6, ramp_end=65e-6)
radar = Radar(reference_frequency_hz=77e9, waveform=chirp, power=15.0, antenna_unit="half_wavelength",
              tx=((0.0, 0.0, 0.0),), rx=((0.0, 0.0, 0.0), (1.0, 0.0, 0.0), (2.0, 0.0, 0.0), (3.0, 0.0, 0.0)))
# One 1 m^2 target 3 m down the boresight (-z), closing at 1 m/s.
targets = PointTargets(positions=[(0.0, 0.0, -3.0)], rcs=1.0,
                       trajectory=lambda t: torch.tensor([[0.0, 0.0, -3.0 + t]], device="cuda"))
result = radar.simulate(Scene(), targets, times=(0.0,))
power = result.frame(0).range_doppler().data.abs().square().sum(dim=(0, 1))  # [Doppler, range]
doppler, rng = divmod(int(power.argmax()), power.shape[1])
axes = result.axes
print(f"range {axes.range_m[rng]:.2f} m, velocity {axes.velocity_mps[doppler]:+.2f} m/s")

It prints range 3.01 m, velocity +0.84 m/s: the nearest range bin, and the Doppler bin nearest 1 m/s (bins are 0.42 m/s wide for 64 chirps). Positive velocity means closing. The radar sits at the origin looking down -z with +y up, its default pose. The quickstart guide walks through it line by line and adds a wall, multipath and a point cloud.

Where to go next

Guide What it covers
Quickstart Install, the first map, a wall, the four verbs
Conventions and units Frames, the default pose against Channel's Z-up world, velocity sign, phasors, units
Choosing Motion Adaptive (the default for moving FMCW), adc, chirp, discovery cadences, path events
Targets Point, structure and mesh (physical optics) targets, materials, roughness, fluctuation, SMPL bodies
Multipath and environment Reflections, transmission, diffraction, clutter, scene authoring with Channel's importers and presets
Waveforms and MIMO FMCW, chirp sequences, DDM/BPM, OFDM, pulsed and coded pulses
Receive chain Patterns, coupling, leakage, LNA, compression, noise, IQ, AGC, ADC
Multi-radar networks Several radars, bistatic links, interference, emitters
Processing cookbook Range-Doppler, CFAR, angles, point clouds, tracking, imaging, calibration
Gradients and inverse design ad_mode, the differentiable leaves, an inverse-design loop
Datasets and tools Doctor, save/load, labels, the dataset writer, TI configs, DCA1000
Troubleshooting Common errors and what they mean

Upgrading from 0.4: docs/migration-0.5.md. What changed: CHANGELOG.md. What is supported, feature by feature: FEATURE_LIST.md; at run time, witwin.radar.capabilities(). The full pipeline contract: docs/pipeline_guide.md; the flat configuration format: docs/configuration.md. Performance evidence and limits: PERFORMANCE.md.

Examples

python -m examples.single_point          # a target and a wall: the radar equation and the multipath range, checked
python -m examples.moving_target         # moving targets, adaptive motion against the exhaustive reference
python -m examples.walking_human         # a walking body and its micro-Doppler spectrogram
python -m examples.music_imaging         # MUSIC angle imaging
python -m examples.rgbd_range_doppler --synthetic   # or --input path/to/depths.npz (a depth or point sequence)

All scene-driven examples need CUDA and Channel.

The API in one screen

Radar is one flat immutable record in SI units (exceptions: power in dBm, gains in dB/dBi). A sub-record appears only where a field has variants (the waveform, the antenna pattern, the motion sampling) or where several numbers are coupled (Noise, Agc, Adc). Radar.replace(...) and Radar.to(device) return a new radar; Radar.from_dict / to_dict read and write the flat configuration format, including TI-style FMCW keys.

The radar has four verbs, two halves and their fusion:

  • radar.trace(scene, targets, times=...) runs the world half (world sampling, Channel discovery and replay, round-trip composition, scattering, antenna weighting) and returns Paths;
  • radar.echo(paths) runs the instrument half (waveform synthesis, the receive chain, the output domain, the processing axes) and returns a Result;
  • radar.simulate(...) fuses the two and stacks every frame; radar.stream(...) yields one frame at a time.

radar.echo(radar.trace(...)) is bit-identical to radar.simulate(...). The world-facing verbs take the propagation request (los=, reflections=, transmission=, diffraction=, environment=), the in-frame sampling (motion=) and the differentiation mode (ad_mode=, Channel's name). A Result holds the cube [frame, TX, RX, slow, fast] with its axis_names and the ProcessingAxes every processing stage reads; result.frame(i) is a Frame whose methods (range_profile, range_doppler, range_angle, points, image, ...) are facades over witwin.radar.processing.

The root exports the whole happy path: Adc, Agc, Aspect, Chirp, Compression, Coupling, Emitter, Fluctuation, Fmcw, Frame, Iq, Leakage, MeshTargets, Motion, Network, Noise, Ofdm, Paths, Pattern, PointTargets, Pulsed, Radar, RcsTable, Result, ScatteringMatrix, StructureTargets, capabilities and processing. Advanced records stay importable from their owner modules.

Architecture

witwin.core Scene/DynamicScene
        |
        v
Radar session -> Channel one-way legs -> round-trip composition (native join)
        |                                     |
        +-> scattering -> antennas ----------+
                                              v
                      FMCW / OFDM / pulsed synthesis -> receive chain
                                              v
                                typed processing products

There is one native backend (witwin/radar/cuda/), with no CPU or Torch fallback for simulation; Channel is reached only through witwin/radar/channel.py. Module ownership and the development rules are in AGENTS.md; how to build, test and contribute is in CONTRIBUTING.md.

License and citation

WiTwin Radar uses the WiTwin dual-license model. See the WiTwin licensing page. The simulator is derived from RF-Genesis; cite the RF-Genesis SenSys 2023 paper when that prior work is relevant.

Metadata

Release files for witwin-radar 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for witwin-radar 0.5.0
File Size Uploaded Provenance Actions
witwin_radar-0.5.0.tar.gz 2.1 MB With provenance Details for witwin_radar-0.5.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for witwin-radar 0.5.0
File Interpreter ABI Platform Actions
witwin_radar-0.5.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for witwin_radar-0.5.0-py3-none-win_amd64.whl
witwin_radar-0.5.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for witwin_radar-0.5.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Total release size: 20.6 MB

Release files / witwin_radar-0.5.0.tar.gz

Download URL witwin_radar-0.5.0.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
f0e37dd579abd3140dc0cb532a4b49552fcef93a63c033865f825c194b872562
BLAKE2b-256 checksum
How to use checksums
ed641009495b931d7787d449ec87c71d050d508db939dda835ba7345496b31f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / witwin_radar-0.5.0-py3-none-win_amd64.whl

Download URL witwin_radar-0.5.0-py3-none-win_amd64.whl
Size 9.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
23b34fc0a9533152ea52d8d970894776a97698bf78844331a311ac341fbf7bf3
BLAKE2b-256 checksum
How to use checksums
e4f58f177bd063626eb9d51e3edabdeef3bfc2267a012447496a3ce6973cb8d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / witwin_radar-0.5.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL witwin_radar-0.5.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 9.3 MB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
e1daf99ba0e3eb9bb1c4764770c3443c4d137b6828953575248f3eca2cf7b2ac
BLAKE2b-256 checksum
How to use checksums
62f717eb54ca5c3e9e9f1b7b66d49bdfa9805930d92fb568905740f2e7bd1e8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for witwin-radar 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for witwin_radar-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page