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
promise
OpenXG-RAN
Commits
832eb3dc
Commit
832eb3dc
authored
Feb 01, 2019
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
digital compensation of FFO on PBCH symbols (works only for FFO less than 0.5)
parent
0234a5c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+26
-2
No files found.
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
832eb3dc
...
...
@@ -39,6 +39,7 @@
//#include "SCHED/extern.h"
#include "common_lib.h"
#include <math.h>
#include "PHY/NR_REFSIG/pss_nr.h"
#include "PHY/NR_REFSIG/sss_nr.h"
...
...
@@ -55,6 +56,8 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
{
NR_DL_FRAME_PARMS
*
frame_parms
=&
ue
->
frame_parms
;
int
ret
=-
1
;
int
ar
,
n
;
double
im
,
re
;
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"[UE%d] Initial sync: starting PBCH detection (rx_offset %d)
\n
"
,
ue
->
Mod_id
,
...
...
@@ -65,6 +68,27 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
int
nb_prefix_samples0
=
frame_parms
->
nb_prefix_samples0
;
frame_parms
->
nb_prefix_samples0
=
frame_parms
->
nb_prefix_samples
;
// digital compensation of FFO for PBCH symbols
if
(
abs
(
2
*
ue
->
common_vars
.
freq_offset
)
<
frame_parms
->
subcarrier_spacing
){
// this FFO compensation seems to work only for FFO between -0.5 and 0.5
int
size_wp
=
(
frame_parms
->
ofdm_symbol_size
+
frame_parms
->
nb_prefix_samples0
);
// symbol size including prefix
double
s_time
=
1
/
(
1.0e3
*
frame_parms
->
samples_per_subframe
);
// sampling time
double
off_angle
=
-
2
*
M_PI
*
s_time
*
(
ue
->
common_vars
.
freq_offset
);
// offset rotation angle compensation per sample
int
start
=
ue
->
ssb_offset
+
size_wp
;
// start for offset correction is one symbol after ssb_offset (pss time position), including prefix
int
end
=
start
+
(
3
*
size_wp
);
// loop over samples in 3 symbols, including prefix
for
(
n
=
start
;
n
<
end
;
n
++
){
for
(
ar
=
0
;
ar
<
frame_parms
->
nb_antennas_rx
;
ar
++
)
{
re
=
((
double
)(((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
]))[
2
*
n
]);
im
=
((
double
)(((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
]))[
2
*
n
+
1
]);
((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
])[
2
*
n
]
=
(
short
)(
round
(
re
*
cos
(
n
*
off_angle
)
-
im
*
sin
(
n
*
off_angle
)));
((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
])[
2
*
n
+
1
]
=
(
short
)(
round
(
re
*
sin
(
n
*
off_angle
)
+
im
*
cos
(
n
*
off_angle
)));
}
}
}
//symbol 1
nr_slot_fep
(
ue
,
1
,
...
...
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