#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 () |
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. |
For real signals, the input parameter (noisevar
) should be set to , where
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 .
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.
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().
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.
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().
Generated on Wed Apr 18 11:23:41 2007 for IT++ by Doxygen 1.5.2