• No results found

Properties of Energy Planners for Energy-Harvesting IoT Devices

N/A
N/A
Protected

Academic year: 2022

Share "Properties of Energy Planners for Energy-Harvesting IoT Devices"

Copied!
75
0
0

Laster.... (Se fulltekst nå)

Fulltekst

(1)

Properties of Energy Planners for Energy-Harvesting IoT Devices

June 2021

Master's thesis

Master's thesis

Carl Erik Koltveit

2021Carl Erik Koltveit NTNU Norwegian University of Science and Technology Faculty of Information Technology and Electrical Engineering Department of Information Security and Communication Technology

(2)
(3)

Properties of Energy Planners for Energy-Harvesting IoT Devices

Carl Erik Koltveit

Master of Science in Communication Technology Submission date: June 2021

Supervisor: Frank Alexander Kraemer Co-supervisor: Hafiz Areeb Asad

Norwegian University of Science and Technology

Department of Information Security and Communication Technology

(4)
(5)

Properties of Energy Planners for Energy- Harvesting IoT Devices

Carl Erik Koltveit

Submission date: June 2021

Supervisor: Frank Alexander Kraemer, IIK Co-supervisor: Hafiz Areeb Asad, IIK

NTNU – Norwegian University of Science and Technology

Department of Information Security and Communication Technology

(6)
(7)

Title: Properties of Energy Planners for Energy-Harvesting IoT Devices Student: Carl Erik Koltveit

Problem description:

It is predicted that the density of connected devices will increase significantly over the coming years. These connected devices may be spatially deployed in remote areas and communicate wirelessly. Powering these devices may be done through an energy buffer, such as batteries. This does, however, introduce an energy constraint and requires the devices to use available energy wisely, as batteries only hold a finite capacity. A step towards maintenance-free and sustainable systems would see the devices in an outdoor IoT system fitted with a small solar panel.

In this project, we want to explore the value of energy planning algorithms and investigate in which use cases we can achieve gains in overall performance and efficiency by planning a devices energy levels in advance. We will need to investigate algorithms that manage energy and use cases for which to apply said algorithm. The value of predicting harvestable energy and defining a devices consumption accordingly, is a sustainable, maintenance-free, long-term IoT system with maximized utility.

Date approved: 2021-02-17

Supervisor: Frank Alexander Kraemer, IIK Cosupervisor: Hafiz Areeb Asad, IIK

(8)
(9)

Abstract

Fitting devices in an outdoor IoT system with an energy harvester, such as a small solar panel, would enable remote sensing devices to recharge their buffers autonomously. Recharging depleted buffers without human interaction increases sustainability and allows for a higher degree of long- term, maintenance-free operation. However, periods without an energy source may still arise.

In this thesis, we want to gain knowledge about the effects of imple- menting remote IoT devices with an algorithm that plans consumption ahead of deployment. To gain this knowledge, we research energy plan- ning algorithms and how to apply them in a real-world use case. We chose to focus our efforts on one state-of-the-art algorithm. The chosen algorithm, Stochastic Power Management (SPM), uses historical weather data to construct statistical energy models. These models of expected energy are constructed to perform statistical analysis and compute the algorithm’s output properties. The algorithm’s objectives are to minimize the risk of failure and increase utility by leveraging any potential energy surplus. The first output property to meet the objectives is the Maxi- mized Minimum Consumption, which serves as the minimum service level to ensure uninterrupted operation. The second output property is the weekly Safe Charges which define thresholds throughout the time horizon.

During run-time, the actual battery level for a given week is compared against the respective safe charge to adjust consumption. Should the actual battery level be higher than the pre-computed threshold, we define it as an energy surplus and increase consumption accordingly. If no energy surplus is defined, the device falls back to the minimum consumption.

After understanding the algorithm, we wanted to know which use cases the algorithm’s output properties may be suitable for. The main findings show that for use cases that prioritize availability, the algorithm’s minimum service level is applicable. The safe charges, however, are more case dependent. Different use cases require operation in different periods (e.g. winter, summer) where we can expect different amounts of solar energy. Should the use case require a higher degree of utility in a period with less solar energy, it would be unlikely to increase consumption using the safe charges.

(10)
(11)

Sammendrag

Monteringen av et lite solcellepanel på kommuniserenede enheter i et utendørs IoT-system, ville gjort det mulig for fjerntliggende sensorenhe- ter å lade energi bufferne selvstendig. Å lade opp tomme buffere uten menneskelig interaksjon øker bærekraftighet og gir en høyere grad av langvarig, vedlikeholdsfri drift. Til tross kan perioder uten energikilde fremdeles oppstå.

I denne oppgaven ønsker vi å få kunnskap om effekten av å implemen- tere fjerntliggende IoT-enheter med en algoritme som planlegger forbruk på forhånd. For å få denne kunnskapen undersøker vi energi-planleggings algoritmer og hvordan vi kan bruke dem i en IoT-applikasjon. Vi valgte å fokusere tiden på en algoritme. Den valgte algoritmen SPM bruker historiske værdata for å konstruere statistiske energimodeller. Disse mo- dellene av forventet energi brukes deretter til å utføre statistisk analyse og beregne algoritmens outputs. Algoritmen har som mål å minimere risikoen for feil og øke bruken ved å utnytte potensielt energioverskudd.

Den første egenskapen for å oppfylle målene er Maximized Minimum Consumption, som fungerer som minimum servicenivå for å sikre uav- brutt drift. Den andre egenskapen er de ukentlige Safe Charges som definerer terskler gjennom tidshorisonten. I løpetid sammenlignes det faktiske batterinivået for en gitt uke med den respektive safe charge for å justere forbruket. Skulle det faktiske batterinivået være høyere enn den forhåndsberegnede terskelen, definerer vi det som et energioverskudd og øker forbruket tilsvarende. Hvis det ikke er definert noe energioverskudd, faller enheten tilbake til minimumsforbruket.

Etter å ha forstått algoritmen bedre, ønsket vi å vite hvilke brukstil- feller algoritmens egenskaper kan være best egnet for. Hovedfunnene viser at algoritmens minimumsnivå er hensiktsmessig for brukstilfeller som prioriterer tilgjengelighet. Safe Charges er imidlertid mer avhengig av applikasjonen. Ulike brukstilfeller krever drift i forskjellige perioder (f.eks.

vinter, sommer) der vi kan forvente forskjellige mengder solenergi. Skulle brukstilfelle kreve høyere bruksgrad i en periode med mindre solenergi, ville det vært lite sannsynlig å kunne øke forbruket ved bruk av disse forhåndsberegnede terskelene.

(12)
(13)

Preface

As the final requirement of my 2-year MSc in Communication Tech- nology at the Department of Information Security and Communication Technology (IIK) at the Norwegian University of Science and Technology (NTNU), this thesis is submitted. The work was performed between January and June 2021.

Choosing this project for my thesis was an easy decision as my interest in IoT and renewable energy is sizeable. Learning more about this field was exciting and fulfilling. Studying during a global pandemic was challenging, my motivation saw ups and downs, as I’m sure holds true for most. In the end, I am pleased with the work I was able to do throughout this semester and proud to conclude my final year of a long and challenging education.

First and foremost, I would like to thank my supervisor Frank Kraemer.

Throughout this semester and work, his guidance, expertise, and support have been indispensable. But, most importantly, his enthusiasm towards this work contributed to my motivation and, ultimately, the finalized thesis.

I would also like to give a special thanks to my family and friends for lifting me up and being there in times of need. This timely process would not have been possible without their support.

Carl Erik Koltveit June 2021

(14)

Contents

List of Figures viii

List of Tables ix

List of Algorithms xi

List of Acronyms xiii

1 Introduction 1

1.1 Motivation . . . 1

1.2 Research goals . . . 3

1.3 Contributions . . . 3

1.4 Structure . . . 3

2 Background and Related Work 5 2.1 Internet of Things . . . 5

2.1.1 LPWAN . . . 6

2.2 Solar Harvesting Embedded Systems . . . 7

2.2.1 Solar Power Forecast/Predictions . . . 7

2.3 Power Management Algorithms . . . 9

2.3.1 Dynamic Power Management . . . 10

3 Methodology 13 3.1 Design Science . . . 13

3.1.1 Design cycle . . . 15

4 Investigating and Testing the Algorithm’s Properties 19 4.1 Offline phase . . . 19

4.2 Online phase . . . 21

4.3 Preliminary results . . . 23

5 Researching Use Cases to Apply the Algorithm 25 5.1 Use Case 1: Road Condition Monitoring . . . 26 vi

(15)

5.2 Use Case 2: Environmental Monitoring . . . 27 5.3 Use Case 3: Precision Agriculture . . . 28

6 Results Obtained from Simulations 31

6.1 Simulations using solar data from Tokyo . . . 31 6.2 Simulations using solar data from Michigan . . . 36

7 Discussion and Future Work 39

7.1 Increasing performance of energy-harvesting devices . . . 39 7.2 Applying the algorithm in a use cases . . . 40 7.3 Conclusion and Future Work . . . 43

References 47

Appendices

A Chap 1 51

B Chap 2 53

(16)

List of Figures

2.1 Comparison of radio communication technologies . . . 6

2.2 Solar elevation with increasing latitude . . . 8

2.3 Historical harvest data and solar elevation . . . 9

2.4 Comparison of different DPM schemes . . . 11

3.1 Framework for Design Science . . . 14

3.2 The Engineering Cycle . . . 15

4.1 Harvested solar power Michigan, USA (1998-2009). . . 20

4.2 Weekly mean solar power Michigan, USA (1998-2009). . . 23

4.3 Safe charges for the Michigan dataset . . . 23

4.4 Simulation without surplus scaling: w=1 . . . . 24

4.5 Simulation with surplus scaling: w=2 . . . 24

5.1 Freezing-Rain and Ice Detector - 0871LH1 [Cam]. . . 26

5.2 Libelium Waspmote Plug & Sense! [Libd] . . . 27

5.3 Arable Mark 2 . . . 29

5.4 The Agricultural Cycle . . . 30

6.1 Simulation without planner, Tokyo dataset (2010) . . . 32

6.2 Simulation without planner, Tokyo dataset (2011) . . . 32

6.3 Simulation with SPM planner (2010) . . . 33

6.4 Simulation with AstroPM planner (2010) . . . 34

6.5 Simulation with SPM planner (2011) . . . 34

6.6 Simulation with AstroPM planner (2011) . . . 34

6.7 Safe charges - Tokyo (2010-2011) . . . 35

6.8 Weekly models from Tokyo dataset . . . 36

6.9 Simulations with SPM, Michigan data . . . 37

6.10 Simulations with AstroPM, Michigan data . . . 37

7.1 An abstract model of the energy consumption . . . 44

viii

(17)

List of Tables

5.1 Sensing consumption of different sensors. . . 28 5.2 Transmission consumption of different communication protocols. . . 28

ix

(18)
(19)

List of Algorithms

4.1 SPM Offline phase [ABD+19] . . . 21 4.2 SPM Online phase [ABD+19] . . . 22

xi

(20)
(21)

List of Acronyms

AstroPM Astronomical Power Management.

CV Clairvoyant.

DPM Dynamic Power-Management.

ENO Energy Neutral Operation.

ENO-MAX Energy Neutral Operation with Maximal energy efficiency.

EWMA Exponentially Weighted Moving Average.

IoT Internet of things.

LoRa Long Range.

LPWAN Low Power Wide Area Network.

LQT Linear Quadratic Tracking.

LT-ENO Long-Term Energy Neutral Operation.

NB-IoT Narrowband-IoT.

OFDMA Orthogonal Frequency Division Multiple Access.

SC-FDMA Single Carrier-Frequency Division Multiple Access.

SPM Stochastic Power Management.

WCMA Weighted Condition Moving Average.

xiii

(22)

Chapter

1

Introduction

1.1 Motivation

As the density of connected device steadily increases, so does the supporting Internet of things (IoT) technologies. New radio technologies have been developed to enable wide- area transmissions and ensuring consumption complies with the power constraints on devices with a finite energy source. This development has enabled small devices to have a lifespan of several years. The devices in question are monitoring sensors used in different applications to make measurements, record conditions and transmit this data to a centralized server. Low Power Wide Area Network (LPWAN) can be considered a breakthrough in monitoring applications by allowing remote networks to transmit data over kilometres while consuming a relatively small amount of energy [MM19]. Assuming nodes are located in remote locations and spatial dispersed, they need to be supplied with power from a harvestable source (e.g. solar, mechanical, thermal) or an energy storage/buffer, such as batteries.

We assume a remote communicating device is fitted with an energy harvester.

Without a buffer, a senors operation solely depends on a steady supply of energy from the harvestable source. Solely operating on harvested energy can be a viable option and might serve the purpose of the sensor application well in some cases where guaranteed continuous operation is not of high importance. In other cases where we value continuous monitoring with regular intervals, an energy buffer in the form of batteries or supercapacitors would be more suitable. However, should the energy buffer be depleted, it would require physical maintenance in battery replacements or waiting for batteries to recharge.

For this project, we are interested in a device with an energy harvester and buffer.

If the battery is depleted, the sensor can recharge by harvesting an energy source. If we are heading towards a period with low harvestable energy, the sensor can draw from its buffer to get through this period. This project assumes a monitoring sensor can harvest solar energy through a small solar panel and store it in the buffer. We 1

(23)

2 1. INTRODUCTION

also wish to take advantage of periods of energy surplus. Meaning if the battery is full and energy is available to harvest, the sensor can increase its utility and make other operations that might require excess energy. Since we are interested in solar energy for this project, we know that this energy source is highly seasonal. As we move further away from the equator, we experience the more significant effects of seasonal changes. Depending on the season, days have shorter or longer periods of daylight.

Furthermore, this change in expected solar energy also means the energy required in the buffer or the State of Charge (SoC) changes based on seasons. Intuitively, when we expect much incoming energy, our buffer only requires to hold a small amount of charge since the operation can be supported more or less solely through the harvestable source. When we do not expect to harvest much solar energy, our buffer needs to be significant to make it through this period.

Since we want to limit the possibility of failure and take advantage of energy surplus and reduce the amount of energy wasted, we introduce the SPM algorithm and the concept of safe charges as proposed by Rehan Ahmed in his study [ABD+19]. The SPM algorithm takes advantage of historical weather data to construct statistical energy models, which are used to perform statistical analysis and compute the algorithm’s output properties. safe charges are pre-computed thresholds of the battery level to compare the actual battery level against in run-time. The consumption may be adjusted based on the difference in the computed battery level and the actual battery level. safe charges make it possible to take advantage of the fact that the buffer size required changes with the amount of harvestable solar energy over time. Any charge above this variable buffer size can be regarded as excess energy.

Computing these thresholds allows us to use any excess energy while still ensuring the sensor does not encounter any failures due to depleted batteries. Thus, the safe charges serve as a guideline for our devices consumption and are the main topic for this project.

For example, say we want consumption to be updated weekly. We then define 52 safe charges over the calendar year. Suppose the current battery level in a given week is higher than our pre-defined safe charge. It means we have an energy surplus and can increase consumption following the surplus. In later chapters, we will discuss how these safe charges are computed.

The next we want to investigate is how to apply the output properties of the algorithm in a real world scenario. IoT use cases may require operation in different periods with different amount of harvestable energy. So the safe charges may not be suitable for every application.

(24)

1.2. RESEARCH GOALS 3

1.2 Research goals

For this thesis and through the research, we want to investigate how power man- agement algorithms can increase system performance. More precisely, investigate how the power management algorithm minimizes the risk of failures due to depleted batteries and how it minimizes wasted energy. In addition to understanding the performance gains, we want to understand if one algorithm could work for several use cases. Different use cases have different requirements. When operation of the device is needed, how often measurements are taken and how much power the device’s sensing draws are questions we are interested in when finding an appropriate use case.

RQ1: How can power management algorithms increase performance in energy- harvesting IoT systems using battery-constrained devices?

RQ2: What are the use case characteristics, in order to utilize the particular algorithm?

1.3 Contributions

In this work, we investigate a state-of-the-art power management algorithm for energy constricted devices. The contribution of this thesis is the insight into which applications the algorithm could best serve its purpose. Simulations of an environment with a battery constricted device were performed to gain results. This meant setting a configuration for the device, i.e. battery capacity, energy per cycle, location and ensuring the algorithm runs correctly and computes correct values for a given configuration. This implementation in a more dynamic and detailed framework could also be considered a contribution.

1.4 Structure

The thesis is structured into seven chapters, including the introduction. The remain- der of the thesis is structured as follows:

– Chapter 2 Background and Related Work introduces main concepts to better understand the thesis and previous work done in this field, mainly the chosen algorithm.

– Chapter 3 Methodology presents the design science including the design cycle of the project.

– Chapter 4 Preliminary SPM Testing further presents the chosen algorithm.

This chapter also addresses the initial testing through simulations.

(25)

4 1. INTRODUCTION

– Chapter 5 Use Cases discusses suitable applications for the chosen algorithm.

– Chapter 6 Experiments and Results presents the final simulation results in a new and more detailed simulation environment.

– Chapter 7 Discussion And Future Work addresses the final thoughts and where this work could be taken further.

(26)

Chapter

2

Background and Related Work

This chapter introduces key ideas and concepts needed to understand power man- agement in an energy harvesting embedded system. Some IoT systems may operate and rely entirely on energy harvesting, such as solar energy. It is, however, highly dependent on where the system is located and for what purpose. Therefore, solar power predictions and their accuracy are essential to improve systems performance and enable uninterrupted long-term operation. This chapter introduces the sea- sonal factor of solar energy and the difficulties of predicting harvestable solar power.

We also discuss power management algorithms and finally introduce the algorithm researched in this project.

2.1 Internet of Things

The Internet of things is a system consisting of interconnected computing devices with the capability to send information over a network without the need for human interaction [Ale]. A thing can be any object such as heart monitors in humans, microchip implants in animals or thermostats in buildings. As long as it can be assigned an IP address, it contributes to the Internet of things. These devices are becoming more common in our surroundings. Moreover, the growth is expected to keep increasing over the coming years. A significant factor in this growth is that Broadband Internet is becoming more widely accessible, and the cost of connectivity is decreasing [JAc]. We established that a device connected to the Internet could be considered IoT. Systems consisting of household appliances and sensors in smart buildings are connected to a power grid, so these devices are not of interest in this project. What we are interested in are remote devices that need an alternative energy source, such as batteries. The consumption of these remote devices is now constrained to their battery capacity and need to be wise both in transmitting and sensing.

IoT application has a set of requirements, i.e. range, data rate, energy con- 5

(27)

6 2. BACKGROUND AND RELATED WORK

sumption, and cost [MBCM19]. Some applications might only require short-range communication using radio technologies like Zigbee and Bluetooth. Should the applications need longer transmission ranges, cellular communication solutions exist using the reliable 2G, 3G and 4G. However, these radio technologies are not designed for these types of devices and consume large amounts of energy from the device. A new wireless communication technology emerged to meet the requirements of IoT devices and combat the energy limitation while enabling long-range transmissions;

Low Power Wide Area Network (LPWAN).

Figure 2.1: Comparison of radio communication technologies [MBCM19]

2.1.1 LPWAN

With the emergence of LPWAN, low-power, long-range and low-cost communication was enabled. With up to 15 km transmission distances in rural areas and 1-5 km in urban areas [BEH]. Moreover, energy efficiency has increased drastically, enabling 10+ years of battery life depending on the application. These characteristics make LPWAN highly suitable for applications that only need to transmit small amounts of data over long distances, i.e. remote devices. Several LPWAN technologies have been developed, some operating in the licensed frequency spectrum, e.g. Narrowband- IoT (NB-IoT) and some operating in unlicensed frequency bands, e.g. Long Range (LoRa).

To reduce and conserve energy consumed, end-devices in NB-IoT and LoRa are in sleep mode and only woken up when making measurements or transmitting the collected data. NB-IoT offers synchronous communication and QoS handling, which might require a higher peak current from the end devices. In addition NB- IoT uses Orthogonal Frequency Division Multiple Access (OFDMA) modulation

(28)

2.2. SOLAR HARVESTING EMBEDDED SYSTEMS 7

in downlink, and Single Carrier-Frequency Division Multiple Access (SC-FDMA) in uplink communication [I-S], reducing the lifetime of end devices using NB-IoT additionally. However, NB-IoT is advantageous over LoRa, for an application that requires low latency. Should an application insensitive to latency and send only small data transmission, a radio technology such as LoRa might be the best option of these two LPWAN technologies.

2.2 Solar Harvesting Embedded Systems

Advancements in IoT technologies have made it feasible for continuous observation of various processes, i.e. agriculture, industrial and environmental monitoring. As the number of sensor networks and the need for sustainability increase, the idea of powering remote nodes through both an energy harvester and energy storage may very well be a helpful solution. Outdoor systems using sensors with a small solar panel and an energy buffer to store harvested energy would increase the systems up-time in theory. In addition, it would become more autonomous since the need for maintenance due to depleted batteries would be reduced. However, due to the weather being highly varied and dynamic, these sensors might experience unwanted downtime if there occurs a long period with no solar energy.

The ultimate goal of energy harvesting embedded systems is to enable uninter- rupted operation in the order of years. This topic has already received some attention, and research has resulted in several power management algorithms, each with a set of strengths and drawbacks.

2.2.1 Solar Power Forecast/Predictions

While weather forecast has improved over the last years, we know that meteorologist get the forecast wrong, especially long term weather forecasts. It would, of course, be ideal to know precisely how much energy the system would be able to harvest over a time interval to manage power in an embedded harvesting system. While this is unfortunately not possible, we can use different methods to predict solar forecasts more accurately.

This section introduced the seasonal factor. Due to the earth’s rotation around the sun, how we perceive the sun from the earth is affected. When predicting solar power, parameters from the sun, i.e. its elevation and movement across the sky at any given point in time, are quite predictable. The difficulty lies in accurately predicting clouds movement and thickness. There exist three main categories for predicting solar power; Statistical predictions, satellite imagery predictions and numerical weather predictions [Nic]. The most advanced of these being the numerical weather predictions which can accurately predict hours to days ahead. Its drawback

(29)

8 2. BACKGROUND AND RELATED WORK

is that number-crunching all these atmospheric values requires much computational power. Satellite imagery is the only method with any information of where the clouds are located and their movement. This method can produce results some hours ahead.

Seasonal factor

Seasons are well-known phenomena. Due to the tilt on the earth’s axis and its rotation around the sun, a given geographical location experiences temperature changes due to an increase or decrease of direct sunlight. These changes in temperature and hours of daylight have made us divide the calendar year into four divisions. As the earth rotates around the sun, the northern hemisphere has more direct sunlight and longer daylight hours during June (summer solstice) than December (winter solstice) and the opposite for the southern hemisphere. This cyclic effect increases as we move further away from the equator. So as we move further from the equator, our required buffer size increases since the periods with low solar energy are longer, and the operation of a device is more dependant on the amount of energy stored in its reserves. Figure 2.2 shows the changes in the suns elevation as we move further away from the equator and the latitude increases, while on the equator, i.e. 0°, the variation is not as significant.

Figure 2.2: Solar elevation with increasing latitude

Figure 2.2 shows the suns elevation over the horizon as a factor throughout a calendar year. This factor is the weekly elevation sum divided by the yearly elevation sum. The values are clipped at 0, so only positive elevation values are summed. The longitude is the same (0 degrees), and we increase the latitude by 10 degrees until finally reaching 90 degrees which is the maximum.

(30)

2.3. POWER MANAGEMENT ALGORITHMS 9

Figure 2.3: Historical harvest data and solar elevation

Figure 2.3 shows the correlation between the suns elevation and harvested energy.

The harvested energy plot shows the weekly mean harvested in Michigan (USA) from 1998-2009. Furthermore, the elevation plot shows the elevation factor for 43°

latitude, which corresponds to Michigan’s latitude coordinate. Thus, we see the actual harvested energy model follows the curve as the elevation factor with some variance due to these unforeseen cloudy periods.

2.3 Power Management Algorithms

Algorithms to manage power in energy-constrained devices are needed to make the systems or devices where they are deployed truly autonomous and minimize the risk of encountering a failed state due to depleted energy reserves. Simply fitting a remote IoT device with a solar panel makes for a more autonomous device, as it can recharge itself without the need for human interaction. In addition, the development in wireless communication technologies such as LPWAN technologies that meet the requirements of low power consumption might be more than enough for some applications. We now have the low power consumption of the LPWAN technology that enables battery life in the order of years and a small solar panel to recharge batteries, enabling an even greater order of battery life.

There still is a point in managing power, however. By assessing the ambient energy, we could take advantage of an energy surplus and increase the consumption of the device. By either increasing the sensing frequency, how often data is transmitted or some other operation that draws power from the device. It is all highly dependent on the application in question, as we will discuss further in the thesis. Managing power consumption would also have the potential to increase the battery life of devices even further. Different applications have different requirements, hence fitting

(31)

10 2. BACKGROUND AND RELATED WORK

a device with an energy harvester (i.e. solar panel) in an energy-efficient network (i.e. LPWAN network) does not solely guarantee years worth of lifetime.

2.3.1 Dynamic Power Management

Power management for IoT end devices is a topic already researched for some years.

The research resulted in various schemes for power management algorithms that try to plan the consumption of an energy constricted device. The first Dynamic Power-Management (DPM) scheme for solar harvesting devices was proposed back in 2007 [KHZS07]. In this work Energy Neutral Operation (ENO) was defined as the fundamental limit of power management in energy harvesting systems. Achieving ENO means the system consumes energy equal to the amount it harvests over a time period.

The approach of the proposed algorithm in Reference [KHZS07], was to discretize days into slots of an equal time period. The expected harvested energy for each time period is gained through an Exponentially Weighted Moving Average (EWMA) filter.

The mismatch of expected harvested energy and actual harvested energy are then used to adapt the duty cycle dynamically.

Weighted Condition Moving Average (WCMA) in Reference [RPBASR09], en- hances the weather prediction by incorporating current weather conditions into the expected harvested energy, improving prediction accuracy over EWMA.

Energy Neutral Operation with Maximal energy efficiency (ENO-MAX) is a proposed algorithm scheme that approaches DPM differently. This model-free scheme uses Linear Quadratic Tracking (LQT) to adjust the duty cycle dynamically based on the battery charge, presented in Reference [VGB07]. This approach shows improved mean duty cycle and reduced duty cycle variance, which translates to better performance than EWMA.

Long-Term Energy Neutral Operation (LT-ENO) is an approach to ensure long- term interrupted operation, presented in Reference [BSBT14]. The LT-ENO scheme manages energy based on an astronomical model while enabling uninterrupted operation with comparably low duty cycle variance.

Stochastic Power Management

Optimal Power Management with Guaranteed Minimum Energy Utilization for Solar Energy Harvesting Systems is a study by Rehan Ahmed et al. [ABD+19]. It takes Bernhard Buchli’s work, from 2015, to further research optimizing the energy consumption of energy harvesting embedded systems [BKT15]. The new addition in the research is the Stochastic Power Management (SPM) algorithm. This algorithm

(32)

2.3. POWER MANAGEMENT ALGORITHMS 11

uses historical weather data to make weekly statistical models of harvestable energy.

With these models, a minimum consumption level is computed, and weekly safe charges throughout the time horizon. While there will be deviations from year to year, we can better represent and model the future intake using several years worth of data.

Rehan’s work proposes two algorithms, Finite Horizon Control (FHC) and Stochas- tic Power Management (SPM), where the SPM algorithm shows the most promise.

The proposed algorithms are compared against a theoretical Clairvoyant (CV) scheme assumed to know the exact future intake.

Figure 2.4: Comparison of different DPM schemes [ABD+19]

Both algorithms have as a first objective to maximize the minimum consumption supported throughout the interval of interest [ABD+19]. The importance of guaran- teeing this minimum consumption is highlighted. A use case presented in the paper is an early warning system to alert against natural disasters. If a minimum operation can not be guaranteed, there is a possibility the sensor mote is not responsive, which in this case must be avoided at all costs.

The second objective of the proposed algorithms in the paper is to maximize system utility by taking advantage of energy surplus. This surplus can be defined when the battery is fully charged. Every unit of energy harvested from this point will go to waste as we can not store any more charge in the battery. The sensor mote can instead use the surplus energy to increase measurement resolution both in time and precision, perform local processing operations or send stored data more often [ABD+19].

The SPM algorithm has two phases, offline and online. All computations are done in the offline phase, making run-time overhead negligible. In the online phase, the end device only has to make simple table look-ups and arithmetic operations. With

(33)

12 2. BACKGROUND AND RELATED WORK

the two objectives presented above in mind, the following section further present the properties of the SPM algorithm in the section below;

Maximal minimum use level This value is computed to serve as the guaranteed minimum consumption level, referred to as the use level,v. The SPM algorithm builds statistical models of the harvested energy using historical weather data. In addition to a battery model, these statistical models are then used to maximize the consumption level such that the probability of encountering failures is≤λ. The value λis the failure constraint parameter. Lowerλvalues correspond to more conservative consumption. The algorithm iterates over possible values and checks the feasibility to find the maximal consumption value such that no failures are encountered (i.e.

battery charge≤0), i.e. Maximal Minimum Consumption.

Safe charges After the use level,v is found. Weekly safe charges are computed over the time horizon, using the statistical models and battery model. The time horizon, in this case, isT = 52, so 52 safe charges are computed. We mentioned that an energy surplus is defined when the battery is fully charged, and thus, any additional harvested energy is considered surplus and discarded. Instead of defining surplus when the battery is fully charged, using these safe charges, the device can determine a surplus of energy if the actual battery charge is above the threshold in a given week. Should the actual battery charge be under the safe charge in a given week, we do not have an energy surplus and the use level, v is set as the devices allowed consumption.

(34)

Chapter

3

Methodology

This chapter focuses on the methodology used in this project. First, we introduce the design science for this project. Here we also present the design cycle, which involves identifying a problem, designing a treatment and validating the treatment. In the second chapter, we explain how we chose the algorithm through a literature review.

As this field is already researched field, there is existing knowledge to be used. Lastly, we present the software used in this project and the requirements.

The projects aim to explore the concept of power management algorithms. The problem is investigated through simulations as there would not be enough time to see the full extent of power management algorithms in a real-life implementation.

Simulating is essential, as we can deploy devices in different environments and gain results virtually immediately. Furthermore, should the simulation results be unsuccessful, we can figure out what went wrong and make adjustments. Time is a valuable resource when writing a thesis, and creating a real-life implementation to gain our results would require too much time.

3.1 Design Science

Design science is the investigation and design of artifacts in context [des, p.3]. The artifacts are designed to interact with and improve aspects of a problem. Design science problems are referred to as improvement problems. Meaning there is a context sought to be improved in every design science problem. The artifact created means to improve something in the problem context. Artifacts as a concept are broad, and it can be virtually anything. It may be something tangible we can physically use, or it may even be conceptual, like an idea or method. The aim is to understand better how power management algorithms can improve IoT systems where devices harvest solar energy. The context of this project is remote IoT systems with energy-harvesting devices. As mentioned in chapter 1, the problem context is the fact that the cyclic variation of available energy may lead to failures in one period. In addition, the 13

(35)

14 3. METHODOLOGY

charge these remote devices can store and use is finite and may lead to wasted energy in another period. The artifact investigated for this context is the algorithm.

Though we use an already proposed algorithm to plan future power consumption, as mentioned in chapter 2.3, changes were required to implement it for the needs of this work. We wish to investigate the properties of the chosen algorithm and implement said properties and behaviour in our simulation environment. The development of a real-world implementation is not part of this work. As studying the real-world problem, one needs to gather data, preferably over an entire calendar year or more.

Given the time horizon of the thesis, it would not be possible.

Figure 3.1: Framework for design science, adapted formDesign Science Methodology for Information Systems and Software Engineering[des]

The figure above 3.1 illustrates the framework as presented in Design Science Methodology [des, p.8]. In this project, the knowledge context consists of existing algorithms, relevant proceeding papers and journal articles, specifications of available designs and understanding gained through the specialization project. The knowledge context contributes to the design science with existing knowledge (prior knowledge).

The design science project may add new designs to the knowledge context and answer new knowledge questions (posterior knowledge).

(36)

3.1. DESIGN SCIENCE 15 3.1.1 Design cycle

The design cycle of an artifact has four stages; (1) Problem investigation (2) Treatment design (3) Treatment validation (4) Treatment implementation. However, the fourth stage does not apply to this project.

Figure 3.2: The Engineering cycle. Adapted from [des, p.28]

In the first stage, we need to figure out what problem we are solving and why. It is essential to include the stakeholders and their goals in order to identify the problem.

The stakeholders in this project can be any companies interested in IoT and other researchers with related work. In this context, the problem is that remote devices fitted with a solar panel can only recharge and hold a finite amount of charge. How much energy the device can consume ultimately comes down to how much energy it can harvest in the foreseeable future, which is hard to predict accurately. Should there be little energy to harvest in a period, the devices rely on the energy stored in the buffer. Longer periods without sufficient harvestable energy means a larger buffer capacity is needed. These devices are small and size constricted. Increasing the battery capacity often means a physically larger battery size. Thus a solution that dynamically adapts the consumption may be more appropriate.

After the problem is identified, we move on in the cycle and try to design a treatment. The first step is to specify requirements, and the requirements serve as guidelines when designing or, more precisely, a goal for the to-be-designed treatment [des, p.51]. The requirements are also needed to validate the effect of the treatment in the next stage of the cycle. It also serves a purpose to investigate if there already exists a solution that tries to solve the problem or a similar problem. Investigating existing treatments can be valuable to learn from when designing a new treatment. A literature review was performed to find a treatment for the problem context, as there are several proposed algorithms. With each new scheme, some aspects are improved from the previous, much like an iterative procedure. After researching and finding

(37)

16 3. METHODOLOGY

a treatment in the form of a state-of-the-art algorithm. The first research question was answered, RQ1: How can power management algorithms increase performance in energy-harvesting IoT systems using battery-constrained devices? The algorithm chosen for further research after reviewing related work was the SPM algorithm. As this algorithm had two output properties, we found highly interesting. First, based on statistical models of historical weather data, it avoids encountering failures by computing the minimum consumption, which serves as the guaranteed minimum service level. Second, energy surplus is defined by computing and setting safe charges, which serve as thresholds to guide the consumption of the device throughout the time horizon. If the conditions are satisfied, the device can increase consumption. If not, the minimum service level has to suffice.

The next stage and the last stage in our cycle is the validation of the treatment.

Justify that the treatment meets the stakeholders’ goals. In this stage, we need to investigate the interaction between the designed treatments and the context. Once we have an understanding of the effects, we compare them to the requirements of the treatment. Simulations were made to validate the treatment, as the time needed to implement and study the results of a real-world implementation would take too long. Validation was done in several steps. First, some initial and relatively simple test simulations were made. This was done to understand the algorithm, its properties and how to apply them in real-world IoT applications. The minimum consumption computed serves a purpose in almost all IoT applications where we do not want the system to encounter any failures at all costs. Some applications might not have this "always-on" requirement, and as a result, the consumption level computed to avoid failures due to battery depletion could be too conservative. When validating, some use cases were investigated as every application often have different requirements. This was the second step after the initial testing and answered the second research question, RQ2: What are the use case requirements in order to utilize the particular algorithm? Lastly, we implemented the algorithm in an environment for energy-constrained devices. This framework is called SensorGym and will be presented further in Chapter 6. Doing this gave us a clearer vision of what is needed to make sure the algorithm runs correctly. Since it uses historical weather data, we experimented with the data-set to see the results of insufficient data to construct the models. This limitation, along with some others, will also be presented in a later chapter.

Looking back to our research questions we can classify them as knowledge questions in design science. We decompose the research questions to make them clearer.

RQ1: How can power management algorithms increase performance in energy-harvesting IoT systems using battery-constrained devices?

(38)

3.1. DESIGN SCIENCE 17

– How can we mitigate risk of failure due to battery depletion?

– How can we decrease amount of energy wasted due to fully charged batteries?

RQ2: What are the use case characteristics, in order to utilize the particular algo- rithm?

– Where is the application located?

– What is the desired measurement frequency?

– When is the phenomenon observed?

(39)
(40)

Chapter

4

Investigating and Testing the Algorithm’s Properties

The preliminary testing consisted of closely studying the offline phase and online phase of the algorithm. For this purpose, we reused Rehan’s code. In addition to the code, we were given the dataset containing solar energy from Michigan. Investigating both phases meant better understanding how the statistical models are constructed and output properties are computed.

We were fortunate enough to gain access to Rehan’s algorithm, and throughout the early testing, time was also allocated to inspect and understand the code. The algorithm can be divided into two separate phases, offline and online. In the offline phase, we do all the computations needed to support the device during its run-time or online phase. These computations are the weekly energy models and parameters such as minimum use-value and safe charges. During the run-time simulation, we use these parameters to adapt the consumption of the device dynamically. The main advantage of computing such parameters in advance is limiting run-time overhead in these energy-constricted devices.

4.1 Offline phase

The first step in the algorithm is to generate the statistical model of the harvested energy (see Appendix A for code snippet). Given historical weather data, the algorithm can produce a statistical distribution. The weekly models produced from the dataset provides a close match to a normal distribution. To perform statistical analysis, we assumed the models to be normally distributed. It is mentioned that other distributions may be deployed for more accurate models of harvested energy.

Though this is regarded as future work as using normal distributions results in performance gains. Figure 4.1 shows how the data is structured. The graphs in the figure consist of 12 years of weekly solar data (1998-2009), i.e. a tree of elements, where each element (week) has 12 elements (respective weeks from each year).

19

(41)

20 4. INVESTIGATING AND TESTING THE ALGORITHM’S PROPERTIES

Figure 4.1: Harvested solar power Michigan, USA (1998-2009).

Computing a maximal minimum use level, referred to as υ , is the next step.

Using the search algorithm know as binary search and values from 0-100, i.e. the battery capacity in absolute units, as possible values. The algorithm iterates over these possible values and returns the largest feasible value so that no failures due to depleted batteries are encountered.

After the valueυ is found, we compute the safe charges. The safe charges are

(42)

4.2. ONLINE PHASE 21

weekly battery levels over the given period, in this case, 52 weeks. These battery levels are needed to adapt the utility based on energy surplus dynamically. Similarly, using the possible values, the algorithm iterates with the binary search algorithm and performs a feasibility check and returns the largest safe charge feasible.

Algorithm 4.1SPM Offline phase [ABD+19]

Require: hτ(x),∀τ∈ {0,1...,51}; λ; B;

Ensure: υ; ∀τ∈ {0,1...,51};

Cτ=B∀τ∈ {0,1...,51}

Assumeu(τ) =υ∀τ ∈ {0,1...,51}

Use binary search to find value ofυsuch thatλλ for alli ∈ {0,1...,51} do

Use binary search to find value ofCi such thatλλ end for

To run the offline phase of the algorithm, one needs the weekly solar data, denoted ashτ. The initial week,τ. The failure constraint,λ. Lastly, the maximum battery capacity,B. After the offline phase is completed, we get the two output propertiesυ andCτ for later use in the online phase.

4.2 Online phase

In order to obtain some early test results, we wanted to simulate a device using and harvesting energy. At this stage, we used a relatively simple simulation, as the purpose was to better understand for which use cases it would be suitable to use an algorithm, such as the SPM algorithm. The runtime algorithm requires the following;

(1) Initialize the battery level b(t). (2) Use value v. (3) Safe charges to determine if there is an energy surplus. (4) Spread parameter w to determine how to handle the energy surplus. (5) System state S(t) to define either nominal operation or a failed state.

As mentioned, this simulation was kept simple to understand the output properties of the algorithm better (see Appendix B for code snippet of the online phase). These output properties are the minimum use level and safe charges to dynamically adapt consumption based on energy surplus. Once the offline phase is complete, we will have a set of safe charges Cτ. After some discussion, weekly safe charges seemed the most suitable as predicting weather on a daily granularity solely based on historical weather data would be highly inconsistent. Lowering the granularity means the device would have to use the safe charge computed for an extended period. In turn, increasing the chances of failures or underutilizing resources due to wrong safe

(43)

22 4. INVESTIGATING AND TESTING THE ALGORITHM’S PROPERTIES

charges. So monthly safe charges were not considered. The simulation interval was 52 weeks, as this parameter was used in the offline phase. While the simulation is running, should the devices current battery level b(t) be greater than the safe charge Cτ for that week, we can increase the consumption. This surplus can be divided by the spread parameter if surpluses should recharge the battery or some other power-consuming operation. The surplus is defined based on the difference between the current SoC and the safe charge in a given week. Should the difference in battery level compared to the safe charge be less or equal to 0, the device is still in nominal operation, but the minimum use level will be used. Should the battery actually be depleted, we want to minimize the chances of consecutive failures. The device enters a failed state and waits until the battery reaches the current safe charge before transitioning to nominal operation.

Algorithm 4.2SPM Online phase [ABD+19]

Require: b(t);υ; w; Cτ; S(t)∈ {N ominal, F ailure};

Ensure: u(t);S(t+ 1);τ =t mod T surplus=b(t)

u(t) = 0

if surplus≥ 0 then u(t) = υ + surplus/w S(t+ 1) = N ominal

else if S(t) = N ominal then u(t) = υ

end if

To run the online phase, the algorithm requires the current/initial battery charge, b(t). The maximized minimum consumption and safe charges computed in the offline phase,υandCτ, respectively. A spread parameter,w, details how to use the surplus, and lastly, the current/initial state of the device,S(t).

The online phase simulation defines a parameter for consumption,u(t), wheret is the current week throughout the simulation. Surplus is calculated by checking the current battery level against the safe charge for the respective week. If the surplus is greater than zero, the device can increase consumption with the given amount.

However, the spread parameter may limit this consumption increase if declared, shown below in Figure 4.5. Else if there is no surplus and operation is nominal, meaning buffers are not depleted, the device falls back to the maximized minimal consumption.

(44)

4.3. PRELIMINARY RESULTS 23

4.3 Preliminary results

Figure 4.2 shows the weekly mean of the 12 years of solar data. These values were used in the runtime algorithm to simulate the device harvesting energy. Figure 4.3 shows the safe charges computed using the same data set.

Figure 4.2: Weekly mean solar power Michigan, USA (1998-2009).

Figure 4.3: Safe charges for the Michigan dataset

The battery’s initial charge is 100%. However the first safe charge, in Figure 4.3, defines the threshold to be 80%. Thus, the device has the 20% difference in addition to any harvested energy as surplus. We observe that the safe charges intuitively get lower as the amount of harvestable energy increases. Sometime after week 30, we see the safe charges level drastically rise. As we enter a long period where energy is scarce, it is needed to ensure the battery level reaches a satisfactory level due to the high consumption enabled the weeks before.

The algorithm defines the battery charge in units from 0-100 and scales everything accordingly, i.e. consumption, safe charges and harvested energy. During simulation,

(45)

24 4. INVESTIGATING AND TESTING THE ALGORITHM’S PROPERTIES

the consumption is directly subtracted from the battery, and the harvested energy is added. As mentioned, the simulation is relatively simple and uses only simple arithmetic operations. However, some adjustments were made to make the simulation more representative of a scenario where the device can adjust its sensing based on an energy surplus. The battery was mapped to hold a capacity of 1500 Ws, roughly resembling a Li-ion battery with a nominal voltage of 3.7 V. The min use level, safe charges and harvested energy was mapped accordingly. A method to determine how many duty cycles the device could perform with the given surplus was also added.

Figure 4.4: Simulation without surplus scaling: w=1

Figure 4.5: Simulation with surplus scaling: w=2

(46)

Chapter

5

Researching Use Cases to Apply the Algorithm

After getting familiar with the algorithm and its main properties, we wanted to investigate use cases where such a tool for power management could be applicable.

Harvesting solar energy to recharge buffers is undoubtedly an intriguing idea. However, we can not ignore that this method of recharging energy buffers and managing power may not be ideal for every use case.

As previously mentioned in Chapter 2, the seasonality issue becomes more apparent as we move further from the equator. A significant change in energy intake means the need for planning buffer capacity and consumption also increases. This chapter will briefly present some use cases with different requirements regarding the operation of the sensing device. Some suitable use cases and some not so suitable for this particular power management algorithm. As presented in Chapter 4, the SPM algorithm tries to takes advantage of excess energy by comparing the current SoC against the pre-computed safe charges. Using these thresholds, we can increase consumption if there is an energy surplus or keep it at a minimum level if not. So a use case where we want to increase consumption when possible would be most suitable to take full advantage of the algorithm’s safe charge property. However, the algorithm has another interesting output property that suits most use cases. The maximized minimum level computed to serve as a guaranteed minimum service level.

While this is a stochastic guarantee as there is an element of randomness introduced with clouds formation when working with solar forecasts, the algorithm computes one single minimum use level, so the probability of failures encountered over the time horizon is less thanλ, i.e. the failure constraint. In the preliminary testing, Chapter 4, the failure constraint parameter was set to 0.001, i.e. 0.1%. For some use cases where it is not essential to avoid failures, or a small number of failures is acceptable, the resulting utility might be too conservative.

25

(47)

26 5. RESEARCHING USE CASES TO APPLY THE ALGORITHM

5.1 Use Case 1: Road Condition Monitoring

The 0871LH1 are sensors that detect icing conditions on surfaces [Cam]. They may be used to take action against ice building on the blades of a wind turbine, damage to power lines, and warn of hazardous driving conditions. The need for road

Figure 5.1: Freezing-Rain and Ice Detector - 0871LH1 [Cam].

condition monitoring is more common in geographic locations that might experience periodic freezing temperatures. These sensors are often remotely located and thus battery dependent. While we were initially interested in such a use case, our initial experiments found that the SPM algorithm may not be the most suitable algorithm for applications requiring a higher degree of utility during periods with little sun. This utility requirement is the exact opposite behaviour we observe from the simulations 4.4. It may be counter-intuitive to use an algorithm that tries to take advantage of excess solar power in a use case where operation is needed when solar energy is scarce. However, it does not mean the algorithm’s safe charge property is entirely useless in this scenario. There may be some value in using the safe charges, not to adapt the consumption dynamically but to serve as an early warning system. As these safe charges are computed to show the adequate battery charge level at a given week, should the actual battery level deviate from this course, action may need to be taken.

For a use case like road surface monitoring, we might not want or need any measurements in the period with high amounts of solar energy since the roads are most likely in good, drivable conditions. However, when we enter a period with little solar energy and roads experience freezing, we want the sensors to be operational.

Thus once the device is operational, measurements are critical, and operation must be uninterrupted. So it serves a purpose to use the algorithm for its maximized minimal consumption level to ensure operation throughout the period where energy is scarce, and we value availability.

(48)

5.2. USE CASE 2: ENVIRONMENTAL MONITORING 27

5.2 Use Case 2: Environmental Monitoring

Measuring pollution is another IoT application where the sensors could benefit from power management algorithms. Unlike the road condition monitoring use case, which sees a change of measurement frequency over a year, i.e. depending on the seasons.

Environmental monitoring such as noise or air quality has more constant consumption, as measurements are wanted regardless of seasonal changes. Alternatively, the use case is not a direct consequence of the seasonal change, like road monitoring is.

Noise and Air Pollution

Here we researched two use cases that make measurements of our everyday environ- ment. These being noise pollution and air pollution. Compared to road condition monitoring, measurements from both sound level monitoring and air quality mea- surements draw much more power from the device.

There already exists a market solution for monitoring both forms of pollution.

Waspmote is a sensor platform designed and manufactured by the company Libelium [Libd]. Using this platform, one can connect various sensors, including a Noise/Sound level sensor and a handful of sensors for different gasses and particles.

Figure 5.2: Libelium Waspmote Plug & Sense! [Libd]

Noise sensors have a high current consumption (200 mA). Furthermore, require a continuous operation to capture noise in an interval; for this reason, it is recommended that the sensor uses its own power supply [Libc].

(49)

28 5. RESEARCHING USE CASES TO APPLY THE ALGORITHM

Libelium websites also provide the consumption of the different sensors. Below is a table of the power consumed by some of these different sensors. Should a use case require to increase sensing resolution when an energy surplus is defined. The power drawn from the sensors needs to be significant enough when calculating the energy consumption model. For instance, given an energy surplus, the sensing resolution of a humidity sensor could be drastically increased to the point that it might become excessive. While given the same surplus, particle sensing would not see the same degree of increase in sensing resolution. That being said, there are other means to use excess energy.

Sensor Switch On

Minimum (constant) 5 - 10 µA

Temperature 1 µA

Humidity 1.8 - 2.8µA

Pressure 2.8 - 4.8µA

Molecular Oxygen 332µA

Carbon Dioxide (CO2) 85 mA

Particle Matter – Dust 270 mA

Table 5.1: Sensing consumption of different sensors [Liba].

The table below shows some different communication technologies supported by Waspmote. As stated in Rehan’s study, the surplus may be used to increase the participation of the device in communication [ABD+19].

Module Transmission

Power

Sending Receiving

XBee ZigBee 3 18 dBm 40 mA 17 mA

4G - - 180 mA 180 mA

LoRaWAN EU 14 dBm 38.9 mA 14.2 mA

Sigfox EU 16 dBm 51 mA - -

Table 5.2: Transmission consumption of different communication protocols [Libb].

5.3 Use Case 3: Precision Agriculture

Precision Agriculture is a use case that could find the SPM algorithm highly suitable.

The concept of Precision Agriculture is to enable data-driven farming through measurements and observations. Measurements such as soil moisture readings and

(50)

5.3. USE CASE 3: PRECISION AGRICULTURE 29

chlorophyll contents in leaves allow farmers to reduce water usage and observe the plants health. Compared to the previous use cases presented, this use case is more suitable for an algorithm like SPM because the wanted frequency of measurement follows seasonal changes in available solar power. Crops that do not require much sunlight, such as root vegetables, are planted and harvested during the period where energy is scarce [Gro]. However, crop and fields are often not cultivated during periods where solar energy is scarce. Meaning the minimum use level provided by the algorithm is more likely to be sufficient in providing the required measurements during this period. While during the agricultural cycle of planting, growing, and harvesting, where farmers might need a higher frequency of measurements and reports, we can expect an energy surplus to support this required increase in measurements and consumption.

Through our research, we noticed another issue being measurements that draw such a small amount of power that they are an insignificant factor in the total power drawn throughout a device’s cycle [Gar20, p.49]. Soil Moisture measurements make up for a relatively small percentage of this total. To the point where using the energy surplus, we could theoretically increase the measurement frequency tenfold without significantly impacting the surplus usage.

There is already innovation in this field, with market solutions like Arable [Ara].

An easy to install an all-in-one device that collects several metrics for agricultural use and is powered through solar panels and batteries.

Figure 5.3: Arable Mark 2, deployed in a farmers field [Ara].

Mark 2 is Arable’s flagship tool for decision agriculture. Fitted with solar panels makes for a self-sufficient and maintenance-free device. With cellular connectivity

(51)

30 5. RESEARCHING USE CASES TO APPLY THE ALGORITHM

using LTE-M or 2G, the device can transmit readings to a centralized server over great distances.

Figure 5.4: The Agricultural Cycle, based on a strategic plan proposed by the Cono Group [con].

Figure 5.4 shows a proposed agricultural cycle. Should the crops’ cycle follow the same seasonal cycle, using the algorithm would mean the device can increase sensing resolution during the monitoring phase of the agricultural cycle. Thus, enabling more measurements with increased precision when excess energy is available.

(52)

Chapter

6

Results Obtained from Simulations

We now have an idea of which use cases this particular algorithm would benefit the most. Further testing required some changes to the simulation. SensorGym is a framework to train IoT device using reinforcement learning [MBKT19]. It simulates an energy-restricted device, making it suitable for this project and further tests the algorithm in a more detailed environment. Using parts of this framework, we can test the idea of adaptive consumption based on pre-defined safe charges with greater detail than our previous simulations. The algorithm uses statistical models to compute the safe charges. This means that to get a more accurate safe charge for a given week, we require several years’ worth of solar data. Our previous simulation uses a dataset from Michigan with 12 years worth of weekly data. We wanted to test how safe charges affect the device’s performance, more specifically, how the correctness of safe charges affects the performance. While the correctness of safe charges is hard to validate, by using several years worth of data, we assume the weekly models constructed as normal distributed 4.1. More years in the data set increases the probability that a given week in the future has the same solar energy as a value in the distribution.

6.1 Simulations using solar data from Tokyo

We simulate a device fitted with a solar panel. Using weather data from Tokyo (2010, 2011) as input, we plot output such as the buffer charge and the consumption over the horizon of interest (365 days). Through the simulation, we see that the device’s configuration without planing the energy consumption encounters failures due to buffer depletion. In the period with the largest amount of solar energy, the battery is fully charged and thus, energy is wasted as the device cannot harvest available energy.

Figure 6.1 and 6.2 show the simulations without planning implemented. We ran two simulations, one starting in January 2010 and one starting in January 2011. The initial condition of the battery was set at 50% charge. We see for both simulations a similar pattern for both calendar years. The first failure occurs around the same 31

(53)

32 6. RESULTS OBTAINED FROM SIMULATIONS

time. Moreover, the devices battery level at the end of the year is approximately 0%.

Were we to run the simulations consecutively, we would enter the new calendar year with depleted batteries. Resulting in several consecutive failures until the harvestable energy is great enough to operate the device and recharge its buffer.

Figure 6.1: Simulation without planner, Tokyo dataset (2010)

Figure 6.2: Simulation without planner, Tokyo dataset (2011)

The SensorGym code looks for a specific string in the configuration detailing if the device uses what we call a "planner". The plot in Figure 6.1 and 6.2 show a device configured with a static planner i.e. no planning and static consumption.

When no planners are used, we see it results in the device encountering failures in periods where the consumption is greater than the amount of energy harvested.

When the season shifts and the harvested energy is greater than the consumption drawn from the buffer, we see that the battery becomes fully charged, resulting in wasted energy. In addition to ensuring uninterrupted operation, leveraging excess energy is the problem the researched algorithm intends to treat.

Listing 6.1: Initial configuration of a device in SensorGym c o n f i g = {

" b u f f e r _ c a p a c i t y " : [ 1 8 0 0 ] ,

Referanser

RELATERTE DOKUMENTER

The first model is a tripartite consortium model that consists of a cooperation between Kazakhstan, Iran and South Africa, in which these countries additionally cooperate with

Keywords: Cosmology, dark matter, dark energy, gravity, Einstein equation, cosmological constant, hyper space, gravitation..

With a speed limit of 12 knots, the wave periods of vessel generated waves will be so short that the wave energy of such events will be negligible compared to the wave energy

They are also dependent on different modes of comparisons, some comparing the absolute energy reductions with projected energy use at a given point in the future (i.e. Thus,

With its multifaceted energy system which includes solar PV cells, micro hydropower and a battery, in addition to the energy efficiency dictated by the FutureBuilt standard, allows

In certain cases as solar and wind power its cheap generation cost (if not free) allows renewable energy bids to be placed close to the legal minimum (0€/MWh) on the energy

Analysis of the campaign questionnaire in regards to the activity shows that students believe that solar energy should be better utilized as an energy source in Norway,

The energy service demand in the base year (2006) is mainly based on the reporting of electricity use to NVE (“eRapp”), with additional information on national energy consumption