Exercises
ex01-mf-derivation
Easy(a) Starting from the forward model with , derive the matched filter estimator by maximizing the per-pixel SNR.
(b) Show that (biased estimator).
(c) Compute the covariance of the filtered noise: .
(d) For colored noise with covariance , derive the whitened matched filter: .
Use the Cauchy-Schwarz inequality for SNR maximization.
For part (d), whiten the data first: .
Per-pixel SNR
For pixel with linear estimator :
By Cauchy-Schwarz: , with equality for .
Bias computation
.
Noise covariance
.
Whitened MF
After whitening, , and the MF becomes .
ex02-das-implementation
EasyImplement DAS beamforming for a monostatic radar with elements (ULA, ) and frequencies (9 to 11 GHz).
(a) Generate measurements for 3 point targets at ranges 3, 4, 5 m and angles . SNR dB.
(b) Implement DAS on a grid (range: 2--6 m, angle: to ).
(c) Plot the DAS image and measure the mainlobe widths. Compare with the theoretical and .
(d) Add Hamming windowing. How do the sidelobes and mainlobe widths change?
DAS in the frequency domain is a sum of weighted complex exponentials.
The theoretical resolution is cm.
Sensing matrix
for monostatic configuration.
DAS computation
.
Resolution measurement
The dB mainlobe width in range should be approximately cm. Cross-range depends on the range: .
Windowing
Hamming window reduces sidelobes from dB to approximately dB while broadening the mainlobe by a factor of .
ex03-psf-analysis
EasyCompute and compare the PSF for three array geometries, all with total virtual elements and frequencies at 10 GHz:
(a) ULA: 32 elements with spacing.
(b) Sparse random array: 32 elements randomly placed in an aperture of .
(c) MIMO virtual array: , with -spaced RX and -spaced TX.
For each, plot the 2D PSF, measure mainlobe width and peak sidelobe level.
The MIMO virtual array creates a filled aperture with virtual elements.
PSF computation
For each geometry, compute and extract the row corresponding to the center pixel. The 2D PSF is this row reshaped to the scene grid.
Comparison
- ULA: compact aperture, clean sidelobes, limited resolution.
- Random: large aperture (), high resolution, elevated sidelobes due to gaps.
- MIMO: filled virtual aperture, best resolution-sidelobe tradeoff.
ex04-backprojection-sar
MediumSimulate a stripmap SAR scenario:
- Platform velocity: m/s.
- Carrier frequency: GHz, bandwidth MHz.
- slow-time pulses, PRF kHz.
- Scene: grid at 5 km range.
(a) Implement the range-Doppler algorithm (FFT-based).
(b) Implement the time-domain backpropagation algorithm.
(c) Compare the images for 5 point targets.
(d) Add a curved flight path (circular arc, 50 km radius). Show that backpropagation handles it correctly while range-Doppler produces defocused images.
Range-Doppler uses 2D FFT; backpropagation uses a double loop over pixels and pulses.
Range-Doppler
Apply range FFT (fast-time), then azimuth FFT (slow-time) after range cell migration correction. Complexity: .
Backpropagation
For each pixel and pulse : . Complexity: .
Curved path
Range-Doppler assumes a straight flight path for RCMC. The curved path violates this assumption, causing defocus. Backpropagation uses exact geometry, producing sharp images regardless of the flight path.
ex05-fbp-ramp-filter
MediumImplement filtered backpropagation for a circular aperture:
(a) Generate k-space data for a scene with 5 point targets, using angles and frequencies ( GHz, GHz).
(b) Implement plain backpropagation and compute the PSF for a central point scatterer.
(c) Implement the Ram-Lak filter: apply weighting in the frequency domain before backprojection.
(d) Compare the PSFs and measure the mainlobe widths.
(e) Implement the Hamming-windowed ramp filter. How does it affect the noise level vs. the Ram-Lak filter?
In polar k-space, the density compensation is proportional to the radial wavenumber.
k-space sampling
At angle and frequency : .
Plain BP PSF
The PSF shows low-frequency bias: a broad, smooth peak without sharp edges.
Ram-Lak filtered PSF
After weighting by (proportional to ), the PSF becomes a sharper sinc-like function with well-defined mainlobe.
Hamming comparison
Hamming windowing reduces the noise amplification at high frequencies, improving image quality at low SNR, while broadening the mainlobe by approximately 30%.
ex06-capon-imaging
Medium(a) Generate a radar scene with 4 scatterers: two separated by (sub-resolution) and two at spacing. , , SNR dB.
(b) Compute the Capon image using the sample covariance from snapshots.
(c) Compare the Capon and DAS images. Can Capon resolve the sub-resolution pair?
(d) Reduce to (single snapshot). Apply diagonal loading () and compare.
With , the sample covariance is singular; diagonal loading is essential.
Capon spectrum
.
Resolution comparison
With : Capon resolves the pair; DAS shows a merged peak.
Single snapshot
With and diagonal loading: Capon partially resolves the pair but with degraded peak-to-sidelobe ratio compared to .
ex07-music-imaging
Medium(a) Generate a 1D scene with scatterers using a 16-element ULA. Estimate the covariance from snapshots.
(b) Apply MUSIC: eigendecompose , identify the noise subspace, and compute the pseudospectrum.
(c) Compare the MUSIC spectrum with the DAS power spectrum.
(d) Vary the assumed model order from to . How does MUSIC performance change?
MUSIC requires ; use MDL or AIC for model-order estimation.
Eigendecomposition
Eigendecompose : the largest eigenvalues correspond to the signal subspace; the remaining to the noise subspace.
MUSIC pseudospectrum
shows sharp peaks at the 5 scatterer angles.
Model-order sensitivity
Underestimating (): some scatterers are not detected. Overestimating (): spurious peaks appear. MUSIC is sensitive to model-order selection.
ex08-dynamic-range
HardSystematically study the resolution--dynamic range tradeoff:
(a) Generate a scene with 2 scatterers separated by distance with amplitude ratio .
(b) For separations and amplitude ratios , compute: (i) MF image, (ii) Capon image, (iii) LASSO image.
(c) For each method, determine whether the weak scatterer is detected (peak above background).
(d) Plot the detection boundary in the plane.
MF fails when sidelobes from the strong target mask the weak one.
LASSO dramatically extends the detection boundary at high amplitude ratios.
Setup
Use measurements, frequencies, SNR dB. Two scatterers with and .
Detection criterion
Scatterer 2 is detected if the image value at its true location exceeds the local background (sidelobe level) by .
Detection boundary
MF: detection fails for at any separation. LASSO: detection succeeds for up to when .
ex09-mf-gradient-step
HardShow how the matched filter connects to iterative optimization:
(a) Write the least-squares cost . Compute and verify that .
(b) Implement gradient descent from for 100 iterations. Show that the image converges to (pseudoinverse).
(c) Add regularization: implement one step of ISTA starting from the MF image. Compare with the pure MF image.
Optimal step size is where are the singular values of .
Gradient
. At : .
Gradient descent
. First iteration: -- scaled MF.
ISTA step
One ISTA step from MF: , which soft-thresholds the MF image, zeroing weak pixels and shrinking the sidelobe artifacts.
ex10-kspace-coverage
MediumFor a multi-static radar with transmitters at positions m, m, and receivers at positions m (), operating at frequencies 9--11 GHz:
(a) Plot the k-space coverage (all Tx-Rx-frequency triples).
(b) Identify the k-space extent and predict the range and cross-range resolution.
(c) Compute the backpropagation PSF and verify your resolution prediction.
(d) Is the k-space coverage uniform? If not, design density compensation weights for filtered backpropagation.
Each (Tx , Rx , frequency ) maps to .
k-space computation
For monostatic assumption in 2D (targets in the far field): where is the unit direction.
Resolution prediction
k-space extent: radial , giving cm. Angular extent depends on the maximum baseline.
Density compensation
Use Voronoi tessellation of the k-space points. Each weight is the area of the Voronoi cell around point , normalized by the average cell area.
ex11-nufft-fbp
HardImplement filtered backpropagation using the NUFFT:
(a) For a non-uniform k-space sampling pattern (multistatic radar), compute the density compensation factors via Voronoi tessellation.
(b) Implement FBP using the direct summation .
(c) Implement FBP using the NUFFT (gridding + FFT).
(d) Compare the computation times and image quality for a grid.
Use the scipy.interpolate module for gridding, or install finufft.
Voronoi density
Use scipy.spatial.Voronoi to tessellate the 2D k-space points. area of cell / (total area / ).
Direct summation
Complexity: . For , : operations.
NUFFT implementation
Grid the weighted data onto a uniform grid using a Kaiser-Bessel kernel (width 6), apply 2D IFFT, and deapodize. Complexity: .
Comparison
NUFFT is approximately faster for . Image quality: NUFFT introduces interpolation error dB below the peak.
ex12-physical-vs-random
HardExperimentally verify the CommIT observation about physical vs. random sensing matrices:
(a) Generate a scene with 10 point scatterers. Compute for a MIMO radar (physical) and a random Gaussian matrix (same dimensions).
(b) Compute the Gram matrix for both. Visualize the off-diagonal structure.
(c) Compute the MF image for both and compare the sidelobe patterns.
(d) Train a simple 3-layer CNN to denoise the MF image (supervised, using 1000 training scenes). Compare the test-set NMSE for physical vs. random .
(e) Explain why the CNN performs better for random .
For random : (near-orthogonal columns).
The CNN struggles with physical because sidelobe artifacts are correlated with the true scene.
Gram matrix comparison
Random : is approximately with off-diagonal entries . Physical : has structured off-diagonal entries (sinc-like PSF).
MF image comparison
Random: MF image -- clean. Physical: MF image -- sidelobes everywhere.
CNN performance gap
CNN achieves NMSE dB for random but only dB for physical . The sidelobe artifacts are scene-dependent and cannot be learned as a fixed pattern.
ex13-apodization-design
MediumDesign an apodization window that achieves a target peak sidelobe level of dB with minimum mainlobe broadening:
(a) Implement the Dolph-Chebyshev window for 32 elements with dB sidelobes.
(b) Implement the Taylor window (, dB).
(c) Compare the PSFs (mainlobe width, sidelobe pattern, integrated sidelobe energy).
(d) Which window is better for RF imaging? Justify your choice.
Dolph-Chebyshev has constant sidelobes; Taylor has tapered sidelobes that may be preferable.
Dolph-Chebyshev
Use numpy or scipy to compute Dolph-Chebyshev weights. All sidelobes are exactly at dB (equiripple design).
Taylor window
Taylor window with zeros constrained to dB. Near-in sidelobes are at dB; far sidelobes decay.
Comparison
Taylor has slightly narrower mainlobe (by 5%) and lower integrated sidelobe energy due to the decaying far sidelobes. For imaging, Taylor is preferred because it minimizes total sidelobe energy (not just peak sidelobe).
ex14-complete-comparison
ChallengeBuild a comprehensive comparison of all imaging methods on a realistic indoor RF imaging scene:
(a) System: MIMO radar with , , 77 GHz, 4 GHz bandwidth, .
(b) Scene: Indoor scene with 5 strong scatterers (0 dB), 15 moderate ( dB), 10 weak ( dB). Grid: .
(c) Methods: MF, MF + Taylor window, Capon (, diagonal loading), MUSIC, FBP with Ram-Lak, LASSO (FISTA).
(d) Metrics: NMSE (dB), SSIM, detection probability (), computation time.
(e) Create a summary table and discuss which method gives the best tradeoff between quality and computation.
Use the Kronecker structure of for efficient FISTA iterations.
For Capon with , use heavy diagonal loading.
Setup
Generate the physical using the MIMO geometry and stepped-frequency model. Create 30 scatterers at random positions with the specified amplitudes.
Method comparison
Typical results (SNR dB):
| Method | NMSE (dB) | SSIM | (all) | Time (ms) |
|---|---|---|---|---|
| MF | 0.35 | 0.17 | 0.5 | |
| MF+Taylor | 0.42 | 0.23 | 0.6 | |
| Capon | 0.55 | 0.43 | 150 | |
| MUSIC | 0.48 | 0.50 | 80 | |
| FBP | 0.45 | 0.27 | 1.2 | |
| LASSO | 0.85 | 0.90 | 500 |
Conclusion
LASSO provides the best quality but at the highest cost. For real-time applications, MF+Taylor is the practical baseline. Capon offers a middle ground when multiple snapshots are available.
ex15-fbp-limited-angle
HardInvestigate filtered backpropagation under limited angular coverage:
(a) Simulate a scenario with only 60 degrees of angular coverage (instead of 360 degrees). Use angles, .
(b) Compute the k-space coverage and identify the missing region.
(c) Apply plain BP and FBP. Compare the images and discuss artifacts due to the missing k-space data.
(d) Show that the FBP density compensation factors become unstable near the edges of the k-space coverage.
(e) Propose a strategy to handle the limited-angle case (e.g., iterative reconstruction with TV regularization).
Limited angle creates a missing wedge in k-space, causing streaking artifacts in the image.
Missing k-space
With 60 degrees of coverage, the k-space has a missing wedge of 300 degrees. Information about features oriented perpendicular to the missing direction is lost.
FBP artifacts
FBP amplifies noise at the edges of the k-space coverage where the density is low. The image shows streaking artifacts along the direction perpendicular to the missing wedge.
Iterative alternative
TV-regularized reconstruction fills in the missing k-space data using the assumption of piecewise-constant reflectivity, significantly reducing streaking artifacts.