6962 Exam 2

Exam 2: Tracking a person using RSS measurements

Deadline: Exam 2 is a take home exam assigned Nov. 1 at 12:25 pm, and due Nov. 6 before the start of class (12:25 pm).

Experimental environment:  The experiment for this exam was conducted in a 22.2 foot by 24.3 foot section in your instructor’s home. The sensors are placed inside the home.  The area contains the living room, office, a bedroom, and half of a dining room.  The sensors are placed on tables, on windowsills, on desks, bookcase shelves, and stands, so while there is some height variation, they are typically at about 3 feet height.  

Sensors:  There were 33 sensors operating on 5 channels, exactly like the experiment for Homework 3.

Experimental path: Similar to experiment 3, I am giving you the information that the first 30 lines of data (equivalently, the first 15 seconds) correspond to data collected when no person was in the area.  (This doesn’t mean that I entered the area at 15.0 sec, just that during the first 15 seconds I was not in the area).  Compared to the homework 3, in which I walked at a constant speed, and always in paths parallel to either the x or y axis, I may or may not have done the following in this experiment:

  • Changed speed
  • Stopped for a short period of time
  • Entered and exited the area more than once
  • Taken diagonal (not parallel to either x or y axis) paths

However, just like in Homework 3, I do take a piece-wise linear path, that is, there are no curves in my path.

Files:

  • Exam2_9.txt (zip containing the txt file): Contains the lines of data. Again, each line is 33*32*5 RSS values, with a "127" as a code to indicate "not measured".  The final number on each line is the time in milliseconds since the experiment started.  There are 213 lines of data.
  • my_house_coords.txt: Contains the sensor coordinates.  There are 33 lines, x and y coordinates, space separated, on each line.

Expected Output:
For each line of the file, have your code determine if there is a person in the area or not, and if so, what coordinate the person was at.  Output one coordinate on each line of your output text file.  The first number is the x coordinate and the second number is the y coordinate, separated by a space.  If you decide no person in the area for that time, output the code “-99 -99” as the coordinate, which indicates to me that no person is present in the area.  Since the bottom left of the area is “0 0”, this coordinate can only indicate that you believe no person is present -- it isn’t a legitimate coordinate estimate.  Also, because I have given you that the first 30 lines are with no person present, your first 30 lines should be “-99 -99”.  Your output text file might look like this:

-99 -99
-99 -99
-99 -99
⋮  ⋮
-99 -99
11.1 0.3
11.5 1.1
⋮  ⋮

Again, your output text file must have 213 lines.

Performance Judging: I will compute a penalized RMS error over the 213 lines of your output file as follows.  

  • When the person is actually not in the area, and you correctly output the “-99 -99” code, your location error is 0.0.  
  • When the person is actually not in the area, and you incorrectly output a coordinate estimate, this will result in a location error of 4.0 feet (as a penalty for the incorrect presence/no presence determination).  
  • When the person is actually in the area, and you incorrectly output “-99 -99”, this will result in a location error of 4.0 feet (as a penalty for the incorrect presence/no presence determination).  
  • When the person is actually in the area, and you output a coordinate estimate, the location error is the distance between the actual coordinate and your estimate.

The penalized RMS error is just the square root of the mean of the squared location error over all 213 times.

I will calculate the RMS error nine times, each time adding in one of {-1, -0.75, -0.5, -0.25, 0, 0.25, 0.5, 0.75, 1} seconds to the start time of my “actual path”.  Your “best-case” RMSE score will be the minimum RMSE of these nine.  In other words, a second or less delay or advance in your algorithm (or my ground-truth track) will be “corrected”.  

Submission:  Turn in (1) your output text file; (2) your code; and (3) a short (one page) description of your method (compared to the original method) and parameters you used).  Turn in the three in separate files, to Canvas.  For (1) and (2), submit only files with extension .txt, .py, .m, or .zip (but include txt, py or m files only in your zip).  For (3), any format is okay.  I must be able to run your code, so include any files necessary.  Please add comments to your code wherever it differs from the original code.

Method to calculate the penalized RMSE for Exam 2

Below are the "solutions" to Exam 2. That is, using the code below, I calculated the accuracy of each student's estimated path.

Main python code, calc_prmse.py. Call it like:

  • python ./calc_prmse.py filename.txt

where "filename.txt" is the estimated coordinates from your code.

Text files that need to be in the same directory: Exam2_9_path.txt, and Exam2_9_pivot_coords.txt.