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

SPUC::MOD_PSK Class Reference
[Digital Modulation]

Mary-PSK modulator. More...

#include <modulator.h>

List of all members.

Public Member Functions

 MOD_PSK (int Mary)
 Class constructor.
virtual ~MOD_PSK ()
 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.

Protected Attributes

int k
 Number of bits per modulation symbol.
int M
 Number of modulation symbols.
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.
imat S0
 Matrix where row k contains the constellation symbol numbers where bit k is 0.
imat S1
 Matrix where row k contains the constellation symbol numbers where bit k is 1.


Detailed Description

Mary-PSK modulator.

M-ary PSK modulator with $M = 2^k, \_ k = 1, 2, \ldots $ . Symbol numbering counter clockwise starting from the real axis. The bit map is Gray encoded. The symbol energy is 1.

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 M-PSK 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_PSK::MOD_PSK int  Mary  )  [inline]
 

Class constructor.

Here is the call graph for this function:

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

Destructor.


Member Function Documentation

bvec MOD_PSK::demodulate_bits const cvec &  signal  ) 
 

Demodulation of bits.

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

Demodulation of bits.

void MOD_PSK::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), $c$
N0 The single sided spectral density of the AWGN noise
soft_bits The soft bits calculated using the expression above

void MOD_PSK::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

cvec MOD_PSK::modulate_bits const bvec &  bits  ) 
 

Modulation of bits.

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

Modulation of bits.

void MOD_PSK::set_M int  Mary  ) 
 

Change the size of the signal constellation.


Member Data Documentation

double SPUC::MOD_PSK::average_energy [protected]
 

The average signal energy of the constallation.

bmat SPUC::MOD_PSK::bitmap [protected]
 

bit patterns for symbols in order of symbol number

ivec SPUC::MOD_PSK::bits2symbols [protected]
 

bit pattern in decimal form ordered and the corresponding symbols

int SPUC::MOD_PSK::k [protected]
 

Number of bits per modulation symbol.

int SPUC::MOD_PSK::M [protected]
 

Number of modulation symbols.

imat SPUC::MOD_PSK::S0 [protected]
 

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

imat SPUC::MOD_PSK::S1 [protected]
 

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

cvec SPUC::MOD_PSK::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