four_multi
Multi-Antenna,Multi-Node,Multi-Band,Multi-Cell
Public Member Functions | Public Attributes | Static Public Attributes
OFDM1 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_OFDM1.m and demod_OFDM1 implement basically the same modulation scheme. More...

#include <modem_OFDM1.hpp>

List of all members.

Public Member Functions

 OFDM1 (void)
 Constructor without arguments. Use init to set parameters. See the members for more understanding of the class. The matlab functions mod_OFDM1.m and demod_OFDM1.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.
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)
 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 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 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)
 Not part of the API,.
void extract_multi_antenna (const cmat &waveform, uint32_t start_sample)
 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)
 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 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 interleave_symbols (cvec &symbol, int index)
 This function performs (in place) interleaving of the subcarriers.
void de_interleave_symbols (cvec &symbol, int index)
 This function performs (in place) de-interleaving of the subcarriers.
void pz_init_fft (void)
void pz_fft (const cvec &in, cvec &out)
void pz_ifft (const cvec &in, cvec &out)

Public Attributes

ivec known_symbol_pos
ivec interferers_known_pos
uint32_t Ns
complex< double > pilot_symbol
ivec ix
ivec ix_all
ivec ix_sub
cvec debug1
cvec debug2
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
uint32_t Np
ivec d_reorder
double pilot_power_factor
cmat he
cmat hi [10]
cmat x [100]
cmat x_c
bool estimate_SINR
double SINR
int noise_estimation_start_ix
int noise_estimation_stop_ix
cmat Wfft
cmat Wifft
imat symbol_interleave_matrix
imat symbol_de_interleave_matrix

Static Public Attributes

static const uint32_t rightmost_carrier = 19
static const uint32_t leftmost_carrier = 61
static const uint32_t Nfft = 80
static const uint32_t pilot_carrier1 = 10
static const uint32_t pilot_carrier2 = 71
static const uint32_t Nfft_sync = 65536
static const uint32_t gap = 3

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_OFDM1.m and demod_OFDM1 implement basically the same modulation scheme.

Definition at line 42 of file modem_OFDM1.hpp.


Member Function Documentation

void OFDM1::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 821 of file modem_OFDM1.cpp.

void OFDM1::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 684 of file modem_OFDM1.cpp.

void OFDM1::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 334 of file modem_OFDM1.cpp.

void OFDM1::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 343 of file modem_OFDM1.cpp.

void OFDM1::extract_multi_antenna ( const cmat &  waveform,
uint32_t  start_sample 
)

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 593 of file modem_OFDM1.cpp.

void OFDM1::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 54 of file modem_OFDM1.cpp.

void OFDM1::init_multi_antenna ( uint32_t  no_ant,
int32_t  buffer_size,
ivec &  interferer_pos 
)

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 398 of file modem_OFDM1.cpp.

void OFDM1::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 320 of file modem_OFDM1.cpp.

void OFDM1::interleave_symbols ( cvec &  symbol,
int  index 
)

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 806 of file modem_OFDM1.cpp.

void OFDM1::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 238 of file modem_OFDM1.cpp.

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

This function is not part of the API

Definition at line 292 of file modem_OFDM1.hpp.

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

This function is not part of the API

Definition at line 295 of file modem_OFDM1.hpp.

void OFDM1::pz_init_fft ( void  ) [inline]

This function is not part of the API

Definition at line 269 of file modem_OFDM1.hpp.


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