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
wangwenhui
OpenXG-RAN
Commits
49a14c4f
Commit
49a14c4f
authored
Aug 13, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for TDL channel models in nr_ulsim
parent
ae4f3320
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
140 additions
and
114 deletions
+140
-114
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+117
-101
openair1/SIMULATION/TOOLS/channel_sim.c
openair1/SIMULATION/TOOLS/channel_sim.c
+2
-2
openair1/SIMULATION/TOOLS/multipath_channel.c
openair1/SIMULATION/TOOLS/multipath_channel.c
+9
-2
openair1/SIMULATION/TOOLS/random_channel.c
openair1/SIMULATION/TOOLS/random_channel.c
+7
-7
openair1/SIMULATION/TOOLS/sim.h
openair1/SIMULATION/TOOLS/sim.h
+5
-2
No files found.
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
49a14c4f
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/TOOLS/channel_sim.c
View file @
49a14c4f
...
...
@@ -180,7 +180,7 @@ void do_DL_sig(sim_t *sim,
//RU2UE[eNB_id][UE_id]->path_loss_dB = 0;
multipath_channel
(
sim
->
RU2UE
[
ru_id
][
UE_id
][
CC_id
],
s_re
,
s_im
,
r_re0
,
r_im0
,
length
,
hold_channel
);
length
,
hold_channel
,
0
);
#ifdef DEBUG_SIM
rx_pwr
=
signal_energy_fp2
(
sim
->
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
ch
[
0
],
sim
->
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
channel_length
)
*
sim
->
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
channel_length
;
...
...
@@ -394,7 +394,7 @@ void do_UL_sig(sim_t *sim,
multipath_channel
(
sim
->
UE2RU
[
UE_id
][
ru_id
][
CC_id
],
s_re
,
s_im
,
r_re0
,
r_im0
,
frame_parms
->
samples_per_tti
,
hold_channel
);
frame_parms
->
samples_per_tti
,
hold_channel
,
0
);
rx_pwr
=
signal_energy_fp2
(
sim
->
UE2RU
[
UE_id
][
ru_id
][
CC_id
]
->
ch
[
0
],
...
...
openair1/SIMULATION/TOOLS/multipath_channel.c
View file @
49a14c4f
...
...
@@ -44,7 +44,8 @@ void multipath_channel(channel_desc_t *desc,
double
rx_sig_re
[
2
][
30720
*
2
],
double
rx_sig_im
[
2
][
30720
*
2
],
uint32_t
length
,
uint8_t
keep_channel
)
uint8_t
keep_channel
,
int
log_channel
)
{
int
i
,
ii
,
j
,
l
;
...
...
@@ -150,7 +151,8 @@ void multipath_channel(channel_desc_t *desc,
double
*
rx_sig_re
[
2
],
double
*
rx_sig_im
[
2
],
uint32_t
length
,
uint8_t
keep_channel
)
uint8_t
keep_channel
,
int
log_channel
)
{
int
i
,
ii
,
j
,
l
;
...
...
@@ -196,6 +198,11 @@ void multipath_channel(channel_desc_t *desc,
rx_tmp
.
x
+=
(
tx
.
x
*
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
x
)
-
(
tx
.
y
*
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
y
);
rx_tmp
.
y
+=
(
tx
.
y
*
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
x
)
+
(
tx
.
x
*
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
y
);
if
(
i
==
0
&&
log_channel
==
1
)
{
printf
(
"channel[%d][%d][%d] = %f dB (%e,%e)
\n
"
,
ii
,
j
,
l
,
10
*
log10
(
pow
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
x
,
2
.
0
)
+
pow
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
y
,
2
.
0
)),
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
x
,
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
y
);
}
}
//l
}
// j
...
...
openair1/SIMULATION/TOOLS/random_channel.c
View file @
49a14c4f
...
...
@@ -695,9 +695,10 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
sum_amps
+=
chan_desc
->
amps
[
i
];
}
for
(
i
=
0
;
i
<
chan_desc
->
nb_taps
;
i
++
)
for
(
i
=
0
;
i
<
chan_desc
->
nb_taps
;
i
++
)
{
chan_desc
->
amps
[
i
]
/=
sum_amps
;
tdl_delays
[
i
]
*=
DS_TDL
;
}
chan_desc
->
delays
=
tdl_delays
;
chan_desc
->
ricean_factor
=
tdl_ricean_factor
;
chan_desc
->
aoa
=
0
;
...
...
@@ -1733,15 +1734,14 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag) {
desc
->
ch
[
aarx
+
(
aatx
*
desc
->
nb_rx
)][
k
].
x
+=
s
*
desc
->
a
[
l
][
aarx
+
(
aatx
*
desc
->
nb_rx
)].
x
;
desc
->
ch
[
aarx
+
(
aatx
*
desc
->
nb_rx
)][
k
].
y
+=
s
*
desc
->
a
[
l
][
aarx
+
(
aatx
*
desc
->
nb_rx
)].
y
;
// printf("l %d : desc->ch.x %f\n",l,desc->a[l][aarx+(aatx*desc->nb_rx)].x
);
// printf("l %d : desc->ch.x %f, s %e, delay %f\n",l,desc->a[l][aarx+(aatx*desc->nb_rx)].x,s,desc->delays[l]
);
}
//nb_taps
#ifdef DEBUG_CH
k
=
0
;
printf
(
"(%d,%d,%d)->(%f,%f)
\n
"
,
k
,
aarx
,
aatx
,
desc
->
ch
[
aarx
+
(
aatx
*
desc
->
nb_rx
)][
k
].
x
,
desc
->
ch
[
aarx
+
(
aatx
*
desc
->
nb_rx
)][
k
].
y
);
printf
(
"(%d,%d,%d)->(%e,%e)
\n
"
,
k
,
aarx
,
aatx
,
desc
->
ch
[
aarx
+
(
aatx
*
desc
->
nb_rx
)][
k
].
x
,
desc
->
ch
[
aarx
+
(
aatx
*
desc
->
nb_rx
)][
k
].
y
);
#endif
}
}
//channel_length
}
//channel_length
}
}
//aatx
}
//aarx
...
...
openair1/SIMULATION/TOOLS/sim.h
View file @
49a14c4f
...
...
@@ -277,7 +277,8 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag);
double rx_sig_re[2],
double rx_sig_im[2],
uint32_t length,
uint8_t keep_channel)
uint8_t keep_channel,
int log_channel)
\brief This function generates and applys a random frequency selective random channel model.
@param desc Pointer to channel descriptor
...
...
@@ -287,6 +288,7 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag);
@param rx_sig_im output signal (imaginary component)
@param length Length of input signal
@param keep_channel Set to 1 to keep channel constant for null-B/F
@param log_channel=1 make channel coefficients come out for first sample of input
*/
void
multipath_channel
(
channel_desc_t
*
desc
,
...
...
@@ -295,7 +297,8 @@ void multipath_channel(channel_desc_t *desc,
double
*
rx_sig_re
[
2
],
double
*
rx_sig_im
[
2
],
uint32_t
length
,
uint8_t
keep_channel
);
uint8_t
keep_channel
,
int
log_channel
);
/*
\fn double compute_pbch_sinr(channel_desc_t *desc,
channel_desc_t *desc_i1,
...
...
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