- Automotive Radar Multi-Target Tracker (MTT)
- Extended Kalman Filter (EKF) with Polar Jacobians
- Munkres Bipartite Data Association (O(n·m²))
- ISO 26262 ASIL B / Zero-Heap Determinism
AUTOMOTIVE EMBEDDED C++ & PYTHON RESEARCH / EXTENDED KALMAN FILTER & MULTI-TARGET TRACKING
Deterministic C++17 Perception Engine: Non-Linear Polar State Estimation & Track Lifecycle
This project provides an automotive-grade Multi-Target Tracking (MTT) perception pipeline combining a deterministic production C++17 engine (kalman-cpp) and a comprehensive mathematical research testbench (kalman). Engineered according to ISO 26262 ASIL B and MISRA C++ guidelines, the system consumes raw radar detections in polar coordinates (range r, azimuth θ, and radial Doppler velocity vr), projects state estimates into Cartesian coordinates [x, y, vx, vy] using an Extended Kalman Filter (EKF), executes global bipartite data association via the Hungarian algorithm, and enforces strict track confirmation and coasting lifecycles without any dynamic heap allocation.
Non-Linear Observation Model & Polar Jacobians
Radar measurements reside in non-linear polar space: r = √(x² + y²), θ = atan2(y, x), and vr = (x·vx + y·vy) / r. The system derives the analytical measurement Jacobian H(x) with singularity guards at r → 0, mapping 4-DOF Cartesian state perturbations directly into radar range-rate space (EKF.hpp).
Joseph-Stabilized Covariance & Mahalanobis Gating
To prevent numerical divergence caused by finite-precision floating-point arithmetic, the covariance update applies the symmetric Joseph formulation: P⁺ = (I − KH)P⁻(I − KH)ᵀ + KRKᵀ. Candidate measurements are validated against a 3-DOF Chi-Square confidence gate (dM² = yᵀ S⁻¹ y ≤ 12.84, 99.5% threshold), filtering multipath ground bounce and ghost radar clutter.
Munkres / Hungarian Bipartite Data Association
Resolves measurement-to-track assignment ambiguity globally using a custom zero-heap implementation of the Hungarian algorithm (DataAssociation.hpp). Operates with O(n·m²) time complexity over static 64×128 cost matrices, guaranteeing optimal matching without combinatorial explosion or greedy local minima.
Deterministic Track Lifecycle & ASIL B Safety FSM
Governs track evolution through a strict finite state machine (FREE → TENTATIVE → CONFIRMED → COASTED → DELETED). Unconfirmed tracks require M-of-N confirmation (3 hits in 5 consecutive frames) before downstream publication. Occluded targets coast up to 5 cycles via pure kinematic propagation. An ASIL B health validity flag prevents ghost track actuation in safety-critical AEB and ACC controllers.
Interactive Automotive Radar MTT & EKF Research Notebook
Execute the end-to-end radar Multi-Target Tracking pipeline directly in the cloud. Run Monte Carlo simulations for 4 automotive radar validation scenarios: constant velocity tracking, 5-frame temporary sensor occlusion with dead-reckoning coasting, false-alarm clutter rejection via Chi-Square gating, and crossing targets with global Hungarian data association.
Single Target Constant Velocity & Innovation Monitoring
Validates unaccelerated 4-DOF motion (vx=20 m/s). Confirms rapid covariance matrix convergence within 3 cycles and bounds position RMSE < 0.18 m and velocity RMSE < 0.10 m/s.
Temporary Occlusion & Pure Kinematic Coasting
Simulates 5 consecutive dropped frames (occlusion at frames 25–29). The ASIL B FSM transitions to COASTED, propagating state via pure kinematics while inflating covariance until reacquisition.
Clutter Spikes, Ghost Suppression & Mahalanobis Gating
Injects high-density false-alarm radar clutter (10 clutter points/frame). Validates 3-DOF Chi-square confidence ellipsoids (dM² ≤ 12.84), rejecting 100% of clutter outliers.
Crossing Targets & Global Hungarian/Munkres Association
Evaluates two vehicles intersecting at 45° with overlapping spatial gates. The O(n·m²) Munkres algorithm resolves ambiguous cost matrices globally with zero track-swap errors.
# TC_TRK_01: Constant Velocity Tracking & Polar Innovation Verification
np.random.seed(42)
config = TrackerConfig(dt=0.040, sigma_r=0.25, sigma_theta=0.0087, sigma_vr=0.15)
tracker = RadarMTT(config)
true_x, true_y, true_vx, true_vy = 10.0, 2.0, 20.0, 0.0
for frame in range(100):
# Kinematic propagation
true_x += true_vx * config.dt
true_y += true_vy * config.dt
# Non-linear polar measurement with sensor noise
r_true = math.sqrt(true_x**2 + true_y**2)
theta_true = math.atan2(true_y, true_x)
vr_true = (true_x * true_vx + true_y * true_vy) / r_true
detection = Detection(
range_m=r_true + np.random.normal(0, config.sigma_r),
azimuth_rad=theta_true + np.random.normal(0, config.sigma_theta),
doppler_mps=vr_true + np.random.normal(0, config.sigma_vr)
)
# Predict, global Munkres association, and Joseph-stabilized EKF update
tracks = tracker.process_frame([detection], timestamp_ms=frame * 40)Pedagogical Guide to Automotive Radar Multi-Target Tracking
A complete LaTeX research monograph detailing the mathematical formulation of non-linear state propagation, continuous white-noise acceleration models, Chi-square spatial gating, Munkres assignment, and companion Python / Jupyter verification testbench (kalman repository).
Loading document viewer...
Architecture & Verification Metrics (SPEC-SW-RADAR-TRK-001)
- Standard Compliance
- ISO 26262 ASIL B design · MISRA C++:2008 guidelines · ASPICE SWE.4/SWE.6
- Cycle Budget & WCET
- 25 Hz nominal rate (40 ms cycle budget) · Worst-Case Execution Time < 0.15 ms
- Memory Architecture
- Zero heap allocation (no malloc/new) · Static fixed-size memory pools (MAX_TRACKS=64, MAX_DETECTIONS=128)
- State Vector & Model
- 4-DOF Cartesian state [x, y, vx, vy] · Continuous white noise acceleration (CWNA) model
- Linear Algebra Engine
- Header-only static matrix engine (Matrix.hpp) with closed-form 3×3 & 4×4 analytical inversions
- Interactive Visualizer
- Dear ImGui desktop application with native DirectX 11 / Win32 backend (main_gui.cpp)
- Python Companion Testbench
- Jupyter simulation testbench (radar_tracker_demo.ipynb) and automated Python validation suite
- C++ Acceptance Test Suite
- Automated test suite (test_tracker.cpp) verifying constant velocity, crossing targets, -8 m/s² braking, and clutter rejection
Dual-Repository Perception Framework
Together, kalman-cpp and kalman form a complete perception framework: kalman serves as the pedagogical research and mathematical proof environment (Python, Jupyter, and LaTeX monograph), while kalman-cpp provides the deterministic, zero-heap C++17 production engine for deployment in embedded automotive electronic control units (ECUs).
Engineering Discussion & Peer Comments0
Open peer review & revision-tracked technical discourse