Actis: WBAN Demo
Emil [email protected]
Electrical and Computer Engineering Department University of Alabama in Huntsville
Outline
Introduction WBAN System Architecture TinyOS environment Actis application WBAN Wireless Communications Time Synchronization Data format and processing … play time
WBAN for Health Monitoring
Wireless Body Area Network for Ambulatory Health Monitoring Mobility / Ubiquitous System Real-time on-sensor processing Warnings Increased Quality of Life Multisensor Monitoring (Synergy)
Hierarchical Multi-tier Telemedicine System
WBAN Implementation
WBAN for ambulatory health monitoring Activity Monitor / Motion Sensor ECG Sensor Network Coordinator Personal Server
Challenges Sensor Fusion On-Sensor Processing Ubiquitous Communications Power Efficiency/Battery Life
Outline
Introduction WBAN System Architecture TinyOS environment Actis application WBAN Wireless Communications Time Synchronization Data format and processing … play time
User2
nc
Internet
Tier 1:WBAN
A A
A E
Tier 2:PS
Tier 3:MS
WBANWWAN(GPRS)
Emergency
Informal caregiver
Healthcareprovider
UserN
Medical Server
WWANWLAN
WLAN(Wi-Fi)
…
User2User1 UserN…
System Architecture
ZigBee orBluetooth
User1
A. Milenkovic, C. Otto, E. Jovanov, "Wireless Sensor Networks for Personal Health Monitoring: Issues and an Implementation," Computer Communications, Vol. 29, No. 13‑14, August 2006, pp. 2521-2533.
Outline
Introduction WBAN System Architecture TinyOS environment Actis application WBAN Wireless Communications Time Synchronization Data format and processing … play time
TinyOS An open-source OS designed for
embedded WSN (limited resources) Component-based architecture application =
scheduler + graph of components event-driven architecture NO kernel, process/memory
management, virtual memory
Component A
Component B
ComponentD
Component C
Application
configuration
configuration
Component E
ComponentF
Components
A component has: Frame (internal state) Tasks (computation) Interface (events, commands)
Frame: one per component statically allocated fixed size
Tasks
ComponentFrame
EventsCommands
Commands and Events are function calls Application: linking/gluing interfaces (events, commands)
Commands/Events
commands: deposit request parameters into the frame are non-blocking need to return status
=> postpone time consuming work by posting a task can call lower level commands
events: can call commands, signal events, post tasks, can not be signaled by
commands preempt tasks, not vice-versa interrupt trigger the lowest level events deposit the information into the frame
Scheduler
two level scheduling: events and tasks scheduler is simple FIFO a task can not preempt another task events preempt tasks (higher priority)
Hardware
Interrupts
even
ts
commands
FIFOTasks
POSTPreempt
Time
commands
Outline
Introduction WBAN System Architecture TinyOS environment Actis application WBAN Wireless Communications Time Synchronization Data format and processing … play time
Network Coordinator
Sensor Nodes
Typical Message Flow
NC
ACTIS_CFG_STARTMSG
ACK
ACTIS_EVENT_MASKMSGevent = HRV, R Peak
ACTIS_CALMSG
ACK
Calibration Time
ACK
Session Started
eActiS (ECG)Sensor
Personal Server
ACTIS_EVENT_MSGevent = R Peak
Heartbeat (R peak)Detected
TIME
NC
ACTIS_CFG_STARTMSG
ACK
ACTIS_EVENT_MASKMSGevent = HRV, R Peak
ACTIS_CALMSG
ACK
Calibration Time
ACK
Session Started
eActiS (ECG)Sensor
Personal Server
ACTIS_EVENT_MSGevent = R Peak
Heartbeat (R peak)Detected
TIME
NC
eActiS (ECG)Sensor
Personal Server
ACTIS_EVENT_MSGevent = R Peak Heartbeat (R peak)
DetectedACTIS_EVENT_MSGevent = R Peak Heartbeat (R peak)
Detected
ACTIS_EVENT_MSGevent = Arrhythmia Arrhythmic event
Detected
.
.
.
.
.
.
.
Stream Raw DataEvent Log
augmented with contextual raw data
ACTIS_CFG_STOPMSG
Session stopped
ACK
TIME
NC
eActiS (ECG)Sensor
Personal Server
ACTIS_EVENT_MSGevent = R Peak Heartbeat (R peak)
DetectedACTIS_EVENT_MSGevent = R Peak Heartbeat (R peak)
Detected
ACTIS_EVENT_MSGevent = Arrhythmia Arrhythmic event
Detected
.
.
.
.
.
.
.
Stream Raw DataEvent Log
augmented with contextual raw data
ACTIS_CFG_STOPMSG
Session stopped
ACK
TIME
Typical Message Flow (2)
Feature Extraction
46 46.5 47 47.5 48 48.5 49 49.5 50 50.5 51
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
Accelerometer based step recognition
Time[s]
Vy[m/s]Alpha[rad]accY[g]StepFoot switch
Step detected
Raw data
Events
MS
Internet Gateway
PS
Sensors
NC
WBAN
WLAN/WAN
S S S
Internet
WBAN Messaging
Session Files
Database
Data Flow and Analysis
Healthcare Access
EMR
Outline
Introduction WBAN System Architecture TinyOS environment Actis application WBAN Wireless Communications Time Synchronization Data format and processing … play time
Typical WSN Application
Periodic Data Collection Network Maintenance Majority of operation
Triggered Events Detection/Notification Infrequently occurs
But… must be reported quickly and reliably
Long Lifetime Months to Years without
changing batteries Power management is the
key to WSN success
sleep
wak
eup
processingdata acquisitioncommunication
Pow
er
Time
From Polastre et al: “The Mote Revolution: Low Power Wireless Sensor Network Devices”Hot Chips 2004 : Aug 22-24, 2004
Overhead of switching from Sleep to Active Mode
Wakeup
Microcontroller Radio (FSK)
10ns – 4ms typical1– 10 ms typical
2.5 ms
292 ns
From Polastre et al: “The Mote Revolution: Low Power Wireless Sensor Network Devices”Hot Chips 2004 : Aug 22-24, 2004
Power Efficient TDMA
Super Cycle
Beacon ……Slot#3Slot#2Slot#1Beacon Beacon ……Slot#3Slot#2Slot#1Beacon
Listen Tr. Listen
Time50 ms 100 ms 150 ms 1000 ms
85% Sensor Power from Radio Significant Power Savings From Disabling Radio Timeslots for Communication
Distributed Events Concentrated Bursts Allows Radio to be disabled
Extended Battery Life / Lower Weight
TDMA Means Low Power
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50
5
10
15
20
25
Time [sec]
I [m
A]
0.65 0.7 0.75 0.8 0.85 0.90
5
10
15
20
Time [sec]
I [m
A]
Listen Transmit
Idle
superframe
Deterministic RF timeslots
Radio can be disabled Extend battery life
ZigBee
An industry consortium that promotes the IEEE 802.15.4 standard (www.zigbee.org)
Low-cost, low-power features for multi-year operation on standard batteries
Low data throughput (250 kbps) Star and peer-to-peer network topologies
Design Principles
Key to Low Duty Cycle Operation:Sleep – majority of the timeWakeup – quickly start processingActive – minimize work & return to sleep
Sleep
Majority of time, node is asleep Typically >99%
Minimize sleep current through Isolating and shutting down individual circuits Using low power hardware
Need RAM retention Run auxiliary hardware components from low speed
oscillators (typically 32kHz) Shut down all unused clocks Perform ADC conversions, DMA transfers, and bus operations
while microcontroller core is stopped
Active
Microcontroller Fast processing, low active
power Avoid external oscillators
Radio High data rate, low power
tradeoffs Narrowband radios
Low power, lower data rate, simple channel encoding, faster startup
Wideband radios More robust to noise, higher
power, high data rates
External Flash (stable storage) Data logging, network code
reprogramming, aggregation High power consumption Long writes
Radio vs. Flash 250kbps radio sending 1 byte
Energy : 1.5J Duration : 32s
Atmel flash writing 1 byte Energy : 3J Duration : 78s
From Polastre et al: “The Mote Revolution: Low Power Wireless Sensor Network Devices”Hot Chips 2004 : Aug 22-24, 2004
Outline
Introduction WBAN System Architecture TinyOS environment Actis application WBAN Wireless Communications Time Synchronization Data format and processing … play time
Time Synchronization
Crucial service in WSNs Group operations Source localization Data aggregation Distributed sampling Communication channels sharing
Metrics for synchronization protocols Precision Longevity of synchronization Time and power budget available for synchronization Geographical span Size and network topology
?
??
?
?
Time Synchronization - Motivation
Wall Clock versus WBAN (Jiffy) Time Two Issues
Offset Drift
TDMA Efficient Sharing of Communication Channels Timeslot Assignments Beacon Prediction (Maximize Radio off)
Correlating Intra-WBAN events Relative timing is important Synchronizing start time
Clock Offset, Skew
1 2 3 4
Beacons
Jiff
y Ti
me
Local TimeGlobal Time
Offset2
SkewOffset2
Sending Time
Receiving Time
Time Synchronization - Issues
Time Synchronization #2
Propagation
Data transmitted over RF
Preamble SFD Length MAC Protocol Data
SFD Capture Timer
Timestamp
Preamble SFD Length MAC Protocol Data TimestampData received
over RF
SFD Capture Timer
Synchronize local time(TinyOS)
NetworkCoordinator
Inserting the Timestamp
Network coordinator Starts the transmission
(time sync header) Captures timer and converts
to a global timestamp Inserts it into the message
(sends over SPI) Is this enough time not to
underrun the TxFIFO in CC2420? Time capture and calculate
timestamp: 150 s Send timestamp: 300 s Sync header transmission: 700 s
Outline
Introduction WBAN System Architecture TinyOS environment Actis application WBAN Wireless Communications Time Synchronization Data format and processing … play time
Demonstration
System configurationPosition sensor (3 ACC axes – raw data)
Values Acc = 8000 + acc_comp*2000Heart rate sensor
RR intervals in ticks (32 KHz – jiffy periods) Heart rate – 60 * 32768 / RRint
EMR
…Update
Session 1Update
Session 2
Contiguous Data Blocks
System organization - Sessions
Accelerometer sensor
X
Y
Z
Acc = 8000 + acc_comp*2000
Session file format
Byte Field Description 4 Timestamp 32-bit global jiffy time 2 numValues Number of values used in
data field 2 Not used Reserved for future param. 2 LastSampNum 4 SessionSignalID Unique identifier
formed from concatenation of session number with signal type
20 data Signal dependent for raw data this is 10 16-bit samples AEE, the first 4 bytes are little endian AEE
Total: 34 bytes/record
Test data
Web page: http://www.ece.uah.edu/~jovanov/whrms/data_proc.html
Experimental data Example processing (.M) What information can you extract?
Change of position Classification of the physical activity HR as a function of physical activity
Outline
Introduction WBAN System Architecture TinyOS environment Actis application WBAN Wireless Communications Time Synchronization Data format and processing … play time