comnum.Wiener2d#

class comnum.Wiener2d(pilots, fd_ts, tau_df, noise_to_pilot, n_taps, doppler='uniform')#

The two-dimensional Wiener interpolator of pilots in time and frequency (Hoeher, Kaiser & Robertson 1997), for a WSSUS channel of uniform delay spectrum: every position is estimated from the n_taps nearest pilots (the weighted distance |dl| fd_ts + |dk| tau_df) by the linear MMSE filter of their eq. (9).

Parameters:
  • pilots (list[tuple[int, int]]) – the (symbol, subcarrier) positions of the pilots.

  • fd_ts (float) – the maximum Doppler over the symbol rate, f_D T_s.

  • tau_df (float) – the one-sided maximum delay over the useful duration, tau_max Delta F (delays uniform on [-tau_max, tau_max]).

  • noise_to_pilot (float) – the noise of the LS estimates, sigma^2 / E_p.

  • n_taps (int) – the pilots per position.

  • doppler (str) – "uniform" (their eq. (15)) or "jakes".

Raises:

ValueError – without pilots, for no tap or more taps than pilots, a negative noise or Doppler, or an unknown Doppler spectrum.

Example

>>> import comnum
>>> pilots = [(l, k) for l in range(0, 12, 3) for k in range(0, 24, 6)]
>>> w = comnum.Wiener2d(pilots, 0.0832, 0.0417, 0.01, 10)
>>> bool(w.mse([(0, 0)])[0] < 0.01)
True
estimate(h_ls, targets)#

The estimates at the positions targets from the LS estimates at the pilots.

Parameters:
  • h_ls (array_like) – one LS estimate per pilot, in their order (complex).

  • targets (list[tuple[int, int]]) – the (symbol, subcarrier) positions.

Returns:

the estimates (complex128).

Return type:

numpy.ndarray

Raises:

ValueError – unless h_ls has one value per pilot.

mse(targets)#

The mean square error of the estimate at every position (their eq. (12)).

Parameters:

targets (list[tuple[int, int]]) – the (symbol, subcarrier) positions.

Returns:

the MSE of every position (float64).

Return type:

numpy.ndarray

Raises:

ValueError – for a singular system.

taps(symbol, subcarrier)#

The pilots (indices into the list) used for a position.

Parameters:
  • symbol (int) – the symbol.

  • subcarrier (int) – the subcarrier.

Returns:

the indices of the n_taps nearest pilots.

Return type:

list[int]