![]() |
four_multi
Multi-Antenna,Multi-Node,Multi-Band,Multi-Cell
|
This class is implements a basic block fading channel model. More...
#include <simulator.hpp>
Public Member Functions | |
virtual void | sub_channel (uint32_t from_node_ix, uint32_t to_node_ix, uint32_t from_antenna_ix, uint32_t to_antenna_ix, double freq_tx, double freq_rx, double time, double gain_tx, double gain_rx, std::complex< short int > const *signal_in, std::complex< short int > *signal_out, uint32_t number_of_samples) |
virtual void | add_noise (double gain_rx, std::complex< short int > *signal, uint32_t number_of_samples) |
virtual void | reset (void) |
Public Attributes | |
itpp::cmat | old_h [max_num_nodes][max_num_nodes][max_num_taps] |
itpp::mat | old_time [max_num_nodes][max_num_nodes] |
double | scaling_signal |
double | path_gain [max_num_nodes][max_num_nodes] |
double | scaling_noise |
double | forgetting_factor |
bool | is_awgn |
bool | is_diagonal |
uint32_t | num_of_taps |
unsigned int | seed |
Static Public Attributes | |
static const int unsigned | max_num_ant = 20 |
static const int unsigned | max_num_nodes = 10 |
static const int unsigned | max_num_taps = 10 |
This class is implements a basic block fading channel model.
As the name suggests the class implements block fading i.e. the channel between two nodes is assumed constant for the duration of a burst. The class has several important parameters which can be used to tune the behaviour. The channel distribution is either Rayleigh or fixed, the channel variation is AR(1), the delay-spread is rectangular, and the noise is additive white circular symmetric complex Gaussian. The fading of all channel indecies are independent. The impact of TX and RX gain settings have not yet been implemented.
Definition at line 195 of file simulator.hpp.
void block_fading::add_noise | ( | double | gain_rx, |
std::complex< short int > * | signal, | ||
uint32_t | number_of_samples | ||
) | [virtual] |
The noise model.
gain_rx | Gain of the receiver chain. |
signal | Pointer to noise-free received signal. |
number_of_samples | Buffer size |
Implements channel_model.
Definition at line 334 of file simulator.cpp.
void block_fading::sub_channel | ( | uint32_t | from_node_ix, |
uint32_t | to_node_ix, | ||
uint32_t | from_antenna_ix, | ||
uint32_t | to_antenna_ix, | ||
double | freq_tx, | ||
double | freq_rx, | ||
double | time, | ||
double | gain_tx, | ||
double | gain_rx, | ||
std::complex< short int > const * | signal_in, | ||
std::complex< short int > * | signal_out, | ||
uint32_t | number_of_samples | ||
) | [virtual] |
Transfer function between two antennas in the system.
from_node_ix | Transmitter node index. |
to_node_ix | Receiver node index. |
from_antenna_ix | Transmitter antenna index. |
to_antenna_ix | Receiver antenna index. |
freq_tx | Frequency of transmitter (Hz). |
freq_rx | Frequency of receiver (Hz). |
time | Time in seconds. |
gain_tx | Gain setting of transmitter chain. |
gain_rx | Gain setting of receiver chain, |
signal_in | Pointer to buffer of transmitter samples. |
signal_out | Pointer to buffer of receiver samples. |
number_of_samples | Buffer size. |
Implements channel_model.
Definition at line 253 of file simulator.cpp.
The channel between two antennas of two nodes varies as c_new = forgetting_factor * c_old + random, with each new frame, irrespectively of the time between the frames. The default value is 0.0.
Definition at line 234 of file simulator.hpp.
If is_awgn=true then all channel indecies are equal to one. The default value is false.
Definition at line 237 of file simulator.hpp.
If is_diagonal=true then all off-diagonal elements of any node to node channel matrix is equal to zero. Default value is false.
Definition at line 240 of file simulator.hpp.
uint32_t block_fading::num_of_taps |
The delay-spread is implemented as tapped delay line with num_of_taps equally strong taps. The taps are independent and Rayleigh fading. The filter is implemented on the base-band samples and thus the time spacing correspond to the sample-rate.
Definition at line 245 of file simulator.hpp.
double block_fading::path_gain[max_num_nodes][max_num_nodes] |
The power can be further adjusted bye the path_gain matrix path_gains. Element [i]{j] scales the signal from node i to node j. The defauls is all ones.
Definition at line 227 of file simulator.hpp.
double block_fading::scaling_noise |
The noise standard deviation is scaling_noise^2.
Definition at line 229 of file simulator.hpp.
double block_fading::scaling_signal |
The average output power of the model output is given by scaling_signal^2 times the power of the input. The default value of scaling_signal is 0.45.
Definition at line 223 of file simulator.hpp.
unsigned int block_fading::seed |
If seed is non-zero than the channel randomization is based on the seed value. Defaults to zero.
Definition at line 248 of file simulator.hpp.