Starting from:
$35

$29

Programming Assignment 1: IMU Step Counter Solution

1 Objective




The goal of this assignment is to get familiar with the smartphone’s IMU sensing capability. Step counting with IMU is an important step for smartphone dead reckoning based indoor localization. Students will write code in matlab or python to process IMU data and output how many steps there are.




Students can work on this assignment in a team of two.







2 Problem description




We have provided you with 5 sets of smartphone accelerometer data in CSV files. These data cover different human modes: (1) the phone in hand and the hand swinging, (2) phone held in the hand statically as if the user is looking at it while walking, (3) phone in pant pocket. For each file, there are three columns, representing the accelerometer readings in three local axes (unit: / 2). The accelerometer is sampled at 100Hz. The phone placement and ground truth step numbers are indicated in the filename of each CSV file. Some signal processing is required to count how many steps there are.




Students are expected to use common signal processing and linear algebra functions (e.g., high/low pass filtering, convolution, cross coloration, peak detection, fft etc.) and libraries (numpy, scipy etc.). If you are unsure about whether a specific function/library can be used, please contact TA.




3 Input/Output format




Please make your code into a single file and name it as mp1.m (if using matlab) or mp1.py (if using python). TA will use [python mp1.py] or [matlab -nodisplay -nosplash -r "mp1; exit"] to run your code.




The code should read the input from “data.csv” located in the same folder with the code and write output to “result.txt” also in the same folder. Note that “result.txt” should only contain an integer number (number of steps).




4 How to submit




Please fill in this Google form of grouping information (if working alone, only fill in netid1), and upload code onto compass (one group only need to upload once).




5 Grading




We will grade based on the 5 sets of data we provided (part A) and another 5 sets of secret data unknown to the students (part B). For part A, each case is 5 points and for part B, each case is 15 points. For a specific test case, the grade depends on how far away the result deviates from groudtruth (difference within 2 steps is fine since the beginning and end are boundaries and we tolerate one step error at each end), i.e., if the code output is C, the

groundtruth is D, then the percentage of score you get for this test case is (1 − max⁡{| − |−2,0}) × 100%

More products