IT++ Logo Newcom Logo

itpp::QPSK Class Reference
[Digital Modulation]

QPSK-modulator class. More...

#include <itpp/comm/modulator.h>

Inheritance diagram for itpp::QPSK:

itpp::Modulator List of all members.

Public Member Functions

 QPSK ()
 Class Constructor.
virtual ~QPSK ()
 Destructor.
virtual double bits_per_symbol () const
 Returns number of bits per symbol.
virtual void modulate_bits (const bvec &bits, cvec &out) const
 Modulation of bits.
virtual cvec modulate_bits (const bvec &bits) const
 Modulation of bits.
virtual void demodulate_bits (const cvec &signal, bvec &out) const
 Demodulation of bits.
virtual bvec demodulate_bits (const cvec &signal) const
 Demodulation of bits.
virtual void demodulate_soft_bits (const cvec &rx_symbols, double N0, vec &soft_bits) const
 Soft demodulator for AWGN channels.
virtual void demodulate_soft_bits (const cvec &rx_symbols, const cvec &channel, double N0, vec &soft_bits) const
 Soft demodulator for a known channel in AWGN.
virtual void demodulate_soft_bits_approx (const cvec &rx_symbols, double N0, vec &soft_bits) const
 Soft demodulation. Same as exact soft demodulation give above.
virtual void demodulate_soft_bits_approx (const cvec &rx_symbols, const cvec &channel, double N0, vec &soft_bits) const
 Soft demodulation. Same as exact soft demodulation give above.

Detailed Description

QPSK-modulator class.

Symbol numbering is counter clockwise starting with $(1,1)/\sqrt{2}$ as symbol 0. The bits are Gray coded onto symbols. The energy is normalized to one.

Example of use:

    QPSK qpsk;
    bvec bits = "0 0 0 1 1 0 1 1";
    cvec symbols = qpsk.modulate_bits(bits);

This class can also perform soft demodulation, calculating the log-MAP estimate of the individual bits. To use the soft demodulate member functions the received symbols shall equal

\[ r_k = c_k \times s_k + n_k, \]

where $c_k$ is the complex channel gain, $s_k$ is the transmitted QPSK symbols, and $n_k$ is the AWGN of the channel (with variance $N_0/2$ in both the real and the imaginary valued components).

The input samples to the soft demodulate functions should be $r_k$. It is also assumed that the channel estimates are perfect when calculating the soft bits.

When these member functions are used together with MAP-based turbo decoding algoritms then the channel reliability factor $L_c$ of the turbo decoder shall be set to 1. The output from these member functions can also be used by a Viterbi decoder.

Definition at line 582 of file modulator.h.


Constructor & Destructor Documentation

itpp::QPSK::QPSK (  )  [inline]

Class Constructor.

Definition at line 585 of file modulator.h.

virtual itpp::QPSK::~QPSK (  )  [inline, virtual]

Destructor.

Definition at line 587 of file modulator.h.


Member Function Documentation

virtual double itpp::QPSK::bits_per_symbol (  )  const [inline, virtual]

Returns number of bits per symbol.

Implements itpp::Modulator.

Definition at line 589 of file modulator.h.

void itpp::QPSK::modulate_bits ( const bvec &  bits,
cvec &  out 
) const [virtual]

Modulation of bits.

Implements itpp::Modulator.

Definition at line 732 of file modulator.cpp.

References it_warning, and M_SQRT1_2.

Referenced by modulate_bits().

cvec itpp::QPSK::modulate_bits ( const bvec &  bits  )  const [virtual]

Modulation of bits.

Implements itpp::Modulator.

Definition at line 750 of file modulator.cpp.

References modulate_bits().

void itpp::QPSK::demodulate_bits ( const cvec &  signal,
bvec &  out 
) const [virtual]

Demodulation of bits.

Implements itpp::Modulator.

Definition at line 757 of file modulator.cpp.

References itpp::imag(), and itpp::real().

Referenced by demodulate_bits().

bvec itpp::QPSK::demodulate_bits ( const cvec &  signal  )  const [virtual]

Demodulation of bits.

Implements itpp::Modulator.

Definition at line 767 of file modulator.cpp.

References demodulate_bits().

void itpp::QPSK::demodulate_soft_bits ( const cvec &  rx_symbols,
double  N0,
vec &  soft_bits 
) const [virtual]

Soft demodulator for AWGN channels.

This function calculates the log-MAP estimates assuming equally likely bits transmitted

\[ \log \left( \frac{\Pr(b_0=0|r)}{\Pr(b_0=1|r)} \right) = \frac{4 \Re \{r\} }{N_0} \]

\[ \log \left( \frac{\Pr(b_1=0|r)}{\Pr(b_1=1|r)} \right) = \frac{4 \Im \{r\} }{N_0} \]

It is assumed that what is received is $r = s + n$. $s$ is the QPSK symbol and the mapping between symbols and bits is Gray-coded.

Parameters:
rx_symbols The received noisy constellation symbols, $r$ (real)
N0 The single sided spectral density of the AWGN noise, $n$
soft_bits The soft bits calculated using the expression above
Note: For soft demodulation it is suggested to use the N-dimensional modulator (Modulator_ND) class instead which is based on QLLR arithmetics and therefore faster and more numerically stable.

Implements itpp::Modulator.

Definition at line 776 of file modulator.cpp.

References itpp::imag(), itpp::real(), and itpp::sqrt().

Referenced by demodulate_soft_bits_approx().

void itpp::QPSK::demodulate_soft_bits ( const cvec &  rx_symbols,
const cvec &  channel,
double  N0,
vec &  soft_bits 
) const [virtual]

Soft demodulator for a known channel in AWGN.

This function calculates the log-MAP estimate assuming equally likely bits transmitted

\[ \log \left( \frac{\Pr(b_0=0|r)}{\Pr(b_0=1|r)} \right) = \frac{4 \Re \{r c^{*} \} }{N_0} \]

\[ \log \left( \frac{\Pr(b_1=0|r)}{\Pr(b_1=1|r)} \right) = \frac{4 \Im \{r c^{*} \} }{N_0} \]

It is assumed that what is received is the complex-valued model: $ r = c s + n$.

Parameters:
rx_symbols The received noisy constellation symbols, $r$ (complex)
channel The channel coefficients, $c$ (complex)
N0 The single sided spectral density of the AWGN noise, $n$
soft_bits The soft bits calculated using the expression above
Note: For soft demodulation it is suggested to use the N-dimensional modulator (Modulator_ND) class instead which is based on QLLR arithmetics and therefore faster and more numerically stable.

Implements itpp::Modulator.

Definition at line 788 of file modulator.cpp.

References itpp::conj(), itpp::imag(), itpp::real(), and itpp::sqrt().

void itpp::QPSK::demodulate_soft_bits_approx ( const cvec &  rx_symbols,
double  N0,
vec &  soft_bits 
) const [virtual]

Soft demodulation. Same as exact soft demodulation give above.

Implements itpp::Modulator.

Definition at line 803 of file modulator.cpp.

References demodulate_soft_bits().

void itpp::QPSK::demodulate_soft_bits_approx ( const cvec &  rx_symbols,
const cvec &  channel,
double  N0,
vec &  soft_bits 
) const [virtual]

Soft demodulation. Same as exact soft demodulation give above.

Implements itpp::Modulator.

Definition at line 809 of file modulator.cpp.

References demodulate_soft_bits().


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

Generated on Sat Aug 25 23:40:08 2007 for IT++ by Doxygen 1.5.2