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
lizhongxiao
OpenXG-RAN
Commits
4624f3ff
Commit
4624f3ff
authored
Jun 01, 2020
by
masayuki.harada
Committed by
Haruki NAOI
Jul 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PUCCH noise estimation.
(cherry picked from commit 51634853671e07ef3013bc44ec79fc38c0646147)
parent
3520e531
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
openair1/PHY/LTE_TRANSPORT/pucch.c
openair1/PHY/LTE_TRANSPORT/pucch.c
+14
-7
No files found.
openair1/PHY/LTE_TRANSPORT/pucch.c
View file @
4624f3ff
...
...
@@ -728,7 +728,8 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
uint8_t
n_cs
,
alpha_ind
;
int16_t
tmp_re
,
tmp_im
,
W_re
=
0
,
W_im
=
0
;
int16_t
W4_nouse
[
4
]
=
{
32767
,
32767
,
-
32768
,
-
32768
};
int32_t
interference_power
;
int32_t
n0_IQ
[
2
];
double
interference_power
;
int16_t
*
rxptr
;
uint32_t
symbol_offset
;
...
...
@@ -754,7 +755,7 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
zptr
=
(
int16_t
*
)
z
;
N_UL_symb
=
(
frame_parms
->
Ncp
==
NORMAL
)
?
7
:
6
;
interference_power
=
0
;
interference_power
=
0
.
0
;
calc_cnt
=
0
;
// loop over 2 slots
for
(
n_cs
=
0
;
n_cs
<
12
;
n_cs
++
)
{
...
...
@@ -763,6 +764,7 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
//loop over symbols in slot
for
(
l
=
0
;
l
<
N_UL_symb
;
l
++
)
{
if
(((
l
>
1
)
&&
(
l
<
N_UL_symb
-
2
))
||
((
ns
==
(
1
+
(
subframe
<<
1
)))
&&
(
shortened_format
==
1
))
){
zptr
+=
24
;
continue
;
}
...
...
@@ -802,8 +804,11 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
// Do detection
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
n0_IQ
[
0
]
=
0
;
n0_IQ
[
1
]
=
0
;
for
(
j
=
0
,
l
=
0
;
l
<
nsymb
;
l
++
)
{
if
((((
l
%
N_UL_symb
)
>
1
)
&&
((
l
%
N_UL_symb
)
<
N_UL_symb
-
2
))
||
((
nsymb
>=
N_UL_symb
)
&&
(
shortened_format
==
1
))
){
j
+=
24
;
continue
;
}
if
((
l
<
(
nsymb
>>
1
))
&&
((
m
&
1
)
==
0
))
...
...
@@ -826,16 +831,18 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
re_offset
=
0
;
rxcomp
[
aa
][
j
]
=
(
int16_t
)((
rxptr
[
re_offset
<<
1
]
*
(
int32_t
)
zptr
[
j
])
>>
15
)
-
((
rxptr
[
1
+
(
re_offset
<<
1
)]
*
(
int32_t
)
zptr
[
1
+
j
])
>>
15
);
rxcomp
[
aa
][
1
+
j
]
=
(
int16_t
)((
rxptr
[
re_offset
<<
1
]
*
(
int32_t
)
zptr
[
1
+
j
])
>>
15
)
+
((
rxptr
[
1
+
(
re_offset
<<
1
)]
*
(
int32_t
)
zptr
[
j
])
>>
15
);
interference_power
+=
((
int32_t
)
rxcomp
[
aa
][
j
]
*
(
int32_t
)
rxcomp
[
aa
][
j
]
+
(
int32_t
)
rxcomp
[
aa
][
1
+
j
]
*
(
int32_t
)
rxcomp
[
aa
][
1
+
j
]);
rxcomp
[
aa
][
1
+
j
]
=
(
int16_t
)((
rxptr
[
re_offset
<<
1
]
*
(
int32_t
)
zptr
[
1
+
j
])
>>
15
)
+
((
rxptr
[
1
+
(
re_offset
<<
1
)]
*
(
int32_t
)
zptr
[
j
])
>>
15
);
+
n0_IQ
[
0
]
+=
rxcomp
[
aa
][
j
];
n0_IQ
[
0
]
+=
rxcomp
[
aa
][
j
];
n0_IQ
[
1
]
+=
rxcomp
[
aa
][
1
+
j
];
calc_cnt
++
;
}
//re
}
// symbol
interference_power
+=
(
int32_t
)(
n0_IQ
[
0
]
*
n0_IQ
[
0
]
+
n0_IQ
[
1
]
*
n0_IQ
[
1
]);
}
// antenna
}
calc_cnt
;
eNB
->
measurements
.
n0_pucch_dB
=
dB_fixed_x10
(
interference_power
/
calc_cnt
)
/
10
;
//printf("
pucch noise %d %d %d\n",interference_power,calc_cnt,eNB->measurements.n0_pucch_dB);
interference_power
/=
calc_cnt
;
eNB
->
measurements
.
n0_pucch_dB
=
dB_fixed_x10
(
(
int
)(
interference_power
/
calc_cnt
)
)
/
10
;
LOG_D
(
PHY
,
"estimate
pucch noise %d %d %d
\n
"
,
interference_power
,
calc_cnt
,
eNB
->
measurements
.
n0_pucch_dB
);
return
0
;
}
...
...
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