450 likes | 648 Views
Actis: WBAN Demo . Emil Jovanov emil.jovanov@uah.edu Electrical and Computer Engineering Department University of Alabama in Huntsville. Outline. Introduction WBAN System Architecture TinyOS environment Actis application WBAN Wireless Communications Time Synchronization
E N D
Actis: WBAN Demo Emil Jovanov emil.jovanov@uah.edu 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
User1 User2 UserN UserN User1 User2 … System Architecture WWANWLAN … WBAN WWAN(GPRS) ZigBee orBluetooth Tier 3:MS E A Medical Server nc A A Tier 2:PS Tier 1:WBAN Internet Healthcareprovider WLAN(Wi-Fi) Informal caregiver 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. Emergency
Outline • Introduction • WBAN System Architecture • TinyOS environment • Actis application • WBAN Wireless Communications • Time Synchronization • Data format and processing • … play time
Application Component D Component A Component C Component B Component F Component E configuration configuration 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
Tasks Component Frame Commands Events Components • A component has: • Frame (internal state) • Tasks (computation) • Interface (events, commands) • Frame: • one per component • statically allocated • fixed size • 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
Tasks Preempt POST FIFO events commands commands Interrupts Time Hardware Scheduler • two level scheduling: events and tasks • scheduler is simple FIFO • a task can not preempt another task • events preempt tasks (higher priority)
Outline • Introduction • WBAN System Architecture • TinyOS environment • Actis application • WBAN Wireless Communications • Time Synchronization • Data format and processing • … play time
S S S Data Flow and Analysis Database MS EMR Internet Healthcare Access Internet Gateway Session Files WLAN/ WAN WBAN Messaging PS NC Events WBAN Sensors Raw data
Outline • Introduction • WBAN System Architecture • TinyOS environment • Actis application • WBAN Wireless Communications • Time Synchronization • Data format and processing • … play time
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 Typical WSN Application processing data acquisition communication Power wakeup sleep Time From Polastre et al: “The Mote Revolution: Low Power Wireless Sensor Network Devices” Hot Chips 2004 : Aug 22-24, 2004
Microcontroller Radio (FSK) Wakeup • Overhead of switching from Sleep to Active Mode 292 ns 10ns – 4ms typical 2.5 ms 1– 10 ms typical From Polastre et al: “The Mote Revolution: Low Power Wireless Sensor Network Devices” Hot Chips 2004 : Aug 22-24, 2004
Power Efficient TDMA • 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 • 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 time • Wakeup – quickly start processing • Active – 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
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.5mJ Duration : 32ms Atmel flash writing 1 byte Energy : 3mJ Duration : 78ms Active 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
Skew Offset2 Sending TimeReceiving Time Offset2 Time Synchronization - Issues
Time Synchronization #2 SFD Capture Timer Data transmitted over RF Propagation Data received over RF SFD Capture Timer Synchronize local time(TinyOS) NetworkCoordinator
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 Inserting the Timestamp
Outline • Introduction • WBAN System Architecture • TinyOS environment • Actis application • WBAN Wireless Communications • Time Synchronization • Data format and processing • … play time
Demonstration • System configuration • Position sensor (3 ACC axes – raw data) • Values Acc = 8000 + acc_comp*2000 • Heart rate sensor • RR intervals in ticks (32 KHz – jiffy periods) • Heart rate – 60 * 32768 / RRint
EMR Update Session 2 Update Session 1 … Contiguous Data Blocks System organization - Sessions
Accelerometer sensor Z X Y 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