IoT Solutions, Latency & Life Cycle Costs

Latency

One of the biggest obstacles to having realtime controls, especially feedback loops cloud based, is the latency inherent in Cloud based IoT systems. In a control loop, which in it’s simplest form would consist of a sensor (a measurement, such as a temperature measurement), a controller (such as a PID controller) which has a set point, and a manipulated device such as a valve,   When data has to travel across the internet, it has to travel through various stages, each adding latency.

Geographic latency 

Assuming the controller is hosted in the Cloud, then the farther away the Cloud server is, the longer it will take for the data to travel the loop from the sensor to the manipulated variable. While the actual data travels at near the speed of light, as it transits from one network segment to another (so called hops) latency increases – this can vary from 10msecs to over 100msecs for a server that is in another continent or if using something like StarLink. 

ISP Latency

The latency of the ISP provider will vary depending on the connection, fibre connections are obviously much faster than DSL connections, typically 2 msecs for the former and 10-15 msecs for the latter. It is also important to note that high band widths may not mean low latency. For control loops that require a fast response such as PID loops, congestion can lead to signal jitter.

LAN Latency

All LAN’s have latency, and this is more apparent with WIFI devices which IoT devices tend to be, whereas hardwired ethernet ports have a latency an order of magnitude less (10 mseconds versus 1 msecond).

StreamBlocks Solution

StreamBlock servers have a concept of universal data and each instruction to be executed is connected to a time domain value. Unlike many systems, where data is sent on a first come first serve basis, the time stamp for execution determines how a stream of data is executed. This allows for data coming in asynchronously to be synchronised.

That means the StreamBlocks server is calculating the actual latency of the various components, and working out how to compensate for the changing leadtime, in much the same way as a system with a large capacitance, responds slower than a system with a lower capacitance, or for systems with very fixed delays, as a compensation for “dead time”. 

 

Multiple Solutions

The fact that latency can be minimized and compensated for in some applications introduces the possibility of approaching solutions different and installing control schemes in the cloud, which would normally be embedded in hardware. 

For simple applications, such as lights on or off in a home, the simplest solution is to subscribe to a cloud based server, attach devices and connect them to the server via the internet, even a delay of 1 second is probably acceptable. 

One key difference is that StreamBlocks provides you with control over the server you use and can ensure that your data is completely private. You can also move that functionality to a server on your LAN, where you have full control.

Simple Home Installation with a Cloud based Server
StreamBlocks Server install on LAN providing higher availability

Whether LAN or Cloud based will depend on a number of factors. More importantly, as StreamBlocks has latency minimizing algorithms, it is possible to move functionality to the cloud that would have normally been difficult. For example, during the development of a robotic lawnmower, which was designed not to use boundary cabling, the processing for movement and edge detection was all done in the main server on the cloud. This was easily achieved by reducing the robotic lanmower to an input/output device with motors, and relocating all the computing power to the cloud. This approach allows for the use of complex software, such as artificial vision and neural networks for edge detection, all running remotely, rather than relying on embedded software, written in C or assembly language, destined for obsolescence with the next upgrade ! In addition, the ability to add extra functionality, such as object recognition can be done very easily, without the need for hardware upgrades. By reducing the local device to a wifi based input/output (I/O), significant progress can made with respect to service, installed costs and life cycle costs.

Robomower using cm accurate GPS/RTK without boundary cabling - controlled by StreamBlocks Server