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
5c3e0c95
Commit
5c3e0c95
authored
Aug 12, 2014
by
Byiringi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5706
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
13f034dc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
239 additions
and
144 deletions
+239
-144
targets/PROJECTS/CORRIDOR/log_read.m
targets/PROJECTS/CORRIDOR/log_read.m
+239
-144
No files found.
targets/PROJECTS/CORRIDOR/log_read.m
View file @
5c3e0c95
...
...
@@ -128,32 +128,28 @@ for idx=1:length(d1)
%% rssi(dBm) versus distance (log scale)
% We will plot the rssi versus the distance with the data before the passing of the train, and with the data after the passingof the train
% We will plot the rssi versus the distance. We separate the data
% before and after the passing of the train for run 3 and run 4 because
% all the antennas are poiting at the same direction
% we heuristically determine a starting point and a ending point for the linear fitting
if
idx
==
1
distance_before_break1_start
=
0.4
;
%in km
distance_before_break1_end
=
7.5
;
distance_before_break2_start
=
0.4
;
distance_before_break2_end
=
7.5
;
distance_break1_start
=
0.4
;
%in km
distance_break1_end
=
7.5
;
distance_break2_start
=
0.4
;
distance_break2_end
=
7.5
;
distance_after_break1_start
=
0.9
;
%in km
distance_after_break1_end
=
4.5
;
distance_after_break2_start
=
0.9
;
distance_after_break2_end
=
4.5
;
end
if
idx
==
2
distance_before_break1_start
=
0.8
;
%in km
distance_before_break1_end
=
4.5
;
distance_before_break2_start
=
0.8
;
distance_before_break2_end
=
4.5
;
distance_break1_start
=
0.8
;
%in km
distance_break1_end
=
4.5
;
distance_break2_start
=
0.8
;
distance_break2_end
=
4.5
;
distance_after_break1_start
=
0.5
;
%in km
distance_after_break1_end
=
7.5
;
distance_after_break2_start
=
0.5
;
distance_after_break2_end
=
7.5
;
end
if
idx
==
3
...
...
@@ -180,6 +176,18 @@ for idx=1:length(d1)
distance_after_break2_end
=
8
;
end
if
idx
==
1
||
idx
==
2
% indexes of the starting and ending points
index_break1_start
=
1
;
index_break2_start
=
1
;
index_break1_end
=
1
;
index_break2_end
=
1
;
end
if
idx
==
3
||
idx
==
4
% indexes of the starting and ending points with the data before the passing of the
% train
index_break1_before_start
=
1
;
...
...
@@ -194,6 +202,29 @@ for idx=1:length(d1)
index_break1_after_end
=
I_RSSI_max1
;
index_break2_after_end
=
I_RSSI_max2
;
end
if
idx
==
1
||
idx
==
2
%starting points
while
(
index_break1_start
<
length
(
new_distances1
))
&&
(
new_distances1
(
index_break1_start
)
>
distance_break1_start
)
index_break1_start
=
index_break1_start
+
1
;
end
while
(
index_break2_start
<
length
(
new_distances2
))
&&
(
new_distances2
(
index_break2_start
)
>
distance_break2_start
)
index_break2_start
=
index_break2_start
+
1
;
end
%ending points
while
(
index_break1_end
<
length
(
new_distances1
))
&&
(
new_distances1
(
index_break1_end
)
>
distance_break1_end
)
index_break1_end
=
index_break1_end
+
1
;
end
while
(
index_break2_end
<
length
(
new_distances2
))
&&
(
new_distances2
(
index_break2_end
)
>
distance_break2_end
)
index_break2_end
=
index_break2_end
+
1
;
end
end
if
idx
==
3
||
idx
==
4
%starting points
while
(
index_break1_before_start
<
length
(
new_distances1
))
&&
(
new_distances1
(
index_break1_before_start
)
>
distance_before_break1_start
)
index_break1_before_start
=
index_break1_before_start
+
1
;
...
...
@@ -226,8 +257,71 @@ for idx=1:length(d1)
index_break2_after_end
=
index_break2_after_end
+
1
;
end
end
if
idx
==
1
||
idx
==
2
figure
(
idx
*
10
+
3
)
hold
off
linearCoef1
=
polyfit
(
10
*
log10
(
new_distances1
(
index_break1_end
:
index_break1_start
)),
data1
{
idx
}(
index_break1_end
:
index_break1_start
,
13
),
1
);
linearFit1
=
polyval
(
linearCoef1
,
10
*
log10
(
new_distances1
(
index_break1_end
:
index_break1_start
)));
semilogx
(
new_distances1
(
1
:
I_RSSI_max1
),
data1
{
idx
}(
1
:
I_RSSI_max1
,
13
),
'rx'
,
new_distances1
(
index_break1_end
:
index_break1_start
),
linearFit1
,
'r-'
)
display
(
sprintf
(
'Run %d :slope UHF : %f'
,
idx
,
linearCoef1
(
1
)))
hold
on
linearCoef2
=
polyfit
(
10
*
log10
(
new_distances2
(
index_break2_end
:
index_break2_start
)),
data2
{
idx
}(
index_break2_end
:
index_break2_start
,
13
),
1
);
linearFit2
=
polyval
(
linearCoef2
,
10
*
log10
(
new_distances2
(
index_break2_end
:
index_break2_start
)));
semilogx
(
new_distances2
(
1
:
I_RSSI_max2
),
data2
{
idx
}(
1
:
I_RSSI_max2
,
13
),
'bx'
,
new_distances2
(
index_break2_end
:
index_break2_start
),
linearFit2
,
'b-'
)
display
(
sprintf
(
'Run %d :slope 2.6GHz : %f'
,
idx
,
linearCoef2
(
1
)))
title
(
sprintf
(
'Run %d: With the data the passing of the train'
,
idx
))
legend
(
'UHF'
,
'UHF:linear fitting'
,
'2.6GHz card 1'
,
'2.6GHz card 1:linear fitting'
);
xlabel
(
'distance [km]'
)
ylabel
(
'RSSI [dBm]'
)
% Zoom on the linear fitting
figure
(
idx
*
10
+
4
)
hold
off
linearCoef1
=
polyfit
(
10
*
log10
(
new_distances1
(
index_break1_end
:
index_break1_start
)),
data1
{
idx
}(
index_break1_end
:
index_break1_start
,
13
),
1
);
linearFit1
=
polyval
(
linearCoef1
,
10
*
log10
(
new_distances1
(
index_break1_end
:
index_break1_start
)));
semilogx
(
new_distances1
(
index_break1_end
:
index_break1_start
),
data1
{
idx
}(
index_break1_end
:
index_break1_start
,
13
),
'rx'
,
new_distances1
(
index_break1_end
:
index_break1_start
),
linearFit1
,
'r-'
)
%display(sprintf('Run %d :slope UHF : %f',idx,linearCoef1(1)))
hold
on
linearCoef2
=
polyfit
(
10
*
log10
(
new_distances2
(
index_break2_end
:
index_break2_start
)),
data2
{
idx
}(
index_break2_end
:
index_break2_start
,
13
),
1
);
linearFit2
=
polyval
(
linearCoef2
,
10
*
log10
(
new_distances2
(
index_break2_end
:
index_break2_start
)));
semilogx
(
new_distances2
(
index_break2_end
:
index_break2_start
),
data2
{
idx
}(
index_break2_end
:
index_break2_start
,
13
),
'bx'
,
new_distances2
(
index_break2_end
:
index_break2_start
),
linearFit2
,
'b-'
)
%display(sprintf('Run %d :slope 2.6GHz : %f',idx,linearCoef2(1)))
title
(
sprintf
(
'Run %d: '
,
idx
))
legend
(
'UHF'
,
'UHF:linear fitting'
,
'2.6GHz card 1'
,
'2.6GHz card 1:linear fitting'
);
xlabel
(
'distance [km]'
)
ylabel
(
'RSSI [dBm]'
)
end
if
idx
==
3
||
idx
==
4
figure
(
idx
*
10
+
3
)
...
...
@@ -321,6 +415,7 @@ for idx=1:length(d1)
xlabel
(
'distance [km]'
)
ylabel
(
'RSSI [dBm]'
)
end
...
...
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