#include <ofdmreceiver.h>
Inheritance diagram for simthlib::OfdmReceiver:
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) |
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).
|
|
|
|
|
Constructor of the OFDM Receiver class.
|
|
Constructor of the OFDM Receiver class. All parameters are read from the property list.
|
|
Pure virtual constructor to make that class an abstract base class. |
|
|
|
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.
Reimplemented in simthlib::OfdmReceiverIdealEstimation, and simthlib::OfdmReceiverBce. |
|
Computes the number of time samples of the guard interval with the given length. |
|
Sets the differential decoding scheme. |
|
Returns the used differential decoding scheme. |
|
|
|
|
|
|
|
Converts the the 1-dimensional OFDM index to the subcarrier index in the 2-dimensional block of OFDM-Symbols. (Note: index starts at zero) |
|
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. |
|
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) |
|
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 ?)
|
|
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. |
|
Initalizes the given vector 'vec' with the given scrambling scheme. |
|
|
|
Returns true if linear phase correction is switched on. |
|
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. |
|
If the device need the parameter 'numPhases', this function should be called with 'state' equals true.
|
|
Returns true if the number of different phases of the received signal space is needed, false otherwise. |
|
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. |
|
|
|
|
|
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. |
|
Returns the number of different phases in the signal space. |
|
Returns the number of OFDM symbols that belongs to the number of input time samples set by the function setInputLength() and setOutputLength(), respectively. |
|
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. |
|
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.
|
|
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(). |
|
The inverse of ofdmIndex2origIndex(int ofdmIndex) const.
|
|
|
|
The inverse operation of the function index2position(int index).
|
|
Reimplemented from simthlib::Receiver. Reimplemented in simthlib::OfdmReceiverNoEstimation, simthlib::OfdmReceiverIdealEstimation, and simthlib::OfdmReceiverBce. |
|
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. |
|
|
|
|
|
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.
|
|
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(). |
|
Reimplemented from simthlib::Receiver. |
|
Subtracts the guard interval from the given signal. |
|
|
|
Transforms in a subclass a sequence of complex values to samples of a signal. |
|
Does some additional precomputation for the sake of computational efficieny. Reimplemented from simthlib::Receiver. |
|
Does some additional precomputation for the sake of computational efficieny. Reimplemented from simthlib::Receiver. |
|
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.
|