Browse Source

feat(radar): recalibrate visualization engine for high-fidelity diagnostics

Restores sharp target peaks and improves signal clarity in Shenron radar outputs
by optimizing windowing functions and disabling smoothing-heavy interpolation.

- radar_processor.py: Switched windowing from Hann to Blackman-Harris for range
  and velocity processing to achieve deeper sidelobe rejection (-92 dB) and
  suppress horizontal artifacts.
- test_shenron.py: Replaced 'bicubic' interpolation with 'nearest' for Range-Doppler
  (RD) and CFAR maps to restore diagnostic clarity and prevent target blurring.
- config.yaml: Removed hardcoded RD plot limits (xRange/yRange) to ensure the
  renderer utilizes the true physical axis (e.g., ±26.8 m/s) derived from hardware specs.
- Added technical comments explaining the trade-off between main-lobe width and
  dynamic range in the new DSP windowing.
Shenron
RUSHIL AMBARISH KADU 2 weeks ago
parent
commit
05f9d181e1
  1. 5
      scripts/ISOLATE/sim_radar_utils/config.yaml
  2. 7
      scripts/ISOLATE/sim_radar_utils/radar_processor.py
  3. 4
      scripts/test_shenron.py

5
scripts/ISOLATE/sim_radar_utils/config.yaml

@ -69,8 +69,9 @@ Visualize:
xUnit: "m" xUnit: "m"
yLabel: "Velocity" yLabel: "Velocity"
yUnit: "m/s" yUnit: "m/s"
xRange: [-8, 8] # Doppler Velocity limits [m/s]
yRange: [0, 120] # Range limits [m]
# xRange and yRange deliberately NOT set here — the renderer uses the true
# physical Doppler axis (±26.8 m/s for AWRL1432) computed from chirp_rep.
# DO NOT add xRange overrides without resetting the axis in test_shenron.py.
winSize: [500, 400] winSize: [500, 400]
pos: [600, 50] pos: [600, 50]
radarPCD: radarPCD:

7
scripts/ISOLATE/sim_radar_utils/radar_processor.py

@ -22,10 +22,13 @@ cfarCfg = config['CFAR']
class RadarProcessor: class RadarProcessor:
def __init__(self): def __init__(self):
# radar data will be shaped as (# of chirp, # of sample, # of antenna) # radar data will be shaped as (# of chirp, # of sample, # of antenna)
self.rangeWin = np.tile(signal.windows.hann(radarCfg['N']), (radarCfg['Np'], radarCfg['NrChn'], 1))
# Blackman-Harris window: Deepest sidelobe rejection (-92 dB).
# Used to suppress the horizontal "astigmatism" sidelobe lines at the
# cost of a broader main-lobe (slightly less range resolution).
self.rangeWin = np.tile(signal.windows.blackmanharris(radarCfg['N']), (radarCfg['Np'], radarCfg['NrChn'], 1))
self.rangeWin = np.transpose(self.rangeWin, (2, 0, 1)) self.rangeWin = np.transpose(self.rangeWin, (2, 0, 1))
self.velWin = np.tile(signal.windows.hann(radarCfg['Np']), (radarCfg['N'], radarCfg['NrChn'], 1))
self.velWin = np.tile(signal.windows.blackmanharris(radarCfg['Np']), (radarCfg['N'], radarCfg['NrChn'], 1))
self.velWin = np.transpose(self.velWin, (0, 2, 1)) self.velWin = np.transpose(self.velWin, (0, 2, 1))
rangeRes = fftCfg['c0'] / (2*(radarCfg['fStop'] - radarCfg['fStrt'])) rangeRes = fftCfg['c0'] / (2*(radarCfg['fStop'] - radarCfg['fStrt']))

4
scripts/test_shenron.py

@ -307,8 +307,8 @@ def run_testbench(iter_name):
display_limit_cfg = 120.0 display_limit_cfg = 120.0
render_engines[r_type] = { render_engines[r_type] = {
'rd': FastHeatmapEngine(extent=[-max_vel_cfg, max_vel_cfg, 0, max_r_cfg], cmap='viridis', title=f'{r_type.upper()} Range-Doppler', xlabel='Doppler Velocity [m/s]', ylabel='Range [m]', ylim=[0, 120], interpolation='bicubic'),
'cfar': FastHeatmapEngine(extent=[-max_vel_cfg, max_vel_cfg, 0, max_r_cfg], cmap='plasma', title=f'{r_type.upper()} CFAR Noise Threshold', xlabel='Doppler Velocity [m/s]', ylabel='Range [m]', ylim=[0, 120], interpolation='bicubic'),
'rd': FastHeatmapEngine(extent=[-max_vel_cfg, max_vel_cfg, 0, max_r_cfg], cmap='viridis', title=f'{r_type.upper()} Range-Doppler', xlabel='Doppler Velocity [m/s]', ylabel='Range [m]', ylim=[0, 120], interpolation='nearest'),
'cfar': FastHeatmapEngine(extent=[-max_vel_cfg, max_vel_cfg, 0, max_r_cfg], cmap='plasma', title=f'{r_type.upper()} CFAR Noise Threshold', xlabel='Doppler Velocity [m/s]', ylabel='Range [m]', ylim=[0, 120], interpolation='nearest'),
'ra_static': FastHeatmapEngine(extent=[-display_limit_cfg, display_limit_cfg, 0, display_limit_cfg], cmap='jet', vmin=-5, vmax=55, title=f'{r_type.upper()} Range-Azimuth (Absolute)', xlabel='Lateral distance [m]', ylabel='Longitudinal distance [m]', aspect='equal'), 'ra_static': FastHeatmapEngine(extent=[-display_limit_cfg, display_limit_cfg, 0, display_limit_cfg], cmap='jet', vmin=-5, vmax=55, title=f'{r_type.upper()} Range-Azimuth (Absolute)', xlabel='Lateral distance [m]', ylabel='Longitudinal distance [m]', aspect='equal'),
'ra_dyn': FastHeatmapEngine(extent=[-display_limit_cfg, display_limit_cfg, 0, display_limit_cfg], cmap='jet', title=f'{r_type.upper()} Range-Azimuth (Dynamic)', xlabel='Lateral distance [m]', ylabel='Longitudinal distance [m]', aspect='equal') 'ra_dyn': FastHeatmapEngine(extent=[-display_limit_cfg, display_limit_cfg, 0, display_limit_cfg], cmap='jet', title=f'{r_type.upper()} Range-Azimuth (Dynamic)', xlabel='Lateral distance [m]', ylabel='Longitudinal distance [m]', aspect='equal')
} }

Loading…
Cancel
Save