comnum.TdlChannel#

class comnum.TdlChannel(profile, fs, *, doppler_hz=0.0, n_rx=1, n_tx=1, delay_spread_s=None)#

A tapped-delay-line multipath channel with Clarke/Jakes Doppler (sum of sinusoids of Zheng & Xiao 2003), SISO or MIMO: every tap is Rayleigh with its power, the delays are rounded to the sampling grid and the powers normalised. The first tap of TDL-D, TDL-E and TDLD30 is Ricean: a specular component of Doppler shift 0.7 doppler_hz is added (TR 38.901 §7.7.2).

Parameters:
  • profile (str | array_like) – a profile name (see power_delay_profile) or taps (n_taps, 2) of (delay in s, power in dB).

  • delay_spread_s (float | None) – the RMS delay spread of TDL-A to TDL-E (s), 100 ns by default.

  • fs (float) – sampling rate (Hz).

  • doppler_hz (float) – maximum Doppler shift (Hz), 0 for a static realisation.

  • n_rx (int) – receive antennas.

  • n_tx (int) – transmit antennas.

Raises:

ValueError – for an invalid parameter or input (the message names it).

Examples

>>> import comnum, numpy as np
>>> ch = comnum.TdlChannel("eva", 15.36e6)
>>> y, taps = ch.fade(np.ones(64), comnum.Rng(1))
>>> y.shape, int(taps.delays[-1])
((64,), 39)
fade(x, rng)#

Apply the channel.

Parameters:
  • x (array_like) – the transmitted streams, (n,) for one transmit antenna or (n_tx, n).

  • rng (Rng) – the generator of the realisation.

Returns:

the received streams ((n,) or (n_rx, n)) and the taps of the realisation.

Return type:

tuple[numpy.ndarray, ChannelTaps]

Raises:

ValueError – for an invalid parameter or input (the message names it).

delays#

Delays of the taps (samples, int64).

Type:

numpy.ndarray

n_rx#

Receive antennas.

Type:

int

n_tx#

Transmit antennas.

Type:

int

powers#

Normalised powers of the Rayleigh part of the taps (unit sum with specular, float64).

Type:

numpy.ndarray

specular#

the index of its tap in delays and its normalised power (None for Rayleigh taps only).

Type:

tuple[int, float] | None

Type:

The specular component of a Ricean first tap