C(++)ECCO
C++ Error Control COding: a header-only library for ECC simulations and experiments, modeling complete coding systems across arbitrary finite fields and complex inter-field relationships - Christian Senger <senger@inue.uni-stuttgart.de>
Loading...
Searching...
No Matches
CECCO::AWGN Class Reference

Additive White Gaussian Noise channel for complex-valued symbols. More...

#include <blocks.hpp>

Inheritance diagram for CECCO::AWGN:
Inheritance graph

Public Member Functions

 AWGN (double EbNodB, double a, double b)
 Construct with SNR and constellation parameters.
std::complex< double > operator() (const std::complex< double > &in)
 Add Gaussian noise to a complex symbol.
double get_capacity () const noexcept
 Shannon capacity in bits per symbol (real signaling).
Noise Parameters
double get_variance () const noexcept
 Noise variance σ² (per real component).
double get_standard_deviation () const noexcept
 Noise standard deviation σ (per real component).
constexpr double get_pe () const noexcept
 Theoretical hard-decision bit error probability for the configured constellation/SNR.
Public Member Functions inherited from CECCO::details::BlockProcessor< T, ElementType, ElementType >
Vector< ElementType > operator() (const Vector< ElementType > &in)
 Apply the block element-wise to each vector entry.
Vector< ElementType > operator() (Vector< ElementType > &&in)
 Apply the block element-wise (rvalue input).
Matrix< ElementType > operator() (const Matrix< ElementType > &in)
 Apply the block element-wise to each matrix entry.
Matrix< ElementType > operator() (Matrix< ElementType > &&in)
 Apply the block element-wise (rvalue input).
ElementType operator() (const U &)
 Catch-all for inputs whose element type differs from InputType.
Vector< ElementType > operator() (const Vector< U > &)
Matrix< ElementType > operator() (const Matrix< U > &)

Additional Inherited Members

Protected Member Functions inherited from CECCO::details::BlockProcessor< T, ElementType, ElementType >
const T & derived () const noexcept
T & derived () noexcept

Detailed Description

Additive White Gaussian Noise channel for complex-valued symbols.

Adds independent 𝒩(0, σ²) noise to the real and imaginary parts of each input symbol. The noise variance is derived from the SNR Eb/N₀ and the constellation parameters supplied at construction: σ² = Eb / (2 · 10^(EbN0dB/10)).

For NRZ/BPSK input the bit error probability after a hard decision is Pe = ½ · erfc(√( b²·Eb/N₀ / (4·Eb) )), available via get_pe.

AWGN awgn(6.0, map.get_a(), map.get_b()); // 6 dB Eb/N₀
Vector<Fp<2>> message = {0, 1, 1, 0};
Vector<std::complex<double>> y = message >> map >> awgn;
AWGN(double EbNodB, double a, double b)
Construct with SNR and constellation parameters.
Definition blocks.hpp:550
Binary Phase Shift Keying mapper — NRZMapper with a = 0, b = 2.
Definition blocks.hpp:513
constexpr double get_b() const noexcept
Constellation distance parameter b.
Definition blocks.hpp:485
constexpr double get_a() const noexcept
DC offset parameter a.
Definition blocks.hpp:482
Vector v = (v₀, v₁, …, vₙ₋₁) over a CECCO::ComponentType.
Definition vectors.hpp:115
See also
CECCO::NRZMapper, CECCO::BPSKMapper, CECCO::BI_AWGN, CECCO::LLRCalculator

Definition at line 539 of file blocks.hpp.

Constructor & Destructor Documentation

◆ AWGN()

CECCO::AWGN::AWGN ( double EbNodB,
double a,
double b )
inline

Construct with SNR and constellation parameters.

Parameters
EbNodBSNR Eb/N₀ in dB
aDC offset of the source constellation
bConstellation distance of the source constellation

Definition at line 550 of file blocks.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ get_capacity()

double CECCO::AWGN::get_capacity ( ) const
inlinenoexcept

Shannon capacity in bits per symbol (real signaling).

Returns
C = ½·log₂(1 + Eb/σ²) for one real dimension (NRZ/BPSK).

For complex signaling with noise on both I and Q the formula is C = log₂(1 + Eb/(2σ²)).

Definition at line 589 of file blocks.hpp.

Here is the call graph for this function:

◆ get_pe()

double CECCO::AWGN::get_pe ( ) const
inlineconstexprnoexcept

Theoretical hard-decision bit error probability for the configured constellation/SNR.

Definition at line 569 of file blocks.hpp.

◆ get_standard_deviation()

double CECCO::AWGN::get_standard_deviation ( ) const
inlinenoexcept

Noise standard deviation σ (per real component).

Definition at line 566 of file blocks.hpp.

Here is the caller graph for this function:

◆ get_variance()

double CECCO::AWGN::get_variance ( ) const
inlinenoexcept

Noise variance σ² (per real component).

Definition at line 560 of file blocks.hpp.

Here is the caller graph for this function:

◆ operator()()

std::complex< double > CECCO::AWGN::operator() ( const std::complex< double > & in)
inline

Add Gaussian noise to a complex symbol.

Parameters
inInput symbol
Returns
Symbol with independent Gaussian noise added to each real component

Definition at line 578 of file blocks.hpp.


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