four_multi
Multi-Antenna,Multi-Node,Multi-Band,Multi-Cell
Classes | Public Member Functions | Public Attributes | Static Public Attributes
OFDM2 Class Reference

This class implements an OFDM modulation with the same carrier spacing as WiFi but with somewhat fewer subcarriers, in order to work well with the USRP with 25MHz sample-rate. The matlab functions mod_OFDM2.m and demod_OFDM2 implement basically the same modulation scheme. More...

#include <modem_OFDM2.hpp>

List of all members.

Classes

struct  compressed_feedback_IEEE80211ac

Public Member Functions

 OFDM2 (void)
 Constructor without arguments. Use init to set parameters. See the members for more understanding of the class. The matlab functions mod_OFDM2.m and demod_OFDM2.m implements an more or less identical OFDM.
uint32_t Nfftr (void)
 Return FFT size.
uint32_t number_of_modulation_symbols (void)
 Return number of modulation symbols, e.g. 16QAM, in the frame.
uint32_t waveform_length (void)
 Return number of samples in the time-domain of the complete frame of OFDM symbols.
uint32_t prefix_length (void)
 Return cyclic prefix length.
uint32_t length (void)
 Return total symbol length.
ivec start_of_known_symbol (void)
 Return a vector containing the samples indecies where the known pilot symbols start.
void init_multi_antenna (uint32_t no_ant, int32_t buffer_size, ivec &interferer_pos, double noise_variance)
 Call this function to enable multi-antenna reception using extract_multi_antenna. The multi-antenna reception store signals in internal members. This command create allocates storage for those members.
void pilot_pattern (cvec &burst, cvec precoder)
 Not part og the API.
void insert_pilot (cvec &waveform, uint32_t symbol_number, uint32_t offset, cvec precoder)
 Insert a pilot OFDM symbol. Used to insert extra pilot symbols e.g. used for CSI estimation.
void insert_pilot (cmat &waveform, uint32_t symbol_number, uint32_t offset, int antenna_ix, double scaling)
void modulate (cvec &waveform, const cvec &symbols_in, const uint32_t offset, double &rms_power, const cvec &precoder)
 Create the time-domain signal of the modulation i.e. OFDM multiplexing.
void modulate_multi_antenna (cmat &waveform, const cvec &symbols_in, const uint32_t offset, vec &rms_power, const cmat &V, double scaling, int Nss)
void modulate_multi_antenna (cmat &waveform, const cmat &symbols_in, const uint32_t offset, vec &rms_power, const cmat V[], double scaling, ivec stream_ix_this_node, int symbols_ix_start=0, int num_symbols=0) const
void estimate_channel (cvec waveform, double &noise_variance_normalized, cvec &h, uint32_t start_sample)
 Estimate frequency domain channel.
void estimate_channel (cvec waveform, double &noise_variance_normalized, cvec &h, uint32_t start_sample, double &noise_variance)
 Estimate frequency domain channel.
void demodulate (const cvec &waveform, cvec &symbols_out, uint32_t start_sample, const cvec &h, double &rms_signal)
 Perform OFDM single antenna de-multiplexing i.e. extract symbols from time domain signal.
void demodulate_multi_antenna (const cmat &waveform, vec &soft_bit, uint32_t start_sample, int modulation_order, int num_symbols_to_extract)
 Not part of the API,.
void extract_multi_antenna (const cmat &waveform, uint32_t start_sample, int num_symbols_to_extract)
 This is a function with side effects. The function makes an MMSE estimate of the subcarrier symbols from the input waveform based on the pilot symbols of the desired and interfering signals. The result is stored in the member matrix x_c where each row correspond to a subcarrier and each column to a payload OFDM symbol.
void extract_multi_antenna (const cmat &waveform, uint32_t start_sample, cvec &symbols_out, int num_symbols_to_extract)
 This is a function with side effects. The function makes an MMSE estimate of the subcarrier symbols from the input waveform based on the pilot symbols of the desired and interfering signals. The result is stored in the member matrix x_c where each row correspond to a subcarrier and each column to a payload OFDM symbol. The function then equalizes the received signal and puts the result in the vector symbols.
void init_compressed_feedback (int b_psis, int b_phis, uint32_t num_ms_ant, uint32_t num_of_tx_antennas, int Ng, double noise_variance_per_subcarrier, bool IA_compression)
void change_Ng (int Ng)
ivec scwcf (void)
ivec scwcf_ix_all (void)
ivec scwcf_ix_all_high (void)
ivec scwcf_ix_all_low (void)
compressed_feedback_IEEE80211ac compress_feedback (cmat H[])
void uncompress_feedback (cmat H[], const OFDM2::compressed_feedback_IEEE80211ac &feedback)
void synchronize (cvec &waveform, uint32_t &start_pos, double &f_offset)
void synchronize (cvec &waveform, uint32_t &start_pos)
void init (bool use_pilot_carriers, bool prepend_training, uint32_t prefix_length, uint32_t Ns, ivec known_pos, ivec re_order)
 This function sets the tunable OFDM parameters.
void change_pulse_shape (cvec new_pulse_shape, int new_pulse_shape_delay)
 This function performs (in place) interleaving of the subcarriers.
void interleave_symbols (cvec &symbol, int index)
void de_interleave_symbols (cvec &symbol, int index)
 This function performs (in place) de-interleaving of the subcarriers.
void pz_init_fft (ivec ix_all)
void pz_fft (const cvec &in, cvec &out)
void pz_ifft (const cvec &in, cvec &out)

Public Attributes

uint32_t rightmost_carrier
uint32_t leftmost_carrier
int rightmost_carrier_IEEE
int leftmost_carrier_IEEE
uint32_t pilot_carrier1
uint32_t pilot_carrier2
cmat a1c
cmat a2c
double d_noise_variance_receiver
ivec known_symbol_pos
ivec interferers_known_pos
uint32_t Ns
complex< double > pilot_symbol
int first_payload_symbol_index
ivec ix
ivec ix_all
ivec ix_sub
ivec ix_null
ivec closest_pilot
ivec closest_pilot_all
ivec ix_all_IEEE
uint32_t length_ix
uint32_t length_ix_all
int pilot_carrier1_sub
int pilot_carrier2_sub
int rightmost_carrier_sub
int leftmost_carrier_sub
cvec train
cvec h
cvec pulse_shape
int pulse_shape_delay
bool do_use_pilot_carriers
bool do_prepend_training
bool per_symbol_phase_derotation
uint32_t Np
ivec d_reorder
double pilot_power_factor
cmat he
cmat hi [10]
cmat x
cmat x_c
cmat x_cp
bool estimate_SINR
double SINR
int noise_estimation_start_ix
int noise_estimation_stop_ix
cvec cpe00
cmat Wfft
cmat Wifft
cmat Wifft_sub
cmat Wifft_sub_filtered
int length_Wifft_sub_filtered
imat symbol_interleave_matrix
imat symbol_de_interleave_matrix
ivec scwcfs [max_Ng]
ivec scwdss [max_Ng]
ivec scwcf_lows [max_Ng]
ivec scwcf_highs [max_Ng]
ivec scwcf_ix_all_lows [max_Ng]
ivec scwcf_ix_all_highs [max_Ng]
ivec scwcf_ix_alls [max_Ng]
ivec scwcf_ds_lows [max_Ng]
ivec scwcf_ds_highs [max_Ng]
ivec scwcf_has_dss [max_Ng]
int d_num_delta_SNRs [max_Ng]

Static Public Attributes

static const uint32_t Nfft = 80
static const uint32_t Nfft_sync = 65536
static const uint32_t gap = 3
static const int max_Ng = 18

Detailed Description

This class implements an OFDM modulation with the same carrier spacing as WiFi but with somewhat fewer subcarriers, in order to work well with the USRP with 25MHz sample-rate. The matlab functions mod_OFDM2.m and demod_OFDM2 implement basically the same modulation scheme.

Definition at line 44 of file modem_OFDM2.hpp.


Member Function Documentation

void OFDM2::change_pulse_shape ( cvec  new_pulse_shape,
int  new_pulse_shape_delay 
)

This function performs (in place) interleaving of the subcarriers.

Parameters:
symbolThe symbols of the frame. Uninterleaved on calling and interleaved after return.
indexThis parameter can be used change between interleavers. Currently eight interleavers are implemented. Modulo eight is therefore done on index before processing.

Definition at line 292 of file modem_OFDM2.cpp.

void OFDM2::de_interleave_symbols ( cvec &  symbol,
int  index 
)

This function performs (in place) de-interleaving of the subcarriers.

Parameters:
symbolThe symbols of the frame. Uninterleaved on calling and interleaved after return.
indexThis parameter can be used change between interleavers. Currently eight interleavers are implemented. Modulo eight is therefore done on index before processing.

Definition at line 2019 of file modem_OFDM2.cpp.

void OFDM2::demodulate ( const cvec &  waveform,
cvec &  symbols_out,
uint32_t  start_sample,
const cvec &  h,
double &  rms_signal 
)

Perform OFDM single antenna de-multiplexing i.e. extract symbols from time domain signal.

Parameters:
waveformInput signal.
symbols_out.Noisy samples of e.g. 16QAM symbols. Length number_of_modulation_symbols().
start_sample.Where in the waveform to start demodulation.
h.The channel estimate.
rms_signal.The RMS received signal strength (unit LSB).

Definition at line 1882 of file modem_OFDM2.cpp.

void OFDM2::estimate_channel ( cvec  waveform,
double &  noise_variance_normalized,
cvec &  h,
uint32_t  start_sample 
)

Estimate frequency domain channel.

Parameters:
waveformInput signal.
noise_variance_normalizedEstimated noise variance after channel equalization.
h.Channel estimate.
start_sampleWhere in the waveform the known symbol is located.

Definition at line 683 of file modem_OFDM2.cpp.

void OFDM2::estimate_channel ( cvec  waveform,
double &  noise_variance_normalized,
cvec &  h,
uint32_t  start_sample,
double &  noise_variance 
)

Estimate frequency domain channel.

Parameters:
waveformInput signal.
noise_variance_normalizedEstimated noise variance after channel equalization.
h.Channel estimate.
noise_varianceNoise variance before equalization.
start_sampleWhere in the waveform the known symbol is located.

Definition at line 692 of file modem_OFDM2.cpp.

void OFDM2::extract_multi_antenna ( const cmat &  waveform,
uint32_t  start_sample,
int  num_symbols_to_extract 
)

This is a function with side effects. The function makes an MMSE estimate of the subcarrier symbols from the input waveform based on the pilot symbols of the desired and interfering signals. The result is stored in the member matrix x_c where each row correspond to a subcarrier and each column to a payload OFDM symbol.

Parameters:
waveformA matrix with the received signal samples. Each row correspond to a receive antennas.
start_sampleFirst sample where to start demultiplexing.

Definition at line 1103 of file modem_OFDM2.cpp.

void OFDM2::init ( bool  use_pilot_carriers,
bool  prepend_training,
uint32_t  prefix_length,
uint32_t  Ns,
ivec  known_pos,
ivec  re_order 
)

This function sets the tunable OFDM parameters.

Parameters:
use_pilot_carriersIf true, then two out ot 38 subcarriers use known symbols to aid receiver processing e.g. compensation of phase-noise and frequency offset. Typically not needed.
prepend_trainingIf true a training sequence (or rather a synchronization sequence) is insterted before the OFDM symbols. Typically not needed.
prefix_lengthLength of cyclic prefix is samples. The length of the OFDM symbols is 80 samples without cyclic prefix.
Ns.Number of symbols per frame including pilot symbols.
known_pos.Vector with the positions of known symbols.
re_order.The position index of the k:th symbol (k=0,...,Ns-1) is re_order(k).

Definition at line 60 of file modem_OFDM2.cpp.

void OFDM2::init_multi_antenna ( uint32_t  no_ant,
int32_t  buffer_size,
ivec &  interferer_pos,
double  noise_variance 
)

Call this function to enable multi-antenna reception using extract_multi_antenna. The multi-antenna reception store signals in internal members. This command create allocates storage for those members.

Parameters:
no_antNumber of receiver antennas to be used.
buffer_sizeTime domain length (in samples) of the received antenna data.
interferer_posThe symbol positions in the frame where the interferers are transmitting their pilot symbols.

Definition at line 747 of file modem_OFDM2.cpp.

void OFDM2::insert_pilot ( cvec &  waveform,
uint32_t  symbol_number,
uint32_t  offset,
cvec  precoder 
)

Insert a pilot OFDM symbol. Used to insert extra pilot symbols e.g. used for CSI estimation.

Parameters:
waveformTime domain samples.
symbol_numberPosition of the symbol in the burst.
offsetNumber of samples to offset the insertion.
precoderA vector of complex values to multiply the pilot subcarriers with. Use for linear precoding (aka beamforming).

Definition at line 657 of file modem_OFDM2.cpp.

void OFDM2::modulate ( cvec &  waveform,
const cvec &  symbols_in,
const uint32_t  offset,
double &  rms_power,
const cvec &  precoder 
)

Create the time-domain signal of the modulation i.e. OFDM multiplexing.

Parameters:
waveformThe time domain samples.
symbols_inThe complex symbols to be transmitted. The length of which is given by number_of_modulation_symbols().
offsetNumber of samples offset into the burst.
rms_powerReturns the rms_power of the transmitted time-domain waveform. If rms_pwer=-10 on calling, the rms_power is not calculated which reduces the computational load.
precoderA vector of complex values to multiply the pilot subcarriers with. Use for linear precoding (aka beamforming).

Definition at line 389 of file modem_OFDM2.cpp.

void OFDM2::pz_fft ( const cvec &  in,
cvec &  out 
) [inline]

This function is not part of the API

Definition at line 418 of file modem_OFDM2.hpp.

void OFDM2::pz_ifft ( const cvec &  in,
cvec &  out 
) [inline]

This function is not part of the API

Definition at line 423 of file modem_OFDM2.hpp.

void OFDM2::pz_init_fft ( ivec  ix_all) [inline]

This function is not part of the API

Definition at line 362 of file modem_OFDM2.hpp.


The documentation for this class was generated from the following files:
 All Classes Functions Variables