INET Framework for OMNeT++/OMNEST
inet::physicallayer::MQAMModulationBase Class Reference

Base class for gray coded rectangular quadrature amplitude modulations. More...

#include <MQAMModulationBase.h>

Inheritance diagram for inet::physicallayer::MQAMModulationBase:
inet::physicallayer::APSKModulationBase inet::physicallayer::IAPSKModulation inet::physicallayer::IModulation inet::physicallayer::IPrintableObject inet::physicallayer::BPSKModulation inet::physicallayer::MQAMModulation inet::physicallayer::QAM16Modulation inet::physicallayer::QAM256Modulation inet::physicallayer::QAM64Modulation inet::physicallayer::QBPSKModulation inet::physicallayer::QPSKModulation

Public Member Functions

 MQAMModulationBase (const std::vector< APSKSymbol > *constellation)
 
virtual double calculateSER (double snir, Hz bandwidth, bps bitrate) const override
 Returns the symbol error rate as a function of the signal to noise and interference ratio, the bandwidth, and the gross (physical) bitrate. More...
 
virtual double calculateBER (double snir, Hz bandwidth, bps bitrate) const override
 Returns the bit error rate as a function of the signal to noise and interference ratio, the bandwidth, and the gross (physical) bitrate. More...
 
- Public Member Functions inherited from inet::physicallayer::APSKModulationBase
 APSKModulationBase (const std::vector< APSKSymbol > *constellation)
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
virtual const std::vector< APSKSymbol > * getConstellation () const
 
virtual unsigned int getConstellationSize () const override
 
virtual unsigned int getCodeWordSize () const override
 
virtual const APSKSymbolmapToConstellationDiagram (const ShortBitVector &symbol) const
 
virtual ShortBitVector demapToBitRepresentation (const APSKSymbol *symbol) const
 
- Public Member Functions inherited from inet::physicallayer::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::string getInfoStringRepresentation () const
 
virtual std::string getDetailStringRepresentation () const
 
virtual std::string getDebugStringRepresentation () const
 
virtual std::string getTraceStringRepresentation () const
 
virtual std::string getCompleteStringRepresentation () const
 

Additional Inherited Members

- Public Types inherited from inet::physicallayer::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 
- Static Public Member Functions inherited from inet::physicallayer::APSKModulationBase
static const APSKModulationBasefindModulation (const char *name)
 
- Protected Attributes inherited from inet::physicallayer::APSKModulationBase
const std::vector< APSKSymbol > * constellation
 
const unsigned int codeWordSize
 
const unsigned int constellationSize
 

Detailed Description

Base class for gray coded rectangular quadrature amplitude modulations.

Constructor & Destructor Documentation

inet::physicallayer::MQAMModulationBase::MQAMModulationBase ( const std::vector< APSKSymbol > *  constellation)
24  :
26 {
27 }
APSKModulationBase(const std::vector< APSKSymbol > *constellation)
Definition: APSKModulationBase.cc:32
const std::vector< APSKSymbol > * constellation
Definition: APSKModulationBase.h:35

Member Function Documentation

double inet::physicallayer::MQAMModulationBase::calculateBER ( double  snir,
Hz  bandwidth,
bps  bitrate 
) const
overridevirtual

Returns the bit error rate as a function of the signal to noise and interference ratio, the bandwidth, and the gross (physical) bitrate.

Implements inet::physicallayer::IModulation.

Reimplemented in inet::physicallayer::BPSKModulation, and inet::physicallayer::QBPSKModulation.

40 {
41  double EbN0 = snir * bandwidth.get() / bitrate.get();
42  // http://en.wikipedia.org/wiki/Quadrature_amplitude_modulation#Rectangular_QAM
43  double Pbc = 4.0 / codeWordSize * (1 - 1 / sqrt(constellationSize)) * 0.5 * erfc(1 / sqrt(2) * sqrt(3.0 * codeWordSize / (constellationSize - 1) * EbN0));
44  return Pbc;
45 }
const unsigned int codeWordSize
Definition: APSKModulationBase.h:36
value< Value, pow< Unit, 1, 2 > > sqrt(const value< Value, Unit > &a)
Definition: Units.h:247
const unsigned int constellationSize
Definition: APSKModulationBase.h:37
double inet::physicallayer::MQAMModulationBase::calculateSER ( double  snir,
Hz  bandwidth,
bps  bitrate 
) const
overridevirtual

Returns the symbol error rate as a function of the signal to noise and interference ratio, the bandwidth, and the gross (physical) bitrate.

Implements inet::physicallayer::IModulation.

Reimplemented in inet::physicallayer::BPSKModulation, and inet::physicallayer::QBPSKModulation.

30 {
31  // http://en.wikipedia.org/wiki/Eb/N0
32  double EbN0 = snir * bandwidth.get() / bitrate.get();
33  double EsN0 = EbN0 * log2(constellationSize);
34  // http://en.wikipedia.org/wiki/Quadrature_amplitude_modulation#Rectangular_QAM
35  double Psc = 2 * (1 - 1 / sqrt(constellationSize)) * 0.5 * erfc(1 / sqrt(2) * sqrt(3.0 / (constellationSize - 1) * EsN0));
36  return 1 - (1 - Psc) * (1 - Psc);
37 }
value< Value, pow< Unit, 1, 2 > > sqrt(const value< Value, Unit > &a)
Definition: Units.h:247
const unsigned int constellationSize
Definition: APSKModulationBase.h:37

The documentation for this class was generated from the following files: