Exercise 2: Pose Estimation and Step Counting from IMU Data

Similar documents
Computing Euler angles from a rotation matrix

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

Programming Exercise 3: Multi-class Classification and Neural Networks

An inertial haptic interface for robotic applications

Lectures notes on orthogonal matrices (with exercises) Linear Algebra II - Spring 2004 by D. Klain

Basic Principles of Inertial Navigation. Seminar on inertial navigation systems Tampere University of Technology

3D Tranformations. CS 4620 Lecture 6. Cornell CS4620 Fall 2013 Lecture Steve Marschner (with previous instructors James/Bala)

1. Classification problems

Magnetometer Realignment: Theory and Implementation

STATIC AND KINETIC FRICTION

VIRTUAL REALITY GAME CONTROLLED WITH USER S HEAD AND BODY MOVEMENT DETECTION USING SMARTPHONE SENSORS

The Design and Implementation of a Quadrotor Flight Controller Using the QUEST Algorithm

Performance Metrics. number of mistakes total number of observations. err = p.1/1

Sensor Fusion Mobile Platform Challenges and Future Directions Jim Steele VP of Engineering, Sensor Platforms, Inc.

Abstract. Introduction

Sensors. Marco Ronchetti Università degli Studi di Trento

Experiment: Static and Kinetic Friction

Lecture L3 - Vectors, Matrices and Coordinate Transformations

A DECISION TREE BASED PEDOMETER AND ITS IMPLEMENTATION ON THE ANDROID PLATFORM

Euler s Method and Functions

Solutions of Linear Equations in One Variable

Animation (-4, -2, 0 ) + (( 2, 6, -4 ) - (-4, -2, 0 ))*.75 = (-4, -2, 0 ) + ( 6, 8, -4)*.75 = (.5, 4, -3 ).

2 Session Two - Complex Numbers and Vectors

Experiment 9. The Pendulum

2013 G Miller. 3 Axis Brushless Gimbal Controller Manual

T : Classification as Spam or Ham using Naive Bayes Classifier. Santosh Tirunagari :

Evaluation & Validation: Credibility: Evaluating what has been learned

THE COMPLEX EXPONENTIAL FUNCTION

MTi and MTx User Manual and Technical Documentation

K2 CW Filter Alignment Procedures Using Spectrogram 1 ver. 5 01/17/2002

Assignment 2: Animated Transitions Due: Oct 12 Mon, 11:59pm, 2015 (midnight)

How to Graph Trigonometric Functions

How To Control Gimbal

1 One Dimensional Horizontal Motion Position vs. time Velocity vs. time

CIS 536/636 Introduction to Computer Graphics. Kansas State University. CIS 536/636 Introduction to Computer Graphics

Motion Sensing with mcube igyro Delivering New Experiences for Motion Gaming and Augmented Reality for Android Mobile Devices

Numerical Analysis. Professor Donna Calhoun. Fall 2013 Math 465/565. Office : MG241A Office Hours : Wednesday 10:00-12:00 and 1:00-3:00

Understanding Poles and Zeros

Orientation Estimation using Smartphone Sensors

ASEN Structures. MDOF Dynamic Systems. ASEN 3112 Lecture 1 Slide 1

HP TouchPad Sensor Setup for Android

Frequently Asked Questions (FAQs)

K.Prasanna NIT Rourkela,India Summer Internship NUS

Magnetic Fields and Their Effects

A review of ADP processing software

: Introduction to Machine Learning Dr. Rita Osadchy

Experiment 3: Magnetic Fields of a Bar Magnet and Helmholtz Coil

The purposes of this experiment are to test Faraday's Law qualitatively and to test Lenz's Law.

Optical Encoders. K. Craig 1. Actuators & Sensors in Mechatronics. Optical Encoders

Unit 4 Practice Test: Rotational Motion

Sensors & Motion Sensors in Android platform. Minh H Dang CS286 Spring 2013

Quick Start Guide ActiGraph GT9X Link + ActiLife

Awell-known lecture demonstration1

Lecture 2. Binary and Hexadecimal Numbers

Chapter 17. Orthogonal Matrices and Symmetries of Space

In order to describe motion you need to describe the following properties.

TWO-DIMENSIONAL TRANSFORMATION

Auto-Tuning Using Fourier Coefficients

CSE 6040 Computing for Data Analytics: Methods and Tools. Lecture 1 Course Overview

PRACTICAL GUIDE TO DATA SMOOTHING AND FILTERING

Cell Phone based Activity Detection using Markov Logic Network

FRICTION, WORK, AND THE INCLINED PLANE

19th International Conference on Mechatronics and Machine Vision in Practice (M2VIP12), 28-30th Nov 2012, Auckland, New-Zealand

Experiment 3: Magnetic Fields of a Bar Magnet and Helmholtz Coil

Metrics on SO(3) and Inverse Kinematics

VitalJacket SDK v Technical Specifications

HOMEWORK # 2 SOLUTIO

MATLAB Functions. function [Out_1,Out_2,,Out_N] = function_name(in_1,in_2,,in_m)

Knowledge Discovery and Data Mining

Using Casio Graphics Calculators

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL II)

Triangle Trigonometry and Circles

Lecture 1: Systems of Linear Equations

Trigonometric Functions and Triangles

Essential Mathematics for Computer Graphics fast

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Chapter 2 Lead Screws

Data and Analysis. Informatics 1 School of Informatics, University of Edinburgh. Part III Unstructured Data. Ian Stark. Staff-Student Liaison Meeting

Automatic Labeling of Lane Markings for Autonomous Vehicles

VitalJacket SDK v Technical Specifications

Signal to Noise Instrumental Excel Assignment

Dynamic Programming. Lecture Overview Introduction

The Calculation of G rms

Review of Fundamental Mathematics

PHYS 211 FINAL FALL 2004 Form A

Performance Measures for Machine Learning

Curve Fitting, Loglog Plots, and Semilog Plots 1

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Body-Area Instrumentation for Avoidance of Workplace Injury

16.2 Periodic Waves Example:

Coriolis acceleration

Mathematics Pre-Test Sample Questions A. { 11, 7} B. { 7,0,7} C. { 7, 7} D. { 11, 11}

Computer Animation. Lecture 2. Basics of Character Animation

Cross product and determinants (Sect. 12.4) Two main ways to introduce the cross product

Activity recognition in ADL settings. Ben Kröse

Lesson 3 DIRECT AND ALTERNATING CURRENTS. Task. The skills and knowledge taught in this lesson are common to all missile repairer tasks.

MATH2210 Notebook 1 Fall Semester 2016/ MATH2210 Notebook Solving Systems of Linear Equations... 3

Chapter 6. The stacking ensemble approach

OPTOFORCE DATA VISUALIZATION 3D

Active Vibration Isolation of an Unbalanced Machine Spindle

Transcription:

Exercise 2: Pose Estimation and Step Counting from IMU Data Due date: 11:59pm, Oct 21st, 2015 1 Introduction In this exercise, you will implement pose estimation and step counting. We strongly encourage you to go through the lecture slides before starting this exercise. To ease your work, you are provided with accelerometer, gyro and compass measurements collected in the Information Technology Building (ITB) in the McMaster University. Your implementation should be based on Matlab/Octave. For instructions on downloading and installing Octave, check out Download GNU Octave. Further documentation for Octave functions can be found at the Octave documentation pages. MATLAB documentation can be found at the MATLAB documentation pages. 2 Pose Estimation In the first part of the exercise, you will implement the procedure to estimate poses from IMU data collected from a stationary device. All IMU measurements are in the device coordinate system (Figure 1). Thus, the main task is to determine the rotation matrix from the device coordinate system to the global coordinate system. Upon obtaining the rotation matrix R, you can then compute the Euler angles, yaw, roll and pitch. For consistency, we assume the rotations follows the order of rotating in counter-clock-wise around the x axis, y axis and finally the z axis (called x-y-z extrinsic). Furthermore, for simplicity, the true north is assumed to be identical to the magnetic north. 1

Figure 1: Global coordinate system and device coordinate system (Android) 2.1 Data set In the data set provided, under the folder pose, there are two files, pose.mat and imu.mat pose.mat contains the ground truth poses. There are a total of 7 records (cells). Each record has three fields, i) a string X-Y-Z order, ii) angles of roll-pitch-yaw in radian and iii) the corresponding rotation matrix. These records are for you to verify your implementation. It should be noted due to the lack of precise true north, the ground truth rotation may differ a bit and the angles (in absence of Gimbal lock where θ = ±π/2) may differ by 10 20 degrees. imu.mat contains the IMU measurements. There are a total of 7 cells. The nth cell contains the 3-axis accelerometer readings, 3-axis gyro readings and 3-axis magnetometer readings, while the ground truth pose is in the nth cell in pose.mat. For each sensor, multiple readings in a time period are stored. The first entry of a reading is the label of the respective data (e.g, acc or gyro), the second entry contains the tuple {timestamp (ms), x data, y data, z data}. 2

2.2 Implementation In your implementation, you should take the IMU data file name (e.g., imu.mat) as an input argument and output the resulting rotation matrices and Euler angles, storing them in the same format as those in pose.mat in a mat file (under a different name). Do NOT assume the number of records is fixed (e.g., not necessarily 7). Instead, use size() to extract the number of records. For grading, I will use a different IMU dataset with different number of records. Hint: In evaluating your results, compare the rotation matrix from the ground truth data first. When θ = ±π/2, due to the loss of DoF, the Euler angles are not unique. Thus, when θ = π/2 (θ = π/2), you only need to verify if ψ φ (ψ + φ) are close to the corresponding values from the ground truth dataset. 3 Step Counting Congratulations! You are half-way through. Now, we proceed to identify the steps and count steps. In this part of the exercise, you only need to utilize 3-axis accelerometer measurements. 3.1 Data set In the folder step/, you will find the file step.mat. Upon loading this file, you will find several 1-d array of the same length. step event: a binary array, where the ith element indicates whether a step event is detected ( 1 ) or not ( 0 ) at the ith index (the actual time can be retrieved from the time stamp array using the index). This serves as the ground truth data. Here, a step event occurs when one of the feet hits the ground. timestamp: time measured in ms. x, y, z: x-, y-, z-axis accelerometer readings. A total of 100 steps have occurred in this dataset. 3

3.2 Implementation Your implementation should take the mat file as input and produce the following outputs: detected step event: similar to step event, this list should contain binary values for the detected step event by your algorithm. step count and step count error: the total number of steps and step count error calculated as, error = num step detected actual num step, (1) actual num step where the actual num step is 100. False positive (FP), false negative (FN) errors: To get more fine-grain assessment of accuracy of your implementation, we also provide a function eval stat.m that computes the FP, FN, true positive (TP), precision and recall. FP and FN are commonly used in evaluating the performance of binary classifier, where FP is an error where the test reports the presence of a condition while in reality there is not; FN on the other hand, occurs when a test result improperly indicates no presence of a condition. The function takes the list of ground truth step events and your detected events as inputs and outputs FP, FN, TP, precision and recall. Try help eval stat for more information. To help debugging your codes and visualizing each step of the algorithm, it is always a good practice to plot the input data, intermediate results and the final results (e.g., detected step events). Hint: The accelerometer data was collected from an Android device and was sampled as fast as the system can support. As a result, you may note that the sampling intervals vary. You may want to compute an average sample rate from the data first and use it to determine filter parameters. For the HPF to determine the linear acceleration, you can use an exponential moving average filter. 4

For the LPF applied to the accelerometer magnitude data, you may use a 5th order Butterworth filter with a properly chosen cutoff frequency (butt(... )) combined with filtfilt(... ). The latter provides zero-phase forward and reverse digital IIR filtering. You can directly use (findpeaks(... )) for peak detection. 4 Submission In the report, give a brief description of the algorithms you have implemented, summarize the performance results and key observations. Submit your report (in pdf) and codes (in.m) and output files (in.mat) through SVN. For pose estimation, summarize the pose estimation error in a table. For step count, include the computed step count, step count error, FP and FN. In the report, also include a plot that shows the accelerometer magnitude (acc = acc 2 x + acc 2 y + acc 2 z) over time and highlights the times that step events are detected in the ground truth data and by your algorithm. Acknowledgement Many thanks to Qiang Xu for data collection and preparing the test code for step counting. 5