comnum.LowRank#

class comnum.LowRank(r_hh, noise, rank)#

The rank-p LMMSE estimator of Edfors et al. (1998) for the correlation r_hh of N values: h_p = U D_p U^H h_ls, D_p diagonal of delta_k = lambda_k / (lambda_k + noise) for k < p and of 0 beyond.

Parameters:
  • r_hh (array_like) – the N x N correlation (complex, Hermitian).

  • noise (float) – the noise of the LS estimates, beta / SNR.

  • rank (int) – the rank p.

Raises:

ValueError – unless r_hh is square, for a rank of 0 or above N, or a negative noise.

Example

>>> import comnum
>>> r = comnum.random_delay_correlation(64, 5, 4.0)
>>> est = comnum.LowRank(r, 17 / 9 / 100, 8)
>>> round(est.mse(r, 17 / 9 / 100) / 64, 4)
0.002
estimate(h_ls)#

The estimate from the LS estimates (their eq. (9)).

Parameters:

h_ls (array_like) – the N LS estimates (complex).

Returns:

the estimate (complex128).

Return type:

numpy.ndarray

Raises:

ValueError – unless h_ls has N values.

mse(r_true, noise_true)#

The mean square error E||h - h_p||^2 on a channel of correlation r_true with LS estimates of noise noise_true (their eq. (10)).

Parameters:
  • r_true (array_like) – the correlation of the channel.

  • noise_true (float) – beta / SNR of the channel.

Returns:

the error, summed over the N values.

Return type:

float

Raises:

ValueError – unless r_true has the size of the design.

mse_floor(r_true)#

The floor of the error at infinite SNR (their eq. (11)).

Parameters:

r_true (array_like) – the correlation of the channel.

Returns:

the floor, summed over the N values.

Return type:

float

Raises:

ValueError – for an input that is not a matrix of numbers, or a matrix of another size than the design.

eigenvalues#

The eigenvalues of the correlation, decreasing.

Type:

numpy.ndarray