#include <itpp/comm/modulator.h>
Inheritance diagram for itpp::QPSK:
Public Member Functions | |
QPSK () | |
Class Constructor. | |
virtual | ~QPSK () |
Destructor. | |
virtual double | bits_per_symbol () const |
Returns number of bits per symbol. | |
virtual void | modulate_bits (const bvec &bits, cvec &out) const |
Modulation of bits. | |
virtual cvec | modulate_bits (const bvec &bits) const |
Modulation of bits. | |
virtual void | demodulate_bits (const cvec &signal, bvec &out) const |
Demodulation of bits. | |
virtual bvec | demodulate_bits (const cvec &signal) const |
Demodulation of bits. | |
virtual void | demodulate_soft_bits (const cvec &rx_symbols, double N0, vec &soft_bits) const |
Soft demodulator for AWGN channels. | |
virtual void | demodulate_soft_bits (const cvec &rx_symbols, const cvec &channel, double N0, vec &soft_bits) const |
Soft demodulator for a known channel in AWGN. | |
virtual void | demodulate_soft_bits_approx (const cvec &rx_symbols, double N0, vec &soft_bits) const |
Soft demodulation. Same as exact soft demodulation give above. | |
virtual void | demodulate_soft_bits_approx (const cvec &rx_symbols, const cvec &channel, double N0, vec &soft_bits) const |
Soft demodulation. Same as exact soft demodulation give above. |
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:
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 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 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 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.
Definition at line 582 of file modulator.h.
itpp::QPSK::QPSK | ( | ) | [inline] |
virtual itpp::QPSK::~QPSK | ( | ) | [inline, virtual] |
virtual double itpp::QPSK::bits_per_symbol | ( | ) | const [inline, virtual] |
Returns number of bits per symbol.
Implements itpp::Modulator.
Definition at line 589 of file modulator.h.
void itpp::QPSK::modulate_bits | ( | const bvec & | bits, | |
cvec & | out | |||
) | const [virtual] |
Modulation of bits.
Implements itpp::Modulator.
Definition at line 732 of file modulator.cpp.
References it_warning, and M_SQRT1_2.
Referenced by modulate_bits().
cvec itpp::QPSK::modulate_bits | ( | const bvec & | bits | ) | const [virtual] |
Modulation of bits.
Implements itpp::Modulator.
Definition at line 750 of file modulator.cpp.
References modulate_bits().
void itpp::QPSK::demodulate_bits | ( | const cvec & | signal, | |
bvec & | out | |||
) | const [virtual] |
Demodulation of bits.
Implements itpp::Modulator.
Definition at line 757 of file modulator.cpp.
References itpp::imag(), and itpp::real().
Referenced by demodulate_bits().
bvec itpp::QPSK::demodulate_bits | ( | const cvec & | signal | ) | const [virtual] |
Demodulation of bits.
Implements itpp::Modulator.
Definition at line 767 of file modulator.cpp.
References demodulate_bits().
void itpp::QPSK::demodulate_soft_bits | ( | const cvec & | rx_symbols, | |
double | N0, | |||
vec & | soft_bits | |||
) | const [virtual] |
Soft demodulator for AWGN channels.
This function calculates the log-MAP 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 Gray-coded.
rx_symbols | The received noisy constellation symbols, ![]() | |
N0 | The single sided spectral density of the AWGN noise, ![]() | |
soft_bits | The soft bits calculated using the expression above |
Modulator_ND
) class instead which is based on QLLR arithmetics and therefore faster and more numerically stable.
Implements itpp::Modulator.
Definition at line 776 of file modulator.cpp.
References itpp::imag(), itpp::real(), and itpp::sqrt().
Referenced by demodulate_soft_bits_approx().
void itpp::QPSK::demodulate_soft_bits | ( | const cvec & | rx_symbols, | |
const cvec & | channel, | |||
double | N0, | |||
vec & | soft_bits | |||
) | const [virtual] |
Soft demodulator for a known channel in AWGN.
This function calculates the log-MAP estimate assuming equally likely bits transmitted
It is assumed that what is received is the complex-valued model: .
rx_symbols | The received noisy constellation symbols, ![]() | |
channel | The channel coefficients, ![]() | |
N0 | The single sided spectral density of the AWGN noise, ![]() | |
soft_bits | The soft bits calculated using the expression above |
Modulator_ND
) class instead which is based on QLLR arithmetics and therefore faster and more numerically stable.
Implements itpp::Modulator.
Definition at line 788 of file modulator.cpp.
References itpp::conj(), itpp::imag(), itpp::real(), and itpp::sqrt().
void itpp::QPSK::demodulate_soft_bits_approx | ( | const cvec & | rx_symbols, | |
double | N0, | |||
vec & | soft_bits | |||
) | const [virtual] |
Soft demodulation. Same as exact soft demodulation give above.
Implements itpp::Modulator.
Definition at line 803 of file modulator.cpp.
References demodulate_soft_bits().
void itpp::QPSK::demodulate_soft_bits_approx | ( | const cvec & | rx_symbols, | |
const cvec & | channel, | |||
double | N0, | |||
vec & | soft_bits | |||
) | const [virtual] |
Soft demodulation. Same as exact soft demodulation give above.
Implements itpp::Modulator.
Definition at line 809 of file modulator.cpp.
References demodulate_soft_bits().
Generated on Sat Aug 25 23:40:35 2007 for IT++ by Doxygen 1.5.2