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

SPUC::MOD_QAM Class Reference
[Digital Modulation]

Modulator class for square lattice Mary-QAM signals. More...

#include <modulator.h>

List of all members.

Public Member Functions

 MOD_QAM (int Mary)
 Class Constructor.
virtual ~MOD_QAM ()
 Destructor.
void modulate_bits (const bvec &bits, cvec &out)
 Modulation of bits.
cvec modulate_bits (const bvec &bits)
 Modulation of bits.
void demodulate_bits (const cvec &signal, bvec &out)
 Demodulation of bits.
bvec demodulate_bits (const cvec &signal)
 Demodulation of bits.
void demodulate_soft_bits (const cvec &rx_symbols, double N0, vec &soft_bits)
 Soft demodulator for AWGN channels.
void demodulate_soft_bits (const cvec &rx_symbols, const cvec &channel, double N0, vec &soft_bits)
 Soft demodulator for the Rayleigh fading channel.
void set_M (int Mary)
 Change the size of the signal constellation.
cvec get_symbols ()
 Return the constellation symbols used.
ivec get_bitmap ()
 Return the bit mapping used in decimal form.

Protected Attributes

int k
 Number of bits per modulation symbol.
int M
 Number of modulation symbols.
int L
 The square-root of M.
bmat bitmap
 Bit patterns for symbols in order of symbol number.
ivec bits2symbols
 Bit pattern in decimal form ordered and the corresponding symbols.
cvec symbols
 A vector containing the modulation symbols.
double average_energy
 The average signal energy of the constallation.
double scaling_factor
 Scaling factor used to normalize the average energy to 1.
imat S0
 Matrix where row k contains the constellation symbol numbers where bit k is 0/1.
imat S1
 Matrix where row k contains the constellation symbol numbers where bit k is 0/1.


Detailed Description

Modulator class for square lattice Mary-QAM signals.

The size of the signal constellation is $M = 2^k,\_ k = 2, 3, \ldots $ The symbol values in each dimension is: $ \{ \sqrt{M}-1, \ldots, 3, 1, -1, -3, \ldots,-(\sqrt{M}-1) \} $

Symbol numbering:

The symbols are normalized so that the average energy is 1. That is, normalized with $ \sqrt{2*(M-1)/3}$ .

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 QAM 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.


Constructor & Destructor Documentation

SPUC::MOD_QAM::MOD_QAM int  Mary  )  [inline]
 

Class Constructor.

Here is the call graph for this function:

virtual SPUC::MOD_QAM::~MOD_QAM  )  [inline, virtual]
 

Destructor.


Member Function Documentation

bvec MOD_QAM::demodulate_bits const cvec &  signal  ) 
 

Demodulation of bits.

void MOD_QAM::demodulate_bits const cvec &  signal,
bvec &  out
 

Demodulation of bits.

void MOD_QAM::demodulate_soft_bits const cvec &  rx_symbols,
const cvec &  channel,
double  N0,
vec &  soft_bits
 

Soft demodulator for the Rayleigh fading channel.

This function calculates

\[ \log \left( \frac{\Pr(b_i=0|r)}{\Pr(b_i=1|r)} \right) = \log \left( \frac{ \sum_{s_i \in S_0} \exp \left( -\frac{ |r - c s_i|^2 }{N_0} \right) } { \sum_{s_i \in S_1} \exp \left( -\frac{ |r - c s_i|^2 }{N_0} \right) } \right) \]

where $s_i \in S_0$ denotes a constellation symbol with the i-th bit equal to zero.

Parameters:
rx_symbols The received noisy constellation symbols, $r$
channel The channel coefficients (complex),

void MOD_QAM::demodulate_soft_bits const cvec &  rx_symbols,
double  N0,
vec &  soft_bits
 

Soft demodulator for AWGN channels.

This function calculates

\[ \log \left( \frac{\Pr(b_i=0|r)}{\Pr(b_i=1|r)} \right) = \log \left( \frac{ \sum_{s_i \in S_0} \exp \left( -\frac{ |r - s_i|^2 }{N_0} \right) } { \sum_{s_i \in S_1} \exp \left( -\frac{ |r - s_i|^2 }{N_0} \right) } \right) \]

where $s_i \in S_0$ denotes a constellation symbol with the i-th bit equal to zero. This function can be used on channels where the channel gain is $c = 1$ .

Parameters:
rx_symbols The received noisy constellation symbols, $r$
N0 The single sided spectral density of the AWGN noise
soft_bits The soft bits calculated using the expression above

ivec SPUC::MOD_QAM::get_bitmap void   )  [inline]
 

Return the bit mapping used in decimal form.

cvec SPUC::MOD_QAM::get_symbols void   )  [inline]
 

Return the constellation symbols used.

cvec MOD_QAM::modulate_bits const bvec &  bits  ) 
 

Modulation of bits.

void MOD_QAM::modulate_bits const bvec &  bits,
cvec &  out
 

Modulation of bits.

void MOD_QAM::set_M int  Mary  ) 
 

Change the size of the signal constellation.


Member Data Documentation

double SPUC::MOD_QAM::average_energy [protected]
 

The average signal energy of the constallation.

bmat SPUC::MOD_QAM::bitmap [protected]
 

Bit patterns for symbols in order of symbol number.

ivec SPUC::MOD_QAM::bits2symbols [protected]
 

Bit pattern in decimal form ordered and the corresponding symbols.

int SPUC::MOD_QAM::k [protected]
 

Number of bits per modulation symbol.

int SPUC::MOD_QAM::L [protected]
 

The square-root of M.

int SPUC::MOD_QAM::M [protected]
 

Number of modulation symbols.

imat SPUC::MOD_QAM::S0 [protected]
 

Matrix where row k contains the constellation symbol numbers where bit k is 0/1.

imat SPUC::MOD_QAM::S1 [protected]
 

Matrix where row k contains the constellation symbol numbers where bit k is 0/1.

double SPUC::MOD_QAM::scaling_factor [protected]
 

Scaling factor used to normalize the average energy to 1.

cvec SPUC::MOD_QAM::symbols [protected]
 

A vector containing the modulation symbols.


The documentation for this class was generated from the following files:
Generated on Fri Sep 16 11:07:55 2005 for spuc by  doxygen 1.4.4