Preprint
Article

This version is not peer-reviewed.

Decentralized Energy Swapping for Sustainable Wireless Sensor Networks Using Blockchain Technology

A peer-reviewed article of this preprint also exists.

Submitted:

29 November 2024

Posted:

02 December 2024

You are already at the latest version

Abstract
Wireless sensor networks deployed in energy-constrained environments face critical challenges relating to sustainability and protection. This paper introduces an innovative Blockchain-Powered Safe Energy Swapping Protocol that enables sensor nodes to voluntarily and securely trade excess energy, optimizing usage and prolonging lifespan. Unlike traditional centralized management schemes, our approach leverages blockchain technology to generate an open, immutable ledger for transactions, guaranteeing integrity, visibility, and resistance to manipulation. Employing smart contracts and a lightweight Proof-of-Stake consensus mechanism, we minimize computational and power costs, making it suitable for WSNs with limited assets. The system is built using NS3 to simulate node behavior, energy usage, and network dynamics, while Python manages the blockchain architecture, cryptographic security, and trading algorithms. Sensor nodes checked their power levels and broadcast requests when energy fell under a predefined threshold. Neighboring nodes with surplus power responded with offers, and intelligent contracts facilitated secure exchanges recorded on the Blockchain. The Proof-of-Stake-based consensus process ensured efficient and secure validation of transactions without the energy-intensive need for Proof-of-Work schemes. Our simulation results indicated that the proposed approach reduces wastage and significantly boosts network resilience by allowing nodes to remain operational longer. We observed a 20% increase in lifespan compared to traditional methods while maintaining low communication overhead and ensuring secure, temper-proof trading of energy. This solution provides a scalable, safe, and energy-efficient answer for next-generation WSNs, especially in applications like smart cities, precision agriculture, and environmental monitoring, where autonomy of energy is paramount.
Keywords: 
;  ;  ;  ;  ;  

1. Introduction

In Wireless Sensor Networks (WSNs), energy constraints have always been an intrinsic problem because the sensor nodes usually operate with finite battery power. It is because, the network works 24/7, long-term energy management must be conducted to ensure that nodes do not fail prematurely, causing a disruption in service and compromised data integrity. This issue is obviously an urgent problem, especially for applications in harsh or remote locations, such as environmental monitoring and precision agriculture, where the battery cannot be easily replaced [1]. Existing flow-based protocols for energy conservation mainly concentrate on passive redundancy, which, after a certain fraction, may have no valid data to send or receive in the network. Hence, a vast proportion of nodes switch off into sleeping mode at any position. Although there are a significant number of sections [2], research and approaches still need to be developed to effectively determine how additional capacity can benefit from renewable power sources traditionally parsing through alternative routes by either minimizing node activity reasons with active links, orchestrated recycling schemes, etc. On the other hand, promising alternatives have emerged that let nodes draw energy from surrounding sources (e.g., solar, RF signals and vibrations) owing to recent advances in energy harvesting technologies [3].
To address the diverse energy sources (solar, RF, etc.) for complementary harvesting of solar and thermal energies, they have been successfully employed to extend the life span of sensor nodes through hybrid generators that change sources based on availability [4]. In addition, the advances in piezoelectric energy harvesting have accomplished huge improvements in capturing mechanical vibrations from their environmental settings, which makes WSNs self-sufficient as they can be deployed on roadways or industrial places [5]. However, the energy management system of WSNs still needs to improve efficacies primarily due to the centralized control where these paths become susceptible to points of failure or congestion. In order to fortify grid strength and scalability, the next challenge is transitioning towards decentralized energy management. To address this using blockchain technology, Blockchain provides a decentralized and secure P2P network that aims to enable human beings to have automated operations (energy management) via intelligent contracts, which are distributed consensus [6]. The Blockchain allows for sensor nodes, in a decentralized way with no central authority involved, to trade surplus energy for that of their neighbors automatically and so uniformly distribute the generated power load across all sensor node locations [7]. This can significantly improve both the longevity of the network and provide a perpetually present capability in ubiquitous energy-limited environments [8].
Inspired by these directions, this paper introduces the Blockchain-based Secure Energy Swapping Protocol for self-sustainable WSNs that leverage energy harvesting and branch with Blockchain to formalize a secure decentralized architecture suitable for energy management in these IoT settings. This system enables nodes to automatically exchange excess energy with other neighboring ones over blockchain transactions. WSN environment is simulated using NS3.NS, modelling the node behavior together with energy consumption as healthy as network dynamics comes first, whereas Python, on the other hand, controls blockchain architecture and energy trading algorithms [9]. To reduce computational and energy burden, we employ a Proof-of-Stake (PoS) consensus algorithm, which is appropriately designed for resource-constrained WSNs. Leveraging node energy contributions to validate transactions, PoS is categorically exemplified in an energy-trading scenario that stays closer to the spirit of conservation and security than the traditional Proof-of-Work (PoW) method as it wastes a tremendous amount of power [4,5]. The addition of the Blockchain with energy-swapping protocols not only strengthens security but also enhances scalability, and it is now feasible to monitor large-scale WSN deployments in terms of managing energies [11]. In parallel, to gain nearly optimal energy statistics, we extend the system model and its design parameters with state-of-the-art solar as well as hybrid RF-solar sourced energy models in our earlier works on proposed GEN (Global Energy-aware Node), which achieves further optimization from gaining near-optimal availability and collector efficiency [15,16]. Energy trades between nodes are automatically carried out using blockchain-based intelligent contracts when certain conditions are linked to the energy levels of a node, such as the lower bound condition: When an individual or group has her/his/its battery less than some predetermined threshold [13]. This ensures self-operational all the time despite humans, which makes the system highly autonomous & scalable and does not need manual intervention. The originality of such work is mainly reflected in the seamless incorporation of Blockchain into the energy management and energy harvesting practice for WSNs, thereby providing an efficient method to ensure a trustworthy decentralized service towards sustainable sensor networks. While previous work has concentrated on the use of Blockchain in WSNs for security [14], we focus on how Blockchain can help maximize the efficient exploitation of energy resources. The scalability of the system, along with PoS efficiency, helps sensor nodes trade energy securely and autonomously for an extended network lifetime [15].
In this paper, we complement the literature by presenting a system that applies and combines blockchain technology with energy harvesting, resulting in an efficient, secure and autonomous WSN. The concept is highly scalable and can be used for applications in the domains of smart cities and environmental monitoring, among other mission-critical scenarios that require clean power autonomy [15,16,17]. Experiments have shown that this system can improve network reliability by prolonging the lifetime of nodes using efficient energy redistribution and a reliable distributed control method [19,20]. The proposed study adds a new horizon of energy swapping for sustainable WSNs.
The rest of this paper is structured in the following manner. In Section 2, we present a thorough survey of the state-of-the-art in blockchain-based energy management and WSNs with application to decentralized architecture, energy harvesting, and secure energy trading mechanisms. In Section 3, the system architecture and energy-redirection framework are introduced, followed by a description of blockchain-based smart contracts and a lightweight Proof-of-Stake (PoS) consensus mechanism enabling secure, low-power energy transactions between sensor nodes. In Section 4, specific designs of hybrid EH and energy trading mechanisms are elaborated, and solar, RF, and piezoelectric energies are incorporated with autonomous energy swapping protocols to exchange energy freely. The simulation setup and results that demonstrate the effectiveness of the proposed model regarding energy efficiency, network lifetime and scalability will be discussed in Section 5. This section also includes a comparison with existing models. Lastly, Section 6 provides conclusive remarks summarizing our findings and contributions and offering directions for future work.

1.1. Contribution

The novel contribution of the article is listed below:
  • We Introduce an innovative decentralized blockchain protocol enabling autonomous energy exchanges between sensor nodes, significantly enhancing the sustainability of wireless sensor systems through smart contracts and an efficient Proof-of-Stake verification process with mathematical approach.
  • We also proposing a hybrid energy harvesting system that brings together different renewable sources like solar, radio frequency, and piezoelectric power along with blockchain-enabled redistribution to maximize usage and extend function in resource-limited settings dynamically.
  • We observed that a 20% increase in operating time by allowing sensor devices to monitor autonomously and trade power reserves, preventing depletion and hotspots from ensuring continuous, energy-efficient performance over longer durations with proof of mathematics constraints.
  • We developed a scalable, efficient, and secure blockchain solution adapted for the emerging Internet of Things applications, including intelligent urban infrastructures involving environmental monitoring, where self-sufficiency of energy resources and tamper-proof decentralized oversight are mission critical.
The rest of this paper is structured in the following manner. In Section 2, we present a thorough survey of the state-of-the-art in blockchain-based energy management and WSNs with application to decentralized architecture, energy harvesting, and secure energy trading mechanisms. In Section 3, the system architecture and energy-redirection framework are introduced, followed by a description of blockchain-based smart contracts and a lightweight Proof-of-Stake (PoS) consensus mechanism enabling secure, low-power energy transactions between sensor nodes. In Section 4, specific designs of hybrid EH and energy trading mechanisms are elaborated, and solar, RF, and piezoelectric energies are incorporated with autonomous energy swapping protocols to exchange energy freely. The simulation setup and results that demonstrate the effectiveness of the proposed model regarding energy efficiency, network lifetime and scalability will be discussed in Section 5. This section also includes a comparison with existing models. Lastly, Section 6 provides conclusive remarks summarizing our findings and contributions and offering directions for future work.

2. Related Work

The Blockchain has been applied in Wireless Sensor Networks (WSN) with energy-efficient protocols, which have made this an active research area to overcome the limitations of a decentralized and secure environment within these networks. Many researchers have put forward solutions to enhance the performance of WSNs through blockchain-based designs, optimization algorithms, as well as energy-aware routing protocols.
Moreover, Faisal and Husnain [21] proposed a blockchain-based multi-hop routing scheme for WSNs to offer inexpensive, self-organizing distributed storage. They developed a Trust based on the Blockchain, which is precisely what we would like to achieve by extension of our network lifetime through energy trading in Blockchain. Draz et al. In [22], the abovementioned problem of hotspots in WSN was solved by introducing Energy-Aware Distributed Sink Algorithm (EADSA). Their study focuses on energy distribution between nodes, which plays a vital role in our solution protocol for blockchain-based energy swapping. Our model prolongs the lifecycle of sensor nodes and reduces communication overhead using a decentralized energy exchange. In another study, Almasabi et al. [23] introduced smart grid data secured by a blockchain for WSNs. That is why their attention has been concentrated on decentralized data se-curing, which is a positive thing for blockchain solutions in WSNs. Therefore, our work extends this scope and employs Blockchain to provide enhanced security as well as facilitate secure energy transactions among various nodes in resource-constrained settings. Rajaram et al. [24] proposed an improved energy-optimized LEACH protocol for WSNs targeted at efficient data sending. Their work is mainly in the area of data communication, though an energy-optimizing feature couples them with our protocol designed to optimize energy usage by local / regional-level decentralized resting trad-ing supported by blockchains. Draz et al. Spread in the traffic agents between WSNs IoT like system in [25] scrutinized the effects of Hotspot on IoT allowed WSNs Tidal Flex: Energy Aware Because the IoT Is Not-this work is one of the few that identifies energy depletion due to network congestion, an issue our blockchain-based sensor-to-sensor protocol addresses by redistributing energy among sensor nodes reason-ably evenly. Fu et al. [26] introduce a two-stage scale-free topology evolution model to enhance the energy efficiency and robustness of wireless sensor networks. The prior approach deploys mechanisms for clustering to reduce energy consumption, which is complementary to our work, where we ensure scalable and decentralized management of the excess energy interchange between nodes by adding Blockchain to each node. Table 1 enlisted the latest work in this domain.
The underwater music source localization work of Lilhore et al. [27] proposed an energy-efficient routing protocol for Underwater Wireless Sensor Networks (UWSNs). With their challenging edge-of-grid energy optimization focus, it is aligned with our goal to optimize energy usage in harsh environments through green and secure block-chain-based Energy Trading. In [28], Bahadur and Lakshmanan introduced a genetic algorithm approach for energy conservation in Wireless Sensor Networks. In this paper, we extend it by embedding blockchain technology, which is suitable for realizing secure energy redistribution for efficient use of power and minimizing overall power consumption with decentralized control in the network. Draz et al. a survey on energy-efficient algorithms used for routing underwater [29] were considered. Their work provides a basis for energy optimization in WSNs, which we enhance by introducing Blockchain to enable autonomous trading of energy among nodes and, therefore, prolonging the network lifetime.
Sathish Kumar et al. [30] proposed an energy-optimal technique for IoT-driven WSNs. This work draws on the results obtained in two studies to which we converged while designing our protocol: Energy-efficient communication is relevant for IoT networks, and blockchain-based decentralized energy transactions may foster long-lasting network operation by preventing unnecessary waste of resources. Han et al. Arun et al. [31] studied energy-balanced routing in WSNs using Particle Swarm Optimization (PSO) with mutation-based operators. Our solution is very close to a blockchain-enabled secure energy trading, where the optimization technique they developed optimized the balancing of the sensor nodes with relevant levels. Ali et al. Reference [32] presents the hotspot algorithm to balance energy routing in WSN with subnets. While our efforts at Mystrium focus on securing hotspots from energy depletion (by utilizing nodes to trade with each other), the work by Byteball is solely focused on solving an issue of hot spots in resolutions due to massive power consumption. Draz et al. The authors in [33] proposed a Watchman-based Data Packet Forwarding Algorithm for Underwater WSNs that focuses on the energy efficiency of data forwarding. Building atop this, our solution automates energy trading between nodes using Blockchain to achieve increased efficiency in the supply of electrical power, leading to a longer-lasting network.
The algorithm Approach used for cluster head selection in WSN is as follows. Kathiroli and Selvadurai [34] presented an energy efficiency method of improved Sparrow Search Algorithm to determine the Cluster Head Selection. This commitment to energy efficiency via intelligent selection mirrors our approach with KALI, the block-chain-based battery-swapping protocol that allows nodes on a network generating excess power (battery far from complete) and in need of external storage or refinement can then dynamically proportion/donate electricity credit to each other. Kadhim Mohammed et al. One such relevant research by Selvi et al. [35] introduced a Genetically derived Optimization Algorithm with an emphasis on pruning and validation techniques to improve the energy efficiency in WSN. Our study is complementary to the idea of energy efficiency by developing secure and block-chain-based trading among prosumers so that they can trade their surplus amount of energy, which helps to reduce overall consumption of electricity from resource-constrained networks. Senkumar et al. In [36], an improved clustering and routing algorithm has been devised for energy efficiency in WSNs. They share our focus on network resilience and power consumption. At the same time, we take a decentralized energy management approach (we use Blockchain to coordinate the redistribution of energy among nodes), which allows us to achieve non-stop operation with waste-energy mitigation.
Prakash et al. Song et al. introduced an energy-optimization route based on a combination of PSO and genetic algorithms for WSNs [37]. The work we are doing syncs with their other optimization efforts by employing block-chain technology to automate and secure energy trading, thus continuing the push for further optimal usage of energy while ensuring network security. Takale et al. In [38], they presented innovative and sustainable energy-efficient design techniques for WSNs in IoT systems. Significantly, the work they have delivered ties back to our focus on sustainability as a part of NetworkDAO, a blockchain-based protocol that guides nodes; therefore, they can fuel their operations through autonomous energy management with decentralized swapping, which eventually helps maintain network operability sustainably. Suman et al. The energy-aware routing protocol for underwater acoustic sensor networks was presented in [39], but depth is not considered. It is true that we similarly outline a protocol for managing energy in these resource-constrained environments. Still, the proposed solution uses block-chain technology to help autonomous nodes securely trade their electricity and keep themselves alive for as long as possible. Draz et al. In [40], the authors proposed a formalism in WSNs of link failure detection algorithm aimed at alleviating network failures that are attributable to energy starvation caused by battery drainage. To counteract accounts from running out of energy and whole network failures, our innovative blockchain-based swapping protocol, without the possibility to trade reserved CPU/NET, prolongs the life cycles of nodes by enabling them to ex-change over-excess resources. Draz et al. Presented an energy-efficient watchman-based flooding algorithm suitable for IoT-enabled underwater WSNs [41]. We propose a system for maintaining energy-efficient network operation by trading the available hash power, and they work on a unified approach to efficient utilization of clean data transportation spaces. Finally, Draz et al. addressed the hotspot problem in WSNs, and they proposed a watchman node solution for monitoring energy depletion. This motivates our research, where we integrate Blockchain to empower decentralized energy management, enabling each node to be an autonomous trader of energies and avoiding hotspot formation, which in turn leads towards the lifespan increase of the network. Nevertheless, in addition to their advancements in energy optimization and security for WSNs, the majority of solutions proposed so far concentrate either only on routing efficiency trade-offs or just energy conservation opportunities while disregarding decentralization [42] and Energy trading + Decentralized capable approaches such as [43,44].
However, the state-of-the-art Blockchain in WSN is only considered for protecting data and explores little energy management using the benefit of Blockchain. In our work, we plug this gap using a Blockchain-Driven Secure Energy Swapping Protocol that empowers WSN nodes to initiate energy trading independently and make full use of the surplus energy, effectively extending the network lifetime and minimizing wasted energy. Our protocol uses Blockchain for smart contracts. It adopts a lightweight Proof-of-Stake (PoS) as the consensus mechanism, rather than traditional centralized management schemes, to obtain secure, low-power energy transactions applicable in resource-constrained WSN environments. When applied to specific use cases such as smart cities, environmental monitoring and precision agriculture, this decentralized approach offers many advantages, including energy autonomy and long operating life.

3. Systematic Theoretical Analysis

The proposed framework introduces a Blockchain-Driven Secure Energy Swapping Protocol to address critical challenges in energy management for WSNs. Unlike traditional centralized approaches, the protocol leverages blockchain technology to enable decentralized, tamper-proof energy trading among sensor nodes. This ensures secure and efficient energy redistribution, enhancing the sustainability and resilience of WSNs. The framework integrates a lightweight Proof-of-Stake (PoS) consensus mechanism, tailored specifically for resource-constrained environments, to validate energy transactions. This approach significantly reduces computational, and energy overhead compared to traditional consensus mechanisms like Proof-of-Work (PoW). A key theoretical component of the framework is the mathematical modeling of energy dynamics within the WSN. Energy consumption at each node is represented as a function of its activities, including communication, sensing, and processing.
Further, mathematical framework for modelling presents the energy management and blockchain-based energy trading mechanism in WSNs. It consists of multiple equations for energy consumption, harvesting, trading, and validation, ensuring a mathematically rigorous representation.

3.1. Energy Consumption Model

The energy consumption C i t   of node I at time t is composed of three primary activities: communication, sensing, and processing. The total energy consumption is calculated as in Equation (1).
C i t = β i P c o m m + γ i   P s e n s i n g + δ i   P p r o c e s s i n g
Where:
β i ,   γ i ,   δ i   are scaling coefficients for energy consumption.
P c o m m ,   P S e n s i n g ,   and   P p r o c e s s i n g are power consumption values for communication, sensing, and processing.
The overall energy consumption across all nodes in the network C t o t a l t   can be written as in Equation (2)
C t o t a l t = i = 1 N C i t

3.2. Energy Harvesting Model

Nodes harvest energy from renewable sources, specifically solar and radio frequency (RF). The energy harvested H i t   by node i at time t is given in Equation (3).
H i t = η i P s o l a r t + K i P R F t
Where
η i ,   K i   are the conversion efficiencies of the energy sources.
P s o l a r t   and P R F t   are the power inputs from the solar and RF energy sources, respectively.
The net harvested energy across all nodes is given in Equation (4).
H t o t a l t = i = 1 N H i t

3.3. Energy Update for Nodes

The energy level of each node is updated based on its previous energy, consumption, and harvesting. The energy at node i at time t+1 is computed as in Equation (5).
E i t + 1 = E i t + H i t C i t
For all nodes in the network, this can be written as in Equation (6).
E i t + 1 = E t + H i t C t
Where E t ,   H i t ,   a n d   C t   are vectors representing the energy levels, harvested energy, and energy consumption for all nodes at time t.

3.4. Energy Deficit and Surplus

The energy deficit D i t for node i at time t occurs when the energy level falls below a threshold E t h r e s h o l d   as presented in Equation (7).
D i t = E t h r e s h o l d E i t i f   E i t < E t h r e s h o l d
The surplus S j t   for node j is given by in Equation (8).
S j t = E j t E m i n   i f   E j t > E m i n

3.5. Energy Swapping Between Nodes

The energy exchanged between node j (surplus) and node I (deficit) is denoted by Δ E i j t is determined by the minimum of the surplus and deficit as in Equation (9).
Δ E i j t = min S j t , D i t
The   energy   levels   after   the   exchange   are   updated   as   follows   as   in   Equation   10   and   11 .
E i t + 1 = E i t + Δ E i j t
E j t + 1 = E j t Δ E i j t
The total energy exchanged across all pairs of nodes is in Equation (12).
Δ E t o t a l t = i , j Δ E i , j t

3.6. Blockchain-Based Energy Trading

The energy trading between nodes is secured using blockchain technology. The transaction T i , j t is valid if the energy transfer conditions are met in Equation (13).
E j t Δ E i , j t E m i n   and   E i t + Δ E i , j t   E t h r e s h o l d  
If the conditions hold, the intelligent contract facilitates the energy exchange. The transaction is recorded as in Equation (14).
T i , j t {   Δ E i , j t ,   from   node   j   to   node   i }

3.7. Validator Selection in Proof-of-Stake (PoS)

Validators for the transaction are selected based on their energy stakes. The probability   P j   of selecting validator j is proportional to the energy stake E j t as given in Equation (15).
P j = E j t k = 1 V E k t
Where V is the total number of validators.

3.8. Transaction Validation and Block Formation

The selected validators validate the energy transaction by ensuring the transaction conditions hold. If valid, the block is confirmed and added to the Blockchain. The time complexity for this operation is O(V).

3.9. Energy Flow Continuity

The energy balance equation ensures that the total energy in the system is conserved after each transaction as given in Equation (16).
i = 1 N E i t + 1 = i = 1 N E i t

3.10. Energy Depletion Function

To model the natural energy depletion over time, we use an exponential decay model as in Equation (17)
E i t = E i t 1 .   e λ t
E i t : The remaining energy of node i at time t.
E i t 1 . : The energy of node i at the previous time step t−1.
λ: The energy depletion rate, a constant that depends on the node's activity, environmental conditions, and system dynamics.
t: The elapsed time.
e: The base of the natural logarithm, representing exponential decay.

3.11. Time Complexity of Algorithms

The overall time complexity for the energy trading algorithm can be decomposed into different components:
Energy Update: O(N). This step involves updating the energy levels of ‘N‘nodes in the network. Each node’s energy level is recalculated, often using an exponential decay model or similar function, based on its activity and energy usage. The complexity Reasoning of each node is updated once per iteration, the operation is linear with respect to the number of nodes N. Thus, the time complexity is O(N).
Deficit and Surplus Calculation: O(N): Each node calculates whether it has a surplus of energy (available for trading) or a deficit (requires energy). This is done by comparing the current energy level to predefined thresholds. The Complexity Reasoning calculation requires iterating through all NNN nodes once, making the complexity for this step also O(N).
Energy Trading: O( N 2 ) , The Energy trading involves matching surplus nodes with deficit nodes. In the worst case, every node with surplus energy needs to be compared with every node that has a deficit to determine the optimal trading pairs. The Complexity Reasoning requires a pairwise comparison of surplus and deficit nodes. If there are NNN nodes in total, the worst-case complexity for pairwise matching is O( N 2 ) .
PoS Validation: O(V), After energy trading, the system validates transactions using a Proof of Stake mechanism. The number of validators V depends on the network’s configuration and may be independent of the number of nodes N.
The complexity reasoning PoS validation involves V validators performing computational work to confirm transactions, the complexity of this step is O(V).
Thus, the total time complexity is O( N 2 ) +V). The total time complexity of the algorithm is the sum of the complexities of its components: Ttotal = O(N)+O(N)+ O( N 2 ) +O(V). Since O( N 2 ) dominates O(N), the total time complexity simplifies to: Ttotal = (O( N 2 +V)

3.12. Energy Balance

The final energy balance equation after all transactions is presented as in Equation (18).
i = 1 N E i t + 1 = i = 1 N E i t + H t o t a l t C t o t a l t  

4. Dataset Description and Preprocessing

In this research, we used a Wireless Sensor Network Data Set from Kaggle, which contains the results of a series of experiments carried out on a wireless sensor network. A dataset containing relevant input parameters includes temperature, humidity, light intensity, and essential voltage levels representing the battery status of individual nodes. These voltage values enable us to model the energy consumption pattern all over the network so that we can simulate our blockchain-driven energy-swapping protocol. Using smart contracts and a Proof-of-Stake (PoS) consensus algorithm, sensor nodes will be able to autonomously trade their excess energy while still guaranteeing the sustainability of the network. Time-series data in this dataset allows for the study of behavior changes over time as such, it is ideal for our research works on energy consumption trends prediction and distributed engineer sources application to reducer sensor nodes. We have found a level of affinity with the natural world by simulating how changes in environmental attributes such as temperature and humidity affect node energy usage. This feature is incredibly profitable to the WSNs being used in other environments like smart cities and agriculture, where environmental influence over node performance will be considerably high. The integration of this dataset has led us to a way to simulate blockchain-based energy redistribution and assess its ability to prolong the network lifetime, prevent energy waste, and, in general, create more reliable, die-and-forget WSNs. This data-centric method permits us to confirm our designed solution in artificial and real-world environment scenarios alike by showing results. The link of the date set is available at https://www.kaggle.com/datasets/halimedogan/wireless-sensor-network-data/code.

4.1. Mathematical Framework for Data Preprocessing

Data preprocessing is a crucial step in implementing the Blockchain-Driven Secure Energy Swapping Protocol for Wireless Sensor Networks (WSNs). This section outlines the mathematical formulations for standardizing, normalizing, and preparing the data required for energy status prediction and blockchain-based energy trading.

4.2. Data Normalization

To ensure the input features (e.g., energy levels, harvested energy, and energy consumption) are on the same scale, normalization is applied. Each feature x i is scaled to the range 0 , 1 using the formula mentioned in Equation (19):
x i norm   = x i x min x max x min
where:
  • x i : Original value of the feature.
  • x min : Minimum value of the feature in the dataset.
  • x max : Maximum value of the feature in the dataset.

4.3. Outlier Detection and Removal

To identify and remove outliers in energy readings, the interquartile range (IQR) method is applied BY Equation (20):
IQR = Q 3 Q 1
Lower Bound = Q 1 1.5 IQR ,   Upper Bound = Q 3 + 1.5 IQR ,where Q 1 and Q 3 are the first and third quartiles, respectively. Any value x i outside the bounds [Lower Bound, Upper Bound] is considered an outlier and is removed.

4.4. Feature Engineering

To enhance the model's understanding, additional features are derived:
Energy Utilization Rate can be computed from Equation (21):
U i = C i t E i t
where U i is the energy utilization rate for node i , C i t is the energy consumption, and E i t is the current energy level and energy harvesting efficiency is computed from Equation (22):
η i eff   = H i t P max
where η i eff   is the efficiency of energy harvesting for node i , H i t is the harvested energy, and P max   is the maximum energy harvesting capacity.

4.5. Time-Series Smoothing

To reduce noise in time-series data (e.g., energy levels over time), a moving average filter is applied with the help of Equation (23):
E i smooth   t = 1 k = 0 w 1 E i t k
  • E i smooth   t : Smoothed energy level for node i at time t .
  • w : Window size for the moving average.

4.6. Data Transformation for Energy Prediction

The energy data is prepared for input into the LSTM-based prediction model by creating sequences of fixed length L can be computed from Equation (24):
X n = E i t , E i t 1 , , E i t L + 1 y n = E i t + 1                                                                                                                
where X n is the input sequence, and y n is the target energy value.

4.7. Scaling for Blockchain Transactions

To ensure uniform transaction sizes in the blockchain, energy values are scaled to a fixed range a , b using min-max scaling by Equation (25):
E i scaled   = a + E i x min b a x max x min
where a and b are the desired range limits.

5. Proposed Model

In this paper, we introduce a system of Blockchain-Driven Secure Energy Swapping in Self-Sustaining WSN (Sec-ESSWSN) that targets the optimal usage of energy between sensor nodes deployed in different types of environments. It is composed of multiple sensor nodes with environmental sensors and energy measurement units that monitor the battery status. These nodes are capable of processing and harvesting energy from renewable sources such as solar or RF; the multi-hop communication model makes this type of network resilient and sustainable in energy-constrained environments. Central to this architecture is a blockchain network that will allow secure, decentralized management of energy. All nodes are linked to the Blockchain so secure energy trading transactions can be executed. In order to mitigate the computation and energy overhead, the Blockchain utilizes a PoS (Proof-of-Stake), which is a very lightweight consensus algorithm. This guarantees an easy way to validate transactions with the least amount of energy required, which is a crucial property for sensors that work in resource-limited environments. These smart contracts running on the Blockchain manage the logic of energy trading between participants by allowing energy exchanges to happen only when certain conditions are met, which are set in advance, such as the fall of a node's energy level below an established limit. Using this energy-swapping protocol, the sensor nodes can trade surplus energy with neighboring nodes autonomously. All nodes monitor their voltage levels to measure energy consumption. If the energy of a particular node falls below the threshold value set in advance, it will send an energy request to the blockchain network. Then, using this request available in the ledger for other requesting devices within neighborhood nodes with surplus energy, they will respond to this messaging and execute a smart contract (via ERC). Then does secure energy trading. It only processes valid transactions with the smart contract (the node requesting a transaction must have an energy level below critical, and the node offering its surplus energy must have enough). After the transaction is confirmed by the PoS consensus mechanism, energy moves, and the transaction is registered in the Blockchain. This protocol for swapping green energy is decentralized and automated, which automates many of the decision-making processes at the node level to minimize communication overhead through Blockchain.
Intelligent contracts play a vital role in this energy-swapping process because they will define the terms of energy exchange between nodes. Smart contracts are programmed to check if the energy level of the requesting node is below the set threshold and ensure that the offering node has enough surplus energy for this trade to be possible. Only then will efficient, valid, and safe transactions be made. More importantly, it automatically negotiates prices and conducts energy trading via intelligent contracts instead of through tedious intricacies at the node level, thereby increasing overall system efficiency. It records all the transactions on the Blockchain and thus ensures transparency, tamper-proof security, and traceability, which are necessary characteristics of a decentralized energy management system.
To optimize the energy utilized at a global level in the WSN, we additionally apply an energy awareness model together with the Blockchain. It considers multiple aspects, including each node's energy harvesting efficiency, individual energy consumption profiles incurred by the nodes' sensing and communication actions, as well as the total load balancing throughout the network. For energy trading, surplus energy is evenly spread out based on nodes with a higher ability to harvest energy (i.e. receiving more solar or RF energy). This model tuned the energy trading rules dynamically based on continuous real-time data from sensor nodes to increase the network lifetime and efficiency. This leads to an energy equilibrium among the nodes in the network, where no node uses up all its energy while another has a surplus of it, therefore prolonging the life cycle of the network.
Figure 1 presents the energy swapping process in a blockchain-based WSN with LSTM for energy status prediction. An energy request from a WSN node triggers the blockchain-based energy trading protocol. The energy status of the node is predicted by LSTM, which indicates whether the energy level is lower than the threshold or not. If it is, the smart contract is triggered and validation on blockchain begins to broker the energy exchange. Energy requests are investigated, and appropriate energy nodes are selected for possible transfers. It checks to make sure the transaction complies with energy trading rules through sanction from the blockchain. The transaction is then verified, and if it passes validation, the energy is exchanged with the help of blockchain immutability. The request is rejected if it is not valid. Abstract This strong, decentralized and predictive process supports reasonable energy management over the WSN. It provides a demonstration on how using such sustainable ingredients blockchain, LSTM, and WSN technologies can be used to scale energy trading through low latency transactions of secure energy.
To validate the proposed methodology, we simulate the WSN scenario via NS3, which models sensor nodes' behavior in terms of energy consumption, harvesting and swapping activities. Developed in Python, the blockchain architecture executes on top of a PoS consensus mechanism whilst enabling intelligent contract logic. Using these simulations, we compare the performance of the system with conventional centralized energy management schemes to evaluate its performance. We consider the system with respect to four key performance indicators: network lifetime (when will the first node consume all its energy), energy wastage (how much surplus energy is left unutilized in an area), communication overhead (the additional bandwidth consumption of nodes to manage their energy trades through Blockchain) and latency (the time taken for a particular trade from requesting until fulfilling it). Simulation results show that the proposed energy-swapping protocol based on the Blockchain can eliminate energy wastage more effectively and prolong the whole network lifetime, with nodes being able to operate by redistributing excess energies. The proposed system based on Blockchain provides more sustainability, scalability and security to wireless sensor networks. The implementation of Blockchain for energy trading removes the single point of failure in systems based on centralized management, thus providing a tamper-proof, transparent and decentralized approach to energy management in WSNs. The Proof-of-Stake consensus mechanism keeps the entire system lightweight and low energy to facilitate operation in energy-limited environments like smart cities, environmental monitoring and even agriculture. Thus, merging Blockchain, smart contracts, and real-time energy monitoring is a viable approach to tackle the problems of energy management in future WSNs. Algorithm 1 describes a way of keeping track of the energy levels in a Wireless Sensor Network (WSN) and assesses any energy deficits developed with time. First, the energy level for each sensor node is initialized at a specific initial value. The energy level for each node is updated over time by subtracting the amount of energy used and adding the amount of harvested energy from renewable sources such as solar and RF. Our energy model consists of the three main functions performed by each node (communication, sensing, and processing), all contributing towards energy consumption with different weightings. Similarly, the harvested energy model estimates the amount of energy obtained from ambient sources and considers the efficiency of converting solar [12] or RF signals to usable energy.
This algorithm is also able to detect if the energy level of that node reaches below a certain predefined threshold. When this occurs, the algorithm determines how many joules of energy are missing and transmits an energy request to neighboring nodes. It also simulates the temporal evolution of energy, representing how energy decreases as it is used for different tasks. Finally, this algorithm will make sure that the energy balance between all nodes in the network is balanced and that they do not run out of energy while there are some excess energies remaining on the other nodes. This certainly helps to keep the network sustainable as it protects individual nodes from crashing due to energy depletion, therefore safely operating the entire network.
Preprints 141294 i001
Algorithm 2 describes the steps of implementing secure energy trading among sensor nodes in a WSN using blockchain smart contracts. The work starts by calculating the surplus energy of each node whose residual energy is over a certain minimum. Any difference is treated as a deficit for the low-energy nodes. Once the energy excess and demand level have been calculated, the function of an Energy Exchange specifies how much energy can be reduced or transferred between nodes given the available surplus, if any, the amount of missing load you need to fulfil. It creates a smart contract to announce the quantity of energy that is transferred from one node to another. The contract is secured by verifying that the transferring node will not run out of energy and receive a portion of it, like making sure the receiving agent never surpasses its limit. As long as these requirements are met, then the energy transfer is pronounced. Furthermore, validators verifying the correctness of an intelligent contract get paid per Jules. To keep the energy flow regulated, all flows of tying and untying through every network must be cancelled out. When the shortage of a node is made up for, the smart contract terminates and reports back to the ledger so that it may record all transactions therein.
Preprints 141294 i002
Algorithm 3 specifies the procedure to validate energy transactions in a PoS-based blockchain. It aims for energy transactions between nodes to be secured, validated, and recorded on the blockchain ledger. It works by first calculating the probabilities of validators to be selected, which are determined by their energy stakes. Based on these probabilities, validators are chosen to validate the energy transaction block. Every validator validates if the transaction satisfies the conditions (that the sender node should have enough energy after this transaction and the receiver node should not exceed the maximum limit). For each validator, the validation function decides whether the transaction is valid or not. It updates the energy levels of both sender and receiver nodes to see if it's valid. When all validators approve of the transaction, block confirmation happens, and rewards are distributed to validators who accrue at stake and validation efforts. The global energy balance across nodes is preserved, which creates stability in the system. The transaction is then written into the blockchain ledger, and the verification process ends when all transactions in a block are validated.
Preprints 141294 i003
Table 2 incorporates diverse WSN-specific metrics, including the number of sensor nodes, their preliminary energy levels, energy consumed for communication, sensing, and processing, as well as energy harvesting rates from solar and RF sources. These variables dictate the energy dynamics within the network, which are managed utilizing blockchain-dependent energy swapping. The blockchain settings, such as the consensus algorithm (Proof of Stake) and transaction fees, are pivotal to ensuring protected and low-latency energy exchanges. Additionally, the long short-term memory neural network has been optimized to anticipate node energy usage, assisting in averting node failure by forecasting energy necessities dependent on historical information. In closing, the integration strategy refines the system for optimal energy administration across the network, with specified fitness function weights and a convergence threshold. The intricate interdependencies between these disparate yet interrelated components are managed utilizing novel machine learning algorithms and blockchain technologies to maximize overall energy effectiveness and network lifespan.

6. Results and Discussion

Figure 2 shows the communication overhead under different energy management protocols for increased network sizes. The communication overhead of BDSES-WSN is always low. It stays nearly constant, with the number of nodes increasing, as it displays excellent scalability in large networks due to the blockchain-based energy swapping mechanism, EHCTP, and GEMP. They do not suffer from higher overhead due to their energy harvesting & management, but it merely reflects an amplification in communication that is now required. EEHC also performs moderate, more balanced communication overhead between EHCTP and GEMP but still needs to be better than BDSES-WSN. This shows that the decentralized nature and a tiny bit of energy-efficient structure of BDSES-WSN protocol have more scalability as well as less communication overhead; they are good choices for more extensive or even dynamic wireless sensor networks. The results show the potential of BDSES-WSN in improving energy efficiency, reducing communication costs, and extending network lifetimes, which is essential for widespread WSN deployment.
Figure 3 depicts the quantitative analysis of network lifetime in diverse energy management protocols as to how the number decreases with offset. The approach BDSES-WSN (Blockchain-based Data consign energy Swapping protocol) can achieve a more significant number of active nodes for a more extended period in comparison to EHCTP, EEHC and GEMP protocols. This graph shows unambiguously that our blockchain-based energy trading method prolongs the life of the grid and delays nodes running out due to other techniques. Even though all the methods have a typical decreasing pattern, BDSES-WSN exhibits much lower values, which indicates that it is suitable for energy conservation and maximal node life. It suggests that decentralized energy management based on Blockchain can improve wireless sensor network lifetime and is ideal for a long life cycle and all-energy node deployment in WSN.
Figure 4 presents a comparative performance analysis based on energy wastage over time amongst various energy management protocols, including BDSES-WSN (Blockchain-Based Energy Swapping), EHCTP (Energy Harvesting & Cooperative Transmission), EEHC (Energy-Efficient Hierarchical Clustering) and GEMP (Game-Theoretic Energy Management Protocol). The results indicate that the portion of energy wastage is always much lower in BDSES-WSN than in other approaches, which means that the performance of BDSES-WSN is better than the others. Over time, the blockchain-centred method continues to effectively minimize energy waste past a certain point of inefficient reduction and maintains this lower level of wastage in the long term. Although all approaches are converging to lower energy disposal over time, BDSES-WSN is still the best one at conserving energy during the network lifetime. This performance disparity holds significant importance in cases where energy efficiency directly correlates with the lifespan and sustainability of the network, making BDSES-WSN the most efficient approach to managing energy depletion in WSNs.
Figure 5 shows the comparison of transaction latency against network size for the four energy management protocols, BDSES-WSN (Blockchain-Based Energy Swapping), EHCTP (Energy Harvesting & Cooperative Transmission), EEHC (Energy-Efficient Hierarchical Clustering) and GEMP (Game-Theoretic Energy Management Protocol). The transaction latency increases for all protocols as the number of nodes scales but at different rates. The BDSES-WSN protocol has the lowest latency as compared to all network sizes, which indicates the minimum delay of the other protocols for more extensive networks. While EHCTP has the worst transaction latency, this suggests that in more extensive networks, there may be a tradeoff in energy vs. speed (i.e., if you gain more energy efficiency doing X, it takes longer). Both the protocols EEHC and GEMP punishment provide intermediate latency, while GEMP has been found to be slightly better than EEHC. In summary, the comparison evidence shows that BDSES-WSN has better transaction speed when network size increases.
Figure 6 shows the changing percentage of energy efficiency (%) for four approaches to manage the energy of a WSN over time. The influence of energy reuse and management is expressed through the steep rise in energy efficiency indicated by Approach 1, which approaches nearly 90% after approximately 80 hours, compared to that of other strategies. The second method, which combines cooperative transmission and energy harvesting, achieves a moderately high level of efficiency as its performance remains around 85%. Hence, it absorbs energy from the environment correctly but does not utilize the energy as effectively as the first approach. The other two methods of clustering and game-theoretic energy management show a lower overall efficiency, staying below 80%. In the first few hours, the clustering strategy is less energy-efficient, converging around 75%, which shows a trade-off between communication overhead and node energy availability. In the same way, the game-theoretic approach is more efficient compared to random walk, but its efficiency trend plateaus faster — validating that strategic decision-making in energy usage could be cost-efficient but not as aggressive as energy-swapping mechanisms. This evaluation shows that intricate management mechanisms could gain higher efficiency but would lengthen stabilization times. In contrast, simple energy price control strategies yield faster benefits at a sacrifice of long-term effectiveness.
Figure 7 illustrates how the blockchain transaction list maintains security, showing the increasing number of secure versus tamper transactions as total transactions increase. The X-axis represents transaction counts, and the Y-axis consists of incident contexts for what is observed. The green line, which means secure transactions and grows in a straight line based on the number of transactions performed, proves that Blockchain guarantees secure transactions regardless of transaction volume. In contrast, the red line shows the amount of tampered transactions; this also lies flat at zero across the whole range, indicating that no tampered transactions have been recorded. This demarcation line in secure and tampered transactions is a testament to the power of Blockchain, where transaction manipulation cannot occur, thereby retaining security even through transaction throughput scale.
Figure 8 demonstrates a fundamental contrast between the energy efficiency of two primary blockchain agreement systems, Proof-of-Work (PoW) and Proof-of-Stake (PoS). PoW is computationally taxing because it necessitates miners to solve intricate cryptographic puzzles to validate transactions and safeguard the network. This process demands substantial computational assets, resulting in massive energy utilization. The illustration shows this by demonstrating PoW using nearly 80 watts of power. Alternatively, PoS employs a less resource-intensive approach, whereby validators are chosen depending on the number of coins they hold and are willing to "stake" as a warranty. This decreases the need for extensive computational work, as the graph displays, where PoS utilizes about 65 watts. The gap in energy intake underscores the scalability and sustainability issues with PoW, specifically as the blockchain scales. In contrast, PoS offers an eco-friendlier and more scalable substitute without compromising on system security or decentralization.Thus, the graph not only compares energy intake quantitatively but also highlights the innate variations in computational prerequisites between the two systems, reflecting the broader implications of their design philosophies on environmental effects and sustainability.
Figure 9 sheds light on the energy distribution in a system before and after energy trading occurred. The Y-axis denotes the energy level in quantitative units, while the X-axis differentiates between the two states of beforehand and afterwards. The shape of the violin plots mirrors the density distribution of energy levels across the network. Initially, the broader green violin plot underscores the heightened variability in energy levels throughout the system prior to trading. Some nodes possessed a surplus of energy, while others were significantly energy-deficient, contributing to inefficiencies in energy usage. The broad spread indicates a less optimized condition where energy apportionment was uneven, with specific nodes approaching maximum capacity and others functioning at much lower levels. Contrastingly, the slimmer and more centred orange violin plot demonstrates a more balanced distribution of energy levels subsequent to trading. Compared to the "Before Trading" state, this suggests that energy trading effectively optimized the distribution, guiding to more uniform energy levels across nodes. The concentration of energy values around the median highlights how trading equalized the energy resources, reducing discrepancies and improving overall energy efficiency in the system.
Figure 10 shows the actual V/S predicted energy consumption using the LSTM (Long Short-Term Memory) time-series learning model. Recorded energy consumption (blue line) has periodic peaks and troughs over time. The predicted energy consumption data is shown with red crosses, and it can be seen that the LSTM model closely follows the actual data. The two lines show a high degree of overlap, which indicates the accuracy of the LSTM model in predicting energy consumption based on historical sequences. This suggests that the model has incorporated the temporality of the energy consumption pattern, making it a good candidate for forecasting future energy demand. The model needs to be accurate since it would be implemented in energy management systems that take into consideration every minute optimization of the distribution of energy, reducing the amount of wasted output and improving resource allocation.
Figure 11 presents a scatter plot that compares node lifetime under different temperature (°C) and humidity (%) environmental conditions for the energy swapping method, BDSES-WSN(Blockchain-Based Energy Swapping) when used with traditional without energy redistribution. The X-axis is the temperature in Celsius, and the Y-axis is the humidity. The node lifetime colour bar on the right-hand side ranges from 700 to 850 hours for BDSES-WSN. These green-circled points represent the BDSES-WSN (energy swapping) method, while these red-circled points are for traditional without energy swaps. Energy-swapping nodes outperform normal nodes under a wide range of environmental conditions in terms of lifetime. This colour gradient also emphasizes that BDSES-WSN-based nodes tend to last longer (around 850 or so hours), even in-homogeneous environmental attributes, e.g., high humidity and temperature differences. At the same time, the conventional method yields relatively lesser node lifetimes. This graph showed that energy-swapping methods can help improve the resilience and lifespan of nodes in WSNs (Wireless Sensor Networks), allowing them to work effectively over a more comprehensive set of environmental situations — without the necessity for usual approaches.
Figure 12 shows a comparison of energy usage vs. harvested over 80 minutes in real-time. The blue line illustrates the amount of energy wasted in the network. The green dashed line shows how much renewable resources like absorption, transmission solar absorbed, and scattered recovered by nodes with RF power. For a short time, the amount of harvested energy exceeds that which is used, maintaining an (albeit slightly) positive balance. Nonetheless, over time, both curves fluctuate; this reflects dynamic changes in the energy usage vs. harvesting adjustments. An illustration of the intermittent nature of alternating blanks between the two lines shows that a real-time energy management system adeptly responds to shifting conditions. This indicates that the management of energy through blockchain-enabled frameworks like an energy-swapping model provides optimal utilization and retention capacity, thus reducing any deficits in power at a network level.

6. Conclusions

In this work, we proposed a new generation secure energy-swapping protocol for self-sustainable wireless sensor networks in the Blockchain. To the best of our knowledge, we are, for the first time, presenting a practical approach being taken on energy management for decentralized WSNs, and a green blockchain-based service system has been proposed in this work utilizing distributed ledger technology and Proof-of-Stake (PoS) consensus mechanism compatible with traditional power trading market between nodes. Our work demonstrates an order of magnitude improvement in network lifetime, with a 20% longer overall lifespan compared to conventional energy management techniques. In addition, the system reduces wasted energy by optimizing the redistributing of available power so that nodes with extra energy help keep others stable. By taking advantage of low-latency, secure transactions with lightweight, intelligent contracts, the system maintains high scalability for more extensive networks with minimum communication overhead. Our blockchain technology is an ideal candidate for secure mission-critical applications in the area of smart cities, environmental monitoring or further tenancy, and precision agriculture that requires reliable energy autonomy with security. Finally, the WSN will be more sustainable when combined with renewable energy harvesting techniques to enable longer-term operation without human intervention. Further research could examine the validity of this protocol under more varied environmental conditions and employ advanced machine learning algorithms to predict dynamic energy constraints or optimize.

Author Contributions

Conceptualization was carried out by U.D. and T.A., with U.D. leading the methodology. Software development was handled by S.Y., while validation was performed by T.A., M.A., and S.Y. Formal analysis was conducted by T.A. and M.H., and the investigation was led by M.A. Resources were provided by EL-MH, and data curation was managed by M.H. The original draft was prepared by U.D., with M.A. contributing to the review and editing process. Visualization was overseen by M.H., with supervision provided by EL-MH. Project administration was managed by M.A., and funding acquisition was secured by EL-MH. All authors have read and approved the final version of the manuscript

Data Availability Statement

The data, models, or codes that support the findings of this study are available from the corresponding author upon request.

Acknowledgments

This work is supported by a research grant from the Research, Development, and Innovation Authority (RDIA), Saudi Arabia, grant no.13010-Tabuk-2023-UT-R-3-1-SE.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Alshmeel, G.H.A., Al-Doori, A.S.B., Ahmed, S.R., Ibrahim, Z.A., Ghaffoori, A.J., & Hussain, A.S.T. (2024, May). Self-Sustaining Buoy System: Harnessing Water Wave Energy for Smart, Wireless Sensing and Data Transmission. In Proceedings of the Cognitive Models and Artificial Intelligence Conference (pp. 349–356).
  2. Ismail, S.; Dawoud, D.W.; Reza, H. Securing wireless sensor networks using machine learning and Blockchain: A review. Future Internet 2023, 15, 200. [Google Scholar] [CrossRef]
  3. Dipon, W.H. (2023). Self-Sustaining Multi-Sensing and Wireless Communication System Powered by Efficient Energy Harvesting from Road Traffic and Heat (Doctoral dissertation, The University of Texas at San Antonio).
  4. Arachchige, K.G.; Branch, P.; But, J. Evaluation of Correlation between Temperature of IoT Microcontroller Devices and Blockchain Energy Consumption in Wireless Sensor Networks. Sensors 2023, 23, 6265. [Google Scholar] [CrossRef] [PubMed]
  5. Qaragoez, Y., Pollin, S., & Schreurs, D. (2024, June). Integrated Dual-Mode Energy Harvesting for Self-Sustaining Sensor Nodes: Synergy of Solar and RF Energies. In 2024 IEEE/MTT-S International Microwave Symposium-IMS 2024 (pp. 273–276). IEEE.
  6. Huang, X.; Zhao, W.; Yuan, M.; Sun, K.; Yang, B. A self-sustaining wireless sensing and flight control device for beetles. AIP Advances 2024, 14. [Google Scholar] [CrossRef]
  7. Sivasankar, C., Subramanian, E.K., Sarala, V., Moorthy, A., & Purushothaman, N. (2024, July). Optimizing Power Consumption in Wireless Sensor Networks for Prolonged Sustainability. In 2024 Second International Conference on Advances in Information Technology (ICAIT) (Vol. 1, pp. 1–4). IEEE.
  8. Ravikumar, C.V., Sathish, K., & Su, C. (2024, October). Design and Analysis of Piezoelectric Energy Harvester for Wireless Sensor Networks. In International Conference on Data Security and Privacy Protection (pp. 239–254). Singapore: Springer Nature Singapore.
  9. Paulraj, D., Lavanya, R., Jayasudha, T., Niranjana, M.I., Daniya, T., & Shadrach, F.D. (2023, February). Blockchain-based wireless sensor network security through authentication and cluster head selection. In 2023 IEEE International Conference on Integrated Circuits and Communication Systems (ICICACS) (pp. 1–5). IEEE.
  10. Draz, U., Ali, T., Yasin, S., Naseer, N., & Waqas, U. (2018, February). A parametric performance evaluation of SMDBRP and AEDGRP routing protocols in an underwater wireless sensor network for data transmission. In 2018 international conference on advancements in computational sciences (ICACS) (pp. 1–8). IEEE.
  11. Zhou, X.; Huang, Z.; Xiao, K. Remote radio frequency unit selection of self-sustaining distributed base-station system based on downlink physical layer secure transmission. Wireless Networks 2024, 1–13. [Google Scholar] [CrossRef]
  12. Hussain, M.N.; Kader, K.A.; Ali, M.S.; Ullah, A.; Al Dodaev, Z. An Extensive Analysis of the Significance and Difficulties of Microgrids Based on Renewable Energy in Wireless Sensor Networks. Control Systems and Optimization Letters 2024, 2, 178–183. [Google Scholar] [CrossRef]
  13. Bentivogli, A.; Polonelli, T.; Magno, M.; Comai, G. (2023). Check for Enabling Predictive Maintenance on Electric Motors Through a Self-sustainable Wireless Sensor Node. Applications in Electronics Pervading Industry, Environment and Society: APPLE PIES 2022, 1036, 3.
  14. Ning, T.; Lin, C.; Cai, G.; Xie, K.; He, J.; Huang, C.; Debbah, M.R. Energy Buffer-Aided Wireless-Powered Relaying System for Self-Sustainable Implant WBAN. IEEE Open Journal of the Communications Society 2024. [Google Scholar] [CrossRef]
  15. Mayer, P.; Magno, M.; Benini, L. Self-sustaining ultrawideband positioning system for event-driven indoor localization. IEEE Internet of Things Journal 2023, 11, 1272–1284. [Google Scholar] [CrossRef]
  16. Shokoor, F.; Shafik, W. Harvesting energy overview for sustainable wireless sensor networks. Journal of Smart Cities and Society 2023. [Google Scholar] [CrossRef]
  17. Srividya, P. Self-Powered Wireless Sensor Networks in Cyber-Physical System. Self-Powered Cyber-Physical Systems, 2023; 41–56. [Google Scholar]
  18. Khan, Z.A.; Amjad, S.; Ahmed, F.; Almasoud, A.M.; Imran, M.; Javaid, N. A blockchain-based deep-learning-driven architecture for quality routing in wireless sensor networks. IEEE Access 2023, 11, 31036–31051. [Google Scholar] [CrossRef]
  19. Diener, M.; Orman, A. Bbap-win: a new blockchain-based authentication protocol for wireless sensor networks. Applied Sciences 2023, 13, 1526. [Google Scholar] [CrossRef]
  20. Faisal, M.; Husnain, G. Blockchain-Based Multi-hop Routing and Cost-Effective Decentralized Storage System for Wireless Sensor Networks. Wireless Personal Communications 2023, 131, 3009–3025. [Google Scholar] [CrossRef]
  21. Draz, U.; Ali, T.; Yasin, S.; Waqas, U.; Rafiq, U. (2019, February). EADSA: Energy-aware distributed sink algorithm for hotspot problem in wireless sensor and actor networks. In 2019 International Conference on Engineering and Emerging Technologies (ICEET) (pp. 1–6). IEEE.
  22. Almasabi, S.; Shaf, A.; Ali, T.; Zafar, M.; Irfan, M.; Alsuwian, T. Securing smart grid data with Blockchain and wireless sensor networks: A collaborative approach. IEEE Access 2024. [Google Scholar] [CrossRef]
  23. Rajaram, V.; Pandimurugan, V.; Rajasoundaran, S.; Rodrigues, P.; Kumar, S.S.; Selvi, M.; Loganathan, V. Enriched energy-optimized LEACH protocol for efficient data transmission in a wireless sensor network. Wireless Networks 2024, 1–16. [Google Scholar] [CrossRef]
  24. Draz, U., Yasin, S., Ali, A., Khan, M.A., & Nawaz, A. (2021, January). Traffic agents-based analysis of hotspot effect in IoT-enabled wireless sensor network. In 2021 International Bhurban Conference on Applied Sciences and Technologies (IBCAST) (pp. 1029–1034). IEEE.
  25. Fu, X.; Pace, P.; Aloi, G.; Li, W.; Fortino, G. Toward robust and energy-efficient clustering wireless sensor networks: A double-stage scale-free topology evolution model. Computer Networks 2021, 200, 108521. [Google Scholar] [CrossRef]
  26. Lilhore, U.K.; Khalaf, O.I.; Simaiya, S.; Tavera Romero, C.A.; Abdulsahib, G.M.; Kumar, D. A depth-controlled and energy-efficient routing protocol for underwater wireless sensor networks. International Journal of Distributed Sensor Networks 2022, 18, 15501329221117118. [Google Scholar] [CrossRef]
  27. Bahadur, D.J.; Lakshmanan, L. A novel method for optimizing energy consumption in wireless sensor networks using genetic algorithm. Microprocessors and Microsystems 2023, 96, 104749. [Google Scholar] [CrossRef]
  28. Draz, U.; Ali, T.; Asghar, K.; Yasin, S.; Sharif, Z.; Abbas, Q.; Aman, S. A Comprehensive Comparative Analysis of Two Novel Underwater Routing Protocols. International Journal of Advanced Computer Science and Applications 2019, 10. [Google Scholar] [CrossRef]
  29. Sathish Kumar, L.; Ahmad, S.; Routray, S.; Prabu, A.V.; Alharbi, A.; Alouffi, B.; Rajasoundaran, S. Modern Energy Optimization Approach for Efficient Data Communication in IoT-Based Wireless Sensor Networks. Wireless Communications and Mobile Computing 2022, 2022, 7901587. [Google Scholar] [CrossRef]
  30. Han, Y.; Byun, H.; Zhang, L. Energy-balanced cluster-routing protocol based on particle swarm optimization with five mutation operators for wireless sensor networks. Sensors 2020, 20, 7217. [Google Scholar] [CrossRef] [PubMed]
  31. Ali, T.; Yasin, S.; Draz, U.; Ayaz, M. Towards formal modelling of subnet-based hotspot algorithm in wireless sensor networks. Wireless Personal Communications 2019, 107, 1573–1606. [Google Scholar] [CrossRef]
  32. Draz, U.; Ali, T.; Yasin, S.; Fareed, A.; Shahbaz, M. (2019, July). Watchman-based data packet forwarding algorithm for underwater wireless sensor and actor networks. In 2019 International Conference on electrical, communication, and computer engineering (ICECCE) (pp. 1–7). IEEE.
  33. Kathiroli, P.; Selvadurai, K. Energy-efficient cluster head selection using improved Sparrow Search Algorithm in Wireless Sensor Networks. Journal of King Saud University-Computer and Information Sciences 2022, 34, 8564–8575. [Google Scholar] [CrossRef]
  34. Kadhim Mohammed, L.A.; Hasan, A.M.; Hamza, E.K. Pruning and Validation Techniques Enhanced Genetic Algorithm for Energy Efficiency in Wireless Sensor Networks. Ingénierie des Systèmes d'Information 2024, 29. [Google Scholar]
  35. Senkumar, M.R.; Arafat, I.S.; Nathiya, R.; Nishath, S.M. Enhanced Energy Efficient Clustering and Routing Algorithm in Wireless Sensor Network. Wireless Personal Communications 2024, 1–28. [Google Scholar] [CrossRef]
  36. Prakash, V.; Singh, D.; Pandey, S.; Singh, S.; Singh, P.K. Energy-Optimization Route and Cluster Head Selection Using M-PSO and GA in Wireless Sensor Networks. Wireless Personal Communications 2024, 1–26. [Google Scholar] [CrossRef]
  37. Takale, D.G.; Mahalle, P.N.; Gawali, P.P.; Deshmukh, G.B.; Banchhor, C.O.; Mehta, P.S. (2024). Innovative and Sustainable Energy-Efficient Wireless Sensor Networks: Design and Techniques. In Edge Computational Intelligence for AI-Enabled IoT Systems (pp. 281–319). CRC Press.
  38. Suman MA, N.; Geethasri, V.; Pavan, A.S. A Routing Protocol for Efficiently Managing Energy In Underwater Wireless Sensor Networks With Depth Control. Journal of Science & Technology (JST) 2024, 9, 59–73. [Google Scholar]
  39. Draz, U. , Ali, T., Yasin, S., Waqas, U., & Rafiq, U. (2019, February). Towards formalism of link failure detection algorithm for wireless sensor and actor networks. In 2019 International Conference on Engineering and Emerging Technologies (ICEET) (pp. 1–6). IEEE.
  40. Draz, U.; Ali, T.; Ahmad Zafar, N.; Saeed Alwadie, A.; Irfan, M.; Yasin, S.; Khan Khattak, M.A.; et al. Energy efficient watchman-based flooding algorithm for IoT-enabled underwater wireless sensor and actor networks. ETRI Journal 2021, 43, 414–426. [Google Scholar] [CrossRef]
  41. Draz, U. , Ali, T., Yasin, S., & Waqas, U. (2018, December). Towards formal modelling of hotspot issue by watch-man nodes in wireless sensor and actor-network. In 2018 International Conference on Frontiers of Information Technology (FIT) (pp. 321–326). IEEE.
  42. Draz, U.; Ali, T.; Yasin, S.; Hussain, A.; Bukhari, S.; Nawaz, A.; Jung, L.T.; e, al. A novel layer-by-layer energy efficient watchman algorithm for wireless sensor and actor networks. Sci. Technol 2021, 24, 284–298. [Google Scholar]
  43. Draz, U.; Ali, T.; Yasin, S.; Chaudary, M.H.; Ayaz, M.; Aggoune EH, M.; Yasin, I. Hybridization and Optimization of Bioand Nature-Inspired Metaheuristic Techniques of Beacon Nodes Scheduling for Localization in Underwater IoT Networks. Mathematics 2024, 12, 3447. [Google Scholar] [CrossRef]
  44. Draz, U. , Ali, T., Chaudary, M.H., Sohail, A., & Yasin, S. (2022, December). TARIQ: Towards Area Adjustment and Rounding of Intermediate Nodes for Quadrilateration in Blockchain Enabled Underwater Beacon Node Localization. In 2022 International Conference on Frontiers of Information Technology (FIT) (pp. 41–46). IEEE.
Figure 1. Blockchain-Driven Energy Swapping with LSTM Prediction in Wireless Sensor Networks (WSN).
Figure 1. Blockchain-Driven Energy Swapping with LSTM Prediction in Wireless Sensor Networks (WSN).
Preprints 141294 g001
Figure 2. Comparative Analysis of Communication Overhead with Different Energy Management Protocols for Scaling Wireless Sensor Networks.
Figure 2. Comparative Analysis of Communication Overhead with Different Energy Management Protocols for Scaling Wireless Sensor Networks.
Preprints 141294 g002
Figure 3. Comparative Analysis of Network Lifetime with Different Energy Management Protocols.
Figure 3. Comparative Analysis of Network Lifetime with Different Energy Management Protocols.
Preprints 141294 g003
Figure 4. Comparative Analysis of Energy Loss Over Time: BDSES-WSN Outperforms Other Protocols in Minimizing Energy Wastage.
Figure 4. Comparative Analysis of Energy Loss Over Time: BDSES-WSN Outperforms Other Protocols in Minimizing Energy Wastage.
Preprints 141294 g004
Figure 5. Comparative analysis of transaction latency versus network size in four energy management protocols, demonstrating the superior efficiency of the BDSES-WSN (Blockchain-Based Energy Swapping) protocol in maintaining lower latency as network size increases.
Figure 5. Comparative analysis of transaction latency versus network size in four energy management protocols, demonstrating the superior efficiency of the BDSES-WSN (Blockchain-Based Energy Swapping) protocol in maintaining lower latency as network size increases.
Preprints 141294 g005
Figure 6. Comparative analysis of energy efficiency over time across four energy management protocols, showcasing the superior long-term energy efficiency of BDSES-WSN (Blockchain-Based Energy Swapping) compared to other protocols, particularly in extended network operations.
Figure 6. Comparative analysis of energy efficiency over time across four energy management protocols, showcasing the superior long-term energy efficiency of BDSES-WSN (Blockchain-Based Energy Swapping) compared to other protocols, particularly in extended network operations.
Preprints 141294 g006
Figure 7. Blockchain's impact on transactional security, demonstrating that secure transactions increase linearly with no incidents of tampering observed, highlighting Blockchain's robustness in preventing tampered transactions.
Figure 7. Blockchain's impact on transactional security, demonstrating that secure transactions increase linearly with no incidents of tampering observed, highlighting Blockchain's robustness in preventing tampered transactions.
Preprints 141294 g007
Figure 8. Comparison of energy consumption between Proof-of-Work (PoW) and Proof-of-Stake (PoS) consensus mechanisms, highlighting the significantly higher energy efficiency of PoS due to its less computationally intensive validation process.
Figure 8. Comparison of energy consumption between Proof-of-Work (PoW) and Proof-of-Stake (PoS) consensus mechanisms, highlighting the significantly higher energy efficiency of PoS due to its less computationally intensive validation process.
Preprints 141294 g008
Figure 9. Comparison of the optimized energy distribution before and after trading, illustrating how energy trading reduces variability and enhances efficiency by balancing energy levels across the system.
Figure 9. Comparison of the optimized energy distribution before and after trading, illustrating how energy trading reduces variability and enhances efficiency by balancing energy levels across the system.
Preprints 141294 g009
Figure 10. Comparison of actual energy consumption and LSTM-based predicted consumption over time, showcasing the model's effectiveness in forecasting energy needs with minimal deviation from the actual consumption pattern.
Figure 10. Comparison of actual energy consumption and LSTM-based predicted consumption over time, showcasing the model's effectiveness in forecasting energy needs with minimal deviation from the actual consumption pattern.
Preprints 141294 g010
Figure 11. Impact of environmental conditions on node lifetime: Comparing the effectiveness of BDSES-WSN (Energy Swapping) and traditional methods, showing improved node lifetimes with energy swapping across varying temperature and humidity conditions.
Figure 11. Impact of environmental conditions on node lifetime: Comparing the effectiveness of BDSES-WSN (Energy Swapping) and traditional methods, showing improved node lifetimes with energy swapping across varying temperature and humidity conditions.
Preprints 141294 g011
Figure 12. Real-Time Energy Usage vs Harvested Energy: Dynamic Adjustments for Efficient Energy Management in WSN Nodes.
Figure 12. Real-Time Energy Usage vs Harvested Energy: Dynamic Adjustments for Efficient Energy Management in WSN Nodes.
Preprints 141294 g012
Table 1. Comprehensive Overview of Recent Studies on Energy Efficiency, Security, and Blockchain Integration in Wireless Sensor Networks (WSNs).
Table 1. Comprehensive Overview of Recent Studies on Energy Efficiency, Security, and Blockchain Integration in Wireless Sensor Networks (WSNs).
Ref. Study Focus Algorithm/Technique Application Domain Key Contribution Limitation
1 Self-sustaining buoy system Water wave energy harvesting Smart, wireless sensing Uses water wave energy for data transmission Limited to specific environments
2 Securing WSNs using ML and Blockchain Machine learning, Blockchain WSNs Uses ML and Blockchain for secure WSN communication It does not focus on energy management
3 Self-sustaining multi-sensing system Energy harvesting from road traffic WSNs Efficient energy harvesting from traffic and heat sources Limited application to specific environments
4 Temperature and blockchain energy consumption Correlation analysis IoT microcontroller devices Analyzes temperature effects on blockchain energy consumption Focuses on correlation, not energy optimization
5 Dual-mode energy harvesting Solar and RF energy harvesting Self-sustaining sensor nodes Integrates solar and RF energy harvesting Limited to solar and RF energy sources
6 Self-sustaining wireless sensing for beetles Energy harvesting for flight control Wireless sensing Uses energy harvesting for wireless flight control in beetles Limited to specific biological systems
7 Optimizing power consumption in WSNs Power optimization WSNs Prolongs sustainability through power optimization Does not use Blockchain for energy management
8 Piezoelectric energy harvester for WSNs Piezoelectric energy harvesting WSNs Design and analysis of piezoelectric energy harvesting for WSNs Limited to piezoelectric sources
9 Blockchain-based WSN security Blockchain, cluster head selection WSNs Uses Blockchain for WSN security through cluster head selection No energy optimization addressed
10 Parametric performance evaluation of routing protocols SMDBRP and AEDGRP Underwater WSNs Evaluates the performance of two underwater routing protocols Focuses on performance, not energy trading
11 Remote RF unit selection for distributed base stations RF unit selection Self-sustaining distributed base stations Secure transmission in self-sustaining distributed base stations Limited to specific systems
12 Analysis of microgrids based on renewable energy Microgrid analysis Renewable energy in WSNs Extensive analysis of microgrids based on renewable energy Limited focus on WSN-specific challenges
13 Self-sustainable wireless sensor node for predictive maintenance Predictive maintenance Electric motors Enables predictive maintenance through wireless sensor nodes Limited to electric motor applications
14 Energy buffer-aided wireless-powered relaying Energy buffer-aided relaying Implant WBAN Wireless-powered relaying for self-sustaining implant WBAN Focuses on implant systems
15 Self-sustaining UWB positioning system UWB positioning system Indoor localization Uses ultrawideband for self-sustaining indoor localization Limited to indoor applications
16 Overview of energy harvesting for WSNs Energy harvesting overview WSNs Overview of Sustainable Energy Harvesting Methods Lacks blockchain integration
17 Self-powered WSNs in cyber-physical systems Self-powered WSNs Cyber-physical systems Focus on self-powered wireless sensor networks Limited to cyber-physical systems
18 Blockchain-based deep-learning for WSN routing Blockchain, deep learning WSNs Uses Blockchain and deep learning for quality routing in WSNs Focuses on routing, not energy management
19 Blockchain-based authentication protocol Blockchain authentication WSNs New authentication protocol for WSNs using Blockchain Focuses on security, not energy management
20 Blockchain-based routing and storage for WSNs Blockchain, multi-hop routing WSNs Enhanced routing efficiency and secure decentralized storage It does not focus on energy management
21 Energy-aware distributed sink algorithm EADSA WSNs Mitigates hotspot problem by balancing energy distribution Focused only on data routing
22 Securing smart grid data Blockchain WSNs Secures decentralized energy management and data integrity Energy management is not addressed
23 Energy-optimized LEACH protocol LEACH Protocol WSNs Optimized data transmission and energy efficiency Focuses on data communication, not energy swapping
24 Hotspot effect analysis in IoT-enabled WSNs Traffic agents IoT-based WSNs Analyzed hotspot effects in IoT networks No energy redistribution mechanism
25 Clustering model for energy efficiency Double-stage scale-free topology WSNs Improved energy efficiency and robustness Does not use Blockchain
26 Routing protocol for underwater WSNs Energy-efficient routing Underwater WSNs Optimizes energy consumption in underwater networks Limited to underwater environments
27 Genetic algorithm for optimizing energy Genetic algorithm WSNs Optimized energy consumption using genetic algorithms No security mechanisms are incorporated
28 Comparative analysis of underwater routing Underwater routing protocols Underwater WSNs Comprehensive analysis of two underwater protocols Focus on comparison, not energy trading
29 Energy optimization in IoT-based WSNs Modern energy optimization approach IoT-based WSNs Optimized energy-efficient data communication It does not address Blockchain for energy trading
30 Energy-balanced routing in WSNs PSO with mutation operators WSNs Energy-balanced routing with particle swarm optimization Limited application to general WSNs
31 Hotspot algorithm for energy distribution Subnet-based hotspot algorithm WSNs Manages energy depletion in hotspots Lacks decentralized energy trading
32 Packet forwarding in underwater WSNs Watchman-based forwarding Underwater WSNs Improved energy-efficient data forwarding It does not include energy management
33 Cluster head selection using the Sparrow Search Algorithm Improved Sparrow Search Algorithm WSNs Energy-efficient cluster head selection Focused on clustering, not energy redistribution
34 Energy-efficient genetic algorithm for WSNs Genetic algorithm with pruning techniques WSNs Enhanced energy efficiency with validation techniques No use of Blockchain for security
35 Clustering and routing algorithm for WSNs Enhanced clustering and routing WSNs Improved energy usage and resilience No blockchain application for decentralized management
36 Energy-optimization route and cluster selection PSO and GA WSNs Optimized route and cluster head selection No energy trading mechanism is included
37 Energy-efficient design for WSNs Intelligent, sustainable design techniques WSNs in IoT Focus on sustainable, energy-efficient design for IoT systems No blockchain or energy trading
Table 2. Optimal Hyperparameters for Wireless Sensor Network (WSN) Node Configuration, Blockchain-Based Energy Swapping, LSTM Neural Network, and Energy Harvesting Models.
Table 2. Optimal Hyperparameters for Wireless Sensor Network (WSN) Node Configuration, Blockchain-Based Energy Swapping, LSTM Neural Network, and Energy Harvesting Models.
Model Hyperparameter Optimal Parameters
WSN Node Configuration Number of Nodes 1000
Initial Node Energy 10 J
Energy Threshold (E-threshold) 2 J
Communication Energy Consumption 0.05 J/packet
Sensing Energy Consumption 0.02 J/sensor cycle
Processing Energy Consumption 0.01 J/operation
Harvesting Energy Rate Solar: 0.5 W, RF: 0.3 W
Blockchain-Based Energy Swapping Consensus Algorithm Proof-of-Stake (PoS)
Number of Validators 50
Transaction Fee 0.1% of traded energy
Block Size 2 MB
Validation Time 2 seconds
LSTM Neural Network (Energy Prediction) Number of Layers 3
Number of Neurons per Layer 64
Activation Function ReLU
Optimizer Adam
Learning Rate 0.0005
Sequence Length 100
Energy Harvesting Model Solar Conversion Efficiency 20%
RF Energy Conversion Efficiency 15%
Maximum Harvesting Capacity 5 W
Integration Strategy Weight Adjustment Factor Adaptive
Fitness Function Weights α = 0.6, β = 0.4
Threshold for Convergence 10⁻⁴
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated