22
FlockLab: A Testbed for Distributed, Synchronized Tracing and Pro ling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by: Yu-Ting 1

FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

Embed Size (px)

Citation preview

Page 1: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

1

FlockLab: A Testbed for Distributed, SynchronizedTracing and Profiling of Wireless Embedded Systems

IPSN 2013

NSLab study group 2013/04/08Presented by: Yu-Ting

Page 2: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

2

Outline

• Introduction• Architecture• Benchmark• Application

Page 3: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

3

Introduction

• A testbed with 30 observers (4 at outdoors) and a set of servers

• Support 4 different targets (nodes)• Other than serial port service,

these nodes can synchronously:– Trace GPIO– Actuate GPIO– Power profiling– Adjust supply voltage

• Much better than multiple logic analyzers, mixed-signal oscilloscopes, and power analyzers

Page 4: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

4

Outline

• Introduction• Architecture• Benchmark• Application

Page 5: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

5

Hardware

CPU: 624MHzRAM: 128MBFlash: 32MB

8GB

For outdoor nodes without Ethernet

To profile power

Can also controlUSB fan foroutdoor nodes

5V for embedded Com3.3V for others

Step: 0.1V

9 LEDsBy GPIO or UART

This selection is doneby two 8-bitsignal translator

1000 USD

Shunt resistor Amplify the volt across shuntby a gain of 100

Map slot withtarget boardsby serial ID chiip

Page 6: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

6

More about measuring power

• Resolution in power: 10nA• Limit: 160mA (enough)• ADC sample at 56kHz in high-speed mode and

28kHz in high-resolution (SNR = 109dB) mode with 14.3MHz clock source=> resolution in time: 35.7us or 17.85us

Page 7: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

7

Software

• OS: OpenEmbedded Linux• NTP client: Chrony, synchronize every 1-2min

with NTP server of FlockLab

Efficient data handling(caching)

Page 8: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

8

Backend Infrastructure

• Time Synchronization server (NTP server)=> sync by another server on campus and PPS by GPS receiver

• Web server• Test management server (also stores data)• Database server• Monitoring server

Page 9: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

9

Deployment

• Indoor * 26 (in same LAN segment)• Outdoor * 4• Yellow level: RSSI value when idle

Page 10: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

10

Outline

• Introduction• Architecture• Benchmark• Application

Page 11: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

11

Time Accuracy - GPIO

• Use GPIO to trace PPS of same GPS clock• Use mixed-signal oscilloscope to actuate GPIO• Pairwise timing error

• GPIO tracing VS PPS: normal distribution

Page 12: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

12

Time Accuracy – Power Profiling

• SFD rise -> toggle GPIO & turn on LEDSFD fall -> turn off LED

• SFD events happen at the same time (< 1us)• Most error of same observer comes from random delay of

GPIO event and the following power sample• Error of different observer is comparable to

pairwise timing error of GPIO events

Page 13: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

13

Power Accuracy

• Test by high-precision power analyzer• Target resistance: 259mΩ

AA batteries: 947mΩ• Calibration: Use linear regression to estimate more

accurate constant of offset and gain of current-sense amplifier, and shunt resistor

Relative error: observer VS power analyzer

Page 14: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

14

Limits in Capturing GPIO Events

• No new events can be captured until the respective flag is cleared

• Minimum required interval between consecutive GPIO events to be captured=> depends on the interrupt delay and ISR execution time

• SFD events may still loss for small packet(<9bytes)

Page 15: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

15

Outline

• Introduction• Architecture• Benchmark• Application

Page 16: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

16

Analysis of Tasks Without FlockLab• Generally speaking, they are:

– More intrusive and less accurate– Need to recompile due to code changes– Need to change existing codes for different platform

• Power profiling– Energest in Contiki, but also intrusive– Customize yourselves in TinyOS…

• End-to-end delay– Timestamps in serial logging, but it’s inaccurate– Run time synchronization protocol

=> Multiple protocols may cause performance losses or even failures• Actuate events (controlling) for multiple nodes

– Also need time synchronization• Using network simulators like Cooja

Page 17: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

17

Comparative Multi-Platform Analysis

• Run CTP on top of LPL: how each platform affects the trade-offs between metrics

• Observation– 200ms is best for such topology & traffic load– Tmote Sky is most sensitive, while IRIS is best– The trades are the same

Page 18: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

18

Finding and Fixing Bugs

• Bug: the initial results with LPL wake-up intervals of 500 ms and 1s from Tinynode and Opal nodes were significantly worse

• Reason: children were transmitting at most one packet during an LPL wake-up interval, although they had multiple packets ready to be sent

Page 19: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

19

Controlling and Profiling Applications

• Purpose– One node to generate a packet every 2s for 260s, from t =

30s to t = 290s– In the mean time, measure the energy consumption

• Task 1 is easily done by GPIO actuation• Comparison of task 2 between different methods– FlockLab is non-intrusive and highly accurate

Page 20: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

20

Measuring Clock Drift

• Enable FTSP every 3s and get the clock drifts of each node compared with the root

• Toggle a GPIO pin every 0.5s• Compare the difference between GPIO

timestamp interval and 0.5s with clock drifts– Average over 5min to limit GPIO timing errors

Page 21: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

21

Multi-Modal Monitoringat Network Scale

Page 22: FlockLab: A Testbed for Distributed, Synchronized Tracing and Profiling of Wireless Embedded Systems IPSN 2013 NSLab study group 2013/04/08 Presented by:

22

Q&A