pub struct Training { /* private fields */ }Expand description
A training matrix $P$ ($t \times N$, see the module).
Implementations§
Source§impl Training
impl Training
Sourcepub fn new(p: CMat) -> Result<Training>
pub fn new(p: CMat) -> Result<Training>
The training of the $t \times N$ matrix p, $N \ge t$.
§Errors
Error::Config for an empty matrix, fewer columns than rows or a non-finite
entry. A matrix of rank below $t$ is accepted (the LMMSE estimator and the
water-filled training of a singular correlation); LS and scaled LS refuse it.
Sourcepub fn orthogonal(n_tx: usize, n: usize, total_power: f64) -> Result<Training>
pub fn orthogonal(n_tx: usize, n: usize, total_power: f64) -> Result<Training>
The DFT training of eq. (10): $[P]_{k,n} = \sqrt{\mathcal{P}/(N t)}\, e^{j 2\pi k n / N}$, of orthogonal rows, $P P^{H} = \frac{\mathcal{P}}{t} I$ (9).
§Errors
Error::Config for n < n_tx, no antenna or a power that is not positive.
Sourcepub fn mmse_optimal(
r_h: &ArrayView2<'_, C64>,
noise_var: f64,
n_rx: usize,
total_power: f64,
n: usize,
) -> Result<Training>
pub fn mmse_optimal( r_h: &ArrayView2<'_, C64>, noise_var: f64, n_rx: usize, total_power: f64, n: usize, ) -> Result<Training>
The training that minimises the MSE of the LMMSE estimator of the correlation
r_h (eqs. (41)–(44)): the power water-filled on the eigenvectors of $R_{H}$, the
last $N - t$ columns zero.
§Errors
Error::Config for a correlation that is not $t \times t$ with $t \ge 1$,
n < t, no receive antenna, a noise variance or a power that is not positive.
Sourcepub fn total_power(&self) -> f64
pub fn total_power(&self) -> f64
The power $\lVert P \rVert_{F}^{2} = \mathcal{P}$ (eq. (5)).
Sourcepub fn estimate(
&self,
s: &ArrayView2<'_, C64>,
estimator: &ChannelEstimator,
noise_var: f64,
) -> Result<CMat>
pub fn estimate( &self, s: &ArrayView2<'_, C64>, estimator: &ChannelEstimator, noise_var: f64, ) -> Result<CMat>
The estimate $\hat{H} = S A$ ($r \times t$) of the channel from the received
training s ($r \times N$), the noise variance per entry noise_var
($\sigma_{n}^{2}$, unused by LS).
§Errors
Error::Shape when s does not have $N$ columns or the correlation of
ChannelEstimator::Mmse is not $t \times t$; Error::Config for a negative
noise variance, a trace that is not positive, LS or scaled LS on a training of
rank below $t$; Error::Numerical for a singular LMMSE system (no noise and a
rank-deficient $P^{H} R_{H} P$).
Sourcepub fn mse(
&self,
estimator: &ChannelEstimator,
r_h: &ArrayView2<'_, C64>,
noise_var: f64,
n_rx: usize,
) -> Result<f64>
pub fn mse( &self, estimator: &ChannelEstimator, r_h: &ArrayView2<'_, C64>, noise_var: f64, n_rx: usize, ) -> Result<f64>
The MSE $E\{\lVert H - \hat{H} \rVert_{F}^{2}\}$ of estimator on a channel of
true correlation r_h ($E\{H^{H} H\}$, $t \times t$) with n_rx receive
antennas and the noise variance noise_var (see the module): eqs. (7), (13),
(28) and (46) for any training, (12), (20), (32) and (49) for the optimal ones.
§Errors
Error::Config for LS-SLS and LS-RMMSE (TracePrior::FromLs: no closed
form) and the errors of Training::estimate; Error::Shape for a
correlation that is not $t \times t$.