AI

AI and IoT – Marriage made in the Cloud

Whether you realize this or not, we are so connected to the “Cloud”. From my home thermostat, and doorbell, to now the microwave – everything connects to the internet. It’s not limited to the home either. From as big as the electricity grid to entire factory floors, to as small as your wrist health-monitor – everything is (or will be) connected.

Two things make this all possible – the Internet-of-Things (IoT) and Artificial Intelligence (AI). IoT is the physical interface, the senses. The internet senses the World through the IoT devices. In simpler terms, they collect the data – a camera that takes pictures or a microphone that listens. Or it could be simpler sensors like a thermometer (measuring temperature).

But merely collecting all this data is not useful. (The quantity of this data is huge and increasing.) Something has to interpret and convert this data into actionable information. Something, that can extract meaningful information from this data. That is where Artificial Intelligence (AI) steps in.

Today the AI lives in the cloud (for the most part). IoT collects and sends data to the Cloud, where the AI interprets it, and decides the outcome. Let’s see how this works with examples.

AI and IoT – a marriage made in the Cloud

In the context of IoT, the goal of AI is:

  • to learn a model from the data, and,
  • use the model to interpret new data and provide an actionable outcome (a decision).

We’ll consider two examples – a voice assistant, like Alexa or Siri, and a smart front door. The Voice Assistant understands human language. For the smart front door, the goal is that the door should recognize me and unlock itself, without me having to use a key. 

Example: The Voice Assisant

The Voice Assistant (VA) responds to spoken commands. It uses a microphone (the IoT sensor) to listen. The AI makes sense of the sounds – the words, sentences and context. It then provides the information or acts on the command. (For example, playing specific music or provide driving directions).

Key steps in developing and using an AI solution
AI and IoT – the green boxes are IoT sensors

Figure shows how this works. The IoT gathers the data (1) – in the case of the Voice Assistant, the data is sounds. This data is then sent to the Cloud (2). Here the data trains the AI (3) and build a model. The model is then deployed (4).

The model for the VA is complicated. It needs to understand the entire language, spoken with many different accents. Once trained though, the same model applies to all the VAs in the network.

For the Voice Assistant, the model (AI) learns and is deployed in the cloud itself.
The AI receives and interprets all spoken words in the Cloud (Cloud-AI). Why keep it in the Cloud? Mostly because it is a large model. It is also being constantly updated, and keeping it in the Cloud means only one model needs to be updated. The main issue is the lack of privacy. Anything I say, the VA is listening to and sending to the Cloud where it may be interpreted.

Example: The Smart Front Door

The goal with the smart Front Door is it recognizes me and responds by unlocking the door for me, and only me. It needs to sense my presence, and let’s say it uses a camera (the IoT sensor). AI provides the intelligence. It learns what I look like and then uses that model to recognize me and open the door.

The Front Door system design may follow the same approach as the VA. The camera (IoT) gathers the data, which is sent to the Cloud. There the AI learns to recognize me. But here things become different. The AI has to recognize my face for my door, and my neighbor’s face for their door. That means the AI trains differently for different doors.

This is a critical difference – in the VA case, the same AI (one trained model) could serve all IoT devices in the network. But in the Front Door example, every door has a unique model.

So for the Front Door, it might make sense to instead deploy the AI in the IoT device itself (IoT-Edge), rather than the Cloud. The Front door only needs to decide Me-Vs-NotMe. So while the model may train in the Cloud (esp. the Not-Me part), it is deployed at the IoT-Edge.

There are other good reasons for the different approaches (Cloud AI Vs Edge AI). Two of the main ones are privacy, and the size of the model. Large, typically complicated models can not fit on the resource-limited IoT devices. But, I also do not want a digital representation of my face stored on the cloud.

Heterogenous IoT Networks

We looked at two examples above – the VA and front door – both using single IoT devices. In general though, IoT networks consist of many devices. They are also not always homogenous, that is, not all the attached systems are identical. They may have some common features, but some unique ones as well. Think of a factory floor or even the car – both have many different types of sensors (IoT sense devices).

This complicates the AI. It is no longer possible to train the AI on one IoT device, and map the model to all the IoT devices in the network.

To illustrate this, imagine if my front door now has a fingerprint sensor in addition to the camera. The AI for the camera cannot map to the finger print sensor. Yet the two have to work together on the same problem, namely to recognize me and unlock the door.

IoT network devices are not always identical. They may have common and unique features

The figure shows a general scenario – it depicts two different IoT sensors. They both have some common features, and some unique ones. One solution is to learn a superset of all possible features in the cloud. The result is a large, complicated model. This needs far more resources in the IoT edge devices, or compromises on privacy by keeping the AI in the Cloud (figure below, left).

A Distributed AI Model (Edge-AI)

AI and the Internet of Things: Cloud-AI Vs Distributed AI
AI in the Cloud Vs Distributed AI

Another solution is a Distributed AI model. This implements the AI on the network (above figure, right) – which includes the Cloud and the different IoT devices. Parts of the solution – the common features – are mapped to the Cloud. The unique ones are modeled and learnt locally on the IoT sensor devices.

This provides both benefits – privacy and resource management. Since the model is local to the IoT edge device, private data is not sent or stored in the cloud. This also utilizes the available resources better. The IoT devices store only local models, and not the entire systems’ model. The result – a smaller footprint at each IoT device. Much of the AI now resides on the network devices. This reduces the computations and data requirements in the cloud.

This is a Distributed AI solution (or Edge-AI). As IoT networks become more prevalent, we will start to see more AI move to the Edge. Lets illustrate with an example next.

Example – Solar Monitoring with Distributed AI

The past few years have seen a tremendous growth in rooftop solar plants. Many residences today generate their own electricity from the Sun. Here’s a common question that comes up all too often from owners:

“I have installed a rooftop solar plant for electricity. How do I know if the energy output from my plant is actually correct, as designed?”

Solar Customer

Data there is plenty of – solar plants provide daily energy output data. The problem is this energy output number changes from day to day, based on many factors like the weather. What is lacking (and what the owner is looking for) is information. Is the output correct?

AI and Solar Monitoring 

The goal with AI, is to learn a model of the Plant, and to monitor it by comparing actual output against the predicted output.

One solution is to model the plant in the Cloud (the Cloud-AI solution). The first step is to take all the data into the cloud. The second step is to learn a model of the plant – certain plant specific details such as the shade profile. The third step is to predict the output under the given environmental conditions. The final step is comparing the actual output from the plant and the predicted output. The result is actionable information – is the plant output good or not.

This solution works, but has two issues. The first is privacy – all the data goes to the Cloud. The second is scalability. Imagine learning the models for hundreds of thousands of small residential solar plants in the Cloud. A better solution: if the models could be learnt locally in the IoT device themselves.

Using Distributed AI (Edge-AI) for Solar Monitoring
Solar Monitoring – The Distributed AI approach

Edge-AI solves both of these issues. The AI solution maps on to the entire network (see figure). Certain elements that are common to all the plants – the weather for example – are modeled in the Cloud. The Plant specific modeling however, is local.

The result is better on many fronts. One, the distributed model uses resources more optimally by processing data locally. Data privacy is much better since all plant modeling is local. The network scales easily. Adding a new plant is easy since every plant learns its own model, and only its own model. 

Closing Thoughts

Products and solutions based on a network of IoT sensors are set to become prevalent. Some applications include the electricity smart-Grid, a smart-home, individualized health care. AI will be an integral part of any such product. And while today Cloud-based solutions dominate the AI landscape, such AI-IoT network products will need new distributed topologies.

Edge-AI is a distributed AI topology. It maps the AI on the entire network, not just in the Cloud. This provides two distinct advantages over AI in the Cloud. The first is privacy – with models that are learnt locally. Second is the lean implementation, an optimal use of the available resources.

Distributed AI will drive the next wave of Intelligent Products.

Show CommentsClose Comments

Leave a comment