RFbeam K-MD7 Radar Guide

RemoteRF supports the RFbeam K-MD7, a compact 24 GHz ISM-band (24.075 to 24.175 GHz) digital radar transceiver manufactured by RFbeam Microwave. Equipped with a 1 TX / 2 RX planar patch antenna array and an integrated radar signal processing unit using hybrid FMCW + FSK modulation, it measures target range, radial speed, azimuth angle of arrival, and signal magnitude, outputting up to 16 raw peak detections (PDAT) and up to 8 tracked targets (TDAT) per frame. This guide covers how to initialize, configure, and capture target detections and tracks with a reserved RFbeam K-MD7 through RemoteRF using Python.

The RFbeam K-MD7 24 GHz digital radar evaluation kit (K-MD7-EVAL).
The RFbeam K-MD7 24 GHz digital radar evaluation kit (K-MD7-EVAL).

Device Initialization

To interface with an RFbeam K-MD7 radar through RemoteRF, call ensure_driver to make sure the local driver is up to date, import RFBeamKMD7 from remoterf.drivers.rfbeam_kmd7, and initialize a radar object with either your reserved device handle (e.g., "K-MD7_Radar@ucla" while logged in with remoterf --login) or the reservation token issued by resdev:

from remoterf.drivers import ensure_driver
ensure_driver(token="K-MD7_Radar@ucla")

from remoterf.drivers.rfbeam_kmd7 import RFBeamKMD7
radar = RFBeamKMD7(token="K-MD7_Radar@ucla") # device handle or reservation token

Once initialized, the radar object provides direct access to K-MD7 parameters, parsed 2D point clouds (PDAT), and multi-target Kalman tracks (TDAT) without requiring manual binary unpacking on the client.

Example Script

The Python script below demonstrates how to configure an RFbeam K-MD7 radar and capture target detections with it via the RemoteRF platform. In this example, the script queries the radar’s firmware version and parameter table, configures indoor sensing and threshold offset, captures parsed raw detections (raw) and tracked targets (tracked) via radar.capture_point_cloud(), and plots a top-down Cartesian radar view.

Note that the device initialization lines described above have already been included in the code below. You should not need to change any of the code below except for the device handle or token for your reservation.

import numpy as np
import matplotlib.pyplot as plt
from remoterf.drivers import ensure_driver

# -------------------------------------------------------
# 1. Connect to Reserved RFbeam K-MD7 Radar
# -------------------------------------------------------
TOKEN = "K-MD7_Radar@ucla"
ensure_driver(token=TOKEN)

from remoterf.drivers.rfbeam_kmd7 import RFBeamKMD7

radar = RFBeamKMD7(token=TOKEN)

print(f"Connected to K-MD7 firmware: {radar.firmware_version}")

# -------------------------------------------------------
# 2. Configure Radar Mode & Sensitivity
# -------------------------------------------------------
radar.configure(mode="indoor", threshold_offset=10)
radar.flush_frames()
radar.start()

# -------------------------------------------------------
# 3. Capture Parsed Point Cloud (Raw PDAT & Tracked TDAT)
# -------------------------------------------------------
pdat_xs, pdat_ys, pdat_mags = [], [], []
tdat_xs, tdat_ys = [], []

for frame_idx in range(25):
    cloud = radar.capture_point_cloud(timeout=1.0)
    raw = cloud["raw"]
    trk = cloud["tracked"]

    if cloud["num_raw_points"] > 0:
        pdat_xs.extend(np.asarray(raw["x"]).tolist())
        pdat_ys.extend(np.asarray(raw["y"]).tolist())
        pdat_mags.extend(np.asarray(raw["magnitude"]).tolist())

    if cloud["num_tracked_targets"] > 0:
        tdat_xs.extend(np.asarray(trk["x"]).tolist())
        tdat_ys.extend(np.asarray(trk["y"]).tolist())

    print(
        f"Frame {frame_idx + 1:2d}: "
        f"{cloud['num_raw_points']:2d} raw detections (PDAT), "
        f"{cloud['num_tracked_targets']:2d} tracks (TDAT)"
    )

radar.stop()
radar.close()

# -------------------------------------------------------
# 4. Plot Cartesian Point Cloud & Field-of-View Cone
# -------------------------------------------------------
fig, ax = plt.subplots(figsize=(7, 6))
fov_rad = np.deg2rad(17.0)  # +/-17 deg (34 deg 3dB azimuth beamwidth)
max_r = 5.5
ax.plot([0, -max_r * np.sin(fov_rad)], [0, max_r * np.cos(fov_rad)], "k--", alpha=0.35, label="34 deg FOV")
ax.plot([0, max_r * np.sin(fov_rad)], [0, max_r * np.cos(fov_rad)], "k--", alpha=0.35)

if pdat_xs:
    sc = ax.scatter(pdat_xs, pdat_ys, c=pdat_mags, cmap="viridis", s=36, alpha=0.8, label="Raw Detections (PDAT)")
    plt.colorbar(sc, ax=ax, label="Magnitude (dB)")
if tdat_xs:
    ax.scatter(tdat_xs, tdat_ys, c="red", marker="x", s=80, linewidths=2, label="Tracked Targets (TDAT)")

ax.plot(0, 0, "r^", markersize=10, label="K-MD7 Radar")
ax.set_title("RFbeam K-MD7 24 GHz Point Cloud")
ax.set_xlabel("Cross-Range X (m)")
ax.set_ylabel("Boresight Range Y (m)")
ax.set_xlim(-3.5, 3.5)
ax.set_ylim(0.0, max_r)
ax.set_aspect("equal")
ax.grid(True, alpha=0.3)
ax.legend(loc="upper right")
plt.tight_layout()
plt.savefig("rfbeam_kmd7_point_cloud.png", dpi=150)
plt.show()

Properties and Methods

Properties

The properties below read and configure firmware, streaming, and parameter state on the RFBeamKMD7 radar transceiver.

Property Type Access Description & Range
is_running bool R/O True when the radar is actively streaming detection frames.
device_info dict R/O Hardware identity and connection metadata including model, carrier_kit, port, baudrate, firmware_version, and is_connected.
firmware_version str R/O Radar processor firmware identification string (e.g., 'K-MD7_APP-RFB-0205').
stream_stats dict R/O Streaming throughput metrics including total_frames, dropped_frames, total_bytes_read, current_fps, and is_streaming.
radar_parameters dict R/O Parsed RPST radar parameter dictionary containing firmware version, frequency channel, speed/range settings, threshold offset, tracking filter, zone boundaries, and direction filter.
mode str R/W Active operating mode preset: 'indoor' (pedestrian/gesture sensing) or 'traffic' (vehicle tracking).
max_range float R/W Maximum detection range in meters (100, 200, or 300 m).
max_speed float R/W Maximum measurable speed in km/h (50, 100, or 200 km/h).
threshold_offset int R/W Detection threshold offset (THOF) in dB from 0 (highest sensitivity) to 60 (lowest sensitivity).
tracking_filter int R/W Target tracker filter type (TFIL): 0 = Standard, 1 = Fast detection, 2 = Long visibility.
min_speed_filter int R/W Minimum detection speed filter (MSPF) as a percentage of the speed setting (0–100%).
direction_filter int R/W Motion direction filter (DIRF): 0 = Receding, 1 = Approaching, 2 = Both.

Methods

The methods below capture parsed 2D point clouds and tracked targets, and control K-MD7 configuration and streaming.

Method Returns Description
capture_point_cloud(timeout=1.0) dict Captures one frame and returns structured 1D NumPy arrays for both raw (PDAT) and tracked (TDAT) detections: {'frame_number', 'timestamp', 'num_raw_points', 'num_tracked_targets', 'raw': {'x', 'y', 'distance', 'speed', 'angle', 'magnitude'}, 'tracked': {'id', 'x', 'y', 'distance', 'speed', 'angle', 'magnitude'}}.
capture_points(timeout=1.0, *, include_raw=True, include_tracked=True) np.ndarray (float32) Captures one frame and returns a 2D (N, 6) NumPy array with columns [x, y, distance, speed, angle, magnitude].
capture_targets(timeout=1.0) list[dict] Captures active tracked targets (TDAT), where each dict contains id, distance_m, speed_kmh, speed_mps, angle_deg, x_m, y_m, power_db, and motion ('approaching', 'receding', or 'stationary').
configure(mode='indoor', *, max_range=None, max_speed=None, threshold_offset=None, tracking_filter=None, min_speed_filter=None) dict Applies high-level operating mode and optional filter parameters in one call, returning the updated radar_parameters dict.
read_frame(timeout=1.0) dict Reads the next synchronized radar frame summary ({'frame_number', 'timestamp', 'raw_count', 'tracked_count'}).
restore_factory_settings() bool Resets all K-MD7 parameters to factory defaults.
flush_frames() bool Flushes buffered serial packets so the next capture returns the freshest frame.
start() / stop() bool Starts or stops continuous radar frame streaming.
close() None Closes the client RPC session.

Tips and Tricks

1. Tuning Sensitivity and Filters at Runtime

You can adjust K-MD7 detection parameters directly via properties or radar.configure(...):

Property Values Description
radar.mode 'indoor', 'traffic' High-level profile for close-range pedestrian/gesture sensing vs. long-range vehicle tracking
radar.max_range 100, 200, 300 Maximum detection range setting in meters
radar.max_speed 50, 100, 200 Maximum measurable radial speed setting in km/h
radar.threshold_offset 0..60 Detection threshold offset in dB (10–15 dB is ideal for indoor people/hands)
radar.tracking_filter 0..2 Tracker filter type: 0 = Standard, 1 = Fast detection, 2 = Long visibility
radar.direction_filter 0..2 Direction filter: 0 = Receding, 1 = Approaching, 2 = Both

2. Raw Detections (raw) vs. Tracked Targets (tracked)

  • cloud["raw"] (PDAT): Up to 16 raw CFAR peak detections per sweep before temporal tracking. Best for dense point-cloud accumulation and micro-motion sensing.
  • cloud["tracked"] / radar.capture_targets() (TDAT): Up to 8 Kalman-filtered target trajectories with persistent tracking IDs and smoothed range, speed, and azimuth. Best for counting and tracking walking pedestrians or vehicles.