Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
e3fd9f7f
Commit
e3fd9f7f
authored
May 03, 2022
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
To use the channel generated by multipath_channel() for single-layer case in ulsim
parent
b6a01808
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
18 deletions
+20
-18
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+20
-18
No files found.
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
e3fd9f7f
...
...
@@ -1251,34 +1251,36 @@ int main(int argc, char **argv)
}
}
if
(
UE2gNB
->
max_Doppler
==
0
)
multipath_channel
(
UE2gNB
,
s_re
,
s_im
,
r_re
,
r_im
,
slot_length
,
0
,
(
n_trials
==
1
)
?
1
:
0
);
else
multipath_tv_channel
(
UE2gNB
,
s_re
,
s_im
,
r_re
,
r_im
,
2
*
slot_length
,
0
);
for
(
i
=
0
;
i
<
slot_length
;
i
++
)
{
for
(
ap
=
0
;
ap
<
frame_parms
->
nb_antennas_rx
;
ap
++
)
{
if
(
channel_model
==
AWGN
)
{
double
H_awgn_mimo
[
4
][
4
]
=
{{
1
.
0
,
0
.
2
,
0
.
1
,
0
.
05
},
//rx 0
{
0
.
2
,
1
.
0
,
0
.
2
,
0
.
1
},
//rx 1
{
0
.
1
,
0
.
2
,
1
.
0
,
0
.
2
},
//rx 2
{
0
.
05
,
0
.
1
,
0
.
2
,
1
.
0
}};
//rx 3
// The multipath_channel() function calculates a channel matrix with only 1's. So the channel rank is 1, and we
// cannot use multi-layer. To solve this issue, for now we use the H_awgn_mimo matrix for multi-layer.
if
(
precod_nbr_layers
==
1
)
{
if
(
UE2gNB
->
max_Doppler
==
0
)
{
multipath_channel
(
UE2gNB
,
s_re
,
s_im
,
r_re
,
r_im
,
slot_length
,
0
,
(
n_trials
==
1
)
?
1
:
0
);
}
else
{
multipath_tv_channel
(
UE2gNB
,
s_re
,
s_im
,
r_re
,
r_im
,
2
*
slot_length
,
0
);
}
}
else
{
double
H_awgn_mimo
[
4
][
4
]
=
{{
1
.
0
,
0
.
2
,
0
.
1
,
0
.
05
},
//rx 0
{
0
.
2
,
1
.
0
,
0
.
2
,
0
.
1
},
//rx 1
{
0
.
1
,
0
.
2
,
1
.
0
,
0
.
2
},
//rx 2
{
0
.
05
,
0
.
1
,
0
.
2
,
1
.
0
}};
//rx 3
for
(
i
=
0
;
i
<
slot_length
;
i
++
)
{
for
(
ap
=
0
;
ap
<
frame_parms
->
nb_antennas_rx
;
ap
++
)
{
// sum up signals from different Tx antennas
r_re
[
ap
][
i
]
=
0
;
r_im
[
ap
][
i
]
=
0
;
for
(
int
aa
=
0
;
aa
<
n_tx
;
aa
++
)
{
r_re
[
ap
][
i
]
+=
s_re
[
aa
][
i
]
*
H_awgn_mimo
[
ap
][
aa
];
r_im
[
ap
][
i
]
+=
s_im
[
aa
][
i
]
*
H_awgn_mimo
[
ap
][
aa
];
}
}
}
}
for
(
i
=
0
;
i
<
slot_length
;
i
++
)
{
for
(
ap
=
0
;
ap
<
frame_parms
->
nb_antennas_rx
;
ap
++
)
{
((
int16_t
*
)
&
gNB
->
common_vars
.
rxdata
[
ap
][
slot_offset
])[(
2
*
i
)
+
(
delay
*
2
)]
=
(
int16_t
)((
r_re
[
ap
][
i
])
+
(
sqrt
(
sigma
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)));
// convert to fixed point
((
int16_t
*
)
&
gNB
->
common_vars
.
rxdata
[
ap
][
slot_offset
])[(
2
*
i
)
+
1
+
(
delay
*
2
)]
=
(
int16_t
)((
r_im
[
ap
][
i
])
+
(
sqrt
(
sigma
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)));
/* Add phase noise if enabled */
if
(
pdu_bit_map
&
PUSCH_PDU_BITMAP_PUSCH_PTRS
)
{
phase_noise
(
ts
,
&
((
int16_t
*
)
&
gNB
->
common_vars
.
rxdata
[
ap
][
slot_offset
])[(
2
*
i
)],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment