GNU Radio's DVBS2RX Package
|
QPSK Constellation. More...
#include <qpsk.h>
Public Member Functions | |
QpskConstellation () | |
Construct a new Qpsk Constellation object. | |
~QpskConstellation () | |
Destroy the Qpsk Constellation object. | |
void | map (gr_complex *out_buf, const int8_t *in_bits, unsigned int n_bits, bool inv_convention=false) |
Map input bits to QPSK symbols. | |
void | map (gr_complex *out_buf, const volk::vector< int8_t > &in_bits, bool inv_convention=false) |
void | slice (gr_complex *out_buf, const gr_complex *in_buf, unsigned int n_syms) |
Slice noisy input QPSK symbols to the closest constellation points. | |
void | slice (gr_complex *out_buf, const volk::vector< gr_complex > &in_syms) |
void | demap_soft (int8_t *out_buf, const gr_complex *in_buf, unsigned int n_syms, float N0) |
Soft-demap noisy input QPSK symbols into quantized LLRs. | |
void | demap_soft (int8_t *out_buf, const volk::vector< gr_complex > &in_syms, float N0) |
float | estimate_snr (const gr_complex *in_syms, unsigned int n_syms) |
Estimate the linear SNR of input QPSK symbols. | |
float | estimate_snr (const volk::vector< gr_complex > &in_syms) |
float | estimate_snr (const gr_complex *in_syms, const int8_t *ref_llrs, unsigned int n_syms) |
Estimate the linear SNR based on input QPSK symbols and reference LLRs. | |
float | estimate_snr (const volk::vector< gr_complex > &in_syms, const volk::vector< int8_t > &ref_llrs) |
QPSK Constellation.
Implements vectorized QPSK operations.
|
inline |
Construct a new Qpsk Constellation object.
|
inline |
Destroy the Qpsk Constellation object.
|
inline |
Soft-demap noisy input QPSK symbols into quantized LLRs.
As explained in the mapping function, for each pair of bits b1b0, the MSB b1 is tied to the real part and the LSB b0 to the imaginary part. Hence, the theoretical LLR values for each bit are:
LLR(b1) = 2 * sqrt(2) * Re(x) / N0 LLR(b0) = 2 * sqrt(2) * Im(x) / N0
out_buf | Buffer where the output quantized LLRs should be stored. |
in_buf | Buffer containing the input QPSK symbols. |
N0 | Noise energy per complex dimension extracted from the estimated Es/N0. |
n_syms | Number of QPSK symbols to soft-decode. |
Referenced by demap_soft().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
out_buf | Buffer where the output quantized LLRs should be stored. |
in_syms | Vector containing the input QPSK symbols. |
N0 | Noise energy per complex dimension extracted from the estimated Es/N0. |
References demap_soft().
|
inline |
Estimate the linear SNR based on input QPSK symbols and reference LLRs.
Uses the input reference LLRs (e.g., out of the LDPC decoder) to obtain the reference constellation points. Then, measures the error between the input QPSK symbols and the reference constellation points to estimate the linear SNR.
in_syms | Buffer containing the input QPSK symbols. |
ref_llrs | Buffer containing the reference LLRs. |
n_syms | Number of QPSK symbols available on the input buffer. |
References slice().
|
inline |
Estimate the linear SNR of input QPSK symbols.
Slices the input symbols with hard-demapping and uses the resulting sliced symbols as the reference (ideal constellation points) for the measurement.
in_syms | Buffer containing the input QPSK symbols. |
n_syms | Number of QPSK symbols available on the input buffer. |
estimate_snr()
overloaded method with the ref_llrs arguments to estimate the post-decoder SNR when decoded LLRs are available to obtain more accurate reference constellation points. References slice().
Referenced by estimate_snr(), and estimate_snr().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
in_syms | Vector containing the input QPSK symbols. |
References estimate_snr().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
in_syms | Vector containing the input QPSK symbols. |
ref_llrs | Vector containing the reference LLRs. |
References estimate_snr().
|
inline |
Map input bits to QPSK symbols.
Supports mapping with the standard (normal) convention and an inverted convention that is useful for the slicing implementation.
Standard convention: b1b0 -> Real + j*Imaginary 00 -> +sqrt(2)/2 + j*sqrt(2)/2 01 -> +sqrt(2)/2 - j*sqrt(2)/2 10 -> -sqrt(2)/2 + j*sqrt(2)/2 11 -> -sqrt(2)/2 - j*sqrt(2)/2
Note: the MSB b1 is tied to the real part and the LSB b0 to the imaginary part. The real part is positive for b1=0 and negative for b1=1. Likewise, the imaginary part is positive for b0=0 and negative for b0=1.
Inverted convention: b1b0 -> Real + j*Imaginary 00 -> -sqrt(2)/2 - j*sqrt(2)/2 01 -> -sqrt(2)/2 + j*sqrt(2)/2 10 -> +sqrt(2)/2 - j*sqrt(2)/2 11 -> +sqrt(2)/2 + j*sqrt(2)/2
The difference in the inverted convention is that bit=1 is mapped to a positive value (+sqrt(2)/2) and bit=0 to a negative value (-sqrt(2)/2) instead of the other way around.
out_buf | Buffer where the mapped symbols should be stored. |
in_bits | Buffer containing the input bits on unpacked int8 values. |
n_bits | Number of bits to map. |
inv_convention | Whether to use the inverted mapping convention. |
References SQRT2_2.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
out_buf | Buffer where the mapped symbols should be stored. |
in_bits | Vector containing the input bits on unpacked int8 values. |
inv_convention | Whether to use the inverted mapping convention. |
References map().
|
inline |
Slice noisy input QPSK symbols to the closest constellation points.
out_buf | Buffer where the sliced symbols should be stored. |
in_buf | Buffer containing the input QPSK symbols. |
n_syms | Number of symbols to slice. |
References map().
Referenced by estimate_snr(), estimate_snr(), and slice().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
out_buf | Buffer where the sliced symbols should be stored. |
in_syms | Vector containing the input QPSK symbols. |
References slice().