![]() |
four_multi
Multi-Antenna,Multi-Node,Multi-Band,Multi-Cell
|
This is a channel model where the channel is taken from a frequency domain channel representation relevant for OFDM. The OFDM parameters of the modulation, the number of antennas and nodes are inputs to constructor. More...
#include <simulator.hpp>
Public Member Functions | |
OFDM_channel_from_file (std::string filename, ivec num_ant, int Nfft, int Nc, ivec ix_all, int tx_start_sample, int rx_start_sample, double signal_scaling, double EVM=0, double EVM_RX=0, double CPE=0) | |
void | reset (void) |
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) |
Public Attributes | |
cmat | H [max_num_nodes][max_num_nodes][max_num_ant] |
double | scaling_noise |
This is a channel model where the channel is taken from a frequency domain channel representation relevant for OFDM. The OFDM parameters of the modulation, the number of antennas and nodes are inputs to constructor.
Definition at line 116 of file simulator.hpp.
OFDM_channel_from_file::OFDM_channel_from_file | ( | std::string | filename, |
ivec | num_ant, | ||
int | Nfft, | ||
int | Nc, | ||
ivec | ix_all, | ||
int | tx_start_sample, | ||
int | rx_start_sample, | ||
double | signal_scaling, | ||
double | EVM = 0 , |
||
double | EVM_RX = 0 , |
||
double | CPE = 0 |
||
) |
The data is read from the files given by filename_frame_ix=0.dat, filename_frame_ix=1.dat, ...., where the string filename is given as input to the constructor. The file contains the matrices real(H{1,1}),imag(H{1,1})...real(H{num_nodes,1}), imag(H{num_nodes,1})...,real(H{num_nodes,num_nodes}), imag(H{num_nodes,num_nodes}). using matlab cell array notation. Each of these matrices contains a matrix (tensor) of size num_ms_ant,num_bs_ant,length(ix_all). The data is stored as doubles. The order of the matrices is given as above. Where the matrices are flattened as e.g. H{1,1}(:). The tensor H{i1,i2} represents the channel from node i1 to node i2. The notation above is that of Matlab.
Definition at line 501 of file simulator.cpp.
void OFDM_channel_from_file::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 694 of file simulator.cpp.
void OFDM_channel_from_file::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 610 of file simulator.cpp.