SensorCognition™ – Machine Learning Sensor Data at the Edge

The traditional IoT strategy of sending all data up to the cloud for analysis doesn’t work well for some sensing scenarios. The combination of lots of sensors and/or frequent updates leads to lots of data being sent to the server, sometimes needlessly. The server and onward systems usually only need to now about abnormal situations. The data burden manifests itself as lots of traffic, lots of stored data, lots of complex processing and significant, unnecessary costs.

The processing of data and creating of ongoing alerts by a server can also imply longer delays that can be too long or unreliable for some time-critical scenarios. The opposite, doing all or the majority of processing near the sensing is called ‘Edge’ computing. Some people think that edge computing might one day become more normal as it’s realised that the cloud paradigm doesn’t scale technically or financially. We have been working with edge devices for a while now and can now formally announce a new edge device with some unique features.

Another problem with IoT is every scenario is different, with different inputs and outputs. Most organisations start by looking for a packaged, ready-made solution to their IoT problem that usually doesn’t exist. They tend to end up creating a custom coded solution. Instead, with SensorCognition™ we use pre-created modules that we ‘wire’ together, using data, to create your solution. We configure rather than code. This speeds up solution creation, providing greater adaptability to requirements changes and ultimately allows us to spend more time on your solution and less time solving programming problems.

However, the main reason for creating SensorCognition™ has been to provide for easier machine learning of sensor data. Machine learning is a two stage process. First data is collected, cleaned and fed into the ‘learning’ stage to create models. Crudely speaking, these models represent patterns that have been detected in the data to DETECT, CLASSIFY, PREDICT. During the production or ‘inference’ stage, new data is fed through the models to gain real-time insights. It’s important to clean the new data in exactly the same way as was done with the learning stage otherwise the models don’t work. The traditional method of data scientists manually cleaning data prior to creating models isn’t easily transferable to using those same models in production. SensorCognition™ provides a way of collecting sensor data for learning and inference with a common way of cleaning it, all without using a cloud server.

Sensor data and machine learning isn’t much use unless your solution can communicate with the outside world. SensorCognition™ modules allow us to combine inputs such as MQTT, HTTP, WebSocket, TCP, UDP, Twitter, email, files and RSS. SensorCognition™ can also have a web user interface, accessible on the same local network, with buttons, charts, colour pickers, date pickers, dropdowns, forms, gauges, notifications, sliders, switches, labels (text), play audio or text to speech and use arbitrary HTML/Javascript to view data from other places. SensorCognition™ processes the above inputs and provides output to files, MQTT, HTTP(S), Websocket, TCP, UDP, Email, Twitter, FTP, Slack, Kafka. It can also run external processes and Javascript if needed.

With SensorCognition™ we have created a general purpose device that can process sensor data using machine learning to provide for business-changing Internet of Things (IoT) and ‘Industry 4.0’ machine learning applications. This technology is available as a component of BeaconZone Solutions.

Machine Learning isn’t Magic

When working with Machine Learning on beacon sensor data or indeed any data, it’s important to realise AI machine learning isn’t magic. It isn’t foolproof and is ultimately only as good as the data passed in. Because it’s called AI and machine learning, people often expect 100% accuracy when this often isn’t possible.

By way of a simple example, take a look at the recent tweet by Max Woolf where he shows a video depicting the results of the Google cloud vision API when asked to identify an ambiguous rotating image that looks like a duck and rabbit:

There are times when it thinks the image is a duck, other times a rabbit and other times when it doesn’t identify either. Had the original learning data included only ducks but no rabbits there would have been different results. Had there been different images of ducks the results would have been different. Machine learning is only a complex form of pattern recognition. The accuracy of what you get out is related to a) The quality of the learning data and b) The quality of the tested data when to try identification.

If your application of machine learning is safety critical and needs 100% accuracy, then machine learning might not be right for you.

Read about AI Machine Learning with Beacons

How is IoT Going?

Vodafone have an informative new report, the Internet of Things (IoT) Barometer. It’s a survey of 1,430 companies worldwide into their use of IoT.

IoT adoption is increasing now that companies are buying more cost-effective, off the-shelf solutions rather than building their own from scratch:

74% of adopters believe that within five years, companies that haven’t adopted IoT will have fallen behind their competition.

Adoption is across all sectors:

“95% of adopters are already seeing benefits. Over half
(52%) say that the returns have been significant and
79% say IoT is enabling positive outcomes that would be
impossible without it.”

The main gains have been:

  • reduced operating costs (53%)
  • improved collection of data (48%)
  • increased revenue from existing streams (42%)

There’s also an accompanying video:

Read about Beacon Proximity and Sensing for the Internet of Things (IoT)

IoT Sensors

Bluetooth LE provides a compelling way of implementing IoT sensing because:

  • The sensors are usually already cased and certified rather than experimentor, bare printed circuit boards.
  • Being wireless, they can be placed in remote areas that have no power.
  • Being Bluetooth LE, they can last on battery power for years.
  • Again, being Bluetooth LE, they are suitable for use in noisy electrical areas.
  • They are commodity rather than proprietary items and hence very low cost compared to legacy industrial sensors.
  • No soldering or wiring up is required.
  • They are easy to interface, for example, to Bluetooth gateways and smartphones.
  • They can participate in Bluetooth Mesh to communicate over large areas.
  • They detect a variety of quantities such as movement (accelerometer), temperature, humidity, air pressure, light and magnetism (hall effect), proximity, heart rate, fall detection, smoke, gas and water leak.
  • They are proven. For example, some of our temperature sensors are used to monitor airline cargo.
  • Software exists, such as BeaconServer™ such that you don’t need to write any software.
INGICS Movement Sensor

Need help? Consider a Feasibility Study.

Smart Cycling Helmet

Nordic have news of a new cycling helmet with embedded nRF52 device, also used inside many beacons, that detects acceleration and in conjunction with an app, can send location and crash alerts.

While it’s an interesting and innovative product, most of the work is done by the app. There’s no reason why a generic acceleration sensor beacon couldn’t have been used within the helmet (or elsewhere). However, we guess including anything extra inside a helmet, in a safe manner, poses some challenges.

An insight from this is that there are probably many untapped opportunities for vertical sensor beacon type applications that predominantly make use of apps to provide for much of the functionality.

Machine Learning Accountability

AI machine learning is a great partner for sensor beacon data because it allows you to make sense of data that’s often complex and contains noise. Instead of difficult traditional filtering and algorithmic analysis of the data you train a model using existing data. The model is then used to detect, classify and predict. When training the model, machine learning can pick up on nuances of the data that a human programmer wouldn’t see by analysing the data.

One of the problems with the AI machine learning approach is that you use the resultant model but can’t look inside to see how it works. You can’t say why the model has classified something some way or why it has predicted something. This can make it difficult for us humans to trust the output or understand what the model was ‘thinking’ when the classifications or predictions end up being incorrect. It also makes it impossible to provide rationales in situations such as ‘right to know’ legislation or causation auditing.

A new way to solve this problem is use of what are known as counterfactuals. Every model has inputs, in our case sensor beacon data and perhaps additional contextual data. It’s possible to apply different values to inputs to find tipping points in the model. A simple example from acceleration xyz sensor data might be that a ‘falling’ indicator is based on z going over a certain value. Counterfactuals are generic statements that explain not how the model works but how it behaves. Recently, Google announced their What-If tool that can be used to derive such insights from TensorFlow models.

Read about Machine Learning and Beacons

New Rugged Industrial Sensor Beacons in Stock

We have some early samples of the new INGICS iBS03 range of beacons in stock. They are functionally similar to the iBS01 range except are waterproof to IP67 and have a more robust case with 2m drop protection.

We stock three variants:
iBS03T – Temperature sensor
iBS03G – Motion (starting/moving/stopped) and fall detection
iBS03RG – Accelerometer for raw xyz

New Waterproof S1 Sensor Beacon in Stock

We have the new Minew S1 in stock. It’s a sensor beacon with accelerometer, temperature and humidity as well as iBeacon/Eddystone. Unusually for a temperature/humidity beacon it is waterproof to IP65 making it suitable for use outdoors. Sensor beacons like this usually have the sensor on the PCB and a hole in the case to pass through ambient temperature and humidity. Instead, the sensor is outside the beacon:

This beacon takes 2 AAA batteries and uses a newer, more efficient Nordic nRF52 System on a Chip (SoC) for a long 3 year battery life.

Location-based Ambient Intelligence

ABI Research predicts that there’s going to be an increase in beacon-enabled app shipments mainly due to retail and ambient intelligence:

So what is ambient intelligence? It’s a catch all term for the joining of the Internet of Things (IoT), big data, the connected home, wearables, smartphones, voice/image recognition and artificial intelligence through machine learning.

Sensor beacons enable the gathering of new data. New data not only measures physical things but, more importantly, provides a way of circumventing the problem of silo data in many large organisations. Silo data is data people/departments don’t want to share for fear of losing power or control. Today’s machine learning techniques also require data to be in a specific format and ‘clean’. Creating new data allows it to be more readily formatted and conditioned prior to saving.

This isn’t just about location data. It includes physical quantities such as smaller-scale movement (accelerometer), temperature, humidity, air pressure, light and magnetism (hall effect), proximity, heart rate and fall detection. Our conversations with beacon manufacturers tell us beacons are currently being developed that detect more nuanced quantities such as colour, gas and UV. Some beacons already have general purpose input/output (GPIO) such that custom beacons can can already detect anything for which there’s an electronic sensor.

So why Bluetooth beacons rather than other electronics with the same sensors? Here are the main reasons:

  • Integration without soldering or, in most cases, without custom electronics
  • Communication with iOS and Android apps and computers via existing Bluetooth APIs
  • Remote, low power, data acquisition where there’s no mains power and no connectivity at the place of measurement
  • Significantly lower cost compared to traditional industrial sensing