{'fraction_non_alphanumeric': 0.033284983586533326, 'fraction_numerical': 0.009809909153370487, 'mean_word_length': 4.700391644908616, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Heterogeneity-aware P2P Wireless Energy Transfer for Balanced Energy Distribution

The recent advances in wireless energy transfer (WET) provide an alternate and reliable option for replenishing the battery of pervasive and portable devices, such as smartphones. The peer-to-peer (P2P) mode of WET brings improved flexibility to the charging process among the devices as they can maintain their mobility while replenishing their battery. Few existing works in P2P-WET unrealistically assume the nodes to be exchanging energy at every opportunity with any other node. Also, energy exchange between the nodes is not bounded by the energy transfer limit in that inter-node meeting duration. In this regard, the parametric heterogeneity (in terms of device's battery capacity and WET hardware) among the nodes also affects the energy transfer bound in each P2P interaction, and thus, may lead to unbalanced network energy distributions. This inherent heterogeneity aspect has not been adequately covered in the P2P-WET literature so far, especially from the point of view of maintaining a balanced energy distribution in the networked population. In this work, we present a Heterogeneity-aware Wireless Energy Transfer (HetWET) method. In contrast to the existing literature, we devise a fine-grained model of wireless energy transfer while considering the parametric heterogeneity of the participating devices. Thereafter, we enable the nodes to explore and dynamically decide the peers for energy exchange. The performance of HetWET is evaluated using extensive simulations with varying heterogeneity settings. The evaluation results demonstrate that HetWET can maintain lower energy losses and achieve more balanced energy variation distance compared to three different state-of-the-art methods.


I. INTRODUCTION
Recent advancements in pervasive and portable device (such as smartphones) technologies have improved its available battery capacity significantly. However, with the increased user engagement, dependence and growing number of applications, the demand of device's energy resources has also increased significantly. Thus, the available energy remains limited for the device's continued operation, and the need for battery replenishment becomes obvious. In this regard, the recent advances in wireless energy transfer (WET) provides an alternate and reliable option for replenishing the battery of the smartphones [1] [2]. WET has already matured through the development of numerous commercial products and standards, such as the ones of Wireless Power Consortium, Power Matters Alliance, Alliance for Wireless Power and Rezence [3]. It enables the devices to use wireless charging from devices such as wireless charging pads and mobile charging vehicles [4], [5], and even other peer devices [6], [7]. This peer-to-peer (P2P) mode of WET brings improved flexibility in the charging process between smartphones as the devices are able to maintain their mobility while replenishing their battery.
With the introduction of P2P-WET in latest smartphones, newer applications such as crowd charging [8] have emerged. Crowd charging facilitates distributed energy exchange throughout the network with simultaneous P2P interaction between multiple peers. In P2P-WET-based crowd charging applications, it is important to reach an 'energy balanced' state, during which all the nodes reach an equal energy level. Thus, the energy balancing process also helps in extending the functional lifetime of the network as it replenishes the battery of nodes which have depleted their energy. However, the energy balance process is challenged by various factors -the uncertainty of energy exchange due to opportunistic and varying inter-node meeting duration, and the energy loss associated with each P2P-WET interaction (due to wireless attenuation, energy loss in each WET interaction is inevitable). As a result, after a not-so-careful energy balancing strategy, the networked population may have an unbalanced energy distribution.
In this regard, another important factor which challenges the energy balance process is the heterogeneity present in various parameters of the pervasive devices throughout the network [9]. Typically, the devices may have different values for battery capacity and WET hardware, which determines the Qi charging capacity (Qi the standard for WET developed by Wireless Power Consortium [10]). Due to such heterogeneity, the charging rates for P2P interaction between different combination of nodes will be different and result in varying amount of energy exchange between the devices. For example, the charging rate will be higher when the energy receiving device has lower battery capacity or the energy transmitting device has higher charging capacity. The opposite is also true vice versa.
The early works for energy balance in P2P-WET considers few unrealistic assumptions such as -the nodes to be exchanging energy at each opportunity [11] as well as with any other node [12]. Also, in these works, the energy exchanged in any P2P interaction is not bounded by the possible energy that can be transferred in the inter-meeting duration of those nodes [12], [13]. Additionally, due to the heterogeneity present in the network, the varying amount of energy exchanged in different P2P interactions may lead to unbalanced energy distribution across the crowd as well as higher energy loss.
The existing P2P-WET techniques did not consider the factor of heterogeneity present among the devices of the network. Therefore, the energy balancing process in those works is likely to be affected by the varying energy loss and unbalanced energy distribution.
1) Novelty of the Current Work: In this paper, we present a Heterogeneity-aware Wireless Energy Transfer method, named HetWET, for energy balancing of the network. Our objective in HetWET is to achieve energy balancing of the network such that the overall energy loss is minimized and the total energy variation between the nodes also minimized. To achieve these objectives, HetWET (a) first dynamically computes the charging rate for each P2P interaction, and (b) proactively estimates the energy loss and the variation in energy distribution for all possible peers. Then (c) the peers are chosen for P2P-WET such that the energy loss is minimized and distribution is balanced. In summary, our specific contributions in this work are the following: • We devise a fine-grained model of network-wide P2P wireless energy transfer while considering the heterogeneity of the participating devices. • We design a method enables the nodes to explore and dynamically decide the peers for energy exchange. • We leverage the proactive estimation of the energy loss and energy variation for peer selection, and thereby minimizing both overall energy loss and variation. The rest of the paper is organized as follows. In Section II, we discuss the related literature. The proposed network model and key concepts are presented in Section III. The proposed HetWET method is presented in Section IV, and in Section V, we discuss the parameter evaluation settings, benchmarks and simulation results. Finally, Section VI concludes the paper citing directions for future research.

II. RELATED WORKS
In this section, we discuss the related works in two categories. The works in the first category focuses on energy balancing with low energy loss. Nikoletseas et al. [11] considered both loss-less and lossy WET, and then, estimate the upper bound of time required to energy balance the whole network for both the scenarios. The authors propose three methods for both the scenarios with objectives targeting minimization of energy loss and time to reach energy balance. In another work, Dhungana et al. [12] proposed three different energy exchange methods with the objective of minimizing the energy loss in the energy balance process. In contrast to the works of this category, in our proposed method, we consider a heterogeneous setting. We perform peer selection such that to minimize the energy loss as well as energy variation among the nodes while dynamically computing the energy to be exchanged between heterogeneous nodes.
The next category of works, focuses on different issues impacting the energy balance process. The impact of social networks on peer selection for P2P-WET was first introduced by Raptis [8]. The author devises two socially-motivated energy exchange strategies for the users explicitly focused on users' social relations. Ojha et al. [14] highlighted the issues of user mobility affecting the P2P energy exchange. The authors leverage the mobility information for improving the peer selection process during P2P-WET. In another work [15], the authors incorporated the joint issue of user mobility as well as the influence of user's social impact on energy balancing process. The authors considered two dimensions of social information, social context and social relations, for predicting the P2P energy exchange opportunities. In HetWET, we explicitly focus on the issue of device heterogeneity impacting the energy balance process and devise fine-grained model for heterogeneity-aware energy exchange for improved decision on peer selection.

III. NETWORK MODEL
We assume total m users (also termed as 'nodes' in this paper) each with a smartphone present in the network which is deployed over an area of interest. We denote the users as U = {u 1 , u 2 , · · · , u m }. We denote the residual energy levels of the users' devices at time t as, The nodes are mobile and thus, their location changes over time. For example, at time t, the locations of the nodes are referred as L(t) = {l 1 t , l 2 t , · · · , l n t }. Unlike previous works, in this work, we incorporate the issue of heterogeneity among the users participating in P2P-WET. Subsequently, we assume that the users are equipped with different types of smartphones, different battery capacity and heterogeneous WET hardware. Now-a-days, the feature of P2P-WET is available in various smartphones, mostly highend, by leading manufacturers such as Samsung and Huawei using the technology PowerShare [6] and reverse wireless charging [7]. Using these technologies, one user can wirelessly charge in a P2P fashion another user's smartphone, assuming that both the devices are Qi certified [10] (compatible with Qi standard), and thus, compatible for P2P-WET. Let, C j and V j refer to the battery capacity (mAh) and voltage (volts) for user u j . QI i denotes the charging capacity (W h) of u i 's smartphone when using PowerShare or reverse wireless charging technology. Next, we compute the charging rate (α ij ) for any P2P-WET interaction (u i is the energy transmitter and u j is the receiver) where the devices have different battery capacity and WET hardware.
Here, the charging rate is computed in % of charge/minute for any P2P-WET between u i and u j . The values 100, 60, and 1000 are used to denote the full charge (100%), hour to minute conversion, and mW h to W h conversion of the denominator, respectively. Now that we have computed the charging rate, we can calculate the amount of energy (or charge) transferred between u i and u j for a duration of τ ij t .
For a transfer of e t ij energy from node u i to u j for a time duration (τ ij t ), u j receives only a fraction ((1−β)×e t ij ) of the actual energy transferred by u i due to energy loss. Thus, the remaining energy of these nodes are computed as, where β ∈ [0, 1) is the energy loss factor. Here, following the modeling approach of numerous works (such as [8], [12], [16]), we consider that β is constant for all P2P-WET interactions between different heterogeneous devices. Also, the energy levels of any other node (∀u k ∈ U, u k = u i , u j ) in the network remains unchanged for the energy transfer between nodes u i and u j .
Next, we define a parameter named the energy variation distance which refers to the amount of energy variation among the deployed nodes. The computation of the variation distance is presented in [11], [13] using probability theory and stochastic processes. For example, if P and Q are two probability distributions defined over the sample space of U, then, the total variation distance, δ(P, Q), is computed as, The energy distribution of nodes (E t (u)) at time t is defined as, Subsequently, the average network energy is calculated as, We assume that the nodes move from one location to another. The user movement in the considered area depends on their own interests only and not affected by the activity of other users. It is also assumed that the users tend to stay similar amount of time while revisiting any specific location. The users staying at same location for a certain amount of time can engage in P2P energy exchange. Specifically, the contact (ν t ij ) between any two nodes u i and u j for a duration of τ ij t is considered valid when the following conditions are satisfied ∀t ∈ τ ij t , where l i t and l j t are the locations of u i and u j . t min is the minimum required time for a successful P2P energy transfer.
Our objective in this paper is to minimize the overall energy loss (which maximizes the total network energy) and energy variation distance. Let, at T time, the total energy loss is L T and the energy variation distance is δ(E T , U T ), where U T is the target uniform energy distribution.
The total energy of the network at time T , E T = ∀ui∈U E T (i), is computed as, where E 0 (i) refers to the initial energy level of u i .
t∈T ∀uj =ui e t ij and t∈T ∀uj =ui (1 − β)e t ji compute the energy transmitted and received by u i from other nodes, respectively.

IV. HETWET: HETEROGENEITY-AWARE WIRELESS ENERGY TRANSFER
In this section, we discuss the proposed heterogeneityaware wireless energy balancing algorithm. We first define the parameters towards achieving our objective of minimizing energy loss and the variation distance. Thereafter, we present the algorithm showing the peer selection process for any user.
First, we compute the energy loss during the P2P energy exchange between u i and u j . It is computed as, Now, we compute the change in energy variation distance explicitly for the P2P-WET interaction between u i and u j . The updated energy variation distance for u i and u j will be the difference between its energy level and average network energy. Therefore, the change in energy variation distance EV D ij is, It is important to note that both Equation (8) and (9) are inclusive of the heterogeneity present between the nodes as we include the dynamic computation of the charging rate.
Next, we compute a factor named 'selectivity factor' (Φ ij ), which refers to the selection benefit for this pair of nodes (u i and u j ). Φ ij considers both energy loss and energy variation distance for any P2P energy exchange between u i and u j . As our objective is to minimize both energy loss and variation, we need to select the peers with lowest value of Φ ij . Here, we computed Φ ij as, where, w EL and w EV D denote the weightage for the energy loss and energy variation distance components. N ui denotes the set of possible peers of u i . N ui is computed as the set of users satisfying a valid contact, and their energy levels in the opposite side of energy balance level compared to u i . This design choice of choosing nodes with energy in opposite sides of energy balance level ensures higher possibility for both nodes reaching energy balance level. Interested readers may refer to [12], [14]. Thus, the computation of N ui is as follows, Now, our objective for the P2P energy exchange over the whole network is to minimize the energy loss as well as the energy variation distance. Therefore, we just need to choose the user with minimum value of selectivity factor for energy exchange with u i such that both energy loss and energy variation distance remain minimum.
In Algorithm 1, we list the steps followed for finding the peer for any node while considering heterogeneous configurations of the devices. We first (lines 5-6) select the node (say, u i ) with energy level closest to the target energy balance level (E * ), as u i is the closest node to reach energy balance level. E * is computed as shown by [12], Next, we find the potential peers (N ui ) for u i (lines 7-9) and then, for interaction with each such peer, we estimate the energy loss and variation distance, and the selectivity factor (lines 10-17). We, then, find the peer (say, u j ) with minimum value of the selectivity factor as the selected peer for u i (line 18). Then, the P2P energy exchange is performed between each such pair of peers, and if the nodes' updated energy equals E * , we consider it as being reached energy balance level.

A. Simulation Settings
In our experiments, we consider 100 smartphone carrying users distributed uniformly at random over 5 different locations. These smartphones have different battery capacity (C i ) and charging capacity (QI i ) distributed uniformly at random allocated from three different set of values: (C i , QI i ) ∈ {(5000, 5), (4500, 4), (4000, 3)}. In another set of experiments, we also vary the heterogeneity by allocating different number of nodes (rather than being uniform distribution). For example, in three different experiments, we allocate (50%, 25%, 25%), (25%, 50%, 25%) and (25%, 25%, 50%) nodes for the three set of battery and charging capacity values, respectively. In another set of experiments, we vary heterogeneity by expanding the range of values for C i and QI i . For example, we use the following formula for generating heterogeneous set of battery and charging capacity values: Where, we consider δ C and δ Q as 500 and 1 (to generate close to realistic values of (C i , QI i ), respectively, and vary θ with values 0.5, 1.5 and 2.0 in three different experimental settings, which generates uniform distribution of nodes with different (C i , QI i ) values.
We perform our experiments over multiple 'iterations' or 'runs'. In each iteration of the experiment, the nodes randomly select a location and stay there for a randomly selected duration chosen over 10-30 minutes, and then move to another randomly selected location in the next iteration. Therefore, the concept of iteration actually works as the specific decision boundary for the P2P interactions. As energy exchange Find the node with energy closer to E * , ComputeForPotentialPeers(u i , u j ); 13 Compute u j = arg min uj ∈U Φ ij ; 14 else 15 for u j ∈ N ui and E t (j) > E * do 16 ComputeForPotentialPeers(u j , u i );

18
Return u j as peer of u i ; Compute α xy and e xy using Equations (1) and (2);

23
Compute Φ xy using Equation (10); between any two peers is bounded by their inter-meeting duration, the concept of time is also enforced in the experiments. The initial energy distribution of the nodes are uniformly randomly distributed over [0, 100] units. The charging rate α ij is dynamically computed in each P2P interaction as shown in Equation (1), and the energy loss rate is considered as β = 0.2. We repeat each simulation experiment for 50 times for statistical smoothness.

B. Benchmarks
To compare the performance of the proposed method, HetWET, we consider three state-of-the-art methods, namely MobiWEB [14], P GO [12] and P OA [11], as the benchmarks. Both MobiWEB and P GO , select peers with energy in the opposite side as well as closest to the energy balance level. Next, the selected peers exchange energy among themselves such that the nodes closest to the energy balance level reaches it. However, MobiWEB leverages the user mobility information for intelligent peer selection. Whereas, in P OA , nodes with energy levels in the opposite sides of average energy, participate in energy exchange such that their energy levels become equal. To have a fair comparison with HetWET, we made few adjustments in the benchmarks: the P2P energy exchange remains bounded by the corresponding charging rate (α ij ) and inter-meeting time (τ ij t ), the nodes in P OA have knowledge of average network energy.
We discuss the results of the proposed and benchmark methods using the following metrics: total network energy, total energy variation distance, number of P2P meetings, and number of nodes that reached energy balance. We also perform a sensitivity analysis and discuss the results of total energy variation distance varying the heterogeneity present in the network. We choose total energy variation distance as this parameter shows the quality of energy balance in the resulting network. Figure 1a, we present the results for the total network energy for the proposed and benchmark methods. The results show that HetWET is able to maintain an overall higher network energy over time. It is evident from the results that the proactive consideration of energy loss while selecting the peers from available heterogeneous set of potential peers in the proposed method has helped in maintaining lower energy loss in the whole network, and thus, the total network energy remains higher in HetWET compared to the benchmarks. In MobiWEB and P GO , the peer selection is performed only based on their energy levels, and dynamic computation (required due to network's inherent heterogeneity) of possible energy that can be exchanged is not considered. On the other hand, in the P OA method, no specific criteria is allocated for peer selection. In the initial iterations (1-10), HetWET shows higher energy loss due to higher number of P2P interactions performed in that duration, as shown in Figure 1c.

1) Total network energy: In
2) Total energy variation distance: Figure 1b shows the total energy variation distance in the resulting network for all the methods. The HetWET method is able to outperform the benchmarks. Compared to the benchmarks, the proposed method leverages the estimated total variation distance information and applies it to select peers. Also, for any P2P interaction, the computation of energy loss as well as resulting variation distance is based on their corresponding battery capacity and charging capacity. Due to these two reasons HetWET is able to maintain a lower energy variation distance compared to the benchmarks.

3) Number of P2P meetings:
The results for number of P2P interactions in each iteration is shown in Figure 1c. In the initial iterations (0-5), all the methods show higher number of P2P interactions compared to the rest of the iterations. However, in HetWET, the number of such interactions are higher compared to the benchmarks. Thus, it is evident that the proposed method is able to promote higher number of P2P meeting opportunities. The significant decrease in energy variation distance and energy loss is also due to this higher number of interactions. As shown in Figure 1d, most number of nodes also reach energy balance in the early iterations (0-5).

4) Number of nodes that reach energy balance:
In Figure  1d, we depict the number of nodes that reach energy balance for all the methods. The results show that in HetWET more number of nodes reach energy balance compared to benchmarks. Such performance is attributed to the dynamic computation of possible energy exchange, and the proactive estimation of energy loss and variation distance. As we find that a higher number of the nodes reach energy balance while maintaining lower energy variation distance, we can infer that HetWET provides improved energy balance quality compared to the benchmarks. 5) Effect of heterogeneity in the network: until now, we discussed the performance evaluation for uniform distribution of battery and charging capacity across the nodes. In the following set of experiments, to vary heterogeneity among the network, we allocate (50%, 25%, 25%), (25%, 50%, 25%) and (25%, 25%, 50%) nodes for the three set of battery and charging capacity values, respectively. We show the results for these set of experiments in Figures 2a -2c. In another set of experiments, we vary the values of the battery and charging capacity while uniformly allocating the values to the nodes. In Section V-A, we discuss how these values are varied w.r.t. a parameter named θ. In Figures 3a -3c, we show the results for these experiments for θ = 0.5 to θ = 2.0.
Both these sets of experiments show that the proposed method is able to maintain a lower total energy variation distance compared to the benchmarks. In both set of experiments, the benchmarks also perform nearly similarly with minor variation. Such behavior is attributed to the proactive estimation of energy variation distance for the P2P interactions and the dynamic selection leveraging this information. We see that P OA performs comparatively better than other two benchmarks w.r.t. energy variation distance. However, P OA also results in higher energy loss and lower number of nodes reaching energy balance level.
Therefore, overall with different heterogeneous settings, we can infer that the proposed method is able to maintain a better quality of energy balance in terms of lower energy loss and variation distance, and higher number of nodes reaching the energy balance level.

VI. CONCLUSION
In this paper, we consider the issue of heterogeneity present among the devices participating in P2P-WET affecting the energy balance process. Specifically, we consider the heterogeneity in terms of the participating device's battery capacity and WET hardware, which determines the Qi charging capacity. We propose a method, Heterogeneity-aware Wireless Energy Transfer (HetWET), which includes a dynamic and fine-grained model of energy exchange. Our proposed method enables the nodes to explore the potential peers, and subsequently, select a peer dynamically for P2P energy exchange. Compared to the existing works, HetWET achieves improved energy balance quality w.r.t different performance metrics. Also, with varying heterogeneous settings, the proposed method is able to maintain low energy loss and energy variation distance compared to the state-of-the-art. In future, we plan to extend our work considering additional energy    losses (due to different activities e.g. mobility, communication) and implement in a real-world application scenario.