Skip to main content

Training

Struct Training 

Source
pub struct Training { /* private fields */ }
Expand description

A training matrix $P$ ($t \times N$, see the module).

Implementations§

Source§

impl Training

Source

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.

Source

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.

Source

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.

Source

pub fn symbols(&self) -> &CMat

The training symbols $P$ ($t \times N$).

Source

pub fn n_tx(&self) -> usize

Transmit antennas $t$.

Source

pub fn n_symbols(&self) -> usize

Training symbols $N$.

Source

pub fn total_power(&self) -> f64

The power $\lVert P \rVert_{F}^{2} = \mathcal{P}$ (eq. (5)).

Source

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$).

Source

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$.

Trait Implementations§

Source§

impl Clone for Training

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Training

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Training

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Training

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.