Skip to main content

RandomDelayProfile

Struct RandomDelayProfile 

Source
pub struct RandomDelayProfile {
    pub paths: usize,
    pub max_delay: f64,
    pub tau_rms: Option<f64>,
    pub first_at_zero: bool,
    pub n_fft: usize,
}
Expand description

A channel of paths impulses whose delays are independent and uniform over $[0, L]$ samples of the IFFT (max_delay = $L$), not on the sampling grid, of power $e^{-\tau/\tau_{\mathrm{rms}}}$ (or all equal), the first one at delay 0 when first_at_zero: the “synchronized” (exponential, first at 0) and “uniform” models of Edfors et al. (1998, Sec. II). Its correlation averaged over the delays is, for one random delay of power $w(\tau)$,

$$ E\left[w(\tau), e^{-j 2\pi \Delta k \tau / N}\right] = \frac{1 - e^{-aL}}{aL}, \qquad a = \frac{1}{\tau_{\mathrm{rms}}} + j\frac{2\pi \Delta k}{N}, $$

normalised to a unit power: RandomDelayProfile::correlation and the $N \times N$ matrix of $N$ adjacent subcarriers, RandomDelayProfile::correlation_matrix.

§Examples

use comnum_waveform::ofdm::estimation::RandomDelayProfile;
// equal powers over a prefix of 4 samples: the correlation of a uniform delay
let p = RandomDelayProfile { paths: 3, max_delay: 4.0, tau_rms: None, first_at_zero: false, n_fft: 64 };
assert!((p.correlation(0.0).re - 1.0).abs() < 1e-15);
// 8 subcarriers apart, half a turn over the prefix: (1 - e^{-j pi}) / (j pi)
assert!((p.correlation(8.0).norm() - (2.0 / std::f64::consts::PI)).abs() < 1e-12);

Fields§

§paths: usize

Impulses $M$.

§max_delay: f64

The largest delay $L$ (samples of the IFFT), the cyclic prefix.

§tau_rms: Option<f64>

The decay $\tau_{\mathrm{rms}}$ (samples) of the powers, None for equal powers.

§first_at_zero: bool

The first impulse at delay 0, the others random.

§n_fft: usize

The IFFT size $N$ the delays refer to.

Implementations§

Source§

impl RandomDelayProfile

Source

pub fn correlation(&self, delta: f64) -> C64

The correlation $R(\Delta k)$ between subcarriers $\Delta k$ apart, averaged over the delays, of unit power.

Source

pub fn correlation_matrix(&self, n: usize) -> Array2<C64>

The correlation matrix of n adjacent subcarriers, $R_{ij} = R(i - j)$.

Trait Implementations§

Source§

impl Clone for RandomDelayProfile

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 Copy for RandomDelayProfile

Source§

impl Debug for RandomDelayProfile

Source§

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

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

impl PartialEq for RandomDelayProfile

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 RandomDelayProfile

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.