�CS60055: Ubiquitous Computing: Background Topics
Location, Gesture and Activity Sensing
The Fundamentals of Motion Tracking
INDIAN INSTITUTE OF TECHNOLOGY
KHARAGPUR
Department of Computer Science and Engineering
We are living in the edge of wearables ...
Indian Institute of Technology Kharagpur
Wearables -- Head to Toe
Indian Institute of Technology Kharagpur
Range of Devices
Indian Institute of Technology Kharagpur
Sensors on Wearables
IMU �Altimeter�Bio-acoustic�Blood Pressure�Brightness�Camera�ECG�EDA�EMG�Fiber Optic Sensors�Compass�
GPS
GSR
Humidity
Magnetometer
IR Proximity
IR Temperature
LED
Glucometer
Pressure
Microphone
Piezoelectric
RFID
Spectrometer
Thermometer
Textile sensors
Ultrasound
Weight
Optical sensor
mmWave sensor
Electrodes
Inductive wire
IR Photo Reflective
Indian Institute of Technology Kharagpur
Our First Problem ...
vs
with a
Indian Institute of Technology Kharagpur
IMU / Inertial Sensors
Indian Institute of Technology Kharagpur
Motion and the Frame of Reference
Indian Institute of Technology Kharagpur
Motion and the Frame of Reference
Indian Institute of Technology Kharagpur
Motion and the Frame of Reference
0 m/s2
0 m/s2
9.8 m/s2
Indian Institute of Technology Kharagpur
Motion and the Frame of Reference
0 m/s2
0 m/s2
9.8 m/s2
Indian Institute of Technology Kharagpur
Motion and the Frame of Reference
Assume that the ball is in rest
Indian Institute of Technology Kharagpur
Motion and the Frame of Reference
Can we represent the motion of every object with this principle?
Indian Institute of Technology Kharagpur
Consider the following scenario ...
With an accelerometer mounted on Mr. Bean's headphone, can you detect that he is enjoying the music?
Indian Institute of Technology Kharagpur
Equivalence Principle and Its Impact
“A little reflection will show that the law of the equality of the inertial and the gravitational mass is equivalent to the assertion that the acceleration imparted to a body by a gravitational field is independent of the nature of the body. For Newton’s equation in motion in a gravitational field, written out in full, it is:
(inertial mass).(acceleration) = (intensity of the gravitational field).(Gravitational mass)
It is only when there is numerical equality between the inertial and gravitational mass that the acceleration is independent of the �nature of the body.”
Indian Institute of Technology Kharagpur
Equivalence Principle and Its Impact
A falling object behaves exactly the same on a planet or in an equivalent accelerating frame of reference.
Image Source: Wikipedia
Indian Institute of Technology Kharagpur
Equivalence Principle and Its Impact
Y
X
Z
Indian Institute of Technology Kharagpur
Equivalence Principle and Its Impact
Y
X
Z
g
Indian Institute of Technology Kharagpur
Equivalence Principle and Its Impact
Y
X
Z
g
We call this reference frame as the local inertial frame of the object
Indian Institute of Technology Kharagpur
Equivalence Principle and Its Impact
Y
X
Z
g
We call this reference frame as the local inertial frame of the object
Accelerometer measures the acceleration with respect to this local inertial frame
Indian Institute of Technology Kharagpur
Equivalence Principle and Its Impact
Y
X
Z
g
We call this reference frame as the local inertial frame of the object
Accelerometer measures the acceleration with respect to this local inertial frame
The "gravity offset" must be subtracted to obtain the actual acceleration, when the object moves on the earth's surface
Indian Institute of Technology Kharagpur
Impact of Rotation
Indian Institute of Technology Kharagpur
Impact of Rotation
Y
X
Z
The gravity offset is towards the y-axis
Indian Institute of Technology Kharagpur
Impact of Rotation
Y
X
Z
X
Z
Y
The gravity offset gets different impact on different axes -- how to subtract the gravity offset?
The local inertial frame changes due to the rotation
Indian Institute of Technology Kharagpur
Impact of Rotation
Y
X
Z
X
Z
Y
Y = g
Y ≠ g
Indian Institute of Technology Kharagpur
Angle Transformation
Y
X
Z
Indian Institute of Technology Kharagpur
Angle Transformation
Y
X
Z
y
x
z
We need to figure out the components of the gravity offset on each of the components of the local inertial frame
Indian Institute of Technology Kharagpur
Orientation Update
Image source: Wikipedia
Indian Institute of Technology Kharagpur
Six Degrees of Freedom
Image Source: Wikipedia
The three angles, roll, pitch and yaw are called the Euler angles to denote the orientation of an object, with respect to a frame of reference
Indian Institute of Technology Kharagpur
Euler Angle and Angle Transformation
Y
X
Z
y
x
z
Φ
Φ = Roll
Θ = Pitch
Ψ = Yaw
Step 1: Rotate the Z-Y plane on the roll angle to adjust the Z axis (rotation across X-axis)
Indian Institute of Technology Kharagpur
Euler Angle and Angle Transformation
Y
X
Z
y
z
Φ
z'
Φ
x
y'
Φ = Roll
Θ = Pitch
Ψ = Yaw
When you try to adjust the Z-axis, the Y-axis also observes an additional rotation on the roll angle
Indian Institute of Technology Kharagpur
Euler Angle and Angle Transformation
Y
X
Z
y
z
Φ
z'
x
y'
Φ = Roll
Θ = Pitch
Ψ = Yaw
Step 2: Rotate the X-Z plane on the pitch angle to adjust the X-axis (Rotation across Y-axis)
Θ
Indian Institute of Technology Kharagpur
Euler Angle and Angle Transformation
Y
X
Z
y
z
Φ
z'
x
y'
Φ = Roll
Θ = Pitch
Ψ = Yaw
Θ
The Y-axis needs to be adjusted now!
Indian Institute of Technology Kharagpur
Euler Angle and Angle Transformation
Y
X
Z
y
z
Φ
z'
x
y'
Φ = Roll
Θ = Pitch
Ψ = Yaw
Θ
Step 3: Rotate the Y-X plane for the yaw angle with respect to the Z-axis
Ψ
Indian Institute of Technology Kharagpur
Computing the Euler Angles
Indian Institute of Technology Kharagpur
Computing the Euler Angles
We can replace α with the corresponding roll, pitch or the yaw angles depending on the rotations. For example, for 3-2-1 rotations, the angles corresponding to M1, M2, and M3 would be the roll, the pitch, and the yaw angles
Indian Institute of Technology Kharagpur
Computing the Euler Angles
Indian Institute of Technology Kharagpur
Computing the Euler Angles
X
Z
Y'
Y
Z'
X'
+roll Φ
g = 9.81 m/s2
+pitch Θ
Indian Institute of Technology Kharagpur
Computing the Euler Angles
X
Z
Y'
Y
Z'
X'
+roll Φ
g = 9.81 m/s2
+pitch Θ
Indian Institute of Technology Kharagpur
Computing the Euler Angles
X
Z
Y'
Y
Z'
X'
+roll Φ
g = 9.81 m/s2
+pitch Θ
Indian Institute of Technology Kharagpur
Computing the Euler Angles
X
Z
Y'
Y
Z'
X'
+roll Φ
g = 9.81 m/s2
+pitch Θ
Indian Institute of Technology Kharagpur
Computing the Euler Angles
X
Z
Y'
Y
Z'
X'
+roll Φ
g = 9.81 m/s2
+pitch Θ
Indian Institute of Technology Kharagpur
Computing the Euler Angles
X
Z
Y'
Y
Z'
X'
+roll Φ
g = 9.81 m/s2
+pitch Θ
Indian Institute of Technology Kharagpur
Computing the Euler Angles
X
Z
Y'
Y
Z'
X'
+roll Φ
g = 9.81 m/s2
+pitch Θ
Indian Institute of Technology Kharagpur
Computing the Euler Angles
Indian Institute of Technology Kharagpur
Computing the Euler Angles
Indian Institute of Technology Kharagpur
Gyroscopes
Image Source: Wikipedia
Indian Institute of Technology Kharagpur
Putting them all together ...
Indian Institute of Technology Kharagpur
Putting them all together ...
Indian Institute of Technology Kharagpur
How Can We Use Gyroscope for Self-Balancing?
Indian Institute of Technology Kharagpur