Commit e2367943 authored by Roberto Louro Magueta's avatar Roberto Louro Magueta

Put in ulsim a channel matrix H_awgn_mimo different from identity (it is a...

Put in ulsim a channel matrix H_awgn_mimo different from identity (it is a matrix equal to matrix used in dlsim)
parent c128a5d9
...@@ -1260,23 +1260,19 @@ int main(int argc, char **argv) ...@@ -1260,23 +1260,19 @@ int main(int argc, char **argv)
for (i=0; i<slot_length; i++) { for (i=0; i<slot_length; i++) {
for (ap=0; ap<frame_parms->nb_antennas_rx; ap++) { for (ap=0; ap<frame_parms->nb_antennas_rx; ap++) {
if (channel_model == AWGN) { if (channel_model == AWGN) {
double H_awgn[4][4] ={{1.0, 0.0, 0.0, 0.0},//rx 0
{0.0, 1.0, 0.0, 0.0}, //rx 1 double H_awgn_mimo[4][4] ={{1.0, 0.2, 0.1, 0.05}, //rx 0
{0.0, 0.0, 1.0, 0.0}, //rx 2 {0.2, 1.0, 0.2, 0.1}, //rx 1
{0.0, 0.0, 0.0, 1.0}};//rx 3 {0.1, 0.2, 1.0, 0.2}, //rx 2
#if 0 {0.05, 0.1, 0.2, 1.0}}; //rx 3
double H_awgn_mimo[4][4] ={{1.0, 0.5, 0.25, 0.125},//rx 0
{0.5, 1.0, 0.5, 0.25}, //rx 1
{0.25, 0.5, 1.0, 0.5}, //rx 2
{0.125, 0.25, 0.5, 1.0}};//rx 3
#endif
// sum up signals from different Tx antennas // sum up signals from different Tx antennas
r_re[ap][i] = 0; r_re[ap][i] = 0;
r_im[ap][i] = 0; r_im[ap][i] = 0;
for (int aa=0; aa<n_tx; aa++) { for (int aa=0; aa<n_tx; aa++) {
r_re[ap][i] += s_re[aa][i]*H_awgn[ap][aa]; r_re[ap][i] += s_re[aa][i]*H_awgn_mimo[ap][aa];
r_im[ap][i] += s_im[aa][i]*H_awgn[ap][aa]; r_im[ap][i] += s_im[aa][i]*H_awgn_mimo[ap][aa];
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment