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
9fb0d1c0
Commit
9fb0d1c0
authored
Jan 30, 2024
by
Marwan Hammouda
Committed by
Thomas Schlichter
Feb 06, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE: resetting doppler and timing drift est./comp. after handover is trigerred
parent
c4e6b4dd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
executables/nr-ue.c
executables/nr-ue.c
+23
-2
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
+7
-0
No files found.
executables/nr-ue.c
View file @
9fb0d1c0
...
@@ -617,6 +617,7 @@ void processSlotTX(void *arg) {
...
@@ -617,6 +617,7 @@ void processSlotTX(void *arg) {
RU_write
(
rxtxD
);
RU_write
(
rxtxD
);
}
}
extern
int
commonDoppler
;
nr_phy_data_t
UE_dl_preprocessing
(
PHY_VARS_NR_UE
*
UE
,
UE_nr_rxtx_proc_t
*
proc
)
nr_phy_data_t
UE_dl_preprocessing
(
PHY_VARS_NR_UE
*
UE
,
UE_nr_rxtx_proc_t
*
proc
)
{
{
nr_phy_data_t
phy_data
=
{
0
};
nr_phy_data_t
phy_data
=
{
0
};
...
@@ -635,6 +636,14 @@ nr_phy_data_t UE_dl_preprocessing(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc)
...
@@ -635,6 +636,14 @@ nr_phy_data_t UE_dl_preprocessing(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc)
UE
->
frame_parms
.
dl_CarrierFreq
=
dl_CarrierFreq
;
UE
->
frame_parms
.
dl_CarrierFreq
=
dl_CarrierFreq
;
UE
->
frame_parms
.
ul_CarrierFreq
=
dl_CarrierFreq
-
diff
;
UE
->
frame_parms
.
ul_CarrierFreq
=
dl_CarrierFreq
-
diff
;
double
dl_CarrierFreq_cmd
=
(
double
)
downlink_frequency
[
0
][
0
];
float
frequency_scaling
=
(
float
)(
(
double
)
dl_CarrierFreq
/
dl_CarrierFreq_cmd
);
float
commonDopplerTmp
=
frequency_scaling
*
(
float
)
commonDoppler
;
LOG_A
(
PHY
,
"dl_CarrierFreq: %lu, dl_CarrierFreq_cmd: %lu, frequency_scaling: %f, commonDoppler_DU0: %d, commonDoppler_DU1: %d
\n
"
,
dl_CarrierFreq
,
downlink_frequency
[
0
][
0
],
frequency_scaling
,
commonDoppler
,
(
int
)
commonDopplerTmp
);
commonDoppler
=
(
int
)
commonDopplerTmp
;
nr_rf_card_config_freq
(
&
openair0_cfg
[
UE
->
rf_map
.
card
],
UE
->
frame_parms
.
ul_CarrierFreq
,
UE
->
frame_parms
.
dl_CarrierFreq
,
0
);
nr_rf_card_config_freq
(
&
openair0_cfg
[
UE
->
rf_map
.
card
],
UE
->
frame_parms
.
ul_CarrierFreq
,
UE
->
frame_parms
.
dl_CarrierFreq
,
0
);
// Reset frequency offset
// Reset frequency offset
UE
->
common_vars
.
freq_offset
=
0
;
UE
->
common_vars
.
freq_offset
=
0
;
...
@@ -642,7 +651,18 @@ nr_phy_data_t UE_dl_preprocessing(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc)
...
@@ -642,7 +651,18 @@ nr_phy_data_t UE_dl_preprocessing(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc)
init_symbol_rotation
(
&
UE
->
frame_parms
);
init_symbol_rotation
(
&
UE
->
frame_parms
);
}
}
UE
->
is_synchronized
=
0
;
UE
->
is_synchronized
=
0
;
//UE->timing_advance = get_nrUE_params()->timing_advance;
UE
->
timing_advance
=
get_nrUE_params
()
->
timing_advance
;
// reset all parameters related to frequency offset and timing drift estimation/compensation
UE
->
DopplerEst
=
0
;
UE
->
DopplerEstTot
=
(
float
)
commonDoppler
;
UE
->
TO_I_Ctrl
=
0
;
UE
->
rx_offset
=
0
;
UE
->
rx_offset_TO
=
0
;
//PI controller
UE
->
rx_offset_slot
=
1
;
UE
->
rx_offset_comp
=
0
;
UE
->
ho_flag
=
1
;
UE
->
ho_flag
=
1
;
UE
->
target_Nid_cell
=
synch_req
->
target_Nid_cell
;
UE
->
target_Nid_cell
=
synch_req
->
target_Nid_cell
;
clean_UE_dlsch
(
UE
,
proc
->
gNB_id
);
clean_UE_dlsch
(
UE
,
proc
->
gNB_id
);
...
@@ -839,13 +859,14 @@ void *UE_thread(void *arg)
...
@@ -839,13 +859,14 @@ void *UE_thread(void *arg)
UE
->
is_synchronized
=
0
;
UE
->
is_synchronized
=
0
;
AssertFatal
(
UE
->
rfdevice
.
trx_start_func
(
&
UE
->
rfdevice
)
==
0
,
"Could not start the device
\n
"
);
AssertFatal
(
UE
->
rfdevice
.
trx_start_func
(
&
UE
->
rfdevice
)
==
0
,
"Could not start the device
\n
"
);
/*
if (!IS_SOFTMODEM_RFSIM) {
if (!IS_SOFTMODEM_RFSIM) {
if (UE->rfdevice.openair0_cfg->sample_rate == 7680000) {
if (UE->rfdevice.openair0_cfg->sample_rate == 7680000) {
UE->rfdevice.openair0_cfg->tx_sample_advance = 112;
UE->rfdevice.openair0_cfg->tx_sample_advance = 112;
} else if (UE->rfdevice.openair0_cfg->sample_rate == 15360000) {
} else if (UE->rfdevice.openair0_cfg->sample_rate == 15360000) {
UE->rfdevice.openair0_cfg->tx_sample_advance = 128;
UE->rfdevice.openair0_cfg->tx_sample_advance = 128;
}
}
}
}
*/
notifiedFIFO_t
nf
;
notifiedFIFO_t
nf
;
initNotifiedFIFO
(
&
nf
);
initNotifiedFIFO
(
&
nf
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
View file @
9fb0d1c0
...
@@ -519,6 +519,13 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue,
...
@@ -519,6 +519,13 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue,
double
TOfdm
=
slotDuration
/
((
double
)
ue
->
frame_parms
.
symbols_per_slot
);
// symbol duration in sec
double
TOfdm
=
slotDuration
/
((
double
)
ue
->
frame_parms
.
symbols_per_slot
);
// symbol duration in sec
double
DopplerEst
=
Res_phase
/
(
2
*
M_PI
*
(
DMRS_idx_current
-
DMRS_idx_last
)
*
TOfdm
);
double
DopplerEst
=
Res_phase
/
(
2
*
M_PI
*
(
DMRS_idx_current
-
DMRS_idx_last
)
*
TOfdm
);
if
(
!
ue
->
is_synchronized
)
// this might be as a handover process is being executed, then reset the static variables
{
DopplerEstTot
=
0
;
Doppler_I_Ctrl
=
0
;
DopplerErrLast
=
(
int64_t
)
1
<<
60
;
}
if
((
ue
->
is_synchronized
)
&&
(
DopplerEst
>
35
||
DopplerEst
<
-
35
))
if
((
ue
->
is_synchronized
)
&&
(
DopplerEst
>
35
||
DopplerEst
<
-
35
))
{
{
// PI Controller
// PI Controller
...
...
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