Top Banner
Amulet: An Energy-Eicient, Multi-Application Wearable Platform amulet-project.org Josiah Hester*, Travis Peters , Tianlong Yun , Ronald Peterson , Joseph Skinner , Bhargav Golla*, Kevin Storer*, Steven Hearndon*, Sarah Lord , Ryan Halter , David Kotz , Jacob Sorber* *Clemson University and Dartmouth College SenSys’16—Nov 15, 2016
35

Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Mar 27, 2018

Download

Documents

nguyentu
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Amulet: An Energy-Efficient, Multi-Application Wearable Platform

amulet-project.org

Josiah Hester*, Travis Peters†, Tianlong Yun†, Ronald Peterson†, Joseph Skinner†, Bhargav Golla*, Kevin Storer*, Steven Hearndon*, Sarah Lord†, Ryan Halter†, David Kotz†, Jacob Sorber*

*Clemson University and †Dartmouth College

SenSys’16—Nov 15, 2016

Page 2: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Wearables

2

WristbandsLong lived wearables usually for fitness sensing, with longer lifetimes, but closed source and hardware.

SmartwatchesVery flexible development platforms, with short lifetime, often closed operating systems and hardware.

Page 3: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Tradeoffs

3

WristbandsPros:

• Long lifetime Cons:

• Closed platform • Not flexible

SmartwatchesPros:

• Flexibility Cons:

• Closed hardware or software • Short lifetimes

Page 4: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Shortcomings

4

Flexibility

• Not open

Lifetime

• Does not enable mHealth

Page 5: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

mHealth mobile systems in healthcare

Courtesy: http://sarahcait.blogspot.com/ Courtesy: experientia.com

Courtesy: sana.mit.eduCourtesy: seniorcarecenter.com

Courtesy: good.is

Page 6: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Amulet Platform

6

Page 7: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

This Talk

7

1. Design

2. Implementation

3. Evaluation

Page 8: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Design

8

Multiple applications

• Need app isolation

Long battery lifetime

• Designed for low power operation

Developer tools

• Focused on energy

UsableOpen Source and Hardware

Page 9: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Multi Application

9

Flexibility

• Multiple developers, multiple apps

• Users have different needs

Security

• Sandboxing for isolation among apps

• Access control for sensors, peripherals

Page 10: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Lifetime

10

Need weeks and months

• Not hours and days!

• Support long term studies, deployments

Page 11: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Developer Tools

11

1. Where is my energy going?

2. How does the environment, and the user behavior change energy?

3. What can I change in my code to increase the lifetime?

Page 12: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Open

12

Open Source

• Use, adapt, change

Open Hardware

• Remix, redo, enhance

Page 13: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Amulet

1. Open Hardware Wearable

2. Amulet-OS and API

3. Amulet Firmware Toolchain

4. Amulet Resource Profiler and UI

13

Page 14: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Device

14

Sensors  • 3-axis gyroscope, ST Electronics L3GD20H  • 3-axis nano-power accelerometer, Analog ADXL362  • Ambient light, UVA/B, temp, sound, battery Computing  • Nordic nRF51822, ARM Cortex M0, 32K RAM, 256K FLASH  • TI MSP430FR5989, 2KB SRAM, 128KB FRAM  • microSD card slot Network  • BLE radio (Central & Peripheral)  • Supported protocols: heartrate, battery, running services Output  • Monochrome 128x128 Sharp Memory LCD  • or two single color LEDs  • haptic feedback via vibrator motor Input  • two buttons  • capacitive touch slider  • accelerometer Battery  • Polymer Li-Ion,110 mAh, 3.7V,MCP73831 recharge

Page 15: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Amulet-OS

15

Apps: finite-state machines w/memory • set of states, variables, and event handlers • all state is explicit, in non-volatile storage • no threads: handlers run to completion • API calls post event to relevant system service

Page 16: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Amulet-OS

16

... void AmuletSubscribeInternalSensor( uint8_t sensor_id); uint16_t AmuletGetHR(); uint8_t AmuletGetBatteryLevel(); uint16_t AmuletGetLightLevel(); uint16_t AmuletGetTemperature(); uint16_t AmuletGetAudio(); int16_t AmuletGetAccelX(uint8_t idx); void AmuletBoldText(uint8_t x, uint8_t y, __char_array message); void AmuletClearRect(int16_t x, int16_t y, uint8_t w, uint8_t h); void AmuletHapticSingleBuzz(); uint8_t AmuletLogAppend(uint8_t log_name, __char_array line_contents); ...

Board Support

Amulet API

CoreServices

Hardware

App1 App2 … AppN

Logging Timer Crypto PowerNetwork Sensors

Serial SD Card Analog BluetoothGPIO ClocksWatchdog Interrupts

Core Interface

Board Interface

UI

Subscribe to sensors, log data, communicate, interact.

Page 17: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Amulet Firmware Toolchain

17

Firmware analysis, translation, compile

• Manage multiple applications

• Analyze for isolation

• Profile for energy and memory usage

App Isolation and Resource Profiling

Page 18: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

AFT Workflow

18

Analyzer & Translator

Compiler

App 1 App N…

Linker

Installer

Analyzer & Translator

ResourceProfiler

ResourceProfiler

AppMerger

custom code

existing tool

QM File withAmulet C

Step 1: Verify compliance withAmulet C. Insert runtime checks(array bounds,access control)C code

C code

Step 2: Analyzeresource usage

Step 3: Visualize usage; Merge apps

Step 4: Compile andlink with the runtimesystem and libraries

Step 5: Install imageon device

C code

binary code

firmware image

AmuletOS

Libraries

ARP-View

Energy model

device profile

Some restrictions on C: 1. no dynamic memory 2. no pointers 3. no recursion

Check app access control and language violations.

Page 19: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

AFT Workflow

19

Analyzer & Translator

Compiler

App 1 App N…

Linker

Installer

Analyzer & Translator

ResourceProfiler

ResourceProfiler

AppMerger

custom code

existing tool

QM File withAmulet C

Step 1: Verify compliance withAmulet C. Insert runtime checks(array bounds,access control)C code

C code

Step 2: Analyzeresource usage

Step 3: Visualize usage; Merge apps

Step 4: Compile andlink with the runtimesystem and libraries

Step 5: Install imageon device

C code

binary code

firmware image

AmuletOS

Libraries

ARP-View

Energy model

device profile

Profile energy and memory resource usage.

Page 20: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

AFT Workflow

20

Analyzer & Translator

Compiler

App 1 App N…

Linker

Installer

Analyzer & Translator

ResourceProfiler

ResourceProfiler

AppMerger

custom code

existing tool

QM File withAmulet C

Step 1: Verify compliance withAmulet C. Insert runtime checks(array bounds,access control)C code

C code

Step 2: Analyzeresource usage

Step 3: Visualize usage; Merge apps

Step 4: Compile andlink with the runtimesystem and libraries

Step 5: Install imageon device

C code

binary code

firmware image

AmuletOS

Libraries

ARP-View

Energy model

device profile

Page 21: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Amulet Resource Profiler (ARP)

21

Analyzer & Translator

Compiler

App 1 App N…

Linker

Installer

Analyzer & Translator

ResourceProfiler

ResourceProfiler

AppMerger

custom code

existing tool

QM File withAmulet C

Step 1: Verify compliance withAmulet C. Insert runtime checks(array bounds,access control)C code

C code

Step 2: Analyzeresource usage

Step 3: Visualize usage; Merge apps

Step 4: Compile andlink with the runtimesystem and libraries

Step 5: Install imageon device

C code

binary code

firmware image

AmuletOS

Libraries

ARP-View

Energy model

device profile

Page 22: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Amulet Resource Profiler

22

Designing for low power is not enough

• Developers can always write bad apps

• This can be because of ignorance

• Or because tools don't exist!

Must support developers!

Page 23: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Amulet Resource Profiler

23

89% of users consider battery lifetime the most important feature[1].

Energy is a first class concern for users.

Why not for developers?

[1] “Your smartphone’s best app? battery life, say 89% of Britons.” The Guardian, May 2014

Page 24: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Resource Model

24

Concerned with energy

• Secondary concern: memory

Model the device itself

• One time, at device manufacture

Model the application(s)

• Compile time

Page 25: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Device Energy Model

25

Device Profile

Hardware Info • Steady state draw • Sleep currents • Sensor power costs • Device memory • API Calls

Generated once per device type.

Page 26: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

App Energy Model

26

Analyze App(s)

Construct Model

Device Profile// Update temperature if changed: uint8_t new_temp = AmuletGetTemperature();

if (new_temp != temp) { temp = new_temp; char temp_disp[5]; AmuletITOA(temp, temp_disp); char F[2] = "F"; AmuletConcat(temp_disp, F); AmuletClearRect(0,75, LCD_HORIZONTAL_MAX, MEDIUM_FONT_SIZE); AmuletMediumCenteredText(75, temp_disp); refresh_display = 1; }

Page 27: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

ARP-View

27

Interface for energy insights

• Generated at compile time

Can model user behavior

• Model environment triggers as well

Explore design tradeoffs

Page 28: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

ARP-View

28

Energy focused development.

Page 29: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Evaluation

29

Battery lifetimes ranging from 2 weeks, to 8 months.

233days

209days

140days 214

days192days

54days

17days

14days

67days

39days

0.0

0.5

1.0

1.5

Cloc

kFa

ll Dete

ctPe

domete

rSu

n Exp

osur

eTe

mpera

ture

Hear

trate

Batte

ry Lo

gHR

Log

EMA

Cloc

k+HR

+Fall

Pow

er (m

W)

1. Battery Lifetime

Page 30: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Evaluation

30

Predictions

Prediction accuracy of 90-98% for our apps.

233days

209days

140days 214

days192days

54days

17days

14days

67days

39days

0.0

0.5

1.0

1.5

Cloc

kFa

ll Dete

ctPe

domete

rSu

n Exp

osur

eTe

mpera

ture

Hear

trate

Batte

ry Lo

gHR

Log

EMA

Cloc

k+HR

+Fall

Pow

er (m

W)

Actual

ARP Prediction Accuracy

Page 31: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

User Study

31

ARP-View: usability and energy • what is the developer energy mental model? • does ARP-view force devs to think about energy? • 10 programmers, 30 minute task and survey • 9/10 subject reported positive outcomes

ARP-view assists developers.

Page 32: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Pilot Study

32

mHealth: smoking cessation surveys • monitored heart rate using BLE • presented surveys at intervals during the day • recorded survey responses and heart rate • 6 participants, 1 week, 48 hours of deployment • usability survey that informed hardware rev(s)

Demonstrates mHealth feasibility.

Page 33: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Evaluation

33

Great battery lifetimes

• 2 weeks to 8 months

Accurate prediction results

• 90-98% accuracy

Usable by users, researchers, and developers.

Page 34: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Future

34

Secure firmware toolchain

• OTA firmware updates and security

Body are health network (BAHN)

• Extending the reach of Amulet

Energy Harvesting Wearables

• Solar, or vibration powered, no charging!

Priority: Enabling your applications!

Page 35: Amulet: An Energy-Efficient, Multi-Application Wearable Platformjosiahhester.com/cv/files/sensys16amulet_presentation.pdf · Amulet: An Energy-Efficient, Multi-Application Wearable

Summary

35

1. Open source, open hardware, multi app wearable device2. Firmware toolchain isolating applications and resource profiling.

3. Energy focused application development with ARP-View

Amulet is…

amulet-project.org

https://github.com/AmuletGroup/amulet-project