# Slide Ruler. ? X 5" On today’s menu...  What happened with Gravity  Noise  The tool today  Fundamental Limitations  Magical Christmas Land  (Where.

## Presentation on theme: "Slide Ruler. ? X 5" On today’s menu...  What happened with Gravity  Noise  The tool today  Fundamental Limitations  Magical Christmas Land  (Where."— Presentation transcript:

Slide Ruler

? X 5"

On today’s menu...  What happened with Gravity  Noise  The tool today  Fundamental Limitations  Magical Christmas Land  (Where everything is ideal, and money grows on trees)

Gravity Conquered at last

Gravity + + + - Earth Coordinates: [0,-g] Phone Coordinates: [0,-g] Earth Coordinates: [0,-g] Phone Coordinates: [-g * cosθ, -g * sinθ] G ⃗ θ + + + - G ⃗ G ⃗x⃗x G ⃗y⃗y (Two-Dimensional Example) Sensor.TYPE_ORIENTATION Returns phone orientation with respect to Earth: θ,φ,ψ Define Rotation Matrix R (θ,φ,ψ) R (θ,φ,ψ)  G earth = G phone Acceleration – G phone = True Acceleration Problem: Sensor.TYPE_ORIENTATION uses the accelerometer to find angles Therefore, It is impossible to find orientation when phone is in motion. The sensor assumes accelerometer is gravity. But during motion, the accelerometer is the sum of both motion and gravity. We need gravity to determine the orientation, and we need the orientation to determine gravity.

Final Gravity Solution Notice: When the phone is flat, gravity is confined to the z-axis If gravity is known and constant the entire time, we may simple subtract this gravity from each measurement Solution: Only measure x-axis, theoretically gravity free Because the table may be a little slanted, there may be some tiny component of gravity in x-axis. Observe what this value is at rest, then subtract it from each measurement to “zero” gravity out. + + + - G ⃗ Push ⃗ A = [P, 0, -G] + + + - G ⃗ Push ⃗ A = [P] Measuring A = [A X, A Y, A Z ] Measuring A = [A X ]

Tilt Problem Started off with no tilt Slight tilt of 10-15 degrees Steep tilt of 60-75 degrees

The Impact Need gravity to be constant User may not carry the device. It must be slid. Introducing: Slide Ruler May only measure 1-dimensional distances X These changes improved accuracy significantly X Did the tool work?

No Where does it come from? ise

Noise WHY the noise? WHAT did we do about it? Many factors could be responsible Phone twists as it slides Not all measurements count Sometimes silly measurements appear in accelerometer Gravity changes per measurement Straighten Trim Flatten “Raygun” Calibration

Straighten XX X X X Phone should move in a straight line, without rotating...but sometimes, the user may twist the phone as it moves X θ Using the geomagnetic sensor, this angle can be sensed. (This is the only angle that can be sensed while the phone is in motion). Each measurement, X, is straightened into X’: X’ = X * secant(θ) XXX DEPRECATED

Trim After Calibration, the accelerometer is taking measurements, but the phone is not in motion yet These measurements, below a certain threshold, can be discarded, because they only exist to propagate error through the calculation process After collection, Trim goes through the list of measurements and removes all values before the first measurement that is above some threshold (5% of the peak value)

Flatten (but wait!) Some runs generate data points that are extremely large (i.e. physically impossible) Cap values at a reasonable value HOWEVER, the source of extremely large data points was found!

Raygun Calibration Visual cue Quicker calibrate Calibrate on each run

In spite of these efforts, Noise remained

Noise Handling How do we remove it?

Noise Handling HOW to measure the noise?WHAT do we do with this? If we can somehow “measure” the noise, we can try to remove it. Jitters in data Smoothing Algorithms The phone ends at rest. Zero the Velocity The less smooth the data appears, the more noise present in each measurement The calculated ending velocity gives a measure of noise

Smoothing Algorithms Thought data was erroneous and needed to be smoothed out Implemented a moving average with m=3 algorithm Ended up “deadening” data

Zero Velocity X Phone should start and stop at rest Start! Stop! X Start! Stop! Wait! Come back!...but, due to noise, the phone will actually calculate some final velocity that is non-zero V = 0 V = V* V* = Total noise in velocity N = Number of measurements V* / N = Avg. noise acquired per measurement //Simple Remove Noise: //for each measurement v { //v -= (V*/N); //} Assumption: small measurements are noisier f = factor close to 0 for large v close to 1 for small v //Better Remove Noise: //for each measurement v { //v -= f *(V*/N); //}

The Tool Today

Step Right Up! Demo! Findings from testing: Accurate to ±2 inches for every foot of the actual object Can only measure in a straight line

Fundamental Constraints

Unavoidable Sources of Error Gravity Small tilt of phone causes gravity to spill into an axis Jittery hands Not a problem for Slide Ruler! Carrying the phone introduces significant noise Hardware Constraints -- Accelerometer Sampling rate is too slow Measurements are noisy This chip was designed for app feedback—not data analysis

Left vs Right Sliding the phone to the left vs sliding the phone to the right

Ideal Conditions Gyroscope Would allow us to monitor orientation independent of accelerometer Allow for perfect removal of gravity Significant noise reduction Phone can move in 3-D Industrial-quality Accelerometer Better sampling rate More accurate measurements Even more time Bug testing Algorithm development

Conclusion

Success? 1. The app utilizes the mobile device’s accelerometer. 2. The app accurately estimates (within ±1% accuracy) the distance traveled along any path shorter than 5 meters. 3. The app has the ability to calculate the enclosed area of a 2 dimensional shape whose perimeter is less than 5 meters. 4. The app has the ability to measure distance traveled along a path. 5. The app shall have the ability to measure the cartesian distance between a starting and ending point. 6. The app can store measurements between sessions. 7. The app displays measurements in both English and S.I. units. 8. The app works with the Android 2.2 (froyo) OS and newer releases. Technical Requirements Specification ✔ ✔ X (Closer to ±10%) X X ✔ ✔ ✔ Real Question: Can it measure a couch? Answer: More or less!

It can be done! Using accelerometer and gyroscope, can create an IMU to track the motion of an object Actual application Difference is quality of sensors and gyroscope Direction Cosine Matrix IMU: Theory William Premerlani and Paul Bizard http://goo.gl/mm1hA

Download ppt "Slide Ruler. ? X 5" On today’s menu...  What happened with Gravity  Noise  The tool today  Fundamental Limitations  Magical Christmas Land  (Where."

Similar presentations