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
Michael Black
OpenXG-RAN
Commits
df29718a
Commit
df29718a
authored
Mar 18, 2014
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5178
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
35b66a85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
9 deletions
+24
-9
targets/PROJECTS/CORRIDOR/emos_read.m
targets/PROJECTS/CORRIDOR/emos_read.m
+24
-9
No files found.
targets/PROJECTS/CORRIDOR/emos_read.m
View file @
df29718a
close
all
clear
all
%% read data
fid
=
fopen
(
'E:\EMOS\corridor\eNB_data_20140108_185919.EMOS'
,
'r'
);
[
v
,
c
]
=
fread
(
fid
,
76800
*
4
*
100
,
'int16'
,
0
,
'ieee-le'
);
...
...
@@ -5,7 +8,7 @@ v2 = double(v(1:2:end))+1j*double(v(2:2:end));
fclose
(
fid
);
figure
(
1
)
plot
(
abs
(
fft
(
v2
)))
plot
(
abs
(
fft
shift
(
fft
(
v2
)
)))
%% sync
addpath
(
'../../../openair1/PHY/LTE_REFSIG'
);
...
...
@@ -17,27 +20,39 @@ figure(2);
plot
(
lag
,
abs
(
corr
));
%% frame start detection
% TODO: do a proper peak detection. for now just take the max
[
m
,
i
]
=
max
(
abs
(
corr
));
frame_start
=
lag
(
i
);
%% ofdm receiver
load
(
'../LOCALIZATION/ofdm_pilots_sync_2048.mat'
);
%load('../LOCALIZATION/ofdm_pilots_sync_2048.mat');
load
(
'E:\EMOS\corridor\ofdm_pilots_sync_2048_v7.mat'
);
ofdm_symbol_length
=
num_carriers
+
prefix_length
;
frame_length
=
ofdm_symbol_length
*
num_symbols_frame
;
useful_carriers
=
num_carriers
-
num_zeros
-
1
;
% TODO: do a proper peak detection. for now just take the max
[
m
,
i
]
=
max
(
abs
(
corr
));
frame_start
=
lag
(
i
)
-
prefix_length
;
%% ofdm receiver
received
=
v2
(
frame_start
:
frame_start
+
frame_length
);
received_f
=
zeros
(
num_symbols_frame
,
useful_carriers
);
for
i
=
0
:
num_symbols_frame
-
1
;
ifblock
=
received
(
i
*
ofdm_symbol_length
+
[
1
:
ofdm_symbol_length
]);
ifblock
(
1
:
prefix_length
)
=
[];
fblock
=
fft
(
ifblock
);
received_f
(
i
+
1
,:)
=
[
fblock
(
end
-
useful_carriers
/
2
+
1
:
end
);
fblock
(
2
:
useful_carriers
/
2
+
1
)];
received_f
(
i
+
1
,:)
=
[
fblock
(
2
:
useful_carriers
/
2
+
1
);
fblock
(
end
-
useful_carriers
/
2
+
1
:
end
)];
end
%% channel estimation
H
=
conj
(
f
)
.*
received_f
;
Ht
=
ifft
(
H
,[],
2
);
PDP
=
mean
(
abs
(
Ht
(
2
:
end
,:)
.^
2
),
1
);
figure
(
3
)
surf
(
20
*
log10
(
abs
(
Ht
)))
xlabel
(
'time [OFDM symbol]'
)
ylabel
(
'delay time [samples]'
)
zlabel
(
'power [dB]'
)
shading
interp
figure
(
4
)
plot
(
10
*
log10
(
PDP
))
xlabel
(
'delay time [samples]'
)
ylabel
(
'power [dB]'
)
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