Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Multilateration Assignment

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Workshop on Location Tracking for Internet of Things

IIT Madras
Multilateration
Self-Assessment Assignment

Consider a 2D-grid of MxN cells where we want to


locate an IoT device (marked as N) using
multilateration. The lower-left corner cell can be
treated as the origin (0,0) while the location of the top-
right cell is (M, N). Assume that all anchors (A , A and 1 2,

A ) are kept at known locations.


3

Task 1: Dataset Generation. Simulate grid of size


100x100. Consider 3 anchors.
a. Randomly generate 100 unique anchor location
sets and for each randomly generated anchor location
set, generate 50 random unique node locations
(programming hint: use a Set ADT while generating
the data). All such location points should be within the
simulated grid’s bounding box. Write this data to a file,
<true_locations.csv>
[(x ,y ),(x , y ),(x , y )] , (NX , NY ), .. (NX , NY )
1 1 2 2 3 3
1
1 1 50 50

[(x ,y ),(x , y ),(x , y )] , (NX , NY ), .. (NX , NY )


1 1 2 2 3 3
2
1 1 50 50

… … … … … …
[(x ,y ),(x , y ),(x , y )] , (NX , NY ), .. (NX , NY )
1 1 2 2 3 3
100
1 1 50 50

b. Generate the range values for each node location to the respective anchors and write
them to a file <pure_ranges.csv>

[(x ,y ),(x , y ),(x , y )] , (R ,R ,R ) , .. (R ,R ,R )


1 1 2 2 3 3
1
1 2 3
1
1 2 3
50

… … … … … …
[(x ,y ),(x , y ),(x , y )] , (R ,R ,R ) , .. (R ,R ,R )
1 1 2 2 3 3
100
1 2 3
1
1 2 3
50

c. Now generate noisy range values for each node location by adding Gaussian noise to
each pure range value as in <pure_ranges.csv>. R = R + N(μ,σ). Generate three datasets,
noisy pure

for μ = 0.5, 1 and 2. Assume σ = 0.1 for all cases. Write these data into three files
<noisy_ranges_05.csv>, <noisy_ranges_1.csv> and <noisy_ranges_2.csv>

Task 2: Range Equations. Generate two random numbers, A in [1, 100] and B in [1, 50].
Choose the A line and the B node location from the files in (a), (b), and (c).
th th

a. Form the cost function (use root mean square error) using
the three range equations for that particular node and anchor
locations. Evaluate the “cost value” for all the 100x100 cells
for <pure_ranges.csv>, <noisy_ranges_05.csv>,
<noisy_ranges_1.csv> and <noisy_ranges_2.csv>. While
evaluating your cost function put (X = i and Y = j) where i and
j are integers in [0,99]. Visualize the normalized cost values
(scale: 0 to 1) in the form of a heatmap. Plot the 4 heatmaps.
Don’t interpolate your heatmaps.

Instructor: Ayon Chakraborty, SENSE Lab, IIT Madras


b. Summarize your observations. Did you realize the fact that we are trying to use a brute-
force approach to scan all possible cells for the solution? Is the cell with the global minima
near (or, how far from) the actual node location? (cost value = 0 for non-noisy case) Are
there local minima present in the noisy cases?

Task 3: Trilateration. Now use an optimizer to solve for the node location for all 100x50
node locations (pure + 3 noisy versions). If you are using python, use lmfit
(https://lmfit.github.io/lmfit-py/). Round off the output of the solver to the nearest integer
value, say if the solver outputs (50.69, 45.23) - round it off to (51, 45) for the estimated
location cell. Also make sure the solver knows the limits of the solution (i.e., the bounding
box). Write the solvers output into 4 files, <pure_locs.csv>, <noisy_locs_05.csv>,
<noisy_locs_1.csv> and <noisy_locs_2.csv>. Compare the solved locations with the entries
in <true_locations.csv> and compute the localization errors (Euclidean distance between
true and estimated location).
a. Plot 4 CDFs (each for the 5000 error values) on the same graph, to compare the 4
cases.
b. For the 4 cases state the: (i) median error, (ii) 75th percentile error, and (iii) 95th
percentile error.

Task 4: Impact of anchor points.


a. Compute the median localization error for the 50 locations per anchor location. You
will have 100 such median values for 100 anchor locations each for the 4 cases. Draw 4
error histograms. Use the same x-axis range for all the 4 histograms, so that they can be
compared easily.
b. Do some anchor locations tend to produce more erroneous results than others?
Recall, that the specific anchor location geometry influences the GDoP - collinear anchor
points tend to produce higher errors. Comment based on the above histograms - for
instance, do you observe error clusters that are correlated to similar relative geometry of the
anchor points?
c. Can you come up a simple metric based solely on the anchors’ coordinates realized
by the function signature, F((x ,y ),(x , y ),(x , y )) that is highly correlated to the
1 1 2 2 3 3

magnitude of the localization errors? This is a slightly open-ended question and any
reasonable answer is acceptable. Can this “F” be learned from data?

Instructor: Ayon Chakraborty, SENSE Lab, IIT Madras

You might also like