32 Internet of Things (IoT)

Prof. Bhushan Trivedi

epgp books

 

Introduction

 

The idea of connecting sensors to Internet was discussed in the module 6. Many technologies have grown to such an extent that they become interwoven in human life. For example, motors are commonplace, we find them in automated doors, sliding windows, car doors etc. Similarly, microprocessors are commonplace, found in home appliances like mixers, vehicles like two wheelers and cars, even ACs and refrigerators etc. Similarly, the computer networks and network devices are getting interwoven together in form of Internet of Things. These are tiny devices, we learned about in chapter 6, making computing devices connected to Internet ubiquitous. The applications we have discussed so far, mailing, remote login or browsing etc., have one thing in common, they are initiated by humans. The very idea of human initiated actions and network response is changed when we discuss IoT. The communication that network enables is used by humans. In case of IoT, the communication is happening between intelligent systems embedded in various devices. The idea is to make sure these devices talk to their surroundings, adjust themselves accordingly and work as per specification and communication they receive from similar devices and the programs running within. Thus network enables the communication but it is used by IoT devices. This is not a new idea. Sensors are around for decades, embedded systems are around for many years and Internet is also around for decades. The idea of using conventional devices in different form using the embedded intelligent systems which are capable to communicate over the Internet is new. Combining two different worlds of sensor node and Internet is so powerful that many solutions earlier not considered to be possible are within our reach using IoT.

 

The IoT device characteristics

 

Before we start talking about IoT devices, let us begin with some of the characteristics of the IoT devices that distinguishes them from other devices.

 

1. Self-adjustable: – the IoT devices are able to adjust to surrounding. They adapt to the context and work accordingly, in a dynamic fashion. For example, when the surrounding lights is diminishing, a surveillance camera can adjust its exposure and even switch over to night vision if need be.

 

2.Self-configurable: – IoT devices should be able to find and connect to networks, configure themselves according to the context and patch and update themselves automatically. For example, get an IP address and set that value automatically. User does not need to set the IP address.

 

3. Work with multiple protocols: – IoT devices come in many varieties and run multiple protocols. Most IoT devices can work with multiple protocols. While working in different contexts and different situations, different protocols needs to be executed. For example, obtaining IP address in one case may require to use DHCP1 while in the other case require to use auto-configured (self-assigned) address.

 

4. Unique ID: – unlike conventional sensors, every IoT devices are uniquely identifiable as they will be acting as a member of a network. An IP address is the most common form of ID but others are possible.

 

5. Communicating and collaborating with other devices: – the IoT devices are able to communicate with other devices. They usually run dynamically discoverable setup so surrounding devices can detect their presence and can initiate communication with them. The power of IoT devices is not derived from the communication but collaboration. The IoT devices, which are connected to each other, can decide as a group. For example, IoT devices embedded at cross roads decide collectively the amount of congestion, direction of movement of vehicles and collectively decide traffic signal timings to enable more congested routes more time. Similarly, multiple IMDs (Implantable Medical Devices) communicating to doctor’s phone from the bodies of multiple patients might inform doctor about impending outbreak of some disease.

 

Embedded systems

 

An IoT device is an example of an embedded system. An embedded system is an integral part of another system or device. For example, an IoT chip embedded in a surveillance camera allows the camera to communicate and collaborate with other cameras, or in a chip in a glucometer which sends an SMS to a doctor when the glucose level of a patient goes below some threshold value. This embedded system is basically a sensor, which sense the environment (i.e. take the input from the surroundings), process that information based on the logic it has, actuate something (send an SMS, or stop the inflow of insulin etc.) in response. Our ACs and refrigerators are equipped with similar devices which can look at the temperature and decide to switch off or on the cooling system to maintain the temperature in a typical range2. This sensor does not work alone. There are sensors which determine other parameters for example the air flow the user has chosen (High, medium or low), the temperature outside and inside the room, the temperature user has chosen etc. They communicate with each other to decide whether to start or stop the cooling system.

 

Many devices that we are using in our daily life contain such embedded systems. Mobile phones contain many sensors including light sensors which detect and adjust light of the screen based on outside light, gesture sensors to detect what user wants and act

 

1  Dynamic Host Configuration Protocol is a method of allocating an IP address dynamically by a server

 

2   Such devices are sometimes called smart thermostats.

 

accordingly, gyroscope and motion sensors to decide what user is driving at and do accordingly (for playing games which demand some actions from user, for example). Even a simple device like printer has many sensors embedded within for detecting presence of a paper in the tray or an ink in the capsule or the tonner in the drum, or paper jammed along the path etc.

 

Many a times the embedded systems use sensors to harvest energy and help energy conservation. Street lights using power generated by pedestrians walking along or collect and conserve energy generated during daytime by sunlight, energy generated by sunlight in solar devices etc. are examples. Body gears getting energy from the body are another example.

 

IoT is an example of an embedded system but not all embedded systems are IoT devices. The difference is, an embedded system might not have an internet connection or might not even be connected to other devices.

 

Collection of multiple intelligent devices

 

As it mentioned before, the collective or collaborative intelligence of the devices which makes IoT devices special. For example, vehicle networks formed by IoT devices embedded in the cars can help avoid accidents. They can learn about the distance from other cars and pedestrians and other objects and warn the driver if they are dangerously close by. Multiple sensors in a self-driving car help the car to navigate through the crowded road. Multiple camera sensors, audio sensors, GPS sensors, road sensors, all of them provide their input for the car’s intelligent navigation system to decide the path and movement. Multiple IMDs (Implantable Medical Devices) embedded in patient gives complete picture of the position of the patient to the doctor and help decide further action. Sensors embedded at various places in a big machine can help the owner learn about the health of that machine is also an example. We have looked at many similar examples of smart city networks in module 6.

 

Another important ability of such collective intelligent process is that they are able to learn and adapt. For example, one typical smart home system used to identify the person who enters the room based on the weight of the footsteps and the distance between them. Based on the identification, the room temperature and lighting were adjusted. The system learns, over a period of time, liking and disliking of individuals and adjust accordingly. Having said that, the job is not that easy. The system has to learn over a long period of time, and thus collect huge amount of data, the learn to process that data using some machine learning algorithm and conclude and continuously enhance the knowledge learned over a period of time. This processing involves Big Data, Analysis and machine learning, components usually. These are challenges that the designer often has to deal with.

 

Communication is critical

 

Having communication between IoT devices is a critical component of the system. There are a few distinct advantages of communication. For example, sensors embedded in the burning building can help the fire fighters learn about what passage of the building is safe to enter by communicating with each other and with the devices the firefighters carry with themselves. The sensors embedded in the car of the resident indicate the heaters of the house when the car is approaching house. The heaters can start well in advance to provide the owner the real warm welcome. The embedded sensors in the field help the water dripping system to learn about water content of the soil in the different parts of the field and decide the exact amount of the water to drip at every location. Sensors embedded in the constructions at public places, for example, rides for kids, bridges that people drive across, buildings that people use etc. can help government to collect information about their wear and tear. Stress over such structures can be measured by devices and collected over a period of time. If sensors can communicate themselves, it is better, faster and convenient process and it is possible to learn about a significant damage to some public property which can lead to disaster.

 

Another example of critical communication is the smart meter. These meters are capable to communicate wirelessly to a nearby measuring device. A vehicle passing by subscriber’s house can query the meter and meter responds back with the reading in a wireless fashion. There is no need to send somebody to go and do meter reading manually. Interestingly, this idea is also extended by some researchers where they can inform the owner of the house about electricity consumption periodically. The owner can look at energy consumption pattern and decide what to do. It is also possible to have intelligent energy grid system where the customers can also contribute. For example, one customer may decide to deploy solar cells on his rooftop to generate energy and connect his house with this grid. Whenever he is not using the energy or whatever excess energy is being produced by his system is pumped into the grid so other customers can use it. When his own energy consumption goes above what he is producing, he can draw it from the grid. His billing is done based on what he contributed and what he consumed. Another movement is to reduce peak time consumption of energy. For example, most houses consume higher energy at late evening and earlier part of night. The power companies use schemes which charges at higher rates when energy is consumed during those periods. (this is quite analogous to Internet service providers provide connections at lower rates during the night when the usage is comparatively less to balance load at peak periods.) The IoT devices are designed to make sure they communicate with power suppling companies, learn about their rates during specific period and warn users when he moves to high price zone. For example, he is planning to use toaster, the toaster might respond back, when switched on, by displaying “Currently there is a high price electricity period, wait for 10 minutes and you will be able to use electricity at half the rate”. It is also possible that the AC or refrigerator is switched off by IoT devices embedded within during this period if instructed by the user.

 

Yet another example is a simple grid of smart bulbs in a big institute. A clerk, sitting in his own cabin, can learn about a bulb about to fail based on the information received from that smart bulb and can instruct the electrician to replace that bulb. Consider a university where there are hundreds of rooms and thousands of bulbs, all of them can be efficiently managed by a single person who does not need to even come out of his room to learn about the status of each and every bulb of the institute. All such electrical appliances together can communicate with each other and provide report indicating how much energy is consumed by which devices etc. So I tis possible for the user to decide the ways of saving the energy.

 

An excellent example is how ads are displayed on the Mall. For example, if you visit Big Bazar or Central Mall, you will find many ads being flashed on display units hanging on the wall. Those display units are generally connected with central place in the mall which determines the time to display the ad and duration for which it is displayed. When and where the ads to be displayed is decided based on the payment that the mall owner received from the respective companies but there are other factors as well.

 

Most such display units are connected with a cloud over the Internet. The ads for a new mobile, for example, being displayed on the wall may not be coming from the central server of the mall. Usually such ads come directly from the company server, in this case a XYZ server of the mobile manufacturing company located somewhere else. The ads are fetched from the cloud and displayed. Such communication ability is essential for many reasons. First, the mall server does not need to take that load. Second, XYZ company’s central server has to work on a single ad and distribute it to all malls where it is displayed, across India, it simplifies the operation. In true sense, the central server does not need to really distribute, they will have to replace the old ad in the cloud itself. The ad players in the mall, when they pick the content to play form the cloud, gets a new content when the central server changes them. Third, if the company wants to change some part in the ad or replace one ad with another, they can do it on the fly in the cloud and it is changed at all places across India at the same point in time. The administrator at the mall decides the time and placement of the ad, for example, in which section of mall, kids section, woman section, grocery section or male section, the ad makes sense, and when and how long should it be displayed on the display board.

 

Interactivity with IoT devices

 

The benefits of IoT can be extended further if proper interactivity and pattern matching is done. For example, the ads can be displayed on the display board and camera placed on the display board can record people’s reaction at the same point of time. The information about the people looking at the ad is collected, like their span of attention to the ad, whether the viewer is male or female, whether he seems happy or otherwise viewing the ad, whether he went on to purchase or inquire further about that item or not, which age category he belongs to etc. Armed with this information, vendors and the add designers apply AI algorithms to learn many things about their ads and their impact on typical segment of the customers. For example, they may conclude that specific ad does not have serious impact on young customers, but most middle age customers seem to like it. They may take decisions to move the ad to some other department, or display it more number of times, or reduce the time for which they are displayed etc. The idea is to get important feedback about the ads which otherwise is just impossible to get. The responses are collected by the applications running in the cloud, processed together by some machine learning algorithm to generate patterns out of it, like people of age 30-35 with rich background seems to like this ad and most of them actually went and inquire further about the item advertised, for example. Such conclusions help ad designers to focus on specific market.

 

Similarly, in case of IMDs, they do not provide any information to anybody without either doctor inquiring or some exceptional condition is achieved. Upon query, they may give a detailed response like how the patient’s body temperature changed during the day and how the patient’s body reacted to a specific drug etc. Here also, companies who are manufacturing drugs can monitor patient’s conditions and patterns of his temperature, blood pressure, glucose level etc. to conclude on positive or negative side effects of prescribed drugs on typical types of patients.

 

In case of surveillance cameras, some recent systems come with cameras with some basic information about normal events built-in. Whenever the camera captures something abnormal on the basis of this definition, they report back. For example, if they find somebody walking with a gun or bomb, they understand that this is a dangerous item to carry and this is not a normal behavior. They will report this immediately. Thus instead of acting as a passive viewer, it can act as a security guard. Moreover, when they report this to cloud based system, the system can find out police patrol car nearby based on their GPS location and inform them ASAP.

 

In case of machine health, the sensors embedded in machines can run experiment on the instructions of supervisors and report how good or bad the condition of the machine is. They can run the machines in trial mode, prepare report and respond back.

 

Thus interactivity of IoT systems with the other systems can enable a far more efficient and controllable system. The communication here is used for control (from remote place), coordination (with multiple IoT devices and monitoring systems) and passing information (like machine health, or patient’s temperature or gender of an onlooker).

 

Networking infrastructure

 

The networking infrastructure used for IoT devices is predominantly wireless but sometimes wired networks are also used, especially when the devices are immobile.

 

Wireless sensors are most useful when the wired infrastructure has a chance of getting disrupted, even when sensors are immobile. For example, sensors deployed in battlefield while monitoring enemy activity, or sensors deployed along the fault for detecting earthquake, or sensors deployed to access water level of rivers in monsoon etc.

 

Another reason for using wireless system for even semi-mobile items like display units in the mall and machine health check sensors. Being wirelessly connected help them move freely and easy to relocate if need be. Also there are many other, wires in factories and malls and the administrators always prefer a solution with less wires.

 

In most cases, therefore, some wireless system is used and thus we will mainly concentrate on wireless networking infrastructure used for IoT in this course. However, the conventional wireless networking solution are proven ineffective for IoT. Let us try to understand why.

 

First, the wireless solutions used for sensors must be extremely energy efficient. Both Wi-Fi and Wi-Max fail on this count. Most IoT devices run on batteries and it is not easy or feasible to change batteries every now and then. The solution which demands change of batteries frequently is also not cost effective considering huge number of IoT devices needed in most cases. The energy efficiency can be achieved by using minimum amount of data for transmission, minimizing on radio transmission, using energy efficient microprocessors, using lesser amount of memory and power. The IoT devices should also have to manage the issue of interference. Reducing power also helps in reducing interference. Another issue is human safety especially when the devices are directly connected to human body, like IMDs and electronic gears that human wear. Excessive radio transmission can inflict human body negatively. So even when enough power is available, an optimized power usage is premium in IoT networking infrastructure design.

 

Second, the wireless solution may provide low bandwidth but can run for a longer distance. Usually IoT devices do not exchange much data and thus can sustain low bandwidth. In some cases, like IMD, the device need to run at least for 10 to 15 years and thus minimize communication costs and thus transmit as less data as possible. In other cases, like earthquake sensors, or sensors placed in jungles, the recording device is usually kept to a much further distance than conventional networks and thus the wireless solution must be able to send data to a longer distance.

 

IEEE 802.15.4 networks

 

One of the most popular wireless solution for implementing IoT networks is IEEE 802.15.4. it is called a mesh network; as it is like a MANet, every member node is connected to all nodes in the vicinity. It also inherits many other characteristics of MANets like we do not have any special purpose routers here. We will soon see the challenges for building and using such networks for IoT devices.

 

802.15 is an IEEE working group managing WPAN solutions. One of the subsections of it, the

 

802.15.4 defines low rate wireless PAN (LR-WPAN)3. It defines both physical and MAC layer. There is another popular name given to this wireless solution by vendors. They and most others call it ZigBee. ZigBee is designed especially for products which use 802.15.4. In a way, ZigBee is to 802.15.4 what Wi-Fi is to 802.114. They aren’t synonyms in true sense but used as so normally. The best thing about 802.15.4 is that it is designed especially for a low power, battery operated device which is well suited for IoT devices. 802.15.4 is not only about low power communication but communicating using a mesh network as well. What are mesh networks and why ZigBee prefers that will soon be clear.

 

When the 802.15.4 is designed for a low bandwidth, low data connections, it has typical characteristics suited for it. For example, the packet size is (just) 127 bytes, out of which 102 bytes are used for data, it can have either 16 or 64 bit addresses5, based on the requirement.

 

Some of the specifications of this protocol is as follows. It works in the range of 10 meters, maximum possible data rate is 250 kb/sec, but 20 kb, 40 kb and 100 kb is also possible. Lower data rates consume lesser power. It works based on reservation of time slots before transmission, collision avoidance is done using CSMA/CA. Power management based on link quality and amount of power the battery has is also provided. There are three possible frequency bands primarily used for 802.15.4. First is 868-868.6 MHz, used in Europe. Second is 902-928 MHz, used in North America. While the third is 2400-2483 MHz used in other countries.

 

Recently a few more frequency ranges added in China and Japan in special versions known as 802.15.4c and 8-15.4d. Some more frequency bands are added globally in 2009 and 2011 as well. Some other technological changes are also proposed. For example, earlier methods were not using channel hopping but new versions do. Doing so, they make sure that if on one of the channel it is experiencing interference or multipath fading, it can switch over to other channel. That version is known as 802.15.4e. It works with 750MHz and 950 MHz ranges.

 

3  There are other sections defining other solutions, not as popular as 802.15.4

 

4 Unlike 802.11, 802.15.4 can be used for other technologies, for example, WirelessHART used in control systems. These technologies extend the basic functionality of two layers to higher layers and provide services.

 

5 They use IPv6 addresses actually, other bits of the address are decided using well-known IPv6 auto configuration explained later.

 

The 802.15.4 protocol is not the only protocol used with IoT devices, for example, some cases where long range connection is a must where 802.15.4 cannot work. However, it provides us a good case study so we are going ahead with it. There is a solution which can use IPv6 with this protocol for a long range, which we will discuss later.

 

Mesh Topology and Mesh Networks

 

The star topology that is the de-facto standard in the conventional networks, is not well suited for IoT devices using 802.15.4. The major reason is the shorter range of the devices. Let us take an example of IoT devices for home appliances. Consider a router sitting at some convenient place in the house and all home appliances are connected directly to it using 802.15.4. The short range demands no device is further than 10 meters from the router. This is quite unrealistic. ZigBee also provides another solution using 100 meters but that also is not suitable for little bigger house and it also uses more energy which the tiny devices may not like to use. Unlike computer labs, homes have many obstacles like walls, pipelines and other household items in between which further reduce the range.

 

Solution to above problem is to allow a device to talk to another device like MANet and route it to the central router. If we have sufficient number of devices which can lead to the router, an IoT device using 802.15.4 can be placed at arbitrarily long distance from the router. For example, if one of the mixer contains IoT sensor and provide some data to the company which has manufactured it. If that mixer is 50 meters away from the router, and contain 5 to 6 devices along the path, they can relay data from this mixer to the router. Thus, a device does not need to be directly connected to the central router, but need only to connect to some device nearby. If we have sufficient devices at required distances, any device can send data to the central router.

 

Above example clearly indicates that one needs a network of arbitrary IoT devices placed anywhere in the house but not directly connected to the central server but with each other. As the structure of IoT device deployment depends solely on how users use and place them, it is very much like MANets with dynamic and flexible topology. We also want the devices to communicate to the central server at any cost, despite the intermediary devices change their positions. If it can directly connect to the central sever, nothing better. The next best answer is to connect every device with all devices in the vicinity, so even when all other neighbors except one moves away, the device can still communicate further. This network topology is called Mesh.

 

Once we know that mesh is the best answer to the IoT device topology problem, the next question that arises is, how can this network be constructed? Quite similar to MANets, IoT devices communicate with each other and forms a network on the fly, on their own. That is why this mesh network is also known as SOM or Self-Organized Mesh.

 

Once such mesh is constructed, the device (the node) can decide the best path to router based on many methods, basically comparing and deciding the best path based on battery life of intermediaries, shorter distance to the central router, least interference, the capacity of intermediaries and so on6. The research on MANet routing algorithms and leader selection process is quite useful in this case as well.

 

The central router that we discussed in above example is known as FFD (Full Function Device) which is capable to coordinate the communication process in the entire network. The devices may be FFDs or RFDs (reduced Function devices). The RFDs are much simpler devices with much lesser memory and processing power. Each device has 64-bit identifier and in some special cases, 16 bit identifiers. It is possible to have more than one FFDs in the IoT network but only one of them act as a central router or coordinator. The words coordinator, FFD and RFD are part of the jargon used in 802.15.4 world. The word central router is sometimes even called a border router as it connects the IoT network world with other networks. We will use words coordinator, boarder router and central router interchangeably in this course.

 

Summary

 

We have seen how IoT devices communicate and collaborate with other devises for intelligent action. The IoT device can be interactive and the data collected by an IoT device can be available to vendors and designers for machine learn and generate important patterns out of the data. We have also seen that conventional wireless solutions do not work with IoT devices and they need a special solution. One of such solution is 802.15.4 which we looked at in this module.

 

6 The technical name of this process is called an objective function. An objective function will return the best path for any node to the central server based on optimized value of the objectives

you can view video on Internet of Things (IoT)

References

 

1. Computer Networks by Bhushan Trivedi, Oxford University Press

2. Data Communication and Networking, Bhushan Trivedi, Oxford University Press

3. Internetworking with TCP/IP, Douglas Comer,Pearson