Mechatronic Solutions LLC

Home Projects Blog About

 

A Disruptive Approach to IoT

The majority of the IoT industry measures sensor data and transmits it to a cloud service in way that limits the scope of what can be measured and monitored to only 5% of what is possible.   Implementing microcontrollers as IoT Edge Devices permits measurement and monitoring of the full scope of mechanical systems, and it allows the use of the new LTE CAT-M1 and similar cellular technologies created for IoT devices.  

 

The Prevalent Implementation

Nearly all IoT deployments are based on the model of measuring something with a sensor, and then transmitting the raw sensor value to a cloud service for storage, visualization, and analysis.   The rate at which the raw sensor values are transmitted is typically limited to once per second (1 Hz) or much longer, with the better implementations allowing up to 50 per second, or 50 Hz.  

Reading the sensor just prior to transmission of the data has the effect of making the sample rate equal to the transmission rate.   The maximum event frequency that can be properly captured is 1/10 of the sample rate (due to anti-aliasing and other issues).   So for a data transmission rate (or sample rate) of 50 Hz, the maximum event frequency that can be captured is 5 Hz.  

Nearly all mechanical systems have events with a frequency content that is 100 Hz or less (ignoring the outliers of vibration, and shock/impact).   A 100 Hz event frequency requires a 1000 Hz sample rate.  


Most IoT implementations are suitable for capturing only 5% of the scope of mechanical systems that can be measured!

Another issue with the typical IoT implementation is that the sensor is only read just prior to data transmission.   If anything happens between one data transmission and the next, it is completely missed!   A better implementation would be to measure the minimum and maximum values at either the fastest rate the microcontroller will allow, or at a sample rate suitable for the application, and then transmit either the minimum or maximum value.   But this is rarely done.  

 

A Better IoT Implementation

A better methodology is to use the IoT device as an Edge Device.   Read the sensor at an appropriate sample rate, and then perform a statistical analysis directly on the raw data.   Then at a suitable interval, transmit only the results of that analysis to the cloud for storage and visualization.   The advantage of this approach over attempting to stream raw data from the IoT device to the cloud is significant.   Using the IoT microcontroller as an Edge Device reduces the frequency of data transmission by an order of magnitude or more, and permits the collection of data from a much broader scope of sensors than possible under the raw data transmission method.   The only disadvantage is that you need to configure the IoT device to perform the appropriate statistical analysis individually on each factor.  

Below are some of the statistical calculations the IoT device can perform on the factors as they are measured.   Remember that only the results of these calculations are transmitted from the IoT device to the cloud for storage and visualization.  

  • Level Crossing Event - reporting only when one factor crosses a particular numerical threshold.  
  • Multiple Factor Level Crossing Event - reporting when the values of several factors cross particular thresholds, and the values of a set of factors at the time of than event.  
  • Mean & Standard Deviation - calculating and reporting the mean and standard deviation for the data at particular long duration intervals when the data for the factor is known to be normally distributed.   It is also the best metric to evaluate changes in vibration data measured with an accelerometer.  
  • Stationary Test - calculate the mean, variance, and covariance at regular long intervals and transmit them.   Visualing these values in a x-y scatter plot will make it apparent if the mean and variance are constant, and if the covariance is independent of time.  
  • Trend Analysis decompose the data using a moving / rolling average to identify over time if the trend is an uptrend, downtrend, or stationary.  
  • Regression - track how changes in one factor affect the value of another.   Over time, it can tell you if the relationship between the factors is weak, strong, or varies over time.  
  • Time-At-Level Histogram or single classification - is an ideal structure for data when you want to know how much time a factor spends between a range of values.   The bins or sets of ranges of values can be configured to align with critical levels such as the freezing point of water, or when the factor exceeds a level that is considered outside normal operation.   In general, you are typically only interested in the latest set of compiled values, but in some cases it may be useful to see the changes in the distribution of the data across the bins over time.  
  • Machine Learning (ML) - the raw data measured can be put into a ML model to calculate a single numerical score as the output, and used to detect complex motion, recognize sounds, classify images, or find anomalies in sensor data.  

Do you need help with your project?   Send me an email requesting a free phone / web share consultation.  


Copyright © 2018-2023 Mechatronic Solutions LLC, All Rights Reserved