How minimising IoT power consumption can be a matter of protocol choice
By Björn Rosqvist, Chief Product Officer at Qoitech
The continued drive to reduce the power consumption of IoT devices continues to focus on hardware, yet often is it firmware and software strategies and choices that can have the most significant impact. The communications layer in the IoT stack is a prime example. Your choice of IoT stack can have a dramatic impact on power consumption and hence on battery life or energy harvesting requirements for IoT devices.
The choice of IoT stack is, like many things in electronic design, a trade-off. In this case, power consumption can only be reduced to the extent that it does not compromise speed, reliability, or security.
User datagram protocol (UDP) or transmission control protocol (TCP) are the most used for sending data.
In contrast to just sending a stream of pure data, UDP permits many user processes to be used, with data packets directed to the right destination by the port number in each UDP packet. However, UDP is connectionless, which means that it doesn’t set up a connection before transmission and it doesn’t check whether a data packet has reached its destination successfully so can’t guarantee that it arrived intact. That said, UDP is fast and efficient.
TCP has a higher communication overhead, and hence higher power consumption, but guarantees the delivery of each packet through a unique identifier and a sequence number that lets the receiver identify which packet was received and which is arriving next. It’s not as fast at UDP but it is more secure and lost packets are automatically resent.
On top of TCP, there may be higher-level protocols such as MQQT, a standard IoT messaging protocol, and HTTP, an application layer protocol for data transfer between networked devices. Each of these adds to device power consumption and piling on security protocols, an increasingly necessary requirement, makes additional power demands.
Fig 1: IoT protocol examples
A case study example: the smart utility meter
A popular narrow-band IoT (NB-IoT) wireless module for this application is the Thales Cinterion ENS22. For the smart meter example, we assume that the module needs to transmit the same 40 bytes of data repeatedly. The data includes an identification number, a timestamp, and a counter number. We measure the energy consumption (power x time) from when the socket is open to when the module is ready to go back to sleep. Our measurement tool is the Otii Arc Pro, an integrated DC energy analyzer, power profiler, smart power supply, digital multimeter, source measure unit, and power debugger.
Running the UDP protocol, the power consumption is 453 µWh but simply changing this to TCP nearly doubles the power requirement, taking it up to 858 µWh.
Fig 2: Power consumption of a UDP protocol resulting in 453 uWh (Otii Arc Pro)
Fig 3: Power consumption of a TCP protocol resulting in 858 uWh (Otii Arc Pro)
In this example, adding MQTT and HTTP protocols has a similar impact on power consumption and there are further increases when adding security protocols, such as Datagram Transport Layer Security (DTLS) for UDP and Transport Layer Security (TLS) for TCP. See Table 1.
Table 1: Protocol comparison based on measured energy consumption
Pre-shared key (PSK) security protocols offer better energy efficiency than those that adopt a Public Key Infrastructure (PKI) because the keys are already known at both sides of the link, so don't add to the data transmission overhead.
How non-IP UDP networking can cut power consumption
In certain scenarios, UDP packets can be sent directly between devices without the need for traditional IP routing. This non-IP option consumes the least power, and the network terminates the mobile operator’s server from which it can then be accessed via a web interface or a gateway. Non-IP networking (NIN) is a low-latency option that can be implemented incrementally as networks are expanded and although the technology is not dependent on IP packet formats or protocols, it supports the TCP/IP suite of protocols.
Conclusion
Protocol choice is a critical consideration when you need to save energy. Where it’s possible, particularly for new installations, consider if you can implement NIN to save energy and reduce latency. Where you need an IP-based technology, opt for UDP over TCP when you can, and finally, avoid PKI-based security measures when other options provide sufficient security for your application. In short, the simpler your network protocols, the more energy you can save.