pytwinnet.physics.fading¶
Classes
|
Wraps a base model and adds small-scale fading (Rayleigh or Rician) as an extra dB term: PL_faded = PL + fading_loss_db where fading_loss_db = -10*log10(|h|^2). Fading is deterministic per (tx, rx, epoch). Change 'epoch' to re-sample. |
|
Wraps a base propagation model and adds log-normal shadowing (Gaussian in dB). |
- class pytwinnet.physics.fading.FadedModel(base, kind='rayleigh', K_dB=6.0, seed=0, epoch=None)[source]¶
Bases:
PropagationModelWraps a base model and adds small-scale fading (Rayleigh or Rician) as an extra dB term: PL_faded = PL + fading_loss_db where fading_loss_db = -10*log10(|h|^2). Fading is deterministic per (tx, rx, epoch). Change ‘epoch’ to re-sample.
- Parameters:
base (PropagationModel)
kind (str)
K_dB (float)
seed (int)
epoch (int | None)
-
base:
PropagationModel¶
- calculate_path_loss(tx, rx, environment)[source]¶
- Return type:
- Parameters:
tx (WirelessNode)
rx (WirelessNode)
environment (Environment)
- class pytwinnet.physics.fading.ShadowedModel(base, sigma_db=6.0, seed=0, epoch=None)[source]¶
Bases:
PropagationModelWraps a base propagation model and adds log-normal shadowing (Gaussian in dB). Shadowing is deterministic per (tx, rx, epoch) for reproducibility. Change ‘epoch’ (int) to refresh the samples (e.g., per-drop or per-time-slot).
- Parameters:
base (PropagationModel)
sigma_db (float)
seed (int)
epoch (int | None)
-
base:
PropagationModel¶
- calculate_path_loss(tx, rx, environment)[source]¶
- Return type:
- Parameters:
tx (WirelessNode)
rx (WirelessNode)
environment (Environment)