#include <modulator.h>
Public Member Functions  
MOD_QPSK ()  
Class Constructor.  
virtual  ~MOD_QPSK () 
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. 
Symbol numbering is counter clockwise starting with as symbol 0. The bits are Gray coded onto symbols. The energy is normalized to one.
Example of use:
MOD_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 logMAP estimate of the individual bits. To use the soft demodulate member functions the received symbols shall equal
where is the complex channel gain, is the transmitted QPSK symbols, and is the AWGN of the channel (with variance in both the real and the imaginary valued components).
The input samples to the soft demodulate functions should be . It is also assumed that the channel estimates are perfect when calculating the soft bits.
When these member functions are used together with MAPbased turbo decoding algoritms then the channel reliability factor of the turbo decoder shall be set to 1. The output from these member functions can also be used by a Viterbi decoder.

Class Constructor.


Destructor.


Demodulation of bits.


Demodulation of bits.


Soft demodulator for the Rayleigh fading channel. This function calculates the logMAP estimate assuming equally likely bits transmitted
It is assumed that what is received is the complexvalued model: .


Soft demodulator for AWGN channels. This function calculates the logMAP estimates assuming equally likely bits transmitted
It is assumed that what is received is . is the QPSK symbol and the mapping between symbols and bits is Graycoded.


Modulation of bits.


Modulation of bits.
