Lots Collected, Little Analyzed

  • Collection without analysis has negative ROI


Most IoT data are not used currently. For example, only 1 percent of data from an oil rig with 30,000 sensors is examined.

-- McKinsey & Company


  • As difficult as it is to collect and capture data, 
    gaining insights via analysis takes just as much effort


  • Dependable, real-world on-line analytics take time to develop, tune, and test.

Not a Product Pitch...but

MATLAB: High-level language and interactive environment

 

 

SimulinkBlock diagram environment for simulation and design. Simulate, generate code, and verify embedded systems

 

 

ThingSpeak: Free web service for storing sensor data and developing IoT applications

  • Online analysis using the MATLAB Language
  • Sensor data can be sent to ThingSpeak from any internet capable device, including Arduino and Raspberry Pi.

A Project Focused Tour

Tide Prediction - Online Analytics

Nighttime Noise - Historical Analytics

Weather - IoT Analytic Workflow

Counting Cars - Edge Node Analytics

A Project Focused Tour

Tide Prediction - Online Analytics

Nighttime Noise - Historical Analytics

Weather - IoT Analytic Workflow

Counting Cars - Edge Node Analytics

Weather - IoT Analytic Workflow

Weather - IoT Analytic Workflow

MathWorks Weather Station -- Revisited

Classic IoT Maker Project with Machine Learning

Deep Dive: Google "mathworks weather revisit"

http://goo.gl/TVqiOD

Weather - IoT Analytic Workflow

Weather - IoT Analytic Workflow

Weather - IoT Analytic Workflow

Weather - IoT Analytic Workflow

Weather - IoT Analytic Workflow

Weather - IoT Analytic Workflow

Weather - IoT Analytic Workflow

1

2

3

Weather - IoT Analytic Workflow

Weather - IoT Analytic Workflow

Weather - IoT Analytic Workflow

Weather - IoT Analytic Workflow

A Project Focused Tour

Tide Prediction - Online Analytics

Nighttime Noise - Historical Analytics

Weather - IoT Analytic Workflow

Counting Cars - Edge Node Analytics

Car Counter - Edge Node Analytics

Goal: Build a traffic monitor using a Raspberry Pi & Webcam

 

  • Workflow
    1. Foreground Detection
    2. Median Filter
    3. Blob Centroid Detection
    4. Car Direction & Counter
    5. Send to ThingSpeak
  • Automatic Code Generation and Deployment
    to Raspberry Pi

Car Counter - Edge Node Analytics

Counting Cars

Traffic monitor using a Raspberry Pi & Webcam

Deep Dive: Google "count cars thingspeak"

http://goo.gl/KGdofK

Car Counter - Edge Node Analytics

Counting Cars

Traffic monitor using a Raspberry Pi & Webcam

Deep Dive: Google "count cars thingspeak"

http://goo.gl/KGdofK

Car Counter - Edge Node Analytics

Embedded devices have always used:

  • Signal processing
  • Matrix math
  • Closed loop control

 

Powerful mobile processors enable:

  • Sensor fusion & analytics
  • Computer vision & image processing
  • Trained machine learning
  • Statistical modeling
  • Small vocabulary voice recognition

Car Counter - Edge Node Analytics

Car Counter - Edge Node Analytics

Foreground Detection, 2-D Median Filter, Blob Analysis

Feeds custom counting block and Transmit to ThingSpeak

Car Counter - Edge Node Analytics

Foreground Detection, 2-D Median Filter, Blob Analysis

Feeds custom counting block and Transmit to ThingSpeak

Car Counter - Edge Node Analytics

Foreground Detection, 2-D Median Filter, Blob Analysis

Feeds custom counting block and Transmit to ThingSpeak

Car Counter - Edge Node Analytics

Foreground Detection, 2-D Median Filter, Blob Analysis

Feeds custom counting block and Transmit to ThingSpeak

Car Counter - Edge Node Analytics

Foreground Detection, 2-D Median Filter, Blob Analysis

Feeds custom counting block and Transmit to ThingSpeak

Car Counter - Edge Node Analytics

Foreground Detection, 2-D Median Filter, Blob Analysis

Feeds custom counting block and Transmit to ThingSpeak

Want a deeper dive? Freescale Smart Stovetop

Using machine learning in embedded applications

https://goo.gl/o8aZRt​

Car Counter - Edge Node Analytics

Source: Freescale

Embedded devices now have enough compute power to use algorithms that previously were once only practical on desktop class machines or FPGAs

Car Counter - Edge Node Analytics

A Project Focused Tour

Tide Prediction - Online Analytics

Nighttime Noise - Historical Analytics

Weather - IoT Analytic Workflow

Counting Cars - Edge Node Analytics

Night Noise - Exploratory Analysis

Night Noise - Exploratory Analysis

Night Noise Analysis

Identify unusual changes in ambient noise level at night

Night Noise - Exploratory Analysis

Median Filter

Night Noise - Exploratory Analysis

Overlaid with Expected Levels
Determined expected based on median at a given time

Night Noise - Exploratory Analysis

Normalized based on first 3 hours
Polynomial fit of expected noise levels

Night Noise - Exploratory Analysis

Set Expected Levels for a given night
Move polynomial up or down to compensate for variation

Night Noise - Exploratory Analysis

Identify alarm conditions

> 1 std deviation above expected

Night Noise - Exploratory Analysis

Identify alarm conditions

> 1 std deviation above expected

Night Noise - Exploratory Analysis

To do: Investigate what happened on September 10th...

 

Side Trip into Median Filters

Raw data from a single night

Windowed median filter with 15 minute window

Side Trip into Median Filters

Contrast with mean filter with same window

Side Trip into Median Filters

Things to keep in mind:

  • Median filter is your friend
  • You haven't seen all the scenarios
  • Always consider how you will convert to on-line analytics
  • Pilot on-line analytics and alarms
  • One false alarm will destroy trust 

Night Noise - Exploratory Analysis

A Project Focused Tour

Tide Prediction - Online Analytics

Nighttime Noise - Historical Analytics

Weather - IoT Analytic Workflow

Counting Cars - Edge Node Analytics

Tide Prediction - Online Analytics

Tide Prediction - Online Analytics

On Line Tide Alerts

Tide Measurement and Prediction

Deep Dive: Google "tide matlab thingspeak"

http://goo.gl/uXHkYU​

Tide Prediction - Online Analytics

Source: SUNY StoneyBrook

23 astronomical components in tidal harmonics...
plus geography and weather -- it's always an approximation!

Tide Prediction - Online Analytics

Tidal variation between bays 6 miles apart

Edge Node

  • Arduino
  • Ultrasonic Rangefinder and Temperature Sensor
  • Data Reduction
  • De-noising and "De-batting"
  • Sends Data to ThingSpeak

Tide Prediction - Online Analytics

On-Line Analysis

  1. Median Filter
  2. Temperature Compensation
  3. Convert to Water Depth
  4. Tweet @tidealerts
  5. Hysteresis and state machine to avoid being too "tweekative"

Tide Prediction - Online Analytics

On-Line Analysis

  1. Median Filter
  2. Temperature Compensation
  3. Convert to Water Depth
  4. Tweet @tidealerts
  5. Hysteresis and state machine to avoid being too "tweekative"

Tide Prediction - Online Analytics

Thank You!

  • Collection without analysis has negative ROI

  • Analysis happens at every stage

  • Dependable, real-world on-line analytics take time to develop, tune, and test

  • Trust can be lost in a single moment

  • Median filtering is your friend

Rob Purser -- rob.purser@mathworks.com, @rpurser47

http://slides.com/rpurser/environmental_analysis

Greater Boston CMG: Analysis and Visualization Techniques for Environmental IoT Systems

By Rob Purser

Greater Boston CMG: Analysis and Visualization Techniques for Environmental IoT Systems

Data from our environment surrounds us: sensors and inexpensive edge nodes make it easier than ever to collect lots of data on our surroundings, both indoors & outdoors. From weather data and noise levels to counting cars on the highway outside our window, we can correlate this data with external sources of data to gain deeper insights into our surroundings. Working with live environmental time series data brings unique challenges that span traditional instrumentation, embedded programming, signal processing, and statistics. We’ll discuss some of the environmental Internet of Things data collection and analysis that we’ve done, and three kinds of analytics that we’ve applied: sensor analytics at the edge node, historical data analytics, and online analytics at the data aggregator as the data comes in. You’ll see practical techniques for working with this data, tools, and visualizations.

  • 724