IT 19 049 Examensarbete 30 hp Augusti 2019

Power analysis and optimization of wireless sensor nodes

Tobias Mages

Institutionen för informationsteknologi Department of Information Technology

Abstract Power analysis and optimization of wireless sensor nodes Tobias Mages

Teknisk- naturvetenskaplig fakultet UTH-enheten Wireless sensors offer the possibility to monitor critical parameters in our environment, which enables applications to optimize processes or anticipate and Besöksadress: detect critical events. Environmental monitoring and predictive maintenance of Ångströmlaboratoriet Lägerhyddsvägen 1 non-electric systems are two important application domains that have different Hus 4, Plan 0 computational requirements but similar power constraints. In this thesis is presented an iterative wireless sensor node design that supports both Postadress: applications equally well. In particular, the platform is useful for building Box 536 751 21 Uppsala demonstrators and evaluating proof of concept designs because the system can be used for the rapid prototyping of models out of standard machine learning Telefon: frameworks with reasonable performance. At the same time, the platform can run for 018 – 471 30 03 several years during the environmental monitoring with a battery. Additionally can the

Telefax: system be powered by solar harvesting to enable its use in a "deploy and forget" 018 – 471 30 00 manner. For this purpose, the system hardware has been optimized and a radio module was Hemsida: selected which enables the transmission of measurements over several kilometers. To http://www.teknat.uu.se/student recommend the radio configuration for a minimal energy consumption, different settings have been compared in terms of their required energy and transmission range. The power budget of the platform has been generated and optimized, to increase the system run-time and enable the maximal amount of measurements within its energy constraints. Finally, the illumination in greenhouses has been analyzed which showed to provide enough energy to power the platform with a 45x15mm photovoltaic module. In combination with a single coin cell battery could be achieved a continuous system run-time of more than ten years for environmental monitoring applications with this platform.

Handledare: Nils Weber Ämnesgranskare: Christian Rohner Examinator: Phillip Rummer IT 19 049 Tryckt av: Reprocentralen ITC

Acknowledgement

This project would not have been possible without the help of several people, to which I would like to express my gratitude here.

I would like to thank Christian Rohner for reviewing this project and giving invaluable feedback and guidance during the entire period.

I would like to thank Nils Weber for supervising the project and the welcoming working environment at Bitroot. I would also like to thank Biroot AB for enabling this project by financing the required equipment and prototypes.

Finally, I would like to thank Michael Forschlé for his helpful feedback on the written work. Contents

Glossary ...... I 1 Introduction ...... 1 1.1 Motivation and project environment ...... 1 1.2 Goals ...... 1 1.3 Structure of the approach ...... 2 2 Background ...... 4 2.1 Power management ...... 4 2.2 Power source ...... 7 2.3 Previous work ...... 12 2.4 Measurement methodology ...... 15 3 Hardware design ...... 17 3.1 Analysis and optimization ...... 17 3.2 Edge AI modification ...... 26 3.3 Radio comparison ...... 31 4 Solar harvesting analysis ...... 39 4.1 System power budget ...... 39 4.2 Power source design ...... 44 4.3 Available energy analysis ...... 47 4.3.1 Single diode model analysis ...... 49 4.3.2 Reference measurement analysis ...... 53 5 Discussion ...... 58 6 Conclusion and future work ...... 63 List of Figures ...... III List of Tables ...... V Bibliography ...... VI Appendices ...... XIII Glossary

4-FSK 4-Frequency-Shift Keying AC Alternating Current AHB Advanced High-performance Bus AI Artificial Intelligence ANN Artificial Neural Network aSi Amorphous Silicon BSS Base Station Subsystem CIGS Copper Indium Gallium Selenide CRC Cyclic Redundancy Check CS Control Signal cSi Crystalline Silicon DC Direct Current DSSC Dye-Sensitized Solar Cell EEPROM Electrically Erasable Programmable ROM EMF Electromagnetic Field ESD Electrostatic Discharge FET Field-Effect Transistor FOCV Fractional Open-Circuit Voltage FPU Floating-Point Unit GFSK Gaussian Frequency-Shift Keying GSM Global System for Mobile communications I2C Inter-Integrated Circuit IC Integrated Circuit IMU Inertial Measurement Unit IoT Internet of Things ITM Irregular Terrain Model LDO Low Dropout Regulator LED Light-Emitting Diode Li-ion Lithium-ion LoRa Long Range LR Linear Regulator LSD Low Self-Discharge LSTM Long Short-Term Memory MAC Multiply-Accumulate

I MOS Metal-Oxide-Semiconductor MOSFET Metal-Oxide-Semiconductor Field-Effect Transistor MPP Maximum Power Point MPPT Maximum Power Point Tracker MSI Multi Speed Internal MSK Minimum-Shift Keying NCV Nominal Cell Voltage NiMH Nickel–Metal Hydride opamp Operational Amplifier OSI Open Systems Interconnection PCB Printed Circuit Board PLL Phase-Locked Loop PV Photovoltaic PWM Pulse-Width Modulation ROM Read-Only Memory RSSI Received Signal Strength Indicator RTC Real-Time Clock SEK Swedish Krona SMPS Switching Mode Power Supply SPI Serial Peripheral Interface SR Sampling Rate USB Universal Serial Bus WSN Wireless Sensor Network

II 1 Introduction

1.1 Motivation and project environment

The number of wireless sensors in our environment can be expected to increase during the next years. This offers the possibility to monitor critical parameters for optimizing processes or to detect issues before they arise. One of the start-ups that focuses on different Internet of Things (IoT) solutions in Uppsala is Bitroot, which was founded at the end of 2017.

Bitroot’s main focus is on sustainable greenhouse farming, where they monitor the growing conditions of plants. Their first prototypes could measure the soil moisture, air humidity, temperature and ambient illumination. By monitoring these parameters together with the yields of the crops, they search for correlations to find the parameters with most impact on the growing conditions of different plant species. At the same time, the farmer can use this information to monitor his own systems and be alarmed in special cases. This requires the wireless sensor nodes to be designed as energy efficient as possible, to reduce the required maintenance for recharging batteries. Since the collection of data for this project requires several years, Bitroot started working on industrial applications in parallel. Here, they are trying to monitor non-electric systems to reduce their down-time with predictive maintenance. In this field edge Artificial Intelligence (AI) is gaining popularity, where the different algorithms are executed on the sensor nodes directly, instead of being transmitted to a server. This has the main advantages of enabling real-time operations and that a data connection is not required at each time anymore.

These two applications have very different computational requirements, but share the issue of an energy constrained operation. For evaluating different projects, it is a key aspect of quickly being able to prepare specific demonstrations for customers or prototyping setups for a case study. For this, it would be beneficial to have a single low-power platform which is as suitable for both applications. It should be able to operate over several years by monitoring environmental conditions, but at the same time be able to efficiently compute models for the predictive maintenance of machines. Ideally, Bitroot would be looking for a system that could even be powered by solar harvesting, to target use cases with a “deploy and forget” manner.

1.2 Goals

The goal of this project is to develop an edge-ready low-power wireless sensor platform, that could be used for the rapid prototyping of both, low-power environmental monitoring and industrial predictive maintenance applications. This could increase the reusability of Bitroot’s projects and enable the quick setup of different case studies or demonstrations.

The power consumption of Bitroot’s platform shall be analyzed in detail. Based on these results should the hardware be optimized and it should be identified which aspects of the system have the biggest impact on its possible run-time. One part of this should also include the comparison of different voltage converters, to select which setup would be most suitable for Bitroot’s applications.

1 1.3. Structure of the approach

It shall be analyzed how the platform needs to be modified for running models out of different machine learning frameworks. Based on this, the required energy for the local computation of a model should be compared with the transmission of equivalent data, to see if this opens new possibilities in reducing the energy consumption. Additionally, the system performance for computing a specified predictive maintenance network should be analyzed and shown how the required hardware modifications would impact the system run-time in environmental monitoring applications.

The current transmission range of Bitroot’s wireless sensor nodes is insufficient for placing them in arbitrary positions of a greenhouse which also contains the base station. Therefore should be analyzed in more detail what is limiting the transmission range of their setup and how this could be improved. Additionally should be compared the currently used radio module with Long Range (LoRa) transceivers, to find out which of these systems is most suitable for Bitroot’s applications in terms of its communication range and energy consumption.

Finally shall be designed a new power source system that could enable the use of energy harvesting on the platform. Based on this should be generated a model that can be used to analyze Bitroot’s data set, which contains several month of recorded illumination and temperature measurements from deployed nodes out of 2018. It should be estimated how much energy could be harvestable at their deployed positions. Additionally should be analyzed how the harvested energy will constrain the platform and how a possible setup could operate.

1.3 Structure of the approach

To achieve the goals of section 1.2, this work has been structured into different tasks that can be seen in figure 1.1. This overview contains the different work packages and the order they were worked on. Smaller workloads have been indicated by occupying one cell and bigger once by two cells. Each cell of the graph does not correspond to any particular time span, so that this diagram only indicates the workflow of the project.

The first prototype of the custom hardware platform V1.0 has been analyzed in detail to search for issues and determine its power consumption. All found improvements were successively applied to the prototype to analyze their impact. Its interfaces were then used for the analysis and comparison of different voltage converters, to see if they keep their specified power consumption and find the most suitable solution for this application. Based on these conclusions was redesigned the platform to V1.3. It should contain all power optimizations that have been identified, is based on the same ARM Cortex-M0+ microcontroller as V1.0 and added some additional features for future work. Also the Printed Circuit Board (PCB) had to be redesigned and a new prototype was manufactured for the final analysis of the Cortex-M0+ platform. The intermediate version numbers (like V1.1 or V1.2) were only used for incremental improvements and the internal documentation of Bitroot. They get neither built nor mentioned further in this work.

Out of the reasons which are explained in more detail in section 3.2, the ARM Cortex-M0+ got replaced with an ARM Cortex-M4 for V2.0 to simplify the prototyping of edge AI applications. All periphery was kept unchanged compared to V1.3, to enable a closer comparison between the different microcontrollers. They were analyzed using several clock speeds to identify how they can be used most efficiently and which

2 1.3. Structure of the approach

Power analysis of V1.0 V1.0 Power optimisation of V1.0 Comparison of TPS78033 & RP604

Redesign for V1.3 (M0) V1.3 Manufacturing of V1.3 Power analysis of V1.3

Redesign for V2.0 (M4) V2.0 Manufacturing of V2.0 Power analysis of V2.0

Comparison of V1.3 & 2.0 - Theoretical comparison of CC1101 & LoRa

Power budget measurements V2.0 Energy harvesting hardware design Solar harvesting analysis with historic data

Figure 1.1: Work overview and structure additional energy costs are required for using the faster microcontroller.

Because the communication range is an issue in Bitroot’s currently deployed nodes, the CC1101 radio module should be compared with LoRa. This was done in theory, based on datasheet specifications and their resulting link-budgets, to recommend if the platform could benefit from using one over the other in terms of its energy consumption or communication range.

Finally, the possibility of using energy harvesting to power the new nodes was evaluated. For this purpose, the system power budget was analyzed in more detail and it was generated a new hardware design for the power management circuit with solar harvesting. In combination with historically collected illumination and temperature values from Bitroot’s data set, was then estimated how much energy could be harvested approximately at their currently deployed positions to see if this would be enough to autonomously power the platform. This has been done using two different models of the solar harvesting system. The first one was based on the single diode model with the datasheet specification of the selected photovoltaic module and harvester, where the second model was based on reference measurements.

This described workflow required a total of three prototypes. V1.0 was build preliminary for this project and manufactured without a stencil, which lead to several issues (cf. section 3.1). V1.3 and V2.0 were created as part of this project and manufactured manually using a laser stencil and hot air soldering station (898D) to avoid the same issues. All schematics and PCB layouts can be found in the appendices. The required hardware components were sourced from Mouser [1] and PCBs with stencil from JLCPCB. [2]

3 2 Background

2.1 Power management

Long-term deployable Wireless Sensor Networks (WSNs) reduce their power consumption by using a duty cycle based on long sleep times, which enables the node to stay in a low-power mode for typically more than 99% of the time. [3, p. 614] In the case of Bitroot can be assumed that the wake time will require maximal 5s every 15 minutes, which leads to a duty cycle of about 0.56%. Conversely, this means that the power consumption during 99.44% of the time is independent of the software and radio design. Here, the power consumption is instead determined by the hardware design and its standby currents.

To reduce the total standby current consumption, the use of switches for the power supply of periphery components like the sensors or the radio module, which shall turn off by default, is very important. [4, p. 20] This way can be achieved that only the required subsystems are drawing power at any given time and non of them during the sleep period. All Integrated Circuits (ICs) that have to be powered constantly shall be selected to require a minimal quiescent current. [5, p. 4] The quiescent current (IQ) “is defined as the current drawn by the IC in a no-load and nonswitching but enabled condition.” [6, p. 18] Optimally, only the battery protection, the main electric power converter and the microcontroller should be powered during the sleep period. The sum of their quiescent currents will then determine the minimal power consumption possible for the system. Typical values for the power consumption of the microcontroller using a deep-sleep mode with enabled Real-Time Clock (RTC) for scheduling the next wake-up are 850nA for an STM32L073RZ [7, p. 18] or 770nA for the STM32L4S5VI [8, p. 144]. Typical values for the protection of a single Lithium-ion or Lithium polymer battery are 4µA using the BQ297x Series from Texas Instruments [9, p. 6] or 3µA using the AP9211 from Diodes Incorporated [10, p. 5]. Their most important features are the Overcharge/Over- Discharge Detection, the Charge/Discharge Overcurrent Detection and the Load Short-Circuit Detection to avoid damaging the battery during operation failures.

That last module that needs to be powered all the time is the main Direct Current (DC)-to-DC converter. It is always powering the microcontroller and during wake-up periods also the periphery. Therefore should it provide a high efficiency at a minimal quiescent current. Here could be used either a Linear Regulator (LR) or a Switching Mode Power Supply (SMPS).

Linear Regulators LRs use a variable resistance in series to the load to regulate their output voltage, like it is shown in figure 2.1a. Here, the provided power is a 12V bus, while the load is an Operational Amplifier (opamp) that shall be powered with 3.3V. In this figure, the LR is represented by the feedback regulator and the variable resistor (R1), which are used to generate the output voltage of 3.3V independent of changes at the input or load. A typical block diagram for LRs can be seen in figure 2.1b. The variable resistance is implemented by a transistor in its linear mode, that is controlled by a feedback loop. This feedback is the amplified error between the output and reference voltage (Vref ). Should either the input or output voltage drop, will also the feedback voltage (VFB) decrease. This leads to a bigger error to Vref , which

4 2.1. Power management

#$V%&'

V !"&5V ./0+('"'+12.(3 ' /0 *26 (# %& C

! V ✰ C2''+03 * VCC VC+

(,-./)/+'

✰ ➊ )**+%,C- + C /1,+ V !"#$#V

(*.&/,01( VCC ✰ +'' ' ✰ . (7 (,-./)/+'

'( ✰

V"

V)* V4 ➊

'* ➊ ✁ V'+)

(0&89")9# ,2#345)4$

(a) LR principle [11, p. 2] (b) LR block diagram [11, p. 2]

Figure 2.1: Linear Regulator (LR) block diagram

will be amplified to increase the current at the base of the transistor to reduce VCE and bring VO back up. [11, p. 2 ff.] The LR requires a minimal voltage difference between its input and output to operate the pass element correctly, which is called the dropout voltage (VDO). Standard regulators use darlington NPN or PNP transistors as pass element, like it is shown in figure 2.2a. This increases the minimal VCE and therefore also the dropout voltage, since the gate has to drive two base-emitter junctions. Typical values for the dropout voltage of standard LRs can be about 2V, which is fine for many applications, but not suitable for generating 3.3V out of a 3.6V Li-Ion battery. [12, p. 1] This issue can be solved by using Low Dropout Regulators (LDOs), that replace the darlington transistor pass element with a P-channel or N-channel Field-Effect Transistor (FET) as shown in figure 2.2b. Then, the minimal voltage drop between the input and output becomes a function of RDS(on) for the used FET and can reach values below 100mV. The block diagram for a LDO can be seen in figure 2.2c. It is equivalent to the LR diagram in figure 2.1, but with the main difference of using a FET as pass element. [12, p. 2]

7,' ' ' =>=,' (,(-"a#.$/0 1/-,a22-3.!4!/ (,-.a//!0123+14a55130!6!/ 89 :;< &'( &)*+ &'( &)*+ 4 55,)0"."6!

)$$+$,-./0%1%"$ + G !" 2+ 3 #$%&" + Ga ! Ga ! "#$%! "#$%! '()*

(a) LR pass element [12, p. 1] (b) LDO pass element [12, p. 1] (c) LDO block diagram [12, p. 2]

Figure 2.2: Low Dropout Regulator (LDO) block diagram

Since the LR and LDO regulate their output voltage through the power dissipation at the pass element, they can maximally achieve the efficiency of equation 2.1. Here, the input power (PI ) is approximated as sum of the output power (PO) and power dissipation (PD). [12, p. 3]

PO UO · IO UO ηLR1 = = = (2.1) PO + PD UO · IO + (UI − UO) · IO UI

However, for low-power applications can not be assumed that the input and output currents are equal. Especially during deep-sleep periods might the quiescent current of the LR or LDO itself become non negligible. This leads to equation 2.2, which additionally takes the quiescent power dissipation (PQ) into

5 2.1. Power management consideration. For regulators without bias supply can additionally be assumed that the quiescent current comes from the same supply as II , so that II = IQ + IO. [13, p 14 f.]

PO UO · IO UO · IO ηLR2 = = = (2.2) PO + PD + PQ UO · IO + (UI − UO) · IO + UI · IQ UI · (IO + IQ)

Finally should be remarked that the quiescent current is dependent on the output current. Especially in typical PNP LRs will the quiescent current increase with the output current, while it can be assumed to be constant in LDOs with P-Chanel Metal-Oxide-Semiconductor (MOS) FETs. [13, p. 15]

Switching Mode Power Supplies As alternative to LRs could be used SMPSs. While buck (step-down) converters can only generate output voltages below their input voltage (UI ) like LRs, boost (step-up) converters offer the possibility to generate higher output voltages than available on the input. The basic principle of these circuits can be seen in figure 2.3. The simplest form is an asynchronous buck converter, as it is shown in figure 2.3a. The circuit has two different states depending on the Control Signal (CS), which turns the FET (M1) on/off like a switch. If it is turned on, the Electromagnetic Field (EMF) of the inductor will be charged up by the voltage difference between the input and output. If the switch (M1) is then turned off, the inductor current will be pushed through the load (R1) and back over the diode (D2). This will generate an average output voltage (UOut) which depends on the duty cycle (D) of the switching signal (D = TON /TP riode), like shown in equation 2.3: [14, p. 1 f.]

TON UOut(DC) = · UI = D · UI (2.3) TP riode

SMPSs have two types of losses, which are the Alternating Current (AC) switching loss and the DC conductance loss. The DC conductance loss (PCON_LOSS) is caused by the resistance of the FET (M1), the diode (D2) and the inductor (L1), if current in flowing through them. Therefore can the DC conductance loss be approximated with the sum of the power losses at the FET, during the time it is switched on 2 (PFET1 = IO · RDS1ON · D), the diode during its conducting time (PD = IO · UD · (1 − D)) with its Asynchronous Asynchronous M1 L1 L3 D1

R1 V1 V3 C9 R3 C6 Load Load C3 M6

C1 CS1 D2 CS2

Synchronous Synchronous L2 L4 M2 M4 R2 R4 V2 C7 Load V4 C10 Load M3 M5 C2 CS1 C4 CS2

(a) Buck converter (b) Boost converter

Figure 2.3: Buck and boost converter principles

6 2.2. Power source

2 forward voltage (UD) and the inductor (PLDC = IO · RLDC ) with its DC resistance (RLDC ): [11, p. 6 f.]

2 PCON_LOSS = PFET1 + PD + PLDC = IO · (RDS1ON · D + RLDC ) + IO · UD · (1 − D) (2.4)

Therefore should be used an inductor with minimal serial resistance to achieve a high efficiency with the converter. However, in this circuit causes the diode the most significant loss, especially for low-power applications with small duty cycles. [11, p. 6 f.] Therefore can the efficiency be improved by replacing the diode with another FET that will be switched with the inverting control signal of M1 (synchronous buck converter, figure 2.3a). This leads to the DC conductance loss of equation 2.5:

2 PCON_LOSS = PFET1 + PFET2 + PLDC = IO · (RDS1ON · D + RDS2ON · (1 − D) + RLDC ) (2.5)

The second type, AC switching losses, are caused by the AC loss of a real inductor, the effects of the caused current ripple and the FETs during their switching time, when both voltage and current overlap in the switching moment. Because some of these signal times are very dependent on parasitic capacitors, the AC switching loss can not be approximated as easily as the DC conductance loss. [11, p. 7]

Another type of SMPSs are boost converters, which are shown in figure 2.3b. In this case the FET M5/M6 will be turned on to charge up the EMF of the inductor. If the control signal (CS2) will then be disabled, the EMF of the inductor is going to reverse immediately so that its voltage is added to the input and pushes additional current through M4/D1 into the load and output capacitor. This way can the output voltage be increased compared to the input voltage by equation 2.6: [14, p. 2]

1 1 UOut(DC) = · UI = · UI (2.6) 1 − TON 1 − D TP riode

Finally, the synchronous buck and boost converter can be combined with a shared inductor to generate a 4-switch synchronous buck-boost converter that can step up and down the input voltage, like it is shown in figure 2.4.

Synchronous M7 L5 M9

V5 C10 R5 M8 Load C5 M10 CS1 CS2

Figure 2.4: Synchronous buck-boost converter principle

2.2 Power source

Wireless Sensor Nodes are typically powered by one of four different sources, which are the mains power, primary (non-rechargable) batteries, secondary (rechargeable) batteries or energy harvesting with storage. [15, p. 10] The WSN of Bitroot is focusing on monitoring remote areas where no main power is available. This leaves three different power sources that can be considered.

7 2.2. Power source

Battery characteristics The most relevant battery types for this work are Alkaline and primary Lithium for non-rechargeable and Nickel–Metal Hydride (NiMH) and Lithium-ion (Li-ion) for rechargeable batteries. They have different voltages and characteristics. One of them is the discharge voltage curve, like it can be seen in figure 2.5 for the two mentioned secondary battery types. One used parameter is the C-rate, which specifies a discharge current relative to the battery capacity. A current of 1C should discharge the battery in one hour, so that for example a 2600mAh battery would be discharged with 2600mA at 1C or 520mA at 0.2C. [16] The Nominal Cell Voltage (NCV) of NiMH batteries is at 1.25V and for Li-ion at 3.6V. This means that it requires three NiMH cells in series to generate more than 3.3V, while a single Li-ion cell would be enough. As comparison, the NCV of Alkaline cells is at 1.5V [17, p. 9] and 3.0V-3.6V for primary Lithium cells depending on the cathode material. [18, p. 11] Figure 2.5 shows how the cell voltage typically changes at discharge. It can be seen that NiMH batteries can keep their nominal voltage at most discharge states, while the cell voltage of Li-ion batteries will decrease significantly. This also means that for example a 3.3V LDO could almost entirely discharge three NiMH cells in series, while a single Li-ion cell might drop below the minimal input voltage significantly before it has been discharged completely. [19, p. 4] The plots in figure 2.5 are only intended to visual the differences and general discharge voltage curves. Therefore should they not be used to derive further estimates or values. The discharge curves will vary strongly for example between the test currents, used duty cycles, temperatures and the battery abrasion state, but also between battery models and manufacturers. [20, 21]

4 LI-ION 1.5 NI-MH I L = 0.2C 3 I L = 0.2C 1.0 CELL VOLTAGE (V) CELL VOLTAGE (V) 1 2 3 4 5 1 2 3 4 5 TIME (H) TIME (H)

Figure 2.5: Typical discharge voltage curves [19, p. 4]

Also the total capacity of a battery will change depending on the load current, which leads to the battery providing less total power at higher output currents. This behavior can be approximated by Peukert’s Law, which is however not suitable for low-power applications like considered here. [22] For this application can the given capacity already provide in many cases a lower bound, since they are typically tested at 200mA or 0.2C. [23, 24] This used test current can be found in the corresponding datasheet and is typically above the required consumption of the wireless sensor nodes (5µA to 50mA) with additional margin.

Three other important characteristics for this work are the self-discharge rate and life-cycles for secondary batteries and the shelf-life for primary batteries. The life-cycles specify how often a battery can be recharged before failing. Typical values would be 300-500 for NiMh and 500-1000 for Li-ion batteries. [25] These values should however only be used as reference, since they also strongly depend on the battery storage conditions and charging times. [26] Batteries also discharge themselves constantly over time. This may become a significant factor, if they shall power a wireless sensor node over several years. The self-discharge rate is mostly given per month and relative to the total capacity. Typical values would be 30%/month for NiMH and for Li-ion batteries

8 2.2. Power source

5% during the first month and afterwards 3%/month. [27, p.614] Currently offers the company for example also specialized Low Self-Discharge (LSD) NiMH batteries which claim to achieve a self-discharge rate of only 15%/year (1.25%/month) and others with 30% in five years (0.5%/month). [28] These modified NiMH batteries are mainly marketed under the names ”ready-to-use“ or ”pre-charged“ depending on the manufacturer. All these values can however only be used as reference, since the self-discharge rate depends on the storage conditions and increases strongly with rising temperatures. [29] The self-discharge of primary batteries is typically lower than for secondary batteries, where the datasheets often mention a shelf-life. The shelf-life is defined as the time period for which a battery can be stored before it becomes unusable or unsuitable for the application. [30, 31] Unfortunately, the remaining state of charge is depending on the manufacturer and not noted in all datasheets. One of the few exceptions is the L91 primary Lithium battery from Energizer. Here an old version of the datasheet is giving a shelf-life of 15 years at 21°C until it will reach 90% of its rated capacity. [24] However, the current version of the datasheet has been updated to 20 years shelf-life at 21°C, without providing a remaining charge. [32] Both, Varta [33, p. 2] and Parasonic [18, p. 12], state in their handbooks that their primary Lithium batteries will remain 90% of their initial capacitance at 20°C for a shelf-life of more than 10 years. The shelf-life of Alkaline batteries is generally shorter. The corresponding handbook specifies at least 70% remaining charge at their Alkaline batteries after more than 7 years at 20°C, while they can discharge down to 20% during the same time at constant 30°C. [17, p. 10] Other datasheets state the shelf-life of their Alkaline batteries for 5, 7.5 or 10 years, but without further information. [34–36] This has been summarized in table 2.1.

Primary Type Alkaline NiMH LSD-NiMH Li-ion Lithium NCV 1.5V 3.0-3.6V 1.25V 1.25V 3.6V Rechargeable No No Yes Yes Yes Life-cycles - - 300-500 300-500 500-1000 5-10 years 10-15 years 5%/first Shelf-life/ 0.5-1.5%/ with 70% with 90% 30%/month month then Self-discharge month remaining remaining 3%/month

Table 2.1: Battery types overview

Energy harvesting The alternative to fully relying on batteries is the use of energy harvesting. This is the process of taking energy out of the environment and converting it into usable electric energy. [37] The most relevant energy sources can be found with reference values in table 2.2. It shows how much energy these sources typically provide and how much of it can be harvested using current methods. The harvesting from vibrations is often done with piezoelectric crystals, while thermal harvesting uses the Seebeck effect to generate a voltage out of the temperature difference between dissimilar metals. [37] These two types are especially suitable for devices that monitor machines, but less for the use in greenhouses or remote areas. Here could be used the harvesting of radio or solar energy. The harvesting of radio signals from the Global System for Mobile communications (GSM) Base Station Subsystem (BSS) only provides very little energy. Therefore, commercial applications that rely on this concept, like GreenWake Technologies, [38] use their own power transmitter devices which have to be located near the sensor nodes

9 2.2. Power source and continuously send on a specified frequency to power them. Therefore is it also unsuitable for the use at remote areas, if there is no main power or powerful communication infrastructure. This leaves solar energy as most suitable for the applications of Bitroot’s WSN. It is available at the targeted locations and also provides a reasonable amount of energy. This source it not controllable, yet predictable.

Source Source Power Harvested Power Light Indoor 0.1 mW/cm2 10 µW/cm2 Outdoor 100 mW/cm2 10 mW/cm2 Vibration/Motion Human 0.5m at 1 Hz 1 m/s2 at 50 Hz 4 µW/cm2 Machine 1m at 5 Hz 10m/s2 at 1 kHz 100 µW/cm2 Thermal Human 20 mW/cm2 30 µW/cm2 Machine 100 mW/cm2 1-10 mW/cm2 RF GSM BSS 0.3 µW/cm2 0.1 µW/cm2

Table 2.2: Energy harvesting sources overview [39]

A typical solar energy harvesting circuit for low power applications can be found in figure 2.6. It consists of four parts, which are the Input Stage, the Maximum Power Point Tracker (MPPT), an Energy Buffer and the Output State. The input stage is used to collect energy from the Photovoltaic (PV) panel in the energy buffer, which could be a capacitor or rechargeable battery. In this case, these two components form together an asynchronous buck-converter (cf. figure 2.3a) because is has been designed for a PV panel that provides up to 3.0V and a super capacitor with 50F at a maximal voltage of 2.5V as energy buffer. The Pulse-Width Modulation (PWM) for this buck converter is generated by the MPPT, to operate the PV module on its most efficient conditions. This can be implemented using the Fractional Open-Circuit Voltage (FOCV) algorithm, to generate the Maximum Power Point (MPP) voltage of the PV panel. The

Figure 2.6: Schematic of a solar harvester circuit for low power applications [40]

10 2.2. Power source

PWM is then generated using a hysteresis comparator between the actual and desired input voltage. This forces the input stage to operate on the MPP voltage of the PV panel. To finally provide a stable output voltage for the application, it is used another SMPS, in this case a boost converter for 3.3V. This output stage is only activated if the energy buffer reaches a specified startup voltage (smart enabler). This ensures that the output converter does not consume unnecessary power while the input voltage is below its minimal operating condition and therefore increases the total system efficiency. A special but simple harvesting circuit like this can accumulate energy and provide a stable output voltage with a total efficiency of up to 90%. [40, p. 945 ff.]

Two possible ways of modeling a PV panel are the single and double diode model, for which the equivalent circuits can be found in figure 2.7. The output current (I) can be calculated by the difference between the photo-generated current (Iph), the diode currents (IOx) and the shunt resistor (Rsh) current. This can be seen in equation 2.7 for the single diode model. [41]

The current of each diode becomes in this case a function of its reverse saturation current (Io), the output voltage and current (V , I), the shunt resistance, temperature and diode quality factor (a, typically close to one). The remaining parameters are Boltzmann’s constant (k), the charge of an electron (e) and the number of cells in series (ns). [42, p. 496]

V + RS · I I = Iph − ID − Rsh (2.7) q·(V +RS ·I) where : ID = Io · [e (ns·akT ) − 1]

The single diode model neglects several effects, like the recombination loss in the depletion region, which especially impacts its results at low irradiance. [43, p. 212f.] This is improved by the double diode model, which would additionally subtract the second diode current in equation 2.7. This requires however two additional unknown parameters, which are its reverse saturation current and diode quality factor

(a2,Io2). [42, p. 497]

R Rs s I I I I I Iph Io + ph o1 o2 +

Rsh RL V Rsh RL V - -

(a) Single diode model (b) Double diode model

Figure 2.7: Equivalent circuit of PV models

Implementations for both models are available. [44, 45] Detailed studies show, that the double diode model provides a better accuracy and results in an higher panel efficiency at the cost of an increased computational complexity. [46, p. 35][43, p. 213] Therefore, the single diode model will be used in this work. It results in a reasonable accuracy, has a simpler implementation and most parameters can be acquired out of the PV panel datasheets.

11 2.3. Previous work

2.3 Previous work

The first prototypes from Bitroot (Version 0.x) were based on a NUCLEO-L073RZ form ST Microelectronics, from which the ST-Link/V2 programmer has been disconnected. The required periphery was then added with a custom shield, which contained the battery interface and sensors. These nodes were rechargeable by using a 2000mAh lithium-ion battery at 3.6V with an off-the-shelf Universal Serial Bus (USB) charging circuit, based on the TP4056 charger [47] from NanJing Top Power ASIC and the DW01A battery protection [48] from Fortune Semiconductor. The total system run-time of these prototypes has been found to be between four to six weeks by using a wake-up period of 900s.

For extending the battery life has been done a Bachelor Thesis on analyzing the possibility of using PV modules to harvest energy from the environment. [49] For this purpose have been compared the three PV materials Copper Indium Gallium Selenide (CIGS), Amorphous Silicon (aSi) and Crystalline Silicon (cSi) based on their quantum efficiency, the solar spectrum measured in greenhouses and their power curves (I-V characteristics). This consideration lead to the conclusion that a PV module based on cSi would be most efficient and recommended. [49, p. 19 f.] It has also been analyzed the power consumption of the prototype by using an oscilloscope and a series resistance of 100Ω. This showed a current consumption of 120µA in sleep-mode, 200µA in idle-mode and 1.6mA in both RX- and TX-mode. [49, p. 18] Datasheet values would have suggested a result of about 1.2mA in sleep-mode, 8.5mA in idle-mode and more than 24mA in RX- and TX-mode. [49, p. 10] This significant deviation has been addressed and reasoned, that it might be caused by the datasheets providing typical and maximal values, so that a lower consumption is possible, and that the radio module has been used in a different setup compared to the datasheet. [49, p. 19] These measurements are also surprising, considering that the used prototype did not feature any peripheral switches, so that all components and sensors must have been powered constantly. The used test setup is shown in figure 2.8a and in figure 2.8b can be seen a measurement, where the Light-Emitting Diode (LED) of the prototype is turned off before sleep. The prototype was powered by its battery over the 100Ω measurement resistance, which voltage drop has been recorded with channel one of the oscilloscope (green in fig. 2.8a/yellow in fig. 2.8b) to determine the system power consumption. The second channel (red in fig. 2.8a/pink in fig. 2.8b) was used to trigger the oscilloscope by connecting it to a LED, which is controlled by the prototype in software.

Second probe

First probe

(a) Setup for measuring the power consumption [49, (b) Result of measuring the power consumption [49, p. 17] p. 14]

Figure 2.8: Measurement setup of the previous work

12 2.3. Previous work

Using both channels of the oscilloscope could have introduced issues, which are shown in figure 2.9 with three possible setups for this measurement. The probe of channel one has been represented in yellow, and the probe of channel two in red. The corresponding ground lines are both shown in gray, since they are also internally connected to the same ground. Now the setup is having three different reference potentials, the ground of the Oscilloscope (GNDOSC ), the independent ground of the prototype (e.g. GNDP ROT O of the microcontroller and LED) and the negative battery pin (BAT −).

Figure 2.9a is connecting GNDOSC only with BAT −. Now GNDP ROT O is having a dynamic offset by the voltage drop of the measurement resistor in reference to GNDOSC . Therefore would the additional connection of GNDOSC to GNDP ROT O, like shown in figure 2.9b, shortcut the measurement resistor over a ground loop in the oscilloscope. A valid setup with both probe grounds connected would therefore require inverting channel one, like it is shown in figure 2.9c.

+ + + Proto- Proto- Proto- type type type - - - Battery 100 Battery Battery 100 100

CH1- CH2 CH1 CH2 CH1 CH2 inverted (a) Valid setup, one GND connected (b) Invalid setup (c) Valid setup, both GND connected

Figure 2.9: Measurement setup configurations

Out of the provided information can not be concluded which exact measurement setup has been used. However, a short-cut resistance of 3.5Ω over the oscilloscope ground loop, which shorted the measurement resistor out like in figure 2.9b, would have lead to 158mV (the measured 1.6 mA) while the radio is in TX-mode with an actual system consumption of 45mA (cf. chapter 3.1) or 20mV (measured 200µA) in idle, if the actual current consumption was about 6mA (cf. chapter 3.1) and might therefore explain the received results.

Finally, also the used system setup of the PV analysis in this work is leading to several unaddressed disadvantages. The PV module has been designed with the requirement of using enough cells (14 for cSi) in series to generate 5V for the TP4056 USB charger and its minimal charging current of 0.2C (400mA for the 2000mAh battery), which leads to a required area of 59cm2 within greenhouses. [49, p. 19] Because the main design constraint was the required power for the charger, it has been suggested to reduce the minimal required charging current by using a smaller battery and different charger with less minimal current (0.1C) in the future work. [49, p. 21] One additional issue is, that daily recharging cycles from the PV-module will quickly abrade the battery. Even by assuming 1500 possible partial recharge cycle, [26] the battery would be degraded significantly in about four years. Also the issue of the battery self-discharge has not been addressed here. Out of these reasons was designed a new power source system in section 4.2, that shall solve all mentioned issues above by using the described concepts of section 2.2.

In preparation for this thesis has been designed the first custom hardware platform for the WSN of Bitroot, which schematics can be found in Appendix A and PCB design in Appendix B. A simplified block diagram can also be found in figure 2.10, where power lines are represented with continuous lines and data or signal lines are dashed. The platform is based on the same ARM Cortex M0+ microcontroller

13 2.3. Previous work

(STM32L073RZ) like the previously used NUCLEO-L073RZ board and also uses the same CC1101 radio module (Anaren A1101R08A00GM) out of the prototypes V0.x. The system has also been equipped with a user and reset button, a LED, interfaces for four Serial Peripheral Interface (SPI), four Inter-Integrated Circuit (I2C), two analogue sensors and a 24-pin general purpose interface. In addition to this have been added several features that shall protect the circuit, reduce its power consumption, analyze different components and self-monitor the system. Here, all modules that are powered constantly have been selected based on the minimal quiescent current to their alternatives and the availability on Mouser or DigiKey. This new prototype uses a single 18650 Li-ion battery with 2600mAh. As reverse polarization protection has been used a standard MOSFET setup, because it will create a lower power drop compared to a series 2 schottky diode (PD = UFW · I, where UFW = 0.2V , while PFET = RDS · I, where RDS = 52mΩ [50]). Additionally is contained a battery protection against over/under discharges and currents (AP9211). For the recharging system has been used an Electrostatic Discharge (ESD) protected micro-USB interface and the MCP73831T charging module. As main DC-to-DC converter has been placed a TPS78033, which is a 3.3V LDO with a quiescent current of 500nA, [51] and the RP604, which is a synchronous 4-switch buck-boost converter with an operating quiescent current of 300nA. [52] The datasheet of the RP604 is especially surprising, considering that that the best and comparable buck-boost converters from Texas Instrument require a minimal quiescent current of 11µA to 30µA, [53] which would already be more than the targeted total sleep consumption of the system (< 10µA). These converters were analyzed and compared in more detail in section 3.1, to determine which one is most suitable for the application. The CC1101 radio module is powered by a separate 2.1V buck converter, since this is recommended as main measure to reduce its power consumption in the corresponding datasheet. [54, p. 3]. For compatibility with sensors or interfaces that may be used in the future has also been added a buck-boost converter for generating 5V. All components and converters that do not need to be powered constantly can be disconnected with switches by the microcontroller and idle in a disconnected state if the STM32L0 is in a deep sleep mode to reduce the system power consumption. Finally, the system can also monitor itself through voltage dividers to measure the 5V, 3.3V and 2.1V power supplies, as well as the battery voltage and the charging state.

Battery Charger micro-USB switchable DC-to-DC DC-to-DC 3.3V Buck-Boost 5V Buck-Boost 18650

Battery Battery switchable Reverse Protection Protection DC-to-DC Polarisation DC-to-DC 2.1V Buck 3.3V LDO

selector

CC1101 switches Radio Module Core System: STM32L0 with LED and Buttons Sensors and Interfaces

Figure 2.10: Simplified block diagram of prototype V1.0

14 2.4. Measurement methodology

2.4 Measurement methodology

One key aspect of this project is the power analysis of different prototypes and components, which can be done by monitoring the system current consumption at a specified voltage. The main issue here is the big measurement range from several hundred nA to mA. This requires a small minimal resolution and a seamless transition between different ranges during the measurement.

For this work have been compared four different power analyzers, which can be seen in table 2.3. The first one is a simple breakout board for the INA219B IC from Texas Instrument. It has a very low cost and sufficient measurement range for the prototypes. Its main drawbacks are, that it does not change between different measurement ranges automatically and therefore only provides a minimal resolution of 100µA. This is not sufficient to measure for example an expected sleep current below 10µA. Also the maximal Sampling Rate (SR) of 1.7 ksps is insufficient to detect current consumption peaks. Therefore can the issues not be solved by replacing its measurement shunt. The second option is the Power Profiler Kit from Nordic Semiconductors, which has been designed for the power analysis of their nRF52-DK board and therefore for low-power IoT applications. Although it was designed for a specific board, it can also be used for custom platforms by connecting it to the power lines of the profiler correctly. Its measurement range is sufficient and also its SR of 77 ksps is enough to detect current peaks of the SMPS. The board is similar to the X-NUCLEO-LPM01A from ST Microelectronics, which has been designed to analyze Nucleo based prototypes, but can also be used for any custom hardware by connecting it correctly. Its measurement range is slightly smaller, but its SR is at 100 ksps and resolution at 100nA. This is especially beneficial by analyzing the different DC-DC converters with an expected quiescent current of down to 300nA. The last option is the Otii Arc from Qoitech. It is the most expensive one and also provides the biggest measurement range with up to 5A. However both, the SR and resolution, are insufficient for some of the discussed measurements above.

Out of these reasons, all measurements in this work were done with the X-NUCLEO-LPM01A. It can generate an output voltage of up-to 3.3V, which was increased with an additional Voltcraft PS-1152 A power supply in series if required.

INA219B nRF52 X-NUCLEO- Device Otii Arc breackout Profiler Kit LPM01A Texas Nordic ST Micro- Manufacturer Qoitech Instruments Semiconductor electronics Reference [55, 56] [57] [58] [59] 0 - 400 mA at Range 0 - 70 mA 0 - 50 mA 0 - 5 A 0.1Ω 1% resistor 100 µA (12-bit) Min. resolution 200 nA 100 nA 1% + 500 nA 780 µA (9-bit) 1.7 ksps (12-bit) Max. SR 77 ksps 100 ksps 4 ksps 10 ksps (9-bit) Price 94.76 SEK 754,81 SEK 650.30 SEK 5471.81 SEK

Table 2.3: Considered power analyzers

15 2.4. Measurement methodology

The exact measurement setups are stated in the corresponding chapters. However, the different prototypes offer some general options and limitations. The prototype V1.0 offers the possibility to power only the core system (no battery protection or 3.3V DC-DC converter) through jumper JP7. Jumper JP6 can be used to additionally power a 3.3V DC-DC converter or JP13 and JP14 (at the battery input) to power the whole system. These setups were used for example in section 3.1 to debug and analyze the system. To analyze only the 3.3V DC-DC converters (TPS78033 & RP604) was used jumper JP6 as supply input. The core system was disconnected by removing JP7 and instead, these pins were used to connect several external resistors to generate different output currents. These measurements were repeated using different input voltages between 2.4V and 3.9V to analyze their efficiency and quiescent current at different battery states. The prototypes V1.3 and V2.0 can only be analyzed using JP13 and JP14 (at the battery input) to power the whole system or the connector P13 to power the whole system without battery protection. All measurements, which are not explicitly stated differently, were done using 3.3V and a SR of 100 ksps. By measuring currents below 100µA, at least 10 seconds were recorded at 100 ksps and then given the average consumption value.

For the energy harvesting analysis have been used illumination values, that were recorded from Bitroot’s nodes with an MAX44009 light sensor. To verify the correctness of this data, reference measurements with an URCERI MT-912 light meter have been taken (cf. section 4.3). Its measurement range is with 0 to 200klux above the maximal measured value in the data set and it has a precision of ±3%. [60]

16 3 Hardware design

3.1 Analysis and optimization

The initial commissioning of the hardware platform V1.0 was done by testing the different system components individually. Until it is stated differently, all tests were done at a clock speed of 2 MHz and using the 3.3V LDO TPS78033 instead of the SMPS RP604, because its simpler circuit is less prone to errors and does not generate additional current peaks, which could cover any unexpected behavior.

Platform analysis The system can be characterized by its power consumption during sleep, the used duty cycle and its average consumption during the wake time. The total sleep current should be the combined quiescent currents of the 3.3V LDO (500nA [51]), the microcontroller (850nA [7, p. 18]), the battery protection (3µA [10, p. 5]) and the shutdown current of the 2.1V buck converter (1µA [61, p. 5]). With additional margin for the efficiency of the LDO by powering the microcontroller (cf. section 2.1) could be expected a total sleep current of about 6µA. The wake time and average consumption will depend on the used firmware, but a run current of about 3mA can be expected for the STM32L0+ [7, p. 68] with additional 11mA by turning on the LED or 34mA for the transmission with the radio module. [54, p. 10] A first measurement at the prototype V1.0 can be seen in figure 3.1. It was powered with 3.3V at JP5, to supply the entire platform except the battery protection. Therefore should the sleep current be reduced to about 3µA. The running firmware used a sleep cycle of 10s, blinked the LED for 100ms, then read both sensor values and sent the results to a base station using the CC1101 radio module. The corresponding power trace of two wake-up cycles and the sleep current in between can be seen in Figure 3.1a. The second figure 3.1b shows an overlay of three different wake-up cycles. They are very consistent and do not show an unexpected behavior or deviation between each other. By analyzing the measurement closer with the STM-Power-Monitor [62], it can be seen that the total wake time was 1.73s with a total average consumption of 11.70mA. The typical run current of the microcontroller was at 2.92mA and increased to 18.08mA by turning on the LED. The system consumption peak was during the radio transmission

50 50 Cycle at sec. 22 Cycle at sec. 32 40 40 Cycle at sec. 42

30 30

20 20 input current [mA] input current [mA] 10 10

2.105mA 0 0 20 22 24 26 28 30 32 34 0 0.5 1 1.5 2 2.5 time [Seconds] time [Seconds]

(a) Two wake-ups with one sleep period (b) Overlay of three wake-up cycles

Figure 3.1: First system measurement, powered from V_Supply pins (JP5) with sensors and radio

17 3.1. Analysis and optimization with a total of 45.90mA. Enabling the periphery increased the system consumption to 7.52mA, which is unexpected since both sensors should draw together less then 1mA. Most surprisingly was however the high sleep consumption of 2.11mA, which is about 700 times above the expected value of 3µA.

The firmware of the platform has been modified to a period of 100s to simplify the investigation of the high consumption during sleep. It was found that the peripheral 2.1V buck converter turned on by itself and therefore also started the radio module into its initial configuration. This indicated a floating enable signal for the buck converter during sleep periods. With the measurement in figure 3.2 could be confirmed that this behavior was caused by the pull-down resistor (R6). The system was powered identically to the previous setup, but all sensors have been removed. This already caused a decrease in the system consumption from 2.11mA to 1.75mA, which also indicated that the periphery got enabled unintentionally during the sleep period. By then short-circuiting the pull-down resistor R6, it could be seen that the power consumption dropped to about 160µA. By doing this, the 2.1V buck converter got disabled and shut down its output voltage to the radio module. Therefore got the resistor R6 reduced to 50kΩ, which should further decrease the consumption compared to the short-circuiting test. To avoid issues with floating signals at this point, it would be recommended to use a periphery switch to not only disable the module, but fully disconnect the buck converter from its power supply in the next revision and avoid its additional shutdown current.

manually shortcutting R6 at second 6-9, 16-22 and 28-31

2,000 1750µA

1,500

1,000

input current [uA] 500

160µA 0 5 10 15 20 25 time [Seconds]

Figure 3.2: Floating line - power at V_Supply (JP5), no sensors connected, sleep state

After this issue has been solved, the full system consumption (including battery protection) was measured by powering the prototype from JP13 and JP14 with reconnected sensors. Figure 3.3a shows two wake cycles in a 10s period. By analyzing the measurement can be seen that the sleep current has successfully been reduced from 2.11mA to 56.54µA. At the same time, seemed the whole power trace distorted. By looking closer at a single wake period (figure 3.3b) can been seen that there was a strong oscillation over the entire signal. Because this oscillation disappeared by powering the system without battery protection, it is likely being caused by this component or an interference with it.

By taking a close look at the oscillation (figure 3.4), it can be seen that there are two switching operations. The first one enables the output current for 10ms, until it is getting disabled for 2ms. This caused the oscillation with a total period of 12ms around the actual system consumption. These measured timings are the delays, which are specified in the battery protection datasheet for its discharge overcurrent detection delay time (10ms) and discharge overcurrent release delay time (2ms). [10, p. 15] Because this oscillation

18 3.1. Analysis and optimization

50 50

40 40

30 30

20 20

input current [mA] 10 input current [mA] 10 50.54µA 0 0 22 24 26 28 30 32 34 22 22.5 23 23.5 time [Seconds] time [Seconds]

(a) Two wake-ups with one sleep period (b) Overlay of three wake-up cycles

Figure 3.3: Full system measurement, powered from battery pins with sensors and radio could be found during the entire measurement, it indicated that the battery protection was triggering itself through its overcurrent detection. One cause of this issue could be a short-circuit between output pins of the IC. Desoldering the component revealed a significant amount of excess solder paste at its thermal pad. After it has been cleaned and the component got soldered back on, the oscillations in the power trace were also gone.

Oscillation from the battery protection 12 10mS 10

8

6

4

input current [mA] 2 2mS 0

22.41 22.42 22.43 22.44 22.45 22.46 time [Seconds]

Figure 3.4: Oscillation Issue - power at the battery input, sensors connected

For the next measurement has the software been updated to include several self-tests and blinked the LED a total of nine times to signal the system state. The whole system was powered with 3.3V and used the LDO at the core voltage. One major difference was, that the sensors have been disconnected to see if other currents exceed their expected values during the tested states. The measurement results can be seen in figure 3.5. Figure 3.5a shows two wake-up cycles with the sleep consumption in between. The wake time got increased to 3.17s by the software modification. The system consumption got decreased from 2.92mA (initial measurement figure 3.1) to 781µA with disabled periphery and the sleep current is unchanged at 54.1µA to the previous measurement (figure 3.3). Figure 3.5b shows an overlay of two wake-up periods. They do not show an unexpected deviation and no increased currents despite the nine times of LED blinking and radio transmission. An additional measurement with sensors showed that the consumption with enabled

19 3.1. Analysis and optimization

50 50 Cycle at sec. 22 40 40 Cycle at sec. 32

30 30

20 20 input current [mA] input current [mA] 10 10

54.05µA 0 0

12 14 16 18 20 22 24 26 0 1 2 3 4 time [Seconds] time [Seconds]

(a) Two wake-up cycles with sleep period (b) Overlay of two wake-up cycles

Figure 3.5: Full system measurement, powered from the battery pins with radio but no sensors periphery was at 4.41mA and that the total average wake consumption was at 8.49mA.

While the currents at run-time reached about their expected values, the sleep current was still by a factor of nine above the expectation of 6µA. This big deviation indicates that there was another component drawing power during the sleep periods. By taking a close look into the schematics of V1.0 (Appendix A), can be seen that there is a pull-up resistor (R38) of 100kΩ connected to the system core voltage for the quality feedback of the 2.1V buck converter. The datasheet of the TPS6274 specifies the connected pin to be high impedance with an input bias current of 25nA, if the output power is good and enabled. [61, p. 6] The block diagram of this datasheet also shows that the pin will otherwise be pulled directly to ground by a MOSFET. [61, p. 8] This causes an additional sleep current of about 33µA. The issue was resolved on the prototype by manually reconnecting the pull-up resistor R38 to the periphery supply instead of the system core voltage. By repeating the measurement could be found that the sleep current got reduced to 19.5µA, so that this modification should be kept in the next revision of the system. Finally has been taken a closer look at the running firmware, which showed that not all pins got changed to analogue inputs before activating the deep sleep mode. By doing this like recommended, [63, p. 27] the sleep current got reduced further to 11.6µA. This brought the actual sleep consumption closer to the expected value. The left deviation might be caused by the improper soldering of the prototype or components that got damaged by overheating them during the soldering process.

An overview of the most important changes and their impact on the power consumption can be seen in table 3.1, but it should be noted that these measurements are not directly comparable. While the initial

avg. wake- ref. Version wake time sleep-current D*1 total avg.*1 current A Initial V1.0 11.70mA*2 1.73s*2 2.11mA 1.92 ‰ 2.128mA B V1.0 no floating 2.1V 8.49mA 3.17s 54.1µA 3.52 ‰ 83.8µA V1.0 no floating 2.1V C 8.49mA 3.17s 11.6µA*3 3.52 ‰ 41.4µA & modified R38

*1 for a 900s period time *2 using a firmware for minimal wake time *3 setting GPIOs to analogue input before sleep

Table 3.1: V1.0 modification overview

20 3.1. Analysis and optimization measurements (ref. A in table 3.1) were taken without battery protection and a firmware for a minimal wake time, the other measurements (ref. B, C) were taken with an extended wake time to execute different self-tests and have been powered completely (with battery protection). The different wake times also lead to different duty cycles (D), which are shown for a cycle period of 900s. These results (table 3.1) can be used for a first estimation of the system run-time, by assuming an ideal battery with no self-discharge. Figure 3.6 is based on a battery with 2600mAh, like it is used by Bitroot. Figure 3.6b summarizes the used test parameters and results, that were used to approximate the system run-time in figure 3.6a. Here can be seen the weighted average consumption based on the used duty cycles, where the contribution of the sleep current is shown in blue and the contribution of the wake current in red. The approximated system run-time is given in month (green). It can be seen that the system run-time of A was limited to less then two months, where 98.9% of the total power was required for the sleep periods. The run-time was increased to 42 months by setup B, but also here were still 64% of the power drawn during sleep. Only the final modifications (C) reduced the consumption during sleep below 28% and increased the expected run-time at an ideal battery with no self-discharge and an average voltage of 3.3V to about 86 months.

weighted avg. current [mA] 0 0.5 1 1.5 2 A* 2.128 A B C 1.92 ‰ 1.7 * * * sleep current [µA] 2110 54.1 11.6 B* 0.084 wake current [mA] 11.70 8.49 8.49 3.52 ‰ 42.5 wake time [ms] 1.73 3.17 3.17 C* 0.041 clock [MHz] 2.0 2.0 2.0 3.52 ‰ 86

Test and duty cycle Utest [V ] 3.3 3.3 3.3 0 20 40 60 80 expected run-time [month]

sleep [mA] wake [mA] run-time [month]

(a) Run-time estimation (b) Summary of key parameters *referencing A-C out of table 3.1

Figure 3.6: V1.0 power consumption assuming an ideal 2600mAh battery (T = 900s)

DC converter analysis Before the next revision was designed should be analyzed the used DC-DC converters in more detail. Besides the 3.3V LDO, which has been used so far, contains the prototype a 4-switch synchronous buck-boost converter (RP604). This SMPS is unique for its quiescent current of only 300nA based on its datasheet values. [52] It is equivalent to figure 2.4, with the main difference of using two p-channel and two n-channel MOSFETs (cf. [52, p. 2ff.]). They are both having a resistance of 150mΩ (RDSon ) and the used inductor has a DC resistance of 100mΩ. As another alternative for the system core voltage should be considered the TPS78030, which is a 3.0V LDO that could discharge the Li-ion batteries further than the TPS78033. Finally, the system is using a buck converter TPS6274 at the radio module, whose efficiency should be analyzed to see if it fulfills the required efficiency to save energy on the platform.

21 3.1. Analysis and optimization

100

90

80 Vin=2.7V Vin=3.6V 70 Vin=4.5V efficiency [%]

60

50 0.001 0.01 0.1 1 10 100 1,000 output current [mA]

(a) TPS78033 efficiency estimation (b) RP604x efficiency estimation [52, p. 1]

Figure 3.7: Estimated converter efficiency

The datasheet of the LDO TPS78033 does not contain information about its efficiency, but it can be approximated with equation 2.2 as it is shown in figure 3.7a. In comparison to this can be seen the efficiency out of the RP604 datasheet in figure 3.7b. Its efficiency could also be approximated in combination of equation 2.3 , 2.5 and 2.6, but for the considered low output currents is the AC switching loss dominant and the available datasheet values are more precise. They indicate that the efficiency of the RP604 is expected to be between 80%-90%, while the efficiency of the LDO will increase, the closer the input voltages comes to 3.3V or below.

The efficiency of both modules has been analyzed on the prototype by using JP6 and JP7 with several different resistances to generate different output currents. The tested input voltages are between 2.4V and 3.9V, since this is the most relevant range for the use with a Li-ion battery. The results of these measurements are shown in figure 3.8. The efficiency of the TPS78033 (figure 3.8a) is at 3.6V as expected at about 90%. It increases for lower input voltages, but here also dropped the output voltage correspondingly

100 100

90 90

80 80

70 70

60 60 efficiency [%] efficiency [%] 50 50

40 40

0.01 0.1 1 10 0.01 0.1 1 10 output current [mA] output current [mA]

Vin = 2.4V , IQ = 5.48µA Vin = 2.4V , IQ = 1.27µA Vin = 2.7V , IQ = 5.53µA Vin = 2.7V , IQ = 1.27µA Vin = 3.0V , IQ = 6.27µA Vin = 3.0V , IQ = 1.29µA Vin = 3.3V , IQ = 5.34µA Vin = 3.3V , IQ = 1.53µA Vin = 3.6V , IQ = 1.59µA Vin = 3.6V , IQ = 1.22µA Vin = 3.9V , IQ = 1.41µA Vin = 3.9V , IQ = 1.18µA

(a) TPS78033 (3.3V LDO) efficiency measurement (b) RP604 (3.3V buck-boost) efficiency measurement Figure 3.8: Measured converter efficiency

22 3.1. Analysis and optimization to the input below 3.3V. Therefore is the high efficiency between 2.4V and 3.3V beneficial, but not relevant for the application. Especially surprising was the high quiescent current. It is about 1.5µA for input voltages above 3.3V, and for input voltages at or below 3.3V at about 5.5µA. Because of this strong deviation from the datasheet value (500nA [51]) were these measurements repeated with a second identical IC, which lead to similar results within the range of ±5% for the quiescent current. Also a strong leakage current at the capacitors has been considered, but removing them only reduced the quiescent current by about 100nA each. Therefore, the high quiescent currents are reproducible, but no issue could be found. The measured efficiency of the PR604 in the used setup can be seen in figure 3.8b. Its efficiency is between 80%-90% at a quiescent current of about 1.3µA, which is also above its datasheet specification. The efficiency at 3.9V and 3.6V is similar to the TPS78033, while it is about 15% below the LDO for lower voltages. The main difference is however that it was still providing actual 3.3V at the output. By using the RP604 in the next revision could be expected an increase in the power consumption during the wake time by about 10% (from 8.49mA to 9.34mA, cf. figure 3.8) because of its lower efficiency at 3.3V, while the sleep current should get reduce by about 4µA (from 11.6µA to 7.6µAs, cf. figure 3.8). This should also decrease the total system consumption from 41.5µA to 40.5µA.

The two other relevant converters for this system are the TPS78030, which is a 3.0V LDO that is often used in battery driven devices instead of the TPS78033 out of the mentioned reasons, and the TPS6274, which is a configurable buck converter that is used in the platform to generate 2.1V for the CC1101 radio module. Operating the CC1101 radio module at 2.1V is the main measure to reduce its power consumption and the datasheet recommends the use of the TPS62730 buck converter. [54, p. 3] Figure 3.9a shows that the power consumption during the transmission of data can be reduced by 12% to 34% this way. In figure 3.9b can be seen the efficiency of the used buck converter, which is typically between 85% to 95% if the output current is above 1mA. Because the TPS62730 is only available as USON(6) package (1.45mm x 1.00mm), it has been used the TPS6274 buck converter in WSON package to simplify the manual manufacturing. Its shutdown current is given with 360nA and its efficiency is comparable to the TPS62730. [61, p. 15] To ensure that this additional module does not increase the required consumption, it should be analyzed its actual efficiency in the used setup.

100

95 VIN = 2.1 V Bypass 90

85 VIN = 2.3 V 80 VIN = 2.7 V VIN = 3 V 75 VIN = 3.6 V

Efficiency - % - Efficiency 70

65 TPS62730 V = 2.1 V, 60 OUT ON/BYP = High, L = 2.2m H, 55 COUT = 2.2m F 50 0.1 1 10 100 IO - Output Current - mA

(a) Typical TX consumption at +12 dBm PTX [54, p. 3] (b) TPS62730 efficiency [64, p. 14]

Figure 3.9: CC1101 power consumption

23 3.1. Analysis and optimization

Figure 3.10b shows the measured efficiency of the TPS6274, which reached the required efficiency of 85%-95% like the TPS62730. Therefore should it be a valid choice for reducing the CC1101 power consumption. While its shutdown current (ISD) is at about 320nA, its quiescent current is at about 15µA. This is acceptable, since the module will only be used while the radio is active. Figure 3.10a shows the results for the alternative 3.0V LDO. Because of the reduced output voltage is its efficiency below the TPS78033 and its quiescent current of 500nA could be confirmed for the specified input voltage range. It is more suitable for Li-ion batteries since it can discharge them almost completely, while the TPS78033 would drop in its output voltage when there is about 5%-12% capacity left for typical discharge curves of different 18650 batteries. [21] On the other hand is the TPS78033 providing a better efficiency in the relevant input range. Another general advantage of using an LDO over the RP604 (SMPS) is the clean output voltage and improved electromagnetic compatibility.

100 100

90 90

80 80

70 70

60 60 efficiency [%] efficiency [%] 50 50

40 40

0.01 0.1 1 10 0.01 0.1 1 10 output current [mA] output current [mA]

Vin = 2.4V , IQ = 5.65µA Vin = 2.4V , IQ = 12.13µA, ISD = 0.26µA Vin = 2.7V , IQ = 5.66µA Vin = 2.7V , IQ = 16.15µA, ISD = 0.31µA Vin = 3.0V , IQ = 5.44µA Vin = 3.0V , IQ = 15.54µA, ISD = 0.35µA Vin = 3.3V , IQ = 0.42µA Vin = 3.3V , IQ = 14.80µA, ISD = 0.32µA Vin = 3.6V , IQ = 0.42µA Vin = 3.6V , IQ = 13.65µA, ISD = 0.34µA Vin = 3.9V , IQ = 0.42µA Vin = 3.9V , IQ = 17.43µA, ISD = 0.35µA

(a) TPS78030 (3.0V LDO) efficiency measurement (b) TPS6274 (2.1V buck) efficiency measurement

Figure 3.10: Measured converter efficiency

At the same time would give the use of the RP604 buck-boost converter the advantage, that the power supply becomes independent of the system, which is especially important for the energy harvesting considerations like in section 4.2. Here, it is required to use a SMPS to step up the harvested output voltage in the storage element. At the same time can be guaranteed that Li-ion batteries could be discharged completely without any drop in the system core voltage and at a similar efficiency and quiescent current to the TPS7803x LDOs. Out of these reasons was the next revision V1.3 based on the RP604 buck-boost converter.

Platform re-design and battery impact The new revision V1.3 has been designed and contains all modifications that were described so far. Additionally was connected the USB interface to the microcontroller to enable a data interface to a computer. Additionally has been written a small bootloader, so that the firmware can be updated over the USB interface and without programmer. It has also been added a micro SD-card slot and a LSM6DSOX Inertial Measurement Unit (IMU), which can be switched on individually. The peripheral

24 3.1. Analysis and optimization

DC-DC converters can now be disconnected completely from their power source and it has been added an additional base station interface. The schematics of this revision can be found in Appendix C and its PCB layout in Appendix D.

The prototype has been manufactured manually using a stencil and was tested with an identical firmware to the previous revision. The actual measurement results can be seen in figure 3.11. The average and sleep current match their expected values very well, as it is shown in figure 3.11b. This reduced the power which is drawn during sleep below 19% and the average consumption from 41.5µA to 40.4µA. These are the final results for the ARM Cortex-M0+ based platform.

weighted avg. current [µA] 0 10 20 30 40

V1.0 41.5 V1.0 V1.3 3.52‰ 85.94 sleep current [µA] 11.6 7.59 µA 8490 9330 V1.3 40.4 wake current [ ] 3.52‰ 88.15 wake time [ms] 3170 3170 clock [MHz] 2.0 2.0 0 20 40 60 80 Utest [V ] 3.3 3.3 Version and duty cycle expected run-time [month] sleep [µA] wake [µA] run-time [month]

(a) Run-time estimation (b) Summary of key parameters

Figure 3.11: Comparison of V1.0 and V1.3 (T = 900s)

While it has been assumed an ideal battery in the previous comparisons, the battery self-discharge shall now be taken into consideration as well. The system is currently using a 18650 rechargeable Li-ion battery which will be compared to a primary Lithium battery, since they have the lowest self-discharge (c.f. table 2.1). This is especially important for low-power applications like this, where the self-discharge might exceed the system consumption. In this case, Lithium batteries also have the advantage of providing enough voltage to operate the RP604 buck-boost converter within its specified range by a single cell. To simplify the computation of the average system consumption, the self-discharge will be approximated with an equivalent DC current leakage at the load. This way can be estimated the average power consumption like shown in equation 3.1. Here, the average current is computed with the sleep and average wake consumption based on the used duty cycle (wake time twake/wake-up period T ) with an additional offset by a battery DC current leakage (IDCL).

h twake twake  i P = US · Iwake · + Isleep · 1 − + IDCL (3.1) T T The battery leakage current has been approximated based on table 2.1 and a battery size of 2600mAh. The self-discharge was linearised for simplification, which results for primary Lithium batteries in 0.0833% loss per month (10% in 10 years), compared to about 3% per month for secondary Li-ion. This corresponds to a discharge of 2.1658mAh/month for the primary Lithium battery and can therefore be approximated with a continuous DC leakage current of about 2.97µA. The secondary Li-ion battery would loose about 78mAh/month and is therefore approximated with a continuous DC leakage current of 106.85µA. Figure 3.12b summarizes the used measurements and parameters that have been used in the run-time

25 3.2. Edge AI modification estimation of figure 3.12a. Here can be seen that the self-discharge of the secondary Li-ion battery exceeds the system consumption and therefore decreases the expected possible run-time from 88 month (figure 3.11) down to 24 months. The self discharge of the primary Lithium battery only increases the system consumption by 7% and results in an expected run-time of 82 months. This result of about seven years reduces the impact of the linearised self-discharge, since it was estimated based on a ten year period.

weighted avg. current [µA] 0 20 40 60 80 100 120 140 160 Li-ion*1 Pri-Li*1 sleep current [µA] 7.59 7.59 Li-ion 147.25 wake current [µA] 9330 9330 3.52‰ 24.19 wake time [ms] 3170 3170 Pri-Li 43.37 clock [MHz] 2.0 2.0 3.52‰ 82.12 Utest [V ] 3.3 3.3 2 0 20 40 60 80 self-discharge* [µA] 106.85 2.97 Battery and duty cycle 1 expected run-time [month] * assuming an average cell voltage at 3.3V 2 sleep [µA] wake [µA] * approximated with table 2.1 self-discharge [µA] run-time [month]

(a) Run-time comparison (b) V1.3 parameters with self-discharge Pri-Li = primary Lithium

Figure 3.12: Run-time of V1.3 with a 2600 mAh battery and self-discharge (T = 900s)

The analysis of this chapter showed, that the platform sleep consumption has a significant impact on the system run-time for low duty cycles (c.f. figure 3.6) and that its reduction is a key factor for long-term deployable WSNs. It could also be shown that the RP604 buck-boost converter offers new possibilities through its unique quiescent current for low-power hardware designs and can offer a bigger flexibility, while keeping a steady efficiency. Finally has been seen that secondary Li-ion batteries are unsuitable for long-term deployable WSNs because their self-discharge can quickly exceed the actual system consumption. Therefore is the low self-discharge of primary Lithium batteries required to achieve long system run-times.

3.2 Edge AI modification

In section 3.1 has been re-designed the platform to V1.3, which is optimized for a minimal power consumption in environmental monitoring applications. However, Bitroot would like to use the platform besides environmental monitoring purposes also for edge AI applications. This means that the data processing will be done locally on the wireless sensor nodes, instead of being transmitted and processed on a server. One advantage is, that this enables real-time operations for industrial setups. Another aspect is, that the computation of the network locally might require less energy than sending the equivalent data, which should be analyzed further in this work. Therefore, the platform is modified to V2.0 in this chapter. It contains the previous power optimizations and is additionally suitable for predictive maintenance applications. In the direct comparison to V1.3 can then be seen, how these additional capabilities effect the system run-time during the environmental monitoring.

The rapid prototyping of Artificial Neural Networks (ANNs) can be done using high level frameworks like for example Keras. [65] It is used to generate models and train their parameters based on collected

26 3.2. Edge AI modification data. The model then has to be ported for running on an ARM Cortex-M microcontroller and needs to be validated, to ensure that the generated code is equivalent to the trained network. One possibility of porting the network, is to use the CMSIS-NN Software Library, [66] which provides among others efficient implementations of convolution, pooling or activation functions and fully-connected layers for ARM Cortex-M microcontrollers. This process with validation is however fairly complicated and time consuming. To automate and simplify this process, released STMicroelectronics in January 2019 STM32CubeAI [67] as an extension to STM32CubeMX. It generates an optimized library for different ARM Cortex-M microcontroller out of an ANN, that has been trained in a framework like Keras, Caffe or Lasagne. It can also reduce the required memory size by using a weight compression and provides a validation for the generated code directly on the target.

Pre-study on the NUCLEO-F411RE This process has been tested using a NUCLEO-F411RE, with an ANN that was trained and provided by Bitroot in a h5 data format. It is a regression model with the structure shown in table 3.2 and was designed for predictive maintenance applications to detect engine failures based on a public data set. It contains two layers of Long Short-Term Memorys (LSTMs) with dropout and one dense layer. The model contains a total of 80651 parameters and was used as a reference network in this project.

Layer (type) Output Shape Param # lstm_1 (LSTM) (None, 50, 100) 50400 dropout_1 (Dropout) (None, 50, 100) 0 lstm_2 (LSTM) (None, 50) 30200 dropout_2 (Dropout) (None, 50) 0 dense_1 (Dense) (None, 1) 51 activation_1 (Activation) (None, 1) 0 Total params: 80,651 Trainable params: 80,651 Non-trainable params: 0

Table 3.2: Regression model - test network

The code for the NUCLEO-F411RE was generated of this model by using STM32CubeAI and the resulting memory requirements can be seen in table 3.3. In this specific case, the compression of level 0, 4 and 8 did not succeed to reduce the required memory and gave identical results for all tests. The entire system complexity is at about 4 million Multiply-Accumulate (MAC) operations and it requires 316.8 kB Read-Only Memory (ROM).

compression complexity activation weights ROM size RAM size 0/4/8 4037550 MAC 316.80 KBytes 324404 bytes 316.80 KBytes 19.73 KBytes

Table 3.3: Edge AI test network - generated code

The implemented validation engine of STM32CubeAI, computes the network output for random inputs on the system host and target platform to then compute the L2 relative error based on equation 3.2. Here,

Fj are the flattened arrays of the output on the target and fi are the flattened arrays of the original

27 3.2. Edge AI modification host output. [68, p. 25] The validation is considered as passed, if the L2 relative error is below 0.01 and resulted in 2.28 · 10−7 for the tested regression model.

kFj − fik ei = (3.2) kFjk

The overview of the performance analysis on the NUCLEO-F411RE can be seen in table 3.4. The NUCLEO-F411RE is build around the STM32F411RE, which is an ARM Cortex-M4 microcontroller with single-precision Floating-Point Unit (FPU) and a maximal clock speed of 100MHz. The computation of the entire network took 531.007ms at the used clock speed of 84MHz, of which 63.5% of the time was required for the LSTM layer 1, 36.5% for the LSTM layer 2 and less than 0.01% for the final dense layer.

Platform clock total duration CPU cycles tLST M1 tLST M2 tDense1 NUCLEO-F411RE 84MHz 531.007ms 44547129 337.360ms 193.638ms 0.009ms

Table 3.4: Edge AI pre-test

This setup enables the generation of code with verification and deployment from a given Keras model within less than one hour, which makes it ideal for the rapid prototyping at Bitroot. Also the required computation time for the test network is reasonable compared to the current wake time of 1.7s to 3.2s.

Platform modifications The supported microcontrollers of CubeAI are the STM32-Series, which are build on an ARM Cortex-M4 or Cortex-M7. The most powerful microcontroller in their low-power series is therefore the STM32L4+, of which the STM32L4S5VI provides the most flash memory (2MB) in the LQFP-100 packaging and with AES-256 hardware implementation. Its datasheet specifies a sleep current of 770nA with RTC enabled, which is slightly below the currently used STM32L073RZ. [8, p. 144] It is an ARM Cortex-M4 and provides a single-precision FPU at a maximal clock speed of 120MHz, which is similar to the tested NUCLEO-F411RE. For comparison, the used STM32L073RZ of V1.3 is based on the ARM Cortex-M0+, has no FPU and can be clocked at maximally 32MHz.

Figure 3.13 shows a theoretical comparison of the expected microcontroller power consumption at the periphery setup which is used in the running firmware at different clock speeds. While the power estimator of STM32CubeMX supports only the range of 4MHz to 16MHz for the STM32L073RZ, the STM32L4S5VI could be estimated from 500kHz to 80MHz. This indicates that the power consumption of the microcontroller would increase by 51% to 73% by changing from the STM32L073RZ to the STM32L4S5VI at comparable clock speeds. Considering that this is however only a small contribution to the total wake consumption compared to the board periphery and radio module, its impact on the average wake consumption and especially the total power consumption at low duty cycles should be insignificant by adjusting the clock speeds correctly. Therefore was the next revision (V2.0) build on the STM32L4S5VI and it could be expected similar performance results to table 3.4 by computing the same ANN. This new system is identical to V1.3, with the only differences of using the new microcontroller and another interface to the micro SD-card. Its schematics can be found in Appendix E and the PCB design in Appendix F.

The new prototype V2.0 was build manually with stencil and the bootloader and firmware have been ported correspondingly. Figure 3.14 shows a comparison of actual measurements on V1.3 and V2.0. The

28 3.2. Edge AI modification ]

mA 10

current consumption [ 1

1 10 100 clock frequency [MHz]

STM32L073RZ (4MHz - 16MHz estimation possible) STM32L4S5VI (500kHz - 80MHz estimation possible)

Figure 3.13: Run current estimation using STM32CubeMX at firmware periphery initialization clock speed of 500kHz and 2MHz in V1.3 were generated using the Multi Speed Internal (MSI) clock generator and Advanced High-performance Bus (AHB) prescaler, while the 32MHz clock required the use of the internal Phase-Locked Loop (PLL). The 500kHz setting (V1.3, figure 3.14a) showed a significant increase in the wake time to about 3.9s. At 2MHz and 32MHz got the used software delays dominant, so that the required wake time did not reduce below 2.9s. The change from 2MHz to 32MHz showed however a significant increase in its current consumption, from about 0.97mA to 10.76mA.

Because of the increased maximal frequency for V2.0 (figure 3.14b), it be should analyzed at 4MHz, 30MHz, 60MHz and 120MHz. Switching on the periphery and LED at 60MHz and 120MHz caused however an over-current peak for the X-NUCLEO-LPM01A power analyzer, so that no power measurements were possible at these settings. While the 4MHz could be generated from the MSI oscillator, the other frequencies were generated using the internal PLL. The measured wake time was for both 4MHz and 30MHz at 3s, while the consumption increased from 1.8mA to 9.2mA. By comparing the total average wake consumption between V1.3 and V2.0 at 2MHz and 4MHz can be seen that it increased by about

50 f = 500kHz 50 f = 4MHz f = 2MHz f = 30MHz f = 32MHz 40 40

30 30

20 20 input current [mA] input current [mA] 10 10

0 0 0 1 2 3 4 0 1 2 3 4 time [Seconds] time [Seconds]

(a) Version 1.3 (b) Version 2.0

Figure 3.14: Comparison of V1.3 and V2.0

29 3.2. Edge AI modification

V1.3 V2.0 clock speed 500kHz 2MHz 32MHz 4MHz 30MHz 60MHz 120MHz sleep current 7.51µA 7.59µA 7.58µA 5.43µA 5.33µA -- run current* 415.419µA 968.70µA 10755.31µA 1819.39µA 9207.91µA -- wake time 3.897s 2.998s 2.925s 3.004s 2.936s -- total wake avg. 7.917mA 9.237mA 18.897mA 10.609mA 18.142mA -- wake-energy 101.81mJ 91.39mJ 182.40mJ 105.17mJ 175.77mJ -- * no LED and board periphery turned off - no measurement with the X-NUCLEO-LPM01A possible (over-current)

Table 3.5: Comparison of V1.3 and V2.0 (3.3V at JP13 & JP14)

15%, which could be optimized further by lowering the clock speed of V2.0. These results are summarized in table 3.5.

Figure 3.15 shows how this difference impacts the total system run time. The overview in figure 3.15b summarizes the used parameters for the system estimation in figure 3.15a. It is assuming a 2600mAh primary Lithium battery with linearised self-discharge. Considering the system duty cycle for a wake-up every 15 minutes, the total average consumption increases from 41.32µA to 43.74µA. This reduces the possible system run time by about 5.5%. Since the sleep current in V2.0 is lower and the run current increased, requires the sleep only 12.4% of the energy in V2.0 compared to 18.3% in V1.3.

weighted avg. current [µA] 0 10 20 30 40

V1.3 41.32 V1.3 V2.0 3.33‰ 86.19 sleep current [µA] 7.59 5.43 µA 9237 10609 V2.0 43.74 wake current [ ] 3.33‰ 81.42 wake time [ms] 2998 3002 clock [MHz] 2.0 4.0 0 20 40 60 80 Utest [V ] 3.3 3.3 Version and duty cycle expected run-time [month] self-discharge*1 [µA] 2.97 2.97 sleep [µA] wake [µA] *1 approximated with table 2.1 self-discharge [µA] run-time [month]

(a) Run-time comparison (b) Consumption of V1.3 and V2.0

Figure 3.15: Comparison of V1.3 and V2.0 (T = 900s, 2600mAh primary Lithium battery)

The previously used test network of table 3.2 has been generated for the new platform V2.0. The performance analysis at different clock speeds can be found in table 3.6 with its measured current consumption at 3.3V on the battery input (JP13 and JP14). The tested clock speeds are 4, 16 and 86MHz, which was possible since no peripheral DC-DC converter had to be switched on in the system. These measurements showed that the computation of a single network required more than 10s at 4MHz and 1.5mA, while it took about 2.7s at 16MHz and 4.9mA. At a clock speed of 86MHz increased the current consumption to 20.9mA, while the computation time got reduced to the expected 530ms. This also led to the smallest energy consumption of 36.6mJ in total. These results are as expected based on the pre-study measurement in table 3.4 and indicate that the required energy could be reduced further by

30 3.3. Radio comparison

clock [MHz] avg. consumption [µA] time [ms] energy [mJ] 4 1523.690 10666.972 53.637 16 4879.580 2665.994 42.929 86 20938.721 530.322 36.644

Table 3.6: Edge AI performance test on V2.0 (3.3V) increasing the clock speed to 120MHz during the network computation.

The analysis of this chapter showed, that the change from the STM32L073RZ to the STM32L4S5VI enabled the use of STM32CubeAI for the automated deployment of models out of standard machine learning frameworks like Keras. It could also be shown that the increased power consumption of the faster microcontroller has no significant impact on the system run-time for the environmental monitoring. Finally, the deployment and analysis of an example ANN for the detection of engine failures showed, that the platform provides a reasonable performance for predictive maintenance applications. This makes the new platform V2.0 suitable for both of Bitroot’s targeted areas.

3.3 Radio comparison

The currently deployed sensor nodes of Bitroot (V0.x) use a CC1101 radio module and have an insufficient communication range for the transmissions to their base station. Therefore should be analyzed what is limiting the transmission range at their current setup. Bitroot deploys their own base stations for the CC1101 sensor nodes at the greenhouse farms, which forward the received data to Bitroot’s servers over the cellular network for mobile communication. Here, one base station shall ideally be able to cover an entire greenhouse farm, which could consist of several buildings in a maximal distance of 1km. An alternative to the CC1101 radio modules could be LoRa, which provides the additional advantage of an existing base station infrastructure, so that Bitroot would not need to develop and maintain their own base stations at customers anymore. Therefore should be recommended a LoRa module that can be compared with the CC1101, to see which one is more suitable for their applications in terms of its communication range, power consumption and flexibility for future projects. It should also be analyzed which radio settings can be recommended to extend their transmission range or reduce the energy consumption.

If Bitroot should change to a LoRa system, they shall also be able to integrate LoRaWAN. The LoRaWAN specification is a networking protocol, that builds on the LoRa physical layer, corresponds to the second and third layer of the Open Systems Interconnection (OSI) model and covers three types of devices. [69] Class A devices can transmit asynchronously and afterwards open two short receive windows to enable a bi-directional communication. Class B devices offer the same functionality as class A, but additionally synchronize using a periodic beacon to open scheduled receive windows. Finally, class C devices also implement the functionality of class A, but additionally remain in their receive state constantly. [70]

Radio module comparison One high level LoRa solution is the RN2483 [71] from Microchip, which already integrates LoRaWAN with an additional microcontroller in its transceiver. This has the drawbacks, that it only implements a class A device and that low-level accesses for prototyping purposes are hindered. An alternative that provides more flexibility would therefore be the use of a standard 868MHz LoRa transceiver like the

31 3.3. Radio comparison

Module RN2483 SX1272 SX1276 CC1101 Manufacturer Microchip Semtech Semtech Texas Instr. Reference [71] [72] [73] [54] Modulation *1 i.a. LoRa i.a. LoRa i.a LoRa i.a. GFSK LoRaWAN integrated on host on host - LoRaWAN Classes A A, B, C A, B, C - Frequencies (MHz) 433, 868 868, 915 169, 433, 868, 915 315, 433, 868, 915 max. data rate 10.9 kbsp 37.5 kbps 37.5 kbps 600 kbps RX sensitivity [dBm]*2 min. −146 −117 to −137 −111 to −148 −95 to −112 Output power range −4 to +14dBm −1 to +20dBm −4 to +20dBm −30 to +12dBm 3 ITX at PTXMAX * 38.9mA 125mA 125mA 34.2mA 3 ITX at PTX ≈ 12dBm * 36.5mA 28.0mA 29.0mA 34.2mA 3 PTX at ITX ≈ 20mA * −1.7dBm +7dBm +7dBm 0dBm 3 RX current (IRX )* 14.2mA 10mA 9.9mA 15.6mA Link budget [dBm]*4 max. 160 116 to 157 107 to 168 65 to 124 Cost [SEK] *5 120.86 70.04 73.92 35.28

*1 most relevant *2 depending on data rate and RF settings *3 at 868MHz and 3.3V, despite CC1101 at 3.0V *4 without antenna gain or internal losses *5 single unit on mouser [1]

Table 3.7: Radio module comparison

SX1272 [72] or SX1276 [73] from Semtech, for which LoRaWAN implementations for the STM32Lx-Series exist directly from STMicroelectronics [74] or the LoRaMac-node project [75] from Semtech, which both implement the classes A, B and C. An overview of the considered radio modules can be seen in table 3.7, which summarizes their most relevant datasheet parameters.

All modules support the required 868MHz frequency and it can be seen that the CC1101 has a significantly higher maximal data rate compared to the LoRa modules. This aspect can be relevant for saving energy by reducing the transmission time, but only if it also achieves the required communication range. It can be seen that the receiver sensitivity is significantly better at the LoRa modules by 25 to 36dB compared to the CC1101. The SX1272 and SX1276 have the lowest power consumption at a comparable output power (12dBm) and at the same time the maximal output power at a comparable current consumption (20mA). Because the SX1276 provides in total the biggest link budget, this module is recommended for the use at Bitroot’s prototype and the following analysis. Compared to the currently installed CC1101 module can be expected a significant increase in the possible transmission range, since the link budget provides additional 42dB. One radio module that is based on the SX1276 is for example the TEL0125 from DFRobot, which is available for about 165 SEK on Mouser. [76]

Path loss model comparison To compare the expected communication ranges, the path loss of the transmission has to be estimated. This has previously been done at Bitroot by using equation 3.3 [77, p. 96] for the free space path loss

(LFS). This has been found to be unsuitable for some applications, since it results in a reduced path loss compared to empirical models, which can lead to overestimated communication ranges. [78–80] Therefore

32 3.3. Radio comparison should be used a different path loss model in the following analysis.

4πdf  LFS = 20 · log10 (3.3) (dB) c

One alternative is the empirical Okumura-Hata model, which is an approximation based on measurements around Tokyo in 1968 for urban, suburban and open areas at a frequency range of 150 to 1500MHz. The validity range of this model is however limited to distances (d) between 1 and 10km, a base station height (hB) between 30 and 200m and a node height (hm) between 1 and 10m. With this model can be computed the path loss for urban areas (LOH−U ) in dB as shown in equation 3.4. [81, p. 8ff.]

LOH−U(dB) = 69.55 + 26.16 · log10(fMHz) − 13.82 · log10(hB) − CH + [44.9 − 6.55 · log10(hB)] · log10dkm

where : CH = 0.8 + (1.1 · log10(fMHz) − 0.7) · hM − 1.56 · log10fMHz (3.4)

The path loss at suburban areas (LOH−SU ) can be estimated with the Okumura-Hata model based on its result for urban areas and equation 3.5. [81, p. 11]

2  fMHz  LOH−SU1 = LOH−U(dB) − 2 · log10 − 5.4 (3.5) (dB) 28

Two other regression models for the path loss estimation have been done around Dortmund and Oulu by using LoRa transmitters. They are both based on equation 3.6 at 1km for d0. The measurements in Dortmund were taken with SX1276 transceivers at 433MHz and 868MHz, a node height of 1.5m and a base station height of 30m. For 868MHz resulted this in the parameters 2.65 for n and 132.25 for B. [79, p. 5] The measurements in Oulu were taken with the SX1272 LoRa transceivers at 868MHz, a height of 2m and a base station heigt of 24m. This resulted in the parameters 2.32 for n and 128.95 for B. [80, p. 59]

 d  LReg(dB) = B + 10 · n · log10 (3.6) d0

Another possibility for computing the path loss would be the use of the Longley-Rice Irregular Terrain Model (ITM). It additionally takes the surrounding terrain into consideration, which requires geographical data about the heights, clutter and representation of the considered area. [78, 82] Because the following analysis should be done independent of a specific location, the ITM will not be considered further. A

Model Note Analytic, could result in an underestimated path loss and lead to overestimated long Free space communication ranges. Empirical model for irregular terrain of urban, suburban and open areas. Made for Okumura–Hata link distances from 1 to 10km and a base station height of 30 to 200m. Regression model based on LoRa measurements (868MHz) around Dortmund. Dortmund (gateway antenna at 30m and node SX1276 at 1.5m height) Regression model based on LoRa measurements (433 and 868MHz) around Oulu. Oulu (gateway antenna at 24m and SX1272 node at 2m height) Requires significant amount of geographical data about the terrain for precise results. ITM Therefore not considered further.

Table 3.8: Considered path loss models

33 3.3. Radio comparison summary of the mentioned path loss models can be seen in table 3.8.

For the comparison with the Dortmund and Oulu model, a base station height of 25m and a node height of 1.5m will be assumed for the Okumura–Hata model. This leads to equation 3.7 for urban and suburban areas at 868MHz. Here should be noted, that this model is already used outside of its valid range with these parameters. LOH−U(dB) = 127.0877 + 35.7435 · log10(dkm) (3.7) LOH−SU(dB) = 116.9409 + 35.7435 · log10(dkm) Figure 3.16 shows a comparison of the different path loss models. Also here should be noted, that the plot of the Okumura–Hata model below 1km is outside of its specification. Since its parameter range is unsuitable for the setup of Bitroot and its outcomes even intersect the free space loss at smaller distances, the Okumura–Hata model will not be considered further.

200

175

150 Free space Okumura–Hata Suburban 125 Okumura–Hata Urban Oulu

path loss [dB] 100 Dortmund

75

50 0.01 0.1 1 10 100 distance [km]

Figure 3.16: Comparison of considered path loss models

It can be seen that the free space loss is almost 40dB below the Dortmund and Oulu model. In another experiment with SX1257 LoRa transceivers at 868MHz, a node height of 1.2m and a base station height of 22m in Bonn (Germany) has been shown that the covered area was bigger than expected by applying the Oulu model. [78] This should make it suitable for safe estimation ranges without considering specific shadowing scenarios. It also provides reasonable outcomes for small distances. Since the path loss of the Dortmund model is even above this, the Oulu model will be used in the following analysis. This is suitable for both, the CC1101 and LoRa analysis, because the path loss depends on the used frequency and distance, but not the used modulation (c.f. equation 3.3).

CC1101 analysis To compute the possible transmission range with the CC1101 radio module, the minimal receiver sensitivity is required. Its datasheet specifies this value at a packet error rate of 1% for 20 bytes at the parameters which are shown in table 3.9. It contains three baud rates using a Gaussian Frequency-Shift Keying (GFSK) modulation, for which additionally can be selected if the receiver should be optimized for a low power consumption or a minimal receiver sensitivity. For higher data rates is also specified the receiver sensitivity of a Minimum-Shift Keying (MSK) at 500kBaud and three baud rates using a 4-Frequency-Shift Keying (4-FSK) modulation.

The maximal possible path loss can then be computed using the link budget as shown in equation 3.8,

34 3.3. Radio comparison

Baud rate Modulation Bit rate Deviation Bandwidth 1.2kBaud GFSK 1.2kbps 5.2kHz 58kHz 38.4kBaud GFSK 38.4kbps 20kHz 100kHz 250kBaud GFSK 250kbps 27kHz 540kHz 500kBaud MSK 500kbps - 812kHz 125kBaud 4-FSK 250kbps 127kHz 406kHz 250kBaud 4-FSK 500kbps 254kHz 812kHz 300kBaud 4-FSK 600kbps 228kHz 812kHz

Table 3.9: Considered CC1101 settings with available receiver sensitivity values [54, p. 12f.]

with the corresponding receiver sensitivity (PRX ) depending on the modulation, baud rate and selected optimization. The used radio module at Bitroot specifies its antenna gain (GTX and GRX ) at 2dBi. [83, p. 8] Additionally will be assumed an internal loss of 1dB (LTX and LRX ) and a margin of 5dB (Lmargin) to compute a safer estimated range. An overview of all used parameters, including the different receiver sensitivities, can be found in Appendix G.

Lpath = PTX + GTX − LTX − Lmargin − LRX + GTX − PRX = PTX − PRX − 3dB (3.8)

In combination with the Oulu path loss model can then be computed the estimated transmission range as shown in equation 3.9. It can be seen that it depends on the used transmission power (PTX ) and for the minimal received power (PRX ) the used modulation parameters out of table 3.9 with the selected optimization setting for the GFSK.

L −B path PTX −PRX −131.95 d = 10 10·n · d0 = 10 23.2 · 1km (3.9)

To compute the transmission energy of the CC1101 radio module for a message (equation 3.10), its current consumption at a specified voltage is required. It also depends on the required transmission time, which can be computed out of the message length (lbit) and used bit rate (rb). The current consumption of the CC1101 is specified by its datasheet at 3.0V for the transmission power of −6, 0, +10 and +12dB and can be found in Appendix G. lbit Esend = US · ITX(PTX ) · (3.10) rb Since the required energy is directly proportional to the transmission range, it can be normalized to a message length of one byte as shown in equation 3.11. Now, the transmission energy per byte requires the identical parameters to the estimation of the transmission range and limits the considered output power to those, which have a specified current consumption in the datasheet.

Esend 8 = US · ITX(PTX ) · (3.11) byte rb

This results in a total of 40 possible combinations that can be considered based on the datasheet specification. In figure 3.17 can be seen a plot that shows the estimated possible transmission range in comparison to its required energy per byte based on the equations 3.9 and 3.11 with the parameters of Appendix G. Each combination of settings is represented by one position in the plot. In figure 3.17 specifies the marker shape the used modulation settings out of table 3.9 and the optimization setting for the GFSK receiver

35 3.3. Radio comparison is specified by the number below. Here, zero represents a receiver that is configured for an optimized sensitivity, while one represents a receiver that operates on a reduced power consumption. The used transmission power (PTX ) is specified by the used color of the marker and ranges from green for −6dB to red with +12dB.

The expected maximal transmission distance varies from several meters to maximal 454m depending on the chosen settings. This also increases the required energy for the radio module per byte by a factor 1040. More interesting is however the comparison of the energy consumption at an identical transmission range. This way can for example be reduced the energy consumption for one transmission at an identical range of up to 55m by 99.5%, only by changing from a GFSK-1.2 at −6dBm transmission power (328µJ/byte) to a 4-FSK-250 at +12dB transmission power (1.64µJ/byte). In this case, the increase of the power consumption for radio module at an higher output power is insignificant compared to the reduced transmission time by the faster possible bit rate.

By taking a closer look at Bitroot’s firmware in combination with the CC1101 datasheet could be seen, that the radio module got configured for a GFSK modulation at 868MHz (channel 0) with a bit rate of 4.98kbps, a deviation of 26.4kHz, filter bandwidth of 105.5kHz and output power of 0dBm. Comparing this to the recommended settings for a GFSK at 38.4kpbs (c.f. table 3.9) indicates that the low bit rate does not utilize its set deviation and bandwidth at these settings. This oversized filter bandwidth will therefore only decrease the signal to noise ratio at the receiver and its minimal sensitivity. Depending on how this mismatch affects the exact values, a transmission range of 51 to 138m (GFSK-38.4 to GFSK-1.2 at 0dBm, c.f. table 3.9) and an energy consumption of 84µJ/byte (1/4 of the GFSK-1.2 at 0dBm, c.f. equation 3.11) can be expected for their current settings. This could be improved significantly by adjusting the settings correspondingly to the deployment setup and required range with the help of the generated figure 3.17.

Marker shape (modulation and settings, c.f. table 3.9), color (output power, PTX ) and number south (optimisation)

1

1 1 0 0 ]

1 0 1 0

mJ/byte 0.1

1 01 0 0.01 1 0 1 0

1 1 0 0

1 0 1 0 required energy per0 byte [ .001

0.01 0.1 transmission range [km] ]GFSK-1.2 ]GFSK-38.4 ]GFSK-250 ]MSK-500 ]4-FSK-125 ]optimisation (0-sensitivity/1-power)] ]4-FSK-250 ]4-FSK-300 ]PTX = −6dB ]PTX = +0dB ]PTX = +10dB ]PTX = +12dB ]Bitroot’s setting

Figure 3.17: Transmission range vs. energy per byte at different CC1101 settings

36 3.3. Radio comparison

SX1276 analysis An identical analysis can be done for the selected SX1276 radio module. Its datasheet specifies the minimal receiver sensitivity for the spreading factors of 6 to 12 at the bandwidths of 10.4kHz, 62.5kHz, 125kHz, 250kHz and 500kHz for a packet error rate of 1% for 64 bytes. [73, p. 20] By assuming an identical antenna gain, internal loss and margin to the CC1101 analysis, the transmission range can be estimated based on equation 3.9 depending on the spreading factor, used bandwidth and transmission power. The current consumption of the module is specified in the datasheet at 3.3V for an output power of 7, 13, 17 and 20dBm. [73, p. 14] A summary of all used parameters and relevant datasheet values can be found in Appendix H.

To compute the transmission energy depending on the used radio settings, the bit rate is required additionally for the given parameters and can be computed with equation 3.12. [84, p. 2]

SF · CR r = b 2SF (3.12) BW

This can be used to compute the required energy of the transmission based on the spreading factor, used bandwidth, output power and packet length with equation 3.13.

SF lbit · 2 Esend = US · ITX(P ) · (3.13) TX SF · CR · BW

To have the same parameters for the required energy to equation 3.9 of the transmission distance, equation 3.13 will be normalized to the energy per byte as shown in equation 3.14.

SF Esend 8 · 2 = US · ITX(P ) · (3.14) byte TX SF · CR · BW

This results in a total of 140 possible combinations that can be considered out of the datasheet specification. Similar to figure 3.17 has been generated a plot that shows the estimated transmission range in comparison to the required energy per byte. The entire figure can be found in Appendix I and an excerpt of the distance range from 1 to 5km can be seen in figure 3.18. All parameter combinations correspond to one position in the plot, which is indicated by a marker. The marker shape specifies the used bandwidth and the number next to it (east in figure 3.18, south in Appendix I) indicates the used spreading factor. The transmission power is shown by the color of the marker, which varies from +7dBm in green to +20dBm in red.

Appendix I shows a significantly increased total communication range, which varies depending on the chosen settings from 250m with 14µJ/byte to 39.5km with 130mJ/byte. In figure 3.18 can be seen that a similar transmission range can be achieved by using different setting combinations, where some could decrease the required energy significantly. For example could at a range of 2.5km be decreased the required energy per byte by 69% (from 1.16mJ/byte to 356µJ/byte) only by changing from a spreading factor of 7 at a bandwidth of 10.4kHz with +7dBm output power to a spreading factor of 11 at a bandwidth of 500kHz and with a output power of +13dBm. A comparison of both radio modules can be found in Appendix J, which indicates that the communication range could be increased to about 1km by changing to the SX1276 at an identical energy consumption to the CC1101 with Bitroot’s settings. This would solve Bitroot’s main issue of the maximal transmission

37 3.3. Radio comparison

Marker shape (bandwidth, BW), color (output power, PTX ) and number east (spreading factor, 6 − 12)

11 ]BW = 10.4kHz ]BW = 62.5kHz ]BW = 125kHz ]BW = 250kHz ]BW = 500kHz 11 8 12 6 − 12 P = +7dB P = +13dB P = +17dB P = +2012dB ]SF = ] TX ] TX ] TX ] TX 7 10 118 11 129 7 10 7 10 11 1 11 6 8 12 9 ] 7 9 10 118 6 6 9 12 9 10

mJ/byte 7 10 11 6 8 8 12 9 7 9 10 8 11 8 6 9 9 7 10 7 611 8 7 9 7 10 8 8 6 6 required energy per byte [ 9 7 10 7 6 8 9 0.1 7

7 8 1 1.5 2 2.5 3 3.5 4 4.5 5 transmission range [km]

Figure 3.18: Range vs. energy per byte at different LoRa settings (excerpt 1 − 5km of Appendix I) range to the base station. Therefore can based on this analysis be recommended to use the SX1276 radio module instead of the CC1101 in the next revision of the platform. For recommending which settings shall be used at a required transmission distance, figure 3.18 can be used to determine the LoRa parameters and figure 3.17 for the CC1101. The proper configuration is even more important by using the SX1276, since its possible energy and range deviation is significantly bigger compared to the CC1101.

The analysis of this chapter showed that the selection of the radio module has a significant impact on the available link budget. While the CC1101 radio module can be recommended for low-power transmissions at distances below 100m, the LoRa transceiver SX1276 is more suitable for the range of 100m to 40km. Considering that the new platform V2.0 may also be used for predictive maintenance applications with only one node, it is a significant advantage of having an existing base station infrastructure. Therefore offer LoRa transceivers also more flexibility in future projects. The most interesting result of this analysis is however the recommendation of radio settings and the required energy for the transmission. It could be shown that the transmission energy of the CC1101 can be decreased by up to 99.5% and of the SX1276 by up to 69% at an identical maximal communication range, only by adjusting the radio configuration. It could also be seen that the increased power consumption of the radio module at an higher output power is insignificant compared to the enabled reduction in its transmission time by the higher possible bit rate. This reduces the total energy per transmission and leads to the conclusion of recommending an increase in both, the output power and bit rate, for saving energy in wireless sensor nodes at an identical communication range.

38 4 Solar harvesting analysis

4.1 System power budget

After the hardware of the platform has been optimized in chapter 3 for a minimal power consumption and for covering both targeted applications, the required energy for the operation of the system and its firmware should be analyzed. Therefore was created a detailed power budget to evaluate the possibility of powering the platform with energy harvesting. This way, it can be seen how the energy consumption is split over its different tasks, how the firmware can be optimized and what can be executed at a given energy amount.

Power budget analysis The measurements were taken by indicating the start and stop of a task in the system power trace by blinking a LED. The system V2.0 was supplied with 3.3V at the header P13, so that the entire platform was powered except its battery protection. This has however no impact on the measurement results, since its additional current of about 4µA is negligible to the system consumption at run-time with more than 2500µA. The firmware is identical to the tests in chapter 3.3, but the intermediate blinking of the LED has been removed for its indication purposes in the power trace. The measured power budget can be seen in table 4.1. It has been split into the system wake-up with system initialization, followed by a self-test that checks the functionality of its switches and periphery. Afterwards can be seen the energy for both sensor measurements individually and the consumption for switching the peripheral 3.3V on and off. Finally, the radio transmission, a 100ms LED blinking and the consumption for entering the sleep mode are shown.

The most energy was required for the radio transmission, which caused about 55% of the total 47.51mJ consumption. Another 18.7% were required for blinking the LED 100ms and the self-test consumed 12.2%. In table 4.1 can also be seen the required energy for computing the ANN of chapter 3.2, which is with

type clock avg. consumption time energy rel. energy wake-up & init 4MHz 3064.20µA 9ms 91.01µJ 0.19% self-test 4MHz 4177.03µA 421ms 5803.15µJ 12.22% 3V3 switch-on 4MHz 2769.90µA 103ms 941.49µJ 1.98% task 1: air 4MHz 2726.40µA 505ms 4543.55µJ 9.56% task 2: light 4MHz 2954.45µA 4ms 39.00µJ 0.08% 3V3 switch-off 4MHz 2533.24µA 103ms 861.05µJ 1.81% radio 4MHz 20615.94µA 385ms 26192.55µJ 55.13% LED 4MHz 25668.20µA 105ms 8894.03µJ 18.72% de-init & pre-sleep 4MHz 2681.10µA 16ms 141.56µJ 0.30% total wake period 4MHz 8719.67µA 1651ms 47.51mJ 100.00% model computation 86MHz 20938.72µA 530ms 36.64mJ - sleep current 4MHz 1.28µA (no BP*) / 5.43µA (with BP*) * BP (Battery Protection) Table 4.1: V2.0 Power budget analysis (3.3V, measured)

39 4.1. System power budget

36.6mJ above the radio transmission with 26.2mJ. The sleep current of the system has been found to be 5.43µA with battery protection and 1.28µA without. These results can be used to determine the system run-time using equation 3.1.

Because most of the energy in the power budget was required for the radio transmission, this task should be analyzed in more detail. The power budget of this task has been measured equivalently to table 4.1 and its results can be seen in table 4.2. The transmission procedure starts by switching on both, the 2.1V buck converter and the peripheral 3.3V. This is followed by building the message and initializing the CC1101 radio module, before transmitting the packet (TX). Here can be seen that the actual transmission of the message required about 101ms and 15.3mJ. The initialization required about 24% of the total energy of the radio task and the peripheral 3.3V got enabled, right after it has been switched off before (c.f. table 4.1).

type clock avg. consumption time energy rel. energy 2V1 switch-on 4MHz 6712.64µA 103ms 2281.62µJ 8.71% 3V3 switch-on 4MHz 6875.89µA 103ms 2337.12µJ 8.92% CC1101 init 4MHz 24522.56µA 78ms 6312.11µJ 24.10% CC1101 TX 4MHz 45789.68µA 101ms 15261.70µJ 58.27% radio 4MHz 20615.94µA 385ms 26192.55µJ 100%

Table 4.2: V2.0 Radio power budget analysis (3.3V, measured)

The radio settings were unchanged compared to chapter 3 and the structure of the used test packet can be found in figure 4.1. It consisted of 4 byte for each the preamble and synchronization, one byte for each the packet length and receiver address and two byte of Cyclic Redundancy Check (CRC). The payload contained seven byte additional header out of Bitroot’s protocol, followed by five byte for air data (temperature and humidity) and seven byte for the measured illumination. This leads to a total packet size of 31 byte and an expected transmission time of 49.8ms at Bitroot’s radio settings (GFSK, 4.98kBaud). Given a small measurement deviation, the actual transmission time was twice as long as expected (c.f. table 4.2). This could indicate that the Manchester encoding was enabled, which would reduce the bit rate to half of the baud rate. By taking another look into the firmware settings can however be seen that the Manchester encoding was disabled. Therefore, the halved data rate can not be explained by the given initialization procedure.

Payload

air data: Bitroot light data: temp & sync header illumination CRC length

address humidity preamble

4 4 1 1 7 5 7 2 size [byte]

Figure 4.1: Transmitted test packet structure

40 4.1. System power budget

type clock avg. consumption time energy rel. energy wake-up & init 4MHz 3064.20µA 9ms 91.01µJ 0.36% 3V3 switch-on 4MHz 2769.90µA 103ms 941.49µJ 3.73% task 1: air 4MHz 2726.40µA 15ms 134.96µJ 0.53% task 2: light 4MHz 2954.45µA 4ms 39.00µJ 0.15% 2V1 switch-on 4MHz 6875.89µA 103ms 2337.12µJ 9.25% radio CC1101 init 4MHz 24522.56µA 78ms 6312.11µJ 24.99% CC1101 TX 4MHz 45789.68µA 101ms 15261.70µJ 60.42% de-init & pre-sleep 4MHz 2681.10µA 16ms 141.56µJ 0.56% total wake period 4MHz 17842.01µA 429ms 25.26mJ 100.00%

Table 4.3: V2.0 Power budget optimization 1 (3.3V, estimated)

Power budget optimization Based on the radio analysis in table 4.2, the initial power budget (c.f. table 4.1) has been optimized. The self-test and LED blinking at each wake-up have been removed, since this required together about 30% of the energy at run-time. These tasks could be performed infrequently based on requests by the base station instead. The driver for the SHT31-D air sensor was using a delay of 500ms before reading its result. This delay was decreased to about 15ms based on its datasheet specification. [85, p. 7] Also the additional switching of the peripheral 3.3V was removed and the energy consumption for switching on the 2.1V supply was increased correspondingly. This resulted in the estimated power budget in table 4.3. It reduced the wake time to 429ms and decreased the required energy by 53% (from 47.5mJ to 25.3mJ). Its power consumption can be computed identically to equation 3.1.

In this optimized power budget, 94.66% of the energy are consumed by the radio task. Therefore should be considered how the transmission of data could be optimized. One approach is the local collection of measurements in the internal Electrically Erasable Programmable ROM (EEPROM) at each wake-up, which will be transmitted together as long as no measurement result reached a critical level (e.g. once per hour). This would reduce the overhead for the start and initialization of the CC1101 radio module. To also reduce the energy consumption for transmitting the data, the baud rate could be increased by a factor of eight (38.4kBaud, c.f. figure 3.17). This should not increase the current consumption of the module since it is using the identical output power, but reduces the required energy because of the shorter

type clock avg. consumption time energy rel. energy wake-up & init 4MHz 3064.20µA 9ms 91.01µJ 6.75% 3V3 switch-on 4MHz 2769.90µA 103ms 941.49µJ 69.84% task 1: air 4MHz 2726.40µA 15ms 134.96µJ 10.01% task 2: light 4MHz 2954.45µA 4ms 39.00µJ 2.89% de-init & pre-sleep 4MHz 2681.10µA 16ms 141.56µJ 10.50% total wake period 4MHz 2778.84µA 147ms 1.35mJ 100.00% 2V1 switch-on 4MHz 6875.89µA 103ms 2337.12µJ 14.36% CC1101 init 4MHz 24522.56µA 78ms 6312.11µJ 38.77% 4 ∗ CC1101 TX (rb ∗ 8) 4MHz 45789.69µA 50.5ms 7630.85µJ 46.87% radio every hour 4MHz 21310.39µA 231.5ms 16.3mJ 100.00%

rbnew Table 4.4: V2.0 Power budget optimization 2 (3.3V, estimated, Twake = 15min., Tsend = 1h, = 8) rbold

41 4.1. System power budget transmission time. This increased data rate should also not decrease the expected communication range significantly, since it has already been used the corresponding deviation and bandwidth (c.f. chapter 3.3).

The resulting link budget estimation can be seen in table 4.4. The wake time (twake) has been reduced from 429ms to 147ms and the required energy from 25.3mJ to 1.4mJ. In case of an increased baud rate by the factor of eight, a wake-up period (Twake) of 15 minutes and a sending period once per hour (Tsend), the transmission of data could be reduced to 16.3mJ.

The required time for the radio task (tsend) is as before the sum of the 2.1V turn-on time (t2V 1), the required time to initialize the CC1101 module (tCC ) and the actual transmission time (tTX ). In a setup like table 4.4, the data per transmission will increase corresponding to the number of wake-ups between the transmission (Tsend/Twake). In this case, the additional optimization by the reduced packet overhead is neglected. The required transmission time will however be reduced by the increased data rate (rbold /rbnew ).

This can be seen in equation 4.1, which is based on the previously measured transmission time (tTXold ) to also take the unexpectedly halved data rate into consideration.

tsend = t2V 1 + tCC + tTXnew (4.1) Tsend rbold where : tTXnew = · tTXold · Twake rbnew

To compute the system power consumption, the offset from the leakage current and the wake time (relative:

τwake = twake/Twake) based on the used duty cycle stay identical to equation 3.1. Separately will now be required the time for sending messages (τsend = tsend/Tsend) and the left over time can be used to activate the low-power sleep mode (τsleep = 1 − τwake − τsend). Based on this can the average system power consumption be computed with equation 4.2.   twake tsend  twake tsend  P = US · IDCL + Iwake · + Isend · + Isleep · 1 − − Twake Tsend Twake Tsend (4.2)

where : Isend = (t2V 1 · I2V 1 + tCC · ICC + tTXnew · ITX )/tsend

The required energy for writing the taken measurements into the EEPROM at each wake-up has been neglected in the current power budget. The EEPROM can however be emulating using the chip internal flash memory, which leads to very low writing times (typically around 99.7µs on the STM32L4+ [86, p. 26]) and would therefore not have a significant impact on the results.

Equation 4.2 is valid as long as the schedule is feasible (τwake + τsend ≤ 1). Considering that the given firmware is a bare-metal application, all collected data shall be transmittable between two wake-up cycles

(tsend ≤ Twake − twake). This leads to a reduced validity range of equation 4.2, which is shown in equation 4.3. Tsend rbold t2V 1 + tCC + · tTXold · ≤ Twake − twake (4.3) Twake rbnew This way can be computed the minimal possible wake-up period based on the used transmission period as shown in equiation 4.4 (considering that tsend > 0 and Twake > 0).

1 r r  T ≥ · a2 + 2 · a · t + 4 · T · t · bold + t2 + a + t wake 2 wake send TXold r wake wake bnew (4.4)

where : a = t2V 1 + tCC

42 4.1. System power budget

[s] 3min. 15min. 1h 4h wake T 10

1 minimal wake-up period 1 10 100 1,000 10,000

transmission period Tsend [s]

r Figure 4.2: Minimal valid wake-up period depending on the transmission period ( bold = 1 ) rbnew 8

Equation 4.4 can be seen in figure 4.2, by assuming a baud rate increase of the factor eight as discussed before. This results for example in a minimal wake-up period of 6.91s at one transmission per hour or in 4.94s at one transmission every 30 minutes. This condition needs to be taken into consideration when the maximal possible duty cycle based on the harvested amount of energy shall be computed with equation 4.2 (c.f. section 4.3).

Finally, the possible run-times of the different power budgets can be compared. Figure 4.3b shows an overview of the used parameters and measurements, where the wake time of the budgets in table 4.1 and 4.3 contains the data transmission as before. For the budget of table 4.4 does the wake time not contain any data transmission and the consumption of sending the collected measurements once per hour has been shown separately. In figure 4.3a can be seen that the average current consumption is decreased by 31% from budget 4.1 to 4.3. This is caused by leaving out the self-test, LED blinking and additional switching of the peripheral

Budget table weighted avg. current [µA] 4.1 4.3 4.4 0 5 10 15 20 25 sleep current [µA] 5.43 5.43 5.43 24.39 wake current*1 [µA] 8720 17842 2779 4.1 146.07 1 wake time* [ms] 1651 429 147 16.9 Twake [min.] 15 15 15 4.3 210.75 send current [µA]-- 21310 2 ms 231.5 10.22 send time* [ ]-- 4.4 348.46 Tsend [h] - - 1 Power budget table clock [MHz] 4.0 4.0 4.0 0 100 200 300 Utest [V ] 3.3 3.3 3.3 expected run-time [month] self-discharge*3 [µA] 2.97 2.97 2.97 1 sleep [µA] wake [µA] * including transmission for tbl. 4.1 & 4.3 2 send [µA] self-discharge [µA] * assuming rbold /rbnew = 1/8 run-time [month] *3 approximated with table 2.1

(a) Run-time comparison (b) Budget comparison parameters

Figure 4.3: Run-time of the different power budgets (primary Lithium battery, 2600mAh)

43 4.2. Power source design

3.3V, as well as optimizing the driver for the SHT31 air sensor. The additional decrease of 39.5% from budget 4.3 to 4.4 is caused by reducing the setup overhead of the CC1101 radio module and increasing its used symbol rate from 4.98 to 39.8kBaud. The expected run-time increases correspondingly, but it should be noted that the self-discharge of the battery has been approximated based on its first 10 years of life and may deviate afterwards. One main advantage of using the power budget in table 4.4 is, that it could achieve a run-time of 9 years with a reduce battery size of 800mAh.

The analysis of this chapter showed, how the energy consumption of the platform is split over the different tasks in the firmware. This could be used to recommended firmware modifications and estimate their impact on the resulting energy consumption. This way, the total wake time per hour could be reduced from 6.6s down to 820ms and the weighted average consumption for the wake time with data transmission could be reduced from 16µA down to 1.8µA. This analysis also provides all information that will be required for the energy harvesting considerations of the following chapters.

4.2 Power source design

After both, the hardware and software, have been optimized for a minimal power consumption in the previous chapters, a new power source system could be designed, that shall provide enough energy to autonomously power the platform with solar harvesting. For this purpose can be generated several requirements based on the previous analysis, to optimize the system consumption and minimize the loss through leakage currents. The setup changes however significantly depending on the used storage element, so that this component should be discussed before the system requirements can be defined.

Storage element As storage element could be used rechargeable batteries, where the issues of the minimal charging current for the previously considered setup by Bitroot (c.f. section 2.3) get resolved by a dedicated harvesting charger module. Some other drawbacks which can not be solved this way, are that the rechargeable batteries generate a significant leakage current through their self-discharge and that the daily recharge cycles would abrade the battery and shorten its life-time (c.f. sections 2.2 and 4.1). Out of these two reasons, rechargeable batteries are unsuitable as harvesting storage for Bitroot’s application. An alternative would be the use of supercapacitors. They provide a peak current (600mA to 5A, [87, p. 2]) that is high enough to power the radio transmissions, offer a reasonable form factor (10mm x 20mm, [87, p. 2]) and capacities of up to 50F . [87, p. 2] This could make them a more suitable option for the energy harvesting storage compared to rechargeable batteries. Therefore should they be analyzed in more detail corresponding to the previously designed platform V2.0.

Five different supercapacitors in a range of 0.22 to 10F have been selected, which are rated for up to 3V and provide a low DC current leakage (IDCL). Because the used buck-boost converter RP604 requires a minimal input voltage of 1.8V , the usable energy of the capacitors can be computed as the difference in their energy at these maximal and minimal voltages. Based on this can then be computed how long a fully charged supercapacitor could power the platform V2.0 with equation 4.5.

1 2 2 · C · (Umax − Umin) T = 2 (4.5) Psystem

44 4.2. Power source design

The results are shown in table 4.5, where the required average system power has been calculated with the equations 3.1 and 4.2 for the different link budgets in table 4.1, 4.3 and 4.4. This can be done since the power consumption of the system can be expected to be almost independent of the used input voltage, considering the constant efficiency of about 85% with the used RP604 buck-boost converter (c.f. figure 3.8b). One difference to the previous analysis in section 4.1 is the used sleep current. In section 4.1 have been considered lithium batteries and therefore was used the corresponding sleep current of 5.43µA with battery protection. Since this component is not required by powering the system with a supercapacitor, the reduced sleep current of 1.28µA (c.f. table 4.1) can be used in this case.

Table 4.5 shows the ideal system run-time (IDCL = 0) as well as the expected run-time under consideration of the supercapacitor leakage current. This parameter (IDCL) is specified by the corresponding datasheet for holding its maximal voltage after 72 hours and provides a safe upper bound for temperatures below 50°C. [87, p. 3] The expected run-time should be at least above 18 hours to power the platform during night times and ideally for at least three days to also compensate days with less light than others.

power time* (IDCL = 0) power time* (with IDCL) capacity example max. IDCL tbl. 4.1 tbl. 4.3 tbl. 4.4 tbl. 4.1 tbl. 4.3 tbl. 4.4 0.22F [88] 3µA 3.1h 5.5h 17.2h 2.6h 4.2h 8.7h 1F [87] 6µA 14.0h 24.8h 78.1h 10.4h 15.4h 26.6h 3F [89] 7µA 42.1h 74.3h 234.3h 30.0h 43.3h 72.0h 5F [87] 15µA 70.2h 123.9h 390.5h 37.6h 48.9h 67.0h 10F [87] 30µA 140.3h 247.8h 781.0h 51.3h 60.9h 73.2h *discharge from 3V to 1.8V at current version of the firmware or optimized version for T = 15min. Table 4.5: Typical leakage currents and system run-time of 3V super-capacitors

It can be seen that the expected run-time increases with the used capacity for the power budgets 4.1 and 4.3. For the power budget 4.4 is the expected run-time of the 3F capacitor however longer than for the 5F capacitor, which is caused by its increased leakage current in combination with the low system consumption at this configuration. For the power budget 4.1 could be recommended the use of a 10F capacitor and for the budget 4.3 the 5F or 10F to reach a system run-time above two days. For the power budget 4.4 can be recommended to use the 3F capacitor, which is the only budget that could offer the requested run-time of three days without light. In Appendix K can additionally be found the supercapacitor run-time as a function of the wake-up period for the power budget of table 4.3 and 4.4, which leads to the same conclusions and is used for further design considerations in the following chapters.

Back-up battery and harvesting module The first requirement on the solar harvesting system is therefore, that it shall be compatible with the use of a supercapacitor as storage element. To keep the platform as universal as possible, it shall also be operational if the PV panel should be for example covered with snow for several months or the average illumination is not enough to power the platform for several days. Therefore shall it also provide a backup battery with low self-discharge (e.g. primary lithium) that will be used if necessary. In this case shall also the supercapacitor be disconnected completely, since its DC current leakage would significantly increase the total system consumption and drain the battery unnecessarily. Finally shall the harvesting module also implement a MPPT for the PV module.

45 4.2. Power source design

As backup battery, lithium coin cells with a shelf-life above ten years could be a suitable choice. Table 4.6 shows an overview of four different types and the expected run-time by powering the system continuously. By assuming that the backup battery would be used to power the platform during a total of four months per year, could the CR2354 be used for about 20 years at the power budget of table 4.4. This should be more than the life time of one node and therefore be a valid choice.

nominal power time* [month] type example capacity voltage tbl. 4.1 tbl. 4.3 tbl. 4.4 CR2032 [90, p. 5] 3V 225mAh 11.9 18.1 34.2 CR2354 [90, p. 5] 3V 560mAh 30.0 43.9 81.0 CR2450 [90, p. 5] 3V 620mAh 41.0 48.3 88.9 CR2477 [90, p. 5] 3V 1000mAh 50.6 75.7 136.0 * considering the increase sleep current with battery protection, assuming a self-discharge of 1% per year and an average cell voltage of 2.75V based on their datasheet discharge curve [90, p. 5] Table 4.6: Run-time with different coin cells

For the energy harvesting module have been considered different ICs under the specified requirements above. Several options are unsuitable for this application, because they were designed to charge secondary batteries instead of supercapacitors (MAS6011, LTC3331, SPV1050, MAX17710 and CBC915). Two other options, the LTC3330 and LTC3105, can be used with supercapacitors and a primary backup battery, but do not offer a MPPT and do not disconnect the supercapacitor while it is not in use. This would decrease the harvested energy and significantly increase the system consumption for the backup battery (c.f. table 4.5 and figure 4.3). Two modules that fulfill all mentioned requirements above are the ADP5090 from Analog Devices and the BQ25505 from Texas Instruments. An overview of their most important characteristics can be found in table 4.7. They are both based on boost converters and implement a MPPT based on the FOCV method, where the MPP can be set using external resistors. Their quiescent currents and storage voltage is within the same range, but the BQ25505 can be used with higher input voltages. This can be beneficial to support a wider variety of PV models. The advantage of the ADP5090 is its lower cold start voltage, which is however not used if a backup battery is connected. Also the efficiency of both modules is very

ADP5090 BQ25505 Manufacturer Analog Devices Texas Instruments Datasheet [91] [92] Converter type boost boost MPPT yes (FOCV) yes (FOCV) Primary backup battery optional optional Supercapacitor storage possible possible Input voltage range 80mV - 3.3V 100mV - 5.1V Input power range 16µW - 200mW 5µW - 510mW Storage voltage range 2.2V - 5.2V 2V - 5.5V Cold start at 380mV 600mV Quiescent current 320nA 325nA Cost* 45.99SEK 48.09SEK

* single unit on Mouser [1] Table 4.7: Harvesting module comparison

46 4.3. Available energy analysis similar. [91, p. 6f.] [92, p. 9.f] Therefore, the BQ25505 will be recommended, since its wider input voltage range offers more flexibility in the PV panel design for future work.

The suggested system setup with the BQ25505 can be seen in figure 4.4. Like it was shown by the detailed analysis in a previous project at Bitroot, a cSi PV panel should be used [49, p. 19 f.] and is connected to the harvesting module in series to the inductor of its boost converter (L1). As storage element can be connected for example one of the selected supercapacitors in table 4.5 and as backup primary battery could be used one of the coin cells in table 4.6 with additional protection. The BQ25505 can then select at which moment should be switched between the harvested energy and the backup battery. This is configured using external resistors (ROV x,ROKx) to specify the desired operating range of the supercapacitor from 1.8V to 3V . The output is adjusted to the system core voltage (3.3V) by the RP604 buck-boost converter and the TPS6274 buck converter for the power saving 2.1V at the currently used CC1101 radio module. For the harvesting voltage range of 2.1V to 1.8V will the buck converter output (TPS6274) drop correspondingly, which is however no issue since the CC1101 is like the RP604 specified for a minimal input voltage of 1.8V. [54, p. 8]

CSTOR SEC_BAT CBYP + (rechargeable) Supercapacitor

VOC_SAMP VSTOR VBAT_SEC

L1 VBAT_PRI LBOOST RP604x

Ideal Diode OR VREF_SAMP + PRI_BAT Boost CIN (backup) + VBAT_OK Solar Controller Primary Cell CREF Lithium Core Sensors & VB_PRI_ON (+protection) - VSS System Interfaces MPPT VB_SEC_ON VIN_DC Cold Start

Nano-Power CC1101 VSTOR VBAT_SEC Management Radio Host

GPIO1 EN

GPIO2 VBAT_OK TPS6274 VBAT_OV OK_PROG VRDIV OK_HYST bq25505

ROV2 ROV1 ROK3 ROK2 ROK1

Figure 4.4: BQ25505 system setup (adjusted from [92, p. 21])

The analysis of this chapter showed that supercapacitors are a suitable storage element for the harvesting circuit and how long they could power the platform depending on the power budget and wake-up period of the system (c.f. Appendix K). Different requirements for the solar harvesting circuit could be generated that shall increase its efficiency, reduce leakage currents and guarantee a continuous operation. Finally, different harvesting modules have been compared based on the generated requirements and a solar harvesting power source design could be recommended for the platform.

4.3 Available energy analysis

After the hardware and firmware have been optimized for a minimal power consumption and the energy harvesting circuit has been designed, the model of a PV module and the harvesting circuit can be generated to analyze the available energy in comparison to the system consumption. Bitroot deployed several nodes

47 4.3. Available energy analysis of their prototype V0.x in a cooperating greenhouse in Sweden during 2018, which contained no PV module but the MAX44009 ambient light sensor. The nodes were placed in different positions at a height of about one meter above the ground and were not covered by plants. During the entire time have been collected illumination values, which could be used to estimate how much energy may be harvestable at their deployed positions in combination with a model for a possible harvesting system. Since the nodes were placed above the plants in the greenhouse and were not covered by leaves, a PV module could be mounted directly on top of the case. This should not increase the node size, which is limited to maximal 80x95mm in V2.0 by the PCB design.

Bitroot’s data set contains for each measurement a timestamp and id, together with the node id that took the measurements and results for the temperature, humidity and illumination. An overview of the recorded time span can be seen in table 4.8. Four nodes were deployed in total, of which two recorded only for less then 20 days in May 2018 and two recorded almost 200 days between May and December 2018. Unfortunately, the illumination was not measured during the entire day always, which reduces the data set significantly. This leaves one week of continuous measurements from two nodes in May and about 140 days from the others between May and December, which can be used for the following analysis.

node monitored days incomplete days complete days time span 1 190 50 140 5/18 - 12/18 2 199 52 147 5/18 - 12/18 3 19 12 7 5/18 4 16 9 7 5/18

Table 4.8: Bitroot’s collected illumination data set

The computed illumination in lux, out of the measurements with the MAX44009, have not been verified to give correct results before. Therefore should be taken reference measurements between Bitroot’s nodes and a light meter before relying on the data set. For this has been used the MT-912 light meter from Urceri, which measures between 0 to 200klux at a precision of ±3%. [60] For comparison, the measurement range of the MAX44009 is between 0 and 188klux, while its datasheet specifies a maximal total error of 15% at a green LED with 538nm. [93, p. 2]

15 2

10 4

5 12

0 21

Difference [%] −5 10

−10 8

−15 2 1 10 100 1,000 10,000 Avg. illumination [Lux] Figure 4.5: Reference illumination measurements between the MAX44009 and MT-912

48 4.3. Available energy analysis

The maximal recorded illumination of Bitroot’s data set was at 23.5klux. Therefore were taken a total of 60 measurements between 0 and 37klux, which can be seen in the plot of figure 4.5. It shows the difference between both devices relative to their average value, which were taken at the same position and brightness. This can be seen in equation 4.6, where x0 is the measurement result of the MAX44009 and x1 of the MT-915. x0 − x1 d = (4.6) (x0 + x1)/2 The results show an expected Gaussian distribution with a standard deviation of 6.29%. The maximal difference was below ±15% and no significant drift of a device can be identified for the used measurement range. The difference between the measurements could be expected, since the used sensors have a different spectral response and directivity. These results verify that the illumination is measured correctly by Bitroot’s nodes and that the data set can be used for the energy harvesting estimation.

4.3.1 Single diode model analysis

An overview of the first model that was used to analyze how much energy could be harvested based on Bitroot’s data set, can be found in table 4.9. A cSi PV panel (SM141K04LV) of the size 45x15mm has been selected, whose datasheet values have been used to generate a single diode model. The total output power has been computed based on Bitroot’s collected illumination and temperature data, in combination with the datasheet efficiency curve of the BQ25505. The greenhouse spectrum was analyzed in a previous project at Bitroot and showed to be almost identical to direct sunlight (c.f. Appendix L [49]). Therefore, the required irradiance can be estimated from the measured illumination by the factor of 0.0079W/m2 per lux. [94, p. 10]

model A based on single diode model greenhouse light spectrum yes considering temperature yes used panel SM141K04LV panel type and size cSi, 45x15mm harvesting module BQ25505 input voltage 2V storage voltage 3V main issue minimal irradiance (15.75W/m2) estimated energy by neglecting outcome all harvesting below 633.8µW (1990lux)

Table 4.9: Model A overview

The SM141K04LV [95] consists of four monocrystalline cells, to generate a MPP voltage of 2.2V at the output power of 123mW (1000W/m2 irradiance). Its output power was approximated using a single diode model, where the required parameters got acquired from the corresponding datasheet. The shunt resistance could not be estimated from the IV-characteristic, because its slope is zero at V = VSC [42, p. 497] in the datasheet curve and therefore has been assumed to 3000Ω. Also the diode quality factor could not be estimated from the datasheet and therefore has been assumed with the typical value of 1.3. The model was tested at a temperature of 25°C and an irradiance of 1000W/m2, which lead to an output power of 125.6mW while the datasheet specifies 123mW .

49 4.3. Available energy analysis

panel parameters 60 short circuit current 58.6mA open circuit voltage 2.76V 50 temperature current coefficient 26.5µA/K dV 2 40 series resistance (RSO = −( dI )V =VOC )* 1.28Ω shunt resistance*1 3000Ω 30 diode quality factor*1 1.3 current [mA] series connected cells 4 20 model parameters model implementation from [45] 10 voltage decimal digits 3 0 test output at 25°C and 1000W/m2 0 0.5 1 1.5 2 2.5 3 model 125.6mW voltage [V] 123mW datasheet 1000 W/m2 (126.6klux) 1 500 W/m2 (63.3klux) * assumed 2 2 100 W/m (12.7klux) * based on [42, p. 497] Table 4.10: Single diode model parameters Figure 4.6: Model IV-curve at 25°C

The IV curve of the generated model can be found in figure 4.6 for three different illumination values at 25°C and meets the datasheet expectation (c.f. [95, p. 2]). The IV curve has been generated for each pair of illumination and temperature in Bitroot’s data set, of which the maximal power point was used to estimate the expected output power. As an example is shown the estimated output power normalized to the panel size depending on the illumination at 25°C in figure 4.7. The model implementation by Tadatoshi Takahashi [45] calculates the actual open circuit voltage depending on the temperature and illumination [41, eq. 23] with the Newton-Raphson algorithm, [96] which leads to a mathematical error for small irradiance values. Therefore, the model can only be used down to about 1990lux (633.8µW at 25°C and 6.75cm2), which is significantly above the minimal harvesting input power of the BQ25505 with 5µW . In the analysis were therefore all samples neglected, for which the output power of the PV panel could not be estimated.

The BQ25505 has been modeled based on its efficiency, which is specified for an input voltages of 2V depending on the input current. Figure 4.8a shows the datasheet specification in comparison to the actually used function during the analysis in figure 4.8b, which was approximated with the interpolation ] 2 µW/cm

1,000

100 output power density [

2000 5000 10000 40000 illumination [lux]

Figure 4.7: Estimated output power at different illumination for 25°C

50 4.3. Available energy analysis

100 90 80

70

60 efficiency [%] 50

40 0.01 0.1 1 10 100 input current [mA] (a) BQ14404 specified efficiency at 2V input [92, p. 9]) (b) Efficiency approximation for 3V storage

Figure 4.8: Estimated BQ25505 efficiency of 36 points out of the graph. A storage voltage of 3V has been used corresponding to the supercapacitors in table 4.5. The harvesting power was then computed by the product of the output power of the single diode model for the SM141K04LV panel and the BQ25505 efficiency at the input current of the used MPP for each value. The resulting harvested power for Bitroot’s data set is shown for each month in Appendix M for node one, Appendix N for node two and Appendix O for both, node three and four. As an example, the results of node two during September and November 2018 can also be found in figure 4.9. The graphs show the minimal, maximal and average harvested power at each time of the day during one month. Here can be seen that the effective time span of illumination reduces from eleven hours in September down to seven hours in November. Also the average output power during the day reduces from about 4mW to 0.4mW .

To calculate the estimated harvesting energy per day, the linear interpolation of the output power over time has been integrated. The results for each node and month can be found in table 4.11 together with the number of days the values are based on. While the plots for the output power over time (e.g. figure 4.11) show the minimal and maximal output value of each moment, table 4.11 shows the analysis of the minimal and maximal energy that could have been harvested over a consecutive day. Especially noticeable is the result for node one during November

20 4

minimum minimum 10 maximum 2 maximum average average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (a) Node 2 estimated power, 30 days in 9/2018 (b) Node 2 estimated power, 27 days in 11/2018

Figure 4.9: Estimated harvesting output power of using model A

51 4.3. Available energy analysis

5/18 6/18 7/18 8/18 9/18 10/18 11/18 12/18 days 7 5 24 14 28 28 26 8 min. day [J] 86.44 153.06 28.53 24.57 23.76 0.0 0.0 0.0 Node 1 max. day [J] 240.68 231.02 175.42 91.85 135.60 102.19 0.0 0.0 avg. day [J] 145.65 193.54 96.30 61.40 82.42 51.98 0.0 0.0 days 6 4 20 30 21 29 27 10 min. day [J] 95.95 109.67 60.30 42.36 40.36 0.0 0.0 0.0 Node 2 max. day [J] 204.94 202.66 140.98 191.31 124.42 91.23 38.77 1.62 avg day [J] 133.85 152.20 97.54 114.62 88.74 42.44 5.75 0.2

(a) Node 1/2 energy harvesting estimation

Node 3 Node 4 month days min. day max. day avg. day days min. day max. day avg. day 5/18 7 103.05J 288.31J 175.41J 7 103.04J 252.61J 149.03J

(b) Node 3/4 energy harvesting estimation

Table 4.11: Energy harvesting estimation model A

2018. The maximal illumination during the 26 days was at 1901lux, which is slightly below the minimal possible input value for the used single diode model. During the eight days in December, the maximal illumination at node one was at 694lux.

To put the values of table 4.11 into perspective, figure 4.10 has been generated. It shows the system energy consumption per day for the budget of table 4.3 depending on the wake-up period and based on equation 3.1. The reduced sleep current without battery protection was used and the DC leakage current for the corresponding supercapacitors in table 4.5. Here can be seen that the system consumption per day (black) is below 3J at a wake-up period of 15 minutes. This is significantly below the estimated harvested energy from May to September and also below the average energy in November. During the summer months, the wake-up period could be reduced down to one minute, which would still be covered by the expected average energy in October (yellow). By taking additionally the DC current leakage of the supercapacitors into consideration (red), the energy

optimized firmware with transmission at each wake-up (c.f. table 4.3, capacitors of table 4.5)

T = 3min. T = 15min. T = 1h T = 4h 1,000 system consumption system + max. 0.22F-IDCL system + max. 1F-IDCL 100 system + max. 3F-IDCL system + max. 5F-IDCL system + max. 10F-IDCL 10 min. harvesting 7/2018 avg. harvesting 7/2018 energy per day [J] avg. harvesting 10/2018 1 avg. harvesting 11/2018

10 100 1,000 10,000 wake-up period T [s]

Figure 4.10: Required power depending on the used wake-up period (node 2, budget tbl. 4.3)

52 4.3. Available energy analysis consumption increases significantly at a wake-up period of 15 minutes. Here could maximally be used the supercapacitor with 3F , while staying below the average harvested energy in November (blue). With this, the platform could be powered for a maximum of 43.3h without light or backup battery (c.f. table 4.5).

Figure 4.11 shows an identical analysis for the power budget in table 4.4. It is based on equation 4.2 and assumes an increased baud rate by the factor of eight and one data transmission for the collected measurements per hour. This reduces the required energy per day significantly, so that the node could record values every three minutes by using the 3F supercapacitor, while staying below the expected average energy from May to November. This could power the platform for three days without light or backup battery at a wake-up period of 15 minutes or for about 50 hours at the wake-up period of three minutes (c.f. Appendix K).

rbold optimized firmware (c.f. table 4.4, Tsend = 1h, = 1/8, capacitors of table 4.5) rbnew

T = 3min. T = 15min. T = 1h T = 4h 1,000 system consumption system + max. 0.22F-IDCL system + max. 1F-IDCL 100 system + max. 3F-IDCL system + max. 5F-IDCL system + max. 10F-IDCL 10 min. harvesting 7/2018 avg. harvesting 7/2018 energy per day [J] avg. harvesting 10/2018 1 avg. harvesting 11/2018

10 100 1,000 10,000

wake-up period Twake [s]

Figure 4.11: Required power depending on the used wake-up period (node 2, budget tbl. 4.4)

For figure 4.11 should additionally be mentioned that the minimal valid wake-up period is at 6.91s (c.f. equation 4.4), since otherwise the collected data could not be transmitted during a single sleep period. To reduce the wake-up period further should then be increased the data rate, decreased the transmission period or it could be changed to the power budget of table 4.3, which is valid for each period below its required wake time (429ms).

4.3.2 Reference measurement analysis

An overview of the second model B can be found in table 4.12. It is based on reference measurements, [97] which were taken under white LED illumination. This has a very different light spectrum from 400 to 750nm and peaks at about 450 and 600nm. [98, 99] Therefore, the equivalent test setup for this model would be a node that is deployed in a box with white LED illumination inside the greenhouse, which adjusts its inside illumination accordingly to the environment. The main benefit of this scenario is, that its harvesting output power has been specified down to 15lux. [97, p. 64] Therefore is the focus of this model less on how much energy could be harvested and instead on when energy could be harvested.

The reference measurements [97] were taken using the BQ25504 harvesting module, which is the predecessor of the BQ25505 and offers a reduced input voltage range of 0.13 to 3V at a similar efficiency. [92, 100] Therefore can also be expected a similar output power from the BQ25505 with the identical PV panel.

The project [97] used two parallel AM-1454 panels (aSi, VOC = 2.4V , 41.6x26.3mm, [101, p. 10]) in

53 4.3. Available energy analysis

model B based on reference measurements [97] greenhouse light spectrum no (LED) considering temperature no used panel Solarprint SP-7375-0.5V panel type and size DSSC, 60x60mm harvesting module BQ25504 input voltage 0.5V storage voltage 3V main issue based on white LED spectrum output power at equivalent LED illumination outcome (well specified down to 15lux, but very different light spectrum and therefore only useful as reference)

Table 4.12: Model B overview comparison to one Solarprint SP-7375-0.5V. The SP-7375-0.5V is a single Dye-Sensitized Solar Cell (DSSC) panel with an open circuit voltage of 0.5V and a size of 60x60mm. [97, p. 53] They both offer a lower efficiency compared to cSi panels, but are suitable for the indoor use. [97, p. 50ff.] The harvested output power at different illuminations from 10 to 1000lux can be found in figure 4.12a and was used as basis for model B. Since this is mainly targeted to estimate the minimal output power at low illuminations, the model uses the Solarprint DSSC panel because of its lower output power at less than 90lux. To estimate the harvesting power outside of this range, figure 4.12b has been used and shows the output power density of different PV panel types. This indicates that the DSSC panel output power could be approximated using equation 4.7 below 1000lux, where Mlx is the used illumination and APV the used panel size. Additionally has to be considered the efficiency curve of the BQ25504 (ηBQ(I) ) at the corresponding 0.5V input voltage. [100, p. 9] To match the output power of the measurements in figure 4.12a from 100 to 1000lux, the efficiency of the BQ25504 specification was reduced by additional 20%. The following model required however the assumption, that the dependency between illumination and power density in equation 4.7 will also hold above its range of 1000lux. Therefore can be expected that the model leads to an overestimated output power for high illuminations in the results.

-3 10 6 BQ25504 @ 3.0V load, 4 White LED 2 -4 10 6 4

2 -5 10

Output PowerOutput [W] 6 4 2x Sanyo AM-1454 2 Solarprint SP-7375-0.5V -6 10 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 10 100 1000 Illumination [lx] (a) Output power of the BQ25504 at 3.0V load [97, p. 64] (b) Output power density of DSSCs [102, p. 5]

Figure 4.12: Reference harvesting measurements

54 4.3. Available energy analysis

µW Pout = (0.035 · Mlx + 1) · APV · ηBQ (4.7) cm2 (I) The combination of both approaches is shown in figure 4.13, which has been used to estimate the harvested output power depending on the illumination with white LEDs. In this model was the impact of the temperature neglected and all illumination values below 20lux have been reset to zero. The output power from 20 to 100lux was estimated using interpolated points out of the graph in figure 4.12a (orange) and the output power for illuminations above 100lux was approximated with equation 4.7 using the reduced BQ25504 efficiency.

taken from figure 4.12a 10 approximated with equation 4.7

1

0.1

output power [mW] 0.01

0.001 10 100 1,000 10,000 illumination [lux]

Figure 4.13: Model B - estimated harvesting power at LED illumination (BQ25504 and SP-7375-0.5V)

The results of processing Bitroot’s data set based on this model can be found in Appendix P for node one, Appendix Q for node two and Appendix R for the nodes three and four. As an example is shown the estimated harvesting power during September and November 2018 of node two in figure 4.14. The graphs show an overview for one day of the corresponding month with the minimal, maximal and average harvested power that could be expected. Because of the reduced minimal sensitivity in this model, the effective time span for harvesting power got increased from 11 to 13 hours in September and from 7 to 9 hours in November compared to the analysis with model A. The output power is however not directly comparable to the previous model, since it is based on a very different solar panel and light spectrum.

20

4 minimum minimum 10 maximum maximum average 2 average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (a) Node 2 estimated power, 30 days in 9/2018 (b) Node 2 estimated power, 27 days in 11/2018

Figure 4.14: Estimated harvesting output power using model B

55 4.3. Available energy analysis

5/18 6/18 7/18 8/18 9/18 10/18 11/18 12/18 days 7 5 24 14 28 28 26 8 min. day [J] 510.46 346.63 75.13 83.86 81.72 17.91 0.80 1.32 Node 1 max. day [J] 553.93 690.54 529.35 233.40 250.90 179.79 22.43 7.21 avg. day [J] 537.63 515.50 333.17 196.07 174.89 111.15 9.06 3.51 days 6 4 20 30 21 29 27 10 min. day [J] 538.16 320.84 179.27 116.60 84.82 16.17 4.93 7.52 Node 2 max. day [J] 594.90 572.61 400.06 406.62 231.44 152.24 80.67 23.83 avg day [J] 575.70 441.84 320.45 281.87 166.49 91.78 33.40 15.67

(a) Node 1/2 energy harvesting estimation

Node 3 Node 4 month days min. day max. day avg. day days min. day max. day avg. day 5/18 7 573.39J 653.03J 621.44J 7 519.74J 601.22J 565.83J

(b) Node 3/4 energy harvesting estimation

Table 4.13: Energy harvesting estimation model B

The harvestable energy per day was calculated by the integration of the interpolated output power over time and can be found in table 4.13 for each node and month. It shows an overview of the minimal, maximal and average energy per day together with the number of days on which these values are based on. Here can be seen that the harvesting during each month is possible and provides at least 3.5J on average based on model B from May to December. The minimal energy could be found with 0.8J during one day in November at node one. During the last two months (11/18 and 12/18) is the confidence of this model increased compared to the others, since the illumination values were with less than 2000lux close to the range of measurements on which the model is based on. To put these values into perspective can be found an overview of the required system energy per day in figure 4.15. It is based on the power budget in table 4.3 with equation 3.1 at the reduced sleep consumption without battery protection and the corresponding DC current leakage of the supercapacitors out of table 4.5. In comparison to the previous section, this time is shown the harvested energy at node one in July (green), November (orange) and December (blue) as reference.

optimized firmware with transmission at each wake-up (c.f. rable 4.3, capacitors table 4.5)

T = 3min. T = 15min. T = 1h T = 4h system consumption 1,000 system + max. 0.22F-IDCL system + max. 1F-IDCL system + max. 3F-IDCL 100 system + max. 5F-IDCL system + max. 10F-IDCL min. harvesting 7/2018 10 avg. harvesting 7/2018 min. harvesting 11/2018 energy per day [J] avg. harvesting 11/2018 1 min. harvesting 12/2018 avg. harvesting 12/2018 10 100 1,000 10,000 wake-up period T [s]

Figure 4.15: Required power depending on the used wake-up period (node 1, budget tbl. 4.3)

56 4.3. Available energy analysis

Here can be seen that the system consumption (black) stays at a wake-up period of 15 minutes below the average harvested energy in December. This changes by additionally taking the supercapacitors leakage into consideration. Based on this model and wake-up period could only be used the 0.22F capacitor to stay below the average harvestable energy of all considered months. This could power the platform without light or backup battery for up to 4.2 hours (c.f. table 4.5), which is not enough to power the platform over night. Therefore should be used the 3F supercapacitor, which can power the platform at this power budget for up to 43 hours. In this case, the harvested energy from May to November would be enough to power the platform, but a backup battery would be required during December.

A similar graph can be found in figure 4.16, which shows the energy consumption per day by using the power budget in table 4.4. It is based on equation 4.2 and assumes an increased baud rate by the factor of eight and one data transmission for the collected measurements per hour. At a wake-up period of 15 minutes is the system consumption (black) at about 0.9J per day, which is well below the average harvested energy of all considered months. Even by using the 3F supercapacitor, the system would stay below the average harvested energy in December which could power the platform for three continuous days without light or backup battery.

rbold optimized firmware (c.f. table 4.4, Tsend = 1h, = 1/8, capacitors table 4.5) rbnew

T = 3min. T = 15min. T = 1h T = 4h system consumption 1,000 system + max. 0.22F-IDCL system + max. 1F-IDCL system + max. 3F-IDCL 100 system + max. 5F-IDCL system + max. 10F-IDCL min. harvesting 7/2018 10 avg. harvesting 7/2018 min. harvesting 11/2018 energy per day [J] avg. harvesting 11/2018 1 min. harvesting 12/2018 avg. harvesting 12/2018 10 100 1,000 10,000

wake-up period Twake [s]

Figure 4.16: Required power depending on the used wake-up period (node 1, budget tbl. 4.4)

In this case, the wake-up period could be reduced down to 10 seconds from May to October which requires about 30J per day. During November could maximally be used a wake-up period of 40 seconds, while it should be reduced down to 15 minutes during December. This reduction of the wake-up period will however also decrease the system run-time from the supercapacitor correspondingly and can therefore not be guaranteed over night (c.f. equitation 4.5). Finally should be noted again that the minimal valid wake-up period in figure 4.16 is at 6.91s for the chosen parameters (c.f. equation 4.4).

The analysis of this chapter showed with model A that the platform could be powered by a 45x15mm PV panel during at least six out of the eight considered months based on Bitroot’s data set. Additionally could be shown with model B that it can be expected to harvest energy during two additional hours per day and that also significant amounts of energy could be harvested during November and December.

57 5 Discussion

Platform optimization In the initial platform design could be identified several issues that increased the power consumption during sleep periods. The most relevant modifications were to resolve a floating signal line, reconnect a pull-up resistor from the core to peripheral voltage and adjusting the firmware to change all GPIOs to analog inputs before entering the sleep mode. The power converters of the platform have been analyzed and could in several cases not fulfill their datasheet specification within the system. In their specified input voltage range was the quiescent current of the RP604 equivalent to the TPS78033, so that it can be used to guarantee a 3.3V core voltage during the entire battery discharge without increasing the sleep consumption. Since its efficiency is similar for the tested input voltage range, the RP604 generates modularity between the core system and power source, while keeping the system consumption independent of the input voltage. This is especially important for supporting both, a battery powered and energy harvesting operation. To estimate the expected system run-time, it has been assumed an average input voltage of 3.3V . The battery self-discharge has been linearised and approximated with an equivalent additional load current. All presented results are close to the specified time span on which the linearisation was based on, which increases the confidence in the results. In a deployed system, the battery self-discharge will however be non-linear and also strongly depend on environmental conditions like the temperature. This has been neglected in this work and will cause a deviation from the theoretical to practical run-time. It could be shown that rechargeable batteries are unsuitable for low-power sensor nodes, since their self-discharge significantly exceeds the system consumption and becomes the dominant factor in limiting the possible run-time. Primary lithium batteries were found to be a good alternative, that can also power the RP604 using a single cell. To generate a better model of the batteries and the environmental impacts, Bitroot could extend their data set to additionally store the current battery voltage with each measurement transmission. In combination with the known power consumption of the node could be generated a battery model, that describes the discharge voltage curve at Bitroot’s load and the actual self-discharge in a greenhouse environment. This could significantly improve the accuracy of the system run-time estimations.

Edge AI modifications For predictive maintenance applications could be shown that STM32CubeAI from STMicroelectronics offers the possibility of rapid prototyping for edge AI applications. It offers an easy solution to deploy models out of standard machine learning frameworks like Keras on the designed platform. The required modifications included the change from the ARM Cortex-M0+ based microcontroller to an ARM Cortex-M4, which can both be found in the low-power series (STM32Lx) from STMicroelectronics. This increased the total system consumption in the comparison of figure 3.15 by 5.8%. The new platform V2.0 was in this test running twice the clock speed of V1.3, so that its consumption could be reduced further to decrease their difference. The additional power consumption for providing edge AI capabilities on the platform showed to have no significant impact on the system run-time in environmental monitoring applications. The modifications even decreased the system consumption during sleep, while the increased current at run-time has only a

58 5. Discussion small impact at the low duty cycles of the system operation. These results would however change with increasing wake times. The tested regression model with a complexity of about four million MAC operations resulted in a computation time of 530ms and 36.6mJ at 86MHz. The tested frequencies also indicate that this could be optimized further by increasing the clock speed during the network computation up to 120MHz. The measured 36.6mJ for this model are above the required energy for the data transmission with about 26.2mJ at Bitroot’s current radio settings. If the computation result is however required to take a decision at the sensor node, it should also be considered the additional wake time and energy consumption of the radio module in its receive state, to wait for the reply from the base station. In this case could the local network computation be used to reduce the energy consumption of the system. Therefore open the platform modifications several new possibilities in different predictive maintenance applications, while maintaining the possible run-time of several years for the environmental monitoring. These advantages can also be utilized efficiently during the rapid prototyping of applications with the automatized deployment of models from STM32CubeAI.

Radio module comparison By comparing the different radio modules in section 3.3, it could be seen that the LoRa transceivers offer a significantly bigger link budget compared to the CC1101 radio module. However, this applies only to the radio settings for a maximal transmission range. Therefore is this overview of modules (table 3.7) only suitable for comparing the capabilities of the different transceivers, but not suitable for finding the recommended module for a specific application. To estimate the possible transmission range at different radio settings has been used the empirical Oulu path loss model. This could be expected to result in a reasonable precision by using the LoRa transceivers with an existing base station infrastructure, since here the base stations would be in a comparable height to the Oulu measurements (24m). Especially for the CC1101 radio module may Bitroot continue deploying their own base stations within the greenhouses, which would typically be at a height below three meters and could significantly decrease the precision of the calculated results. Additionally, the Oulu path loss model was based on measurements for the range of 300m to 9km, which increases the confidence of the LoRa results (figure 3.18) compared to the CC1101 (figure 3.17). To solve this issue would be recommended to extend Bitroot’s data set. They could record the GPS position by deploying the wireless sensor nodes and additionally store the Received Signal Strength Indicator (RSSI) value of each transmission in their data set. The Oulu path loss model has been generated similarly and showed to provide reasonable results. This way could be generated a specialized empirical path loss model for greenhouses, Bitroot’s applications or specific setups to increase the precision of the used model. In the analysis of the transmission energy per byte (figure 3.18 and 3.17) could be shown that choosing the ideal radio settings for the targeted communication range is crucial to optimize the system power consumption. By comparing the expected energy for Bitroot’s radio settings with the measured results in the link budget, a significant deviation could be seen. This could be expected since the theoretical analysis of the transceivers focused only on the required energy of the specific module instead of considering the entire system consumption or additional periphery circuity within the radio module. This could be improved with further measurements on the system power consumption at different radio settings, to replace the datasheet values with measured results. During the link budget measurements has additionally been found that the effective data rate of the CC1101 was at half of its configured value. The reason for

59 5. Discussion this could not be identified, since the Manchester encoding has been disabled explicitly. The comparison of different radio settings at the SX1276 and CC1101 showed that the communication range of the CC1101 is below 500m, while the SX1276 can be adjusted for ranges from 250m to 40km. At the same time can be achieved transmission ranges that are by a factor of ten bigger by using the SX1276 over the CC1101 at an identical power consumption based on their datasheet specification. Considering that LoRa additionally provides a base station infrastructure, the SX1276 would be recommended for Bitroot’s applications.

System power budget The initial measurement of the system power budget can be expected to provide a reasonable accuracy for the following optimizations. It could be shown that the average current consumption could be reduced from about 24µA to 17µA, which has the same model limitations as discussed before in the platform optimization. The measures to reduce the consumption included the optimization of the SHT31-D driver, leaving the self-test and LED blinking at each wake-up out and removing additional switching of the peripheral voltage. It could be shown that the required energy can be decreased significantly further by utilizing the internal flash memory as temporary storage of measurements and sending the results collected at a separate period and an increased data rate, if this is possible at the required transmission range. This could reduce the current consumption down to 10µA at one transmission per hour, which was mainly limited by the battery protection and self-discharge. Finally, the generated system power budget was based on the firmware for greenhouse applications and therefore did not include the analysis of tasks for different applications. This budget could be extended further with measurements that utilize the remaining platform features, like the LSM6DSOX IMU or micro SD-card. The generated power budget could also be used to utilize the harvested energy more efficiently, by adjusting the tasks at each wake-up dynamically depending on the state of charge and required energy per operation.

Power source design For the energy harvesting has been suggested a hardware design, which is based on several system requirements that were defined for an improved efficiency at Bitroot’s applications. It is based on the BQ25505 harvesting module with a supercapacitor as storage element and lithium coin cell as backup battery, to guarantee a continuous platform operation. The generated run-time estimations for both, the supercapacitors and coin cells, are based on the same model limitations as discussed before. For the supercapacitors has been assumed a continuous discharge by their maximal DC current leakage out of the corresponding datasheet. An actual system may therefore be able to outperform the theoretical results of this work. However, the impact of the environmental conditions may be significant. Therefore would be recommended to deploy several solar harvesting nodes and monitor their superca- pacitor and battery voltage. Together with the measured illumination, temperature and known system consumption, a model of the power source system could be generated that includes all environmental impacts and actual self-discharge currents. The PCB of this platform should be design for a modular replacement of the solar panel, supercapacitor and resistors for adjusting its operation voltage range. This is important so that the required PV panel size and supercapacitor can be adjusted depending on the application and deployed position. The BQ25505

60 5. Discussion has therefore been selected to offer a wide flexibility in terms of the used input and storage voltage range. In equation 4.5 could be seen that the system run-time from the storage supercapacitor is proportional to the square of its used voltage. In this work were only considered supercapacitors with a maximal rating of 3V , but both the BQ25505 and RP604 would support a storage element with up to 5.5V . This reduces the harvesting efficiency, but could compensate for changing weather conditions better at a lower capacitance and DC current leakage. This could be analyzed further in future work, together with the solar panel design.

Available energy analysis Bitroot’s data set has been found to provide a reasonable accuracy and was used to estimated the harvestable energy at the deployed positions using two models. The first analysis was based on the single diode model and the datasheet specifications of the PV panel and harvesting IC. Therefore does it also contain the single diode model limitations, which included a minimal irradiance of 15.75W/m2 at the chosen parameters. The illumination has been converted to the irradiance by using an approximation for sun light, which introduces an additional error. The presented results therefore neglected any illumination below 1990lux. During two months of the analysis was the illumination below the minimal requirement for the PV panel model. This showed to make the single diode model unsuitable during winter periods. Here could be evaluated if the double diode model provides better results, which would justify the additional complexity by estimating its parameters and the increased computational cost. Methods and implementations for this are available. [42, 44] By analyzing the required energy for the platform per day, could be seen that the DC current leakage of the supercapacitor has a significant impact. Therefore has been recommended the presented 3F capacitor for the trade off between its additional power consumption and the maximal system run-time without light or backup battery. This would however change depending on the used firmware, solar panel or typical period without illumination. By using this setup and the suggested firmware optimizations, the platform could be powered by the average illumination from May until November at a wake-up period of 15 minutes. A wake-up period of 40 seconds requires less than 10J per day, which is below the minimal harvested energy of all recorded days from May until September. Therefore would the possible run-time with the 3F capacitor and at this wake-up period (21h, c.f. Appendix K) be enough, to power the platform during periods without light. Considering that the months before May have not been recorded and the minimal output power of the PV panel model was at 634µW , where the harvesting IC would support down to 5µW , it could be expected an even longer operation from an actual system.

The second analysis was based on reference measurements to support illuminations down to 15lux. This assumed however a PV panel with lower efficiency and an identical illumination from white LEDs, which have a significantly different light spectrum. Additionally had to be estimated the output power for the range above 1000lux, which could lead to an overestimated output power for high illumination values. This makes the second model suitable to identify when energy can be harvested, while the amount of energy should only be used as a reference. These results indicate that the harvesting time span per day is one to two hours longer than it was expected by the first analysis and that significant amounts of energy could also be harvested in November and December.

61 5. Discussion

Therefore show the presented results that the platform could be powered with a 45x15mm monolithic solar panel within greenhouses during about seven months of the year. The platform could operate continuously for more than 15 years with a single backup coin cell and the measurement period could easily be reduced during summer, after the firmware has been optimized correspondingly.

62 6 Conclusion and future work

In this work has been presented a wireless sensor platform design that can be used for both, environmental monitoring and predictive maintenance applications for non-electric systems. The nodes can be powered with solar harvesting by small photovoltaic modules or operate for several years with a battery. At the same time, they can be used for the rapid prototyping of edge artificial intelligence applications by supporting the tools from STMicroelectronics.

The system power consumption has been reduced by several hardware modifications and it was shown that the RP604 buck-boost converter is most suitable for the platform to achieve a high efficiency and the required input voltage range for the energy harvesting. To simplify the prototyping of predictive maintenance applications has been used an ARM Cortex-M4 based microcontroller out of the STM32L4+ Series with its maximal flash memory size configuration to enable a greater flexibility in evaluating different models. This did not increase the system power consumption for the environmental monitoring significantly, because of the small duty cycle in this application.

As radio module is recommended to use a LoRa transceiver for Bitroot’s applications, since it offers a bigger maximal communication range and lower power consumption for identical distances. Additionally can be used an existing base station infrastructure, which may reduce the costs for both, Bitroot and the customer, compared to offering own base station solutions.

Finally, a new power source system could be designed to support solar harvesting, which can be expected to power the platform during seven months of the year with a solar panel size of 45x15mm in combination with a super capacitor as storage element and an optimized firmware version. The platform can also be expected to operate continuously over more than ten years by additionally using a backup coin cell. At the same time, the excess of harvested energy during the summer will reduce the constraints on the platform operation.

For the future work would be suggested to build the next revision of the platform, which contains the suggested radio module and energy harvesting circuit. These nodes could then be deployed to collect information about the system for further improvements. It is recommended to record the GPS position of the deployed nodes and to extend the data set with the received signal strength indicator values of the base station. This could be used to generate a specified path loss model for Bitroot’s applications and optimize the radio setup for a minimal energy consumption. Additionally, the discharge voltages of the battery and supercapacitor should be recorded to evaluate environmental impacts and their actual self-discharge. Based on this data could be generated a model of the power source system for precise run-time estimations in combination with the known system consumption, temperature and illumination.

63 List of Figures

1.1 Work overview and structure ...... 3

2.1 Linear Regulator (LR) block diagram ...... 5 2.2 Low Dropout Regulator (LDO) block diagram ...... 5 2.3 Buck and boost converter principles ...... 6 2.4 Synchronous buck-boost converter principle ...... 7 2.5 Typical discharge voltage curves [19, p. 4] ...... 8 2.6 Schematic of a solar harvester circuit for low power applications [40] ...... 10 2.7 Equivalent circuit of PV models ...... 11 2.8 Measurement setup of the previous work ...... 12 2.9 Measurement setup configurations ...... 13 2.10 Simplified block diagram of prototype V1.0 ...... 14

3.1 First system measurement, powered from V_Supply pins (JP5) with sensors and radio . . . . 17 3.2 Floating line - power at V_Supply (JP5), no sensors connected, sleep state ...... 18 3.3 Full system measurement, powered from battery pins with sensors and radio ...... 19 3.4 Oscillation Issue - power at the battery input, sensors connected ...... 19 3.5 Full system measurement, powered from the battery pins with radio but no sensors ...... 20 3.6 V1.0 power consumption assuming an ideal 2600mAh battery (T = 900s) ...... 21 3.7 Estimated converter efficiency ...... 22 3.8 Measured converter efficiency ...... 22 3.9 CC1101 power consumption ...... 23 3.10 Measured converter efficiency ...... 24 3.11 Comparison of V1.0 and V1.3 (T = 900s) ...... 25 3.12 Run-time of V1.3 with a 2600 mAh battery and self-discharge (T = 900s) ...... 26 3.13 Run current estimation using STM32CubeMX at firmware periphery initialization ...... 29 3.14 Comparison of V1.3 and V2.0 ...... 29 3.15 Comparison of V1.3 and V2.0 (T = 900s, 2600mAh primary Lithium battery) ...... 30 3.16 Comparison of considered path loss models ...... 34 3.17 Transmission range vs. energy per byte at different CC1101 settings ...... 36 3.18 Range vs. energy per byte at different LoRa settings (excerpt 1 − 5km of Appendix I) . . . . 38

4.1 Transmitted test packet structure ...... 40 r 4.2 Minimal valid wake-up period depending on the transmission period ( bold = 1 ) ...... 43 rbnew 8 4.3 Run-time of the different power budgets (primary Lithium battery, 2600mAh) ...... 43 4.4 BQ25505 system setup (adjusted from [92, p. 21]) ...... 47 4.5 Reference illumination measurements between the MAX44009 and MT-912 ...... 48 4.6 Model IV-curve at 25°C...... 50 4.7 Estimated output power at different illumination for 25°C...... 50 4.8 Estimated BQ25505 efficiency ...... 51 4.9 Estimated harvesting output power of using model A ...... 51 4.10 Required power depending on the used wake-up period (node 2, budget tbl. 4.3) ...... 52 4.11 Required power depending on the used wake-up period (node 2, budget tbl. 4.4) ...... 53 4.12 Reference harvesting measurements ...... 54

III 4.13 Model B - estimated harvesting power at LED illumination (BQ25504 and SP-7375-0.5V) . . 55 4.14 Estimated harvesting output power using model B ...... 55 4.15 Required power depending on the used wake-up period (node 1, budget tbl. 4.3) ...... 56 4.16 Required power depending on the used wake-up period (node 1, budget tbl. 4.4) ...... 57

IV List of Tables

2.1 Battery types overview ...... 9 2.2 Energy harvesting sources overview [39] ...... 10 2.3 Considered power analyzers ...... 15

3.1 V1.0 modification overview ...... 20 3.2 Regression model - test network ...... 27 3.3 Edge AI test network - generated code ...... 27 3.4 Edge AI pre-test ...... 28 3.5 Comparison of V1.3 and V2.0 (3.3V at JP13 & JP14) ...... 30 3.6 Edge AI performance test on V2.0 (3.3V) ...... 31 3.7 Radio module comparison ...... 32 3.8 Considered path loss models ...... 33 3.9 Considered CC1101 settings with available receiver sensitivity values [54, p. 12f.] ...... 35

4.1 V2.0 Power budget analysis (3.3V, measured) ...... 39 4.2 V2.0 Radio power budget analysis (3.3V, measured) ...... 40 4.3 V2.0 Power budget optimization 1 (3.3V, estimated) ...... 41 rbnew 4.4 V2.0 Power budget optimization 2 (3.3V, estimated, Twake = 15min., Tsend = 1h, = 8) 41 rbold 4.5 Typical leakage currents and system run-time of 3V super-capacitors ...... 45 4.6 Run-time with different coin cells ...... 46 4.7 Harvesting module comparison ...... 46 4.8 Bitroot’s collected illumination data set ...... 48 4.9 Model A overview ...... 49 4.10 Single diode model parameters ...... 50 4.11 Energy harvesting estimation model A ...... 52 4.12 Model B overview ...... 54 4.13 Energy harvesting estimation model B ...... 56

V Bibliography

[1] Mouser Electronics. [Online]. Available: https://www.mouser.se/ (visited on 05/01/2019). [2] Shenzhen JLC Electronics. [Online]. Available: https://jlcpcb.com/ (visited on 05/01/2019). [3] C. Ó. Mathúna, T. O’Donnell, R. V. Martinez-Catala, J. Rohan, and B. O’Flynn, “Energy scavenging for long-term deployable wireless sensor networks”, Talanta, vol. 75, no. 3, pp. 613–623, 2008, Special Section: Remote Sensing, issn: 0039-9140. doi: https://doi.org/10.1016/j.talanta.2007.12.021. [Online]. Available: http://www.sciencedirect.com/science/article/pii/S0039914007008612 (visited on 04/01/2019). [4] Compiled tips ’n tricks guide, DS01146B, Microchip Technology, 2009. [Online]. Available: http://ww1. microchip.com/downloads/en/DeviceDoc/01146B.pdf (visited on 04/02/2019). [5] M. He, Why low quiescent current matters for longer battery life, Maxim Integrated Products, 2017. [Online]. Available: https://www.mouser.com/pdfdocs/why- low- quiescent- current- matters- for- longer- battery-life.pdf (visited on 04/05/2019). [6] C. Glaser, “Iq: What it is, what it isn’t, and how to use it”, Analog Applications Journal, vol. Q2, pp. 18–22, 2011. [Online]. Available: http://www.ti.com/lit/an/slyt412/slyt412.pdf (visited on 04/01/2019). [7] Stm32l073xz - product specification, DS10685, Rev. 4, STMicroelectronics, 2017. [Online]. Available: https: / / www . st . com / en / microcontrollers - microprocessors / stm32l073rz . html # resource (visited on 04/02/2019). [8] Stm32l4s5xx - product specification, DS12024, Rev. 3, STMicroelectronics, 2018. [Online]. Available: https: / / www . st . com / en / microcontrollers - microprocessors / stm32l4s5vi . html # resource (visited on 04/02/2019). [9] Bq297xx cost-effective voltage and current protection integrated circuit for single-cell li-ion and li-polymer batteries, SLUSBU9F, Rev. F, Texas Instruments, 2018. [Online]. Available: http://www.ti.com/product/ BQ2973/technicaldocuments (visited on 04/02/2019). [10] Ap9211 single chip solution for 1-cell li+ battery pack, DS37596, Rev. 4-2, Diodes Incorporated, 2017. [Online]. Available: https : / / www . diodes . com / products / power - management / battery - management - system/battery-protection/part/AP9211#tab-overview (visited on 04/02/2019). [11] H. J. Zhang, Basic concepts of linear regulator and switching mode power supplies, Application Note 140, Analog Devices, 2013. [Online]. Available: https : / / www . analog . com / media / en / technical - documentation/application-notes/AN140fb.pdf (visited on 04/04/2019). [12] M. Day, Understanding low drop out (ldo) regulators, Texas Instruments, 2016. [Online]. Available: http: //www.ti.com/download/trng/docs/seminar/Topic%209%20-%20Understanding%20LDO%20dropout.pdf (visited on 04/04/2019). [13] B. Hunter and P. Rowland, Linear regulator design guide for ldos, SLVA118A, Revised June 2008, Texas Instruments, 2003. [Online]. Available: http://www.ti.com/lit/an/slva118a/slva118a.pdf (visited on 04/06/2019). [14] Dc-dc converters: A primer, Jaycar Electronics, 2001. [Online]. Available: https://www.eecs.umich.edu/ courses/eecs373/readings/dc-dc-primer.pdf (visited on 04/08/2019). [15] L. M. Feeney, Energy consumption in embedded wireless networks, Uppsala University Lecture, Wireless Communication and Networked Embedded Systems, Nov. 2017. [16] A guide to understanding battery specifications, MIT Electric Vehicle Team, 2008. [Online]. Available: http://web.mit.edu/evt/summary_battery_specifications.pdf (visited on 04/24/2019).

VI [17] Alkaline handbook, PANA/HB-ALKALINE/B, Panasonic Corporation. [Online]. Available: https://eu. industrial.panasonic.com/sites/default/pidseu/files/downloads/files/id_alkaline_1203_e.pdf (visited on 04/20/2019). [18] Lithium handbook, Panasonic Corporation, 2015. [Online]. Available: https://eu.industrial.panasonic. com/sites/default/pidseu/files/downloads/files/panasonic_lithium-handbook-2015_interactive. pdf (visited on 04/20/2019). [19] C. Simpson, Characteristics of rechargeable batteries, SNVA533, Texas Instruments, 2011. [Online]. Available: http://www.ti.com/lit/an/snva533/snva533.pdf (visited on 04/24/2019). [20] Battery performance characteristics, Woodbank Communications Ltd, 2005. [Online]. Available: https: //mpoweruk.com/performance.htm (visited on 04/24/2019). [21] 18650 battery test 2011, Lygte Information, 2011. [Online]. Available: https://lygte-info.dk/info/ Batteries18650-2011%20UK.html (visited on 04/21/2019). [22] Peukert’s law and exponent explained, All About Lead Acid Batteries, 2019. [Online]. Available: http: //all- about- lead- acid- batteries.capnfatz.com/all- about- lead- acid- batteries/lead- acid- battery-fundamentals/peukerts-law-and-exponent-explained/ (visited on 04/24/2019). [23] Tenergy 18650 2200mah li-ion cell, Tenergy Corporation, 2009. [Online]. Available: http://www.all- battery.com/productimages/li-ion/Data%20sheet%2018650%202200mAh.pdf (visited on 04/24/2019). [24] Energizer no. l91 - engineering datasheet, EBC-4201L, Energizer. [Online]. Available: https://www.farnell. com/datasheets/9583.pdf (visited on 04/24/2019). [25] Bu-107: Comparison table of secondary batteries, Cadex Electronics, 2019. [Online]. Available: https: //batteryuniversity.com/learn/article/secondary_batteries (visited on 04/24/2019). [26] Lithium battery cycle life, Dongguan Large Electronics Co., 2011. [Online]. Available: http://www.large- battery.com/lithium-battery-cycle-life.html (visited on 04/20/2019). [27] C. O’Mathuna, T. O’Donnell, R. V Martinez-Catala, J. Rohan, and B. O’Flynn, “Energy scavenging for long-term deployable wireless sensor networks”, Talanta, vol. 75, pp. 613–23, Jun. 2008. doi: 10.1016/j. talanta.2007.12.021. [28] Eneloop - battery lineup, Panasonic Corporation, 2019. [Online]. Available: https://www.panasonic.com/ global/consumer/battery/eneloop/lineup.html (visited on 04/24/2019). [29] I. Buchmann, Bu-802b: What does elevated self-discharge do?, Cadex Electronics Inc, 2018. [Online]. Available: https://batteryuniversity.com/learn/article/elevating_self_discharge (visited on 04/24/2019). [30] Battery shelf life - a technology white paper, NOVA Power Solutions, 2012. [Online]. Available: http: //novapower.com/wp-content/uploads/2016/03/White-Paper-Battery-Shelf-Life.pdf (visited on 04/24/2019). [31] Battery life (and death), Woodbank Communications Ltd, 2005. [Online]. Available: https://www.mpoweruk. com/life.htm (visited on 04/24/2019). [32] Energizer no. l91 - engineering datasheet, L91GL0618, Energizer. [Online]. Available: http : / / data . energizer.com/pdfs/l91.pdf (visited on 04/24/2019). [33] Primary lithium –button and cylindrical cells, VARTA Microbattery. [Online]. Available: https://www. varta-microbattery.com/wp-content/uploads/2018/01/FOLDER_Primary_Lithium_en.pdf (visited on 04/20/2019). [34] Data sheet high energy 4903, VARTA Consumer Batteries, 2005. [Online]. Available: https://www.farnell. com/datasheets/39630.pdf (visited on 04/20/2019).

VII [35] Data sheet lr 03/ aaa power one, VARTA Microbattery, 2013. [Online]. Available: https://products. varta- microbattery.com/applications/mb_data/documents/data_sheets/DS4103.PDF (visited on 04/20/2019). [36] Data sheet the powerful alkaline high energy 4906, VARTA Consumer Batteries, 2014. [Online]. Available: https://www.mega-piles.com/im/VARTA-LR06-AA-1-5V-2960mAh-HIGH-ENERGY-X4_5.pdf (visited on 04/20/2019). [37] N. Garg and R. Garg, “Energy harvesting in iot devices: A survey”, in 2017 International Conference on Intelligent Sustainable Systems (ICISS), Dec. 2017, pp. 127–131. doi: 10.1109/ISS1.2017.8389371. [38] Remote powering of sensors, GreenWake Technologies. [Online]. Available: http://greenwaketechnologies. com/home.htm (visited on 04/25/2019). [39] J. Donovan, New applications for energy harvesting, Mouser Electronics. [Online]. Available: https : //www.mouser.se/applications/energy-harvesting-new-applications/ (visited on 04/24/2019). [40] D. Dondi, A. Bertacchini, L. Larcher, P. Pavan, D. Brunelli, and L. Benini, “A solar energy harvesting circuit for low power applications”, in 2008 IEEE International Conference on Sustainable Energy Technologies, Nov. 2008, pp. 945–949. doi: 10.1109/ICSET.2008.4747143. [41] D. Sera, R. Teodorescu, and P. Rodriguez, “Pv panel model based on datasheet values”, in 2007 IEEE International Symposium on Industrial Electronics, Jun. 2007, pp. 2392–2396. doi: 10.1109/ISIE.2007. 4374981. [42] A. M. Humada, M. Hojabri, S. Mekhilef, and H. M. Hamada, “Solar cell parameters extraction based on single and double-diode models: A review”, Renewable and Sustainable Energy Reviews, vol. 56, pp. 494– 509, 2016, issn: 1364-0321. doi: https://doi.org/10.1016/j.rser.2015.11.051. [Online]. Available: http://www.sciencedirect.com/science/article/pii/S1364032115013180. [43] N. Mohamed, N. Z. Yahaya, and B. Singh, “Single-diode model and two-diode model of pv modules: A comparison”, Nov. 2013, pp. 210–214, isbn: 978-1-4799-1506-4. doi: 10.1109/ICCSCE.2013.6719960. [44] D. Alonso-Álvarez, T. Wilson, P. Pearce, M. Führer, D. Farrell, and N. Ekins-Daukes, “Solcore: A multi-scale, python-based library for modelling solar cells and semiconductor materials”, Journal of Computational Electronics, vol. 17, no. 3, pp. 1099–1123, Sep. 2018, issn: 1572-8137. doi: 10.1007/s10825-018-1171-3. [Online]. Available: https://doi.org/10.1007/s10825-018-1171-3. [45] T. Takahashi, Photovoltaic-modeling-python, V. 0.2.1, 2016. [Online]. Available: https://pypi.org/ project/photovoltaic-modeling-python/0.2.1/ (visited on 05/24/2019). [46] T. Ahmad, S. Sobhan, and F. Nayan, “Comparative analysis between single diode and double diode model of pv cell: Concentrate different parameters effect on its efficiency”, Journal of Power and Energy Engineering, vol. 04, pp. 31–46, Jan. 2016. doi: 10.4236/jpee.2016.43004. [47] P4056 1a standalone linear li-lon battery charginer with thermal regulation in sop-8, NanJing Top Power ASIC Corporation, 2019. [Online]. Available: https://dlnmh9ip6v2uc.cloudfront.net/datasheets/ Prototyping/TP4056.pdf (visited on 04/20/2019). [48] Dw01-p one cell lithium-ion/polymer battery protection ic, DW01-P-DS-16_EN, Rev. 1.6, Fortune Semicon- ductor Corporation, 2016. [Online]. Available: https://www.ic-fortune.com/upload/Download/DW01-P- DS-16_EN_56033.pdf (visited on 04/20/2019). [49] J. Dufva and T. M. Lindgren, “Individual power supply to nodes in a wireless sensor network in a greenhouse using photovoltaic modules”, TVE-F 18 006, Bachelor Thesis, Uppsala University, Jun. 2018. [50] P-channel 20-v (d-s) mosfet, S09-0133, Rev. D, Vishay Siliconix, 2009. [Online]. Available: https://www. mouser.se/datasheet/2/427/72024-241226.pdf (visited on 04/21/2019).

VIII [51] Tps780xx 150-ma low-dropout regulator, ultralow-power, iq500 na with pin-selectable, dual-level output voltage, SBVS083E, Rev. 1/2015, Texas Instruments, 2007. [Online]. Available: http://www.ti.com/lit/ ds/symlink/tps780.pdf (visited on 04/21/2019). [52] Rp604x series - datasheet, EA-415-171114, Ricoh Electronic Devices, 2017. [Online]. Available: https: //www.mouser.jp/pdfdocs/Ricoh_RP604.pdf (visited on 04/08/2019). [53] Buck-boost and inverting - products, Texas Instruments, 2019. [Online]. Available: http://www.ti.com/ power-management/non-isolated-dc-dc-switching-regulators/buck-boost-inverting/products. html#p238min=1.3;2.5&p634min=-70;3.3&p634max=3.3;80&p1241=Converter&p236typ=0.011;0.033 (visited on 04/24/2019). [54] Low-power sub-1ghz rf transceiver, SWRS061, Texas Instruments, 2019. [Online]. Available: http://www. ti.com/lit/ds/symlink/cc1101.pdf (visited on 04/21/2019). [55] Ina219 high side dc current sensor breakout, Adafruit. [Online]. Available: https://www.adafruit.com/ product/904 (visited on 04/28/2019). [56] Ina219zero-drift, bidirectional current/power monitor with i2c interface, SBOS448G, Rev. 12/2015, Texas Instruments, 2008. [Online]. Available: http://www.ti.com/lit/ds/symlink/ina219.pdf (visited on 04/21/2019). [57] Power profiler kit, Nordic Semiconductor. [Online]. Available: https://www.nordicsemi.com/?sc_itemid= %7B3CF36A90-6BA3-4EFC-954C-D9C1AAFD638F%7D (visited on 04/28/2019). [58] X-nucleo-lpm01a, ST Microelectronics. [Online]. Available: https://www.st.com/en/evaluation-tools/x- nucleo-lpm01a.html (visited on 04/28/2019). [59] Otii arc, Qoitech. [Online]. Available: https://www.qoitech.com/ (visited on 04/28/2019). [60] Mt-912 light meter, URCERI. [Online]. Available: http://www.urceri.com/mt-912-light-meter.html (visited on 05/10/2019). [61] Tps6274x 360na iq step down converter for low power applications, SLVSB02B, Rev. 7/2014, Texas Instruments, 2013. [Online]. Available: http://www.ti.com/lit/ds/symlink/tps62740.pdf (visited on 05/02/2019). [62] Stm32cubemonpwr, STMicroelectronics. [Online]. Available: https://www.st.com/content/st_com/ en / products / development - tools / software - development - tools / stm32 - software - development - tools/stm32-performance-and-debuggers/stm32cubemonpwr.html#overview (visited on 05/11/2019). [63] Stm32 gpio configuration for hardware settings and low-power consumption, AN4899, Rev1 1, STMicro- electronics, 2017. [Online]. Available: https://www.st.com/content/ccc/resource/technical/document/ application_note/group0/13/c0/f6/6c/29/3b/47/b3/DM00315319/files/DM00315319.pdf/jcr: content/translations/en.DM00315319.pdf (visited on 05/03/2019). [64] Tps6273x step-down converter with bypass mode for ultra low-power wireless applications, SLVSAC3D, Rev. 12/2014, Texas Instruments, 2011. [Online]. Available: http://www.ti.com/lit/ds/symlink/tps62730.pdf (visited on 05/02/2019). [65] Keras: The python deep learning library, Keras. [Online]. Available: https://keras.io/ (visited on 05/15/2019). [66] L. Lai, N. Suda, and V. Chandra, “CMSIS-NN: efficient neural network kernels for arm cortex-m cpus”, CoRR, vol. abs/1801.06601, 2018. [Online]. Available: http://arxiv.org/abs/1801.06601. [67] X-cube-ai - ai expansion pack for stm32cubemx, STMicroelectronics, 2019. [Online]. Available: https: //www.st.com/en/embedded-software/x-cube-ai.html (visited on 05/14/2019).

IX [68] Getting started with x-cube-ai expansion package for artificial intelligence (ai), UM2526, Rev. 1, STMi- croelectronics, 2019. [Online]. Available: https://www.st.com/content/ccc/resource/technical/ document/user_manual/group1/69/bb/ec/5d/78/16/43/ce/DM00570145/files/DM00570145.pdf/jcr: content/translations/en.DM00570145.pdf (visited on 05/15/2019). [69] Background information about lorawan - lorawan overview, The Things Network, 2019. [Online]. Available: https://www.thethingsnetwork.org/docs/lorawan/ (visited on 06/08/2019). [70] What is the lorawan specification?, LoRa Alliance, 2019. [Online]. Available: https://lora-alliance.org/ about-lorawan (visited on 06/08/2019). [71] Rn2483 low-power long range lora technologytransceiver module, DS50002346D, Rev. 08/15/18, Microchip Technology, 2015. [Online]. Available: http://ww1.microchip.com/downloads/en/DeviceDoc/RN2483- Low-Power-Long-Range-LoRa-Technology-Transceiver-Module-Data-Sheet-DS50002346D.pdf (visited on 05/17/2019). [72] Sx1272/73 - 860 mhz to 1020 mhz low power long range transceiver, Rev. 4, Semtech Corporation, 2019. [Online]. Available: https://www.semtech.com/uploads/documents/SX1272_DS_V4.pdf (visited on 05/17/2019). [73] Sx1276/77/78/79 - 137 mhz to 1020 mhz low power long range transceiver, Rev. 6, Semtech Corporation, 2019. [Online]. Available: https://www.semtech.com/uploads/documents/DS_SX1276-7-8-9_W_APP_V6.pdf (visited on 05/17/2019). [74] Lorawan software expansion for stm32cube, UM2073, STMicroelectronics, 2018. [Online]. Available: https: //www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32- embedded-software/stm32cube-expansion-packages/i-cube-lrwan.html (visited on 05/18/2019). [75] Lorawan endpoint stack implementation and example projects, Semtech Corporation, 2013. [Online]. Available: https://github.com/Lora-net/LoRaMac-node (visited on 05/18/2019). [76] Tel0125, Mouser Electronics, 2019. [Online]. Available: https://www.mouser.se/ProductDetail/DFRobot/ TEL0125?qs=sGAEpiMZZMve4%2FbfQkoj%252BJ9vy5JfN93oXk%2F0fcDQwL4= (visited on 05/17/2019). [77] J. Göbel, Leitungen, antennen und wellenausbreitung, DHBW Ravensburg, Übertragungstechnik I, 2016. [78] J. Petajajarvi, K. Mikhaylov, A. Roivainen, T. Hanninen, and M. Pettissalo, “Path loss models for low- power wide-area networks: Experimental results using lora”, in Mobilkommunikation – Technologien und Anwendungen - 23. ITG-Fachtagung, May 2018. [Online]. Available: https://pub.h-brs.de/frontdoor/ deliver/index/docId/3707/file/2018-Path-Loss-Models-for-Low-Power-Wide-Area-Networks.pdf. [79] P. Jörke, S. Böcker, F. Liedmann, and C. Wietfeld, “Urban channel models for smart city iot-networks based on empirical measurements of lora-links at 433 and 868 mhz”, in 2017 IEEE 28th Annual International Symposium on Personal, Indoor, and Mobile Radio Communications (PIMRC), 2017, pp. 1–6. doi: 10. 1109/PIMRC.2017.8292708. [80] J. Petajajarvi, K. Mikhaylov, A. Roivainen, T. Hanninen, and M. Pettissalo, “On the coverage of lpwans: Range evaluation and channel attenuation model for lora technology”, in 2015 14th International Conference on ITS Telecommunications (ITST), 2015, pp. 55–59. doi: 10.1109/ITST.2015.7377400. [81] S. Ranvier, Path loss models, Helsinki University of Technology, S-72.333 Physical layer methods in wirelesscommunication systems, 2004. [Online]. Available: http://www.comlab.hut.fi/opetus/333/2004_ 2005_slides/Path_loss_models (visited on 05/18/2019). [82] Rf propagation simulation software - geodata, Radio Mobile, 2007. [Online]. Available: http://radiomobile. pe1mew.nl/?Geodata (visited on 05/18/2019).

X [83] Anaren integrated radio - a1101r08x user’s manual, Anaren Microwave, 2012. [Online]. Available: https: //cdn.anaren.com/product- documents/AIR/ProprietaryRF/A1101R08X/A1101R08x_UserManual.pdf (visited on 05/18/2019). [84] A. Waret, M. Kaneko, A. Guitton, and N. E. Rachkidy, “Lora throughput analysis with imperfect spreading factor orthogonality”, CoRR, vol. abs/1803.06534, 2018. [Online]. Available: http://arxiv.org/abs/1803. 06534. [85] Datasheet sht3x-dis, Version 6, Sensirion AG, 2019. [Online]. Available: https://www.sensirion.com/ fileadmin / user _ upload / customers / sensirion / Dokumente / 0 _ Datasheets / Humidity / Sensirion _ Humidity_Sensors_SHT3x_Datasheet_digital.pdf (visited on 05/21/2019). [86] Eeprom emulation techniques and software for stm32l4 and stm32l4+ series microcontrollers, AN4894, Rev. 2, STMicroelectronics, 2018. [Online]. Available: https://www.st.com/content/ccc/resource/technical/ document/application_note/group0/b2/94/a6/62/18/c0/4f/e6/DM00311483/files/DM00311483.pdf/ jcr:content/translations/en.DM00311483.pdf (visited on 05/22/2019). [87] 3.0v scc series supercapacitors, 112118, AVX Corporation. [Online]. Available: https://www.mouser.se/ datasheet/2/40/AVX-SCC-3.0V-1128335.pdf (visited on 05/02/2019). [88] Svlt series 3.6v, Lelon Electronics. [Online]. Available: https://www.mouser.se/datasheet/2/231/lelon_ 08202018_18-7-4_LELON_EDLC-SVLT_3.6V_Series_-1391352.pdf (visited on 05/09/2019). [89] 3.0v 3f ultracapacitor cell, 3002552-EN.2, Maxwell Technologies, 2019. [Online]. Available: https://eu. mouser.com/datasheet/2/257/3V_3F_datasheet-1535547.pdf (visited on 05/22/2019). [90] Lithium battery catalog, Panasonic Corporation, 2018. [Online]. Available: https://industrial.panasonic. com/cdbs/www-data/pdf/AAA4000/AAA4000COL32.pdf (visited on 05/24/2019). [91] Adp5090 - ultralow power boost regulator with mppt and charge management, Rev. C, Analog Devices, 2015. [Online]. Available: https://www.analog.com/media/en/technical-documentation/data-sheets/ ADP5090.pdf (visited on 05/24/2019). [92] Bq25505 ultra low-power boost charger with battery management and autonomous power multiplexer for primary battery in energy harvester applications, SLUSBJ3F, Rev. F, Texas Instruments, 2013. [Online]. Available: http://www.ti.com/lit/ds/symlink/bq25505.pdf (visited on 05/24/2019). [93] Max44009 - industry’s lowest-power ambient light sensor with adc, Maxim Integrated, 2011. [Online]. Available: https://datasheets.maximintegrated.com/en/ds/MAX44009.pdf (visited on 05/25/2019). [94] A. S. Nouman, A. Chokhachian, D. Santucci, and T. Auer, “Prototyping of environmental kit for georef- erenced transient outdoor comfort assessment”, ISPRS International Journal of Geo-Information, vol. 8, no. 2, 2019, issn: 2220-9964. doi: 10.3390/ijgi8020076. [Online]. Available: http://www.mdpi.com/2220- 9964/8/2/76. [95] Sm141k04lv - ixolar high efficiency solarmd, Rev. Sep. 2018, IXYS Corporation, 2010. [Online]. Available: http://ixapps.ixys.com/DataSheet/SM141K04LV.pdf (visited on 05/24/2019). [96] S. developers, Scipy.optimize.newton, 2014. [Online]. Available: https://docs.scipy.org/doc/scipy- 0.14.0/reference/generated/scipy.optimize.newton.html (visited on 05/24/2019). [97] S. Vignati, “Solutions for indoor light energy harvesting”, Master Thesis, Kungliga Tekniska H¨ogskolan, Nov. 2012. [98] Gw p9lr34.pm, V1.3, Osram Opto Semiconductor, 2018. [Online]. Available: https://www.mouser.de/ datasheet/2/311/Osram-09-14-2018-GW_P9LR34.PM_EN-1480155.pdf (visited on 05/24/2019). [99] Gw p9lr35.em, V1.0, Osram Opto Semiconductor, 2019. [Online]. Available: https://www.mouser.de/ datasheet/2/311/Osram-04-15-2019-GW_P9LR35.EM_EN-1568732.pdf (visited on 05/24/2019).

XI [100] Bq25504 - ultra low-power boost converter with battery management for energy harvester applications, SLUSAH0E, Rev. E, Texas Instruments, 2011. [Online]. Available: http://www.ti.com/lit/ds/symlink/ bq25504.pdf (visited on 05/24/2019). [101] Amorphous silicon solar cells amorphous photosensors, Panasonic Corporation, 2018. [Online]. Available: https://www.panasonic-electric-works.com/cps/rde/xbcr/pew_eu_en/ca_amorton_solar_cells_ 2018_en.pdf (visited on 05/25/2019). [102] I. Mathews, P. J King, F. Stafford, and R. Frizzell, “Performance of iii–v solar cells as indoor light energy harvesters”, IEEE Journal of Photovoltaics, vol. 1, Oct. 2015. doi: 10.1109/JPHOTOV.2015.2487825.

XII Appendix A Schematics Version 1.0

Intellectual property of Bitroot

XIII Intellectual property of Bitroot

XIV Intellectual property of Bitroot

XV Appendix B PCB Version 1.0

Intellectual property of Bitroot

XVI Appendix C Schematics Version 1.3

Intellectual property of Bitroot

XVII Intellectual property of Bitroot

XVIII Intellectual property of Bitroot

XIX Appendix D PCB Version 1.3

Intellectual property of Bitroot

XX Appendix E Schematics Version 2.0

Intellectual property of Bitroot

XXI Intellectual property of Bitroot

XXII Intellectual property of Bitroot

XXIII Appendix F PCB Version 2.0

Intellectual property of Bitroot

XXIV Appendix G CC1101 parameters

Baud rate Modulation Deviation Bandwidth Optimisation RX sensitivity sensitivity −112dBm 1.2kBaud GFSK 5.2kHz 58kHz RX-power −109dBm sensitivity −104dBm 38.4kBaud GFSK 20kHz 100kHz RX-power −102dBm sensitivity −95dBm 250kBaud GFSK 27kHz 540kHz RX-power −91dBm 500kBaud MSK - 812kHz - −90dBm 125kBaud 4-FSK 127kHz 406kHz - −96dBm 250kBaud 4-FSK 254kHz 812kHz - −91dBm 300kBaud 4-FSK 228kHz 812kHz - −89dBm

Table G.1: RX sensitivity of the CC1101 [54, p. 12f.]

PTX [dBm] -6 0 10 12 ITX [mA] 16.4 16.8 30.0 34.2

Table G.2: ITX(PTX ) of the CC1101 at 3.0V [54, p. 10]

GTX TX antenna gain 2dBi LTX TX internal loss 1dB* GRX RX antenna gain 2dBi LRX RX internal loss 1dB* Lmargin margin 5dB* *assumed

Table G.3: Other link budget parameters [83, p. 8]

XXV Appendix H SX1276 parameters

SF 6 7 8 9 10 11 12 BW 10.4kHz -131 -134 -138 -141 -144 -146 -149 62.5kHz -121 -126 -129 -132 -135 -137 -139 125kHz -118 -123 -126 -129 -132 -133 -136 250kHz -115 -120 -123 -125 -128 -130 -133 500kHz -111 -116 -119 -122 -125 -128 -130

Table H.1: RX sensitivity [dBm] of the SX1276 [73, p. 20]

PTX [dBm] 7 13 17 20 ITX [mA] 20 29 87 120

Table H.2: ITX(PTX ) of the SX1276 at 3.3V [73, p. 14]

GTX TX antenna gain 2dBi LTX TX internal loss 1dB GRX RX antenna gain 2dBi LRX RX internal loss 1dB Lmargin margin 5dB

Table H.3: Other link budget parameters (depend on the specific radio module, assumed)

XXVI Appendix I LoRa settings analysis

marker shape (bandwidth, BW), color (output power, PTX ) and number south (spreading factor, 6 − 12)

]BW = 10.4kHz ]BW = 62.5kHz ]BW = 125kHz ]BW = 250kHz ]BW = 500kHz 12 ]SF = 6 − 12 ]PTX = +7dB ]PTX = +13dB ]PTX = +17dB ]PTX = +20dB 100 12

11

11

10

12 10

12 12 9

11 12 9

11 11 8 10 12 10 11 8 12 7 10 10 11 12 7 12 9 10 11 6

] 12 12 9 9 10 6 11 8 129 12

mJ/byte 10 11 11 8 12 8 12 9 7 10 118 11 129 7 10 7 1 10 11 11 6 8 12 9 7 9 10 118 6 6 9 12 9 10 7 10 required energy per byte [ 11 6 8 8 12 9 7 9 10 8 11 8 6 9 9 7 10 7 116 8 7 9 7 10 8 8 6 6 9 7 10 7 6 8 6 0.1 7 9 7 8 6 9 7 6 8 6 7 8 6 7

6 7 6

6

0.01 1 10 transmission range [km] Figure I.1: Transmission range vs. energy per byte at different LoRa (SX1276) settings

XXVII Appendix J Radio comparison

]SX1276 ]CC1101 100 ]Bitroot’s CC1101 settings

10

] 1 mJ/byte

0.1 required energy per byte [

0.01

0.001

0.01 0.1 1 10 transmission range [km] Figure J.1: Radio comparison on transmission range and energy per byte

XXVIII Appendix K Supercapacitor comparison

optimized firmware with transmission at each wake-up (c.f. table 4.3, capacitors of table 4.5)

T = 3min. T = 15min. T = 1h T = 4h

10 100 ] ] h

mW 1 10

0.1 1 capacitor run-time [ Power consumption [ 0.01 0.1

0.001 0.01 10 100 1,000 10,000 wake-up period T [s]

system consumption system + max. 0.22F-IDCL system + max. 1F-IDCL system + max. 3F-IDCL system + max. 5F-IDCL system + max. 10F-IDCL run-time + max. 0.22F-IDCL run-time + max. 1F-IDCL run-time + max. 3F-IDCL run-time + max. 5F-IDCL run-time + max. 10F-IDCL

(a) Possible run-time at the power budget of table 4.3

rbold optimized firmware (c.f. table 4.4, Tsend = 1h, = 1/8, capacitors of table 4.5) rbnew

T = 3min. T = 15min. T = 1h T = 4h

10 100 ]

mW 1 10

0.1 1 capacitor run-time [h] Power consumption [ 0.01 0.1

0.001 0.01 10 100 1,000 10,000

wake-up period Twake [s]

system consumption system + max. 0.22F-IDCL system + max. 1F-IDCL system + max. 3F-IDCL system + max. 5F-IDCL system + max. 10F-IDCL run-time + max. 0.22F-IDCL run-time + max. 1F-IDCL run-time + max. 3F-IDCL run-time + max. 5F-IDCL run-time + max. 10F-IDCL

(b) Possible un-time at the power budget of table 4.4

Figure K.1: Comparison of supercapacitors run-time (discharge from 3V to 1.8V)

XXIX Appendix L Spectral comparison

60 Measured spectrum aSi CIGS 50 cSi

40 *nm)] 2

W/(cm 30 µ

20 Intensity [

10

0 400 500 600 700 800 900 1000 Wavelength [nm] (a) Greenhouse light spectrum [49, p. 15]

180 Measured spectrum aSi 160 CIGS cSi 140

120 *nm)] 2 100

80

60 Intensity [ µ W/(cm 40

20

0 400 500 600 700 800 900 1000 Wavelength [nm] (b) Spectrum of direct sunlight [49, p. 15]

Figure L.1: Measured light spectrum inside the greenhouse and of direct sunlight [49]

XXX Appendix M Harvesting A - Node 1

10 15

minimum 10 minimum 5 maximum maximum average average 5 output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (a) Estimated power, 7 days in 5/2018 (b) Estimated power, 5 days in 6/2018

10 10 minimum minimum maximum maximum 5 5 average average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (c) Estimated power, 24 days in 7/2018 (d) Estimated power, 14 days in 8/2018

15 10

10 minimum minimum maximum 5 maximum average 5 average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (e) Estimated power, 28 days in 9/2018 (f) Estimated power, 28 days in 10/2018

1 1

0.5 minimum 0.5 minimum maximum maximum average average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (g) Estimated power, 26 days in 11/2018 (h) Estimated power, 8 days in 12/2018

XXXI Appendix N Harvesting A - Node 2

10 15

minimum 10 minimum 5 maximum maximum average average 5 output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (a) Estimated power, 6 days in 5/2018 (b) Estimated power, 4 days in 6/2018

15 10

minimum 10 minimum maximum maximum 5 average average 5 output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (c) Estimated power, 20 days in 7/2018 (d) Estimated power, 14 days in 8/2018

20

10

minimum minimum 10 maximum maximum average 5 average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (e) Estimated power, 30 days in 9/2018 (f) Estimated power, 29 days in 10/2018

1 4

minimum minimum 0.5 2 maximum maximum average average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (g) Estimated power, 27 days in 11/2018 (h) Estimated power, 10 days in 12/2018

XXXII Appendix O Harvesting A - Node 3/4

14

12

10

8 minimum maximum 6 average output power [mW] 4

2

0

00:00 02:00 04:00 06:00 08:00 10:00 12:00 14:00 16:00 18:00 20:00 22:00 00:00 time [hh:mm]

(a) Estimated power, node 3, 4-10. May 2018

12

10

8

minimum 6 maximum average

output power [mW] 4

2

0

00:00 02:00 04:00 06:00 08:00 10:00 12:00 14:00 16:00 18:00 20:00 22:00 00:00 time [hh:mm]

(b) Estimated power, node 4, 4-10. May 2018

XXXIII Appendix P Harvesting B - Node 1

20 20

minimum minimum 10 maximum 10 maximum average average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (a) Estimated power, 7 days in 5/2018 (b) Estimated power, 5 days in 6/2018

20 20

minimum minimum 10 maximum 10 maximum average average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (c) Estimated power, 24 days in 7/2018 (d) Estimated power, 14 days in 8/2018

20 20

15

minimum minimum 10 10 maximum maximum average average 5 output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (e) Estimated power, 28 days in 9/2018 (f) Estimated power, 28 days in 10/2018

2 0.6

minimum 0.4 minimum 1 maximum maximum average average 0.2 output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (g) Estimated power, 26 days in 11/2018 (h) Estimated power, 8 days in 12/2018

XXXIV Appendix Q Harvesting B - Node 2

20 20

minimum minimum 10 maximum 10 maximum average average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (a) Estimated power, 6 days in 5/2018 (b) Estimated power, 4 days in 6/2018

20 20

minimum minimum 10 maximum 10 maximum average average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (c) Estimated power, 20 days in 7/2018 (d) Estimated power, 14 days in 8/2018

20 20

minimum minimum 10 maximum 10 maximum average average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (e) Estimated power, 30 days in 9/2018 (f) Estimated power, 29 days in 10/2018

4 2 minimum minimum maximum maximum 2 average 1 average output power [mW] output power [mW] 0 0

00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:0000:00 time [hh:mm] time [hh:mm] (g) Estimated power, 27 days in 11/2018 (h) Estimated power, 10 days in 12/2018

XXXV Appendix R Harvesting B - Node 3/4

20

18

16

14

12 minimum 10 maximum average 8

output power [mW] 6

4

2

0

00:00 02:00 04:00 06:00 08:00 10:00 12:00 14:00 16:00 18:00 20:00 22:00 00:00 time [hh:mm]

(a) Estimated power, node 3, 4-10. May 2018

20

18

16

14

12 minimum 10 maximum average 8

output power [mW] 6

4

2

0

00:00 02:00 04:00 06:00 08:00 10:00 12:00 14:00 16:00 18:00 20:00 22:00 00:00 time [hh:mm]

(b) Estimated power, node 4, 4-10. May 2018

XXXVI