#include <itpp/comm/modulator.h>
Inheritance diagram for itpp::PSK:
Public Member Functions | |
PSK (int Mary) | |
Class constructor. | |
virtual | ~PSK () |
Destructor. | |
void | set_M (int Mary) |
Change the size of the signal constellation. | |
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_approx (const cvec &rx_symbols, double N0, vec &soft_bits) const |
Approximative soft demodulator for AWGN channel. | |
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, const cvec &channel, double N0, vec &soft_bits) const |
Approximative soft demodulator for a known channel in AWGN. | |
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.
Definition at line 696 of file modulator.h.
|
Class constructor.
Definition at line 699 of file modulator.h. |
|
Destructor.
Definition at line 701 of file modulator.h. |
|
Change the size of the signal constellation.
Definition at line 959 of file modulator.cpp. References itpp::bin2dec(), bitmap, bits2symbols, itpp::Mat< Num_T >::get_row(), itpp::graycode(), itpp::imag(), it_assert, k, itpp::log2(), M, itpp::pow2i(), itpp::real(), itpp::round_i(), S0, S1, itpp::Mat< Num_T >::set_size(), itpp::Vec< Num_T >::set_size(), and symbols. |
|
Returns number of bits per symbol.
Implements itpp::Modulator. Definition at line 706 of file modulator.h. |
|
Modulation of bits.
Implements itpp::Modulator. Definition at line 819 of file modulator.cpp. References itpp::bin2dec(), bits2symbols, it_warning, k, itpp::Vec< Num_T >::length(), itpp::Vec< Num_T >::mid(), itpp::Vec< Num_T >::set_size(), and symbols. Referenced by modulate_bits(). |
|
Modulation of bits.
Implements itpp::Modulator. Definition at line 835 of file modulator.cpp. References modulate_bits(), and itpp::Vec< Num_T >::size(). |
|
Demodulation of bits.
Implements itpp::Modulator. Definition at line 842 of file modulator.cpp. References itpp::arg(), bitmap, itpp::Mat< Num_T >::get_row(), k, M, itpp::Vec< Num_T >::replace_mid(), itpp::round_i(), itpp::Vec< Num_T >::set_size(), and itpp::Vec< Num_T >::size(). Referenced by demodulate_bits(). |
|
Demodulation of bits.
Implements itpp::Modulator. Definition at line 857 of file modulator.cpp. References demodulate_bits(). |
|
Soft demodulator for AWGN channels. This function calculates
where
Modulator_ND ) class instead which is based on QLLR arithmetics and therefore faster and more numerically stable.
Implements itpp::Modulator. Definition at line 864 of file modulator.cpp. References itpp::exp(), k, M, S0, S1, itpp::Vec< Num_T >::set_size(), itpp::Vec< Num_T >::size(), itpp::sqr(), and symbols. |
|
Approximative soft demodulator for AWGN channel. This function is faster and gives almost no performance degradation compared to the demodulate_soft_bits() function. Only include the largest term in nominator and denominator when calculating the log-likelihood function. Implements itpp::Modulator. Definition at line 888 of file modulator.cpp. References k, M, S0, S1, itpp::Vec< Num_T >::set_size(), itpp::Vec< Num_T >::size(), itpp::sqr(), and symbols. |
|
Soft demodulator for a known channel in AWGN. This function calculates
where
Modulator_ND ) class instead which is based on QLLR arithmetics and therefore faster and more numerically stable.
Implements itpp::Modulator. Definition at line 911 of file modulator.cpp. References itpp::exp(), k, M, S0, S1, itpp::Vec< Num_T >::set_size(), itpp::Vec< Num_T >::size(), itpp::sqr(), and symbols. |
|
Approximative soft demodulator for a known channel in AWGN. This function is faster and gives almost no performance degradation compared to the demodulate_soft_bits() function. Only include the largest term in nominator and denominator when calculating the log-likelihood function. Implements itpp::Modulator. Definition at line 935 of file modulator.cpp. References k, M, S0, S1, itpp::Vec< Num_T >::set_size(), itpp::Vec< Num_T >::size(), itpp::sqr(), and symbols. |
|
Number of bits per modulation symbol.
Definition at line 794 of file modulator.h. Referenced by demodulate_bits(), demodulate_soft_bits(), demodulate_soft_bits_approx(), modulate_bits(), and set_M(). |
|
Number of modulation symbols.
Definition at line 796 of file modulator.h. Referenced by demodulate_bits(), demodulate_soft_bits(), demodulate_soft_bits_approx(), and set_M(). |
|
bit patterns for symbols in order of symbol number
Definition at line 798 of file modulator.h. Referenced by demodulate_bits(), and set_M(). |
|
bit pattern in decimal form ordered and the corresponding symbols
Definition at line 800 of file modulator.h. Referenced by modulate_bits(), and set_M(). |
|
A vector containing the modulation symbols.
Definition at line 802 of file modulator.h. Referenced by demodulate_soft_bits(), demodulate_soft_bits_approx(), modulate_bits(), and set_M(). |
|
The average signal energy of the constallation.
Definition at line 804 of file modulator.h. |
|
Matrix where row k contains the constellation symbol numbers where bit k is 0.
Definition at line 807 of file modulator.h. Referenced by demodulate_soft_bits(), demodulate_soft_bits_approx(), and set_M(). |
|
Matrix where row k contains the constellation symbol numbers where bit k is 1.
Definition at line 810 of file modulator.h. Referenced by demodulate_soft_bits(), demodulate_soft_bits_approx(), and set_M(). |
Generated on Fri Jan 11 08:51:42 2008 for IT++ by Doxygen 1.3.9.1