IT++ Logo Newcom Logo

itpp::AWGN_Channel Class Reference
[Communication Channel Models]

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

#include <itpp/comm/channel.h>

List of all members.

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 ()
 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.

Protected Attributes

double sigma
 Standard deviation of the AWGN.


Detailed Description

Ordinary AWGN Channel for cvec or vec inputs and outputs.

For real signals, the input parameter (noisevar) should be set to $N_0/2$, where $N_0$ is the noise spectral density. However, in case of complex signals, the input parameter (noisevar) represents the total noise variance of both real and imaginary parts, and thus is equal to $N_0$.

Example:

    #include "itpp/itcomm.h"

    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);
    }

Definition at line 857 of file channel.h.


Constructor & Destructor Documentation

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 860 of file channel.h.

References sigma, and itpp::sqrt().


Member Function Documentation

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 862 of file channel.h.

References sigma, and itpp::sqrt().

double itpp::AWGN_Channel::get_noise (  )  [inline]

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

Definition at line 864 of file channel.h.

References sigma, and itpp::sqr().

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

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

Definition at line 1268 of file channel.cpp.

References itpp::randn_c(), and sigma.

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

Feed the input through the real-valued AWGN channel.

Definition at line 1274 of file channel.cpp.

References itpp::randn(), and sigma.


Member Data Documentation

double itpp::AWGN_Channel::sigma [protected]

Standard deviation of the AWGN.

Definition at line 871 of file channel.h.

Referenced by AWGN_Channel(), get_noise(), operator()(), and set_noise().


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

Generated on Thu Aug 30 02:47:24 2007 for IT++ by Doxygen 1.5.3