#include <itpp/comm/modulator.h>
Public Member Functions | |
Modulator_2d (const cvec &symbols="1+0i -1+0i", const ivec &bitmap="0 1") | |
Constructor. | |
virtual | ~Modulator_2d () |
Destructor. | |
void | set (const cvec &symbols, const ivec &bitmap) |
Set the symbol values to use in the modulator. | |
virtual double | bits_per_symbol () const |
Returns number of bits per symbol for the modulator. Can be noninteger. | |
cvec | get_symbols () const |
Get the symbol values used in the modulator. | |
ivec | get_bitmap () const |
Get the bitmap. | |
virtual cvec | modulate (const ivec &symbolnumbers) const |
Modulation of symbols. | |
virtual ivec | demodulate (const cvec &signal) const |
Demodulation of symbols. | |
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 &bits) 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 &chan, double N0, vec &soft_bits) const |
Soft demodulator for fading channels. | |
virtual void | demodulate_soft_bits_approx (const cvec &rx_symbols, double N0, vec &soft_bits) const |
Approximative soft demodulator for AWGN channels. | |
virtual void | demodulate_soft_bits_approx (const cvec &rx_symbols, const cvec &chan, double N0, vec &soft_bits) const |
Approximative soft demodulator for fading channels. | |
Protected Member Functions | |
void | calculate_softbit_matricies (const ivec &inbitmap) |
This function calculates the soft bit mapping matrices S0 and S1. | |
Protected Attributes | |
int | k |
Number of bits per modulation symbol. | |
int | M |
Number of modulation symbols. | |
ivec | bitmap |
Bit mapping table. | |
cvec | symbols |
Vector of modulation symbols. | |
imat | S0 |
contains the constellation points with a zero in bit position k | |
imat | S1 |
contains the constellation points with a one in bit position k |
This class can also perform soft demodulation. To use the soft demodulate member functions the received symbols shall be equal to
where is the complex channel gain,
is the transmitted constelation symbol, and
is the AWGN of the channel (with variance
in both the real and imaginary valued components).
The input samples to the soft demodulate functions shall be equal to
where is the conjugate of the channel estimate. This class assumes 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 using an AWGN based metric calculation function.
Definition at line 148 of file modulator.h.
|
Constructor.
Definition at line 128 of file modulator.cpp. References set(). |
|
Destructor.
Definition at line 153 of file modulator.h. |
|
Set the symbol values to use in the modulator.
Definition at line 133 of file modulator.cpp. References bitmap, calculate_softbit_matricies(), itpp::is_even(), it_assert, itpp::levels2bits(), M, itpp::max(), itpp::min(), and symbols. Referenced by Modulator_2d(). |
|
Returns number of bits per symbol for the modulator. Can be noninteger.
Definition at line 159 of file modulator.h. References k. |
|
Get the symbol values used in the modulator.
Definition at line 161 of file modulator.h. References symbols. |
|
Get the bitmap.
Definition at line 163 of file modulator.h. References bitmap. |
|
Modulation of symbols.
Definition at line 148 of file modulator.cpp. References symbols. |
|
Demodulation of symbols.
Definition at line 177 of file modulator.cpp. References itpp::abs(), M, and symbols. |
|
Modulation of bits.
Definition at line 156 of file modulator.cpp. References itpp::bin2dec(), bitmap, and symbols. Referenced by modulate_bits(). |
|
Modulation of bits.
Definition at line 170 of file modulator.cpp. References modulate_bits(). |
|
Demodulation of bits.
Definition at line 198 of file modulator.cpp. References itpp::abs(), k, M, and symbols. Referenced by demodulate_bits(). |
|
Demodulation of bits.
Definition at line 218 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.
Definition at line 225 of file modulator.cpp. References itpp::exp(), S0, S1, itpp::sqr(), and symbols. |
|
Soft demodulator for fading channels. This function calculates
Modulator_ND ) class instead which is based on QLLR arithmetics and therefore faster and more numerically stable.
Definition at line 262 of file modulator.cpp. References itpp::exp(), k, S0, S1, itpp::sqr(), and symbols. |
|
Approximative soft demodulator for AWGN channels.
This function is faster and gives allmost no performance degradation compared to the demodulate_soft_bits(const cvec &symbols, vec &soft_bits) function. This function finds for each bit the closest constellation point that have a zero and a one in the corresponding position. Let
Definition at line 300 of file modulator.cpp. References itpp::abs(), k, M, and symbols. |
|
Approximative soft demodulator for fading channels.
This function is faster and gives allmost no performance degradation compared to the demodulate_soft_bits(const cvec &symbols, const cvec &chan, vec &soft_bits) function. Let
.
Definition at line 333 of file modulator.cpp. References itpp::abs(), M, itpp::sqr(), and symbols. |
|
This function calculates the soft bit mapping matrices S0 and S1.
Definition at line 368 of file modulator.cpp. References itpp::dec2bin(), M, S0, and S1. Referenced by set(). |
|
Number of bits per modulation symbol.
Definition at line 269 of file modulator.h. Referenced by bits_per_symbol(), demodulate_bits(), demodulate_soft_bits(), and demodulate_soft_bits_approx(). |
|
Number of modulation symbols.
Definition at line 271 of file modulator.h. Referenced by calculate_softbit_matricies(), demodulate(), demodulate_bits(), demodulate_soft_bits_approx(), and set(). |
|
Bit mapping table.
Definition at line 273 of file modulator.h. Referenced by get_bitmap(), modulate_bits(), and set(). |
|
Vector of modulation symbols.
Definition at line 275 of file modulator.h. Referenced by demodulate(), demodulate_bits(), demodulate_soft_bits(), demodulate_soft_bits_approx(), get_symbols(), modulate(), modulate_bits(), and set(). |
|
contains the constellation points with a zero in bit position k
Definition at line 281 of file modulator.h. Referenced by calculate_softbit_matricies(), and demodulate_soft_bits(). |
|
contains the constellation points with a one in bit position k
Definition at line 284 of file modulator.h. Referenced by calculate_softbit_matricies(), and demodulate_soft_bits(). |
Generated on Thu Apr 19 14:20:03 2007 for IT++ by Doxygen 1.4.6