Abstract
Wireless sensor networks (WSNs) for precision agriculture are constrained by limited node energy, weather-induced link variability, and latency requirements. This work introduces SWADS, a clustered WSN architecture in which an unmanned aerial vehicle (UAV) serves as a mobile sink and cooperates with two intelligence layers: (i) a long short-term memory (LSTM) forecaster for short-horizon weather prediction that triggers proactive UAV/fixed-sink handover during adverse conditions, and (ii) a reinforcement-learning (RL) policy for energy-aware cluster-head (CH) selection. In MATLAB simulations with 200 nodes over 8,000 rounds (first-order radio model, AWGN channel), the LSTM achieves ≈ 96% validation accuracy (> 97% training), enabling timely handovers that avoid predicted fades, while the RL policy selects near-optimal CHs with ≈ 95% accuracy, mitigating energy hotspots. SWADS sustains operation from first-node death (FND) at ~ 5,760 rounds to last-node death (LND) at ~ 7,032 rounds, demonstrating extended lifetime under clustered, mobility-aware routing. End-to-end delay remains low at ~ 1–1.2 ms on average, and packet loss is limited to ~ 6.04% despite channel noise, reflecting reduced contention via aggregation and shortened sink–CH distances. Throughput remains stable up to ~ 7,000 rounds with a peak of ~ 160 packets/round. Across baselines (static-sink LEACH-style, UAV mobile sink without weather awareness, and RL-based clustering without mobility), SWADS consistently delivers longer lifetime, lower delay, and more stable throughput. These results indicate that coupling weather-aware sink mobility with RL-driven clustering provides a robust and energy-efficient path to practical, long-lived agricultural WSN deployments.
Similar content being viewed by others
Introduction
Wireless sensor networks (WSNs) underpin precision-agriculture analytics by delivering spatially dense, near-real-time measurements of soil and micro-climate variables to a sink for decision support. Despite their ubiquity, field deployments remain fragile: nodes are battery-limited; terrain and canopy cause multi-path and shadowing; and weather drives short-term variability in link quality that undermines throughput and stability1,2. Recent surveys and experiments highlight a shift toward WSN designs that combine energy-aware communication, situational awareness, and aerial mobility to sustain performance at scale3,4.
Mounting a sink on an UAV shortens hop distances, reduces contention around hot spots, and enables targeted collection from cluster heads (CHs). Beyond basic mobility, 2025 studies integrate security- and energy-aware clustering and even UAV-enabled charging, while trajectory planning is increasingly cast as utility maximization (e.g., timeliness-of-information), with complexity results and practical heuristics demonstrating tangible gains over static baselines5,6.
Rain, fog, and high winds degrade links and can disrupt UAV operations; proactively scheduling around near-term forecasts avoids fades and wasteful retransmissions. Recent IoT work shows that LSTM/Transformer7,8,9 pipelines deployed at the fog/edge can deliver accurate short-horizon forecasts from in-situ sensor streams, enabling policies that defer mobile collection or hand off to a fixed sink to protect reliability and energy10.
Clustering and CH rotation remain central for balancing energy. Reinforcement-learning (RL) approaches paired with meta-heuristics have been shown in 2025 to extend lifetime and increase delivered data volume over LEACH-style baselines by selecting CHs that jointly account for residual energy, local density, and sink distance11.
We propose SWADS, a clustered WSN architecture in which a UAV operates as a mobile sink coordinated by two intelligence layers: (i) an LSTM forecaster that triggers UAV/fixed-sink handover under adverse weather, and (ii) an RL policy for energy-aware CH selection. We evaluate SWADS using the first-order radio model and standard metrics (lifetime, throughput, delay, packet loss), demonstrating robust operation under realistic weather variability.
Related works
Recent advancements in WSNs have improved deployment and topology design, mobile-sink strategies, and AoI-aware scheduling. Hybrid schemes fuse swarm intelligence with deep RL, and new protocols optimize CH election and inter-cluster forwarding. Sustainability has driven wireless power transfer studies, using RL to place chargers cost-effectively. However, most approaches treat mobility, clustering, and environment dynamics separately. This study proposes an integrated architecture that couples forecast-guided UAV/ground-sink handover with RL-driven clustering for longer-lived, lower-latency operation under realistic field variability.
Regilan et al.12 proposed ReLeC-MEO, an energy-aware WSN protocol that couples a reinforcement-learning-based clustering scheme (ReLeC) with multi-objective efficient optimization to jointly tune network configuration and operating trade-offs. By searching for non-dominated solutions on the Pareto front, the method balances data-delivery quality, energy expenditure, and network lifetime rather than optimizing a single metric in isolation. Simulation results show consistent gains over baseline protocols (42.9% lower latency, 51.6% lower energy consumption, and 35% higher throughput) and it also extends lifetime by 20.4% compared with the next-best competitor, highlighting the effectiveness of RL-guided clustering when combined with explicit multi-objective optimization.
Saravanan K. et al.13 tackled real-time WSN constraints in energy and data collection by introducing a Rank-Based Path Planning (RBPP) strategy driven by a recurrent neural network (RNN). The RNN ranks nodes as “hotspots” using indicators such as residual-energy dissipation, traffic load, and multi-hop burden; the mobile sink then visits only these hotspots, while non-hotspot nodes forward their data to the nearest hotspot, cutting long multi-hop routes and balancing energy use. In experiments, RBPP yields a 35% reduction in energy consumption and a 13% increase in network lifetime versus state-of-the-art baselines, with only a modest rise in simulation time demonstrating efficient, targeted data collection without continuous sink roaming.
D’Agostino et al.14 delivered a modular, edge-friendly predictive-maintenance platform for industrial IoT that couples Nicla Sense ME sensor nodes with a Raspberry Pi concentrator and a plug-and-play sandbox for machine-learning models, exemplified with an LSTM forecaster. The key contribution is architectural: external users can drop in custom models without touching the core system while the stack scales to 64 nodes and remains robust to environmental interference. In lab tests the LSTM achieved RMSE = 0.0156 and 99.81% anomaly-detection accuracy; in real-world trials the system sustained high fidelity (max MAE = 0.1821, R² = 0.8898, MAPE = 0.72%). Together these results show that the design supports accurate, low-latency monitoring and fault prediction under realistic noise, translating to reduced downtime, better resource utilization, and improved operational efficiency.
Shaikh et al.15 addressed the long-standing node-placement problem for maximizing coverage and connectivity in WSNs by formulating a joint optimization model and introducing an Improved Chaotic Grey Wolf Optimization (ICGWO) algorithm. ICGWO augments the canonical GWO with a chaotic map to strengthen exploration–exploitation balance and accelerate convergence, which is validated on CEC_22 benchmarks against competing optimizers. In representative deployments, ICGWO attains high coverage with modest node counts—95.9077% (20 nodes), 98.2211% (30), 91.6875% (40), 99.4940% (50), 99.7801% (60), and 99.7822% (70)—yielding average gains over state-of-the-art methods of 16.41%, 5.36%, 3.45%, 2.371%, 2.80%, and 2.18%, respectively. The results demonstrate that ICGWO provides an effective, scalable strategy for coverage/connectivity-aware placement, directly reducing deployment overhead while improving network reliability.
Xie et al.16 tackled environmental and energy constraints on mobile-sink data collection by recasting path planning as a meta-heuristic search and introducing ACO-TU (Ant Colony Optimization—Team Up). The method augments classical ACO with node-level pheromones and a team-up strategy that groups virtual ants (mobile units) to cooperatively explore and refine candidate sink routes, explicitly targeting shorter travel distance and lower power consumption. By shrinking the sink’s tour and prioritizing high-yield waypoints, ACO-TU reduces motion energy and communication overhead, which in turn extends the sink’s service life and improves end-to-end signal quality. Comparative experiments against recent algorithms show that ACO-TU consistently delivers the best optimization performance, with significant gains in distance shortening and energy savings, validating the effectiveness of team-based ACO for mobile-sink path optimization in WSNs.
Seong et al.17 tackled AoI-aware data harvesting with UAVs by reframing the problem as a scalable multi-agent control task and proposing a MARL framework enhanced with curriculum learning and an evolutionary strategy. The curriculum progressively increases task complexity as the number of UAV agents grows, while the evolutionary component refines policies to maintain performance under larger agent populations. Crucially, the method couples AoI minimization with energy-sustainable operation by embedding intelligent, energy-efficient charging decisions into the learning loop. Across numerical evaluations, the proposed approach consistently outperforms strong baselines on both freshness (AoI) and charging efficiency, demonstrating robust scalability and effective coordination for large-scale UAV–WSN deployments.
Wang et al.18 tackled optimal charger placement (OCP) in wireless rechargeable sensor networks—an NP-complete problem under wireless power transfer (WPT) with fixed-location chargers that simultaneously replenish nodes within a limited range—by reframing it as a charging-cluster determination task with a fixed clustering radius. They introduce RL-CCD, which seeds candidate placements via K-Means++ (chargers at initial centroids) and then employs a reinforcement-learning agent to iteratively shift centroids and merge/prune clusters, trading off coverage and cost. The agent’s reward integrates cluster cardinality and the sum of node–centroid distances, encouraging dense coverage with shorter charging distances and fewer chargers. An experience-strengthening mechanism leverages best-so-far solutions to speed convergence and escape local minima. Extensive simulations show that RL-CCD consistently outperforms heuristic and classical optimization baselines—reducing charger count and deployment cost while maintaining (or improving) charging accessibility and sustainability for WRSNs.
Li and Chen19 addressed AoI-aware sweep coverage with UAV swarms by explicitly accounting for both the freshness of sensed data and the continuous coverage time required at points of interest (POIs)—two factors often neglected in prior work. They propose two coordinated modes—simultaneous sweep (concurrent multi-UAV passes) and batch sweep (staggered waves)—and formulate an optimization that minimizes average AoI under POI dwell-time and swarm constraints (e.g., speed/endurance). The method first clusters POIs to determine high-value sweep points, then introduces the UAV Swarm Sweep Coverage (USSC) algorithm to schedule routes and assignments for both modes. Simulation studies across varying POI densities and fleet sizes show that USSC consistently lowers average AoI versus baseline planners while satisfying continuous coverage requirements.
Raju et al.20 framed UAV-assisted urban flood monitoring as a joint optimization of data collection maximization and Age of Information (AoI) minimization under the energy constraints of aerial vehicles operating over dynamic WSNs. They first cast the task as a mixed-integer nonlinear program (MINLP) and derive a Lagrangian-based branch-and-bound solution that relaxes constraints to an unconstrained form for tractable search of high-quality schedules and routes. To handle large-scale networks, they introduce a hybrid GA–PSO metaheuristic that co-evolves candidate UAV paths and sampling schedules, explicitly trading off coverage, timeliness, and energy budgets. Across simulations representative of urban flood dynamics, the proposed pipeline consistently outperforms recent baselines on both higher data yield and lower AoI, indicating more timely situational awareness without exceeding UAV energy limits.
Wang et al.21 unified CH election and inter-cluster routing into a single optimization stage using a bio-inspired Spider Wasp Optimizer (SWO), overcoming the limits of two-phase designs that treat routing after CH selection. The method embeds a communication-distance penalty in the objective to discourage long CH-to-CH hops and introduces central relay points so traffic is forwarded via energy-efficient intermediate nodes rather than costly long links. To further balance load and shorten paths, CHs are grouped with K-means, relay candidates are placed equi-distantly, and Dijkstra is used to compute the best multi-hop routes per group. Implemented in MATLAB, the proposed SWO-based protocol consistently extends network lifetime compared with strong baselines—by up to 32.7% over PSO-C, 27.5% over EECHS-ISSADE, 18.2% over HBACS, and 9.2% over SSA-FND—demonstrating that jointly optimizing CH selection and inter-cluster routing, while explicitly constraining hop distance and balancing forwarding load, yields tangible energy savings and longer-lived WSNs.
Yang et al.22 presented WOAD3QN-RP, a hybrid WSN routing scheme that fuses swarm intelligence with deep reinforcement learning to overcome poor adaptability, high delay, and short lifetimes in traditional protocols. The method first applies the Whale Optimization Algorithm (WOA) to elect cluster heads by jointly considering residual energy, node–sink/neighbor distance, and queuing/communication delay, producing balanced clusters that curb early energy holes. It then uses a dueling double deep Q-network (D3QN) to learn multi-hop routes that adapt online to topology changes while explicitly trading off path length and per-hop energy cost. By coupling energy-aware CH selection with RL-driven routing, WOAD3QN-RP reduces end-to-end delay, balances energy consumption, and extends network lifetime, with experiments showing consistent improvements over state-of-the-art baselines.
Li et al.23 investigated a UAV-enabled, wireless-powered MEC system in which a UAV with RF chains and onboard MEC servers both recharges IoT devices and executes their tasks while hovering at designated points, and formulate a joint objective to minimize a weighted sum of energy consumption and Age of Information (AoI) that depends on UAV hover/flying times. They prove the problem is NP-hard and mixed-integer non-convex, then propose TOJEA, a two-phase trajectory optimization framework: (i) an Equilibrium Optimizer (EO) with a variable individual size encodes full hover-point deployments (number and locations) to search a high-quality design space; and (ii) a low-complexity greedy scheduler derives the visiting order over the chosen hover points to balance travel and service latency. Across ten instances with up to 400 IoT devices, TOJEA consistently outperforms competing algorithms, delivering lower energy usage and fresher data (smaller AoI), while retaining scalable computational cost—demonstrating the value of joint deployment–routing co-optimization for sustainable, information-fresh UAV–MEC operations.
Zhan et al.24 studied UAV sensing over multi-cell networks and explicitly trade off freshness—measured by Age of Information (AoI)—against UAV operation time by minimizing a weighted sum of both via joint optimization of transmission scheduling, BS association, and UAV trajectory. The problem is cast as a challenging MINLP under time-varying channels; to make it tractable, the authors (i) derive an average-performance model using statistical channel information and design an optimal-structure search aided by convex optimization, (ii) propose a low-complexity Double-Graph Algorithm (DGA) for near-optimal offline planning, and (iii) develop a Deep Reinforcement Learning Algorithm (DLA) that adapts online to site-specific conditions and yields rapid decisions after training. Simulations show the proposed methods improve over benchmarks by ≈ 30% while enabling a tunable balance between AoI and operation time—a capability unattainable when optimizing either objective in isolation.
Several recent contributions have employed hybrid deep learning and optimization frameworks to address complex classification and prediction problems across multiple disciplines. For instance, integrated convolutional and recurrent layers for robust traffic classification in SDN25, and developed stacked feature-selection models for environmental datasets such as water quality and hydrogen energy forecasting26,27. Other studies extended these paradigms to aerodynamics28, healthcare29, and fire detection30, emphasizing the adaptability of deep hybrid systems to both physical and cyber environments. The present study builds upon this foundation by coupling forecast-driven decision intelligence (via LSTM) with policy optimization (via reinforcement learning) for dynamic UAV–WSN management. Recent literature has identified four major advances for large-scale WSNs: energy-aware clustering, mobility-assisted data collection, topology/provisioning methods, and cross-layer co-optimization as summarized in Table 1. These advances aim to optimize mobility, clustering, provisioning, and freshness in a more efficient and sustainable manner. However, most studies focus on optimizing these aspects in isolation, neglecting short-horizon environmental awareness. This gap is addressed by an integrated, weather-aware, RL-driven architecture.
Model and proposed protocol
System model
The system model of the agricultural WSN is composed of a mobile drone sink (acting as the central coordinator) and a set of N static sensor nodes deployed in the field, as shown in Fig. 1. The N nodes are grouped into clusters, and each cluster elects a CH using RL. The CHs are responsible for aggregating sensed data from member nodes and forwarding it to the sink. Unlike static sinks, the drone sink is weather-aware: its trajectory is adapted according to predicted weather conditions to ensure reliable connectivity and energy-efficient data collection.
Drone data collection in WSN.
Weather-aware sink mobility
In our proposed model, the LSTM is trained on historical weather data to predict short-term weather conditions (e.g., rain, snow, or clear sky). This prediction is crucial because the mobility of the drone sink depends directly on the weather:
-
If the prediction indicates rain or snow, the drone initiates a handover to the nearest cluster head (CH) to maintain reliable communication.
-
If the prediction indicates clear/sunny weather, the drone continues normal operation as the mobile sink.
Thus, LSTM not only provides accurate weather forecasting but also serves as a triggering mechanism for adaptive sink mobility in our WSN. This ensures robustness and energy efficiency, stable communication and minimizes packet loss in dynamic agricultural environments.
Let \({{\mathbf{\hat {w}}}_{t:t+h}}\) denote the h-step-ahead weather forecast from an LSTM. Using standard gates with sigmoid \(\sigma \left( \cdot \right)\) and \({\text{tanh}}\left( \cdot \right)\),
we derive a binary decision \({u_t} \in \left\{ {{\text{UAV}},{\text{Fixed}}} \right\}\) per round: if adverse weather is forecast within a guard horizon, set \({u_t}={\text{Fixed}}\) (handover); else \({u_t}={\text{UAV}}\), with the UAV positioned near the centroid of active CHs to shorten CH\(\to {\text{Sink}}\) distances.
RL-based cluster-head (CH) selection
RL is a machine learning approach in which an artificial intelligence (AI) agent interacts with its surrounding environment and learns an optimal behavioral strategy based on the reward signals received from previous interaction31. In recent years, RL hass been an efficient approach for solving sequential decision-making tasks. The visualization of RL approach is shown in Fig. 2. where the agent interacts with the environment, observes the current state, selects an action, and receives a reward that updates the policy over time.
Diagram of RL approach.
The standard RL setup as a Markov decision process. At time \({\text{t}}\), the environment is in state \({{\text{S}}_{\text{t}}}\) and provides this state (or an observation of it) to the agent. Based on its policy \({\text{\varvec{\uppi}}}\left( {{\text{a}}\mid {\text{s}}} \right)\)—implemented as a table, a learned neural network, or rules—the agent selects an action \({{\text{A}}_{\text{t}}}\) and applies it to the environment. The environment then evolves according to the transition dynamics \({\text{p}}\left( {s^{\prime}\left| {\text{s}} \right.,{\text{a}}} \right)\), yielding a new state \({{\text{S}}_{{\text{t}}+1}}\) and a scalar reward \({{\text{R}}_{{\text{t}}+1}}\) that evaluates the immediate outcome of \({{\text{A}}_{\text{t}}}\). Each experience tuple \(\left( {{{\text{S}}_{\text{t}}},{{\text{A}}_{\text{t}}},{{\text{R}}_{{\text{t}}+1}},{{\text{S}}_{{\text{t}}+1}}} \right)\) is used to improve behavior: value-based methods update \({\text{Q}}\left( {{{\text{S}}_{\text{t}}},{{\text{A}}_{\text{t}}}} \right)\) or \({\text{V}}\left( {{{\text{S}}_{\text{t}}}} \right)\), while policy-gradient/actor–critic methods adjust policy parameters directly. This loop repeats over many steps/episodes, with the agent aiming to maximize the expected return as in Eq. (1). Additionally, algorithm 1 displays the RL CH selection mechanism.
thus, learning actions that produce higher long-term rewards.

Algorithm 1: RL CH selection.
Where max(Q(i,:)) denotes the maximum estimated Q-value among all possible actions for node i. This term ensures that the node updates its policy toward the action yielding the highest expected cumulative reward, thereby improving the selection of cluster heads over successive rounds.
Each node evaluates its suitability based on residual energy, distance to sink, and communication load.
The node with the highest RL utility is selected as CH.
This balances energy consumption across the network and prevents early node deaths, thereby extending network lifetime.
The RL-based CH selection uses a reward function defined as:
where \({E_i}~\)is the residual energy of node i, \({D_i}\) is its distance to the sink, \({L_i}\) is its communication load, and α,β,γ are weighting factors.
The reward function coefficients (α, β, γ) were determined through an empirical tuning process designed to balance energy efficiency, communication distance, and load fairness. Each component of the reward was normalized to the range [0, 1], and a grid-search exploration was carried out for α, β, γ ∈ [0.1–0.8] under the constraint α + β + γ = 1.0. For each configuration, the network lifetime, residual-energy variance, and cluster-head distribution were evaluated across 10 independent simulation runs. The optimal configuration, α = 0.5, β = 0.3, and γ = 0.2, provided the best balance between maximizing lifetime and maintaining uniform energy consumption across nodes. These weights reflect the higher significance of residual energy in prolonging operation while still encouraging short CH-to-sink distances and fair cluster participation.
SWADS protocol (per-round operations)
Algorithm 2 (SWADS) executes a full, weather-aware round of data collection by coupling forecast-guided sink selection with RL-based clustering. At the start of round rrr, an LSTM produces an hhh-step weather forecast; if adverse conditions are predicted within a guard horizon, the system hands over to the fixed ground sink, otherwise the UAV is activated and positioned near the centroid of the elected clusters to shorten CH→sink links. The algorithm then runs one iteration of the RL_CH_Selection routine: each node forms a state from its residual energy, distance to the current sink, and (optionally) local traffic load; it chooses the action “CH” or “Member” using its Q-values and receives a shaped reward that favors high energy and short distances while penalizing congestion, after which its Q-table is updated. Given the elected CHs, member nodes transmit to their CH using the chosen intra-cluster MAC; each CH aggregates data and forwards a single packet to the active sink (UAV or fixed). Finally, node energies are updated using the first-order radio model, network counters (throughput, delay, loss) are refreshed, and lifetime events—first-node death (FND) and last-node death (LND)—are checked before proceeding to round r + 1r{+}1r + 1. This per-round loop balances energy, reduces weather-induced outages, and sustains low-latency, reliable collection.

Algorithm 2: SWADS algorithm.
Simulation and results analysis
The first LSTM-based deep learning model was used to predict weather conditions using a dataset trained with timestamp-based features over 100 epochs. The confusion matrix demonstrated high accuracy in distinguishing clear and non-clear conditions, as shown in Fig. 3.
Confusion matrix of weather prediction.
The model achieved over 97% training and 96% validation accuracy after 50 epochs, as shown in Fig. 4. The final prediction file outputs a binary weather status, indicating whether a drone can act as a mobile sink or handover to a fixed sink, directly linked to the routing process in WSN.
Weather model accuracy and loss.
The LSTM used for short-term weather prediction was designed as a two-layer recurrent model with a sequence-to-one configuration. The sequence input length was 20-time steps, representing 5 h of historical weather readings (temperature, humidity, wind speed, and precipitation). The architecture comprised an input layer (4 features), followed by an LSTM layer with 64 units, a second LSTM layer with 32 units, a fully connected layer with 16 neurons, a dropout layer (rate = 0.2), and a sigmoid output neuron for binary classification of clear versus adverse weather. The network was trained for 100 epochs using the Adam optimizer (learning rate = 0.001, batch size = 32) with early stopping. The detailed configuration is summarized in Table 2.
The study developed a RL-based cluster head selection mechanism, which maximizes reward functions based on residual energy, distance to sink, node degree/connectivity, and load balance. The model achieved approximately 95% accuracy in selecting optimal cluster heads compared to ground-truth methods. The adaptive CH rotation prolongs network stability and reduces early energy holes, with nodes with higher residual energy and lower distance to sink consistently selected.
Finally, we evaluated the effect of integrating LSTM-based weather prediction and RL-based CH selection into WSN routing through MATLAB simulation. Table 3 shows the parameters used for simulation. Simulation setup includes 200 nodes and 1 drone, first-order radio model, 8000 rounds, weather-driven sink handover, and RL-based CH selection per round.
Figure 5 clearly shows the proposed weather-aware mobile sink routing model significantly extends the network’s lifetime compared to traditional protocols. This is due to two factors: using mobile sink drones to collect data from weather-aware mechanisms (LSTM) to prevent unnecessary energy usage during unfavorable conditions, and reinforcement learning-based CH selection to balance energy consumption among nodes. The model detects the first dead node at approximately 5760 rounds and the last dead node at approximately 7032 rounds, demonstrating its effectiveness in maintaining high throughput and stable delay.
Network lifetime.
Figure 6 shows that the proposed model reduces network traffic by 80%, resulting in reduced delay. It uses a CH-Based Clustering architecture, where nodes have a nearby CH instead of searching for the best path to the sink. The average delay remains between 1 and 1.2 ms, with slightly increased delay during rain periods due to weather-based sink handover. Overall performance remains acceptable.
End -to-End delay.
In Fig. 7 Compared with periodic trajectory optimization (PTO) algorithm32 it is shown that in SWADS algorithm energy consumption decrease gradually with increasing rounds that is the result of using ‘multi-hop communication’ so if node is far away from the cluster it doesn’t send directly instead it use intermediate node.
Energy consumption.
Our work (throughput vs. rounds) can be directly compared with32 (completion time vs. throughput). While the x-axis differs (rounds vs. time), both figures essentially capture increasing throughput over time, stable throughput up to round ~ 7000, and peak throughput of ~ 160 packets/round, as shown in Fig. 8. In the PTO algorithm, it can be seen that with the increase in communication throughput demand, the completion time also increases.
However, in our proposed algorithm, it gives a high gradual increase in throughput. That is because of ‘data aggregation; instead of each node sending a packet individually, the cluster head aggregates them and then sends the collected data to the drone, which in turn decreases the number of transmissions that decrease the probability of collision and loss. And use a mobile sink (drone) moving towards the CHs, which decreases the distance between the sink and the CH, hence consuming less energy for the CH, so it lives longer, sending more packets. Our proposed model is ‘weather awareness’; in the condition of non-clear weather (rain or snow), it increases the Eamp and moves the sink to the backup, so this allows data transfer to continue even in poor conditions instead of a large drop.
PTO32 & SWADS Throughput.
Figure 9 illustrates the comparative throughput performance of the proposed SWADS algorithm and the benchmark PTO algorithm. The results show that as throughput and total packets delivered increase, the SWADS model sustains a steady rise in cumulative throughput with minimal fluctuation across rounds, reaching approximately 1,084,259 packets by the final round. In contrast, the PTO algorithm exhibits a much steeper increase in completion time with rising communication throughput, reflecting higher latency and lower data delivery efficiency. The dual-axis plot confirms that SWADS achieves superior network scalability and transmission stability under varying load conditions, highlighting the benefits of its weather-aware UAV sink coordination and reinforcement-learning-based clustering over the traditional PTO trajectory optimization approach.
Comparative performance of the PTO32 algorithm and the proposed SWADS algorithm in terms of throughput and cumulative packet delivery.
Operational endurance and continuity
While the present study focused on optimizing routing, clustering, and weather-aware sink handover, UAV endurance remains an important practical consideration for sustained agricultural monitoring. In the proposed SWADS architecture, continuous data collection is maintained by hybrid operation the UAV acts as a mobile sink during favorable weather and is replaced by a fixed ground sink when battery capacity nears its limit or during charging intervals. This approach ensures uninterrupted operation without requiring the UAV to remain airborne continuously. Future work will explore solar-assisted UAVs, wireless charging pads, and multi-UAV coordination to further improve endurance and achieve persistent data collection in extended field deployments.
Conclusions and recommendations
This work introduced SWADS, a weather-aware, reinforcement-learning (RL)–driven architecture for clustered WSNs in which a UAV serves as a mobile sink with proactive handover to a fixed ground sink under adverse conditions. Two intelligence layers—an LSTM short-term forecaster and an RL policy for energy-aware cluster-head (CH) selection—are coupled with a standard first-order radio model to minimize long links and avoid weather-induced fades. In MATLAB simulations with 200 nodes over 8,000 rounds, the LSTM reached ≈ 96% validation accuracy (>,97% training), enabling timely handovers, while the RL policy achieved ≈ 95% CH-selection accuracy relative to a heuristic oracle. SWADS sustained operation from FND ≈ 5,760 to LND ≈ 7,032 rounds, kept average end-to-end delay low (≈ 1–1.2 ms), limited packet loss (≈ 6.04%), and maintained stable throughput up to ≈ 7,000 rounds with a peak ≈ 160 packets/round. These gains stem from (i) shorter CH→sink distances through UAV positioning, (ii) multi-hop intra-cluster forwarding that avoids costly long-range transmissions, and (iii) forecast-guided sink selection that prevents collection during predicted link degradation. Collectively, the results indicate that integrating weather awareness with RL-based clustering is an effective path to longer-lived, lower-latency agricultural WSN deployments.
From a deployment perspective, we recommend (i) selecting a guard horizon and handover threshold that reflect local meteorology to avoid oscillations between UAV and fixed sink, (ii) tuning RL weights to favor residual energy and short CH-to-sink distances while lightly penalizing congestion, (iii) maintaining multi-hop intra-cluster forwarding for far nodes to curb the d2d^2d2 transmit cost, and (iv) setting UAV loiter points near the CH centroid with a modest hysteresis to reduce path jitter across rounds. Before field trials, perform a sensitivity analysis on LSTM window size, RL learning rate/discount, aggregation factor, and radio parameters; then calibrate the energy model with brief on-site measurements. For robustness, log weather forecasts, sink decisions, and CH maps each round to enable post-hoc diagnosis and rapid returning. On the research side, promising directions include extending SWADS to multi-UAV coordination (joint trajectory and handover), online/federate learning of both the forecaster and the CH policy to cope with non-stationary conditions, and safe/robust RL to handle forecast errors. Incorporating wind-aware flight energy, no-fly constraints, and wireless power transfer (WPT) or UAV-enabled MEC would enable tighter energy–freshness trade-offs; exploring AoI-aware scheduling end-to-end and running ablation studies (forecast only vs. RL only vs. full SWADS) with real weather traces will clarify each module’s contribution. Finally, benchmarking against strong baselines (e.g., LEACH/HEED/PEGASIS, recent ACO/PSO/WOA-RL hybrids) under identical settings will further substantiate generality and encourage adoption.
Data availability
The data that supports the findings of this study are available from the corresponding author upon reasonable request.
Code availability
The code used in this study is available from the corresponding author upon reasonable request.
References
Majid, M. et al. Applications of wireless sensor networks and internet of things frameworks in the industry revolution 4.0: a systematic literature review. Sensors 22, 2563. https://doi.org/10.3390/s22062087 (2022).
Begum, B. A. & Nandury, S. V. Data aggregation protocols for WSN and IoT applications – a comprehensive survey. J. King Saud Univ. Comput. Inf. Sci. https://doi.org/10.1016/j.jksuci.2023.01.008 (2023).
Ojha, A. & Gupta, B. Evolving landscape of wireless sensor networks: a survey of trends, timelines, and future perspectives. Discover Appl. Sci. 7, 1–58. https://doi.org/10.1007/S42452-025-07070-6 (2025).
Priyadarshi, R. Efficient node deployment for enhancing coverage and connectivity in wireless sensor networks. Sci. Rep. 15, 1–20. https://doi.org/10.1038/s41598-025-14252-0 (2025).
Gharaei, N. & Alabdali, A. M. Secure and energy-efficient inter- and intra-cluster optimization scheme for smart cities using UAV-assisted wireless sensor networks. Sci. Rep. 15 (1), 1–16. https://doi.org/10.1038/s41598-025-88532-0 (2025).
Zhao, Q. et al. Uav trajectory optimization for maximizing the ToI-based data utility in wireless sensor networks. J. Comb. Optim. 49, 1–25. https://doi.org/10.1007/S10878-025-01286-3 (2025).
Greff, K., Srivastava, R. K., Koutnik, J., Steunebrink, B. R. & Schmidhuber, J. LSTM: a search space odyssey. IEEE Trans. Neural Netw. Learn. Syst. 28, 586. https://doi.org/10.1109/TNNLS.2016.2582924 (2017).
Sherstinsky, A. Fundamentals of recurrent neural network (RNN) and long Short-Term memory (LSTM) network. Phys. D. 404, 253. https://doi.org/10.1016/j.physd.2019.132306 (2020).
Alshingiti, Z. et al. A deep learning-based phishing detection system using CNN, LSTM, and LSTM-CNN. Electron. (Switzerl.) 12, 256. https://doi.org/10.3390/electronics12010232 (2023).
İşler, B., Kaya, Ş. M. & Kılıç, F. R. Fog-enabled machine learning approaches for weather prediction in IoT systems: a case study. Sensors 25, 4070. https://doi.org/10.3390/S25134070 (2025).
Zhang, S. & Liu, X. Improving the functionality of wireless sensor networks through the use of reinforcement learning and metaheuristic based energy efficient system. Sci. Rep. 15, 1–23. https://doi.org/10.1038/s41598-025-16128-9 (2025).
Regilan, S., Hema, L. K. & Jenitha, J. ReLeC-MEO: reinforcement learning-based clustering with multi-objective efficient optimization for energy-efficient IoT networks. Int. J. Commun. Syst. 38, e70239. https://doi.org/10.1002/DAC.70239 (2025).
Vignesh Saravanan, K., Kavipriya, S. & Vijayalakshmi, K. Enhanced mobile sink path optimization using RPP-RNN algorithm for energy efficient data acquisition in WSNs. Wireless Netw. 31, 1705–1717. https://doi.org/10.1007/S11276-024-03850-X/METRICS (2025).
D’Agostino, P., Violante, M. & Macario, G. A scalable fog computing solution for industrial predictive maintenance and customization. Electron 14, 24. https://doi.org/10.3390/ELECTRONICS14010024 (2024).
Shaikh, M. S. et al. Coverage and connectivity maximization for wireless sensor networks using improved chaotic grey Wolf optimization. Sci. Rep. 15 (1), 1–38. https://doi.org/10.1038/s41598-025-00184-2 (2025).
Xie, M., Pi, D., Xu, Y., Chen, Y. & Li, B. Path optimization algorithm for mobile sink in wireless sensor network. Expert Syst. Appl. 255, 124801. https://doi.org/10.1016/J.ESWA.2024.124801 (2024).
Seong, M., Jo, O. & Shin, K. Age of information minimization in UAV-assisted data harvesting networks by multi-agent deep reinforcement curriculum learning. Expert Syst. Appl. 255, 124379. https://doi.org/10.1016/J.ESWA.2024.124379 (2024).
Wang, H., Li, J. & Xiao, W. Reinforcement learning-based charging cluster determination algorithm for optimal charger placement in wireless rechargeable sensor networks. Ad Hoc Netw. 164, 103605. https://doi.org/10.1016/J.ADHOC.2024.103605 (2024).
Li, L. & Chen, H. Age of information optimal UAV swarm-assisted sweep coverage in wireless sensor networks. Ad Hoc Netw. 166, 103675. https://doi.org/10.1016/J.ADHOC.2024.103675 (2025).
Raju, M. R., Mothku, S. K., Somesula, M. K. & Chebrolu, S. Age and energy aware data collection scheme for urban flood monitoring in UAV-assisted wireless sensor networks. Ad Hoc Netw. 168, 103704. https://doi.org/10.1016/J.ADHOC.2024.103704 (2025).
Wang, Z., Yang, Y., Luo, X., He, D. & Sammy, C. Energy efficient clustering and routing for wireless sensor networks by applying a spider Wasp optimizer. Ad Hoc Netw. 174, 103841. https://doi.org/10.1016/J.ADHOC.2025.103841 (2025).
Yang, X., Yan, J., Wang, D., Xu, Y. & Hua, G. WOAD3QN-RP: an intelligent routing protocol in wireless sensor networks — a swarm intelligence and deep reinforcement learning based approach. Expert Syst. Appl. 246, 123089. https://doi.org/10.1016/J.ESWA.2023.123089 (2024).
Li, Y., Ding, H., Yang, Z., Li, B. & Liang, Z. Integrated trajectory optimization for UAV-enabled wireless powered MEC system with joint energy consumption and AoI minimization. Comput. Netw. 254, 110842. https://doi.org/10.1016/J.COMNET.2024.110842 (2024).
Zhan, C., Hu, H., Wang, J., Liu, Z. & Mao, S. Tradeoff between age of information and operation time for UAV sensing over multi-cell cellular networks. IEEE Trans. Mob. Comput. 23, 256. https://doi.org/10.1109/TMC.2023.3267656 (2024).
Elshewey, A. M., Abbas, S., Osman, A. M., Aldakheel, E. A. & Fouad, Y. DDoS classification of network traffic in software defined networking SDN using a hybrid convolutional and gated recurrent neural network. Sci. Rep. . 15, 1–21. https://doi.org/10.1038/s41598-025-13754-1 (2025).
Elshewey, A. M., Youssef, R. Y., El-Bakry, H. M. & Osman, A. M. Water potability classification based on hybrid stacked model and feature selection. Environ. Sci. Pollut. Res. 32, 7933–7949. https://doi.org/10.1007/S11356-025-36120-0 (2025).
Elshewey, A. M., Hassan, S. A. Z., Youssef, R. Y., El-Bakry, H. M. & Osman, A. M. Enhancing hydrogen energy consumption prediction based on stacked machine learning model with Shapley additive explanations. Process Integr. Optimiz. Sustain. 2025, 1–22. https://doi.org/10.1007/S41660-025-00539-2 (2025).
Elshewey, A. M. et al. Prediction of aerodynamic coefficients based on machine learning models. Model. Earth Syst. Environ. 11, 1–16. https://doi.org/10.1007/S40808-025-02355-6 (2025).
Elshewey, A. M. & Osman, A. M. Orthopedic disease classification based on breadth-first search algorithm. Sci. Rep. 14, 1–18. https://doi.org/10.1038/s41598-024-73559-6 (2024).
Elshewey, A. M., Osman, A. M., Youssef, R. Y., El-Bakry, H. M. & Hassan, S. A. Z. Enhancing forest fires classification using a hybrid convolutional and BiLSTM deep learning model. Model. Earth Syst. Environ. 11, 1–19. https://doi.org/10.1007/S40808-025-02569-8 (2025).
Hudda, S. & Haribabu, K. A review on WSN based resource constrained smart IoT systems. Discover. Internet Things 5, 1–46. https://doi.org/10.1007/S43926-025-00152-2 (2025).
Wang, R. et al. Rechargeable UAV trajectory optimization for real-time persistent data collection of large-scale sensor networks. IEEE Trans. Commun. https://doi.org/10.1109/TCOMM.2024.3493812 (2024).
Acknowledgements
The authors acknowledge Princess Nourah bint Abdulrahman University Researchers Supporting Project number (PNURSP2025R756), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia.
Funding
Princess Nourah bint Abdulrahman University Researchers Supporting Project Number (PNURSP2025R756), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia.
Author information
Authors and Affiliations
Contributions
Yasser Fouad provided resources, curated the data, contributed to visualization, supervision and participated in review and editing. Safia Abbas conceived and designed the study; developed the methodology; contributed to review and editing; and prepared the visualizations. Nada Ahmed designed the study; developed the methodology; contributed to review and editing; and prepared the visualizations. Asmaa N. Ghareeb conceived and designed the study; contributed to the methodology; implemented the software; performed validation and formal analysis; conducted the investigation; curated the data; wrote the original draft; conducted the investigation; reviewed and edited the manuscript. Enas Selem contributed to the methodology, performed validation and formal analysis, supervision and participated in review and editing. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Fouad, Y., Abbas, S., Ahmed, N. et al. Smart weather aware drone sink SWADS for reliable and energy efficient agricultural wireless sensor networks. Sci Rep 15, 43658 (2025). https://doi.org/10.1038/s41598-025-31821-5
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41598-025-31821-5











