GNU Radio's DVBS2RX Package
gr::dvbs2rx::QpskConstellation Class Reference

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)
 

Detailed Description

QPSK Constellation.

Implements vectorized QPSK operations.

Constructor & Destructor Documentation

◆ QpskConstellation()

gr::dvbs2rx::QpskConstellation::QpskConstellation ( )
inline

Construct a new Qpsk Constellation object.

◆ ~QpskConstellation()

gr::dvbs2rx::QpskConstellation::~QpskConstellation ( )
inline

Destroy the Qpsk Constellation object.

Member Function Documentation

◆ demap_soft() [1/2]

void gr::dvbs2rx::QpskConstellation::demap_soft ( int8_t *  out_buf,
const gr_complex *  in_buf,
unsigned int  n_syms,
float  N0 
)
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

Parameters
out_bufBuffer where the output quantized LLRs should be stored.
in_bufBuffer containing the input QPSK symbols.
N0Noise energy per complex dimension extracted from the estimated Es/N0.
n_symsNumber of QPSK symbols to soft-decode.

Referenced by demap_soft().

◆ demap_soft() [2/2]

void gr::dvbs2rx::QpskConstellation::demap_soft ( int8_t *  out_buf,
const volk::vector< gr_complex > &  in_syms,
float  N0 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
out_bufBuffer where the output quantized LLRs should be stored.
in_symsVector containing the input QPSK symbols.
N0Noise energy per complex dimension extracted from the estimated Es/N0.

References demap_soft().

◆ estimate_snr() [1/4]

float gr::dvbs2rx::QpskConstellation::estimate_snr ( const gr_complex *  in_syms,
const int8_t *  ref_llrs,
unsigned int  n_syms 
)
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.

Parameters
in_symsBuffer containing the input QPSK symbols.
ref_llrsBuffer containing the reference LLRs.
n_symsNumber of QPSK symbols available on the input buffer.
Returns
float Estimated linear SNR.

References slice().

◆ estimate_snr() [2/4]

float gr::dvbs2rx::QpskConstellation::estimate_snr ( const gr_complex *  in_syms,
unsigned int  n_syms 
)
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.

Parameters
in_symsBuffer containing the input QPSK symbols.
n_symsNumber of QPSK symbols available on the input buffer.
Returns
float Estimated linear SNR.
Note
Use the 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().

◆ estimate_snr() [3/4]

float gr::dvbs2rx::QpskConstellation::estimate_snr ( const volk::vector< gr_complex > &  in_syms)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
in_symsVector containing the input QPSK symbols.

References estimate_snr().

◆ estimate_snr() [4/4]

float gr::dvbs2rx::QpskConstellation::estimate_snr ( const volk::vector< gr_complex > &  in_syms,
const volk::vector< int8_t > &  ref_llrs 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
in_symsVector containing the input QPSK symbols.
ref_llrsVector containing the reference LLRs.

References estimate_snr().

◆ map() [1/2]

void gr::dvbs2rx::QpskConstellation::map ( gr_complex *  out_buf,
const int8_t *  in_bits,
unsigned int  n_bits,
bool  inv_convention = false 
)
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.

Parameters
out_bufBuffer where the mapped symbols should be stored.
in_bitsBuffer containing the input bits on unpacked int8 values.
n_bitsNumber of bits to map.
inv_conventionWhether to use the inverted mapping convention.

References SQRT2_2.

Referenced by map(), and slice().

◆ map() [2/2]

void gr::dvbs2rx::QpskConstellation::map ( gr_complex *  out_buf,
const volk::vector< int8_t > &  in_bits,
bool  inv_convention = false 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
out_bufBuffer where the mapped symbols should be stored.
in_bitsVector containing the input bits on unpacked int8 values.
inv_conventionWhether to use the inverted mapping convention.

References map().

◆ slice() [1/2]

void gr::dvbs2rx::QpskConstellation::slice ( gr_complex *  out_buf,
const gr_complex *  in_buf,
unsigned int  n_syms 
)
inline

Slice noisy input QPSK symbols to the closest constellation points.

Parameters
out_bufBuffer where the sliced symbols should be stored.
in_bufBuffer containing the input QPSK symbols.
n_symsNumber of symbols to slice.

References map().

Referenced by estimate_snr(), estimate_snr(), and slice().

◆ slice() [2/2]

void gr::dvbs2rx::QpskConstellation::slice ( gr_complex *  out_buf,
const volk::vector< gr_complex > &  in_syms 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
out_bufBuffer where the sliced symbols should be stored.
in_symsVector containing the input QPSK symbols.

References slice().


The documentation for this class was generated from the following file: