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
canghaiwuhen
OpenXG-RAN
Commits
ad4a22fa
Commit
ad4a22fa
authored
4 years ago
by
masayuki.harada
Committed by
shono.takafumi
4 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PUCCH noise estimation.
(cherry picked from commit 51634853671e07ef3013bc44ec79fc38c0646147)
parent
174069e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
openair1/PHY/LTE_TRANSPORT/pucch.c
openair1/PHY/LTE_TRANSPORT/pucch.c
+13
-6
No files found.
openair1/PHY/LTE_TRANSPORT/pucch.c
View file @
ad4a22fa
...
@@ -743,7 +743,8 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
...
@@ -743,7 +743,8 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
uint8_t
n_cs
,
alpha_ind
;
uint8_t
n_cs
,
alpha_ind
;
int16_t
tmp_re
,
tmp_im
,
W_re
=
0
,
W_im
=
0
;
int16_t
tmp_re
,
tmp_im
,
W_re
=
0
,
W_im
=
0
;
int16_t
W4_nouse
[
4
]
=
{
1
,
1
,
-
1
,
-
1
};
int16_t
W4_nouse
[
4
]
=
{
1
,
1
,
-
1
,
-
1
};
int32_t
interference_power
;
int32_t
n0_IQ
[
2
];
double
interference_power
;
int16_t
*
rxptr
;
int16_t
*
rxptr
;
uint32_t
symbol_offset
;
uint32_t
symbol_offset
;
...
@@ -769,7 +770,7 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
...
@@ -769,7 +770,7 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
zptr
=
(
int16_t
*
)
z
;
zptr
=
(
int16_t
*
)
z
;
N_UL_symb
=
(
frame_parms
->
Ncp
==
NORMAL
)
?
7
:
6
;
N_UL_symb
=
(
frame_parms
->
Ncp
==
NORMAL
)
?
7
:
6
;
interference_power
=
0
;
interference_power
=
0
.
0
;
calc_cnt
=
0
;
calc_cnt
=
0
;
// loop over 2 slots
// loop over 2 slots
for
(
n_cs
=
0
;
n_cs
<
12
;
n_cs
++
)
{
for
(
n_cs
=
0
;
n_cs
<
12
;
n_cs
++
)
{
...
@@ -778,6 +779,7 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
...
@@ -778,6 +779,7 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
//loop over symbols in slot
//loop over symbols in slot
for
(
l
=
0
;
l
<
N_UL_symb
;
l
++
)
{
for
(
l
=
0
;
l
<
N_UL_symb
;
l
++
)
{
if
(((
l
>
1
)
&&
(
l
<
N_UL_symb
-
2
))
||
((
ns
==
(
1
+
(
subframe
<<
1
)))
&&
(
shortened_format
==
1
))
){
if
(((
l
>
1
)
&&
(
l
<
N_UL_symb
-
2
))
||
((
ns
==
(
1
+
(
subframe
<<
1
)))
&&
(
shortened_format
==
1
))
){
zptr
+=
24
;
continue
;
continue
;
}
}
...
@@ -817,8 +819,11 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
...
@@ -817,8 +819,11 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
// Do detection
// Do detection
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
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
++
)
{
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
))
){
if
((((
l
%
N_UL_symb
)
>
1
)
&&
((
l
%
N_UL_symb
)
<
N_UL_symb
-
2
))
||
((
nsymb
>=
N_UL_symb
)
&&
(
shortened_format
==
1
))
){
j
+=
24
;
continue
;
continue
;
}
}
if
((
l
<
(
nsymb
>>
1
))
&&
((
m
&
1
)
==
0
))
if
((
l
<
(
nsymb
>>
1
))
&&
((
m
&
1
)
==
0
))
...
@@ -842,15 +847,17 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
...
@@ -842,15 +847,17 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
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
][
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
);
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
]);
n0_IQ
[
0
]
+=
rxcomp
[
aa
][
j
];
n0_IQ
[
1
]
+=
rxcomp
[
aa
][
1
+
j
];
calc_cnt
++
;
calc_cnt
++
;
}
//re
}
//re
}
// symbol
}
// symbol
interference_power
+=
(
int32_t
)(
n0_IQ
[
0
]
*
n0_IQ
[
0
]
+
n0_IQ
[
1
]
*
n0_IQ
[
1
]);
}
// antenna
}
// antenna
}
}
calc_cnt
/=
12
;
interference_power
/=
calc_cnt
;
//printf("pucch noise %d %d %d\n",interference_power,calc_cnt,eNB->measurements.n0_subband_power_tot_dB[0])
;
eNB
->
measurements
.
n0_pucch_dB
=
dB_fixed_x10
((
int
)(
interference_power
/
calc_cnt
))
/
10
;
eNB
->
measurements
.
n0_pucch_dB
=
dB_fixed_x10
(
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
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
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