amulet: an energy-efficient, multi-application wearable ... · amulet: an energy-efficient,...

35
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

Upload: others

Post on 05-Feb-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

  • 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

    http://amulet-project.org

  • 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.

  • Tradeoffs

    3

    WristbandsPros:

    • Long lifetime Cons:

    • Closed platform • Not flexible

    SmartwatchesPros:

    • Flexibility Cons:

    • Closed hardware or software • Short lifetimes

  • Shortcomings

    4

    Flexibility

    • Not open Lifetime

    • Does not enable mHealth

  • mHealth mobile systems in healthcare

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

    Courtesy: sana.mit.eduCourtesy: seniorcarecenter.com

    Courtesy: good.is

  • Amulet Platform

    6

  • This Talk

    7

    1. Design

    2. Implementation

    3. Evaluation

  • Design

    8

    Multiple applications

    • Need app isolation Long battery lifetime

    • Designed for low power operation Developer tools

    • Focused on energy Usable

    Open Source and Hardware

  • Multi Application

    9

    Flexibility

    • Multiple developers, multiple apps • Users have different needs

    Security

    • Sandboxing for isolation among apps • Access control for sensors, peripherals

  • Lifetime

    10

    Need weeks and months

    • Not hours and days! • Support long term studies, deployments

  • 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?

  • Open

    12

    Open Source

    • Use, adapt, change Open Hardware

    • Remix, redo, enhance

  • Amulet

    1. Open Hardware Wearable

    2. Amulet-OS and API

    3. Amulet Firmware Toolchain

    4. Amulet Resource Profiler and UI

    13

  • 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

  • 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

  • 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.

  • 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

  • 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.

  • 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.

  • 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

  • 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

  • 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!

  • 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

  • Resource Model

    24

    Concerned with energy

    • Secondary concern: memory Model the device itself

    • One time, at device manufacture Model the application(s)

    • Compile time

  • 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.

  • 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; }

  • ARP-View

    27

    Interface for energy insights

    • Generated at compile time Can model user behavior

    • Model environment triggers as well Explore design tradeoffs

  • ARP-View

    28

    Energy focused development.

  • Evaluation

    29

    Battery lifetimes ranging from 2 weeks, to 8 months.

    233days

    209days

    140days 214days

    192days

    54days

    17days

    14days

    67days

    39days

    0.0

    0.5

    1.0

    1.5

    Cloc

    kFa

    ll Dete

    ctPe

    dome

    terSu

    n Exp

    osur

    eTe

    mper

    ature

    Hear

    trate

    Batte

    ry Lo

    gHR

    Log

    EMA

    Cloc

    k+HR

    +Fall

    Pow

    er (m

    W)

    1. Battery Lifetime

  • Evaluation

    30

    Predictions

    Prediction accuracy of 90-98% for our apps.

    233days

    209days

    140days 214days

    192days

    54days

    17days

    14days

    67days

    39days

    0.0

    0.5

    1.0

    1.5

    Cloc

    kFa

    ll Dete

    ctPe

    dome

    terSu

    n Exp

    osur

    eTe

    mper

    ature

    Hear

    trate

    Batte

    ry Lo

    gHR

    Log

    EMA

    Cloc

    k+HR

    +Fall

    Pow

    er (m

    W)

    Actual

    ARP Prediction Accuracy

  • 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.

  • 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.

  • Evaluation

    33

    Great battery lifetimes

    • 2 weeks to 8 months Accurate prediction results

    • 90-98% accuracy Usable by users, researchers, and developers.

  • 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!

  • Summary

    35

    1. Open source, open hardware, multi app wearable device
2. 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

    http://amulet-project.orghttps://github.com/AmuletGroup/amulet-project