#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.
|
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(). |
|
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(). |
|
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(). |
|
Feed the complex input
Definition at line 1268 of file channel.cpp. References itpp::randn_c(), and sigma. |
|
Feed the input
Definition at line 1274 of file channel.cpp. References itpp::randn(), and sigma. |
|
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 Thu Apr 19 14:20:42 2007 for IT++ by Doxygen 1.4.6