Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

simthlib::OfdmReceiver Class Reference

Abstract base class of an OFDM receiver. More...

#include <ofdmreceiver.h>

Inheritance diagram for simthlib::OfdmReceiver:

Inheritance graph
[legend]
List of all members.

Public Types

typedef simth::ModSeq::value_type mod_value
typedef simth::PhaseSeq::value_type phase_value

Public Member Functions

 OfdmReceiver (int deviceID, simth::DeviceSystemIntf *system, const simth::PropertyList &pl, int oversampling, int carr, double guardTime, double dist, ofdm::FillUpScheme diffScheme)
 OfdmReceiver (int deviceID, simth::DeviceSystemIntf *system, const simth::PropertyList &pl)
 ~OfdmReceiver ()=0
virtual void receiveSignal (const simth::TimeSignal &signalSamples, simth::ModSeq *modSeq, double *noise=NULL, simth::ModSeq *trans=NULL)
virtual void updateInputLengths ()
virtual void updateOutputLengths ()
void setNumPhases (int usedPhases)
bool needNumPhases () const
void setLinearPhaseCorrection (bool state)
virtual void startOfSimulation ()
virtual void print (std::ostream &os) const

Protected Member Functions

int numCarrier () const
int numGuard () const
int oversampling () const
int symbolsPerOfdm () const
int samplesPerOfdmSymbol () const
int samplesPerSymbol () const
double carrierDistance () const
double oneOverTimeDistance () const
bool isLinearPhaseCorrection () const
int numReceivedOfdmSymbols () const
void linearPhaseCorrection (simth::ModSeq *modulationSymbols) const
void initScramblingVector (ofdm::FillUpScheme mode, simth::checkedVector< int > *vec) const
void initOfdm2origVector ()
ofdm::FillUpScheme diffDecodingScheme () const
void diffDecodingScheme (ofdm::FillUpScheme newDiffMode)
std::pair< int, int > getOfdmBlockDimensions (int sequenceLength) const
int ofdmIndex2origIndex (int ofdmIndex) const
int origIndex2ofdmIndex (int origIndex) const
std::pair< int, int > index2position (int ofdmIndex) const
int position2index (int timePos, int freqPos) const
int getTimePos (int index) const
int getCarrierPos (int index) const
void subGuard (const simth::Array< mod_value > &inArray, simth::Array< mod_value > *outArray) const
void FFT (const simth::Array< mod_value > &inArray, simth::Array< mod_value > *outArray) const
void fillOfdmSymbol (const simth::TimeSignal &timeSeq, int currBlockNumber)
void flushOfdmSymbol (simth::ModSeq *modSymbols, int currBlock) const
int computeNumGuardSamples (double guardTime) const
virtual void invariante () const
virtual int numTimeSamples (int numModSymbols) const
virtual int numModSymbols (int numTimeSamples) const
virtual void transformSignal (const simth::TimeSignal &signalSamples_ptr, simth::ModSeq *modSeq)
virtual void channelEstimation (const simth::ModSeq &modSymbols, simth::ModSeq *transfer) const
virtual void noiseEstimation (const simth::ModSeq &modSymbols, double *noise) const
int numPhases () const
void needNumPhases (bool state)

Related Functions

(Note that these are not member functions.)

 propertylist_OfdmReceiver (not_a_function)

Detailed Description

Abstract base class of an OFDM receiver.

This class is an abstract base class for a receiver using the Orthogonal Frequency Division Multiplexing (OFDM) technology. See more about OFDM in the common literature.

Whoever intends to extent this class or who wants to understand the internal functions should understand the concept used to address the data elements inside a received OFDM block:

An OFDM block consist of one or more received OFDM symbols. Each of the these OFDM symbols itself consist of a certain number of modulation symbols. For example, the third modulation symbol of the first OFDM symbol can be accessed in 2-dimensional notation as '(0,2)' (note that the index starts at zero).

Since the received OFDM symbols arrive at successive time stamps, the first dimension (that indexes a certain OFDM symbol) is called the time index, while the second index (that indexes a certain subcarrier number) is called the frequency index. This 2-dimensional index can be translated into an one dimensional, so-called 'ofdmIndex', using the function position2index(int timePos,int freqPos). (Note, this mapping is fixed!) This 'ofdmIndex' is for internal use only (it results if the modulation symbols are counted columnwise starting from the lower left corner). The inverse operation is done by the function index2position(int ofdmIndex).

Since different schemes exist to fill the OFDM blocks with received modulation sequences, the ofdmIndex of a data element does not equal (in general) the index of that element in the received output sequences of modulation symbols. (The different 'filling modes' are set with the function fillUpMode(FillUp_Mode).) This index of the modulation symbol within the output sequence of the receiver can be computed by the 'ofdmIndex' using the function ofdmIndex2origIndex(int ofdmIndex). The inverse function is origIndex2ofdmIndex(int origIndex).


Member Typedef Documentation

typedef simth::ModSeq::value_type simthlib::OfdmReceiver::mod_value
 

typedef simth::PhaseSeq::value_type simthlib::OfdmReceiver::phase_value
 


Constructor & Destructor Documentation

simthlib::OfdmReceiver::OfdmReceiver int  deviceID,
simth::DeviceSystemIntf system,
const simth::PropertyList pl,
int  oversampling,
int  carr,
double  guardTime,
double  dist,
ofdm::FillUpScheme  diffScheme
 

Constructor of the OFDM Receiver class.

Parameters:
deviceID ID of this device
system Pointer to parent simulation system
pl Property list of this device
oversampling Oversampling rate of the received signal.
carr Number of carriers
guardTime Guard length in seconds.
dist Subcarrier spacing in Hz.
diffScheme Differential decoding scheme, e.g. differential encoding in frequency or in time direction

simthlib::OfdmReceiver::OfdmReceiver int  deviceID,
simth::DeviceSystemIntf system,
const simth::PropertyList pl
 

Constructor of the OFDM Receiver class.

All parameters are read from the property list.

Parameters:
deviceID ID of this device
system Pointer to parent simulation system
pl Property list of this device

simthlib::OfdmReceiver::~OfdmReceiver  )  [pure virtual]
 

Pure virtual constructor to make that class an abstract base class.


Member Function Documentation

double simthlib::OfdmReceiver::carrierDistance  )  const [inline, protected]
 

virtual void simthlib::OfdmReceiver::channelEstimation const simth::ModSeq modSymbols,
simth::ModSeq transfer
const [protected, virtual]
 

This function can be used to obtain a channel estimation in derived classes. The derived functions fill the sequence 'transferFunction' with the channel transfer factors. Note, if the channel estimation is based on the given complex output sequence, in the majority of cases the index within this complex output sequence has to be mapped to the OFDM index. The OFDM index represents the position within the corresponding block of received OFDM symbols (i.e. the number of the OFDM-symbol (time) and the number of the subcarrier (frequency)). This mapping is done using the function origIndex2ofdmIndex(). See the description of this class for further information. Then in a last step, the estimated transfer factors for the block of OFDM-Symbols have to mapped back to the 'original' index of the output sequence. This mapping is done using the function ofdmIndex2origIndex().

The implementation in this class just sets all elements of 'transfer' to 0.0.

Parameters:
modSymbols The received modulation symbols, i.e. the output sequence of the receiver.
transfer After finishing the function, 'transfer' points to the estimated transfer factors.

Reimplemented in simthlib::OfdmReceiverIdealEstimation, and simthlib::OfdmReceiverBce.

int simthlib::OfdmReceiver::computeNumGuardSamples double  guardTime  )  const [protected]
 

Computes the number of time samples of the guard interval with the given length.

void simthlib::OfdmReceiver::diffDecodingScheme ofdm::FillUpScheme  newDiffMode  )  [inline, protected]
 

Sets the differential decoding scheme.

ofdm::FillUpScheme simthlib::OfdmReceiver::diffDecodingScheme  )  const [inline, protected]
 

Returns the used differential decoding scheme.

void simthlib::OfdmReceiver::FFT const simth::Array< mod_value > &  inArray,
simth::Array< mod_value > *  outArray
const [inline, protected]
 

void simthlib::OfdmReceiver::fillOfdmSymbol const simth::TimeSignal timeSeq,
int  currBlockNumber
[protected]
 

void simthlib::OfdmReceiver::flushOfdmSymbol simth::ModSeq modSymbols,
int  currBlock
const [protected]
 

int simthlib::OfdmReceiver::getCarrierPos int  index  )  const [inline, protected]
 

Converts the the 1-dimensional OFDM index to the subcarrier index in the 2-dimensional block of OFDM-Symbols. (Note: index starts at zero)

std::pair< int, int > simthlib::OfdmReceiver::getOfdmBlockDimensions int  sequenceLength  )  const [inline, protected]
 

Returns the dimension of the 2-dimensional block in order to the given sequence length. The first dimension is in time direction, whereas the second dimension is in frequency direction.

int simthlib::OfdmReceiver::getTimePos int  index  )  const [inline, protected]
 

Converts the the 1-dimensional OFDM index to the time index, i.e. to the first index of the 2-dimensional block position within the OFDM block. (Note: index starts at zero)

std::pair< int, int > simthlib::OfdmReceiver::index2position int  ofdmIndex  )  const [inline, protected]
 

Converts the 1-dimensional index that describes a position within the OFDM block to the 2-dimensional notation. The first dimension of that notation indexes the time position, i.e. the OFDM symbol while the second dimension indexes the frequency position, i.e. the subcarrier number. The lower left corner is indexed by (0,0), the upper left corner is (FIXME: Is what ? Really the upper left when columnwise ?)

See also:
ofdmIndex2origIndex(int ofdmIndex) const

void simthlib::OfdmReceiver::initOfdm2origVector  )  [protected]
 

Initializes the vector(s) used in the function ofdmIndex2OrigIndex() (and its inverse function). This function is used to provide different differential decoding schemes, e.g. differential decoding in frequency direction or differential decoding in time direction (Probably one will use it in derived classes for other purposes). The option which scheme is used is set by the constructor argument diffDecodingScheme. The length of the scrambling vector equals the length of outputCapacity() that is set implicit by calling the function setInputLength(iLen) and setOutputLength(oLen), respectively. Hence, it's pointless to call this function without calling one of these functions before. (In that case the length of the scrambling vector will be zero.) Internally, this function uses the function initScramblingVector(ofdm::FillUpScheme mode, simth::checkedVector<int>* vec) to provide the different scrambling schemes.

void simthlib::OfdmReceiver::initScramblingVector ofdm::FillUpScheme  mode,
simth::checkedVector< int > *  vec
const [protected]
 

Initalizes the given vector 'vec' with the given scrambling scheme.

void simthlib::OfdmReceiver::invariante  )  const [inline, protected, virtual]
 

bool simthlib::OfdmReceiver::isLinearPhaseCorrection  )  const [inline, protected]
 

Returns true if linear phase correction is switched on.

void simthlib::OfdmReceiver::linearPhaseCorrection simth::ModSeq modulationSymbols  )  const [protected]
 

Performs a linear phase correction, i.e. the phase of each received complex symbol will be added by a phase shift that is linear to its subcarrier frequency. This could be useful to compensate a time offset error.

void simthlib::OfdmReceiver::needNumPhases bool  state  )  [inline, protected]
 

If the device need the parameter 'numPhases', this function should be called with 'state' equals true.

Parameters:
state on/off

bool simthlib::OfdmReceiver::needNumPhases  )  const [inline]
 

Returns true if the number of different phases of the received signal space is needed, false otherwise.

virtual void simthlib::OfdmReceiver::noiseEstimation const simth::ModSeq modSymbols,
double *  noise
const [protected, virtual]
 

This function can be overridden in derived classes to estimate the noise. The function in this sets the estimated noise just to 0.

Reimplemented in simthlib::OfdmReceiverIdealEstimation.

int simthlib::OfdmReceiver::numCarrier  )  const [inline, protected]
 

int simthlib::OfdmReceiver::numGuard  )  const [inline, protected]
 

virtual int simthlib::OfdmReceiver::numModSymbols int  numTimeSamples  )  const [protected, virtual]
 

Returns the number of mod symbols, that belongs to the given number of time samples. The number of time samples (or more precisely the output symbols of the FFT) must 'fill' a certain number of OFDM block completely. Otherwise an error is thrown.

Implements simthlib::Receiver.

int simthlib::OfdmReceiver::numPhases  )  const [inline, protected]
 

Returns the number of different phases in the signal space.

int simthlib::OfdmReceiver::numReceivedOfdmSymbols  )  const [inline, protected]
 

Returns the number of OFDM symbols that belongs to the number of input time samples set by the function setInputLength() and setOutputLength(), respectively.

virtual int simthlib::OfdmReceiver::numTimeSamples int  numModSymbols  )  const [protected, virtual]
 

Returns the number of input time samples that match the given number of modulation symbols. Note that there must be no one-to-one mapping between the number of time samples that are returned by numTimeSamples(modSymbols) and the number of modulation symbols that are returned by numModSymbols(timeSamples). In an OFDM recevier the given number of modulation symbols could be already truncated by the number of dummy symbols. In that case this function returns the number of time samples that belong to the completely filled OFDM blocks.

Implements simthlib::Receiver.

int simthlib::OfdmReceiver::ofdmIndex2origIndex int  ofdmIndex  )  const [inline, protected]
 

The input sequence of modulation symbols on the Transmitter side can be scrambled to provide differential decoding in different direction or schemes. This function converts the position inside the OFDM block to the original position inside the modulation sequence. The correct OFDM index is obtained, if the OFDM block is filled up columnwise from the lower left subcarrier.

Parameters:
ofdmIndex (One-dimensional) Position inside the OFDM block.
Returns:
Original position in the modulation sequence.

double simthlib::OfdmReceiver::oneOverTimeDistance  )  const [protected]
 

Computes the reciprocal value of the space between two time samples by the settings of the OFDM receiver. Note, that it is not checked when receiving a sequence if the time distance of the received sequence equals this 1/oneOverTimeDistance().

int simthlib::OfdmReceiver::origIndex2ofdmIndex int  origIndex  )  const [inline, protected]
 

The inverse of ofdmIndex2origIndex(int ofdmIndex) const.

Parameters:
origIndex Original position in the modulation sequence.
Returns:
(One-dimensional) Position inside the OFDM block.

int simthlib::OfdmReceiver::oversampling  )  const [inline, protected]
 

int simthlib::OfdmReceiver::position2index int  timePos,
int  freqPos
const [inline, protected]
 

The inverse operation of the function index2position(int index).

See also:
ofdmIndex2origIndex(int ofdmIndex) const

virtual void simthlib::OfdmReceiver::print std::ostream &  os  )  const [virtual]
 

Reimplemented from simthlib::Receiver.

Reimplemented in simthlib::OfdmReceiverNoEstimation, simthlib::OfdmReceiverIdealEstimation, and simthlib::OfdmReceiverBce.

virtual void simthlib::OfdmReceiver::receiveSignal const simth::TimeSignal signalSamples,
simth::ModSeq modSeq,
double *  noise = NULL,
simth::ModSeq trans = NULL
[virtual]
 

Transforms a sequence of complex values to samples of a signal using the function transformSignal(). If linear phase correction is chosen, the received symbols and channel estimation symbols will be corrected by a complex factor that depends on the frequency, i.e. the sub carrier.

Implements simthlib::Receiver.

int simthlib::OfdmReceiver::samplesPerOfdmSymbol  )  const [inline, protected]
 

int simthlib::OfdmReceiver::samplesPerSymbol  )  const [inline, protected]
 

void simthlib::OfdmReceiver::setLinearPhaseCorrection bool  state  ) 
 

Switchs linear phase correction 'off' and 'on', respectively. This could be useful if the received signal was sent over a channel with time delay (e.g. a WssusChannel). The receiver does not consider this time delay, therefore, the symbols sustain a multiplication with a complex factor in the frequency domain. This complex factor depends linearly on the frequency, i.e. the number of the subcarrier. This function computes this factor using the complex symbols filled into ofdmVector.

Parameters:
state on/off

void simthlib::OfdmReceiver::setNumPhases int  usedPhases  ) 
 

Sets the parameter that stores the number of different phases that occur in the signal space. If used by derived classes this parameter can be read using the function numPhases().

virtual void simthlib::OfdmReceiver::startOfSimulation  )  [virtual]
 

Reimplemented from simthlib::Receiver.

void simthlib::OfdmReceiver::subGuard const simth::Array< mod_value > &  inArray,
simth::Array< mod_value > *  outArray
const [protected]
 

Subtracts the guard interval from the given signal.

int simthlib::OfdmReceiver::symbolsPerOfdm  )  const [inline, protected]
 

virtual void simthlib::OfdmReceiver::transformSignal const simth::TimeSignal signalSamples_ptr,
simth::ModSeq modSeq
[protected, virtual]
 

Transforms in a subclass a sequence of complex values to samples of a signal.

virtual void simthlib::OfdmReceiver::updateInputLengths  )  [virtual]
 

Does some additional precomputation for the sake of computational efficieny.

Reimplemented from simthlib::Receiver.

virtual void simthlib::OfdmReceiver::updateOutputLengths  )  [virtual]
 

Does some additional precomputation for the sake of computational efficieny.

Reimplemented from simthlib::Receiver.


Friends And Related Function Documentation

propertylist_OfdmReceiver not_a_function   )  [related]
 

These are the properties of class OfdmReceiver . This list is auto-generated from the XML-Devicelist of this device by means of an XSLT transformation script.

Description of this device in the XML file: Abstract base class of an OFDM receiver. This class is an abstract base class for a receiver using the Orthogonal Frequency Division Multiplexing (OFDM) technology. See more about OFDM in the common literature. Whoever intends to extent this class or who wants to understand the internal functions should understand the concept used to address the data elements inside a received OFDM block, as described in the class definition.

Note that this class also has the Properties of its base classes. The direct base class is simthlib::Receiver ; direct link to its propertylist should be propertylist_Receiver(). The list below usually includes the properties that have been inherited from the base classes; the properties which belong only to this class can be found at the end of this list.

output_length
<sequencelength>, default "" -- The output length.

1 properties in this class. The above properties have been inherited from the base class simthlib::Receiver .

diff_scheme
<enum>, default "frequency" -- This parameter chooses the scheme how to fill the OFDM symbols in frequency and/or time direction. (WATCH OUT: The name is misleading. This property should rather be called 'fill_up_scheme'.) This is commonly used in different differential decoding schemes, e.g. differential decoding in frequency direction or differential decoding in time direction. WATCH OUT: The default here used to be frequency_snake, but since this contradicts common assumptions about the behaviour of OFDM receivers/transmitters, it was changed to the more textbook-like setting 'frequency'. This setting only has effect if the input_length is longer than num_carriers.

oversampling
<unsigned>, default "1" -- The oversampling rate used by the IDFT (IFFT)

num_carrier
<unsigned>, default "" -- The number of carriers

guard_time
<double>, default "0.0" -- The time duration of the guard interval in seconds.

carrier_dist
<double>, default "" -- The subcarrier distance (spacing) in Hertz.

linear_phase_correction
<bool>, default "false" -- Switchs linear phase correction 'off' and 'on', respectively. This could be useful if the received signal was sent over a channel with time delay (e.g. a WssusChannel). The receiver does not consider this time delay, therefore, the symbols sustain a multiplication with a complex factor in the frequency domain. This complex factor depends linearly on the frequency, i.e. the number of the subcarrier. This function computes this factor using the complex symbols filled into ofdmVector.

num_phases
<int>, default "0" -- Only active when linear_phase_correction is switched on: The number of different phases of the constellation diagram used by the modulator and demodulator.

7 properties in this class.


Generated on Tue Aug 9 14:39:06 2005 for simtheticlib by  doxygen 1.4.1