Design of a Multi-Node Dataviewer for Analyzing Recordings of the Shepherd-Testbed

Keywords & Title

  • dataviewer, analyzer, analytics

  • interactive

  • multi-node, cross-node, scalable

  • advanced filtering for finding events & states, multi-dimensional relation between individual data streams

  • GPIO, IV, Shepherd Testbed

  • performant, responsive

Title-Proposals

  • Interactive Cross-Node Analysis of Heterogeneous Datasets: Design and Evaluation of a Viewer and Analyzer for the Shepherd Testbed

  • Exploring Multi-Dimensional Relations in Distributed Wireless Networks: A Scalable Viewer and Analysis Tool for GPIO and IV Traces of the Shepherd Testbed

Note: the first title leaves lots of wiggle room and doesn’t promise a finished viewer.

Introduction & Motivation

Analyzing experiments in the domain of embedded wireless networks can be challenging and highly individual. The main goal of the viewer is to provide a basic set of tooling. It should support users to analyze their recorded data. Getting a rough overview of the data is considered a central pillar of the viewer. Having a quick look at the relevant information with a quick zoom on individual events can be very helpful to plan the next steps of an analysis. A seconds pillar are the search-options, as large multi-hour recordings with i.e. 1 MSPS for GPIO can become challenging. A user should be able to find points-of-interest and navigate to them quickly.

The Shepherd-Testbed produces voltage-, current and GPIO-traces that can be post-processed by the shepherd-tools. The tools serve as a documentation for the internal h5-structure for shepherd as well as a tool for creating, reading and modifying the recordings. There is also some basic static plotting implemented based on matplotlib, but a fast and responsive data-viewer would be extremely helpful as recordings can span over several days and may include up to 30 - 100 shepherd-nodes.

The implementation would be preferably based on an existing software.

Current Situation

Each Shepherd Node produces:

  • IV-Samples (voltage & current) with 100 kHz and 18bit resolution each

  • event based gpio-sampling of 16 pins with < 2 MHz sample-rate

  • on demand UART logging with up to 460 kBaud

  • diverse logs of service like PTP, the kernel and system statistics

State of the Art

The data-tool allows to plot parts of the ivsample-recording ⇾ CLI-Interface ⇾ Plot IVSamples. Multiplots for several recordings are supported, as well as prior downsampling.

There is a basic implementation of a viewer based on DPG. It is limited to one recording, only IVSamples and is not optimized at all. So recordings >60s are challenging because there is no downsampling depending on the zoom-levels.

The Saleae Logic tool has an open api and (open?) file format, but does only support GPIO- and voltage-traces. Shepherd features also current-traces or derived power-traces. The software is a defacto standard for ease of use and minimal design. It is fast, responsive and allows filtering and has protocol-decoders included.

Tests with timeseries-databases were done. TimescaleDB and InfluxDB are both too slow to handle the live data of 30 nodes of the testbed. So currently the database-idea was put on hold for a pure file-based approach. But the viewer is not live, so it could be a viable option. Beside that sqlite is file-based and really fast.

Goals

From high to lower priority:

  • have an interactive viewer for iv-sample-data as plotted timeseries

  • viewer for GPIO as a plotted timeseries (each GPIO separately)

  • multi node support - allows to load a whole directory (not recursive) of recordings

    • plots can be stacked, so multiple plots show up in one plot with different colors

    • synchronized timestamp can be used to align different nodes in one plot

    • naming could either be derived from embedded hostname or from filename

  • calculate & show power-trace (as voltage and current on its own are sometimes less helpful)

  • never hide events! To keep performance high the data might need to be resampled or filtered. It’s easy to mess that up, so that nanosecond events disappear on lower zoom levels

  • on-demand filtering & search options (more on that below)

  • on-demand configuration options. Mentions below mostly reduce visual and computational overhead. A live-update after changing config would

    • allow to (de)select individual nodes

    • allow to (de)select Voltage, Current, Power viewer

    • allow to (de)select individual GPIO

    • (optional) allow to ignore absolute timestamp (for aligning plots) and use start of measurement as reference to allow comparing different experiments

  • a standalone viewer-program would be desired (but can be the wrapped web-viewer)

  • (optional) a web-viewer would be helpful for the testbed itself

  • (optional) saving/loading of configuration (including filter-settings)

  • (optional) preferably written in python (like all other high-level shepherd-tools) - but performance is a potential problem

  • allow to overlay several recordings or plot them in individual graphs (no overlay but in series) with the same timebase (both has advantages)

  • (optional) decoding digital protocols like UART (text) and SPI (numerical, hex) or offer a plugin-interface for that

  • (optional) show marks where testbed did not run as expected

    • it either threw an error

    • sync was higher than i.e. 1 us

    • cpu-util was higher than i.e. 90 %

  • (optional) visualize debug information embedded in files (CPU-util, network-traffic, PRU-util)

  • search / highlight points of interest ⇾ tbd

Side-notes:

  • these goals can be interpreted as requirements or wishlist. The actual spec is TBD and open for discussion.

  • data-conversion is OK ⇾ probably a more performant format and a chain of downsamples are needed to handle the performance on large overviews

  • in terms of usability and functionality the tool Saleae Logic is regarded as a role model

Main Challenges

There are two major challenges to evaluate (or solve) in this thesis

  • How to handle multiple large datasets without needing a super-computer (1 hour of recording with 100 kHz and also GPIO-Input for 20+ Nodes can be become really large)

  • How to filter through the datasets

To be clear: The polished viewer may/is not be the product of this thesis! Research takes time and evaluating the options is often the main task and timekiller. Writing the viewer is an engineering- or programming-task. Evaluating the options, finding metrics for comparison, measuring them are important steps before and a major part of the written thesis. It can also stand on its own when the prototype is able to do the basics and show the concept.

Milestones / Steps

TBD, proposal:

  • read into the topic

  • draft a 1-2 page proposal (can be changed later)

  • set up draft of requirements (that serve as a realistic goal for the thesis)

  • capture the state of the art

    • prepare an overview of options & looking at publications

    • can be papers, available frameworks, similar of-the-shelf products

  • experiment with rough prototypes

  • (optional) midterm presentation for collecting feedback from the research-team

  • decision how to proceed / what to choose

  • redefine requirements and possible features

  • focus on working version

  • in between: document design-decisions and other information that helps writing the thesis

Test-Data

  • the tool-examples can produce initial datasets

  • Carsten agreed to provide firmware for the testbed to create actual protocol-data

  • TBD