#include <modulator.h>
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. |
M-ary PSK modulator with . 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
where is the complex channel gain,
is the transmitted M-PSK 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
|
|
Soft demodulator for AWGN channels. This function calculates
where
|
|
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.
|
|
Number of modulation symbols.
|
|
Matrix where row k contains the constellation symbol numbers where bit k is 0.
|
|
Matrix where row k contains the constellation symbol numbers where bit k is 1.
|
|
A vector containing the modulation symbols.
|