Skip to main content

Module link

Module link 

Source
Expand description

An OFDM link of several antennas: the frame of resource grids, its transmission and its reception.

transmit maps the symbols of every transmit antenna (port) on resource grids of n_symbols OFDM symbols, the pilots dealt to the ports in turn (ResourceGrid::map_port), pads the last grid with random QPSK at the power of a layer, and modulates every grid (Ofdm::modulate, then scaled). The samples have the power $K/(L N)$ ($K$ active subcarriers, IFFT of size $L N$): a resource element of unit energy spreads over $L N / K$ samples, so that the noise variance per sample is the noise variance per demodulated resource element.

OfdmFrame keeps what the receiver needs: OfdmFrame::received_grid demodulates the grids of every receive antenna (Ofdm::demodulate of the samples of the grid, unscaled), OfdmFrame::estimate estimates the channel from the pilots of every port, and OfdmFrame::detect detects every data resource element with a Receiver, spatial multiplexing or Alamouti’s code over pairs of resource elements.

§Examples

use comnum_waveform::ofdm::Ofdm;
use comnum_waveform::ofdm::grid::{PilotPattern, ResourceGrid};
use comnum_waveform::ofdm::link::{FrameDetection, transmit};
use comnum_mimo::receiver::{DetectorKind, Receiver};
use comnum_mapping::constellation::Constellation;
use comnum_core::rng::Rng;
use comnum_math::C64;
use ndarray::Array2;
let ofdm = Ofdm { n_cp: 4, oversampling: 1, ..Ofdm::new(32, 24)? };
let grid = ResourceGrid { n_subcarriers: 24, n_symbols: 4, pattern: PilotPattern::None, seed: 0 };
let c = Constellation::qam(4)?.normalized();
let x: Vec<C64> = (0..90).map(|i| c.points()[i % 4]).collect();
let (tx, frame) = transmit(&ofdm, &grid, vec![x.clone()], &mut Rng::new(1))?;
let rx = Receiver::new(DetectorKind::Zf, c, false)?;
let eye = |_: usize, _: &[Vec<C64>]| Ok(vec![C64::new(1.0, 0.0); 24 * 4]);
let out = frame.detect(&tx, eye, &rx, &FrameDetection { noise_var: 1e-6, ..FrameDetection::default() })?;
assert!(out.symbols[..90].iter().zip(&x).all(|(a, b)| (a - b).norm() < 1e-12));

Structs§

FrameDetection
The settings of OfdmFrame::detect.
OfdmFrame
An OFDM frame: what the receiver needs to undo transmit.

Functions§

transmit
Map the symbols of every antenna on resource grids and modulate them (see the module): the samples of every antenna and the frame.