1 Introduction
Considerable advances in Wireless Power Transfer (WPT) (Kurs et al. [2007], Lin et al. [2015]) have made the technology viable for use in (mobile) ad hoc networks. Special nodes can be deployed in the network area and exploit WPT to replenish the energy reserves of the network nodes, allowing them to sustain their normal operation for longer periods of time, and thus extending the network lifetime.
Further recent developments on WPT technologies offer mobile devices the capability to achieve bidirectional energy transfer, and enable peertopeer energy exchanges between network nodes (del Prete et al. [2015], Schafer et al. [2015]). This enables new applications. For instance, we can imagine scenarios where tiny medical devices, equipped with sensors, are injected into a patient’s body in order to monitor her medical status. Due to their size, such devices would be computationally weak and have limited memory as well as energy reserves. By utilizing their communication capabilities, these devices will be able to coordinate with each other in order to form complex network structures that will enable them to perform more advanced computations.
Michail and Spirakis [2016] initiated the study of network formation among populations of computationally weak agents. Their model is inspired by the population protocol model (Angluin et al. [2007]), and assumes that the agents do not share memory or exchange messages unless they interact, in which case they can get connected to form particular network structures. The agents are required to collectively converge
to a stable state, even though they cannot grasp the status of the entire population. The authors design, prove the correctness, and analyze the time complexity of a series of protocols for the formation of many interesting networks focusing, among others, to stars, lines and rings. Moreover, they design generic protocols that are capable of simulating Turing Machines in order to construct large classes of networks.
Achieving energy balance over the network nodes using a peertopeer WPT schema can ensure the longevity of the network. Recently, Nikoletseas et al. [2017b] showed that energy balance can be achieved by populations of devices (agents) that interact in an opportunistic manner. Whenever two agents happen to be in close proximity they can decide whether they will exchange energy based on their current configuration (energy levels, memory, etc) or not. They use the model of a probabilistic scheduler to simulate the interactions between pairs of nodes, and assume that during an energy exchange a constant fraction of the energy is lost.
Madhja et al. [2016a] studied the problem of energyaware network formation among populations of computationally weak agents, a problem that combines elements from the models of Michail and Spirakis [2016] and Nikoletseas et al. [2017b]. The goal is to design distributed protocols so that the nodes connect with each other to form a star network as well as a particular energy distribution, where the central node stores half of the network energy, while the remaining energy is evenly distributed among the rest of the nodes. Another critical difference of the model of Madhja et al. [2016a] from that of Nikoletseas et al. [2017b], is that the energy that is lost during any exchange varies from interaction to interaction.
1.1 Our contribution
In the current paper, we adopt the model of Madhja et al. [2016a], and focus on the problem of peertopeer energyaware tree network formation among populations of computationally weak agents. In particular, we focus on the construction of spanning arbitrary and binary tree networks, and energy distributions with the property that every node has (at least) twice the energy of each of its children.
We design, prove the correctness, and analyze the time complexity of two simple protocols for the construction of spanning arbitrary and binary tree networks. These protocols require only a few states (four for arbitrary trees and six for binary) and interaction rules (five and eight, respectively). We also present two simple interaction rules that allow the nodes to locally infer useful information about their own depth and the height of the tree. See Section 3.
To achieve desired energy distributions, which depend on the network structure, we consider four energy redistribution protocols that differ on the amount of energy that gets exchanged during the interactions, and on the knowledge that the nodes learn about the network structure. In Section 4, we present the protocols and analyze some of their properties, mainly focusing on the lossless case, where we assume that no energy is lost during any interaction. This assumption allows us to argue whether, even under unrealistically perfect conditions, our protocols are able to converge to the desired energy distributions. In Section 5, we further consider the lossy case and conduct simulations in order to finetune several parameters used by the protocols, and evaluate their performance on several metrics, including the convergence time and the quality of the outcome distribution.
1.2 Related Work
Wireless Power Transfer has been extensively studied in the context of (mobile) ad hoc networks. In most of these studies, powerful chargers are used with the sole purpose of replenishing the energy of the network nodes. For an overview of WPT techniques as well as some of the key elements that make WPT possible, we refer the interested reader to the work of Bi et al. [2016] and the book by Nikoletseas et al. [2016].
Nikoletseas et al. [2017a] experimentally show that WPT is a viable option for the extention of the lifetime of wireless sensor networks, by performing experiments using real devices that aim to charge the sensors and, at the same time, keep the energy loss low. They also propose a protocol that achieves energy balance over the chargers. Dai et al. [2018b, a] evaluate WPT in the context of electromagnetic radiation (EMR) safety. They design protocols for the placement and configuration of chargers in static communication networks in order to guarantee EMR safety at any point of the network area. They prove approximation guarantees, and evaluate their protocols both via simulations as well as experimentally in field tests.
Madhja et al. [2015] consider multiple mobile chargers with limited energy and design efficient traversal and coordination strategies with the goal of extending the network lifetime of static sensor networks. In contrast, Angelopoulos et al. [2015] consider mobile ad hoc networks and a single mobile charger with infinite energy that traverses the network in order to recharge the agents as required. Another variation of this flavor, is the recent work of Madhja et al. [2018] who consider mobile ad hoc networks and a single static charger that has the ability to adapt its charging power in order to balance the tradeoffs between recharging the mobile agents and saving energy for future interactions.
Zhang et al. [2012] and Madhja et al. [2016b] take a different approach and assume some peertopeer elements for the chargers. In these two studies, the authors propose protocols which allow the chargers to cooperate and charge each other as well as the network nodes. Dhungana et al. [2018] study the advantages of peertopeer energy exchange between mobile devices. In their model, the mobile devices can be charged either by using a charging cable or in a peertopeer manner based on their interactions with other devices. The goal is to minimize the amount of times a device will need to be charged through a charging cable. Bulut et al. [2018] study the potential of crowdcharging. They discuss its feasibility, the software and hardware challenges that emerge for its use, and develop an app that builds a social network among the users, which manages the entire process of power sharing between the mobile devices.
2 Preliminaries
We consider a population of agents (nodes) who move around in a bounded networking area. When two nodes come in close proximity, they interact according to an interaction protocol which essentially defines the information that the nodes must exchange, and how they should update their configuration. The objective of the interaction protocol is the nodes to eventually form a desired network structure and an energy distribution.
In the following, we give necessary definitions and terminology regarding node configuration, interactions, tree formation, energy distributions, exchanges and loss.
2.1 Configurations and interactions
We assume that the time is split into discrete steps. For every time step , each node is in a state from a set of possible states, has energy , memory , and network connections ; the tuple is the configuration of node at time . During each time step , a pair of nodes interacts, and the nodes update their configurations according to the rules of the interaction protocol, which define transitions of the form
Such a transition indicates that, if a specific condition regarding the nodes or the network is met, then the configurations of the two participating nodes and are updated from and at time to and at time .
In general, the movement of the nodes can be highly arbitrary as they may correspond to smart devices that are carried around by humans or robots following possibly unpredictable movement patterns performing tasks. Following previous work (Michail and Spirakis [2016], Nikoletseas et al. [2017b], Madhja et al. [2016a]), we abstract the movement of the nodes by assuming that all interactions are planned by a fair scheduler, which satisfies the property that all possible interactions will eventually occur. Specifically, we consider the existence of a fair probabilistic scheduler (Angluin et al. [2007]
), according to which, during every time step, a single pair of nodes is selected independently and uniformly at random among all possible pairs of nodes in the population. Hence, every pair of nodes will most probably interact in a span of
time steps.2.2 Tree formation
Our goal in this paper is to define interaction protocols that can construct tree networks. Hence, we assume that the nodes can form parentchild connections. When such a connection is established between two nodes and , a directed edge from to , denoted as , is formed in the network. The direction indicates that is the parent node and is the child node, and helps them to realize who of them is the parent when they communicate again in future interactions. Of course, each node can have at most one parent, but multiple children, depending on the tree we are aiming for.
We are particularly interested in rooted spanning tree structures consisting of all nodes in the network. We will call a node isolated if it is not connected to any other node in the network, leaf if it has a parent but no children, internal if it has a parent and at least one child, and root if it does not have parent but has children.
2.3 Energy distributions
Another goal of this paper is to define protocols that can achieve desired energy distributions over the nodes of the network. We define three interesting types of energy distributions. All of them demand that nodes of lower depth (closer to the root of the tree) have more energy than nodes of higher depth. This is intuitive in applications related to data propagation, where the nodes that are closer to the data sink are involved in almost all propagations and need plenty of energy to function properly for long periods of time, while distant nodes rarely communicate that much and they can sustain normal operation using less energy.
The first energy distribution that we consider is the strongest one (in terms of the condition that must be satisfied) and requires that every node has exactly twice the energy of each of its children. We refer to such an energy distribution as exact. In particular, we say that a parentchild pair of nodes is in an exact energy equilibrium at time if . Then, a tree network converges to an exact energy distribution at time if every parentchild pair of nodes is in an exact energy equilibrium.
The second type of energy distributions is a relaxation of the first one and requires every node to have at least twice the energy of each of its children; we refer to these as relaxed. In particular, we say that a parentchild pair of nodes is in a relaxed energy equilibrium at time if . Then, a tree network converges to a relaxed energy distribution at time if every parentchild pair of nodes is in a relaxed energy equilibrium.
Finally, the third type we consider is yet another relaxation of the exact energy distribution, which is however more restrictive than the relaxed one. In particular, we require that every node has exactly twice the energy of each of its children except possibly for the root of the tree. We refer to such an energy distribution as exact up to the root.
2.4 Energy exchange and loss
To achieve the aforementioned energy distributions, the nodes must exchange energy when they meet. A redistribution protocol defines the conditions under which such exchanges take place as well as the amount of energy that one node has to transfer to another during their interaction.
Due to the nature of wireless energy technology, any energy exchange may induce some irrevocable energy loss. Following Nikoletseas et al. [2017b], Madhja et al. [2016a], we assume that whenever a node is supposed to transfer an amount of energy to another node , a fraction of is lost, and actually receives units of energy. In general, is unknown and may vary from interaction to interaction (during which there is indeed energy exchange among the participating nodes – not all interactions lead to energy exchange). When we study the theoretical properties of our protocols (Section 4), we mainly focus on the lossless case . However, in our experimental evaluation (Section 5), we additionally consider the lossy case, where
is a random variable following some normal distribution. We remark that we do not account for the possible energy loss due to movement or other activities of the nodes, as these are beyond the focus of the current paper.
3 Basic tree constructors
In this section, we present protocols for the basic construction of spanning arbitrary trees where each node may have any number of children, and spanning binary trees where every node can have at most two children.
3.1 Spanning arbitrary trees
For the basic construction of spanning arbitrary trees, we consider the protocol TreeConstructor which uses states and the interaction rules of Table 1; see also Figure 1. In particular, a node is in state

if is isolated,

if is a leaf,

if is internal, and

if is a root.
According to the interaction rules, when two nodes and interact with each other, node becomes a child of when is isolated, or when both and are root nodes. Essentially, we allow different trees to get connected only when their roots interact (viewing isolated nodes as node trees).


rule  transition 





rule  transition 



Theorem 1.
The protocol TreeConstructor correctly constructs a spanning arbitrary tree network, and its expected running time is .
Proof.
To prove the correctness of TreeConstructor we need to argue that (a) no cycles will ever appear, and (b) the network will eventually consist of a single connected component. For (a), simply observe that the interaction rules of TreeConstructor are such that only different components are allowed to get connected. Therefore, since initially all nodes are isolated (node trees), the only possible components that may form are trees. For (b), observe that at any time step the network may consist of multiple components that are either isolated nodes or trees. Any interaction between an isolated node and any other node yields at least one less isolated node and at most one more root node, while any interaction between two root nodes yields one less root. We can think of the number of isolated nodes plus the number of roots as a potential which is initially equal to and decreases by exactly for every interaction involving isolated or root nodes; for any other type of interaction, its value remains unchanged. Hence, it eventually becomes equal to , when there is only a single spanning tree left.
For the running time, since we assume the existence of a fair probabilistic scheduler, every pair of nodes needs on average steps to interact and, therefore, during such a span of steps, each node will definitely interact with the node that will end up become its parent in the final tree network. ∎
3.2 Spanning binary trees
For the basic construction of spanning binary trees, we assume that each node is equipped with a register which initially stores a unique random number. ^{1}^{1}1Assuming unique random number is only a simplification for exposition reasons. In a real implementation, when an isolated node interacts with and connects as a child of another node , we can set and equal to the current timestamp (which is unique) if is isolated as well, or we can set equal to in any other case like rule suggests. This way, there is no randomness involved. The values that are stored in the registers are used to define a monotonic merging of different trees so that no cycles appear.
Now, we consider the protocol BinaryTreeConstructor which uses six states and the interaction rules of Table 2; see also Figure 1. Specifically, a node is in state

if is isolated,

if is a leaf,

if is internal with children, and

if is a root with children.
According to the interaction rules, when two nodes and interact with each other, node becomes a child of when is isolated, or when is a root and it holds that . Essentially, by always respecting this inequality condition, we guarantee that, at any time, every distinct tree contains nodes that store values strictly greater than the value stored in the root of the tree. In this way, cycles that could appear due to the interactions between leaf or internal nodes with root nodes that are part of the same tree, are correctly avoided. For example, consider the interaction of a leaf node with the root of the tree that it belongs to. Then, since , the condition of rule is not satisfied and will not become a child of .
The interaction rule is necessary to guarantee that the value that is stored in the root of each tree is spread to all other nodes of this tree so that a single spanning tree network can be formed. To see the necessity of this, consider two trees and with corresponding root nodes and (each with two children) such that for every and for every . Then, without the interaction rule , these two trees will never get connected. However, with , it is now possible to spread the values and to all nodes in the two trees and, since one of them is strictly greater than the other, the connection of the trees will eventually become possible.
Theorem 2.
The protocol BinaryTreeConstructor correctly constructs a spanning binary tree network, and its running time is .
Proof.
The correctness of the protocol follows by the above discussion: no cycles will ever appear, and all nodes will end up be connected in a single spanning binary tree.
For the running time, observe that for every possible merging of two different trees, it might be the case that we first need to update the values stored in all nodes of the two trees, and then wait for the right pair of nodes to interact in order for the merging to take place. This last step needs expected time . For the update step, in the worst case, we must wait for all sequential parentchild interactions, starting from the root and its children. Since there are parentchild pairs in the tree and each such interaction takes average time to happen, the update of all values in a tree needs time . Therefore, every merging needs time , and since mergings must take place, the total time is . ∎
3.3 Depth and height estimation
As we will see later, information about the depth of each node and the height (max depth) of the tree can be very useful, especially since this information can be computed locally by each node through its interactions with other nodes of the network. We assume that each node is equipped with two more registers and
, which store the node’s estimation about its own depth and the height of the tree, respectively. Both of them are initially equal to zero, and are updated according to the interaction rules of Table
3.


rule  transition 



Of course, while the network is under construction, every node has a wrong estimation about these quantities, but eventually after the completion of the network structure, the values stored in the registers and will stabilize to the correct ones such that only for the root node of the tree, and for every node .
Theorem 3.
Rules and correctly compute the depth of each node and the height of the tree.
Proof.
Since the register is initially equal to zero for every node , once the network is constructed, the root node of the tree will definitely have the right estimation about its own depth, that is, ; notice that changes its state only once (from isolated to root) and never updates the register value of . Therefore, rule will correctly compute the depth of the root’s children when these nodes interact with , and the information will sequentially be spread in an upbottom manner to all nodes of the network. Then, once every node correctly knows its own depth, rule will spread the information about the maximum depth in a bottomup manner to all nodes. ∎
4 Energy redistribution protocols
In this section, we present several energy redistribution protocols and discuss some of their theoretical properties, mainly focusing in the lossless case. In our experimental evaluation in the upcoming section, we will consider the more general lossy case as well.
4.1 Exploiting global network information
We start with the presentation of a protocol that exploits the whole network structure; we refer to it as idealtarget. In our experimental evaluation, the performance of idealtarget will serve as an upper bound on the performance of the rest of our protocols, which we will define next.
Given a tree structure and the total energy of the network , it is easy to compute the ideal energy that each node must have so that the energy distribution of the network is exact. Let denote the height (maximum depth) of the tree, denotes the depth of node , and the number of nodes at depth . By the definition of the exact energy distribution, all nodes at depth must have equal ideal energy that is twice the energy of every node at depth . Let denote the ideal energy of any node at depth . Then, the ideal energy of node is , where
so that . ^{2}^{2}2Observe that if the height of the tree is large, then nodes of higher depth will have an ideal energy that is close to zero. The worst case is when the tree ends up being a line.
Now, the protocol idealtarget is defined as follows: given the tree network structure and the initial total energy of the network, simply compute the ideal energy for every node , and then use this as the target energy that must end up storing. So, node asks for energy if its current energy is below the target, and gives away energy when its current energy is exceeding the target; see Protocol 1.
Theorem 4.
The protocol idealtarget converges to an exact energy distribution for .
Proof.
Observe that for , a given tree structure and total network energy , the exact energy distribution is unique and, due to the definition of idealtarget, the network converges to exactly this energy distribution. ∎
Unfortunately, for , the total energy of the network is continuously decreasing from interaction to interaction. Therefore, we cannot guarantee that the network will converge to an exact energy distribution. In fact, it might be the case that the outcome distribution is not even relaxed; for instance, the root may end up with less than twice the energy of its children. However, as we will see later, idealtarget converges to a stable energy distribution fast enough so that the total energy loss is small and the final distribution is close to the exact energy distribution (as computed using the initial total energy of the network).
4.2 Oblivious protocols
Even though idealtarget looks like the perfect protocol, it assumes that the nodes can infer global information about the network structure. Since the nodes are computationally weak devices with limited memory, they cannot “remember” how many nodes there are in every different depth level. So, we now turn our attention in defining two protocols that are oblivious to the structure of the network and need less information to operate. These protocols redistribute energy only when parentchild pairs of nodes interact.
For any , the protocol exchange requires that when a parentchild pair of nodes interacts, their energy is redistributed so that has exactly times the energy of only if has initially strictly less than times the energy of ; see Protocol 2. For any , we also consider the protocol transfer, which requires that when a parentchild pair interacts and has less than twice the energy of , then transfers a fraction of its energy to ; see Protocol 3. It can be easily observed that these protocols are designed to achieve a relaxed energy distribution rather than an exact one. In order to have any chance to converge to an exact distribution, we need to embed them a modified condition that requires an energy redistribution every time does not have exactly twice the energy of . Also, notice that exchange makes sense only for in this case.
Theorem 5.
The protocols exchange and transfer embedded with the exact equilibrium condition, may not converge to the exact energy distribution.
Proof.
Let . Consider three nodes and an instantiation of the probabilistic fair scheduler that processes all possible pairs of nodes in the order , , in a roundrobin manner. Following this order of interactions, any of our basic tree constructors may form the linetree network , where is the root, is an internal node, and is a leaf. Since interactions between the pair do not affect the energy distribution, we assume that during any time step the only interactions that take place are between the pairs and .
For exchange, consider the case where all nodes have the same initial energy . Let be a time step such that both parentchild pairs and are in exact energy equilibrium. We will examine the case where the interaction at time is between the parentchild pair ; the other case of is symmetric. During the previous time step , due to the interaction of and , we have that is in energy equilibrium, i.e., . At time , since the pair remains in equilibrium, we have that . Also, since node does not participate in the scheduled interaction at time , we obtain that . Combining these three relations, yields that . Since there is no energy loss, the condition yields that . Therefore, if there exists a time step during which the energy distribution of the network is exact, it must be the case that at time the energy distribution of the network is also exact. Recursively, this requires that the energy distribution of the network is exact from the beginning, which is not true. Hence, there cannot be any such .
For transfer, consider the case where the nodes have initial energy such that . For any , by the definition of the protocol, we have that the energy is nondecreasing in time. Hence, due to the particular initial energy, there exists no time step such that . The theorem follows. ∎
Actually, we believe that no oblivious protocol can converge to an exact energy distribution, even for . We were not able to prove such a statement, but our intuition is that fixing a parentchild pair of nodes in equilibrium will inevitably break other pairs of nodes that are already in equilibrium.
Next, we will prove that if there is no energy loss ( and the tree network is a line (each node has at most one child), then exchange always converges to some relaxed distribution, for any . Our experimental evaluation in the next section indicates that this is true for any kind of tree network, and also, that this holds true for exchange as well. However, as we will see, there is a huge difference between these protocols in terms of the quality of the final distribution.
Theorem 6.
When and the tree network is a spanning line, the protocol exchange always converges to a relaxed energy distribution for any .
Proof.
Let be the spanning line tree network: is the root, nodes for are internal, and is the leaf. To simplify our notation, in the following, we denote by the energy that node has at time . We will define a function with the following two properties:

means that the network converges to a relaxed energy distribution at time ,

is nonincreasing for every , and

there exists a number of time steps during which strictly decreases until it reaches .
Then, is a potential function. Essentially, properties (P2) and (P3) guarantee that will reach its global minimum value of zero, and property (P1) guarantees that when has reached this global minimum value, the network has converged to a relaxed energy distribution.
To this end, for any , let be the indicator variable indicating whether at time the energy of node is strictly less than times the energy of its child node or not, and consider the function
Observe that for every . Moreover, property (P1) is satisfied since if for some , then for every parentchild pair . So, it remains to prove that satisfies properties (P2) and (P3) as well.
For property (P2), let be a time step during which a parentchild pair with interacts; otherwise, obviously there is no change during step and . Then, the exchange protocol will set and so that and, hence, . To prove that is nonincreasing, we have to show that . We distinguish between cases, depending on the states of and .
First, we consider the case : is the root of the tree and is internal; the case is similar. By the definition of , we have that
Since and , observe that the worst case occurs when and so that the last expression in the above sequence of equalities is maximized; that is, fixing the pair of nodes breaks the pair . Therefore, since does not participate in the interaction of time , we have that and, consequently, we obtain
as desired. The last inequality follows since .
Further, we consider the case . Then, again by the definition of , we have that
Given that and , the worst case occurs when , , and so that the last expression is maximized; essentially, the worst case is when fixing the pair leads to breaking both pairs and . Therefore, since nodes and do not participate in the interaction of time , we have that and . Also, since , we obtain
For property (P3), it suffices to show that if for some time step and , then there exists a sequence of interactions between internal nodes that leads to and/or for some time step . If this is true, then the potential will eventually (after multiple interactions at the two endpoints of the line) reach its minimum value of , as it strictly decreases when the interactions or take place and change the energy of the participating nodes; any other parentchild pair interaction does not increase .
Now, assume a time step with the above specifications. Since , there exists such that and for , and such that and for . In the worst case, after the interaction of or at some time step or , it will be or . Inductively, since the energy is in general flowing upwards in the network, such interactions will define chains of future interactions that can lead to at least one of the pairs or to no longer satisfy the condition of exchange, i.e., there exists time step such that or . The proof is now complete. ∎
We remark that the above theorem guarantees only convergence to a relaxed energy distribution. However, it is not obvious that this convergence will happen quickly, or that the final relaxed distribution will be close to an exact one. We expect that the convergence time decreases as increases since the latter increases the energy that flows upwards. On the other hand, the distance of the outcome distribution from an exact distribution increases as increases since nodes at lower depth will end up with substantially more energy than those in higher depth; in fact, for high enough , the root might concentrate almost all of the network energy. Hence, it is important to finetune the parameter and balance these tradeoffs.
4.3 Mixing locally inferred and global information
For spanning binary tree networks, we define the protocol depthtarget which sets a target energy for each node by exploiting some network information that can be locally estimated as well as some global network information that is provided as input to the nodes. Specifically, during each time step , every node sets a target energy
where is the estimation of node for its own depth at time , is the estimation of for the height of the tree at time , and is the initial total network energy. As already discussed in Section 3.3, once the network is formed, the values of and will stabilize to the correct ones. Then, the target is set to the correct value as well, and eventually all nonroot nodes will end up storing exactly this much energy, while the root will collect the remaining units of energy. A description of depthtarget is given as Protocol 4.
Next, we prove that for this targeted protocol converges to an exact up to the root energy distribution, which is also a relaxed.
Theorem 7.
For and any kind of spanning binary tree network, the protocol depthtarget converges to an exact up to the root energy distribution.
Proof.
Let be the time step after which all nodes correctly estimate their own depths and the height of the tree. Then, for every and nonroot node , we have that , , and . During every interaction that a nonroot node participates in, it requests for energy when and gives away energy when ; the root node gives away and receives energy based on the demands of the other nodes with which it interacts. Therefore, in the first case the energy of a nonroot node can only increase until it reaches the target, while in the second case it can only decrease until it again reaches the target. Hence, the protocol converges to a distribution where each nonroot node has its target energy, and the root stores the remaining energy of the network. This distribution is exact up to the root. To see this, consider a parentchild pair for which it holds that . Then,
as desired.
Let be the number of nodes at depth . Then, for the root node , we have that
where the inequality follows by the fact that . Since any children node of the root has , we obtain that
and the theorem follows. ∎
In addition to the above theorem, in most instances, we expect that even in the lossy case, depthtarget will converge to an exact up to the root distribution: each node will aim to store its target energy, and any energy loss will be accumulated in the root; this means, however, that the distribution is no longer relaxed. Of course, converging to an exact up to the root distribution cannot be guaranteed in general, especially in cases where the loss is so much that there is not enough energy for the nonroot nodes to satisfy their targets.
Further, observe that when and the binary tree network structure is complete (the root and all internal nodes have exactly two children), then the target energy of any node will be exactly equal to its ideal energy. Hence, depthtarget converges to the unique exact distribution in this case. However, if the tree structure is incomplete (with the worst case being a line), then the target energy of any nonroot node will be far away from ideal. As we will see in our evaluation, the structure of the network plays a huge factor in the quality of the final distribution when compared to the distribution produced by idealtarget.
5 Experimental evaluation
5.1 Simulation Setup
In this section, we experimentally evaluate the energy redistribution protocols that we previously defined (see Section 4), via simulations that were implemented in Matlab 2018a. We study both the lossless case, where , and the lossy case, where is a random variable following the Normal Distribution . We investigate two scenarios regarding the initial energy of the nodes. The total initial network energy is analogous to the number of nodes in the network, and it can be split among the nodes either uniformly, leading to all nodes having the same initial energy, or randomly, leading to the nodes having possibly different initial energy. The second scenario (of unequal initial energy) is more realistic due to the different characteristic and needs of the various portable devices there exists (e.g. smartphones). To have a fair comparison with depthtarget, here we only focus on binary tree networks.
For statistical smoothness we have repeated each simulation for
times. The statistical analysis of our findings (average, median, lower and upper quartiles, outliers) demonstrate very high concentration around the mean and, thus, in the following we depict only the average values of our simulation results.
5.2 Metrics
We use two metrics to measure the performance of our protocols. The first one (distribution distance) is designed to show how fast a protocol converges to a relaxed energy distribution if this is possible, while the second one (energy distance) measures the quality of the final energy distribution compared to the ideal one (as computed by idealtarget; see Section 4.1).
For any time step , the distribution distance is defined as
Essentially, the distribution distance accounts for the total energy that must be redistributed at time in order to achieve a relaxed energy distribution. The convergence time of exchange and transfer is the first time step for which , when a relaxed distribution has been reached. For the targeted protocols idealtarget and depthtarget, the convergence time is the first time step after which the distribution distance remains constant: for every . The value of will be in the lossless case since both protocols achieve a relaxed distribution then. In the lossy case, can be positive, since the energy that is lost may prevent the protocols to achieve a relaxed distribution, especially idealtarget which sets targets to achieve an exact distribution based on the initial total network energy.
The energy distance of the final distribution from the ideal one is defined as
where is the target energy of as set by idealtarget, i.e., its ideal energy based on the underlying tree structure of the network and the total initial network energy. Essentially, the energy distance accounts for the total energy that has been misplaced in the final distribution. This metric also allows us to compare our protocols even when there is energy loss. Since even a perfect protocol like idealtarget will inevitably lose some energy in the lossy case, we do not consider metrics that measure the total energy loss in absolute terms.
5.3 Finetuning of exchange
To optimize the performance of exchange and pick the right value for the parameter , we study the cases where . Figure 2 depicts the performance of exchange for these values of with respect to the distribution distance metric, for nodes in the lossless case and different initial energy supplies; we have experimented with many more different settings, but the conclusions are similar. One can easily observe that as the value of increases, the distribution distance and, consequently, the convergence time decreases. Specifically, there is a huge improvement from to , but then the improvement is only minor as we consider higher values of . Further, as shown in table 4, high values of incur higher and higher energy distance.
As a result, we conclude that the values and nicely balance the two metrics. In the rest of our experimental evaluation, we set , but we also implement another randomized protocol, which we call randexchange. According to this protocol,
varies from interaction to interaction, as a random variable following a uniform distribution taking values in the interval
.


Energy distance  


5,98%  12,76%  18,03%  21,03%  23,92% 

5.4 Finetuning of transfer
Similarly, to optimize the performance of transfer and pick the right value for , we conduct simulations for various values of . Figure 3 and Table 5 depict the performance of transfer for these values of in terms of the distribution and energy distances, respectively. Due to the very high energy distance of all values, in the rest of our experimental evaluation, we set as the middle ground.


Energy distance  


57,80%  59,44%  59,65%  59,67%  59,67% 

5.5 Comparison of protocols
Figures 5 and 6 depict the performance of our energy redistribution protocols in terms of the distribution distance metric, in the lossless and lossy case, respectively. The corresponding performance values in terms of the energy distance metric are given in Tables 6 and 7.
First, we can easily observe that as the number of nodes increases, the protocols require more time to converge (see Figures 5 and 6) and the quality of the final distribution decreases (see Tables 6 and 7). Second, whether the nodes all have equal or different energy does not seem to affect the performance of the protocols (for instance, compare Figures 4(a), 4(c) and 4(e) to 4(b), 4(d) and 4(f)). Finally, we observe that in the lossy case, the protocols converge faster than in the lossless case (for example, compare Figures 4(a)–4(e) to 5(a)–5(e)). This is expected since in the lossy case the total network energy is decreasing in time.
In all cases, exchange seems to be the slowest protocol, which is natural since it is not a targeted protocol and may require many exchanges where the energy may go upwards or downwards (as opposed to transfer where the energy is only going towards the root of the tree). The protocol randexchange is of course faster than exchange, since it also randomly considers higher values of (see Section 5.3). On the other hand, depthtarget seems to be the fastest protocol, outperforming even idealtarget. This is due to its definition, where the root plays the role of an auxiliary node helping the other nodes to reach their target (as opposed to idealtarget where the root has also a target that must be reached).
Even though exchange needs more time to converge to a stable distribution, as we can see in Tables 6 and 7, it outperforms all protocols (except idealtarget) in terms of energy distance. This result is correlated to the equilibrium condition that exchange uses, and to the fact that the amount of energy that is exchanged in an interaction is small, which yields small loss per interaction. The only other protocol that has comparable performance is, of course, randexchange. Both transfer and depthtarget exhibit high energy distance. This is naturally expected since, as already discussed in Section 4, transfer only transfers energy towards the root (thus creating an unbalanced distribution), while depthtarget sets energy targets that depend on the tree network structure, and if the structure is unbalanced, then almost all of the network energy end up to the root; see Figure 4 for an example of a tree structure and the corresponding final distributions achieved by the protocols.
Given the above observations, we can now conclude that the protocol that best balances all of the tradeoffs that we have discussed (fast convergence and distribution of good quality) seems to be randexchange, and not depthtarget, which is vulnerable when the tree network ends up being even just a bit unbalanced.



lossless case  


protocol  Same initial energy  Different initial energy  




exchange 
6.93%  6.92%  24.32%  6.15%  2.27%  16.70% 
transfer 
63.71%  66.32%  56.73%  62.97%  66.94%  64.02% 
depthtarget 
33.81%  47.60%  51.24%  33.14%  49.91%  51.59% 
randexchange 
10.96%  11.97%  16.41%  11.21%  15.21%  15.31% 
idealtarget 
0%  0%  0%  0%  0%  0% 




lossy case  


protocol  Same initial energy  Different initial energy  




exchange 
3.28%  4.51%  10.35%  5.36%  7.14%  12.09% 
transfer 
57.71%  62.38%  67.93%  58.48%  68.85%  65.28% 
depthtarget 
33.73%  43.26%  48.53%  32.85%  42.63%  49.54% 
randexchange 
8.69%  9.87%  11.73%  8.99%  11.64%  9.73% 
idealtarget 
4.25%  8.63%  10.11%  5.77%  8.99%  10.77% 

6 Conclusions and possible extensions
In this paper, we have thoroughly studied the problem of energyaware tree network formation, both theoretically as well as experimentally. We proposed two simple interaction protocols for the basic construction of arbitrary and binary tree networks, as well as four energy redistribution protocols that exploit different levels of information regarding the network structure. Still, our work leaves open several problems and reveals new ones.
Aiming for an energy distribution that requires every node to have at least twice the energy of each of its children seems like an intuitive choice. However, as we have observed, almost all of the network energy gets concentrated close to the root of the tree, even if we are able to achieve an exact distribution (e.g. consider the case where we have a complete binary tree). Therefore, considering other interesting energy distributions, possibly with additive terms rather than multiplicative ones, is an important future direction. For instance, is it possible to achieve an energy distribution where every node has exactly (or at least) units more energy than each of its children, for some ?
In the paper of Madhja et al. [2016a], the star network structure is very well defined: one of the nodes is the center, while all others all peripherals. In contrast, our basic constructors may construct so many different tree structures, ranging from totally balanced trees to lines or even stars. This is one of the reasons why the final energy distribution may end up be so different than the ideal one, especially when the number of nodes is large. Can we design protocols that are able to construct predictable tree networks? If so, then it may be possible to achieve energy distributions of better quality.
Another issue that has not been addressed in the current paper or in previous related work, is that the nodes actually have battery limits. Therefore, it is not possible for a node (e.g. the root of a tree network) to store a really high amount of energy. This gives rise to many interesting algorithmic challenges. For instance, suppose that a parentchild pair of nodes interacts, and in order to satisfy the required energy equilibrium, the parent must receive energy from the child. However, what happens if the parent has reached its battery limit? The child has to dispose parts of its energy by giving it to some other unrelated node. But then, other interaction may take place and the state of the energy distribution over the network may be completely different, meaning that the child node has outdated information, leading to “confusion.” Resolving such problems seems to be highly nontrivial and definitely deserves more investigation in the future.
References
 Angelopoulos et al. [2015] C. M. Angelopoulos, J. Buwaya, O. Evangelatos, and J. D. P. Rolim. Traversal strategies for wireless power transfer in mobile adhoc networks. In Proceedings of the 18th ACM International Conference on Modeling, Analysis and Simulation of Wireless and Mobile Systems (MSWiM), pages 31–40, 2015.
 Angluin et al. [2007] D. Angluin, J. Aspnes, D. Eisenstat, and E. Ruppert. The computational power of population protocols. Distributed Computing, 20(4):279–304, 2007.
 Bi et al. [2016] S. Bi, Y. Zeng, and R. Zhang. Wireless powered communication networks: An overview. IEEE Wireless Communications, 23(2):10–18, 2016.
 Bulut et al. [2018] E. Bulut, S. Hernandez, A. Dhungana, and B. Szymanski. Is crowdcharging possible? In Proceedings of the 27th IEEE International Conference on Computer Communications and Networks (ICCN), page to appear, 2018.
 Dai et al. [2018a] H. Dai, Y. Liu, G. Chen, X. Wu, T. He, A. X. Liu, and Y. Zhao. SCAPE: safe charging with adjustable power. IEEE/ACM Transactions on Networking, 26(1):520–533, 2018.
 Dai et al. [2018b] H. Dai, H. Ma, A. X. Liu, and G. Chen. Radiation constrained scheduling of wireless charging tasks. IEEE/ACM Transactions on Networking, 26(1):314–327, 2018.
 del Prete et al. [2015] M. del Prete, A. Costanzo, A. Georgiadis, A. Collado, D. Masotti, and Z. Popovi. Energyautonomous bidirectional wireless power transmission (wpt) and energy harvesting circuit. In IEEE MTTS International Microwave Symposium, 2015.
 Dhungana et al. [2018] A. Dhungana, T. Arodz, and E. Bulut. Charging skip optimization with peertopeer wireless energy sharing in mobile networks. In Proceedings of IEEE International Conference on Communications (ICC), page to appear, 2018.
 Kurs et al. [2007] A. Kurs, A. Karalis, R. Moffatt, J. D. Joannopoulos, P. Fisher, and M. Soljačić. Wireless power transfer via strongly coupled magnetic resonances. Science, 317(5834):83–86, 2007.
 Lin et al. [2015] M. Lin, M. Gong, B. Lu, Y. Wu, D. Wang, M. Guan, M. Angell, C. Chen, J. Yang, B. J. Hwang, and H. Dai. An ultrafast rechargeable aluminiumion battery. Nature, 520, 2015.
 Madhja et al. [2015] A. Madhja, S. E. Nikoletseas, and T. P. Raptis. Distributed wireless power transfer in sensor networks with multiple mobile chargers. Computer Networks, 80:89–108, 2015.
 Madhja et al. [2016a] A. Madhja, S. Nikoletseas, C. Raptopoulos, and D. Tsolovos. Energy aware network formation in peertopeer wireless power transfer. In The 19th ACM International Conference on Modeling, Analysis and Simulation of Wireless and Mobile Systems (MSWiM), 2016.
 Madhja et al. [2016b] A. Madhja, S. E. Nikoletseas, and T. P. Raptis. Hierarchical, collaborative wireless energy transfer in sensor networks with multiple mobile chargers. Computer Networks, 2016.
 Madhja et al. [2018] A. Madhja, S. E. Nikoletseas, and A. A. Voudouris. Mobilityaware, adaptive algorithms for wireless power transfer in ad hoc networks. CoRR, abs/1802.00342, 2018.
 Michail and Spirakis [2016] O. Michail and P. G. Spirakis. Simple and efficient local codes for distributed stable network construction. Distributed Computing, 29(3):207–237, 2016.
 Nikoletseas et al. [2016] S. E. Nikoletseas, Y. Yang, and A. Georgiadis, editors. Wireless power transfer algorithms, technologies and applications in ad hoc communication networks. Springer, 2016.
 Nikoletseas et al. [2017a] S. Nikoletseas, T. P. Raptis, A. Souroulagkas, and D. Tsolovos. Wireless power transfer protocols in sensor networks: Experiments and simulations. Journal of Sensor and Actuator Networks, 6(2):4, 2017.
 Nikoletseas et al. [2017b] S. E. Nikoletseas, T. P. Raptis, and C. Raptopoulos. Wireless charging for weighted energy balance in populations of mobile peers. Ad Hoc Networks, 60:1–10, 2017.
 Schafer et al. [2015] S. Schafer, M. Coffey, and Z. Popovi. Xband wireless power transfer with twostage highefficiency gan pa/ rectifier. In WPTC, 2015.
 Zhang et al. [2012] S. Zhang, J. Wu, and S. Lu. Collaborative mobile charging for sensor networks. In MASS, 2012.
Comments
There are no comments yet.