itpp::AWGN_Channel Class Reference

Ordinary AWGN Channel for cvec or vec inputs and outputs. More...

`#include <itpp/comm/channel.h>`

## Public Member Functions

| AWGN_Channel (double noisevar=0.0)
| Class constructor. Sets the noise variance (for complex-valued channels the sum of real and imaginary parts)
void | set_noise (double noisevar)
| Set noise variance (for complex-valued channels the sum of real and imaginary parts)
double | get_noise () const
| Get noise variance (for complex-valued channels the sum of real and imaginary parts)
cvec | operator() (const cvec &input)
| Feed the complex input input through the complex-valued AWGN channel.
vec | operator() (const vec &input)
| Feed the input through the real-valued AWGN channel.

## Detailed Description

Ordinary AWGN Channel for cvec or vec inputs and outputs.

For real signals, the input parameter (noisevar) denotes the noise variance per real dimension. Therefore, it should be set to , where is the noise power spectral density. However, in case of complex signals, the input parameter (noisevar) represents the noise variance per complex dimension, i.e. the sum of the variances in the real and imaginary parts, and thus is equal to .

Example:

#include <itpp/itcomm.h>
using namespace itpp;
int main() {
// Initiate the AWGN_Channel class
double noisevar = 0.1;
AWGN_Channel awgn_channel(noisevar);
// Initiate a QPSK-modulator, and generate the transmitted signal
QPSK qpsk;
bvec transmitted_bits = randb(20);
cvec transmitted_signal = qpsk.modulate_bits(transmitted_bits);
// Usage of the member operator ()
cvec received_signal = awgn_channel(transmitted_signal);
// Demodulate the bits
bvec received_bits = qpsk.demodulate_bits(received_signal);
}
itpp::AWGN_Channel
Ordinary AWGN Channel for cvec or vec inputs and outputs.
Definition channel.h:1089
itpp::Array
General array class.
Definition array.h:105
itpp::QPSK
QPSK modulator.
Definition modulator.h:678
itpp::randb
bin randb(void)
Generates a random bit (equally likely 0s and 1s)
Definition random.h:793
itcomm.h
Include file for the IT++ communications module.
itpp
itpp namespace
Definition itmex.h:37

Definition at line 1088 of file channel.h.

## Constructor & Destructor Documentation

## AWGN_Channel()

itpp::AWGN_Channel::AWGN_Channel | ( | double | noisevar = `0.0` | ) |

inline

Class constructor. Sets the noise variance (for complex-valued channels the sum of real and imaginary parts)

Definition at line 1092 of file channel.h.

## Member Function Documentation

## set_noise()

void itpp::AWGN_Channel::set_noise | ( | double | noisevar | ) |

inline

Set noise variance (for complex-valued channels the sum of real and imaginary parts)

Definition at line 1094 of file channel.h.

## get_noise()

double itpp::AWGN_Channel::get_noise | ( |  | ) | const

inline

Get noise variance (for complex-valued channels the sum of real and imaginary parts)

Definition at line 1096 of file channel.h.

References itpp::sqr().

## operator()() [1/2]

cvec itpp::AWGN_Channel::operator() | ( | const cvec & | input | ) |

Feed the complex input input through the complex-valued AWGN channel.

Definition at line 1550 of file channel.cpp.

References itpp::Complex_Normal_RNG::sample_vector().

## operator()() [2/2]

vec itpp::AWGN_Channel::operator() | ( | const vec & | input | ) |

Feed the input through the real-valued AWGN channel.

Definition at line 1560 of file channel.cpp.

References itpp::Normal_RNG::sample_vector(), and itpp::Array< T >::size().

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

- itpp/comm/channel.h
- itpp/comm/channel.cpp

Generated on Mon Apr 22 2024 09:45:27 for IT++ by Doxygen 1.9.8