Intelligent control of micro power – Immortal machine

Intelligent control of micro power – Immortal machine

Nano Energy 72 (2020) 104699 Contents lists available at ScienceDirect Nano Energy journal homepage: http://www.elsevier.com/locate/nanoen Full pap...

1MB Sizes 3 Downloads 190 Views

Nano Energy 72 (2020) 104699

Contents lists available at ScienceDirect

Nano Energy journal homepage: http://www.elsevier.com/locate/nanoen

Full paper

Intelligent control of micro power – Immortal machine Michael Walton *, John Woods School of Computer Science and Electronic Engineering, University of Essex, Colchester, UK

A R T I C L E I N F O

A B S T R A C T

Keywords: Intelligent control Wireless power Power management

Energy Harvesting Systems seek to remove the batteries from electronic devices and replace them with devices that generate directly from the environment around them. This paper presents an intelligent algorithm to manage received wireless power to do useful work even though there is insufficient energy to do the work directly. The example ultralow power microcontroller discussed here is the ATtiny85 although the approach is applicable to a whole family of similar micros. The algorithm used makes intelligent decisions whether to sleep or wake ac­ cording to the amount of received and stored energy. Using an adaptive strategy of this kind the amount of work can be precisely matched to the resources available to achieve maximum utilization with the objective of keeping the device alive for as long as possible subject to the satisfactory completion of a stated set of tasks.

1. Introduction - Motivation With the advent of low power microcontrollers it is possible to keep a computing device alive for extended periods of time with very limited resources. Extending this to a logical conclusion it should be possible to power a low power microcontroller indefinitely if the depletion from the power source can be replaced by a renewable source; the magnitude of which will be discussed later. But why would one wish to do such a thing? Self-powered sensor nodes have been published in the literature for a number of years. Sensor nodes generally take infrequent measurements of data which are then logged for later use. Devices of this type can be run from button cells or small batteries for months and deplete and replace the batteries is the generally accepted solution. The application of a renewable source im­ plies a desire to be environmentally friendly and/or extend battery life. If a solar panel powers a battery it will charge during the day and remain in the charged state at night. But without doing work, the machine serves no purpose. If subjected to a load, i.e. doing work, provided the load is less than the average power generated across the 24 h period, the battery will remain in a charged state. Setting the load to match the average power does not take account of the increased power availability during the day. Subsequent voltage regulation or decreased current demand from the battery cells when fully charged will result in useful power not being used to do work. If intelligent control is employed where the work done reflects the rate at which generation is taking place, the total work done over the 24

h period will be much greater. Intelligent control can be achieved using a dedicated piece of circuitry or alternatively a microcontroller. The advantage of a microcontroller is clear; the algorithm can be quickly and easily modified and different adaptation strategies can be applied. Modern microcontrollers can be in active or standby modes. Active mode is normal computational operation with access to A/D converters, GPIO, UARTs etc. Standby or sleep mode is where the pro­ gram remains in RAM and the program counter has been stored, but the clock and peripherals have been suspended. Wakeup techniques use interrupts based around a watchdog timer or external pin changes. Putting the microcontroller into standby/sleep results in very low power consumption and represents little or no burden to the system. When a cell has been charged and is ready to do useful work, the energy it has stored over an extended charge cycle can be discharged for a short period of time through a large load. This means the system can drive (albeit momentarily) much greater loads than it could from the steady charge alone. We are surrounded by lots of examples of this principal e.g. charging a car battery to start a petrol engine. A simple example application is a garden pond pump; normally a solar panel with sufficient output is required to drive the motor directly. However with a small solar panel the pump motor can never run directly from the sun. However with a controlled charge time followed by a shorter higher power discharge, useful work is done in aerating the pond – just not continuously. The basis of this work is the addition of a microcontroller to a low power charging resource to maximize the work done for a given input source. The assumption that the resource is inadequate to drive the load

* Corresponding author. E-mail addresses: [email protected] (M. Walton), [email protected] (J. Woods). https://doi.org/10.1016/j.nanoen.2020.104699 Received 22 January 2020; Received in revised form 2 March 2020; Accepted 10 March 2020 Available online 17 March 2020 2211-2855/© 2020 Elsevier Ltd. All rights reserved.

M. Walton and J. Woods

Nano Energy 72 (2020) 104699

directly is ubiquitous in energy harvesting systems and assumed here. To prevent over voltage the load should always be larger than the capability of the generation source. The microcontroller (or brain) is in itself parasitic to the system, but can be made very low power (of the order of nanowatts). The advantages outweigh the costs as seen later. Microcontrollers must operate within strict voltage bounds; typically in this work between 1.8 and 5v. Falling below 1.8 results in potential corruption of ROM and RAM and the de­ vice entering into an unknown state. Increasing beyond 5v will destroy the device. If for a given time dependent resource the voltage can be maintained between these two bounds and at the same time do useful work then the ‘perpetual’ machine has been realized. Work can be either internal or external to the MCU.

dispute and depends on application, duty cycle, sleep cycle etc. Current state of the art ultra-low power MCUs quote current re­ quirements as low as 30μA per MHz in active mode and 100nA in sleep mode with operational voltages as low as 1.8v. The power consumption of MCUs is dependent on the Micro­ controller’s clock speed, the operational voltage and the types of tech­ nology used, but will be in the order of milliamps when in active mode. The ATtiny85 [1] is an example of a cheap ultra-low power micro­ controller which can be developed under the Arduino platform. Under active mode it will draw 10–12mA running at 8MHz. The power source is a CR3032 3.0v coin cell battery, which is available in both 250mAh and 500mAh capacities. For the 500mAh case this gives (500mAh/12mA) over 40 h of run time. This is pretty good but this can easily be extended by several orders of magnitude if sleep cycles are used. On board any MCU there are a number of peripherals that use power. For example, the ATtiny85 has an analogue to digital converter. When not in use turning it off can reduce the power budget significantly. Further savings are possible by sleeping the MCU as discussed above and waking it up via a counter within the watchdog interrupt. The recently introduced MSP430 series from Texas Instruments widely used in power harvesting applications can be in active mode at 230μA, 1MHz, 2.2v or 0.5uA standby, 2.2v. It can also be programmed using Arduino based code. This 16 bit microcontroller running from the same CR3032 cell as before could run for 0.5/300u ¼ 1667 h or nearly 70 days in active mode. Even the most basic sleep strategies could extend life to years. The above observations give an intuitive insight into the large amounts of time available to replenish the source and the small amounts of power required to do so. For sensor networks and energy harvesting applications much of work required is periodic allowing the device to be powered down for significant periods of time. Power down or sleep mode in the MCU al­ lows considerable power savings with current consumptions potentially equivalent to less than the open circuit natural leakage of the batteries used. Say for example it is required to run the ATTiny85 as a sensor for one year from a CR3032 cell. Over the year that is (0.5/(24*365)) an average of ~57μA continuous current. 57μA is not enough to run an ATtiny85 in active mode (approximately 10mA) so a combination of sleep/wake cycles are required to match the available power budget. By being in active mode for a short period of time followed by a timed inactive or sleep period it becomes possible to match the MCU to the resources available. If Ta ¼ the active period, Ts ¼ the sleep period and I1 ¼ the current required whilst active and I2 ¼ the current required whilst sleeping then any average current budget can be expressed as:

2. Outline of objectives If a renewable resource is managed correctly it is possible to charge and maintain an accumulator such as a Supercapacitor. The addition of a parasitic microcontroller places a load on the accumulated resource but this can be mitigated by putting the MCU into standby/sleep mode. If the MCU never sees a voltage level below 1.8v, wakes periodically and performs a useful function then the machine that lives forever is born. For this to be possible the outgoing or consumption of power must obviously be less than the incoming or rate of generation or the voltage level on the accumulator will progressively decrease. Note capacitive leakage is not considered here. Microcontrollers that have deep sleep modes can enter into very low power modes and consequently tailor their behaviour to the resources available to them. In this way it is possible to run a microcontroller periodically where the input is less than the operational consumption. With the addition of the intelligent controller and awareness of gener­ ation rates it becomes possible to budget according to the current and future perceived resource; the machine should learn from past events. The overriding objective of a machine of this type is to stay alive i.e. maintain the voltage above v_min and to do as much work as possible in a given time. Work can fall into a variety of categories including: cal­ culations, driving external loads, and communication with the outside world. Available energy can be at two extremes: (i) excess or feast and (ii) insufficient or famine. In (i) the accumulator has reached the desired charge and the rate of influx is fast. In (ii) the accumulator is below its maximum and the influx is minimal or non-existent. If energy is bountiful as in (i) long duty cycles of work can be assigned and sleep times reduced. If energy is scarce as in (ii) little or no useful work can be done and sleep times must be very long. If Micro Solar were used (i) would be the case during the day and (ii) the case during the night. The MCU would need to ensure there was sufficient energy available in the accumulator to last from dusk until dawn. An obvious question is why keep the MCU alive at all, if the voltage dips below 1.8v just let it until sufficient energy becomes available again. Whilst this approach does have some merit, MCUs as they approach their operational voltage (from below) take significant amounts of current and may consume more energy than being generated without becoming operational. Low voltage lockout circuits exist which can prevent this but they often use more in standby than the MCU whilst operational! In the event of under voltage the current program state is lost (in RAM) meaning that any long term data needs to be written to ROM. If no under voltage protection is employed there is the very real possibility of ROM and program memory corruption as well. Given the tiny amounts of energy involved the option of keeping the MCU alive is a viable one. For example the MSP430 series from Texas can sleep for 12 h for approximately 1uWh.

Iaverage ¼

Ta Ia þ Ts Is Ta þ Ts

Ta þ Ts ¼

Ta Ia þ Ts Is Iaverage

Ta

Ta Ia ¼ Iaverage

Ts þ

T s Is Iaverage

Ts Iaverage Ia ¼ Ta Is Iaverage With Ia , Is and Iaverage known e.g. if Ia ¼ 10mA and Is ¼ 25μA and Iaverage ¼ 50uA. 50 � 10 25 � 10

6 6

10 � 10 50 � 10

3 6

¼ 398

Giving a ratio between Ts and Ta of 398 : 1 for the ATtiny85. To run the MSP430 for a year by the same reasoning would take a 3:1 ratio. As Iaverage →0 the ratio between Ts and Ta is approximately equal to

3. Ultra low power microcontrollers The MCU with the lowest power consumption is a matter of some 2

M. Walton and J. Woods

Nano Energy 72 (2020) 104699

Ia /Is . Thus for any known current budget the sleep/awake ratio can be found allowing it to be matched according to the prescribed energy budget. Applications of this technology are typically short duration and pe­ riodic such as a sensor node sampling temperature etc. However the combination of a battery free active (alive) microcontroller driven from a minimal energy source offer the potential for a machine to do useful work into the foreseeable future.

in some way or the device will die. 5. Corrollary of an imortal machine A number of parallels between the concept of a self-sustaining mi­ crocontroller and real life forms can be drawn. The code within the MCU should consider some or all of the following: Col1

Stay alive: one of the primary objectives of the machine should be to stay alive. This should be at the cost of all other objectives. Strategies should include adjusting sleep times and predicting the future time based resources. Work levels should be reduced or sus­ pended completely to match actual or perceived resource. Cautious contingency should be employed. Col2 Do an appropriate amount of work: Working too hard will deplete resources. Working too little will result in a failure to pros­ per. The optimum point lies in the analysis of arrival v’s consumption of energy and implies instantaneous knowledge of the associated time constants. Considerable gains are possible for the correct se­ lection of values. Col3 Sustenance: Any MCU device will necessarily expend energy just in being. The average energy supply available must exceed the minimum energy required to survive or life becomes impossible. Accumulation of energy to target long term averages becomes advisable. Col4 Heading towards starvation: If the MCU goes under-voltage due to capacitor depletion (typically <1.8v) the device can be deemed to have starved as it can no longer metabolize. This should not come without warning and its prediction should result in increased periods of sleep to conserve energy until more resource is available Col5 Gluttony: If the capacitor remains in a charged state all of the time even when work is being performed then the MCU is doing insufficient work for a given resource. It has become bloated and the sleep awake ratio can be reduced to redress this. Col6 Over-exertion: doing too much work can result in instanta­ neously dipping below v_min. This can be considered the equivalent of a heart attack. Resources are available but the device has become corrupt and should be considered dead. Reincarnation of the ma­ chine becomes difficult due to the energy hump that needs to be overcome and serves little purpose if vital information has been lost. Over exertion can be avoided by careful time constant analysis. Col7 Birth: Being born requires energy. The voltage should be greater than v_min. If the microcontroller sees under voltage it will consume considerably more power than in normal operation due to the quiescent state of the MCUs internal mosfets. Under voltage protec­ tion can be used but any circuitry will be parasitic. Alternatively a one off connection once v_min is exceeded permits birth. Col8 Maturity: A recently born device will have no knowledge of the nature of the resource available to it unless hard coded into its ge­ netics. It may not even have any knowledge of the size of storage capacitor or load, leaving it vulnerable to over exertion or starvation. As it begins to mature it will learn about its resources and capabilities as well as any long term changes. Col9 Prosper: In our context a prosperous entity is one which ach­ ieves the maximum amount of work per unit time for a given resource. Death would not be prosperous nor would a poorly designed work strategy such as sleeping too long. Col10 Accumulate resources: A full accumulator is the best the machine can hope for and can be considered as being rich. For a capacitor this means fully charged i.e. 5 time constants or more. The depth of any discharge cycle should be governed by knowledge of the arrival rate, but a fully charged device is better placed to deal with the future than one that is partially discharged or poor. Strategies should accumulate resources during times of plenty and attempt to maintain them.

4. Use of supercapacitors The ubiquitous battery can be replaced with a supercapacitor which has a number of advantages. It can be charged from zero, is compact, can charge/discharge very rapidly has duty cycles in excess of 500,000 and has a specific power of the order of 10kW per kg [9]. Disadvantages include low voltage ratings, some leakage and supercapacitors are not suited to ac. The application intended here is low voltage (5v) and capacitors are available in integer multiples of 2.7v. Leakage is important for low power applications and a good rule of thumb is 1uA/Farad [10] giving a minimum rate at which the capacitor can be charged. The application here is dc which is primarily what supercapacitors are designed for. A capacitor stores energy according to: 1 E ¼ CV 2 2 If a 5.4v 2 F supercapacitor is discharged from 5v to 4v then 1 J of energy is released. Division by time gives the power dissipated in Watts. If a 50mA motor is to be driven at the average voltage of 4.5v; P ¼ I.V and 0.05x4.5 ¼ 0.225W so the motor could be driven for 4.4 s given the capacitor conditions above (ignoring the incoming charge). On the charging cycle if we assume 1uA of capacitance leakage current, a current source of 1mA and an average current draw of 10μA from the microcontroller then according to: i¼C

dV dt

It will take 2/0.000989 ¼ 2022 s or 34 min to charge back to the 5v. The above makes no allowance for capacitance leakage or variation of incoming current. This specific example can be generalized as follows: If: C ¼ rating of the capacitor in Farads ILoad ¼ current drawn by the load ILeak ¼ the capacitance leakage current Vbefore ¼ voltage on capacitor before charge/discharge Vafter ¼ voltage on capacitor after charge/discharge Imicro ¼ average current draw of microcontroller Icharge ¼ charge current from the source The variables of interest are the charge times and the discharge times Tcharge and Tdischarge If the average voltage seen by the motor is: �� Vbefore Vafter 2 Then: TCharge ¼

� C Vbefore Vafter � Icharge ILeak Imicro

Tdischarge ¼

Iload

� C Vbefore Vafter � þ Imicro þ Ileak Icharge

Clearly from the above if Imicro þ Ileak � Icharge then no useful work is possible, the capacitor will begin to discharge and Imicro must be reduced 3

M. Walton and J. Woods

Nano Energy 72 (2020) 104699

Col11

Rest: In the rest or sleep mode very little energy is consumed. Long sleep durations are possible and are more efficient but risk missing useful incoming resources that won’t be used efficiently. Checking the incoming resource costs energy and is parasitic so needs to be used with caution. The energy consumed whilst sleeping is very low indeed and it is assumed the accumulator has sufficient energy for the device to survive for days. Col12 Awareness of surroundings: The inbuilt accumulator in the form of a capacitor has two distinct time constants; the charging and the discharging. The discharging time constant will consist of the capacitor and a generally fixed load. The charging time constant will have the same capacitor but a time varying impedance associated with the current source. Accurately determining these two time constants is key to the efficient utilization of the resource. A machine with an awareness of the source and load model can be shown to perform better. Col13 Consider the worst: As a device heads towards starvation, has been sleeping for extended periods but things do not appear to improve, it must begin to consider the worst. In the event of death any important information should be conserved for recovery in the event of being reincarnated. Writing critical information such as the time constants, sensor readings and critical data to ROM in the last throws of life should be considered so they can be recovered in the future. Col14 Learn: Learning can be considered in a number of ways: short term such as the instantaneous time constants and long term such as the diurnal of day and night e.g. for a photovoltaic. Knowing infor­ mation such as mean and deviation etc. makes for a better informed entity with a greater chance of survival. Col15 Burn Out: Failure to correctly manage resources can result in the stored voltage exceeding the maximum rating of the circuit in the absence of over voltage protection the device will experience per­ manent damage and die

Using wireless power transfer, it is possible to receive power wire­ lessly and do work without the conventional storage medium of a bat­ tery [4]. An example is the battery free receiver designed by the Powercast Group [5]. This product is the P2110B 915 MHz RF Power Harvester far field Receiver [6] and designed for sensor networks and active RFID. Distances of 10 m are claimed but at the expense of highly directional and powerful transmitters. Accumulation of energy into a supercapacitor is used. Our system is distinct from the Powercast offering. Both systems accumulate energy onto a supercapacitor but we (a) try to keep the microcontroller alive and (b) deliberately design it to run larger instantaneous loads than the source can supply. Accumulating power and then discharging is a bit like saving up to buy something one cannot immediately afford. This is achieved by accumulating for a specific length of time, then spending it when a threshold has been reached. The analogy continues because the cost of living needs to be taken into account to prevent the savings going below zero. To accumulate a desired quantity of energy, it is necessary to observe/measure a resource. The act of performing a measurement is in itself parasitic and the more frequently one measures a resource the more energy is consumed without doing useful work. An obvious approach is to perform measurements at regular intervals, but if the system is understood, observations need only be sparse achieving greater efficiency for a given setup. The subsequent sections show an intelligent algorithm for power accumulation which optimally adapts to available source and required load. The power requirements of the microcontroller and the capaci­ tance leakage manifest as an addition to the load. 7. Intelligent control To illustrate intelligent control of wireless power transfer an algo­ rithm is created and examined in a test bed. The idea is to periodically run a load from a source which has less energy than the continuous requirement of the load. This is achieved by scheduling the work time for the load into short bursts or shifts in the duty cycle according to the voltage accumulated on the capacitor. The steps to achieve this are: turn the load off; wait for energy accumulation on the capacitor; turn the load on for a specific time; deplete the capacitor to a known level; turn off and repeat from the beginning. The block diagram of the system is shown in Fig. 1. The received power is rectified and stored in the reservoir capacitor. The capacitor represents the dc source of the system. The microcontroller makes a decision to turn the load on or off according to the charge state of the capacitor. Fig. 2 presents the simplified schematic diagram of the system. The testbed uses a loop antenna similar to those used for far field transceivers. It is used for convenience due to its impedance character­ istics. The loop antenna is a radio device which consists of one or more loops. In our design, two loops have been used as shown in Fig. 3. The first one is the coaxial oscillating loop or coupling loop which has a 50Ω impedance to match the source which is a signal generator. The second one is the main loop or the free running loop (in resonance), which represents the transmitter for the overall design. A tuning capacitor is also used for fine adjustments. The receiving coil is a 10 turn PCB based

6. Resonant power transfer example In the following we use a very low power resonantly coupled antenna to charge a supercapacitor. The choice of resonant coupling allows us to tightly monitor the input and output energy using only a signal gener­ ator without the need for dc-dc converters to up transform the voltage. It then becomes possible to precisely study our machine. The same reasoning can be applied to small solar or piezo based renewable sources which have also been used and produce comparable results. The performance of the traditional transformer which is based on inductive magnetic coupling between primary and secondary coils, improves when the two coils resonate at the same frequency [1]. This forms the basis of most wireless charging systems allowing transfer of energy across free space at distance. The amount of power transfer is dependent on the mutual inductance between the two coils, which is inversely proportional to the distance between them [2]. The secondary needs to receive enough energy to enter resonance, otherwise work becomes impossible. Traditionally, near and far field low power resonant systems have had no major function. However, new systems are appearing [3] which allow reception, rectification and then storage of the dc in capacitors.

Fig. 1. Mutual induction process. 4

M. Walton and J. Woods

Nano Energy 72 (2020) 104699

Fig. 2. Schematic diagram of the system.

described as follows: 1) 2) 3) 4) 5) 6) 7) 8) 9) 10) 11) 12) 13)

Fig. 3. Loop antenna.

Read VCC Sleep for a short time Read VCC Calculate τch (Time constant for charging) Find (tsleep) the required time for sleeping until target1 Sleep for tsleep Wake up, read VCC and turn the load on Delay for short time Read VCC Calculate τd (Time constant for discharging) Find (ton) the required time for turning the load on Delay for ton Repeat from step 5

8.1. τch charging time constant calculation

coil with 1/100th the area of the main loop. 1v pk – pk sine wave is used to drive the coupling loop at around 4MHz giving a transmit power of approx. 3.5mW assuming perfect matching. Faraday shielding is used in this band to prevent unlicensed radiation.

Step 4 in the algorithm needs some clarification, where τch is the time constant of charging the capacitor in the system. It is known as:

τch ¼ Rch *C

8. The algorithm

(1)

Where Rch is the equivalent impedance in series with capacitor C [8]. Fig. 4 shows the mechanism of charging and discharging the capacitor. In this system Rch is not a constant impedance. It is the equivalent impedance of the combined circuit before the capacitor and is difficult to calculate as it changes with coupling and load. Therefore, the time constant needs to be calculated regularly and updated. It is possible to calculate the time constant from two readings of the capacitor’s voltage at any given time while it is charging. The time constant for charging can be calculated in this way starting with the basic capacitor charging formula, as shown below: � � (2a) V0 ¼ Vin 1 et0 =τch

To manage energy over time, it is necessary to read the capacitor voltage regularly until a target voltage is attained. Then a decision can be made to run the load. This could be done using discrete electronics or a low power microcontroller. The new generation of ultra-low power controllers such as the Atmel ATTiny 85 and the TI MSP430 have comparable or better power consumption than bespoke electronics with the added advantage of onboard computation. A microcontroller in the awake state can consume 2–3 orders of magnitude more power than when asleep [7]. Our system moves beyond simply ‘sitting’ and waiting for the capacitor to charge before doing anything. Two readings are taken of the capacitor voltage at separate times and used to calculate the time constant of the system. From this the required sleep time can be calculated so the microcontroller awakes at the point where the capacitor has reached the desired charge (recall sleep is much more energy efficient than awake). Two readings are used in the first cycle followed by a single reading in subsequent cycles to update the estimated time constant. The outline of the algorithm is

� V1 ¼ Vin 1

et1 =τch



(2b)

Where V1 and V0 are the voltage readings at t1 and t0, respectively.

Fig. 4. Circuit of charging and discharging a capacitor.

Fig. 5. Capacitor charging. 5

M. Walton and J. Woods

Nano Energy 72 (2020) 104699

Where Vin is the maximum voltage as shown in Fig. 5. These two equations can be re written: � � V0 (3a) t0 ¼ τch ln 1 Vin � t1 ¼

t1

V1 Vin

τch ln 1

� (3b)

Taking the difference between the two times leads to: � � � � V0 V1 t0 ¼ τch ln 1 τch ln 1 Vin Vin t1 �

τch ¼ �

t0

� ln 1

V0 Vin

ln 1

V1 Vin

t t0 � ¼ �1 � Vin V0 ln Vin V

(4) (5)

1

giving an estimate for the time constant regardless of where we are on the charging curve. From the calculated charging time constant the microcontroller can find the required sleep as in step 5 of the algorithm by: � � Vin tsleep ¼ τch ln (6) Vin Vtarget1 8.2. τd discharging time constant calculation Similar to the above, the time constant for discharging can be calculated as required in step 10. The time constant in the discharging process τd depends on the parallel load resistance Rd [8]. In this system Rd represents the equivalent resistance of the circuit beyond the capacitor, and it is defined as:

τd ¼ Rd *C

(7)

As before taking two voltage readings (V2 and V3 from Fig. 6) is enough to find the discharging time constant. The first reading is taken at the highest charged point t2. The second reading should be taken a short while afterwards, t3 as shown in Fig. 6. Starting with the capacitor discharging formula, τd is derived as shown below: (8a)

t2 =τd

V2 ¼ Vstart e

(8b)

t3 =τd

V3 ¼ Vstart e

These two equations can be re-written: t2 ¼

τd ln

V2 Vstart

(9a)

t2 ¼

τd ln

V2 Vstart

(9b)

Fig. 7. Flowchart of time constant calculation method.

Taking the difference between the two times leads to: t3

t2 ¼

τd ln

V3 V2 þ τd ln Vstart Vstart

(10)

τd ¼

t3 �

� ln

V2 Vstart

t2 ln



�¼ V3

Vstart

t3

t � �2

ln

V2 V3

(11)

With reference to step 11 in the algorithm, the calculated discharge time constant can be used to estimate the required time to spend the accumulated energy as useful work: � � Vstart ton ¼ τd ln (12) Vtarget2 The flowchart in Fig. 7 provides specific detail of the implementation tested here. The highlighted shapes represent the remaining parts in force in subsequent cycles. This shows that the time constants are calculated only in the first cycle and then updated as new conditions occur. After the first cycle, just one reading is required during charging and one reading during discharging.

Fig. 6. Capacitor discharging. 6

M. Walton and J. Woods

Nano Energy 72 (2020) 104699

Fig. 8. Charging and discharging processes.

Fig. 9. Efficiency vs sleep time.

9. Comparison with continuous measurement

Table 1 Variables values.

Continuously measuring the stored energy on the capacitor can be achieved by regularly reading (e.g. every few seconds) its voltage until it just surpasses the target. Reading voltages in this way is wasteful of power because of the awake state energy requirements of the micro­ controller. Logically, reducing the number of the readings by increasing the sleep time between subsequent readings will improve the efficiency of the system. Nevertheless, there are limitations to maximum sleep times. With arbitrary delays the voltage could exceed the target and even over voltage the microcontroller. The action of reading the analog voltage has the direct effect of also increasing the time to target, so regular reading also requires increased charging times to compensate for the cost of the awake states. Fig. 8 shows the periodic sampling approach for charging and dis­ charging the capacitor. The samples during the charging cycle are every 8 s in this example and require the microcontroller to be awake for 2.5 ms. The rest of the cycle the microcontroller is sleeping using 100 times less power. If the system has a time constant of 150s, it requires 13 readings to reach target 2 (sampled every 8s) as well as the samples required during discharging to reach target 1. It seems that there are two disadvantages to the regular sampling approach: as well as decreasing the efficiency, the system requires more time to reach the target because of the increased parasitics. With an accurate estimate of the time constant for charging an appropriate sleep time can be found for the microcontroller allowing efficient accumulation of energy; waking only once at the point where target 2 has been exceeded. With the associated knowledge of the dis­ charging time constant target 1 can be reached without depleting the capacitor below the microcontroller’s minimum operational voltage. In terms of energy, it is possible to calculate the efficiency of the charging process of the capacitor as follows: Efficiency ¼

Output energy *100% Input energy

(13)

Efficiency ¼

Pwork : Td *100% Pwork :Td þ Ps :Ts þ Pr :Tr :N

(14)

C ¼ 4700μF

The used capacitor

Rc ¼ 33kΩ Rd ¼ 700Ω Is ¼ 5μA Ir ¼ 5mA Ton ¼ 2.5 ms Vtarget1 ¼ 4V Vtarget2 ¼ 3V

The The The The The The The

equivalent serial resistance equivalent parallel resistance microcontroller current during sleep mode average current when the microcontroller is on wake up time for each reading upper level of voltage lower level of voltage

Fig. 9 shows the efficiency of the system as a function of sleep time. The figure leads one to believe that longer sleep time gives greater ef­ ficiency but when Tsleep > Tactual over voltage will occur damaging the circuitry and sub optimal use will be made of the resources available. 10. Results The system shown in Fig. 4 has been simulated in Matlab to evaluate the charging process of the capacitor controlled by an ATtiny85. The variables in the simulation are shown in Table 1. The two factors of interest are the efficiency of the charging process and the extra time required to compensate for the losses incurred from the regular reading during the charging process. Different sleep times are used to show the impact on efficiency of the system. Looking now at the discharging, without any interval time between any two readings, the efficiency will be zero for the given setup shown in the table because all the stored energy will be spent driving the micro­ controller and performing continuous reading. Fig. 10 shows the effect of three different interval times between readings during discharging.

where: Pwork: Useful power or output power. Td: Discharging time Ps: Power consumption of the microcontroller during sleep time. Ts: Sleep time. Pr: Power consumption of the microcontroller for each voltage reading. Tr: The time it takes for each reading. N: The number of readings.

Fig. 10. Efficiency of regular reading method for discharging with different sleep times. 7

M. Walton and J. Woods

Nano Energy 72 (2020) 104699

Fig. 13. Comparison of fixed time vs proposed algorithm.

discharge, however, it can be seen that given the same conditions there are 5 discharges for the fixed case and 12 for the adaptively controlled. The accumulated discharge voltage for the adaptive algorithm (12x1.2) is 14.4, compared with 7.1 from the fixed. This shows an improvement in useful work done of 2.03:1 for the adaptive case.

Fig. 11. Efficiency of regular reading method with different sleep times compared to the τ calculation method.

11. Diurnal and long term cycles Thus far we have been concerned with a resource which is used to charge a capacitor which when appropriately charged is discharged through a load. For efficiency this requires acquired knowledge of charging and discharging time constants. However may not be the only cycle that is present. Corollary 1 (Col1) requires that the entity stay alive. With no knowledge of the system this is difficult. Immediate strategies may include monitoring rate of energy arrival and basing future de­ cisions on this. Col2 requires appropriate work but should be subject to Col1. Without knowledge of diurnal or long term patterns the best available strategy is to accumulate avoiding Col15 and discharge to a predetermined level thus obeying Col2. However if a Col4 event (famine) unexpectedly occurs, an immediate and automated response is to resort to Col10 and sleep for long periods in the hope that the Col4 event passes. If the Col4 event time is known a priori then contingency can be made for it. Col9 requires the accumulation of resources. By curtailing the Col2 requirement to do useful work and instead adhering to Col9 until Col4 is achieved. Then when the Col4 event does arrive the entity is best pre­ pared for a long Col10 period.

Fig. 12. Percentage of extra charging time for regular reading compared to the proposed τ method.

The figure illustrates that the longer the interval time, the higher the efficiency for a specific sleep time. Moreover, increasing the sleep time improves the efficiency for a specific interval time. The comparison between continuous and our selective time constant based method is shown in Fig. 10. It is clear from the figure that the efficiency of the time constant calculation method is more than two times that of the regular reading with 16s sleep time and 10 ms discharge interval time for the given 150 s Tau setup. Fig. 11 presents the percentage of the additional charging time as a result of multiple readings proportional to the required time of our proposed method: Extra time percent ¼

tr

tp tp

12. Conclusion Power management can be achieved by implementing intelligent control in the design of a wireless power transfer system, but has far reaching implications for other low power applications. This study presented an algorithm to run a load with a source which has less energy than the load’s continuous requirements. Utilization has been achieved by using an ultralow power microcontroller that makes sleep and awake decisions in order to accumulate the maximum amount of usable energy. At the appropriate time the micro wakes up, briefly runs the load, keeping sufficient power to allow it (the micro) to stay alive. The presented algorithm is easily realized in code and achieves best case utilization from just two readings. This contribution represents a significant improvement in efficiency over the periodic analysis case. It keeps charging times fixed without marked expansion and allows increased discharging time to do more useful work.

(15)

where tr: Charging time of regular reading method. tp: Charging time of proposed method From the two previous figures (Figs. 11 and 12) using low sleep times is infeasible due to low efficiency along with the increased charging times. Fig. 13 shows two plots; the blue trace using the adaptive algorithm and the violet trace using fixed time. It is clear for the adaptive algorithm that the usable (i.e. discharging) energy is considerably higher than the fixed strategy. Both cases demonstrate periodicity for charge and

Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

8

M. Walton and J. Woods

Nano Energy 72 (2020) 104699

CRediT authorship contribution statement

[10] P. Mars, Coupling a supercapacitor with a small energy harvesting source, available on, http://www.eetimes.com/document.asp?doc_id¼1279362. (Accessed 23 August 2019).

Michael Walton: Conceptualization, Methodology, Software, Data curation, Writing - review & editing, Visualization, Investigation. John Woods: Supervision, Writing - original draft, Validation, Writing - re­ view & editing.

Michael Walton Has been working in the field of electronics and design for the past 20 years and is also employed as a lecturer at the University of Essex where he teaches Electronics and computer languages. Currently working on a PhD which focuses on energy harvesting, wireless energy transmission and efficient energy storage and utilization his interests allow him to actively participate in leading edge energy sensitive device design.

References [1] S. Ho, J. Wang, W. Fu, M. Sun, A comparative study between novel witricity and traditional inductive magnetic coupling in wireless charging, IEEE Trans. Magn. 47 (5) (2011) 1522–1525. [2] T. Thabet, J. Woods, and C. Uk, “An Approach to Calculate the Efficiency for an NReceiver Wireless Power Transfer System.”. [3] P. Nintanavongsa, U. Muncuk, D.R. Lewis, K.R. Chowdhury, Design optimization and implementation for RF energy harvesting circuits, IEEE. J. Emerg. Sel. Top. Circuits Syst. 2 (1) (2012) 24–33. [4] A. Kurs, A. Karalis, R. Moffatt, J.D. Joannopoulos, P. Fisher, M. Solja�ci�c, Wireless power transfer via strongly coupled magnetic resonances, Science 317 (5834) (2007) 83–86. [5] P. Groap, Powerharvester receivers, available on, http://www.powercastco.com/te st566alpha/wp-content/uploads/2009/03/powerharvester-brochure.pdf. (Accessed 23 August 2019). [6] P. Group, P2110B datasheet, available on, http://www.powercastco.com/test5 66alpha/wp-content/uploads/2009/03/p2110b-datasheet-v12.pdf. (Accessed 23 August 2019). [7] A. Corp, ATtiny25-ATtiny45-ATtiny85 datasheet, available on, http://www.atmel. com/Images/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny8 5_Datasheet-Summary.pdf. (Accessed 23 August 2019). [8] A. Hambley, Electrical Engineering Principles and Applications, Prentice-Hall, New Jersey, 1997. [9] Tecate Group, Ultracapacitors, available on, https://www.tecategroup.com/ultra capacitors-supercapacitors/ultracapacitor-FAQ.php. (Accessed 23 August 2019).

Dr John Woods Has worked at the University of Essex for the last 25 years where he is a senior lecturer and currently the director of education in the CSEE department with over 1300 students. He has a variety of research interests including networking, image processing, artificial intelligence, human computer interaction but more recently renewable energy sys­ tems and the utilization thereof, this has led to a number of pieces of work which are looking at power utilisations in the nano watt range to power small robotic devices.

9