6.888 Lab 3: Wireless Localization

Lab 3 Due Friday Oct. 25, 11:59 pm

Introduction

In this lab, you will learn some basic concepts on wireless localization and antenna arrays. The code for this lab will be written in matlab. We will provide you with a skeleton code. Ideally, you will only need to modify the places where you see : "... add your code here ..." . We will provide you with wireless signals on which you can test your code. The lab will be divided into several tasks. Each task will require you to run some test script which will output a file or plot a figure. You will have to keep the figures and the output files and submit them along with your src code.

In addition to submitting your code and results, you will have to answer some questions. You can answer these questions in a .pdf file which you should include in the .zip file which you will submit.


You can download a copy of the lab code here : 6.888_lab3.zip

The code has 4 subfolders: The above folders should contain the following files:

SRC_CODE Test_Scripts Mat_Files Results
angle_of_arrival_linear.m test_angle_of_arrival_linear.m
test_vary_AoA_linear.m
test_vary_fc_fix_n_d.m
test_vary_d_fix_n_fc.m
test_vary_n_fix_d_fc.m
Test_AoA_Linear_R1.mat
Test_AoA_Linear_R2.mat
Test_AoA_Linear_R3.mat
Test_AoA_Linear_R4.mat
Test_AoA_Linear_R5.mat
Result_AoA_Linear.mat
Result_AoA_Linear.fig
Result_AoA_vs_fc.fig
Result_AoA_vs_d.fig
Result_AoA_vs_n.fig
compute_multipath_profile_linear.m test_compute_multipath_profile_linear.m
test_mp_vs_n_linear.m
Test_MP_R1.mat
Test_MP_R2.mat
Result_MP.fig
Result_MP_vs_n.fig
compute_multipath_profile_sar.m test_compute_multipath_profile_sar.m Test_MP_SAR_R.mat Result_MP_sar.fig
find_nearest_ref.m test_manual_mp_matching.m
test_dtw_manual_mp_matching.m
Test_Localization_R.matResult_MP_ref1.fig
Result_MP_ref2.fig
Result_MP_dtw1.fig
Result_MP_dtw2.fig
compute_multipath_profile_circular.m test_compute_multipath_profile_circular.m
test_compute_multipath_profile_circular_2.m
test_linear_vs_circular.m
Test_MP_Circular_R1.mat
Test_MP_Circular_R2.mat
Result_MP_Circular.fig
Result_MP_Circular_2.fig
Result_Linear_vs_Circular.fig
cdtw.m . ..


Task 1: Linear Antenna Array

Consider the antenna array system shown in the figure above. We will assume there is a single path from the transmit antenna to each receive antenna. Implement the function angle_of_arrival_linear.m. It should take as input an array corresponding to the channels estimated on each antenna. It should also taks as input the number of antennas (n), the separation distance (d) between the antennas in m and the carrier frequency (fc) in Hz. It should output the angle of arrival in radians. If you need, you can use the builtin matlab function unwrap( ).

  • Run the code test_angle_of_arrival_linear.m. It will output the file Result_AoA_Linear.mat which will contain four angles.
  • Run the code test_vary_AoA_linear.m. It will output the figure Result_AoA_Linear.fig which shows the estimated angle as a function of the true angle.
  • Run the code test_vary_fc_fix_n_d.m. It will output the figure Result_AoA_vs_fc.fig which shows the estimated angle as a function of the carrier frequency.
  • Run the code test_vary_d_fix_n_fc.m. It will output the figure Result_AoA_vs_d.fig which shows the estimated angle as a function of the separation between antennas.
  • Run the code test_vary_n_fix_d_fc.m. It will output the figure Result_AoA_vs_n.fig which shows the estimated angle as a function of the number of antennas.

    Task 2: Multipath Profiles

    Recall to compute the multipath profile, you have to compute the beam strength along different angles using the following equation:

    Implement the function compute_multipath_profile_linear.m. It should take as input an array corresponding to the channels estimated on each antenna. It should also taks as input the number of antennas (n), the separation distance (d) between the antennas in m and the carrier frequency (fc) in Hz. It should compute the multipath profile at a resolution of 1 degree or pi/180 radians between 0 and pi (i.e. it should output 180 values).

  • Run the code test_compute_multipath_profile_linear.m. It will output the figure Result_MP.fig with two subplots showing the multipath profiles from 2 different transmitters. It will also use angle_of_arrival_linear.m to calculate the angle of arrival.
  • Run the code test_mp_vs_n_linear.m. It will output the figure Result_MP_vs_n.fig with three subplots corresponding to an array with 10, 20 and 30 antennas.

    Task 3: Synthetic Aperture

    In this task, instead of using an antenna array, we use a single receive antenna moving at constant speed v to simulate a synthetic aperture. Implement the function compute_multipath_profile_sar.m. It should take as input an array corresponding to the estimated channels and an array of timestamps corresponding to the time at which each channel was measured. It should also take as input the speed at which the receive antenna is moving (v) in cm/s and the carrier frequency (fc) in Hz. It should compute the multipath profile at a resolution of 1 degree or pi/180 radians between 0 and pi (i.e. it should output 180 values).

  • Run the code test_compute_multipath_profile_sar.m. It will output the figure Result_MP_sar.fig with three subplots showing the multipath profiles from 3 different transmitters.

    Task 4: Localization

    In this task, we will assume there are reference RFID tags with known positions deployed in the environment. We will localize a item by placing an RFID tag on the item which we call the target tag and finding the nearest reference tag to our target tag. We will use the multipath profiles to try to match the nearest tags.

  • Run the code test_manual_mp_matching.m. It will output two figures Result_MP_ref1.fig and Result_MP_ref2.fig. Each figure shows the multipath profiles of four RFID tags. The profile in red is for the target tag which we which to localize. The profiles in blue, black and green are for the three reference tags.

    Implement the function find_nearest_ref.m that takes as input the multipath profile of the target tag and the multipath profiles of 3 reference tags and outputs a number 1, 2, or 3 which indicates which reference tag is nearest to the the target tag. You are provided with the function cdtw.m that take two multipath profiles and computes the dtw metric. Use the dtw metric to find the nearest tag.

  • Run the code test_dtw_mp_matching.m. It will output two figures Result_MP_ref1.fig and Result_MP_ref2.fig. Each figure shows the multipath profiles the RFID target tag and the nearest reference tag.

    Task 5: Circular Antenna Array

    Consider the circular antenna array system shown in the figure above. Implement the function compute_multipath_profile_circular.m. It should take as input an array corresponding to the channels estimated on each antenna. It should also taks as input the number of antennas (n), the radius of the array (R) in m and the carrier frequency (fc) in Hz. It should compute the multipath profile at a resolution of 1 degree or pi/180 radians between 0 and 2pi.

  • Run the code test_compute_multipath_profile_circular.m. It will output the figure Result_MP_Circular.fig with two subplots showing the multipath profiles from 2 different transmitters.
  • Run the code test_compute_multipath_profile_circular_2.m. It will output the figure Result_MP_Circular_2.fig with two subplots showing the multipath profiles of the same two transmitters as before.
  • Run the code test_linear_vs_circular.m. It will output the figure Result_Linear_vs_Circular.mat with two subplots showing the multipath profiles from the same transmitter as captured by a linear array and by a circular array.

    Submit:

    Submit your code via the class's submission website, located here: https://haithamh.scripts.mit.edu:444/6.888/handin.py

    You may use your MIT Certificate or request an API key via email to log in for the first time.

    Compress you folder and name it lab3-handin.zip.

    Upload that file to the submission website via the webpage or use curl and your API key: