#include <modulator.h>
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. |
The size of the signal constellation is The symbol values in each dimension is:
The symbols are normalized so that the average energy is 1. That is, normalized with .
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
where is the complex channel gain, is the transmitted QAM 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 MAP-based 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.
Here is the call graph for this function: |
|
Destructor.
|
|
Demodulation of bits.
|
|
Demodulation of bits.
|
|
Soft demodulator for the Rayleigh fading channel. This function calculates
where denotes a constellation symbol with the i-th bit equal to zero.
|
|
Soft demodulator for AWGN channels. This function calculates
where denotes a constellation symbol with the i-th bit equal to zero. This function can be used on channels where the channel gain is .
|
|
Return the bit mapping used in decimal form.
|
|
Return the constellation symbols used.
|
|
Modulation of bits.
|
|
Modulation of bits.
|
|
Change the size of the signal constellation.
|
|
The average signal energy of the constallation.
|
|
Bit patterns for symbols in order of symbol number.
|
|
Bit pattern in decimal form ordered and the corresponding symbols.
|
|
Number of bits per modulation symbol.
|
|
The square-root of M.
|
|
Number of modulation symbols.
|
|
Matrix where row k contains the constellation symbol numbers where bit k is 0/1.
|
|
Matrix where row k contains the constellation symbol numbers where bit k is 0/1.
|
|
Scaling factor used to normalize the average energy to 1.
|
|
A vector containing the modulation symbols.
|