To maximize the charging efficiency of nodes in a “one-to-many wireless energy supply mode with rotatable charging direction”, the following three tasks are carried out by FLDC. Firstly, with the help of a two-layer fuzzy logic system, the priority of each grid can be obtained, which reasonably determines the order in which the MC traverses each staying point, ensuring the fairness of nodes being recharged. Subsequently, the gradient descent method is adopted to optimize the position of each staying point, which shortens the average distance between nodes in need of recharging and the MC, effectively reducing energy loss during the charging process. Finally, based on the priority level of nodes being replenished, the discrete energy radiation directions (charging direction angles) as well as the rotation order of the MC at each staying point are determined in sequence. Furthermore, with the goal of balancing the energy receiving efficiency of each node, fine adjustment of charging directions is made to shorten the overall charging time.
5.1. Priority of Node and Grid Based on Two-Layer Fuzzy Logic
In FLDC, the attributes of si at any time can be characterized by its residual lifetime tr(si), energy consumption rate p(si), and the distance from the center of the grid (marked as d(si, centerk)) it belongs to. Obviously, nodes with a smaller value of tr(si) or a larger value of p(si) should be prioritized for energy replenishment as much as possible. In addition, the distance between the center of a grid and the current position of the MC (denoted as d(centerk, MCj)) also has a significant impact on its traversal order. To address this, we construct a two-layer fuzzy logic system using the aforementioned attributes to determine a reasonable node-charging priority, and subsequently the traversal order of each grid.
Fuzzy logic is a method of decision-making that utilizes human thinking and reasoning. The system calculates fuzzy inputs and provides outputs ranging from 0 to 1 [
39]. In this section, we use
tr(
si),
p(
si) and
d(
si,
centerk) as inputs to the first layer of the fuzzy logic system to obtain the Node Priority (NP) of nodes being charged in each grid. Then, NP and
d(
centerk,
MCj) are regarded as the inputs to the second layer of this system to obtain the Grid Priority (GP) of each grid being traversed.
The trapezoidal and triangular membership functions are adopted in the proposed fuzzy logic system. Namely,
Here,
x is the clear input, and
x1–
x4 is the coordinate range of the membership function of the fuzzy variable.
The three types of input language values and membership function ranges in the first layer of the system are shown in
Table 4, and the system output is shown in
Table 5. Here, max(
p(
si)) represents the node with the highest energy consumption rate among all nodes participating in the calculation. In addition, the value of
d(
si,
centerk) clearly does not exceed
Rc. Similarly, the value of
tr(
si) will not exceed 2
T according to the trigger conditions of the MC mentioned in
Section 5.2.
The input-output functions of the fuzzy logic system in this layer are shown in
Figure 4. It can be seen that by transforming the clear inputs into fuzzy inputs through membership functions, three types of membership degrees of nodes regarding this attribute can be obtained. Then, the fuzzy inputs can be transformed into fuzzy outputs according to the IF-THEN rule. The first layer of the fuzzy logic system has three types of inputs and one type of output, with a total of twenty-seven rules, as shown in
Table 6. Without loss of generality, nodes with lower residual lifetimes and higher energy consumption rates will have higher priority, as the output of rule R7 shows. On the contrary, the priority of nodes with higher residual lifetimes and lower energy consumption rates is relatively lower, as the output of rule R19 shows.
The fuzzy output of the above two membership functions are calculated as follows.
With the help of the fuzzy input function, three fuzzy output membership degrees can be calculated out. By taking the minimum value for each rule mentioned above, the corresponding fuzzy output for each rule can be obtained. Then, we take the maximum linguistic value for each output to obtain the modified membership function image for each node.
Subsequently, the centroid-based deblurring method is adopted to obtain the deblurring points. The fuzzy output is transformed into a clear one, and then different expected values are sampled and averaged. The sum of the contributions of each sample point to the overall membership degree is calculated as the current priority. Assuming that
μ(
Zp) is the modified membership function of the fuzzy output set, and
Num is the number of points on the modified output that extends along the
x-axis, then
In this way, the priority of each node in the current set of nodes to be recharged can be obtained in a range from zero to one. The larger the value, the higher the priority. Without loss of generality, the highest NP value of all nodes in each grid is considered as the unified NP value of nodes in that grid and is used as an input into the second layer of the fuzzy logic system. In addition, the distance between the center of each grid and the current position of the MC (
d(
centerk,
MCj)) is also input. From this, the input-output rules and membership functions of the second layer can be obtained, as shown in
Table 7 and
Table 8. Here, max(
NP(
si)) represents the highest value of NP among all nodes participating in the calculation, while max(
d(
centerk,
MCj)) is the maximum distance between the center of each grid and the current position of the MC.
The input and output functions of the fuzzy logic system in this layer are shown in
Figure 5.
The calculation rules for the second layer of fuzzy logic are shown in
Table 9. Obviously, if the grid is closer to the current position of the MC and the value of its
NP(
si) is high at this time, it will obtain a higher priority of being traversed in the future, as shown in rule R5. On the contrary, if the grid is far away from the MC and its
NP(
si) is low, its traversal order will be later, as rule R11 shows.
5.2. Grid Priority-Based Charging Process of the MC
According to the description in
Section 5.1, the priority of each grid being traversed at any time can be obtained with the help of the double-layer fuzzy logic system. Thus, the charging process of the MC in FLDC is described as follows.
Step 1. When the network has been deployed, the base station continuously monitors the status of all nodes. If the residual lifetime of any node (i.e.,
tr(
si)) decreases to
Tmax, IDs of nodes whose
tr(
si) is less than 2
Tmax are put into the “set of nodes to be recharged”. This set is denoted as
Qnode, and it is initially empty. Afterwards, the BS will perform the above operation once every
Tmax interval. As described in
Section 4.2,
Tmax is defined as the maximum duration required for a single MC to complete a round of energy replenishment. That is to say, for any node that MC is about to serve in this round, as long as it can survive for at least
Tmax time from the departure time of the MC, it can ensure that it will not die and can be successfully replenished before the MC arrives. Furthermore, it is not difficult to see that nodes with a lifetime of less than 2
Tmax at this moment probably need to be recharged during the next two rounds of MC traversal (otherwise they may die). Therefore, the above settings are selected.
Step 2. The priority of each grid corresponding to the nodes in Qnode are calculated with the help of the two-layer fuzzy logic system.
Step 3. Each MC located at the base station selects a grid with the highest priority in sequence as its target to serve, and the ID of each node in it to be recharged is deleted from Qnode. Then, MCj moves from the BS to the corresponding grid. If the target of MCj is an NB-VG, it just moves to its staying point. If it is a B-VG, MCj needs to move to the node with the highest value of NP in it.
Step 4. After arriving at the grid,
MCj will serve all the nodes which are located in it and waiting to be recharged according to the method described in
Section 3. That is, if its charging objects are NB-nodes,
MCj rotates its charging orientation in a discrete way to achieve a “one-to-more” charging. Otherwise, the “zero distance-based one-to-one wireless recharging” mode will be adopted.
Step 5. If
Qnode = Ø when
MCj completes serving all the nodes in a grid (marked as
VGk), it indicates that there are no nodes waiting to be recharged in the network at this time. In this case, it returns to the base station, and the algorithm jumps to step 6 for execution. Otherwise, it selects the grid with the highest priority (marked as
VGk+1) corresponding to the nodes in
Qnode at this time. Subsequently,
MCj judges whether it can continue to traverse the next grid according to (29) and (30). If both inequalities hold true,
MCj deletes the IDs of nodes to be recharged in
VGk+1 from
Qnode, and then moves to this grid to serve these nodes. After completing these tasks, the judgment of this step will be carried out again until it returns back to the base station.
Er(MCj) and T(MCj) are the residual energy of MCj and the duration during which it has served in this round, respectively. d(k, k + 1) and d(k + 1, BS) represent the distance between the k-th grid (current grid) and the (k + 1)-th grid (the next grid MCj intends to traverse), as well as the distance between the (k + 1)-th grid and the base station, respectively. Moreover, the energy and time that MCj is expected to consume in serving the (k + 1)-th grid are marked as Ec(VGk+1) and Tc(VGk+1), respectively. Thus, the following two conclusions can be drawn.
If the grid is an NB-VG, the value of
Ec(
VGk+1) can be estimated by Formula (2). Moreover, the value of
Tc(
VGk+1) in Formula (30) can be expressed by (31), in which
Nc(
NB-VGk+1) represents the number of nodes waiting to be recharged in the grid.
If the grid is B-VG, Formula (4) is used to estimate the value of
Ec(
VGk+1). In this case, the value of
Tc(
VGk+1) in (30) should be calculated using Formula (32). Here, the number of nodes waiting to be recharged in the grid is denoted as
NoNc(
B-VGk+1).
Step 6. When MCj returns back to the BS, its battery will be replaced. If Qnode ≠ Ø at this moment, the grid with the highest priority corresponding to the nodes in Qnode is selected with the help of the two-layer fuzzy logic system again. Then, the algorithm jumps to step 3 to start a new round of charging service. Otherwise, MCj stays at the BS until Qnode is not empty again, and then the above steps are carried out once more.
5.3. Optimization of the Location of Staying Points (OLSP) for Minimizing the Sum of Charging Distance
As mentioned above, the staying points of the MC in each NB-VG are initially set at their geometric centers. However, due to the random distribution of nodes in the grid, this position may not be the “best staying point”. For example, in
Figure 6, there are only three nodes (
si,
sj,
sk) waiting to be recharged in NB-VG
k. Obviously, if the staying point of the MC is set to the centroid of Δ
sisjsk, the charging effect is inevitably better than that being set to the geometric center
P of NB-VG
k. The reason is that the energy receiving power
pr(
si) is almost inversely proportional to the value of
d(
MCj,
si) as a square term according to Formula (1). In addition, as described in
Section 5.2, the IDs in
Qnode often change, which means that even for the same grid, the nodes served by the MC may not be exactly the same each time.
In summary, it is necessary to optimize the location of each staying point traversed by the MC in each round of the recharging process. The specific steps are described as follows.
Step 1. When the MC is about to traverse grid NB-VG
k, the following function describing the sum of distances between the staying point
SPk and nodes located within it and waiting to be recharged can be obtained. The coordinates of
SPk and any node
si are denoted as (
xk,
yk) and (
x(
si),
y(
si)), respectively, and the former is initially the geometric center of NB-VG
k.
Step 2. The gradient of
D(
NB-VGk) relative to the location of the current staying point (
xk,
yk) is calculated, as shown in Formula (34).
Obviously, the value of
D(
NB-VGk) can be minimized by adjusting the position of this staying point in the opposite direction of the gradient.
Step 3. The possible updated coordinate (
xk(j+1),
yk(j+1)) of the staying point in the grid is calculated using Formula (35). Here,
j represents the number of times this position has been updated, and (
xk(0),
yk(0)) is just (
xk,
yk). Moreover,
η represents the step size for each movement during this adjustment process, and
D(
NB-VGk)
(j+1) represents the result of the
j-th calculation of gradient.
Step 4. We judge whether the following three conditions are met if the location of the staying point is updated to (xk(j+1), yk(j+1)). If so, the staying point of this grid is moved along the direction of the gradient mentioned above to the updated coordinate calculated in Formula (35). Next, the value of j is updated to j + 1, and then the algorithm jumps to the third step to continue optimizing the location of the staying point. Otherwise, (xk(j+1), yk(j+1)) is taken as the final result of the position of this staying point.
5.4. Determining the Charging Directions Based on the Discretization Method
After the OLSP has been executed, the location of the staying point in each grid should be as close as possible to the nodes waiting to be recharged. However, according to the output mechanism of the first layer of the fuzzy logic system described in
Section 5.1, even within the same grid, the priority of each node being recharged often varies. In addition, we need to further determine the direction of energy radiation as well as the rotation sequence of the MC’s charging orientation. Therefore, the process of “Determining the Charging Directions” (DCD) is described as follows.
Step 1. Nodes whose IDs are in Qnode are sorted in a descending order of their NP in NB-VGk to form a queue Q(NB-VGk). Obviously, the length of this queue is Nc(NB-VGk).
Step 2. A polar coordinate system is established with (xk, yk) as the pole. Thus, the polar coordinates of those Nc(NB-VGk) nodes mentioned above can be calculated. That is, for any si pending recharge in NB-VGk, its polar coordinate can be expressed as (d(SPk, si), φi).
Step 3. The direction vector from the staying point to the first node in Q(NB-VGk) is taken as the initial orientation of MCj’s first energy radiation range. Then, IDs of nodes located in this fan-shaped area are put into C1 which is defined as the set of nodes being covered by MCj in this orientation. According to Formula (1), it can be seen that in the case where d(MCj, si) is fixed, pr(si) can reach its maximum value if and only if αji is zero. Therefore, the purpose of this is to ensure that the node with the highest NP in Q(NB-VGk) as well as its neighbor can be efficiently and preferentially recharged.
Step 4. The IDs that were already in C1 are deleted from Q(NB-VGk). Then, if Q(NB-VGk) is not empty at this time, the algorithm goes to the third step and iteratively executes it to form the next cover set C2, C3, etc. Otherwise, the execution process of DCD ends, and the discrete charging directions of MCj in NB-VGk and the respective cover sets can be obtained. It should be pointed out that there may be overlap between those fan-shaped regions, but any node will only be recharged once during MCj’s residence in NB-VGk. That is, C1∩C2∩C3… = Ø and |C1| + |C2| + |C3|… = Nc(NB-VGk).
An example of the execution process of DCD is described as follows. As shown in
Figure 7a, there are eight nodes in NB-VG
k, and six of them are waiting to be recharged (red dots). The NPs of all these nodes have been calculated. Without loss of generality, we let
Q(
NB-VGk) = {
s1,
s2,
s3,
s4,
s5,
s6}, and
SPk is the staying point of this grid obtained by the OLSP algorithm.
So,
is regarded as the initial direction vector of the first energy radiation range of
MCj. It can be seen from
Figure 7a that both
s4 and
s6 are located within the fan-shaped charging area corresponding to this orientation. Thus,
C1 = {
s1,
s4,
s6}, and the IDs in
Q(
NB-VGk) are now updated to {
s2,
s3,
s5}. Subsequently,
is set as the initial direction vector of the second charging range, as shown in
Figure 7b, and it is easy to see that
s5 is covered by it, that is,
C2 = {
s2,
s5}. Similarly,
is marked as the initial direction vector of the third energy radiation range of
MCj, and now
C3 = {
s3}, as shown in
Figure 7c.
It can be seen that after carrying out the DCD algorithm, the charging direction vectors all point to the node with the highest value of NP covered by the corresponding energy radiation area. Although this can maximize the value of
pr(
si), it may affect the effectiveness of other nodes being served. For example, in
Figure 7a, due to
being large and the distance between
s4 and
SPk being relatively far, the value of
pr(
s4) is lower. To further balance the charging efficiency among nodes in the same set, the charging direction of the MC needs to be fine-tuned, which is named “Determining the Charging Directions after Adjustment” (DCD_A). The final direction vector
for
MCj to charge nodes in the set
Cp at
SPk can be expressed by Formula (38).
here is taken as the weight of
φi of each node in
Cp associated with
SPk. That is, the final orientation of the MC when serving nodes in
Cp will be more inclined towards the node that is farther away from it.
Figure 8 shows the final charging directions as well as the radiation range of the MC located at
SPk after the above corrections. It is not difficult to see from both
Figure 8a,b that these charging directions take into account the fairness of node recharge efficiency in the covered area. This shortens the charging and staying duration of the MC, which improves its service efficiency. It should be noted that there is only one node
s3 covered by the third energy radiation range (as shown in
Figure 8c). Thus, there is no need to modify the charging direction of the MC in this case.
Therefore, when the MC traverses to any NB-VGk, it will supply energy to nodes one by one according to the order constructed by the DCD method, with fine-tuned results for its charging directions as mentioned above.