Radar Models API¶
Radar equation and detection probability calculations.
Overview¶
from phased_array_systems.models.radar import (
RadarModel,
compute_detection_threshold,
compute_pd_from_snr,
compute_snr_for_pd,
albersheim_snr,
coherent_integration_gain,
noncoherent_integration_gain,
integration_loss,
)
Classes¶
RadarModel
¶
Radar range equation calculator.
Implements the monostatic radar range equation:
P_r = (P_t * G^2 * λ^2 * σ) / ((4π)^3 * R^4 * L_sys)
Or in dB form
SNR = P_t + 2G + 2λ_dB + σ_dBsm - 4*R_dB - L_sys - (4π)^3_dB - N_dB
Where
P_t = Peak transmit power (W) G = Antenna gain (same for Tx/Rx in monostatic) λ = Wavelength (m) σ = Target radar cross section (m^2) R = Range to target (m) L_sys = System losses N = Noise power = kTB
| ATTRIBUTE | DESCRIPTION |
|---|---|
name |
Model block name for identification
TYPE:
|
evaluate
¶
evaluate(arch: Architecture, scenario: RadarDetectionScenario, context: dict[str, Any]) -> MetricsDict
Evaluate radar detection performance.
| PARAMETER | DESCRIPTION |
|---|---|
arch
|
Architecture configuration
TYPE:
|
scenario
|
Radar detection scenario
TYPE:
|
context
|
Additional context (may include antenna metrics): - g_peak_db: Antenna gain (uses this if provided) - scan_loss_db: Scan loss (uses this if provided)
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
MetricsDict
|
Dictionary with radar metrics: - peak_power_w: Peak transmit power (W) - peak_power_dbw: Peak transmit power (dBW) - g_ant_db: Antenna gain (dB) - wavelength_m: Wavelength (m) - target_rcs_dbsm: Target RCS (dBsm) - target_rcs_m2: Target RCS (m^2) - range_m: Target range (m) - noise_power_dbw: Noise power (dBW) - snr_single_pulse_db: Single-pulse SNR (dB) - integration_gain_db: Integration gain (dB) - snr_integrated_db: Integrated SNR (dB) - snr_required_db: Required SNR for Pd/Pfa (dB) - snr_margin_db: SNR margin (dB) - pd_achieved: Achieved probability of detection - detection_range_m: Max detection range for required Pd (m) |
Source code in src/phased_array_systems/models/radar/equation.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |
Functions¶
compute_snr_for_pd
¶
compute_snr_for_pd(pd: float, pfa: float, swerling: SwerlingModel = 0, n_pulses: int = 1, integration: Literal['coherent', 'noncoherent'] = 'noncoherent') -> float
Compute required SNR for given Pd and Pfa.
Inverse of compute_pd_from_snr using numerical root finding.
| PARAMETER | DESCRIPTION |
|---|---|
pd
|
Required probability of detection (0 < pd < 1)
TYPE:
|
pfa
|
Probability of false alarm (0 < pfa < 1)
TYPE:
|
swerling
|
Swerling target model (0-4)
TYPE:
|
n_pulses
|
Number of pulses integrated
TYPE:
|
integration
|
Integration type
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Required single-pulse SNR in dB |
Source code in src/phased_array_systems/models/radar/detection.py
compute_pd_from_snr
¶
compute_pd_from_snr(snr_db: float, pfa: float, swerling: SwerlingModel = 0, n_pulses: int = 1, integration: Literal['coherent', 'noncoherent'] = 'noncoherent') -> float
Compute probability of detection for given SNR.
Uses Marcum Q-function for Swerling 0 (non-fluctuating) targets.
| PARAMETER | DESCRIPTION |
|---|---|
snr_db
|
Signal-to-noise ratio per pulse (dB)
TYPE:
|
pfa
|
Probability of false alarm
TYPE:
|
swerling
|
Swerling target model (0 = non-fluctuating)
TYPE:
|
n_pulses
|
Number of pulses integrated
TYPE:
|
integration
|
Integration type ("coherent" or "noncoherent")
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Probability of detection (0-1) |
Source code in src/phased_array_systems/models/radar/detection.py
albersheim_snr
¶
Albersheim's equation for required SNR (Swerling 0).
Empirical approximation valid for: - 0.1 <= Pd <= 0.99 - 1e-9 <= Pfa <= 1e-3 - 1 <= n_pulses <= 8096
| PARAMETER | DESCRIPTION |
|---|---|
pd
|
Probability of detection
TYPE:
|
pfa
|
Probability of false alarm
TYPE:
|
n_pulses
|
Number of pulses (non-coherent integration)
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Required single-pulse SNR in dB |
Source code in src/phased_array_systems/models/radar/detection.py
coherent_integration_gain
¶
Coherent integration gain in dB.
Coherent integration (phase-preserving) provides full N-times improvement in SNR because signals add coherently while noise adds incoherently.
| PARAMETER | DESCRIPTION |
|---|---|
n_pulses
|
Number of pulses integrated (must be >= 1)
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Integration gain in dB: 10 * log10(n_pulses) |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If n_pulses < 1 |
Source code in src/phased_array_systems/models/radar/integration.py
noncoherent_integration_gain
¶
Non-coherent integration gain in dB.
Non-coherent integration (magnitude-only) provides less than full N-times gain because both signal and noise magnitudes are combined. The efficiency depends on SNR and Pd/Pfa.
Uses empirical approximation: gain ≈ 10 * log10(n^efficiency) where efficiency ≈ 0.8 for typical radar parameters.
| PARAMETER | DESCRIPTION |
|---|---|
n_pulses
|
Number of pulses integrated (must be >= 1)
TYPE:
|
pd
|
Probability of detection (affects efficiency)
TYPE:
|
pfa
|
Probability of false alarm (affects efficiency)
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Integration gain in dB (always <= coherent gain) |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If n_pulses < 1 |
Source code in src/phased_array_systems/models/radar/integration.py
Output Metrics¶
| Metric | Units | Description |
|---|---|---|
snr_single_pulse_db |
dB | Single-pulse SNR |
snr_integrated_db |
dB | SNR after integration |
snr_required_db |
dB | Required SNR for Pd/Pfa |
snr_margin_db |
dB | Margin above required |
detection_range_m |
m | Maximum detection range |
integration_gain_db |
dB | Gain from pulse integration |
Usage Examples¶
Using RadarModel¶
from phased_array_systems.models.radar import RadarModel
from phased_array_systems.scenarios import RadarDetectionScenario
scenario = RadarDetectionScenario(
freq_hz=10e9,
target_rcs_m2=1.0,
range_m=100e3,
required_pd=0.9,
pfa=1e-6,
pulse_width_s=10e-6,
prf_hz=1000,
n_pulses=10,
integration_type="coherent",
swerling_model=1,
)
model = RadarModel()
metrics = model.evaluate(arch, scenario, context={})
print(f"Single-Pulse SNR: {metrics['snr_single_pulse_db']:.1f} dB")
print(f"Integrated SNR: {metrics['snr_integrated_db']:.1f} dB")
print(f"SNR Margin: {metrics['snr_margin_db']:.1f} dB")
Computing Required SNR¶
from phased_array_systems.models.radar import compute_snr_for_pd
snr_req = compute_snr_for_pd(
pd=0.9,
pfa=1e-6,
swerling_model=1,
)
print(f"Required SNR: {snr_req:.1f} dB")
Computing Detection Probability¶
from phased_array_systems.models.radar import compute_pd_from_snr
pd = compute_pd_from_snr(
snr_db=15.0,
pfa=1e-6,
swerling_model=1,
)
print(f"Detection Probability: {pd:.3f}")
Integration Gain¶
from phased_array_systems.models.radar import coherent_integration_gain, noncoherent_integration_gain
# Coherent integration
gain_coherent = coherent_integration_gain(n_pulses=16)
print(f"Coherent Gain: {gain_coherent:.1f} dB") # 12.0 dB
# Non-coherent integration
gain_noncoherent = noncoherent_integration_gain(n_pulses=16)
print(f"Non-coherent Gain: {gain_noncoherent:.1f} dB") # ~6.0 dB
Radar Range Equation¶
Where:
- \(P_t\) = Peak transmit power (W)
- \(G\) = Antenna gain (linear)
- \(\lambda\) = Wavelength (m)
- \(\sigma\) = Target RCS (m²)
- \(R\) = Target range (m)
- \(k\) = Boltzmann constant
- \(T_s\) = System noise temperature (K)
- \(B_n\) = Noise bandwidth (Hz)
- \(L_s\) = System losses (linear)
Swerling Models¶
| Model | Decorrelation | |
|---|---|---|
| 0 | Constant | None |
| 1 | Rayleigh | Scan-to-scan |
| 2 | Rayleigh | Pulse-to-pulse |
| 3 | Chi-squared (4 DOF) | Scan-to-scan |
| 4 | Chi-squared (4 DOF) | Pulse-to-pulse |