2774
Power And Energy Optimization Strategies Of A
Wireless Sensor Network (WSN) For Two
Dimensional Spatio-Temporal Temperature
Profiling In Marine Environments
Diogenes Armando D. Pascua, Michael Lochinvar S. Abundo
Abstract— Energy consumption is one of the biggest constraints of the wireless sensor nodes deployed in marine environment. They are typically used for remote environment monitoring in areas where providing electrical power is difficult. Therefore, the devices need to be powered by batteries and alternative energy sources. Because battery energy is limited, the use of different techniques for energy saving is one of the hottest topics in Wireless Sensor Networks(WSNs.) Various battery optimization schemes have been developed both through hardware and software techniques. The ubiquity of Wireless Fidelity(Wi-Fi) based networks makes for a popular choice for establishing Wi-Fi based sensor networks but the relatively high-power requirements of these systems conflict with the requirement for long battery life and low maintenance. This work considers whether it is possible to reduce Wi-Fi power usage to the point where cheap Wi-Fi based products can be used instead of other protocols. The setup is composed of a wireless sensor which is based on the low cost esp8266 module tasked to gather temperature data in a marine protected area. Energy consumption was analyzed for the nodes at various states along the device firmware as well as the relationship between energy consumption against the rate of sensor data of transmission and system sleep period. The study also compares the energy usage of two network implementation: Message Que Telemetry Transport(MQTT) against Server-Client based system. Test results reveal that the sensor nodes can have a maximum battery life of 15.8 hours for both transmission methods, regardless of transmission rates, if no sleep period is implemented. Transmission rate have a profound effect on the systems battery life if sleep mode is implemented. It was found that battery life can increase up to 43 times for a transmission period of one hour and up to 40 times for a transmission period of one minute. An optimized WSN configuration utilizing MQTT transmission scheme proved to extend battery life more than that of the Server-Client scheme by up to 34 percent. From these analyses, the design of an optimal firmware and choice of network architecture can be derived where battery life can be extended in the longest possible time.
Index Terms— Wireless Sensor Network, Power Optimization, ESP8266, MQTT, Micropython. —————————— ——————————
1.
I
NTRODUCTIONWireless Sensor Network (WSN) is now largely used in the Internet of Things (IoT) systems to provide data. IoT consists of a huge number of devices, communication interfaces, and protocols. Therefore, synchronous and individual point-to-point communications are not enough to reach the wide variety of entities in IoT systems. And, WSN is expected to have abilities to share the sensor data across platforms and protocols with seamless integration and provide a ubiquitous environment to support smart environment in IoT System [1]. One proposed solution to overcome this problem is using publish/subscribe (pub/sub) interaction schemes with decoupling styles for the event generators and the subscribers [2]. The pub/sub interaction is able to be implemented in the IoT systems since it is suited with the IoT architecture that contains service layer, enterprise shared bus and message broker, communication, and the physical layer [3]. From the consumer’s point of view, two important areas of consideration for IoT devices are energy efficiency and cost. While Wi-Fi has until recently been significantly more expensive than 433 modules, new very low-cost Wi-Fi modules are becoming available which makes Wi-Fi cost effective in an IoT scenario. This paper therefore examines the remaining factor – power consumption. The idea
behind reducing power usage of IoT sensors and transmitters is, if the device can rely on its own batteries and be able to last a reasonable amount of time then the barrier of having to be near a power source would be removed, allowing greater flexibility and uptake. Wi-Fi is a relatively complex wireless protocol, but recently Wi-Fi modules have become available at low enough cost to facilitate their incorporation into IoT devices. This offers significant advantages as many homes now have Wi-Fi hotspots, and this combined with public access hotspots in city centers, hotels, and transportation means that Wi-Fi coverage is becoming ubiquitous. Using a Wi-Fi module means that the IoT device has direct connection to the Internet, and can for example use a web service without requiring a hub. This simplifies both deployment and software development. However, the complexity of Wi-Fi means that it is far less power efficient than other more specialized wireless technologies designed for sensors. While low power Wi-Fi is currently being standardized, the cheap Wi-Fi modules making low cost IoT devices possible use current Wi-Fi technology. Power consumption is a major constraint for IoT devices, since they are likely to have to depend on batteries. Some IoT devices can be powered from the mains, for example a smart power socket or central heating controller. It is interesting to note that commercial examples of such devices often already incorporate Wi-Fi modules. However, mobile IoT devices, such as remote controls or smart buttons, are powered from batteries and use alternative wireless technology such as Bluetooth LE or 433MHz, while Zigbee offers another alternative as a wireless protocol specifically designed for low power sensor applications. The ubiquity of Wi-Fi means that it has great customer acceptance and ease of deployment – most customers should simply have to switch it on within the home, rather than having to buy additional hub units. Therefore, if Wi-Fi based devices could have acceptable
_____________________________
• Diogenes Armando D. Pascua , Doctor of Engineering Student, School of Engineering, Doctor of Engineering, University of San Carlos -Technological Center, Cebu, Philippines and Faculty of Engineering, College of Engineering and Architecture, University of Science and Technology of Southern Philippines, Philippines, [email protected] • Michael Lochinvar S. Abundo, Programme Integration
2775
battery life and reduced cost they would be of interest for consumers. However, not much research has been done on Wi-Fi based IoT devices as Wi-Fi is generally considered to not be efficient enough in terms of power usage. For example, [7], [8] and [9] focused on the Zigbee or 433 MHz aspects. In addition to the ubiquity of Wi-Fi, it has other attractive features if the power problem can be solved. In many applications it has a longer range than alternative technologies, and with a complete Internet stack built in to the module, it offers a plug and play option for service deployment. This paper considers the optimization of power consumption of an IoT device using a cheap commercial Wi-Fi module to see if it is practical to use such a module for a battery-operated Wireless Sensor Network node for marine temperature acquisition. This work is part of an overall study in developing a wireless sensor network as applied for a marine protected area particularly in monitoring its environmental conditions. We envision to implement the use of appropriate IOT technology so as to come up with a robust marine network with appropriate real time response. We leverage the use of existing wireless network employing 802.11 a/b/g/n Wi-Fi routers and embedded clients as sensor node. This way, the setting up of the network is much easier since the infrastructure will require standard, proven and readily available equipment’s knowing the ubiquity of WIFI devices and network. We use the readily available internet protocol technology in data transmission in monitoring Marine Protected Areas particularly the two dimensional spatial and temporal temperature profiling of marine environments.
2.
W
I-F
IWi-Fi or Wireless Fidelity offers very high data rates - theoretically up to 600 Mbps for the most commonly used 802.11n version controlled by Wi-Fi Alliance. A number of different versions are available with different operating frequencies and throughputs. The most widely adopted version currently deployed is 802.11n, which is compatible with early devices, albeit at lower speeds. The latest commercially available version is 802.11ac, offering higher speeds, but also the ability to support older devices. While useful for broadband access within the home, in sensor networks, typical Wi-Fi data rates are rarely used to their full potential. However, ability to support roaming and send large amounts of information in bursts is ideal for many applications. Range varies on implementation but it can cover up to 200 meters [10]. HTTP is slow and the size of HTTP header is large which make it consume a lot of power.
3.
MESSAGE
QUE
TELEMETRY
TRANSPORT(MQTT)
MQ Telemetry Transport (MQTT)[11] was formerly developed by IBM and then released to the open source community. The latest standard for MQTT as of writing is version 3.1.1 and standardized by OASIS. MQTT operates based on publish-subscribe mechanism where a publish-subscriber publish-subscribes to a topic published by a publisher to the broker. To communicate, a publisher must first connect to the broker. After successful connection denoted by a reply from broker, the publisher must then register itself to the broker. After successful registration, the client publishes the topic and message to the broker. To end the session a disconnect packet is sent to the broker. If there are no disconnect packets or any packet received by the broker, the publisher will be regarded as disconnected after a
predefined time. Registration is only done once. Subsequent connection only needs a connect packet followed by the publish message. Whenever a publish message to a topic was sent, message will be sent to all subscribers of that particular topic by the broker. Communication between publishers and subscribers of a specific topic only occur through the broker. Hence peer to peer communication between subscriber and publisher in MQTT is impossible. For reliability, MQTT offered three types of modes which are called Quality of Service (QoS). QoS 0 mode sends a packet only one time without requiring confirmation messages or ACK. QoS 1 mode ensure that the message is delivered at least once by requiring an ACK. QoS 2 mode guarantee that the message is delivered exactly once. For MQTT, TCP is used for the transport protocol. This means that even though QoS 0 is used which does not require MQTT ACK responses, TCP still provide TCP ACK for every package sent. The micropython software for ESP8266 includes a client implementation in the umqtt module.
4.
RELATED
WORK
ON
ENERGY
OPTIMIZATION
WIRELES
SENSOR
NETWORKS
2776
power aspects of using each protocol in an IoT setting with experiments carried out with real world devices used in current products. Power savings techniques were also proposed. Based on these studies, this paper proposed the use of power cycling optimization scheme in the operation of the wireless sensor network.
5.
METHODOLOGY
A wireless sensor node is developed using an esp8266 Wi-Fi chip which obtains temperature reading from a ds18b20 temperature sensor. These sensors are powered by a 3800mAh Li-ion 18650 battery. A test rig is developed in order to measure the current consumption and monitor the supply voltage of the system as the microcontroller goes through the different phases. This system is depicted in figures 1 and 2. The power characteristics of the sensor node is generated through measuring the current consumption of node at the different phases of the operation. From these measurements, energy consumption was calculated based on the amount of time that the node passes through when sensor data is sent to the sink node. Python scripts were utilized to log durations in the different phases during one transmission cycle. From this time durations, projected battery life was calculated. Comparison test were done comparing the energy performance of two transmission network schemes: One is through an MQTT framework and the other through a Server Client scheme via request-response transport system. An investigation on the effect of the transmission delay to the energy consumption were done through monitoring power consumption as we program the microcontroller transmitting at different time interval. Two separate tests will be done, one using MQTT framework and the other using the client server scheme
Fig. 1. The test rig consisting of the sensor node, multimeter and oscilloscope for voltage and current measurements
Fig. 2. The sensor node and the test setup components
5.1 HARDWARE SYSTEM
Each of the sensor node consist of an ESP8266 Wi-Fi System on Chip (SOC) acting as the main controller. A DS18B20 digital temperature sensor is connected to the system for temperature measurements. A DS1307 Real time chip is connected to the microcontroller to provide real time to the system. The given time base will then be used as reference for node phases in each transmission cycle. The microcontroller is programmed in micro python with scripts to generate transmission cycles with time stamps embedded in each phase. These time phases were then recorded in log files stored in the flash memory of the microcontroller. A single cell 3800 mAH Li-ion battery powers the sensor node. A digital multimeter is inserted between the sensor node and the battery to monitor the current consumption in each phase of the transmission cycle. From these measurements, the power consumption was calculated per phase in each transmission cycle. The voltage of the battery is monitored through an oscilloscope to check for power sags and transients in the battery during transmission cycles. The system setup was depicted in Figure 2. In the actual deployment, the sensors were enclosed in water tight plastic containers which are mounted on top of buoy made up of PVC pipes. The temperature sensors were immersed under the waterline via waterproof cables. Power is taken from 3.7v 3600 mA Ultrafire 18650 size lithium ion battery. These batteries are then charged by a 5W solar panel via a charging circuit. Figure 3 below shows the sensor node in its plastic container and Figure 4 shows the buoy in actual deployment.
2777
Fig. 4. The sensor node on top of a PVC buoy as it was deployed in the actual marine environment
5.2EXPERIMENTAL DESIGN
The first phase of the experiment is done though the measurement of current consumption as the sensor node passes through one transmission cycle. One transmission cycle consists of the following phases:
1. Connection to the access point router- here sensor node connects to the appropriate WLAN access point router that provides the networking capability for the sensor network
2. Acquire Temperature Reading-at this phase the microcontroller acquires the temperature reading from the DS12b80 temperature sensor.
3. Send Temperature Data- at this phase, the gathered temperature data is sent to the network via either MQTT or Request-Respond system
4. System Deep Sleep-here the sensor enters sleep mode where all the microcontroller, other peripheral circuits and the CPU all are turned off.
5. Wait for timeout period-A programmable timeout period impressed in the firmware which is actually the time period interval between transmissions. At this phase the microcontroller is in sleep mode.
6. Wake Up- here the programmable timeout has elapsed and the system wakes up from the sleep mode and then connects to the access point router to begin a new transmission cycle.
The sensor node was programmed to perform the above transmission phases in a transmission cycle. Figure 5 shows the firmware block diagram
Fig. 5. General Sensor Node Firmware Flowchart
5.3 POWER MEASUREMENT AND ENERGY OPTIMIZATION
The current consumption in each phase of the transmission cycle is recorded though the multimeter. These measurements were reflected in Table 1. From these measurements, we arrive at the following formulas for power consumption and energy consumption.
TABLE1
POWER CHARACTERISTICS OF THE SENSOR NODES AT VARIOUS
STATES
(1)
(2)
Where: P-Power
Iin-Current input
Vs-supply voltage -time period (per phase)
The consumption in each phase was calculated based on the amount of time the microcontroller stays on that phase. Table 2 shows the time interval the where the system stays at a particular phase in the transmission cycle. From this we can calculate the theoretical energy consumption in each transmission cycle:
TABLE2
BATTERYLIFETIMEIMPROVEMENTSBETWEENMQTT ANDSERVERCLIENTMETHODATDIFFERENT
TRANSMISSIONPERIODS
20𝑚𝑠( ) + 10𝑚𝑠( ) +
15𝑚𝑠( ) + (3) Where:
-Energy consumption in one transmission cycle
-Power in Connecting state
-Power in getting temperature phase
-Power in transmitting temp data -Power in sleep state
2778
In the energy consumption equation, varies based on
the type of transmission protocol used. As stated in [15] the theoretical total energy that the battery can deliver:
3600𝐶 J (4)
=3600(3600m)(3.7V) = 47952 J
Where: 𝐶 -battery capacity, here it is 3600mAh
-Nominal battery voltage , here it is 3.7V
Fig 7. . The MQTT network transmission Scheme
Fig 8. The client server method of data transmission The values of the lifetime of the battery is simulated through the use of two different transmission method: one using MQTT and the Other one using Client Server method. Figure 7 depicts the MQTT method of transmission while Figure 8 depicts the client server method of transmission. In the MQTT implementation, the following parameters have been applied:
• MQTT payload is always less than 1 Kbyte
• MQTT Quality of Service is set to 0, that is no QoS is given by MQTT and the QoS relies only on TCP/IP • MQTT does not use authentication
• MQTT topic are not persistent
• The initiator publishes topic every 10 seconds • Self-recovery of lost connection is implemented
6
RESULTS
AND
DISCUSSIONS
Using equation 3 as a model for power consumption, a series of simulations where done to determine the effects of transmission period and sleep periods on the energy consumption in a per transmission cycle basis. Figure 9 shows the effect of transmission period on the energy consumption of the two transmission methods when no sleep period is employed. We can see that we have a linear relationship between energy consumption and transmission periods. It is safe to deduce that in this mode; energy consumption increases as we increase the transmission period. A negligible difference in energy consumption characteristics was exhibited between the two
modes of transmission. Figures 10 and 11 shows the behavior of the sensor nodes energy consumption when sleep mode is employed. From the two-transmission method, we can deduce a typical decrease in energy consumption per cycle of around of around six times when duty cycling is employed with the transmission period acting as the sleep interval. Using equation 5 as the model for the battery lifetime, we came up with the result that the battery’s lifetime is independent of the transmission period when no sleep mode is employed. Figure 12 shows that the battery lifetime, regardless of what transmission method utilized, is fairly constant at around 15.8 hours regardless of transmission period. When sleep mode is employed, a steep improvement in battery life was achieved notably at lower transmission periods. As the transmission period increases, the improvement in battery lifetime diminishes and approaches the value of 680 hours (28 days). Maximum battery lifetime improvement occurs at around 200 s transmission period with improvement values of around 43.03 times. In between the two modes of transmission, MQTT has a more improved battery lifetime compared to client server method. Table 3 shows the values of percentage battery lifetime improvement between the two method at different transmission intervals.
Fig 9. Comparison of MQTT vs Client-Server methods energy consumption per cycle without sleep period as plotted against transmission period
2779
Fig 11. Comparison of Server-Client method of transmission’s energy consumption per cycle with and without sleep period as plotted against transmission period
Fig 12. Comparison of battery life for the two transmission methods without sleep periods
Fig 13. Comparison of battery life for the two transmission methods with sleep periods
7
CONCLUSION
We have established that through the use of duty cycling, an improvement in battery life can be achieved as high as 48 times though the combination of variable sleep mode interval and transmission period. When no sleep mode is utilized, the sensor battery lifetime can have a maximum duration of around 15 hours regardless of the transmission cycle period. The independence of the battery lifetime without sleep mode is attributed to the fact that the node consumes same amount of energy during non-transmission. Through the employment of sleep modes, a significant increase in battery lifetime is achieved with up to 48 times compared to non-duty cycled transmission. This is attributed to that fact that power consumption in sleep mode is around 6.78 percent of those in idle mode. Simulation reveal a maximum battery lifetime of 28.3 days at lower transmission rates effectively increasing the idle time. Test results reveal MQTT transmission can have an improvement in battery life compared to Server-Client method of up to 34 percent at an optimized
transmission period of 30 seconds. An optimized WSN configuration utilizing MQTT transmission scheme proved to extend battery life more than that of the Server-Client scheme by up to 34 percent at an optimized transmission period of 30 seconds. It can be deduced that the design of an optimal firmware and choice of network architecture greatly improves the system where battery life can be extended in the longest possible time
R
EFERENCES[1] J. Gubbi, R. Buyya, S. Marusic, M. Palaniswami, "Internet of Things (IoT): A vision, architectural elements, and future directions‖, Future Generation Computer Systems, vol. 29, pp. 1645-1660, 2013.
[2] P. T. Eugster, P. A. Felber, R. Guerraoui, A.-M. Kermarrec, "The Many Faces of Publish/Subscribe," ACM Computing Surveys, vol. 35, no. 2, pp. 114-131, 2003.
[3] R. Buya, A. V. Dastjerdi, Internet of Things Principles and
Paradigm, Cambridge: Morgan Kaufmann, 2016.
[4] T. Levä, M. Oleksiy, S. Henna, "Comparing the cost-efficiency of CoAP and HTTP in Web of Things applications." Decision Support Systems, vol 63, pp. 23-38.,2014.
[5] N. De Caro,W. Colitti,, K. Steenhaut, G. Mangino,G. Reali, ―Comparison of two lightweight protocols for smartphone-based sensing‖ Proc 2013 IEEE 20th Symposium on Communications and Vehicular Technology, pp. 1-6,2013.
[6] D. Thomas, R. McPherson,G. Paul, J. Irvine,‖Optimizing Power Consumption of Wi-Fi for IoT Devices: An MSP430 processor and an ESP-03 chip provide a power-efficient solution.‖, IEEE Consumer Electronics Magazine, vol , no 4., pp.92-100, Sept 2016.
[7] D. Yan,D. Zhiguang,. "ZigBee-based Smart Home system design." Proc 2010 3rd International Conference on Advanced Computer Theory and Engineering (ICACTE), pp V2-650, 2010. [8] A. Dementyev, S. Hodges, S. Taylor,J. Smith, ―Power consumption analysis of Bluetooth Low Energy, ZigBee and ANT sensor nodes in a cyclic sleep scenario.‖ Proc 2013 IEEE International Wireless Symposium (IWS), pp. 1-4,2013
[9] M.D. Prieto, B. Martínez,, M. Monton, I.V. Guillen,X.V. Guillen, J.A. Moreno,‖Balancing power consumption in IoT devices by using variable packet size‖, Proc 2014 Eighth International Conference on Complex, Intelligent and Software Intensive Systems, pp. 170-176, Jul 2014. [10]C. Perera, P. Jayaraman, A. Zaslavsky, P. Christen, D.
Georgakopoulos, ―Dynamic configuration of sensors using mobile sensor hub in internet of things paradigm.”, Proc in 2013 IEEE Eighth International Conference on Intelligent Sensors, Sensor Networks and Information Processing
,pp. 473-478, Apr 2013
[11]―Message Queue Telemetry Transport, MQTT‖, http://mqtt.org, 2017.
[12]J.A. Khan, K.Q. Hassaan, I. Adnan, "Energy management in wireless sensor networks: A survey." Computers & Electrical Engineering, vol 41,pp. 159-176,2015
[13]V. Singh, M. Singh. "A survey of optimizing energy utilization in wireless sensor network using duty cycle approach.",International Journal of Advanced Research in Computer Science, vol 7, no. 3,pp 202-205, 2016
2780 Conference on Ph. D. Research in Microelectronics and
Electronics (PRIME),pp. 1-4,Jun 2016.
[15]―How to Calculate Battery Run-Time When Design Equipment Using Batteries; Battery Technical Resources for Design Engineers from PowerStream‖,
http://www.powerstream.com/battery-capacity-calculations.htm.,2018
[16]―UltraFire 18650 3.7V 3600mAh Rechargeable Lithium Batteries Without Protection‖, http://www.ultrafire.com/Batteries-c854/UltraFire-18650- 3.7V-3600mAh-Rechargeable-Lithium-Batteries-Without-Protection-Black- -White-(2PCS).htm,2018