Abstract

An extremely high number of geographically dispersed, energy-limited sensor nodes make up wireless sensor networks. One of the critical difficulties with these networks is their network lifetime. Wirelessly charging the sensors continuously is one technique to lengthen the network’s lifespan. In order to compensate for the sensor nodes’ energy through a wireless medium, a mobile charger (MC) is employed in wireless sensor networks (WRSN). Designing a charging scheme that best extends the network’s lifetime in such a situation is difficult. In this paper, a demand-based charging method using unmanned aerial vehicles (UAVs) is provided for wireless rechargeable sensor networks. In this regard, first, sensors are grouped according to their geographic position using the K-means clustering technique. Then, with the aid of a fuzzy logic system, these clusters are ranked in order of priority based on the parameters of the average percentage of battery life left in the sensor nodes’ batteries, the number of sensors, and critical sensors that must be charged, and the distance between each cluster’s center and the MC charging station. It then displays the positions of the UAV to choose the crucial sensor nodes using a routing algorithm based on the shortest and most vital path in each cluster. Notably, the gradient-based optimization (GBO) algorithm has been applied in this work for intracluster routing. A case study for a wireless rechargeable sensor network has been carried out in MATLAB to assess the performance of the suggested design. The outcomes of the simulation show that the suggested technique was successful in extending the network’s lifetime. Based on the simulation results, compared to the genetic algorithm, the proposed algorithm has been able to reduce total energy consumption, total distance during the tour, and total travel delay by 26%, 17.2%, and 25.4%, respectively.

1. Introduction

Wireless sensor networks (WSNs) consist of many energy-limited sensors and several sink nodes, where the sensor nodes can sense events such as temperature, humidity, and the content of atmospheric pollutants. These functional scenarios require WSN to work consistently. These application scenarios require the WSN to operate continuously. In particular, the performance of a WSN is limited by the battery capacity [13]. To augment the lifetime of a WSN as much as possible, many researchers have proposed various approaches. The existing reports can be divided into three categories, namely, energy conservation [4], energy harvesting [5], and wireless energy transfer (WET) [6].

Limited lifetime remains a key factor affecting large-scale deployment of WSNs. In general, there are two types of methods to solve the problem. The first method is a resource-saving method that uses an optimization method to improve the efficiency of the WSN. The energy-saving scheme increases the lifetime of the sensor nodes by reducing the energy consumption per unit of time or workload. While the energy of sensor nodes is still limited, this method cannot fundamentally solve the problem. The second method is wireless energy transfer (WET). The main idea is to charge sensor nodes with the use of a magnetic resonance coupling, and the WET can provide a stable energy source with a controlled charge power. With the help of the promising WET method, researchers have proposed a new concept of wireless rechargeable sensor networks (WRSNs) [79]. In WRSNs, sensor nodes can be charged by wireless charging equipment (WCE). Hence, the WCE charging schedule becomes a prominent issue in WRSNs. To date, various perspectives on charge scheduling have been investigated, including route planning and system performance optimization [10].

In WRSNs, since multihop data routing is usually used to send data from sensor nodes to the base station, the nodes that are closer to the base station usually consume more energy than others, resulting in unbalanced energy consumption patterns (for instance, the energy hole phenomenon [11]). Hence, a rational charging scheduling scheme that also takes both effectiveness and fairness should still be designed to meet the purpose of ensuring the lifetime of global sensor nodes in WRSN. Additionally, due to the limited charging capacity of WCVs in WRSNs, several imperative elements in charging planning must be considered, including the number, movement speed, charging power, charging range, charging path, and charging period of WCVs in each charging cycle and period. Moreover, the joint optimization of charging scheduling and network protocols of WSNs will certainly minimize charging costs and progress connectivity, coverage, and lifetime of WRSNs [1214].

In the overall framework of the wireless rechargeable sensor network, there are maintenance stations, base stations (BS), one or more agents or mobile charging vehicles (MCVs) on the ground or in the air, and a large number of rechargeable sensors (Figure 1). In this study, UAV is used as MCV. The maintenance station can meet the charging demand. The base station collects and aggregates the sensor data from the sensors and usually has no energy limitations. After deploying the sensors, the location of each sensor can be determined. A set of sensors with random battery capacity is distributed in a certain range. Sensors are categorized into several clusters based on their position and residual energy. The sensor collects data and transmits it to the cluster heads. When the power is less than the threshold, each sensor sends a real charge request to the MCV. The request delivery time is assumed to be insignificant compared to the moving time of the mobile charging vehicle (MCV) [5].

In this work, two issues of energy efficiency and transmission speed are considered for charging planning. Based on the needs of wireless sensor networks to continue working and increase their lifespan, the contributions of this article are stated as follows: (i)Considering the reduction of energy losses for charging sensor nodes, we seek to provide the shortest path to reach all sensor nodes(ii)With the help of tracking the nodes in urgent need of charging, priority is provided to choose the route(iii)With the approach of segmenting different areas, the risk of WSN nodes death is reduced(iv)By using UAV to charge nodes and also the GBO algorithm in this article, the time delay of charging at sensitive nodes is reduced

In the current investigation, we mainly study UAV routing and charging strategy in WRSN. Section 2 briefly reviews the literature. We introduce the concepts related to our work in Section 3. In Section 4, the routing strategy is proposed in detail. Simulations and analysis are presented in Section 5. Ultimately, Section 6 concludes and offers suggestions for further work.

Charging problems in wireless rechargeable sensor networks and the Internet of Things are common exploration challenges. Utilizing wireless energy transmission technology, we are capable of transferring electric power from wireless charging equipment (WCE) to sensor networks and also providing a new model for increasing the network lifetime. The current investigation usually uses a periodic and deterministic charging process, but the limited energy and impact of nondeterministic factors such as topological changes and sensor failures can be ignored, making them unsuitable for real networks. In [15], the goal is to minimize the number of dead sensors, while the maximum use of WCE energy is given by considering its limited energy. In this effort, the swarm reinforcement learning (SRL) method is first presented to attain the independent planning ability of WCE. Furthermore, to solve the inadequate search problem in the existing SRL algorithm, this algorithm has been improved with the help of the firefly algorithm, and a new charging algorithm, called swarm reinforcement learning based on firefly algorithm (SRL-FA), is proposed for demand charging architecture. Article [16] manifests a demand-based charging strategy (DBCS) in WRSN. Moreover, in the mentioned study, charging scheduling is developed in four ways: clustering method, selection of charging sensors, charging route, and schedule. At first, a multipoint improved K-means clustering algorithm is proposed to balance energy consumption that can be grouped based on location, residual energy, and past contribution. Secondly, to select charging sensors based on demand, a dynamic selection algorithm for charging nodes (DSACN) is planned. Third, simulated annealing based on performance and efficiency (SABPE) is designed to optimize the charging path for a mobile charging vehicle and reduce charging time. Eventually, in order to augment the efficiency of MCV, DBCS was suggested.

In [17], a new criterion is presented which is called the charging reward. This novel criterion will assist to measure the quality of sensor charging and then monitor how mobile charger planning is designed to fill the sensor supply so that the total charging rewards collected by the mobile charger in the charging are maximized. It is worthy to note that the total charging reward collected is subject to the energy capacity limit of the mobile charger and the charging time windows of all sensors. Owing to the problem’s complexity, the deep reinforcement learning technique is utilized to achieve the moving path for the moving charger.

In [18], a dynamic charging scheme (DCS) in WRSN based on the actor-critic reinforcement learning (ACRL) algorithm is proposed. In ACRL, gated recurrent units (GRU) are presented to record the relationships of charging actions in time order. Using an actor-network or agent with a GRU layer, one can choose a desired or nearly optimal sensor from the candidate sensor as the next target of charging and speed up the model training. Meanwhile, the length of the tour and the number of dead sensors are considered as the reward signal. The actor and critic networks are updated with the function of R and V error criteria.

To attain stable and reliable energy supplements through wireless charging, it is imperative to optimize the path of mobile phone chargers. Hence, the objective of article [19] is to provide a charging strategy and scheduling algorithm for directional wireless power transmission in WRSN. First, to regulate the priority of charging requests, the degree of charging demand is well defined. Thereafter, to avoid node energy losses, the charger orientation angle selection algorithm is considered according to the charging priority. Lastly, it formulates the directional charger deployment problem into a discrete unit disk-covering problem and suggests a trajectory planning scheme based on an improved genetic algorithm to optimize energy charging efficiency.

In the case of wireless sensor networks charging and the Internet of Things, it is anticipated that the mobile energy of wireless charging equipment (WCE) has adequate energy to recharge the trip and that the amount of energy discharge per sensor is identical. However, these hypotheses are not realistic. Actually, the energy of the WCE tour is restricted by the energy capacity of the WCE, and the energy consumption of different sensors is unbalanced. In the paper [20], periodic charging scheduling is proposed for mobile WCE with limited travel energy. In this circumstance, the connection time ratio is optimized and maximized. Then this periodic charging schedule guarantees that the energy of the sensors in the WRSN varies periodically and that the sensors do not die continuously. To alleviate this problem, a hybrid particle swarm optimization genetic algorithm (HPSOGA) is suggested for solving NP-hard problems.

In [21], an effective algorithm has been proposed to improve the lifetime of mobile wireless networks. It controls the communication between users and the sensor sink by solving a simple convex optimization problem. In the current study, the systemic performance of this algorithm was evaluated by bearing in mind that (1) energy storage devices of sensors are subject to recharging through radiative wireless power transfer events, (2) sensor mobility patterns by random waypoints, Gauss-Markov random and reference group models are considered, (3) a propagation path loss prediction model depending on the distance between two sensors, energy consumption, and the amount of charge delivered to the sensors, and (4) recharge which is done through omnidirectional and directional radiation patterns. Importantly, many of the previous works are not capable of utilizing the full benefits of WMC because it starts to recharge the sensor when its energy level reaches the threshold, resulting in an increasing WMC idle time. Moreover, although there has been an upsurge of interest in using WMC, the restriction of network lifetime was observed. However, the optimal sharing of WMC energy between sensors can guarantee permanent network performance. Therefore, the suggestion of an efficient method that jointly solves these challenges is required. In [22], the Fair Energy Division Scheme (FEDS) is presented, which will undertake the permanent network operation with optimization of energy sharing at the beginning of each cycle.

In [23], a charging scheduling algorithm for directional wireless power transfer in WRSNs is proposed. Firstly, the charging demand degree is distincted to regulate the priority of charging requests. Then, to circumvent the occurrence of the node’s energy being drained, the charger’s orientation angle selection algorithm based on charging priority is designed. Finally, it is formulated that the problem of directional charger deployment is a discrete unit disk cover problem and proposed a moving path planning scheme based on an improved genetic algorithm to optimize the energy charging efficiency. Simulation results illustrate the benefit of our proposed scheme over the benchmark.

In [24], the WCV charging strategy in WRSN is studied due to the significance of different sensor nodes in the transmission of data and rough energy consumption. According to the importance of the sensor node, which is accompanied by the distance to the base station, we divide the sensor nodes into two types: sensor nodes in the inner ring and sensor nodes in the outer ring. Therefore, a new charging model is suggested to adopt various charging strategies for different sensor nodes. In order to become more efficient, the sensor nodes of the WCV sensor put one into an inner circle and then charged several sensor nodes simultaneously in the outer loop. A new measure called normal dead time is presented for approximating network lifetime. Maximizing network lifetime is modeled as minimizing the normal amount of dead time, and an efficient algorithm is presented to minimize the amount of normal dead time by searching for optimal charging time sequences. Then, by resetting the charging time of the sensor nodes, the minimum travel cost algorithm minimizes the WCV travel distance and ensures the network lifetime. A cluster head node with more battery capacity was organized to charge other sensor nodes within a limited distance. An algorithm for cluster head node energy predistribution is presented.

Up to date, a great number of optimization methods for obtaining the charging path with the objective of minimizing the charging cost have been well documented. However, autonomous charging path planning for MC in a switchable network is not considered. Article [11] emphasizes on the charging path for MC because MC is stopped at each sensor node until the sensor node is fully charged. In the present exploration, reinforcement learning (RL) is stated to charge route planning for MC in WRSN. To enhance MC independence, a new charging strategy for RL-based WRSNs (CSRL) is proposed according to the effects of changing the energy and location of sensor nodes. In [25], the operation of wireless sensor networks on the basis of WPT wireless energy transfer using a mobile charging vehicle (MCV) provides a periodic strategy for the permanent operation of the network. The goal is to diminish the total energy consumption of the system and maintain network performance at all times. In this context, according to the analysis of total energy consumption, it proposes an energy-efficient renewable scheme (ERSVC) to achieve energy savings. In [26], using the traditional MTSP model for reference, the minimum energy consumption path and battery capacity planning model under multiple chargers are established. Then, the creative balance factor is designed and applied. In the next steps, an improved genetic algorithm based on the degree of balance is planned.

The article [27] surveys the problem of the minimum battery capacity essential for the normal operation of each sensor when determining the charging path of the mobile charger. Then, the parameters of the wireless rechargeable sensor network are studied. In these circumstances, the objective is to minimize the battery capacity required by each sensor and ensure the continuous operation of the wireless rechargeable sensor network with minimal sensor energy consumption. To minimize the battery capacity of each sensor, a linear programming model is considered. Also, the Lingo method is used to solve the model.

Article [28] establishes a new scheduling scheme for on-demand charging in WRSNs. First, it provides an efficient network partitioning method for MCS to balance their workload equally. Thereafter, fuzzy logic was employed to determine the MCS charging schedule. Besides, it forms an expression to regulate the charging threshold for nodes that varies depending on their energy consumption.

Paper [29] focuses on the on-demand wireless rechargeable sensor networks (WRSNs) to consent for continuing and sustainable monitoring and provide application-based services matching goals, circumstances, and the environment within smart metropolises. This work proposes a calibration fuzzy-metaheuristic clustering routing scheme (CFMCRS) for on-demand WRSNs. The proposed CFMCRS assistances from resource-saving and energy supplementary techniques in addition to using metaheuristic and fuzzy logic methods to achieve roles and energy distribution in nodes and across the network. It also uses a multiobjective function to standardize the network with the nearest-job-next with preemption (NJNP) charging scheduler to meet WRSN requirements in smart cities. Based on simulation results, this strategy can delay the WRSN’s lifetime.

A wireless rechargeable sensor network (WRSN) assisted by unmanned aerial vehicles (UAV) is a promising application in providing a stable power supply to rechargeable sensor nodes (SN). Creating a path for the UAV to traverse all SNs with the cheapest hacking cost for energy consumption is an important issue in UAV-assisted WRSN. Based on the studies in this section, although some exact algorithms and heuristic methods have been proposed, they cannot achieve an excellent result for large-scale networks in a tolerable time and respond well to energy constraints. In this paper, we examine the problem of UAV trajectory optimization from a new perspective that the designed trajectory should maximize the UAV’s energy utilization efficiency. The energy efficiency problem is decomposed into integer programming and nonconvex optimization problems using the maximum energy of the UAV. To solve the problem of UAV charging position, we speed up the performance of the GBO algorithm by limiting the search direction, initial search position, and search space. For this problem, large systems are divided into smaller networks with the help of K-means clustering, and a route search is done for each cluster.

3. Basic Concepts

3.1. Gradient-Based Optimizer (GBO)

The metaheuristic algorithm was first presented by Ahmadian Far et al. in 2020 to solve optimization problems related to engineering applications. Exploration and exploitation are the two main steps in metaheuristic algorithms that aim to improve the convergence speed and/or local optimal avoidance of the algorithm when searching for a target/situation. GBO is managed to make an appropriate trade-off between exploration and exploitation using two main operators: the gradient search rule (GSR) and the local escape operator (LEO). A simple introduction to this algorithm is explained as follows.

3.1.1. Gradient Search Rule (GSR)

First, GBO suggests the first GSR function, which helps GBO to consider random behavior in the optimization process to facilitate the exploration and avoidance of local optimal. Directional motion (DM) is added to the GSR, which is used to perform a suitable local search process to facilitate the convergence speed of the GBO algorithm. Based on GSR and DM, the following equation is used to update the current vector position () [30, 31]. where and are 0.2 and 1.2, respectively, is the number of iterations, and is the total number of iterations. Moreover, is a normally distributed random number, and is a small number in the range [0, 0.1]. can be calculated using the following relationship: where is an N-dimensional random number, , , , and , which are completely opposite to each other, are different integers randomly selected from , is a step size determined by the and . By replacing the position of the best vector () with the current vector () for Equation (1), the new vector () can be generated as follows:

Based on the positions and of the current position (), the new solution in the next iteration () can be defined as follows:

3.1.2. Local Escaping Operator (LEO)

LEO is the second operator introduced by GBO. LEO is introduced to make GBO still effective in dealing with complex high-dimensional problems. LEO is defined using several solutions, including the best position (), solutions and , two random solutions and , and a new randomly generated solution (). The solution is generated by the following scheme: where is a random number in the interval [-1,1]. is a random number from a normal distribution with mean 0 and standard deviation 1, is the probability, and , , and are three random numbers defined as follows: where is a binary parameter with a value of 0 or 1. Figure 2 shows the flowchart of the GBO algorithm.

3.2. K-Means Clustering

In fact, K-means clustering is a vector quantization method originally derived from signal processing and is popular for clustering analysis in data mining. K-means clustering is aimed at decomposing observations into clusters, where each observation belongs to the cluster with the closest mean, this mean is used as a sample.

Given a set of observations () where each observation is a d-dimensional real vector. K-means clustering is aimed at partitioning observations into set so that the sum of squared differences from the mean (i.e., variance) for each cluster is minimized. Its exact mathematical definition is as follows: where is the mean of the points in . This is equivalent to minimizing the two-squared deviations of points in the same cluster:

Since the total variance is constant, it can be concluded from the law of total variance that this equation is equal to maximizing the square of the deviations between the points of different clusters (BCSS) [3335].

3.3. Fuzzy Logic Technique

Fuzzy image processing can be defined as a set of all methods that are able to understand, display, and process images, parts, and features as fuzzy sets. Fuzzy image processing has three fundamental steps: image fuzzification, modification of membership values, and if needed, image defuzzification. The fuzzification step is attributed to the coding of image data. Besides, defuzzification is the decoding of the results. These stages make us the opportunity to process images with fuzzy techniques. Hence, the coding of image data (fuzzification) and decoding of the results (defuzzification) are the most significant stages that provide us with the ability to handle the image with techniques as shown in Figure 3 [11, 36].

The most effective element of fuzzy image processing is that it can be observed in the middle stage, i.e., by modifying the membership values that can be considered as intelligent, since these steps make the difference between the approach and the other. Fuzzy logic is characterized by a wide variety of membership functions which include triangular, trapezoidal, Gaussian, and bell membership functions. Each of them has a distinctive influence. The use of appropriate membership by fuzzy system inference increases the effectiveness of the method. This method assumes the adjacent points of pixels and then divides them into classes using the membership function [37, 38].

The image that can be used in fuzzy logic technology must be transformed into a gray level and then converted to a membership function (fuzzification step), where its value can be readily adjusted by fuzzy technology. This could either be called a fuzzy clustering, a fuzzy rule-based approach, or a fuzzy integration approach. To realize the uncertainty in the data, fuzzy image processing is required. Many of the benefits of image processing based on fuzzy logic are expressed as follows: (a)Fuzzy techniques are considered as dominant tools for displaying and processing an image(b)It provides us the opportunity to handle and manage obscurity with efficiency(c)The conception of fuzzy logic is not complicated(d)Fuzzy logic offers a huge flexibility(e)Fuzzy logic is operative even if the data is inaccurate

It is worthy to note that fuzzy logic works better than others because everything suffers from imprecision, whereas fuzzy logic makes its understanding by considering structure.

In several image-processing applications, to handle various types of complexities such as object recognition and scene analysis, it is recommended to utilize human logic according to if-then rules which can be accessible by fuzzy set theory and fuzzy logic. In contrast, many reasons like randomness, ambiguity, and vagueness make uncertainty in image processing results and data. Furthermore, those uncertainties have a negative impact on image processing progress that leads to many complications [3941].

4. Proposed Work

Based on the studies conducted in different fields for charging sensors in WRSN, the use of mobile charger brings different problems for planning and scheduling in critical nodes that require emergency charging. The target subject is the moving path of the charger vehicle. In this article, we use a UAV aerial transmission system so that we can reduce the path well for different urban and moving environments such as trees and buildings. We can also create direct routes between sensor locations for reliable routing. Compared to other mobile chargers, UAVs consume less energy between movement paths. It will also be able to be placed at the closest distance from the sensor for wireless energy transfer. Therefore, in this work, we consider the moving position of the UAV near the sensor nodes for charging. This work reduces the power and power losses to transfer energy from the UAV to the destination to its lowest value. Another noteworthy point about the use of UAVs is the constant speed of the UAV during the route between the nodes, which makes the route and energy consumption more accurate and simple. Figure 4 shows the flowchart of the proposed strategy for UAV movement and sensor charging. The following steps are explained.

4.1. Determining the Position of the UAV

In this case, the position at the origin of the coordinates is usually taken into account, and the subsequent positions along the route are determined, of course, we also define the location of the UAV charging station at the origin so that the UAV returns to the hangar and recharges in each period of travel. In these circumstances, it can be prepared for the next courses.

4.2. Checking the Charge Level of the UAV Storage for Travel

In this case, checking the stored power inside the battery happens every period to reach an optimal approach for recharging the UAV at the charging station.

4.3. Clustering of All Nodes Based on the Environmental Position of Sensors with the Help of K-Means Clustering

In this section, based on the number of clusters introduced in this article, which is equal to 5, the nodes in close positions are placed in a group or cluster.

4.4. Calculation of Priority Detection Parameters Included

(1)The number of nodes in each cluster(2)The number of critical sensors with a remaining battery capacity of 30% for each cluster(3)The average residual energy of nodes in each cluster(4)The average distance of the nodes of each cluster with the center of the charging station

These four parameters are normalized on the input of the priority detection fuzzy logic system in the range between 0 and 1. Now, these inputs are sent to the membership functions of the fuzzy system so that prioritization is done based on the defined fuzzy rules.

4.5. Prioritizing the Clusters to Determine the Clusters of the UAV Movement Path with the Help of the Proposed Fuzzy Logic

According to various works in Refs. [3133] in this article, a fuzzy system is used to select and prioritize clusters. Sorting the output of the fuzzy system calculated for each cluster until all clusters are arranged to prioritize the path selection priority.

4.6. Internal Routing for Each Cluster

In this part, UAV movement routing is performed for each cluster in the order of the determined fuzzy priority. (i)Determining the critical sensor nodes for each cluster by limiting the residual energy of the nodes(ii)Defining the objective function based on the shortest path and weighting the paths based on the remaining energy of critical sensors(iii)Determining the minimum of the objective function with the help of the GBO algorithm

4.7. Investigate the Delay and Energy

For this case, in the final routing, two energy limits and delay must be checked in this strategy. In the model presented in this work, first, the calculation of the total displacement delay and the charging time of the critical sensors along the determined path is done. The relationships governing these calculations are as follows:

Calculation of the remaining working time of the MCV (UAV):

First, we calculate the remaining working time of MCV as follows: where represents the distance between two nodes, represents the maintenance station, is the speed of the MCV, and represents the time the MCV stays near node . When the remaining working time is greater than the MCV duration, the node ensures that it is always working [42, 43].

4.8. Calculation of the Minimum Remaining Working Time of the Sensor

The minimum remaining working time of the sensor in WRSN is calculated by the following relationship: where is the residual energy of the th node in the th cluster and represents the power of the th node.

Here, the condition of the proposed strategy is that the remaining working time of the UAV is less than the minimum remaining working time of the sensors. With this limitation, the condition of convergence and confirmation of the route determined in this period is approved and goes to the next stage for implementation; otherwise, the proposed strategy should be implemented again to track the new route. By applying this condition to the proposed method, the probability of the death of sensor nodes will reach zero.

After applying the delay condition in the first step, it is time to calculate the energy consumption for the proposed route. In this step, the two problems of energy charging and energy loss by the UAV are calculated according to the length of the path.

4.9. Energy Charging Model

The energy charge model is defined as the Ferris free space model in (20) [40].

where is the gain of the source antenna, is the gain of the receiver antenna, represents the rectifier efficiency, represents the polarization loss, is the wavelength, is the distance of the UAV charge to the sensor node, which is equal to 1 m in this work. value is 0.2316 as a parameter to adjust the Ferris free space equation for short-distance transmission, and is the MCV source power. Power consumption for the rest of the UAV can be calculated for each sensor, which is introduced in this article with .

4.10. Energy Consumption Model during UAV Travel

To calculate the energy consumed during the distance traveled by the UAV, due to the same speed of movement, this amount of energy is constant along the path. For modeling, in this regard, the amount of energy consumed is: where is the total distance traveled during the travel of one charging period. will be the energy consumption coefficient of MCV along the path, which is assumed to be 0.3 j/m for the UAV in this article.

Based on this, the total amount of energy consumed during the tour of a specific period is calculated as follows:

Where is the energy required to fully charge the sensor node and is the amount of time the charger stays next to sensor node and is calculated by the following equation:

In order to implement the strategy proposed in this article, in the proposed method, the total energy consumption should be less than the periodically charged energy of the UAV, so that the MCV can fully charge both the critical nodes and return to the charging station.

4.11. Proposed Fuzzy Logic System

In this section, the cluster prioritization system is presented with 4 parameters defined in the previous section and fuzzy rules [31, 32]. In this case, we use the parameters of the number of nodes in each cluster and the number of critical nodes with residual power less than 30%, the average energy of the nodes in the cluster, and the distance of each cluster from the maintenance center, which are introduced at the origin of the coordinates, as the input of the fuzzy system (Mamdani type). According to the total number of rechargeable sensor network nodes and the dimensions of the environment, these four parameters should be determined for the interval [0,1] for the input of the fuzzy system. Figure 5 shows the structure and input and output membership functions for the defined fuzzy system. Triangular, trapezoidal, and Gaussian membership functions are used in this fuzzy logic. Table 1 also shows the written rules for cluster selection and prioritization. The basis for defining the fuzzy rules for the prioritization system in the clusters will depend on the four input parameters of the fuzzy system, so the lower the average battery charge (battery SC), the lower the priority value of the cluster, that is, it is placed in the primary and emergency order for the UAV’s path. Also, the lower the number of node members (number SC), the lower the priority value of the cluster, and for the number of critical nodes for the need to charge (critical nodes), the lower priority value is set, and finally, the lower the distance between the center of the nodes and the origin (centraldis), the higher the prioritization (i.e., lower cluster priority value). At this stage, the fuzzification operation is performed for the number of clusters in the WRSN, and the final value is obtained. Then, based on the priority defined in this work and the ascending sorting of the outputs of each cluster, the placement order for the UAV route is introduced. The numbering of the clusters is introduced in order from minimum to maximum based on the fuzzy output of each cluster.

4.12. Routing with GBO Algorithm

After selecting and prioritizing the clusters, in each cluster, sensitive and critical nodes with less than 30% remaining energy are selected, highlighted, and activated for charging by the UAV. In this step, for each cluster, the fuzzy priority of the UAV route is determined with the help of a gradient-based optimization algorithm for the following proposed objective function. In the first cluster, the initial position of the UAV is selected as the hangar, which is located in the maintenance center at the origin of the coordinates with the positions 0 and 0 introduced, and for the next clusters, the initial position of the location of the last routed node in the previous cluster is introduced. The basis for defining the objective function in each cluster is the path length of the selected nodes and the weighting of each critical sensor node based on the defined function of the following mathematical model: where is the number of nodes selected under the algorithm in the cluster and is the relative amount of remaining power of the selected nodes which is defined in the range of 0 and 1. Figure 6 shows the MATLAB code of the function:

5. Simulation Results

In this section, extensive simulation experiments are conducted to evaluate the performance of WRSN.

5.1. Model of Study and Simulation

As shown in Table 2, we randomly deploy {100} nodes in a square field of 400 m by 400 m. The coordinates of the maintenance station are at (0, 0), and the UAV is charged there. The information from the nodes, after being received by the individual nodes, is relayed to the center of the station. The sensor node sends a charge request to the station when the remaining energy is below the threshold. In our event-driven simulator, measurement data is simulated as events occur at random times and in random locations. Whenever an event occurs within the range of the sensor node, the node captures the event and sends it to the BS through the constructed route. The mobile charging process is simulated using m-file code in MATLAB 2017b software.

5.2. Showing Results

In this section, the results of a sample system from Figure 7 are shown for the number of 100 rechargeable sensor nodes. According to the figure, the remaining battery capacity of each node is introduced. Nodes with a distance of less than 100 meters will be able to communicate with each other and are connected with a blue line, and communication exchange is more in crowded areas. In this section, the routing results for critical sensors with a charge percentage less than 50% have been discussed using the proposed strategy method of combined fuzzy logic with the GBO algorithm. The basis of wireless energy request from UAV by nodes can be introduced by limiting the residual energy threshold of nodes. By changing this threshold value, the performance of the system can be changed for the charging speed and charging of all nodes and the initial charging of the UAV. Each time the charging strategy is applied, the energy capacity of the batteries is reviewed and quantified in the problem.

Figure 8 shows an example of the system response for the studied network. In this image, the steps for applying the proposed charging techniques are shown. Figure 8(a) shows the results of clustering sensor nodes based on location with the help of the K-means algorithm, and then fuzzy prioritization is performed to select the cluster. The priority order of the clusters is quantified with the help of fuzzy rules, and the clusters with a lower priority value will have a higher chance to be charged early by the UAV.

Figure 8(b) also shows the routing results according to the objective function defined in this article with the help of the GBO algorithm in each cluster. The selection of the routes between the critical nodes is based on the sensitivity of the nodes to reach the charge and minimize the travel distance. Also, Figures 9 and 10 show the simulation results for other examples of the network with 50 and 30 nodes. To evaluate and compare the effectiveness of the suggested design, simulation of other cases is used. The bar graph of the comparison results for networks with different numbers of nodes is shown in Figure 11. As can be seen, by reducing the number of sensors in the network, the amount of energy consumed and the distance and travel time are reduced. In Table 3, three important parameters of energy, time, and length of travel and one parameter of simulating the duration of program execution and decision-making for choosing routes are compared in two genetic algorithms and GBO, which obtained better answers based on the results of the GBO algorithm. The results discussed in this table are analyzed for a network with 100 nodes.

The important point to analyze the results in this paper is the performance of the proposed technique for changes in the number of clusters and the speed of the UAV. Therefore, in Figure 12, the graph shows the changes in the number of clusters for the system with 100 sensor nodes. According to this figure, by increasing the number of network clusters for charging for the number of 4 clusters, the target parameters including the total flight delay, the distance traveled, and the UAV charging energy will decrease, and then by further increasing these parameters, we have achieved an increase in the target parameters. For clustering with the number of 4 clusters, we have been able to obtain the best response for the charging performance of the sensor network, which provides the best responses in terms of energy consumption, delay, and the length of the UAV’s travel path. According to Figure 13, which shows the variation in UAV speed, it reduces the total flight delay during travel and helps to improve the performance of the WRSN charging system. Finally, the performance of the GBO algorithm for 1000 iterations of path tracing for the network with 80 nodes is checked and shown for each cluster in Figure 14. In this figure, it can be seen that all the clusters have reached their global minimum after the period of 300.

6. Conclusion

The current study manifests an on-demand wireless charging algorithm with the help of drones based on fuzzy logic system, and a gradient-based optimization algorithm called fuzzy-GBO is proposed. Using the combined clustering strategy based on fuzzy logic and the GBO routing algorithm, fuzzy-GBO can help the UAV to achieve independent path planning. Moreover, fuzzy-GBO fully considers the operation of the UAV with limited energy and the response to charging requests. Therefore, fuzzy-GBO can improve the performance of UAVs and sensor networks. Subsequently, experiments are conducted to verify the performance of fuzzy-GBO, which is compared with classical on-demand charging algorithms. Remarkably, the simulation results reveal that the fuzzy-GBO is well designed and can effectively increase the lifetime of the networks as well as the energy utilization of the UAV under the limited energy of the UAV. It is worthy to note that we further analyze how parameters such as the number of sensor nodes, UAV speed, and the number of clusters affect SRL-FA.

In the future, we plan to expand this work by using multiple UAVs and considering the energy consumption dynamics of sensor nodes. Also, the uncertainties of energy consumption and different charging conditions are investigated for each sensor node. It may lead to more cooperation among them to address more practical problems in WRSNs.

Data Availability

The data will be shared only at the request of the esteemed editor for review by the reviewers.

Conflicts of Interest

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